From 6fb5067da46b3c84afe5f8de25788160160181cb Mon Sep 17 00:00:00 2001 From: SandPoot Date: Mon, 25 Jan 2021 19:40:35 -0300 Subject: [PATCH] upload files --- .../modules/integrated_electronics/core/integrated_circuit.dm | 4 ++-- code/modules/integrated_electronics/subtypes/manipulation.dm | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index f90b584d76..92d2aa270f 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -378,7 +378,7 @@ a creative player the means to solve many problems. Circuits are held inside an // Checks if the target object is reachable. Useful for various manipulators and manipulator-like objects. -/obj/item/integrated_circuit/proc/check_target(atom/target, exclude_contents = FALSE, exclude_components = FALSE, exclude_self = FALSE) +/obj/item/integrated_circuit/proc/check_target(atom/target, exclude_contents = FALSE, exclude_components = FALSE, exclude_self = FALSE, exclude_outside = FALSE) if(!target) return FALSE @@ -394,7 +394,7 @@ a creative player the means to solve many problems. Circuits are held inside an if(target == assembly.battery) return FALSE - if(target.Adjacent(acting_object) && isturf(target.loc)) + if(!exclude_outside && target.Adjacent(acting_object) && isturf(target.loc)) return TRUE if(!exclude_contents && (target in acting_object.GetAllContents())) diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index eac16d2950..e32f8daa2d 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -186,6 +186,8 @@ AM.forceMove(src) /obj/item/integrated_circuit/manipulation/grabber/proc/drop(obj/item/AM, turf/T = drop_location()) + if(!check_target(AM, FALSE, TRUE, TRUE, TRUE)) + return var/atom/A = get_object() A.investigate_log("dropped ([AM]) from [src].", INVESTIGATE_CIRCUIT) AM.forceMove(T)