From e5d14465b06dc754266916e08f3e5364f1c5d576 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 16 Feb 2015 02:22:12 -0500 Subject: [PATCH] Adds fingerprints whenever an item is put in a human's hands. --- code/game/objects/items.dm | 1 - code/modules/mob/living/carbon/human/inventory.dm | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1e3cb7547ab..3ed2dd9e08a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -141,7 +141,6 @@ if(isliving(src.loc)) return user.next_move = max(user.next_move+2,world.time + 2) - add_fingerprint(user) user.put_in_active_hand(src) if(src.loc == user) src.pickup(user) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index b4c2a18c1d9..5493c5d6034 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -1,3 +1,16 @@ +/* +Add fingerprints to items when we put them in our hands. +This saves us from having to call add_fingerprint() any time something is put in a human's hands programmatically. + +*/ +/mob/living/carbon/human/put_in_l_hand(var/obj/item/W) + . = ..() + if(.) W.add_fingerprint(src) + +/mob/living/carbon/human/put_in_r_hand(var/obj/item/W) + . = ..() + if(.) W.add_fingerprint(src) + /mob/living/carbon/human/verb/quick_equip() set name = "quick-equip" set hidden = 1