Static
roomThe dirty state of this component.
Flags for this object, see SpawnFlag.
The net ID of this component.
The ID of the owner of this component.
Optional
playerThe player that this component belongs to.
The room that this component belongs to.
The type of object that this component belongs to.
Optional
spawn: booleanOptional
spawn: booleanRandomly assign players to each enabled role with a certain probability. Called just after a game is started and emits a RoomAssignRolesEvent which can be used to alter which players are assigned which roles.
Actually set all player roles from a map of player to role assignments, can be gathered from getRoleAssignmentsForTeam.
A map of player to role assignments to assign to every role.
Get a certain component from the object.
The component class to get.
Get the door IDs used to connect to a room.
The door IDs that connect to the room.
The room to get the door IDs for.
Assign a list of roles to a pool of players, eliminating both players from the player list and also roles from the role list, and without regard for room settings (i.e. the chances of each role appearing or the maximum number of assignments for the role).
The role assignments (i.e. a map of player to roles) that have either collectively been assigned (if roleAssignments is passed) or been assigned just as part of this method.
The pool of players to assign a list of roles to.
The maximum number of players that cn be assigned a role from this list.
The list of roles to assign to players.
Optional
roleAssignments: Map<PlayerData<Hostable<any>>, typeof BaseRole>A map of role assigments (i.e. a map of player to roles) to act as a collective output to this method.
Specifically assign a pool of players to each role in a specific team.
The role assignments (i.e. a map of player to roles) that have either collectively been assigned (if roleAssignments is passed) or been assigned just as part of this method.
The entire list of players that can be assigned a role, whether or not they already have a role. Note that this is not a list of players to be assigned a role from this team, but it is instead every possible player who could be assigned one.
Role settings to use when calculating how many players should assigned a specific role.
The team of roles to assign.
The maximum number of players that can be assigned a role from this team. For example, it could be the set number of impostors configured in the game settings.
Optional
defaultRole: typeof BaseRoleThe default role to assign to each player
Optional
roleAssignments: Map<PlayerData<Hostable<any>>, typeof BaseRole>A map of role assigments (i.e. a map of player to roles) to act as a collective output to this method.
Specifically assign a pool of players to each role in a list, with regard to the room settings (i.e. the chance of each role appearing or the maximum number of assignments for the role).
The role assignments (i.e. a map of player to roles) that have either collectively been assigned (if roleAssignments is passed) or been assigned just as part of this method.
The entire list of players that can be assigned a role, whether or not they already have a role. Note that this is not a list of players to be assigned a role from this team, but it is instead every possible player who could be assigned one.
Role settings to use when calculating how many players should assigned a specific role.
The maximum number of players that can be assigned a role from this team. For example, it could be the set number of impostors configured in the game settings.
Optional
defaultRole: typeof BaseRoleThe default role to assign to each player
Optional
roleAssignments: Map<PlayerData<Hostable<any>>, typeof BaseRole>A map of role assigments (i.e. a map of player to roles) to act as a collective output to this method.
Get the spawn position of a player whether they are about to spawn after starting or whether they are about to spawn after a meeting.
The spawn position of the player.
The player or player ID to determine the position of.
Whther or not this is a spawn after starting the game.
Get all roles registered on the room that match a given filter.
A list of all roles that satisfy the given filter.
The filter to match against.
Teleport a player to their spawn position, calculated using getSpawnPosition.
The player to determine the position of.
Whether or not this is a spawn after starting the game.
Try to assign a ghost role to a specific dead player.
The player to assign the role to.
Optional
data: HazelReader | ShipStatusDataGenerated using TypeDoc
Represents a room object for the Polus map.
See ShipStatusEvents for events to listen to.