Note, I know nothing about this storeStates thingy, relying on searches
There’s one obvious pitfall -
Even for a String type Item, a state object is state object.
You stored a string there and so should properly recover a string -
var Map SceneState = SceneString1.state.toString
Don’t think that will fix anything though !
I know you declare a Map type there, but DSL is loosely typed.
I think SceneState will become a simple string variable.
Have to try harder to construct a Map.
It should at least be var Map<Item,state> SceneState
but from what I read there is a trap about keyword Item
This looks really relevant here, both how to construct the Map and hint about populating it -
I think in the end you may need to build code that parses the string and puts the data in the Map one by one?