From 84c584a326e6a5ca76c36e17898313ac6e42c2ae Mon Sep 17 00:00:00 2001 From: klikini Date: Thu, 17 Sep 2015 17:45:50 -0500 Subject: [PATCH 1/2] fix konami and shrine icon --- lib/src/display/render/worldmap.dart | 2 +- lib/src/display/ui_templates/interactions_menu.dart | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/src/display/render/worldmap.dart b/lib/src/display/render/worldmap.dart index 63ad9afd..db833514 100644 --- a/lib/src/display/render/worldmap.dart +++ b/lib/src/display/render/worldmap.dart @@ -294,7 +294,7 @@ class WorldMap { } } ]; - if (metabolics.energy >= 50) { + if (metabolics.energy >= 50 || (inputManager.konamiDone && !inputManager.freeTeleportUsed)) { options[1]["enabled"] = true; options[1]["description"] = "Spend 50 energy to get here right now"; } diff --git a/lib/src/display/ui_templates/interactions_menu.dart b/lib/src/display/ui_templates/interactions_menu.dart index 5e31b399..e54adb9a 100644 --- a/lib/src/display/ui_templates/interactions_menu.dart +++ b/lib/src/display/ui_templates/interactions_menu.dart @@ -1,6 +1,9 @@ part of couclient; class InteractionWindow { + static List shrineTypes = [ + "Alph", "Cosma", "Friendly", "Grendaline", "Humbaba", "Lem", "Mab", "Pot", "Spriggan", "Tii", "Zille" + ]; static Element create() { DivElement interactionWindow = new DivElement() ..id = "InteractionWindow" @@ -39,6 +42,8 @@ class InteractionWindow { String entityName = entityOnStreet.attributes["type"]; if (entityName.contains("Street Spirit")) { entityInBubble = new ImageElement()..src = "files/system/icons/currant.svg"; + } else if (shrineTypes.contains(entityName)) { + entityInBubble = new ImageElement()..src = "files/system/icons/shrine.svg"; } else { entityInBubble = new ImageElement()..src = "http://childrenofur.com/assets/staticEntityImages/$entityName.png"; } From 1e36bc67f1958ee952fdb83a3d08fa487cdf243a Mon Sep 17 00:00:00 2001 From: klikini Date: Thu, 17 Sep 2015 18:11:26 -0500 Subject: [PATCH 2/2] lock inventory on load if dead --- lib/src/display/windows/rock_window.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/src/display/windows/rock_window.dart b/lib/src/display/windows/rock_window.dart index 227e8463..5653aba1 100644 --- a/lib/src/display/windows/rock_window.dart +++ b/lib/src/display/windows/rock_window.dart @@ -121,6 +121,15 @@ class RockWindow extends Modal { RockWindow() { prepare(); + // Lock/unlock inventory on game load + new Service(["gameLoaded"], (_) { + if (metabolics.energy == 0) { + querySelector("#inventory /deep/ #disableinventory").hidden = false; + } else { + querySelector("#inventory /deep/ #disableinventory").hidden = true; + } + }); + // Toggle window by clicking rock setupUiButton(querySelector("#petrock"));