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

2.0 Add Autoloads reference to Condition execution #977

Merged
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
9 changes: 7 additions & 2 deletions addons/dialogic/Other/DialogicGameHandler.gd
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,13 @@ func interpolate_volume_linearly(value, node):

func execute_condition(condition:String) -> bool:
var expr = Expression.new()
expr.parse(condition)
return true if expr.execute() else false
var autoload_names = []
var autoloads = []
for c in get_tree().root.get_children():
autoloads.append(c)
autoload_names.append(c.name)
expr.parse(condition, autoload_names)
return true if expr.execute(autoloads) else false

func get_autoloads() -> Array:
var autoloads = []
Expand Down