mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Fixes the crew monitor program alarm (#12797)
* Fixes crew monitor program alarm The alarm for the crew monitor program, which didn't work change the icon state when someone was ladled dead. * Maybe fixes the checks Is this what it wants?
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
filedesc = "Crew Suit Sensor Monitor"
|
||||
extended_desc = "This program allows for viewing of crew members vitals via their suit sensors."
|
||||
category = PROGRAM_CATEGORY_CREW
|
||||
ui_header = "alarm_green.gif"
|
||||
ui_header = "health_green.gif"
|
||||
program_icon_state = "crew"
|
||||
requires_ntnet = TRUE
|
||||
transfer_access = ACCESS_MEDICAL
|
||||
@@ -31,21 +31,23 @@
|
||||
UnregisterSignal(GLOB.crewmonitor, COMSIG_MACHINERY_CREWMON_UPDATE)
|
||||
|
||||
/datum/computer_file/program/crew_monitor/proc/update_overlay()
|
||||
var/z = usr.z
|
||||
if(!computer)
|
||||
return
|
||||
var/z = computer.z
|
||||
if(!z)
|
||||
var/turf/T = get_turf(usr)
|
||||
var/turf/T = get_turf(computer)
|
||||
z = T.z
|
||||
|
||||
if(GLOB.crewmonitor?["[z]"].death_list.len > 0)
|
||||
var/list/death_list = GLOB.crewmonitor.death_list?["[z]"]
|
||||
if(death_list.len > 0)
|
||||
alarm = TRUE
|
||||
else
|
||||
alarm = FALSE
|
||||
if(alarm)
|
||||
program_icon_state = program_icon_state_alarm
|
||||
ui_header = "crew_red.gif"
|
||||
ui_header = "health_red.gif"
|
||||
else
|
||||
program_icon_state = initial(program_icon_state)
|
||||
ui_header = "crew_green.gif"
|
||||
ui_header = "health_green.gif"
|
||||
if(istype(computer))
|
||||
computer.update_icon()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user