Parcourir la source

Merge branch 'master' into geta

geta
Fen Dweller il y a 5 ans
Parent
révision
4422e9d73e
2 fichiers modifiés avec 10 ajouts et 2 suppressions
  1. +6
    -1
      stories/demo.js
  2. +4
    -1
      world.js

+ 6
- 1
stories/demo.js Voir le fichier

@@ -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 Voir le fichier

@@ -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");
}
}



Chargement…
Annuler
Enregistrer