Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
fix bug where item count was wrong in the ui
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBlackhart committed Sep 18, 2015
2 parents 38778c2 + 1e36bc6 commit cc522f5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/display/render/worldmap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
5 changes: 5 additions & 0 deletions lib/src/display/ui_templates/interactions_menu.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
part of couclient;

class InteractionWindow {
static List<String> shrineTypes = [
"Alph", "Cosma", "Friendly", "Grendaline", "Humbaba", "Lem", "Mab", "Pot", "Spriggan", "Tii", "Zille"
];
static Element create() {
DivElement interactionWindow = new DivElement()
..id = "InteractionWindow"
Expand Down Expand Up @@ -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";
}
Expand Down
9 changes: 9 additions & 0 deletions lib/src/display/windows/rock_window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand Down

0 comments on commit cc522f5

Please sign in to comment.