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:
uporotiy
2011-05-05 22:14:29 +00:00
parent 2c6b1841ef
commit 66be17746b
9 changed files with 53 additions and 4 deletions
+31 -1
View File
@@ -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"
+1 -1
View File
@@ -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)
+1
View File
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

+2 -2
View File
@@ -3471,7 +3471,7 @@
"boM" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 1; on = 1},/obj/item/device/radio/intercom{pixel_y = 25},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery)
"boN" = (/obj/machinery/computer/operating,/obj/cable{icon_state = "0-2"; d2 = 2},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery)
"boO" = (/obj/machinery/door_control{id = "Obshutter"; name = "Observation Door Control"; pixel_y = 25},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery)
"boP" = (/obj/table{icon_state = "tabledir"; dir = 8},/obj/item/weapon/scalpel,/turf/simulated/floor{icon_state = "white"},/area/medical/surgery)
"boP" = (/obj/table{icon_state = "tabledir"; dir = 8},/obj/item/weapon/scalpel,/obj/item/clothing/glasses/healthscanner,/obj/item/clothing/glasses/healthscanner,/obj/item/clothing/glasses/healthscanner,/obj/item/clothing/glasses/healthscanner,/obj/item/clothing/glasses/healthscanner,/turf/simulated/floor{icon_state = "white"},/area/medical/surgery)
"boQ" = (/obj/grille,/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Obshutter"; name = "Observation Shutters"; opacity = 0},/obj/window/reinforced{dir = 8},/obj/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/medical/surgery)
"boR" = (/obj/stool/chair{dir = 8},/obj/item/device/radio/intercom{pixel_y = 25},/obj/machinery/camera{c_tag = "Surgery Observation"},/turf/simulated/floor{icon_state = "dark"},/area/medical/surgery)
"boS" = (/turf/simulated/floor{icon_state = "dark"},/area/medical/surgery)
@@ -4084,7 +4084,7 @@
"bAB" = (/obj/machinery/atmospherics/unary/vent_scrubber{on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/secure_closet/personal/patient,/turf/simulated/floor{dir = 1; icon_state = "warning"},/area/medical/genetics)
"bAC" = (/obj/machinery/light{dir = 8},/obj/disposalpipe/segment{dir = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
"bAD" = (/obj/grille,/obj/window/reinforced{dir = 4},/obj/window/reinforced{dir = 1},/obj/window/reinforced{dir = 8},/obj/window/reinforced,/turf/simulated/floor/plating,/area/medical/cmo)
"bAE" = (/obj/table{dir = 5; icon_state = "tabledir"},/obj/item/weapon/reagent_containers/hypospray,/turf/simulated/floor{icon_state = "white"},/area/medical/cmo)
"bAE" = (/obj/table{dir = 5; icon_state = "tabledir"},/obj/item/weapon/reagent_containers/hypospray,/obj/item/clothing/glasses/healthscanner,/turf/simulated/floor{icon_state = "white"},/area/medical/cmo)
"bAF" = (/obj/machinery/firealarm{dir = 1; pixel_y = -24},/obj/landmark{name = "xeno_spawn"; pixel_x = -1},/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/cmo)
"bAG" = (/obj/machinery/atmospherics/pipe/simple{color = "red"; icon_state = "intact-r-f"; level = 1; name = "pipe"},/obj/machinery/requests_console{department = "Chief Medical Officer's Office"; departmentType = 5; name = "CMO RC"; pixel_y = -30},/obj/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = "90Curve"},/turf/simulated/floor{icon_state = "white"},/area/medical/cmo)
"bAH" = (/obj/machinery/light,/obj/machinery/atmospherics/unary/vent_scrubber{on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = "Streight"},/turf/simulated/floor{icon_state = "white"},/area/medical/cmo)