Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple bug-fixes #2253

Merged
merged 4 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/dialogic/Editor/CharacterEditor/character_editor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func update_default_portrait_star(default_portrait_name: String) -> void:
var item_list: Array = %PortraitTree.get_root().get_children()
if item_list.is_empty() == false:
while true:
var item := item_list.pop_back()
var item: TreeItem = item_list.pop_back()
if item.get_button_by_id(0, 2) != -1:
item.erase_button(0, item.get_button_by_id(0, 2))
if %PortraitTree.get_full_item_name(item) == default_portrait_name:
Expand Down
5 changes: 3 additions & 2 deletions addons/dialogic/Editor/editors_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func _ready() -> void:

find_parent('EditorView').plugin_reference.get_editor_interface().get_file_system_dock().files_moved.connect(_on_file_moved)
find_parent('EditorView').plugin_reference.get_editor_interface().get_file_system_dock().file_removed.connect(_on_file_removed)

hsplit.set("theme_override_constants/separation", get_theme_constant("base_margin", "Editor") * DialogicUtil.get_editor_scale())


Expand Down Expand Up @@ -209,7 +209,8 @@ func _on_add_resource_dialog_accepted(path:String, callable:Callable) -> void:

## Called by the plugin.gd script on CTRL+S or Debug Game start
func save_current_resource() -> void:
current_editor._save()
if current_editor:
current_editor._save()


## Change the resource state
Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Modules/Character/subsystem_portraits.gd
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func get_valid_portrait(character:DialogicCharacter, portrait:String) -> String:
return ""

if "{" in portrait and dialogic.has_subsystem("Expressions"):
var test := dialogic.Expressions.execute_string(portrait)
var test: Variant = dialogic.Expressions.execute_string(portrait)
if test:
portrait = str(test)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func _process(delta:float) -> void:

var center := get_viewport_rect().size / 2.0

var dist_x := abs(base_position.x - center.x)
var dist_y := abs(base_position.y - center.y)
var dist_x := absf(base_position.x - center.x)
var dist_y := absf(base_position.y - center.y)
var x_e := center.x - bubble_rect.size.x
var y_e := center.y - bubble_rect.size.y
var influence_x := remap(clamp(dist_x, x_e, center.x), x_e, center.x * 0.8, 0.0, 1.0)
Expand Down
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: 0 additions & 2 deletions addons/dialogic/Modules/Text/node_dialog_text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ func _set(property: StringName, what: Variant) -> bool:
return true
return false

return false


func _ready() -> void:
# add to necessary
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
Loading