From 3eaa2bf482563adce57d0d1c56054081ac2beaae Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 10 Apr 2021 19:11:29 +0200 Subject: [PATCH] Put In Hands Error Message Fix (#11625) --- code/modules/mob/living/carbon/human/inventory.dm | 12 ++++++------ html/changelogs/geeves-equip_in_hands_fix.yml | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 html/changelogs/geeves-equip_in_hands_fix.yml diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 4ea8dee0fc9..b60ee2d8e9f 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -424,19 +424,19 @@ This saves us from having to call add_fingerprint() any time something is put in //Puts the item into our active hand if possible. returns 1 on success. -/mob/living/carbon/human/put_in_active_hand(var/obj/item/W) - return (hand ? equip_to_slot_if_possible(W, slot_l_hand) : equip_to_slot_if_possible(W, slot_r_hand)) +/mob/living/carbon/human/put_in_active_hand(var/obj/item/W, set_disable_warning = FALSE) + return (hand ? equip_to_slot_if_possible(W, slot_l_hand, disable_warning = set_disable_warning) : equip_to_slot_if_possible(W, slot_r_hand, disable_warning = set_disable_warning)) //Puts the item into our inactive hand if possible. returns 1 on success. -/mob/living/carbon/human/put_in_inactive_hand(var/obj/item/W) - return (hand ? equip_to_slot_if_possible(W, slot_r_hand) : equip_to_slot_if_possible(W, slot_l_hand)) +/mob/living/carbon/human/put_in_inactive_hand(var/obj/item/W, set_disable_warning = FALSE) + return (hand ? equip_to_slot_if_possible(W, slot_r_hand, disable_warning = set_disable_warning) : equip_to_slot_if_possible(W, slot_l_hand, disable_warning = set_disable_warning)) /mob/living/carbon/human/put_in_hands(var/obj/item/W) if(!W) return FALSE - if(put_in_active_hand(W)) + if(put_in_active_hand(W, TRUE)) return TRUE - else if(put_in_inactive_hand(W)) + else if(put_in_inactive_hand(W, TRUE)) return TRUE else return ..() diff --git a/html/changelogs/geeves-equip_in_hands_fix.yml b/html/changelogs/geeves-equip_in_hands_fix.yml new file mode 100644 index 00000000000..d7277cfd258 --- /dev/null +++ b/html/changelogs/geeves-equip_in_hands_fix.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - bugfix: "Something putting an item in your hands will no longer give an error message if it couldn't find a hand to do it with." \ No newline at end of file