Fix Mecha Runtimes (#1179)

Consistently spammed these for 8+ hours today.

No thank you.

Remember kids, safety checking a variable before assuming it can be used is important.
This commit is contained in:
skull132
2016-11-23 22:47:22 +02:00
committed by GitHub
parent dbcca37333
commit ca6dee493e
+4 -2
View File
@@ -1452,7 +1452,7 @@
<b>Powercell charge: </b>[isnull(cell_charge)?"No powercell installed":"[cell.percent()]%"]<br>
<b>Air source: </b>[use_internal_tank?"Internal Airtank":"Environment"]<br>
<b>Airtank pressure: </b>[tank_pressure]kPa<br>
<b>Airtank temperature: </b>[tank_temperature]K|[tank_temperature - T0C]&deg;C<br>
<b>Airtank temperature: </b>[isnum(tank_temperature) ? "[tank_temperature]K|[tank_temperature - T0C]&deg;C" : "Unknown"]<br>
<b>Cabin pressure: </b>[cabin_pressure>WARNING_HIGH_PRESSURE ? "<font color='red'>[cabin_pressure]</font>": cabin_pressure]kPa<br>
<b>Cabin temperature: </b> [return_temperature()]K|[return_temperature() - T0C]&deg;C<br>
<b>Lights: </b>[lights?"on":"off"]<br>
@@ -1985,7 +1985,9 @@
process(var/obj/mecha/mecha)
if (!mecha)
// No cell will kill warnings.
// Makes sense, caution systems are battery powered.
if (!mecha || !mecha.cell)
return
if (!mecha.power_alert_status && mecha.cell)//If we're in the fine status