From 69037063c887f0cf6c347313c09b276cc207aef0 Mon Sep 17 00:00:00 2001 From: motogp-bit <78108539+motogp-bit@users.noreply.github.com> Date: Tue, 24 Dec 2024 16:08:35 +0200 Subject: [PATCH] Update mafia.ts --- server/chat-plugins/mafia.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/server/chat-plugins/mafia.ts b/server/chat-plugins/mafia.ts index c848b962149f..b1b5d1896c48 100644 --- a/server/chat-plugins/mafia.ts +++ b/server/chat-plugins/mafia.ts @@ -1986,11 +1986,13 @@ export const pages: Chat.PageTable = { buf += `

Role Details`; buf += `
    ${role.memo.map(m => `
  • ${m}
  • `).join('')}
`; buf += `

`; - for (let i = 0; i < game.dayNum; i++) { - previousActionsPL += `Night ${i}
`; - previousActionsPL += `${isPlayer.actionArr?.[i] ? `${isPlayer.actionArr[i]}` : ''}
`; - } - if (game.phase === "day" || game.dayNum > 0) buf += `

Previous Actions${previousActionsPL}

`; + for (let i = 0; i < game.dayNum; i++) { + previousActionsPL += `Night ${i}
`; + previousActionsPL += `${isPlayer.actionArr?.[i] ? `${isPlayer.actionArr[i]}` : ''}
`; + } + if (game.phase === "day" || game.dayNum > 0) { + buf += `

Previous Actions${previousActionsPL}

`; + } } } if (game.phase === "day") { @@ -2102,7 +2104,9 @@ export const pages: Chat.PageTable = { buf += `:

`; } buf += `

`; - if (game.phase === "day" || game.dayNum > 0) buf += `

Previous Night Actions${previousActions}

`; + if (game.phase === "day" || game.dayNum > 0) { + buf += `

Previous Night Actions${previousActions}

`; + } buf += `

How to setup roles`; buf += `

Setting the roles

`; buf += `

To set the roles, use /mafia setroles [comma seperated list of roles] OR /mafia setroles [theme] in ${room.title}.

`;