mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Fix crew monitor runtime (#17921)
This commit is contained in:
@@ -33,21 +33,28 @@
|
||||
/datum/computer_file/program/crew_monitor/proc/update_overlay()
|
||||
if(!computer)
|
||||
return
|
||||
var/z = computer.z
|
||||
if(!z)
|
||||
var/turf/T = get_turf(computer)
|
||||
z = T.z
|
||||
var/list/death_list = GLOB.crewmonitor.death_list?["[z]"]
|
||||
|
||||
var/turf/computer_turf = get_turf(computer)
|
||||
if (!computer_turf)
|
||||
return
|
||||
|
||||
var/computer_z = computer_turf.z
|
||||
if (!computer_z)
|
||||
return
|
||||
|
||||
var/list/death_list = GLOB.crewmonitor.death_list?["[computer_z]"]
|
||||
if(death_list && death_list.len > 0)
|
||||
alarm = TRUE
|
||||
else
|
||||
alarm = FALSE
|
||||
|
||||
if(alarm)
|
||||
program_icon_state = program_icon_state_alarm
|
||||
ui_header = "health_red.gif"
|
||||
else
|
||||
program_icon_state = initial(program_icon_state)
|
||||
ui_header = "health_green.gif"
|
||||
|
||||
if(istype(computer))
|
||||
computer.update_icon()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user