From 5ba23b9f3d8e074aca859640cb6bf82d0e3097cd Mon Sep 17 00:00:00 2001 From: Feenie <62373791+FeenieRU@users.noreply.github.com> Date: Tue, 23 Jul 2024 22:31:17 +0300 Subject: [PATCH] ID and PDA interacts with cash (#85123) ## About The Pull Request Adding interactions between ID/PDA and money. So, you can swipe it on cash and get it on your bank. ## Why It's Good For The Game Now you don't have to constantly insert every coin into the card.
GIF and evidence that I tested ![card_test2](https://github.com/user-attachments/assets/833f7587-0b4c-4357-b4dc-b7f897416058)
## Changelog :cl: qol: Now IDs and PDAs have money-reader module for picking some cash into your bank by swiping on money. /:cl: --- code/game/objects/items/cards_ids.dm | 7 ++++++- code/modules/modular_computers/computers/item/pda.dm | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index f9cb3dfc8ec..7524152c65b 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -840,6 +840,11 @@ /obj/item/card/id/proc/get_trim_sechud_icon_state() return trim?.sechud_icon_state || SECHUD_UNKNOWN +/obj/item/card/id/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(iscash(interacting_with)) + return insert_money(interacting_with, user) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_BLOCKING + return NONE + /obj/item/card/id/away name = "\proper a perfectly generic identification card" desc = "A perfectly generic identification card. Looks like it could use some flavor." @@ -1442,7 +1447,7 @@ theft_target = WEAKREF(interacting_with) ui_interact(user) return ITEM_INTERACT_SUCCESS - return NONE + return ..() /obj/item/card/id/advanced/chameleon/interact_with_atom_secondary(atom/interacting_with, mob/living/user, list/modifiers) // If we're attacking a human, we want it to be covert. We're not ATTACKING them, we're trying diff --git a/code/modules/modular_computers/computers/item/pda.dm b/code/modules/modular_computers/computers/item/pda.dm index f0ba52b0763..ec67185314d 100644 --- a/code/modules/modular_computers/computers/item/pda.dm +++ b/code/modules/modular_computers/computers/item/pda.dm @@ -144,6 +144,11 @@ return . || NONE +/obj/item/modular_computer/pda/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(iscash(interacting_with)) + return money_act(user,interacting_with) + return NONE + /obj/item/modular_computer/pda/item_interaction(mob/living/user, obj/item/tool, list/modifiers) . = ..() if(.)