five-on-it / apps/server/src/room-social / RoomSocial
Class: RoomSocial
Defined in: apps/server/src/room-social.ts:78
The social side of one room.
Constructors
Constructor
new RoomSocial(
options):RoomSocial
Defined in: apps/server/src/room-social.ts:88
Parameters
options
Returns
RoomSocial
Properties
kicked
readonlykicked:Set<string>
Defined in: apps/server/src/room-social.ts:80
Accounts voted out of the room: they may not join it again.
Accessors
moderated
Get Signature
get moderated():
boolean
Defined in: apps/server/src/room-social.ts:94
Whether the room's lines go through the platform's moderation.
Returns
boolean
Methods
add()
add(
player):void
Defined in: apps/server/src/room-social.ts:104
A player came: the room says so, and everyone gets the roster.
Parameters
player
Returns
void
announceRestart()
announceRestart(
seconds):void
Defined in: apps/server/src/room-social.ts:238
Tells everyone in the room the server restarts for maintenance in so many seconds.
Parameters
seconds
number
Returns
void
command()
command(
id,command):Promise<void>
Defined in: apps/server/src/room-social.ts:123
A player's room command.
Parameters
id
number
command
{ op: "say"; text: string; type: "room"; } | { op: "quick"; phrase: "wait" | "follow" | "go" | "hello" | "thanks" | "sorry" | "help" | "nice"; type: "room"; } | { emote: "wave" | "laugh" | "shrug" | "facepalm" | "clap" | "thumbsUp"; op: "emote"; type: "room"; } | { op: "voteKick"; target: number; type: "room"; } | { op: "vote"; type: "room"; yes: boolean; }
Returns
Promise<void>
list()
list():
SocialPlayer[]
Defined in: apps/server/src/room-social.ts:99
The players, in the order they came.
Returns
remove()
remove(
id):void
Defined in: apps/server/src/room-social.ts:111
A player went: the room says so, a vote against them ends (their own yes with them), the roster goes out.
Parameters
id
number
Returns
void
tick()
tick():
void
Defined in: apps/server/src/room-social.ts:148
Ends a vote whose time is up; call it now and then (the game server does every half second).
Returns
void