From d9636398e1549161a2b736b568926dfde46a9ba0 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 29 Nov 2019 20:12:10 +0100 Subject: [PATCH 1/2] Fixes implant pads --- code/game/objects/items/implants/implant.dm | 2 +- .../game/objects/items/implants/implantpad.dm | 27 +++++++++---------- code/modules/mob/inventory.dm | 2 +- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/code/game/objects/items/implants/implant.dm b/code/game/objects/items/implants/implant.dm index 0786172f25..b0859fd995 100644 --- a/code/game/objects/items/implants/implant.dm +++ b/code/game/objects/items/implants/implant.dm @@ -107,7 +107,7 @@ return ..() /obj/item/implant/proc/get_data() - return "No information available" + return "No information available about this implant." /obj/item/implant/dropped(mob/user) . = 1 diff --git a/code/game/objects/items/implants/implantpad.dm b/code/game/objects/items/implants/implantpad.dm index 8cf07eefe7..c49e4d8d42 100644 --- a/code/game/objects/items/implants/implantpad.dm +++ b/code/game/objects/items/implants/implantpad.dm @@ -13,34 +13,31 @@ var/broadcasting = null var/listening = 1 +/obj/item/implantpad/examine(mob/user) + . = ..() + if(case) + . += "Alt-click [src] to remove the inserted implant case." /obj/item/implantpad/update_icon() - if(case) - icon_state = "implantpad-1" - else - icon_state = "implantpad-0" + icon_state = "implantpad-[case ? TRUE : FALSE]" - -/obj/item/implantpad/attack_hand(mob/user) +/obj/item/implantpad/AltClick(mob/user) . = ..() - if(.) - return - if(case && user.is_holding(src)) - user.put_in_active_hand(case) + if(case && user.can_hold_items() && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + user.put_in_hands(case) case.add_fingerprint(user) case = null add_fingerprint(user) update_icon() + return TRUE /obj/item/implantpad/attackby(obj/item/implantcase/C, mob/user, params) - if(istype(C, /obj/item/implantcase)) - if(!case) - if(!user.transferItemToLoc(C, src)) - return + if(istype(C)) + if(!case && user.transferItemToLoc(C, src)) case = C - update_icon() + update_icon() else return ..() diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index e77a91332e..43dd38eb79 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -10,7 +10,7 @@ //So we're treating each "pair" of limbs as a team, so "both" refers to them /mob/proc/get_inactive_held_item() return get_item_for_held_index(get_inactive_hand_index()) - +put_in_active_hand //Finds the opposite index for the active one (eg: upper left arm will find the item in upper right arm) //So we're treating each "pair" of limbs as a team, so "both" refers to them From b914791a87ba2aea1845f5349f2295287ab564bd Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sun, 1 Dec 2019 09:09:08 +0100 Subject: [PATCH 2/2] ??? --- code/modules/mob/inventory.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 43dd38eb79..e77a91332e 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -10,7 +10,7 @@ //So we're treating each "pair" of limbs as a team, so "both" refers to them /mob/proc/get_inactive_held_item() return get_item_for_held_index(get_inactive_hand_index()) -put_in_active_hand + //Finds the opposite index for the active one (eg: upper left arm will find the item in upper right arm) //So we're treating each "pair" of limbs as a team, so "both" refers to them