Skip to content

Commit

Permalink
Fix mirror and z_index not being saved on Join event (#2334)
Browse files Browse the repository at this point in the history
* Fix mirror and z-index not being saved on join event

* Fix warning from Variant assignment
  • Loading branch information
Jowan-Spooner committed Jul 9, 2024
1 parent 0e802cc commit d2a4b62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions addons/dialogic/Modules/Character/event_character.gd
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ func to_text() -> String:
if action == Actions.JOIN or (action == Actions.UPDATE and set_transform):
result_string += " " + str(transform)

# SETS:
if action == Actions.JOIN or action == Actions.LEAVE:
set_mirrored = mirrored != default_values.get("mirrored", false)
set_z_index = z_index != default_values.get("z_index", 0)

var shortcode := store_to_shortcode_parameters()

if shortcode != "":
Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Modules/Core/subsystem_input.gd
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func _input(event:InputEvent) -> void:


func is_input_pressed(event: InputEvent, exact := false) -> bool:
var action := ProjectSettings.get_setting(_SETTING_INPUT_ACTION, _SETTING_INPUT_ACTION_DEFAULT)
var action: String = ProjectSettings.get_setting(_SETTING_INPUT_ACTION, _SETTING_INPUT_ACTION_DEFAULT)
return (event is InputEventAction and event.action == action) or Input.is_action_just_pressed(action, exact)


Expand Down

0 comments on commit d2a4b62

Please sign in to comment.