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
This commit is contained in:
Ren Erthilo
2012-04-22 20:14:03 +01:00
parent e9a8bf4df8
commit fcb08473af

View File

@@ -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