AntagHUD Fixup (#22074)

This commit is contained in:
Kurfursten
2019-03-22 14:32:58 -05:00
committed by jknpj
parent 2315610ad4
commit ff6d96896b
7 changed files with 26 additions and 15 deletions

View File

@@ -224,7 +224,7 @@ Works together with spawning an observer, noted above.
if(antagHUD)
var/list/target_list = list()
for(var/mob/living/target in oview(src))
if( target.mind&&(target.mind.antag_roles.len > 0 || issilicon(target)) )
if( target.mind&&(target.mind.antag_roles.len > 0 || issilicon(target) || target.hud_list[SPECIALROLE_HUD]) )
target_list += target
if(target_list.len)
assess_targets(target_list, src)
@@ -306,23 +306,36 @@ Works together with spawning an observer, noted above.
C.images += holder
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
var/icon/tempHud = 'icons/mob/hud.dmi'
for(var/mob/living/target in target_list)
if(iscarbon(target))
for (var/R in target.mind.antag_roles)
var/datum/role/role = target.mind.antag_roles[R]
var/image/I = image('icons/role_HUD_icons.dmi', target, role.logo_state)
if(target.mind)
var/image/I
U.client.images -= target.hud_list[SPECIALROLE_HUD]
switch(target.mind.antag_roles.len)
if(0)
I = null
if(1)
for(var/R in target.mind.antag_roles)
var/datum/role/role = target.mind.antag_roles[R]
I = image('icons/role_HUD_icons.dmi', target, role.logo_state)
else
I = image('icons/role_HUD_icons.dmi', target, "multi-logo")
if(I)
I.pixel_x = 20 * PIXEL_MULTIPLIER
I.pixel_y = 20 * PIXEL_MULTIPLIER
I.plane = ANTAG_HUD_PLANE
target.hud_list[SPECIALROLE_HUD] = I
U.client.images += I
else if(issilicon(target))//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
else
target.hud_list[SPECIALROLE_HUD] = null
if(issilicon(target))//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
var/mob/living/silicon/silicon_target = target
if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len))||silicon_target.mind.special_role=="traitor")
if(isrobot(silicon_target))//Different icons for robutts and AI.
U.client.images += image(tempHud,silicon_target,"hudmalborg")
U.client.images += image('icons/mob/hud.dmi',silicon_target,"hudmalborg")
else
U.client.images += image(tempHud,silicon_target,"hudmalai")
U.client.images += image('icons/mob/hud.dmi',silicon_target,"hudmalai")
return 1
/mob/proc/ghostize(var/flags = GHOST_CAN_REENTER,var/deafmute = 0)

View File

@@ -7,7 +7,6 @@
icon_state = "body_m_s"
can_butcher = 1
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human
var/list/hud_list = list()
var/datum/species/species //Contains icon generation and language information, set during New().
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.

View File

@@ -109,7 +109,7 @@
hud_list[IMPLOYAL_HUD] = holder2
hud_list[IMPCHEM_HUD] = holder3
if(hud_updateflag & 1 << SPECIALROLE_HUD)
/*if(hud_updateflag & 1 << SPECIALROLE_HUD)
var/image/holder = hud_list[SPECIALROLE_HUD]
holder.icon_state = "hudblank"
@@ -132,5 +132,5 @@
if("Vampire") // TODO: Check this
holder.icon_state = "hudvampire"
hud_list[SPECIALROLE_HUD] = holder
hud_list[SPECIALROLE_HUD] = holder*/
hud_updateflag = 0

View File

@@ -80,3 +80,5 @@
var/thermal_loss_multiplier = 1 //The heat the mob loses to the environment is multiplied by this value.
var/datum/component_container/BrainContainer
var/list/hud_list = list()

View File

@@ -9,7 +9,6 @@ var/list/cyborg_list = list()
health = 300
flashed = FALSE
var/list/hud_list = list()
var/sight_mode = 0
var/custom_name = ""
var/namepick_uses = 1 // /vg/: Allows AI to disable namepick().

View File

@@ -39,8 +39,6 @@
var/list/construct_spells = list()
var/list/hud_list = list()
var/list/healers = list()
/mob/living/simple_animal/construct/Move(NewLoc,Dir=0,step_x=0,step_y=0,var/glide_size_override = 0)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB