From cba712992a792059520b0df435085ee8ce4a49ef Mon Sep 17 00:00:00 2001 From: Leshana Date: Mon, 22 Jan 2018 19:21:56 -0500 Subject: [PATCH] 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! --- code/ATMOSPHERICS/components/unary/vent_pump.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index a45d3f0860c..b5449fe7376 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -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)