SaveData
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
| Name | Type |
|---|---|
Persistent | unknown |
Run | unknown |
Level | unknown |
Properties
persistent
• Optional persistent: Serializable<Persistent>
Defined in
packages/isaacscript-common/src/interfaces/SaveData.ts:33
run
• Optional run: Serializable<Run>
Defined in
packages/isaacscript-common/src/interfaces/SaveData.ts:34
level
• Optional level: Serializable<Level>
Defined in
packages/isaacscript-common/src/interfaces/SaveData.ts:35
room
• Optional room: Record<string, unknown>