Temporary persistent data storage for mods to use.
Static variables
staticfinalread onlystores:StringMap<Dynamic> = new StringMap<Dynamic>()
All registered stores for this session.
Static methods
staticget(id:String):Null<Dynamic>
Helper function to get a store by ID.
@id The target ID of the store.
Returns:
The store data, or null if the store did not exist.
staticregister(id:String, ?data:Dynamic):Dynamic
Attempts to register a new store with the given ID and return it.
If a store with the same ID already exists, that store will be returned instead (discards data).
@id The unique ID for this store. @data Optional initial data, uses an empty object by default.
Returns:
The store data at the given ID.
staticremove(id:String):Null<Dynamic>
Helper function to remove a store by ID and return it.
@id The target ID of the store.
Returns:
The store data, or null if the store did not exist.