SaveData
Interfaces
Section titled “Interfaces”SaveData
Section titled “SaveData”Defined in: packages/isaacscript-common/src/interfaces/SaveData.ts:29
This is the format of the object that you give to the save data manager. It will contains all of the variables for the particular mod feature.
Depending on which object keys you use, the variables will automatically be reset at certain times and automatically saved to disk.
Each sub-object of save data has a string as a key and arbitrary data as a value. However, the data has to be serializable. Specifically, this means that you can only use the following types:
booleannumberstringundefined(will be skipped over when saving)null(will be skipped over when saving)Map/DefaultMapSet- serializable Isaac API classes (such as
Color) - TSTL classes (i.e. classes that you made yourself)
- sub-objects or a
LuaMapthat contains the above values
Type Parameters
Section titled “Type Parameters”Persistent
Section titled “Persistent”Persistent = unknown
Run = unknown
Level = unknown
Properties
Section titled “Properties”persistent?
Section titled “persistent?”
optionalpersistent?:Serializable<Persistent>
Defined in: packages/isaacscript-common/src/interfaces/SaveData.ts:34
optionalrun?:Serializable<Run>
Defined in: packages/isaacscript-common/src/interfaces/SaveData.ts:35
level?
Section titled “level?”
optionallevel?:Serializable<Level>
Defined in: packages/isaacscript-common/src/interfaces/SaveData.ts:36
optionalroom?:Record<string,unknown>
Defined in: packages/isaacscript-common/src/interfaces/SaveData.ts:37
