CSPresetOverrides

class CSPresetOverrides(preset: CSPreset<*, *>)

Lets a parent store only what a preset changes from its item, so the rest follows the item. On load the stored data lies over the item's data, unless the parent's item stores this preset whole. changes holds the keys the parent stored and those changed since that load, with null for a key the preset removed from the item's data.

Constructors

Link copied to clipboard
constructor(preset: CSPreset<*, *>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var parent: CSPreset<*, *>?

Functions

Link copied to clipboard
fun fullData(stored: Map<String, Any?>): Map<String, Any?>
Link copied to clipboard

Takes up the data a preset created after its parent's load found there. Data as the parent's item stores it still has to load over the item. Anything else is the state of an earlier run, whose keys neither item holds count as loaded.

Link copied to clipboard
fun onLoaded()
Link copied to clipboard
fun onLoadStored(stored: Map<String, Any?>)