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").
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 stringdialogue.get_variable("1")
.