Fixes #2820 - Vent pumps shutting down after some template loads

Specific situation happens when power_change() is called before atmos_init is called for the first time()
update_icons has no business modifying variables like use_power.  Just update the icon!
This commit is contained in:
Leshana
2018-01-22 19:21:56 -05:00
parent fc7b89f5ea
commit cba712992a
@@ -106,8 +106,6 @@
/obj/machinery/atmospherics/unary/vent_pump/update_icon(var/safety = 0)
if(!check_icon_cache())
return
if (!node)
use_power = 0
overlays.Cut()
@@ -122,10 +120,10 @@
if(welded)
vent_icon += "weld"
else if(!powered())
else if(!use_power || !node || (stat & (NOPOWER|BROKEN)))
vent_icon += "off"
else
vent_icon += "[use_power ? "[pump_direction ? "out" : "in"]" : "off"]"
vent_icon += "[pump_direction ? "out" : "in"]"
overlays += icon_manager.get_atmos_icon("device", , , vent_icon)