fix: restores state on returning; for some reason, previously state was modified but never restored.
This commit is contained in:
committed by
Julian Murgia
parent
328e5efdd9
commit
9398ce96c3
@@ -80,7 +80,11 @@ func run():
|
|||||||
self,
|
self,
|
||||||
"Starting dialog."
|
"Starting dialog."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Since we're changing state, we need to remember and reset it once we're done
|
||||||
|
var previous_state = escoria.current_state
|
||||||
escoria.current_state = escoria.GAME_STATE.DIALOG
|
escoria.current_state = escoria.GAME_STATE.DIALOG
|
||||||
|
|
||||||
if !escoria.dialog_player:
|
if !escoria.dialog_player:
|
||||||
escoria.dialog_player = escoria.main.current_scene.get_node(
|
escoria.dialog_player = escoria.main.current_scene.get_node(
|
||||||
"game/ui/dialog_layer/dialog_player"
|
"game/ui/dialog_layer/dialog_player"
|
||||||
@@ -103,4 +107,6 @@ func run():
|
|||||||
if rc != ESCExecution.RC_CANCEL:
|
if rc != ESCExecution.RC_CANCEL:
|
||||||
return self.run()
|
return self.run()
|
||||||
|
|
||||||
|
escoria.current_state = previous_state
|
||||||
|
|
||||||
return rc
|
return rc
|
||||||
|
|||||||
Reference in New Issue
Block a user