viniciusgerevini / godot-clyde-dialogue

Clyde Dialogue Language Importer and interpreter for Godot.
MIT License
89 stars 11 forks source link

fix options and variations after loading previously stringified object #13

Closed viniciusgerevini closed 2 years ago

viniciusgerevini commented 2 years ago

Solves #12

As reported in the issue, when loading previously persisted dialogue internal data, options that where not supposed to be visible are returned. This is due to objects allowing numbers as keys, while JSON (the format usually used for persistence) not.

This also affects variations and external variables.

I'm fixing options and variations in this PR.

For external variables I'll enforce String type for variable names in the next major version. What this means is that for the time being if saving a variable with a number as name dialogue.set_variable(1, "blah"), the only way to get it back after saving is by using a string dialogue.get_variable("1").