diff --git a/lib/room.coffee b/lib/room.coffee index 7660388..cb10aa8 100644 --- a/lib/room.coffee +++ b/lib/room.coffee @@ -112,6 +112,9 @@ class SaletRoom if @choices system.view.writeChoices(system, system.getSituationIdChoices(@choices, @maxChoices)) + if system.autosave + system.saveGame() + ### An internal function to get the room's description and the descriptions of every object in this room. diff --git a/lib/salet.coffee b/lib/salet.coffee index 6379d9d..f581f00 100644 --- a/lib/salet.coffee +++ b/lib/salet.coffee @@ -28,6 +28,7 @@ class Salet # REDEFINE THIS IN YOUR GAME game_id: null game_version: "1.0" + autosave: true rnd: null time: 0