Class GameDataSetTasksEvent<RoomType>

Emitted when a player's tasks are set.

Type Parameters

Hierarchy

  • BasicEvent
    • GameDataSetTasksEvent

Implements

Properties

eventName: "gamedata.settasks"
eventName: "gamedata.settasks"
gamedata: GameData<RoomType>

The gamedata object that this event is for.

newTasks: TaskState[]

The player's new tasks that were just set.

oldTasks: TaskState[]

The player's old tasks.

player: PlayerInfo<RoomType>

Information about the player that had their tasks set.

room: RoomType

The room or client that the event came from.

Accessors

  • get alteredTasks(): TaskState[]
  • The alternate tasks to set the player, if changed.

    Returns TaskState[]

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • gamedata: GameData<RoomType>
    • player: PlayerInfo<RoomType>

      Information about the player that had their tasks set.

    • oldTasks: TaskState[]

      The player's old tasks.

    • newTasks: TaskState[]

      The player's new tasks that were just set.

    Returns GameDataSetTasksEvent<RoomType>

Methods

  • Set the tasks to the tasks that the player had before this event.

    Returns void

  • Change the tasks of the player that were set.

    Parameters

    • tasks: number[]

      Each TaskType to set the player.

    Returns void

Generated using TypeDoc