Skip to content

Commit

Permalink
Prevent autoload from constantly changing position in list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jowan-Spooner committed May 23, 2024
1 parent 2abb8e0 commit d273522
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions addons/dialogic/Modules/Settings/event_setting.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Modules/Text/subsystem_text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions addons/dialogic/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d273522

Please sign in to comment.