mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-30 03:52:52 +00:00
Modifications to sensors code
- More stuff now triggers powernet warnings: People getting shocked by machinery (primarily door, but can be anything else powered by APC), and grilles. Thanks to @mwerezak for suggestion. - Monitoring computer now has slightly different icon_state when it detects powernet warning. This is checked and updated every 5 MC ticks (ie, slightly delayed) - Fixes ocassional runtime in powernet_sensor.dm - Powersinks buffed a bit more. Drain rate changed from 0.6MW to 1MW. 1MW is full output of main engine SMES. - Powersinks also dissipate small amount of internal energy charge over time. (20kW)
This commit is contained in:
@@ -69,21 +69,26 @@
|
||||
else
|
||||
total_load = "[round(total_load)] W"
|
||||
|
||||
out += "</table>"
|
||||
out += "</table><br><b>TOTAL GRID LOAD: [total_load]</b>"
|
||||
|
||||
var/textavail = powernet.avail
|
||||
if(textavail > 1000)
|
||||
textavail = "[textavail / 1000]"
|
||||
textavail += " kW"
|
||||
else
|
||||
textavail += " W"
|
||||
var/textavail = powernet.avail
|
||||
if(textavail > 1000)
|
||||
textavail = "[textavail / 1000] kW"
|
||||
else
|
||||
textavail = "[textavail] W"
|
||||
out += "<br><b>TOTAL AVAILABLE: [textavail]</b>"
|
||||
|
||||
if(powernet.problem)
|
||||
out += "<br><b>WARNING: Abnormal grid activity detected!</b>"
|
||||
out += "<br><b>TOTAL GRID LOAD: [total_load]</b>"
|
||||
out += "<br><b>TOTAL AVAILABLE: [textavail]</b>"
|
||||
if(powernet.problem)
|
||||
out += "<br><b>WARNING: Abnormal grid activity detected!</b>"
|
||||
return out
|
||||
|
||||
/obj/machinery/power/sensor/proc/check_grid_warning()
|
||||
RefreshGrid()
|
||||
if(powernet)
|
||||
if(powernet.problem)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Has to be here as we need it to be in Machines list.
|
||||
/obj/machinery/power/sensor/process()
|
||||
return 1
|
||||
Reference in New Issue
Block a user