fixes arm implants breaking the drop key (#65002)

fixes #65001 (Surgical Toolset Implants (possibly integrated toolset implants too?) cause the drop hotkey to stop working properly)

The dropkey signal always gets called, even when the item isnt extended.
Comsig_kb_activated cancels the key from being sent

We were doing our check inside retract, but we always assumed the dropped item was us. bad
This commit is contained in:
Fikou
2022-02-20 04:49:30 +01:00
committed by GitHub
parent c56b1de844
commit 6e2296ea56
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -828,7 +828,7 @@
/obj/item/organ/cyberimp/arm/katana/Retract()
var/obj/item/cursed_katana/katana = active_item
if(!katana || katana.shattered)
return
return FALSE
if(!katana.drew_blood)
to_chat(owner, span_userdanger("[katana] lashes out at you in hunger!"))
playsound(owner, 'sound/magic/demon_attack1.ogg', 50, TRUE)
+4 -3
View File
@@ -114,12 +114,12 @@
return //How did we even get here
if(hand != host.hand_bodyparts[host.active_hand_index])
return //wrong hand
Retract()
return COMSIG_KB_ACTIVATED
if(Retract())
return COMSIG_KB_ACTIVATED
/obj/item/organ/cyberimp/arm/proc/Retract()
if(!active_item || (active_item in src))
return
return FALSE
owner?.visible_message(span_notice("[owner] retracts [active_item] back into [owner.p_their()] [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm."),
span_notice("[active_item] snaps back into your [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm."),
@@ -128,6 +128,7 @@
owner.transferItemToLoc(active_item, src, TRUE)
active_item = null
playsound(get_turf(owner), retract_sound, 50, TRUE)
return TRUE
/obj/item/organ/cyberimp/arm/proc/Extend(obj/item/augment)
if(!(augment in src))