Interface: NavigatorHandlerInterface
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:7
Handler that manages the navigation system: it gives access to all the registered rooms, locations and maps, and keeps track of the room where the player currently is.
Properties
currentLocation
> readonly currentLocation: LocationInterface | undefined
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:39
The location that contains the current room, or undefined if there is no current room.
currentMap
> readonly currentMap: MapInterface | undefined
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:43
The map that contains the current location, or undefined if there is no current room.
currentRoomId
> readonly currentRoomId: string | undefined
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:24
The id of the room where the player currently is, read from the game storage.
It is undefined if the current room has not been set yet.
locations
> readonly locations: LocationInterface[]
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:15
All the registered locations.
maps
> readonly maps: MapInterface[]
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:19
All the registered maps.
rooms
> readonly rooms: RoomInterface[]
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:11
All the registered rooms.
Accessors
currentRoom
Get Signature
> get currentRoom(): RoomInterface | undefined
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:34
The room where the player currently is.
Getting it returns undefined (and logs an error) if the current room has not been set
or if it is not registered.
Setting it accepts a room or a room id. If the room is not registered, an error is logged and nothing changes. If it is already the current room, nothing happens; otherwise the change is stored and tracked as the last event.
Returns
RoomInterface | undefined
Set Signature
> set currentRoom(room): void
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:35
Parameters
room
string | RoomInterface
Returns
void
Methods
clearExpiredActivities()
> clearExpiredActivities(): void
Defined in: src/interface/navigation/NavigatorHandlerInterface.ts:47
Clear all the expired activities from every registered room.
Returns
void