From c99f6cb0c52cd2186bfe5478252c29bb142aa72e Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Sat, 31 Dec 2016 15:44:09 -0500 Subject: [PATCH] Adds conditions to PA Part changes in power_change() From feedback. --- .../particle_accelerator/particle_control.dm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 5e0c3f762c8..636fe7d338b 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -157,17 +157,19 @@ else if(!stat && construction_state <= 3) use_power = 1 update_icon() - for(var/obj/structure/particle_accelerator/part in connected_parts) - part.strength = null - part.powered = 0 - part.update_icon() + + if((stat & NOPOWER) || (!stat && construction_state <= 3)) //Only update the part icons if something's changed (i.e. any of the above condition sets are met). + for(var/obj/structure/particle_accelerator/part in connected_parts) + part.strength = null + part.powered = 0 + part.update_icon() return /obj/machinery/particle_accelerator/control_box/process() if(active) //a part is missing! - if( length(connected_parts) < 6 ) + if(length(connected_parts) < 6) investigate_log("lost a connected part; It powered down.","singulo") toggle_power() return