From d273522baad36b4b4abad390c9fb3ab05057a1a4 Mon Sep 17 00:00:00 2001 From: Jowan-Spooner Date: Thu, 23 May 2024 13:04:25 +0200 Subject: [PATCH] Prevent autoload from constantly changing position in list --- addons/dialogic/Modules/Settings/event_setting.gd | 4 ++-- addons/dialogic/Modules/Text/subsystem_text.gd | 2 +- .../Modules/Variable/variables_editor/variable_tree.gd | 2 +- addons/dialogic/plugin.gd | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/dialogic/Modules/Settings/event_setting.gd b/addons/dialogic/Modules/Settings/event_setting.gd index 7c808b678..1e711a7f9 100644 --- a/addons/dialogic/Modules/Settings/event_setting.gd +++ b/addons/dialogic/Modules/Settings/event_setting.gd @@ -22,14 +22,14 @@ var _value_type := 0 : return _value_type set(_value): _value_type = _value - if not _suppress_default_value: + if not _suppress_default_value: match _value_type: SettingValueType.STRING, SettingValueType.VARIABLE, SettingValueType.EXPRESSION: value = "" SettingValueType.NUMBER: value = 0 ui_update_needed.emit() - + var value: Variant = "" var mode := Modes.SET diff --git a/addons/dialogic/Modules/Text/subsystem_text.gd b/addons/dialogic/Modules/Text/subsystem_text.gd index e18cdee9b..95618cd0f 100644 --- a/addons/dialogic/Modules/Text/subsystem_text.gd +++ b/addons/dialogic/Modules/Text/subsystem_text.gd @@ -75,7 +75,7 @@ func load_game_state(load_flag:=LoadFlags.FULL_LOAD) -> void: func post_install(): dialogic.Settings.connect_to_change('text_speed', _update_user_speed) - + collect_character_names() collect_text_effects() collect_text_modifiers() diff --git a/addons/dialogic/Modules/Variable/variables_editor/variable_tree.gd b/addons/dialogic/Modules/Variable/variables_editor/variable_tree.gd index 830e71acb..d800785ff 100644 --- a/addons/dialogic/Modules/Variable/variables_editor/variable_tree.gd +++ b/addons/dialogic/Modules/Variable/variables_editor/variable_tree.gd @@ -310,7 +310,7 @@ func _drop_data(position:Vector2, item:Variant) -> void: ################################################################################ func report_name_changes(item:TreeItem) -> void: - + match item.get_meta('type'): "VARIABLE": if item.get_meta("new", false): diff --git a/addons/dialogic/plugin.gd b/addons/dialogic/plugin.gd index 5e782102e..51b533243 100644 --- a/addons/dialogic/plugin.gd +++ b/addons/dialogic/plugin.gd @@ -42,8 +42,9 @@ func _enter_tree() -> void: # Auto-update the singleton path for alpha users # TODO remove at some point during beta or later - remove_autoload_singleton(PLUGIN_NAME) - add_autoload_singleton(PLUGIN_NAME, PLUGIN_HANDLER_PATH) + if not "Core" in ProjectSettings.get_setting("autoload/"+PLUGIN_NAME, null): + remove_autoload_singleton(PLUGIN_NAME) + add_autoload_singleton(PLUGIN_NAME, PLUGIN_HANDLER_PATH) func _exit_tree() -> void: