diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 57c5a2c697c..0621c1644a5 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/verb/give(var/mob/living/carbon/target in oview(1)) +/mob/living/carbon/verb/give(mob/living/carbon/target in oview(1)) set category = "IC" set name = "Give" @@ -125,8 +125,8 @@ ..() holder.mouse_pointer_icon = 'icons/misc/mouse_icons/give_item.dmi' to_chat(holder, span_info("You can now left click on someone to give them your held item.")) - RegisterSignal(holder.mob.get_active_hand(), list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), /datum/proc/signal_qdel) - + RegisterSignal(holder.mob.get_active_hand(), list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), PROC_REF(signal_qdel)) + RegisterSignal(holder.mob, COMSIG_MOB_SWAP_HANDS, PROC_REF(signal_qdel)) /datum/click_intercept/give/Destroy(force = FALSE, ...) holder.mouse_pointer_icon = initial(holder.mouse_pointer_icon) @@ -188,10 +188,9 @@ giver.apply_status_effect(STATUS_EFFECT_OFFERING_ITEM, receiver_UID, item_UID) add_overlay(icon(I.icon, I.icon_state, SOUTH)) add_overlay("alert_flash") - RegisterSignal(I, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), PROC_REF(cancel_give)) // If either of these atoms are deleted, we need to cancel everything. Also saves having to do null checks before interacting with these atoms. - RegisterSignal(I, COMSIG_PARENT_QDELETING, /datum/proc/signal_qdel) - RegisterSignal(giver, COMSIG_PARENT_QDELETING, /datum/proc/signal_qdel) + RegisterSignal(I, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), PROC_REF(cancel_give)) + RegisterSignal(giver, list(COMSIG_PARENT_QDELETING, COMSIG_MOB_SWAP_HANDS), PROC_REF(cancel_give)) /obj/screen/alert/take_item/Destroy() diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index c2fd9d708c0..84b73077423 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -6,13 +6,8 @@ return FALSE hand = !hand - - if(hud_used && hud_used.inv_slots[slot_l_hand] && hud_used.inv_slots[slot_r_hand]) - var/obj/screen/inventory/hand/H - H = hud_used.inv_slots[slot_l_hand] - H.update_icon() - H = hud_used.inv_slots[slot_r_hand] - H.update_icon() + update_hands_HUD() + SEND_SIGNAL(src, COMSIG_MOB_SWAP_HANDS) /mob/living/carbon/activate_hand(selhand) //0 or "r" or "right" for right hand; 1 or "l" or "left" for left hand.