From d75a53e9fc7ba3bb83404658c4c4865d1c5ef962 Mon Sep 17 00:00:00 2001 From: Jowan-Spooner Date: Mon, 20 May 2024 12:13:10 +0200 Subject: [PATCH] Make sure manual advance state keys have a fallback To avoid errors on load. --- addons/dialogic/Modules/Text/manual_advance.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/dialogic/Modules/Text/manual_advance.gd b/addons/dialogic/Modules/Text/manual_advance.gd index f102fec91..e0e6f3303 100644 --- a/addons/dialogic/Modules/Text/manual_advance.gd +++ b/addons/dialogic/Modules/Text/manual_advance.gd @@ -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] = {