Vixen
c7401864
csharp
public sealed class ExplorationRecord

One character's map: what they have found and where they have been.

Read the guide page for this →

Remarks

Doc 28 says why this is its own library: "its state is a bitmap per character per map and nothing else wants that shape". A quest counter is an integer, an inventory is a list, a reputation is a number — this is thousands of bits that compress well and are read as a whole, and putting it anywhere else would make that shape somebody else's problem.

⚠ Completion counts only the points a designer marked as counting, and it is computed from the chart rather than stored. Storing it would mean a patch that adds a point leaves ten thousand characters claiming a hundred per cent of a map they have not finished; computing it means the number moves, which is the honest behaviour and the reason counts is opt-in in the first place.

⚠ Fog is revealed and never re-hidden. There is deliberately no way to un-reveal a cell: a map that could go back to fog is a map a bug can erase, and nobody has ever wanted the feature.

Fields and properties (3)

  • public ExplorationLibrary Library

    Where the maps come from.

  • public GameplayTagSet Tags

    The tags their discoveries have granted.

  • public int Visited

    How many maps they have set foot on.

Events (2)

  • public Action<MapChart, PointOfInterest>? Found

    Raised whenever something is found for the first time.

  • public Action<MapChart>? Completed

    Raised when a map is completed.

Methods (13)

  • public ExplorationRecord(ExplorationLibrary library, GameplayTagSet? tags = null)

    Makes an empty record.

  • public bool HasFound(MapChart map, PointOfInterest point)

    Whether they have found something.

  • public int FoundOn(MapChart map)

    How many of a map's counting points they have found.

  • public float CompletionOf(MapChart map)

    How far through a map they are, from zero to one.

  • public bool IsComplete(MapChart map)

    Whether they have finished a map.

  • public bool Discover(MapChart map, PointOfInterest point, IRequirementContext? context = null)

    Finds something, if they may.

  • public IEnumerable<int> PointsOn(MapChart map)

    Everything they have found on a map, in index order.

  • public bool Seat(MapChart map, int point)

    Puts a discovery back with no requirements and no announcement.

  • public bool IsRevealed(MapChart map, int column, int row)

    Whether a cell of the fog has been lifted.

  • public int Reveal(MapChart map, int column, int row, int radius = 1)

    Lifts the fog around somewhere.

  • public float RevealedOn(MapChart map)

    How much of a map's fog has been lifted, from zero to one.

  • public ReadOnlySpan<ulong> FogOf(MapChart map)

    The raw fog of a map, for a save or a wire.

  • public bool RestoreFog(MapChart map, ReadOnlySpan<ulong> bits)

    Puts a saved fog back.

Used by (3)

  • ExplorationSectionVixen.Live.Gameplay
  • ExplorationSectionTestsVixen.Live.Gameplay.Tests
  • ExplorationTestsVixen.Gameplay.Exploration.Tests