From da07df7cbbf7d92066ae030a5d880014d2034a4e Mon Sep 17 00:00:00 2001 From: Citinited Date: Tue, 10 Jul 2018 18:35:33 +0100 Subject: [PATCH] Unlinks conveyor switches if the conveyor is attacked by a switch --- code/modules/recycling/conveyor2.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 77d3e8091ef..9a0f211a292 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -65,6 +65,11 @@ GLOBAL_LIST_INIT(conveyor_switches, list()) playsound(loc, I.usesound, 50, 1) else if(istype(I, /obj/item/conveyor_switch_construct)) var/obj/item/conveyor_switch_construct/S = I + if(S.id == id) + return ..() + for(var/obj/machinery/conveyor_switch/CS in GLOB.conveyor_switches) + if(CS.id == id) + CS.conveyors -= src id = S.id to_chat(user, "You link [I] with [src].") else if(user.a_intent != INTENT_HARM)