Class ClientMapSystem
The state both map panels share: which scene is being mapped, how much of it the character has explored, what they have pinned to it, and the overhead camera that photographs it.
public static class ClientMapSystem
- Inheritance
-
ClientMapSystem
- Inherited Members
Remarks
Why the panels do not each own this. The minimap and the world map draw the same world, and almost everything they need is expensive to have twice: a second fog grid is a second quarter-megabyte that has to be revealed in step with the first or the two maps disagree about where the player has been; a second overhead camera is a second full scene render every frame; a second note list is a second writer to the same file. Both panels are views onto this.
Lifetime. Driven entirely from SetCharacter(IPlayerCharacter) and Tick(), which the minimap calls — it is the panel that is always present. The world map reads the same state and works whether or not the minimap is open, but a build that removes the minimap panel entirely has to drive this from somewhere else.
Properties
Character
The character whose map is being shown.
public static IPlayerCharacter Character { get; }
Property Value
Definition
The current scene's map definition, or null when it has none.
public static WorldMapDefinition Definition { get; }
Property Value
DetailsCache
The scene details cache, supplied by whichever panel loads first.
public static WorldSceneDetailsCache DetailsCache { get; set; }
Property Value
Filter
The rule deciding which markers may be drawn.
public static MapMarkerFilter Filter { get; }
Property Value
Fog
The character's explored map for the current scene, or null before one loads.
public static FogOfWarMap Fog { get; }
Property Value
IsMapImageLoading
Whether the baked map image is still being loaded.
public static bool IsMapImageLoading { get; }
Property Value
MapImage
The baked overhead image for the current scene, or null when there is none.
public static Texture2D MapImage { get; }
Property Value
- Texture2D
MapRect
The world rectangle the current scene's map covers.
public static Rect MapRect { get; }
Property Value
- Rect
Notes
The character's notes for the current scene.
public static List<MapNote> Notes { get; }
Property Value
Renderer
The overhead camera feeding the minimap.
public static MinimapCameraRenderer Renderer { get; }
Property Value
SceneDisplayName
The scene's player-facing name.
public static string SceneDisplayName { get; }
Property Value
SceneName
The scene the loaded state belongs to.
public static string SceneName { get; }
Property Value
Methods
AddNote(Vector3, string, string, int)
Adds a note at a world position.
public static MapNote AddNote(Vector3 position, string title, string text, int colorIndex)
Parameters
positionVector3Where to pin it.
titlestringThe note's title.
textstringThe note's body.
colorIndexintWhich palette colour to draw the pin in.
Returns
- MapNote
The note, or null when the character's note allowance is full.
Flush()
Writes anything outstanding immediately.
public static void Flush()
Remarks
Called on scene change, character change and application quit. The debounce is a throughput optimisation, not a durability policy — every path that ends the current map's life has to close it out, or the last stretch of walking before a zone change is silently lost.
RemoveNote(long)
Removes a note.
public static bool RemoveNote(long noteID)
Parameters
noteIDlongThe note's identifier.
Returns
- bool
True when a note was removed.
SetCharacter(IPlayerCharacter)
Points the map subsystem at a character, loading everything for the scene they are in.
public static void SetCharacter(IPlayerCharacter character)
Parameters
characterIPlayerCharacterThe local player character, or null to tear down.
Shutdown()
Tears everything down. Called on quit to login.
public static void Shutdown()
Tick()
Advances the fog, and writes it when it has settled.
public static void Tick()
Remarks
Called from the minimap's per-frame update whether or not the minimap is visible. That is deliberate: exploration is something the character does by walking, not something they do by looking at a map, and tying it to the panel's visibility would mean a player who closed their minimap stopped revealing the world.
UpdateNote(long, string, string)
Replaces a note's text.
public static bool UpdateNote(long noteID, string title, string text)
Parameters
Returns
- bool
True when a note was found and updated.
Events
OnNotesChanged
Raised when a note is added, edited or removed.
public static event Action OnNotesChanged
Event Type
OnSceneMapChanged
Raised when the loaded scene changes, so panels can rebuild everything derived from it.
public static event Action OnSceneMapChanged