From 3a5b87b00a8d95757cc35dffa90177fd0fae23f4 Mon Sep 17 00:00:00 2001 From: Mars Date: Tue, 21 Mar 2017 19:18:29 +0100 Subject: [PATCH] Switching logic Any value != 0 is true, and !0 becomes 1, so you were only able to set the one direction to be forced, and not the other. --- code/modules/recycling/conveyor2.dm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 1127271c17e..209edb809b2 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -256,9 +256,9 @@ /obj/machinery/conveyor_switch/attack_hand(mob/user) if(..()) return 1 - + toggle(user) - + /obj/machinery/conveyor_switch/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) toggle(user) @@ -292,7 +292,7 @@ S.position = position S.update() CHECK_TICK - + /obj/machinery/conveyor_switch/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/crowbar)) var/obj/item/conveyor_switch_construct/C = new/obj/item/conveyor_switch_construct(src.loc) @@ -309,7 +309,12 @@ /obj/machinery/conveyor_switch/multitool_topic(var/mob/user,var/list/href_list,var/obj/O) ..() if("toggle_logic" in href_list) - convdir = !convdir //reverses? + if(convdir) + convdir = 0 + else if(last_pos) + convdir = last_pos + else + convdir = position /obj/machinery/conveyor_switch/multitool_menu(var/mob/user, var/obj/item/device/multitool/P)