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

Commit

Permalink
lock inventory on load if dead
Browse files Browse the repository at this point in the history
  • Loading branch information
klikini committed Sep 17, 2015
1 parent 84c584a commit 1e36bc6
Showing 1 changed file with 9 additions and 0 deletions.
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 1e36bc6

Please sign in to comment.