Scanner and Sleeper Eris Icons

This commit is contained in:
Arokha Sieyes
2017-04-19 23:54:07 -04:00
parent 647350eedb
commit 857767431a
4 changed files with 70 additions and 6 deletions

View File

@@ -1,10 +1,10 @@
/obj/machinery/sleep_console /obj/machinery/sleep_console
name = "Sleeper Console" name = "Sleeper Console"
icon = 'icons/obj/Cryogenic2.dmi' icon = 'icons/obj/Cryogenic2_vr.dmi' //VOREStation Edit - Better icon.
icon_state = "sleeperconsole" icon_state = "sleeperconsole"
var/obj/machinery/sleeper/sleeper var/obj/machinery/sleeper/sleeper
anchored = 1 //About time someone fixed this. anchored = 1 //About time someone fixed this.
density = 0 density = 1 //VOREStation Edit - Big console
dir = 8 dir = 8
use_power = 1 use_power = 1
idle_power_usage = 40 idle_power_usage = 40
@@ -62,7 +62,7 @@
/obj/machinery/sleeper /obj/machinery/sleeper
name = "sleeper" name = "sleeper"
desc = "A fancy bed with built-in injectors, a dialysis machine, and a limited health scanner." 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" icon_state = "sleeper_0"
density = 1 density = 1
anchored = 1 anchored = 1

View File

@@ -56,7 +56,7 @@
return return
M.forceMove(src) M.forceMove(src)
occupant = M 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) add_fingerprint(user)
qdel(G) qdel(G)
@@ -95,7 +95,7 @@
O.forceMove(src) O.forceMove(src)
occupant = O 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) add_fingerprint(user)
/obj/machinery/bodyscanner/relaymove(mob/user as mob) /obj/machinery/bodyscanner/relaymove(mob/user as mob)
@@ -121,7 +121,7 @@
occupant.client.perspective = MOB_PERSPECTIVE occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = src.loc occupant.loc = src.loc
occupant = null 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 return
/obj/machinery/bodyscanner/ex_act(severity) /obj/machinery/bodyscanner/ex_act(severity)
@@ -194,6 +194,7 @@
return attack_hand(user) return attack_hand(user)
/obj/machinery/body_scanconsole/power_change() /obj/machinery/body_scanconsole/power_change()
/* VOREStation Removal
if(stat & BROKEN) if(stat & BROKEN)
icon_state = "body_scannerconsole-p" icon_state = "body_scannerconsole-p"
else if(powered() && !panel_open) else if(powered() && !panel_open)
@@ -203,6 +204,8 @@
spawn(rand(0, 15)) spawn(rand(0, 15))
icon_state = "body_scannerconsole-p" icon_state = "body_scannerconsole-p"
stat |= NOPOWER 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) /obj/machinery/body_scanconsole/ex_act(severity)
switch(severity) switch(severity)
@@ -262,6 +265,7 @@
var/occupantData[0] var/occupantData[0]
if(scanner.occupant && ishuman(scanner.occupant)) 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 var/mob/living/carbon/human/H = scanner.occupant
occupantData["name"] = H.name occupantData["name"] = H.name
occupantData["stat"] = H.stat occupantData["stat"] = H.stat

View File

@@ -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) /obj/machinery/bodyscanner/proc/get_occupant_data_vr(list/incoming,mob/living/carbon/human/H)
var/humanprey = 0 var/humanprey = 0
var/livingprey = 0 var/livingprey = 0
@@ -19,3 +28,54 @@
incoming["weight"] = H.weight incoming["weight"] = H.weight
return incoming 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)

BIN
icons/obj/Cryogenic2_vr.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB