dao::worldmap

Declared in dao/WorldMap.h.

Classes

Class  
Pin A pin of a map.
Shown The map on screen, and what the world map’s toggle would swap it for.

Enumerations

MapKind

enum class MapKind : std::uint8_t

Which map is on screen.

Value  
None neither
World the world map, or a city’s (worldmap.gfx)
Fade the Fade’s, in the Broken Circle (fademap.gfx)

PinState

enum class PinState : std::int32_t

A pin’s state, as the scripts set it (WM_LOCATION_*) and the map draws it.

Value  
Inactive = 1 not drawn
Active = 2 a click travels to it
GrayedOut = 3 drawn grey
Unlocked = 4 drawn, not yet travelled to; the map’s “unlockable”
Complete = 5 drawn, its quest done; the Fade’s map travels to it too
Destroyed = 6 drawn with a skull

Refusal

enum class Refusal : std::uint8_t

Why a travel or a swap was refused, or None if it went.

Value  
None  
NotShown no map is on screen (for a swap, the world map is not)
ReadOnly the world map is shown only to be looked at, or the party is already travelling
NoPin the map has no pin at the index
NotActive the pin is not one the map’s click travels to
NoOther there is no second map to swap to

Functions

Here()

std::optional<std::wstring> Here()

Returns the area tag of the pin the party is at, on the map Pins reads, as the map marks it.

Pins()

std::vector<Pin> Pins()

Returns the pins of the map on screen, in its order: the Fade’s when that is up, otherwise the world’s primary map, whether or not it is shown.

Returns none outside a module, or for a campaign with no world map

ShownMap()

Shown ShownMap()

Returns the map on screen.

Call it, and the rest, on the game thread.

SwapMaps()

Refusal SwapMaps()

Swaps a city’s two maps as the world map’s toggle does: the second becomes the one shown, and Pins, Here and Travel then read it.

Travel()

Refusal Travel(std::int32_t index)

Travels to a pin as a click on it does: the module’s travel script then runs, with its random encounters, and the map closes.

On the world map, refused unless the map is shown for travel and the pin is Active; a pin at the party’s own area closes the map, as the script does. On the Fade’s, refused unless the pin is Active or Complete.