Table of Contents

Interface ISerializableComponent

Namespace
GrindFest
Assembly
GrindFest.dll

A component that stores its own state in part of the save. It is handed its own slot (ComponentPayload.Writer / ComponentPayload.Reader) and deals only in its own typed payload - the key, the byte array and the missing-entry case all live in that slot.

public interface ISerializableComponent

Properties

SaveKey

Where this component's payload lives inside Components: stable, unique, and not to be changed - renaming it silently orphans the payload of every save that already exists. Ours are named after what they store ("GrindFest.ResourcePotion", not "...LiquidContainerBehaviour"); a mod must use its own prefix ("MyMod.Whatever").

The default is the component's type name. That is stable for a plain C# component but not for a generated/proxied one, so a mod should always declare this explicitly rather than rely on it.

Methods

Deserialize(Reader)
Serialize(Writer)