WorldMap
constWorldMap:object
Defined in: client/api.d.ts:1835
The map screen at this machine, and the player’s own marker on it. Nothing here is replicated: a marker everyone should see is one the server tells every client to make.
Type Declaration
Section titled “Type Declaration”isOpen
Section titled “isOpen”
readonlyisOpen:boolean
Whether the map screen is up right now. False in the main menu and across a level load, when there is no map page at all.
clearWaypoint()
Section titled “clearWaypoint()”clearWaypoint():
boolean
Takes the player’s marker off the map they are looking at. It runs the game’s own removal, so mapWaypointCleared is raised as it would be for the player.
Returns
Section titled “Returns”boolean
True when there was a marker to take off.
getWaypoint()
Section titled “getWaypoint()”getWaypoint():
MapWaypoint|null
Reads the marker the player has dropped on the map they are looking at. The game keeps at most one per map.
Returns
Section titled “Returns”MapWaypoint | null
The marker’s position and the map it belongs to, or null when there is none.
isCategoryVisible()
Section titled “isCategoryVisible()”isCategoryVisible(
type):boolean
Whether marks of this type are currently drawn on the compass and listed in the map legend.
Parameters
Section titled “Parameters”string
One of the game’s own compass mark types, spelled the way the game spells it – Shop, QuestGiver, GeneralPoi. The full list is the type a Blip accepts.
Returns
Section titled “Returns”boolean
True when they are shown.
moveWaypoint()
Section titled “moveWaypoint()”moveWaypoint(
position):boolean
Moves the marker the player has already dropped. It cannot create one, so it reads false when there is nothing down.
Parameters
Section titled “Parameters”position
Section titled “position”Where to put it, in world-space metres. Nothing snaps it to the terrain.
Returns
Section titled “Returns”boolean
True when there was a marker to move.
setCategoryVisible()
Section titled “setCategoryVisible()”setCategoryVisible(
type,visible):boolean
Shows or hides a whole category of the game’s own map markers – every shop, every quest giver – through the switch the map legend’s rows drive. It affects the marks already placed as well as later ones. DLC icons share a legend row with the entry they belong to, so setting one sets the group.
Parameters
Section titled “Parameters”string
One of the game’s own compass mark types, spelled the way the game spells it – Shop, QuestGiver, GeneralPoi. The full list is the type a Blip accepts.
visible
Section titled “visible”boolean
Whether marks of that type should be drawn.
Returns
Section titled “Returns”boolean
True when the map page was there to take it.