1
0
Fork 0
mirror of https://gitlab.com/Oreolek/salet.git synced 2024-07-02 06:45:06 +03:00

New flag: room.canSave

This fixes the problem with saving inside Inventory room.
This commit is contained in:
Alexander Yakovlev 2016-03-27 22:34:16 +07:00
parent 235aa28eb9
commit 4412081800
2 changed files with 3 additions and 1 deletions

View file

@ -39,6 +39,7 @@ room "start", salet,
# The inventory button is a regular link to this room.
# You may alter these as much as you like or scrap it along with the button.
room "inventory", salet,
canSave: false # saving the game here is forbidden. Aautosaving too.
enter: () ->
$("#inventory").hide()
exit: () ->

View file

@ -23,6 +23,7 @@ class SaletRoom
@canChoose = true
@priority = 1
@displayOrder = 1
@canSave = true
@tags = []
@choices = ""
@optionText = "Choice"
@ -99,7 +100,7 @@ class SaletRoom
if @afterChoices?
@afterChoices.fcall(this, system, f)
if system.autosave
if system.autosave and @canSave
system.saveGame()
###