From 77826a2a01b4cefdaf89ba03b11860f60657c12a Mon Sep 17 00:00:00 2001 From: Adrer Date: Thu, 12 Oct 2023 16:37:23 +0200 Subject: [PATCH] Fix: Anti-drop causing permanent nodrop items when dropped item picked up by user. (#22747) * Item dropped while antidrop active no longer nodrop * Switched to or instead of XOR * Combines if statements. --------- Co-authored-by: Adrer --- code/modules/surgery/organs/augments_internal.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index c74bb7bfc08..af1503c93aa 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -110,10 +110,10 @@ /obj/item/organ/internal/cyberimp/brain/anti_drop/proc/release_items() active = FALSE - if(!l_hand_ignore && (l_hand_obj in owner.contents)) - l_hand_obj.flags ^= NODROP - if(!r_hand_ignore && (r_hand_obj in owner.contents)) - r_hand_obj.flags ^= NODROP + if(!l_hand_ignore && l_hand_obj && (l_hand_obj == owner.l_hand)) + l_hand_obj.flags &= ~NODROP + if(!r_hand_ignore && r_hand_obj && (r_hand_obj == owner.r_hand)) + r_hand_obj.flags &= ~NODROP /obj/item/organ/internal/cyberimp/brain/anti_drop/remove(mob/living/carbon/M, special = 0) if(active)