Hiy, is something like:
@export var array: Array[(String, Int)] = [("test", 5), ("a", 2)]
possible with godot?
Longer Question:
I have a resource and want to export it, with a dynamically changeable int.
More Concrete:
I have effects for weapons (like damage something) and I want to be able to specify how much damage the item does. Because the item could also have effects like add armor and stuff like that I would like to store all effects & how much they scale in a Array and export it.
Bad Solutions:
- One could use 2 array and always fill them up that they mach each
other. (Bad because error prone and hard to read)
- A Dictionary could be used one value is the Key (e.g. the resource
effect) & the value is the scale. (Bad because Dict are untyped,
malformed data could slip in)
If any one knows a better solution, I would really appreciate it!