Skip to content

Commit

Permalink
Make sure manual advance state keys have a fallback
Browse files Browse the repository at this point in the history
To avoid errors on load.
  • Loading branch information
Jowan-Spooner committed May 20, 2024
1 parent f445771 commit d75a53e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/dialogic/Modules/Text/manual_advance.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func _init() -> void:
var state_info := DialogicUtil.autoload().current_state_info
var manual_advance: Dictionary = state_info[STATE_INFO_KEY]

disabled_until_next_event = manual_advance[DISABLED_UNTIL_NEXT_EVENT_STATE_KEY]
system_enabled = manual_advance[ENABLED_STATE_KEY]
disabled_until_next_event = manual_advance.get(DISABLED_UNTIL_NEXT_EVENT_STATE_KEY, disabled_until_next_event)
system_enabled = manual_advance.get(ENABLED_STATE_KEY, system_enabled)

else:
DialogicUtil.autoload().current_state_info[STATE_INFO_KEY] = {
Expand Down

0 comments on commit d75a53e

Please sign in to comment.