diff --git a/code/game/gamemodes/antag_hud.dm b/code/game/gamemodes/antag_hud.dm index f9336c1cd1b..a7070b48315 100644 --- a/code/game/gamemodes/antag_hud.dm +++ b/code/game/gamemodes/antag_hud.dm @@ -1,5 +1,6 @@ /datum/atom_hud/antag hud_icons = list(SPECIALROLE_HUD,NATIONS_HUD) + var/solohud = 0 /datum/atom_hud/antag/proc/join_hud(mob/M) if(!istype(M)) @@ -10,6 +11,7 @@ add_to_hud(M) add_hud_to(M) M.mind.antag_hud = src + solohud = 0 /datum/atom_hud/antag/proc/join_solo_hud(mob/M)//for non team antags and for observer huds if(!istype(M)) @@ -18,6 +20,7 @@ M.mind.antag_hud.leave_hud(M) add_to_hud(M) M.mind.antag_hud = src + solohud = 1 /datum/atom_hud/antag/proc/leave_hud(mob/M) if(!istype(M)) @@ -26,6 +29,7 @@ remove_hud_from(M) if(M.mind) M.mind.antag_hud = null + solohud = 0 //GAME_MODE PROCS @@ -49,6 +53,11 @@ if(M.mind || new_icon_state) //in mindless mobs, only null is acceptable, otherwise we're antagging a mindless mob, meaning we should runtime M.mind.antag_hud_icon_state = new_icon_state +/datum/atom_hud/antag/proc/is_solo_antag(mob/M) + if(M.mind.special_role == "traitor" || M.mind.special_role == "vampire" || M.mind.special_role == "Changeling") + return 1 + return 0 + //MIND PROCS //these are called by mind.transfer_to() @@ -56,7 +65,10 @@ leave_all_huds() ticker.mode.set_antag_hud(current, antag_hud_icon_state) if(newhud) - newhud.join_hud(current) + if(newhud.is_solo_antag(current)) + newhud.join_solo_hud(current) + else + newhud.join_hud(current) /datum/mind/proc/leave_all_huds() for(var/datum/atom_hud/antag/hud in huds)