Skip to content

Commit 2ee88a2

Browse files
Fix conditions contained in {brackets} (#2380)
Conditions that where sorrounded by brackets (like is required in the conditional modifier) would sometimes not be correctly resolved. This should fix this.
1 parent 4eb5782 commit 2ee88a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

addons/dialogic/Modules/Core/subsystem_expression.gd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ func execute_string(string:String, default: Variant = null, no_warning := false)
2020
for res in regex.search_all(string):
2121
var value: Variant = dialogic.VAR.get_variable(res.get_string())
2222
string = string.replace(res.get_string(), var_to_str(value))
23+
24+
if string.begins_with("{") and string.ends_with('}') and string.count("{") == 1:
25+
string = string.trim_prefix("{").trim_suffix("}")
2326

2427
var expr := Expression.new()
2528

0 commit comments

Comments
 (0)