diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 519a7177d7a..857ca1d99fa 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -420,6 +420,9 @@ Class Procs: if(do_after(user, time, target = src)) to_chat(user, "You've [anchored ? "un" : ""]secured [name].") anchored = !anchored + if(istype(src, /obj/machinery)) + var/obj/machinery/M = src + M.power_change() //Turn on or off the machine depending on the status of power in the new area. playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) return 1 return 0 diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index a75bdd3ec80..8e466bc0a94 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -366,6 +366,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ + power_change() if(1) if(iswrench(O)) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) @@ -373,6 +374,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin user.visible_message("[user.name] detaches the [src.name] from the floor.", \ "You remove the external bolts.") temp_state-- + power_change() else if(iscoil(O)) if(O:use(1)) user.visible_message("[user.name] adds wires to the [src.name].", \ diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index ed2fb257015..9baf225e127 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -24,6 +24,7 @@ /obj/machinery/particle_accelerator/control_box/New() wires = new(src) connected_parts = list() + update_icon() ..() /obj/machinery/particle_accelerator/control_box/Destroy() @@ -62,9 +63,12 @@ /obj/machinery/particle_accelerator/control_box/update_icon() if(active) - icon_state = "[reference]p1" + icon_state = "[reference]p[strength]" else - if(use_power) + if(stat & NOPOWER) + icon_state = "[reference]w" + return + else if(use_power) if(assembled) icon_state = "[reference]p" else @@ -89,7 +93,7 @@ to_chat(usr, "ERROR: Request timed out. Check wire contacts.") return - if( href_list["close"] ) + if(href_list["close"]) usr << browse(null, "window=pacontrol") usr.unset_machine() return @@ -152,6 +156,11 @@ use_power = 0 else if(!stat && construction_state <= 3) use_power = 1 + src.update_icon() + for(var/obj/structure/particle_accelerator/part in connected_parts) + part.strength = null + part.powered = 0 + part.update_icon() return