diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index f69f5f6b2a..1145265bbb 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -1,10 +1,10 @@ /obj/machinery/sleep_console name = "Sleeper Console" - icon = 'icons/obj/Cryogenic2.dmi' + icon = 'icons/obj/Cryogenic2_vr.dmi' //VOREStation Edit - Better icon. icon_state = "sleeperconsole" var/obj/machinery/sleeper/sleeper anchored = 1 //About time someone fixed this. - density = 0 + density = 1 //VOREStation Edit - Big console dir = 8 use_power = 1 idle_power_usage = 40 @@ -62,7 +62,7 @@ /obj/machinery/sleeper name = "sleeper" desc = "A fancy bed with built-in injectors, a dialysis machine, and a limited health scanner." - icon = 'icons/obj/Cryogenic2.dmi' + icon = 'icons/obj/Cryogenic2_vr.dmi' //VOREStation Edit - Better icons icon_state = "sleeper_0" density = 1 anchored = 1 diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index aaae3b51f8..c3c16dd8e5 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -56,7 +56,7 @@ return M.forceMove(src) occupant = M - icon_state = "body_scanner_1" + update_icon() //icon_state = "body_scanner_1" //VOREStation Edit - Health display for consoles with light and such. add_fingerprint(user) qdel(G) @@ -95,7 +95,7 @@ O.forceMove(src) occupant = O - icon_state = "body_scanner_1" + update_icon() //icon_state = "body_scanner_1" //VOREStation Edit - Health display for consoles with light and such. add_fingerprint(user) /obj/machinery/bodyscanner/relaymove(mob/user as mob) @@ -121,7 +121,7 @@ occupant.client.perspective = MOB_PERSPECTIVE occupant.loc = src.loc occupant = null - icon_state = "body_scanner_0" + update_icon() //icon_state = "body_scanner_1" //VOREStation Edit - Health display for consoles with light and such. return /obj/machinery/bodyscanner/ex_act(severity) @@ -194,6 +194,7 @@ return attack_hand(user) /obj/machinery/body_scanconsole/power_change() + /* VOREStation Removal if(stat & BROKEN) icon_state = "body_scannerconsole-p" else if(powered() && !panel_open) @@ -203,6 +204,8 @@ spawn(rand(0, 15)) icon_state = "body_scannerconsole-p" stat |= NOPOWER + */ + update_icon() //icon_state = "body_scanner_1" //VOREStation Edit - Health display for consoles with light and such. /obj/machinery/body_scanconsole/ex_act(severity) switch(severity) @@ -262,6 +265,7 @@ var/occupantData[0] if(scanner.occupant && ishuman(scanner.occupant)) + update_icon() //VOREStation Edit - Health display for consoles with light and such. var/mob/living/carbon/human/H = scanner.occupant occupantData["name"] = H.name occupantData["stat"] = H.stat diff --git a/code/game/machinery/adv_med_vr.dm b/code/game/machinery/adv_med_vr.dm index 154e04f91c..68185bcf46 100644 --- a/code/game/machinery/adv_med_vr.dm +++ b/code/game/machinery/adv_med_vr.dm @@ -1,3 +1,12 @@ +/obj/machinery/bodyscanner + icon = 'icons/obj/Cryogenic2_vr.dmi' + icon_state = "scanner_open" + +/obj/machinery/body_scanconsole + icon = 'icons/obj/Cryogenic2_vr.dmi' + icon_state = "scanner_terminal_off" + density = 1 + /obj/machinery/bodyscanner/proc/get_occupant_data_vr(list/incoming,mob/living/carbon/human/H) var/humanprey = 0 var/livingprey = 0 @@ -19,3 +28,54 @@ incoming["weight"] = H.weight return incoming + +/obj/machinery/bodyscanner/update_icon() + if(stat & (NOPOWER|BROKEN)) + icon_state = "scanner_off" + set_light(0) + else + var/h_ratio + if(occupant) + h_ratio = occupant.health / occupant.maxHealth + switch(h_ratio) + if(1.000) + icon_state = "scanner_green" + set_light(l_range = 1.5, l_power = 2, l_color = COLOR_LIME) + if(0.001 to 0.999) + icon_state = "scanner_yellow" + set_light(l_range = 1.5, l_power = 2, l_color = COLOR_YELLOW) + if(-0.999 to 0.000) + icon_state = "scanner_red" + set_light(l_range = 1.5, l_power = 2, l_color = COLOR_RED) + else + icon_state = "scanner_death" + set_light(l_range = 1.5, l_power = 2, l_color = COLOR_RED) + else + icon_state = "scanner_open" + set_light(0) + if(console) + console.update_icon(h_ratio) + +/obj/machinery/body_scanconsole/update_icon(var/h_ratio) + if(stat & (NOPOWER|BROKEN)) + icon_state = "scanner_terminal_off" + set_light(0) + else + if(scanner) + if(h_ratio) + switch(h_ratio) + if(1.000) + icon_state = "scanner_terminal_green" + set_light(l_range = 1.5, l_power = 2, l_color = COLOR_LIME) + if(-0.999 to 0.000) + icon_state = "scanner_terminal_red" + set_light(l_range = 1.5, l_power = 2, l_color = COLOR_RED) + else + icon_state = "scanner_terminal_dead" + set_light(l_range = 1.5, l_power = 2, l_color = COLOR_RED) + else + icon_state = "scanner_terminal_blue" + set_light(l_range = 1.5, l_power = 2, l_color = COLOR_BLUE) + else + icon_state = "scanner_terminal_off" + set_light(0) diff --git a/icons/obj/Cryogenic2_vr.dmi b/icons/obj/Cryogenic2_vr.dmi new file mode 100644 index 0000000000..2c49d2685b Binary files /dev/null and b/icons/obj/Cryogenic2_vr.dmi differ