traitor/changeling/abductee/abductor/ninja no longer see their own huds.

This commit is contained in:
Mike Long
2016-03-05 14:23:19 -05:00
parent 27e781e3cf
commit cdd9fa5116
5 changed files with 8 additions and 6 deletions

View File

@@ -1,13 +1,15 @@
/datum/atom_hud/antag
hud_icons = list(ANTAG_HUD)
/datum/atom_hud/antag/proc/join_hud(mob/M)
/datum/atom_hud/antag/proc/join_hud(mob/M, var/sees_hud = 1)
//sees_hud should be set to 0 if the mob does not get to see it's own hud type.
if(!istype(M))
CRASH("join_hud(): [M] ([M.type]) is not a mob!")
if(M.mind.antag_hud) //note: please let this runtime if a mob has no mind, as mindless mobs shouldn't be getting antagged
M.mind.antag_hud.leave_hud(M)
add_to_hud(M)
add_hud_to(M)
if(sees_hud)
add_hud_to(M)
M.mind.antag_hud = src
/datum/atom_hud/antag/proc/leave_hud(mob/M)

View File

@@ -504,7 +504,7 @@ var/list/slot2type = list("head" = /obj/item/clothing/head/changeling, "wear_mas
/datum/game_mode/proc/update_changeling_icons_added(datum/mind/changling_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_CHANGELING]
hud.join_hud(changling_mind.current)
hud.join_hud(changling_mind.current, 0)
set_antag_hud(changling_mind.current, "changling")
/datum/game_mode/proc/update_changeling_icons_removed(datum/mind/changling_mind)

View File

@@ -344,7 +344,7 @@
/datum/game_mode/proc/update_abductor_icons_added(datum/mind/alien_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_ABDUCTOR]
hud.join_hud(alien_mind.current)
hud.join_hud(alien_mind.current, 0)
set_antag_hud(alien_mind.current, ((alien_mind in abductors) ? "abductor" : "abductee"))
/datum/game_mode/proc/update_abductor_icons_removed(datum/mind/alien_mind)

View File

@@ -377,7 +377,7 @@
/datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind)
var/datum/atom_hud/antag/traitorhud = huds[ANTAG_HUD_TRAITOR]
traitorhud.join_hud(traitor_mind.current)
traitorhud.join_hud(traitor_mind.current, 0)
set_antag_hud(traitor_mind.current, "traitor")
/datum/game_mode/proc/update_traitor_icons_removed(datum/mind/traitor_mind)

View File

@@ -216,7 +216,7 @@ Contents:
/datum/game_mode/proc/update_ninja_icons_added(var/mob/living/carbon/human/ninja)
var/datum/atom_hud/antag/ninjahud = huds[ANTAG_HUD_TRAITOR]
ninjahud.join_hud(ninja)
ninjahud.join_hud(ninja, 0)
set_antag_hud(ninja, "traitor")
/datum/game_mode/proc/update_ninja_icons_removed(datum/mind/ninja_mind)