From 60002d04ccfd62d00fdabe4d48bcde3cd6dfd71f Mon Sep 17 00:00:00 2001 From: Dankman Date: Wed, 1 Mar 2017 16:26:42 -0500 Subject: [PATCH 1/2] Fixing runtimes, making things functional for the Xenobiology Console The old build path pointed towards a circuitboard instead of towards the machine, meaning when you screwdrivered the frame twice, it would cause frame.dm to runtime, and then not delete the frame, meaning you could spam click the console with a screwdriver and spawn infinite boards, and still be stuck with a non functional machine. injector.computer = null was causing a runtime because it was attempting to edit something that no longer existed on destruction. --- code/modules/xenobio2/machinery/injector_computer.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/xenobio2/machinery/injector_computer.dm b/code/modules/xenobio2/machinery/injector_computer.dm index 12887506c2..254c2e9f39 100644 --- a/code/modules/xenobio2/machinery/injector_computer.dm +++ b/code/modules/xenobio2/machinery/injector_computer.dm @@ -21,7 +21,6 @@ /obj/machinery/computer/xenobio2/Destroy() ..() - injector.computer = null /obj/machinery/computer/xenobio2/attack_hand(mob/user) if(..()) @@ -109,5 +108,5 @@ /obj/item/weapon/circuitboard/xenobio2computer name = T_BOARD("injector control console") - build_path = /obj/item/weapon/circuitboard/xenobio2computer - origin_tech = list() //To be filled, + build_path = /obj/machinery/computer/xenobio2 + origin_tech = list() //To be filled From a2e09a2f10ceace39fad2144a476057eb43d0a00 Mon Sep 17 00:00:00 2001 From: Dankman Date: Wed, 1 Mar 2017 16:59:13 -0500 Subject: [PATCH 2/2] Fixing one slight issue. I'm an idiot, forgot about garbage collecting. This fixes a slight issue in my previous PR that would have eventually resulted in a call of DEL if nobody rebuilt the console. --- code/modules/xenobio2/machinery/injector_computer.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/xenobio2/machinery/injector_computer.dm b/code/modules/xenobio2/machinery/injector_computer.dm index 254c2e9f39..2f0144d37b 100644 --- a/code/modules/xenobio2/machinery/injector_computer.dm +++ b/code/modules/xenobio2/machinery/injector_computer.dm @@ -20,6 +20,7 @@ var/active /obj/machinery/computer/xenobio2/Destroy() + injector.computer = null ..() /obj/machinery/computer/xenobio2/attack_hand(mob/user)