Selaa lähdekoodia

Merge branch 'master' into geta

geta
Fen Dweller 5 vuotta sitten
vanhempi
commit
4422e9d73e
2 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. +6
    -1
      stories/demo.js
  2. +4
    -1
      world.js

+ 6
- 1
stories/demo.js Näytä tiedosto

@@ -63,7 +63,12 @@ stories.push({
"execute": (room) => {
state.player.rooms[room.id].squinted = true;
print(["You stare at the wall and notice a secret door. But where is the key?"]);
}
},
"conditions": [
(room) => {
return !state.player.rooms[room.id].squinted;
}
]
},
{
"name": "Find Keys",


+ 4
- 1
world.js Näytä tiedosto

@@ -259,7 +259,10 @@ function updateRoom() {
if (action.conditions) {
if (!action.conditions.every(cond => cond(room))) {
button.classList.add("disabled");
button.setAttribute("disabled", "true");
button.setAttribute("disabled", true);
} else {
button.classList.remove("disabled");
button.removeAttribute("disabled");
}
}



Loading…
Peruuta
Tallenna