Skip to content

Commit

Permalink
fixes arm implants breaking the drop key (tgstation#65002)
Browse files Browse the repository at this point in the history
fixes tgstation#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
  • Loading branch information
Fikou committed Feb 20, 2022
1 parent c56b1de commit 6e2296e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/modules/mining/lavaland/tendril_loot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions code/modules/surgery/organs/augments_arms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
Expand All @@ -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))
Expand Down

0 comments on commit 6e2296e

Please sign in to comment.