From a6bbf0989803357b157354282e6fd4223abdb108 Mon Sep 17 00:00:00 2001 From: nemvar <47324920+nemvar@users.noreply.github.com> Date: Wed, 6 May 2020 02:26:32 +0200 Subject: [PATCH] Fixes ORM scooping bugs. (#50809) --- code/modules/mining/machine_processing.dm | 9 ++++++++- code/modules/mining/machine_redemption.dm | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 97d441b2d47..fd3903224a2 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -16,7 +16,7 @@ /obj/machinery/mineral/Initialize(mapload) . = ..() - if(needs_item_input) + if(needs_item_input && anchored) register_input_turf() /// Gets the turf in the `input_dir` direction adjacent to the machine, and registers signals for ATOM_ENTERED and ATOM_CREATED. Calls the `pickup_item()` proc when it recieves these signals. @@ -30,6 +30,13 @@ if(input_turf) UnregisterSignal(input_turf, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_CREATED)) +/obj/machinery/mineral/Moved() + . = ..() + if(!needs_item_input || !anchored) + return + unregister_input_turf() + register_input_turf() + /** Base proc for all `/mineral` subtype machines to use. Place your item pickup behavior in this proc when you override it for your specific machine. diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 2af7e26ea7f..ac4272c084b 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -160,6 +160,8 @@ /obj/machinery/mineral/ore_redemption/default_unfasten_wrench(mob/user, obj/item/I) . = ..() + if(. != SUCCESSFUL_UNFASTEN) + return if(anchored) register_input_turf() // someone just wrenched us down, re-register the turf else