From 9bae9f5c574602147bce5dcb564fa661bfbf10db Mon Sep 17 00:00:00 2001 From: GeneralChaos81 Date: Sun, 11 Sep 2016 19:28:40 +1000 Subject: [PATCH] Multitool code in... not quite working. --- code/game/machinery/machinery.dm | 3 +-- code/modules/recycling/conveyor2.dm | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 8c3181c10fc..519a7177d7a 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -127,8 +127,6 @@ Class Procs: /obj/machinery/proc/addAtProcessing() if(use_power) myArea = get_area_master(src) - - machines += src //Moved this to New if(!speed_process) machine_processing += src else @@ -136,6 +134,7 @@ Class Procs: /obj/machinery/New() //new machines += src + ..() /obj/machinery/Destroy() if(myArea) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index e46b8d8b932..6b408e25ece 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -122,6 +122,8 @@ step(A,movedir) CHECK_TICK + + // attack with item, place item on conveyor /obj/machinery/conveyor/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/crowbar)) @@ -146,6 +148,7 @@ else return ..() + // attack with hand, move pulled object onto conveyor /obj/machinery/conveyor/attack_hand(mob/user as mob) user.Move_Pulled(src) @@ -219,15 +222,9 @@ spawn(5) // allow map load conveyors = list() - for(var/obj/machinery/conveyor/C in machines) //This works if it's: `C in world` , but that's bad practice. Best to try to fix it. + for(var/obj/machinery/conveyor/C in machines) if(C.id == id) - conveyors += C //Moving this to initialise to see if it gets around the bug... do we need the spawn thing? Let's find out. - -/*/obj/machinery/conveyor_switch/initialize() //This whole thing is new - conveyors = list() - for(var/obj/machinery/conveyor/C in world) //This works if it's: `C in world` , but that's bad practice. Best to try to fix it so it's in machines - if(C.id == id) - conveyors += C*/ + conveyors += C // update the icon depending on the position @@ -313,6 +310,16 @@ user << "You deattach the conveyor switch." qdel(src) + else if(istype(I, /obj/item/device/multitool)) + update_multitool_menu(user) + return 1 + + +/obj/machinery/conveyor_switch/multitool_menu(var/mob/user, var/obj/item/device/multitool/P) + return {" + "} //