Table of Contents

Class MapContent

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

Turns the map's non-entity content — authored landmarks and the player's own notes — into the same snapshots the marker filter produces for live objects.

public static class MapContent
Inheritance
MapContent
Inherited Members

Remarks

Kept apart from MapMarkerFilter because the questions are different. The filter's job is to decide what a player is allowed to know about other entities, and everything in it is about relationships, ranges and staleness. Nothing here is a secret from anybody: a landmark is scene data and a note is something the player wrote. Mixing them would put content with no visibility rules through a class whose entire purpose is visibility rules.

Fields

NoteColors

The colours a note's pin may be drawn in.

public static readonly Color[] NoteColors

Field Value

Color[]

Remarks

A fixed palette rather than a colour picker. The pins are drawn at fourteen points over terrain of every possible hue, and a player who picks their own colour will eventually pick one that is invisible against the ground they put it on. These are chosen to stay legible against both the dark water and the bright sand a map contains.

Methods

AppendNotes(List<MapMarkerSnapshot>, IReadOnlyList<MapNote>, bool)

Adds the player's notes to a snapshot list.

public static void AppendNotes(List<MapMarkerSnapshot> results, IReadOnlyList<MapNote> notes, bool forWorldMap)

Parameters

results List<MapMarkerSnapshot>

The list to append to.

notes IReadOnlyList<MapNote>

The notes for the current scene.

forWorldMap bool

True for the world map, false for the minimap.

AppendPointsOfInterest(List<MapMarkerSnapshot>, WorldMapDefinition, FogOfWarMap, bool)

Adds a scene's authored landmarks to a snapshot list.

public static void AppendPointsOfInterest(List<MapMarkerSnapshot> results, WorldMapDefinition definition, FogOfWarMap fog, bool forWorldMap)

Parameters

results List<MapMarkerSnapshot>

The list to append to.

definition WorldMapDefinition

The scene's map definition. May be null.

fog FogOfWarMap

The explored map, for the discovery rule. May be null.

forWorldMap bool

True for the world map, false for the minimap.

NoteColor(int)

The colour for a note's palette index, wrapping rather than failing.

public static Color NoteColor(int index)

Parameters

index int

The palette index, from a note that may have been edited by hand.

Returns

Color

A colour from NoteColors.

ResolveLocationName(WorldMapDefinition, FogOfWarMap, string, Vector3)

The name to show for where a position is.

public static string ResolveLocationName(WorldMapDefinition definition, FogOfWarMap fog, string fallback, Vector3 position)

Parameters

definition WorldMapDefinition

The scene's map definition. May be null.

fog FogOfWarMap

The explored map, for the discovery rule. May be null.

fallback string

The scene's own name, used when no region matches.

position Vector3

The position to name.

Returns

string

The most specific region name that applies, or the fallback.

Remarks

A region the player has not explored yet reads as the scene's name rather than as its own. That is the point of marking a region as requiring discovery: the player can see they are somewhere in the province without being told they have reached the Sunken Chapel before they have found it.