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:
parent
235aa28eb9
commit
4412081800
|
@ -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: () ->
|
||||
|
|
|
@ -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()
|
||||
|
||||
###
|
||||
|
|
Loading…
Reference in a new issue