mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Rewrites HUD Handling for Glasses
This commit is contained in:
@@ -61,56 +61,4 @@
|
||||
//TODO - Check documentation for client.eye and client.perspective...
|
||||
/obj/item/clothing/glasses/hud/health/mech
|
||||
name = "Integrated Medical Hud"
|
||||
|
||||
|
||||
process_hud(var/mob/M)
|
||||
/*
|
||||
world<< "view(M)"
|
||||
for(var/mob/mob in view(M))
|
||||
world << "[mob]"
|
||||
world<< "view(M.client)"
|
||||
for(var/mob/mob in view(M.client))
|
||||
world << "[mob]"
|
||||
world<< "view(M.loc)"
|
||||
for(var/mob/mob in view(M.loc))
|
||||
world << "[mob]"
|
||||
*/
|
||||
|
||||
if(!M || M.stat || !(M in view(M))) return
|
||||
if(!M.client) return
|
||||
var/client/C = M.client
|
||||
var/image/holder
|
||||
for(var/mob/living/carbon/human/patient in view(M.loc))
|
||||
if(M.see_invisible < patient.invisibility)
|
||||
continue
|
||||
var/foundVirus = 0
|
||||
|
||||
for (var/ID in patient.virus2)
|
||||
if (ID in virusDB)
|
||||
foundVirus = 1
|
||||
break
|
||||
|
||||
holder = patient.hud_list[HEALTH_HUD]
|
||||
if(patient.stat == 2)
|
||||
holder.icon_state = "hudhealth-100"
|
||||
C.images += holder
|
||||
else
|
||||
holder.icon_state = "hud[RoundHealth(patient.health)]"
|
||||
C.images += holder
|
||||
|
||||
holder = patient.hud_list[STATUS_HUD]
|
||||
if(patient.stat == 2)
|
||||
holder.icon_state = "huddead"
|
||||
else if(patient.status_flags & XENO_HOST)
|
||||
holder.icon_state = "hudxeno"
|
||||
else if(foundVirus)
|
||||
holder.icon_state = "hudill"
|
||||
else if(patient.has_brain_worms())
|
||||
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
|
||||
if(B.controlling)
|
||||
holder.icon_state = "hudbrainworm"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
C.images += holder
|
||||
HUDType = MEDHUD
|
||||
|
||||
Reference in New Issue
Block a user