From fcb08473af6656b148ad332bc76fbd892997ca38 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Sun, 22 Apr 2012 20:14:03 +0100 Subject: [PATCH] TG: Committing the one-way conveyor switches as posted by Donkieyo http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=7759 They are currently present in the mail office. Revision: r3104 Author: baloh.matevz --- code/modules/recycling/conveyor2.dm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 36334802e8f..bed4696b342 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -126,6 +126,7 @@ // attack with item, place item on conveyor /obj/machinery/conveyor/attackby(var/obj/item/I, mob/user) + if(isrobot(user)) return //Carn: fix for borgs dropping their modules on conveyor belts user.drop_item() if(I && I.loc) I.loc = src.loc return @@ -263,6 +264,26 @@ S.position = position S.update() +/obj/machinery/conveyor_switch/oneway + var/convdir = 1 //Set to 1 or -1 depending on which way you want the convayor to go. (In other words keep at 1 and set the proper dir on the belts.) + desc = "A conveyor control switch. It appears to only go in one direction." + +// attack with hand, switch position +/obj/machinery/conveyor_switch/oneway/attack_hand(mob/user) + if(position == 0) + position = convdir + else + position = 0 + + operated = 1 + update() + + // find any switches with same id as this one, and set their positions to match us + for(var/obj/machinery/conveyor_switch/S in world) + if(S.id == src.id) + S.position = position + S.update() + // converyor diverter // extendable arm that can be switched so items on the conveyer are diverted sideways // situate in same turf as conveyor