mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Health Scanner HUD
Shows the health status of all humans in view. Has a slight delay and isn't very optimised, but 5 of them spawn in surgery, as well as one in CMO's office. Crayon Crayon runes are anchored. Glowshrooms Fixed their spread rate. Goddomot reset to 30 lifespan. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1536 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -56,4 +56,34 @@
|
||||
|
||||
/obj/item/clothing/glasses/thermal/monocle
|
||||
name = "Thermoncle"
|
||||
icon_state = "thermoncle"
|
||||
icon_state = "thermoncle"
|
||||
flags = null //doesn't protect eyes because it's a monocle, duh
|
||||
|
||||
/obj/item/clothing/glasses/healthscanner
|
||||
name = "Health Scanner HUD"
|
||||
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status."
|
||||
icon_state = "healthscanner"
|
||||
flags = null //doesn't protect eyes because it's a monocle, duh
|
||||
var/list/icon/current = list() //the current hud icons
|
||||
|
||||
/proc/RoundHealth(health)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
return "health100"
|
||||
if(70 to 100)
|
||||
return "health80"
|
||||
if(50 to 70)
|
||||
return "health60"
|
||||
if(30 to 50)
|
||||
return "health40"
|
||||
if(20 to 30)
|
||||
return "health25"
|
||||
if(5 to 15)
|
||||
return "health10"
|
||||
if(1 to 5)
|
||||
return "health1"
|
||||
if(-99 to 0)
|
||||
return "health0"
|
||||
else
|
||||
return "health-100"
|
||||
return "0"
|
||||
@@ -257,7 +257,7 @@ obj/machinery/hydroponics/proc/hardmutate() // Strongly mutates the current seed
|
||||
src.myseed.lifespan += rand(-4,4)
|
||||
if(src.myseed.lifespan < 10)
|
||||
src.myseed.lifespan = 10
|
||||
else if(src.myseed.lifespan > 30)
|
||||
else if(src.myseed.lifespan > 30 && !istype(myseed,/obj/item/seeds/glowshroom)) //hack to prevent glowshrooms from always resetting to 30 sec delay
|
||||
src.myseed.lifespan = 30
|
||||
|
||||
src.myseed.endurance += rand(-10,10)
|
||||
|
||||
@@ -157,6 +157,7 @@ CRAYONS
|
||||
desc = "A rune drawn in crayon."
|
||||
icon = 'rune.dmi'
|
||||
layer = 2.1
|
||||
anchored = 1
|
||||
|
||||
/obj/decal/cleanable/crayon/New(location,main = "#FFFFFF",shade = "#000000")
|
||||
..()
|
||||
|
||||
@@ -744,6 +744,11 @@
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if(client)
|
||||
for(var/image/hud in client.images)
|
||||
if(hud.icon_state in list("healthdead","healthill","healthy","health-100","health0","health1","health10","health25","health40","health60","health80","health100")) //ugly, but icon comparison is worse, I believe
|
||||
del(hud)
|
||||
|
||||
if (src.stat == 2 || src.mutations & 4)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
@@ -790,6 +795,19 @@
|
||||
src.sight |= SEE_OBJS
|
||||
if (!src.druggy)
|
||||
src.see_invisible = 0
|
||||
else if (istype(glasses, /obj/item/clothing/glasses/healthscanner))
|
||||
if(client)
|
||||
var/icon/tempHud = 'hud.dmi'
|
||||
for(var/mob/living/carbon/human/patient in view(src))
|
||||
client.images += image(tempHud,patient,RoundHealth(patient.health))
|
||||
if(patient.stat == 2)
|
||||
client.images += image(tempHud,patient,"healthdead")
|
||||
else if(patient.virus)
|
||||
client.images += image(tempHud,patient,"healthill")
|
||||
else
|
||||
client.images += image(tempHud,patient,"healthy")
|
||||
if (!src.druggy)
|
||||
src.see_invisible = 0
|
||||
|
||||
else if (src.stat != 2)
|
||||
src.sight &= ~SEE_TURFS
|
||||
|
||||
Reference in New Issue
Block a user