-
-
Notifications
You must be signed in to change notification settings - Fork 225
Description
I would like to suggest a feature to handle arrays inside Dialogue Manager. It appears that strings/bool/int/float etc are supported:
but if the type of the global state is an array, handle it inside Dialogue Manager. An example of this would be:
if "apples" in SomeGlobal.some_array_property
Nathan: I have apples
elif "oranges" in SomeGlobal.some_array_property
Nathan: I have oranges too.
elif "grapes" in SomeGlobal.some_array_property
Nathan: I have grapes as well.
else
Nathan: I have no fruit.
This allows for more complex conditionals and will allow the SomeGlobal property list to stay concise as we can now load multiple properties into a single SomeGlobal.some_array_property instead of enumerating them into multiple properties.
I don't think you have to implement all the methods in the Godot Array class https://docs.godotengine.org/en/stable/classes/class_array.html
but a simple "in" function or ".has()" would be a good starting point and would satisfy this feature request. I am currently using many SomeGlobal.some_property which bloats my SomeGlobal global variable set.