Type Alias RoomStateEvents

An interface with all supported room events and their respective callback arguments. To be called from RoomStateManager.

type RoomStateEvents = {
    hintCostUpdated: [
        oldCost: number,
        newCost: number,
        oldPercentage: number,
        newPercentage: number,
    ];
    hintPointsUpdated: [oldValue: number, newValue: number];
    locationCheckPointsUpdated: [oldValue: number, newValue: number];
    locationsChecked: [locations: number[]];
    passwordUpdated: [password: boolean];
    permissionsUpdated: [oldValue: PermissionTable, newValue: PermissionTable];
}
Index
hintCostUpdated: [
    oldCost: number,
    newCost: number,
    oldPercentage: number,
    newPercentage: number,
]

Fires when the hint cost has been updated.

The previous amount of hint points required to request a hint.

The new amount of hint points required to request a hint.

The old hint cost percentage.

The new hint cost percentage.

hintPointsUpdated: [oldValue: number, newValue: number]

Fires when the player's hint points value has updated.

The old hint point value.

The new hint point value.

locationCheckPointsUpdated: [oldValue: number, newValue: number]

Fires when the location check points have been updated.

The previous location check points value.

The new location check points value.

locationsChecked: [locations: number[]]

Fires when new locations have been checked (or all locations on initial connection).

All the newly checked locations.

passwordUpdated: [password: boolean]

Fires when the room password has been toggled.

If the room now requires a password to join.

permissionsUpdated: [oldValue: PermissionTable, newValue: PermissionTable]

Fires when command permissions have been updated.

The previous command permissions table.

The new command permissions table.