Skip to main content

MapSaveFormat

A class in Root.Township, Alta.Map.

Save file holding which pieces of each map are still hidden. Server: loaded per player, or once as a shared file when the map is shared.

Constructors​

MemberWhat it is
MapSaveFormat()Creates a MapSaveFormat with default values.

Fields​

1 private and internal field
MemberWhat it is
private const uint VersionFile format version written at the start of the file (0).

Properties​

MemberWhat it is
Dictionary<Map, bool[]> MapPieceStates { get; set; }One bool array per map, one entry per piece. true means the piece is still undiscovered; a new file starts all true.

Methods​

MemberWhat it is
override IAltaFileFormat Clone()Returns a copy with the piece states of every map copied over.
override void ReadFrom(FileInfo info, Stream stream)Reads the version, then each map's hash followed by its piece states.
override void WriteTo(Stream stream, CancellationToken token)Writes the version, map count, then each map's hash and piece states.

Used in​

Members of other types that take, return or hold a MapSaveFormat: