Power monitor tweaks

- Power monitor now has modular computer header icon.
- Power monitor now updates the computer's texture depending on whether there is a power network alert or not, as it used to do in the past.
This commit is contained in:
Atlantis
2016-01-09 06:28:32 +01:00
parent f7ec85e0f0
commit 9f4b5c6920
4 changed files with 25 additions and 0 deletions
@@ -6,10 +6,28 @@
nanomodule_path = /datum/nano_module/power_monitor/
program_icon_state = "power_monitor"
extended_desc = "This program connects to sensors around the station to provide information about electrical systems"
ui_header = "power_norm.gif"
required_access = access_engine
requires_ntnet = 1
network_destination = "power monitoring system"
size = 9
var/has_alert = 0
/datum/computer_file/program/power_monitor/process_tick()
..()
var/datum/nano_module/power_monitor/NMA = NM
if(istype(NMA) && NMA.has_alarm())
if(!has_alert)
program_icon_state = "power_monitor_warn"
ui_header = "power_warn.gif"
update_computer_icon()
has_alert = 1
else
if(has_alert)
program_icon_state = "power_monitor"
ui_header = "power_norm.gif"
update_computer_icon()
has_alert = 0
/datum/computer_file/program/alarm_monitor
filename = "alarmmonitor"