PlayerMapManager
A class in Root.Township, Alta.Map.
Map discovery state for one player (or the shared map): which pieces of each Map are uncovered. Kept by MapManager and saved in the player's map file.
- Listed in World, chunks and saving
- Documented in Map and landmarks
Constructors
| Member | What it is |
|---|---|
PlayerMapManager() | Creates a PlayerMapManager from save. |
PlayerMapManager(IAltaFile file) | Creates a PlayerMapManager from save. |
PlayerMapManager(MapSaveFormat save) | Creates a PlayerMapManager from save. |
Fields
3 private and internal fields
| Member | What it is |
|---|---|
private IAltaFile file | The player's map save file. Server: written after a piece is discovered. |
private static Logger logger | NLog logger for this class. |
private MapSaveFormat save | Per-map piece states. True means the piece is still undiscovered. |
Methods
| Member | What it is |
|---|---|
bool DiscoverPiece(Map map, int pieceIndex) | Marks a piece discovered and tells the map. Returns false if it already was. The server then saves the file. |
IEnumerable<int> GetUndiscoveredMapPieces(Map map) (iterator) | Indexes of the pieces not yet discovered on the map. |
bool IsThisMapPieceDiscovered(Map map, int pieceIndex) | True if the piece has been discovered. |
void SyncMapManager(Stream stream) | Reads or writes the discovery flags of every map. MapManager sends it to each player when they connect. |
1 private and internal method
Used in
Members of other types that take, return or hold a PlayerMapManager: