Skip to content

Commit

Permalink
Small fixes before alpha 14 (#2241)
Browse files Browse the repository at this point in the history
* Fix set Variable event

* Make sure manual advance state keys have a fallback

To avoid errors on load.

* Update version to alpha 14
  • Loading branch information
Jowan-Spooner committed May 20, 2024
1 parent 1b6abf2 commit 2abb8e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions addons/dialogic/Modules/Text/manual_advance.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/Modules/Variable/event_variable.gd
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func _execute() -> void:
Operations.DIVIDE:
result = original_value / interpreted_value

dialogic.VAR.set_variable(name, interpreted_value)
dialogic.VAR.set_variable(name, result)
dialogic.VAR.variable_was_set.emit(
{
'variable' : name,
Expand Down
2 changes: 1 addition & 1 deletion addons/dialogic/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ name="Dialogic"
description="Create dialogs, characters and scenes to display conversations in your Godot games.
https://github.com/dialogic-godot/dialogic"
author="Emi, Jowan Spooner, Exelia, and more!"
version="2.0-Alpha-13 (Godot 4.2+)"
version="2.0-Alpha-14 (Godot 4.2+)"
script="plugin.gd"

0 comments on commit 2abb8e0

Please sign in to comment.