Skip to main content

Module savegame_schema

Module savegame_schema 

Source
Expand description

The serializers of the objects a save holds, as schemas (see crate::savegame). Each entry names the Application function it follows; field names give the in-memory offset where no better name is known.

Enums§

Cond
A version test against the enclosing block’s version.
Op
One step of a serializer.

Constants§

ACHIEVEMENTS
The game’s achievement instances.
CALENDAR
The calendar block of the game state: a value and the time.
ENVIRONMENT
The environment: climate and month descriptions, weather state, then one entry per weather effect of the climate (the count is not written).
EVENT_LOG
The event log (version 1), Game.
JOBS
The job manager (version 3): the table from id to work, the 14 category sets (13 before version 3), the work by profession, then the last id, the next priority and the pass. The priority index is rebuilt on load from each work’s priority.
MINIMAP
The minimap: the two images’ texels, then the image size.
TOOLS
The tool manager (version 2).
TOWN
The town manager (version 6), Game: the registries of buildings and people by kind, the professions’ workers, the stock targets and the statistics.

Functions§

default_block
A block’s fields at their defaults (the town, the managers), as default_fields makes an object’s.
default_fields
A new object’s fields for type name: every step’s default (zero, false, none, empty), in the schema’s order, each block at its version. The writer fills them in.
schema_for
The class name and the schema of an object type, by type id.
type_names
Every object type the schemas cover.