diff --git a/code/modules/mafia/controller_ui.dm b/code/modules/mafia/controller_ui.dm index cc901392d22..578555d21f4 100644 --- a/code/modules/mafia/controller_ui.dm +++ b/code/modules/mafia/controller_ui.dm @@ -29,6 +29,8 @@ if(turn) data["turn"] = " - Day [turn]" + if(phase == MAFIA_PHASE_JUDGEMENT) + data["person_voted_up_ref"] = REF(on_trial) if(phase == MAFIA_PHASE_SETUP) data["lobbydata"] = list() for(var/key in GLOB.mafia_signup + GLOB.mafia_bad_signup + GLOB.pda_mafia_signup) @@ -41,8 +43,10 @@ data["timeleft"] = next_phase_timer ? timeleft(next_phase_timer) : 0 var/datum/mafia_role/user_role = get_role_player(user) + if(user_role) data["user_notes"] = user_role.written_notes + data["player_voted_up"] = (user_role == on_trial) var/list/ui_messages = list() for(var/i = user_role.role_messages.len to 1 step -1) ui_messages.Add(list(list( @@ -56,6 +60,9 @@ player_info["name"] = role.body.real_name player_info["ref"] = REF(role) player_info["alive"] = role.game_status == MAFIA_ALIVE + player_info["role_revealed"] = FALSE + if(role.role_flags & ROLE_REVEALED) + player_info["role_revealed"] = role.name player_info["possible_actions"] = list() if(user_role) //not observer diff --git a/tgui/packages/tgui/interfaces/MafiaPanel.tsx b/tgui/packages/tgui/interfaces/MafiaPanel.tsx index ee63d105dd1..23b4b45a27a 100644 --- a/tgui/packages/tgui/interfaces/MafiaPanel.tsx +++ b/tgui/packages/tgui/interfaces/MafiaPanel.tsx @@ -16,6 +16,7 @@ type RoleInfo = { type PlayerInfo = { name: string; + role_revealed: string; is_you: BooleanLike; ref: string; alive: string; @@ -49,11 +50,13 @@ type MafiaData = { is_observer: boolean; all_roles: string[]; admin_controls: boolean; + person_voted_up_ref: string; + player_voted_up: BooleanLike; }; export const MafiaPanelData = (props, context) => { const { act, data } = useBackend(context); - const { phase, roleinfo, admin_controls, messages } = data; + const { phase, roleinfo, admin_controls, messages, player_voted_up } = data; const [mafia_tab, setMafiaMode] = useLocalState( context, 'mafia_tab', @@ -90,7 +93,7 @@ export const MafiaPanelData = (props, context) => { - {phase === 'Judgment' && ( + {phase === 'Judgment' && !player_voted_up && ( @@ -401,17 +404,20 @@ const MafiaJudgement = (props, context) => { const { act, data } = useBackend(context); return (
- + +