localStorage, persistent across script reloads and game restarts. Global, no import.
Storage is per script folder, not
manifest.name. Scripts never see each other’s keys.Map, Set, Date, typed arrays, BigInt). Class instances come back as plain
objects. Functions and native objects (Vector, Pointer, …) throw a DataCloneError.
Methods
getItem
null when the key doesn’t exist.
setItem
value under key. undefined removes the key, null is stored as a value.
Others
Keys must be strings; anything else throws
TypeError.
Property access
Keys work as properties too.length or toString need getItem / setItem.