Skip to content

Commit

Permalink
setup autohost
Browse files Browse the repository at this point in the history
  • Loading branch information
Meijer,L. (Lucas) committed Jul 2, 2024
1 parent 6f2c746 commit 79933c5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions server/chat-plugins/mafia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,18 @@ class Mafia extends Rooms.RoomGame<MafiaPlayer> {
this.dead[i].destroy();
}
}

hostPregame() {

}

hostDay() {

}

hostNight() {

}
}

export const pages: Chat.PageTable = {
Expand Down Expand Up @@ -2132,6 +2144,13 @@ export const commands: Chat.ChatCommands = {
if (room.game) return this.errorReply(`There is already a game of ${room.game.title} in progress in this room.`);

room.game = new Mafia(room, null);
const game = this.requireGame(Mafia);

// deadline for signups
game.phase = 'locked';
game.sendHTML(game.roomWindow());
game.updatePlayers();
game.logAction(user, `closed signups`);
},
forcehost: 'host',
nexthost: 'host',
Expand Down

0 comments on commit 79933c5

Please sign in to comment.