From 54d07c767cedd49e3bbbdc491d8b5c5bf157510b Mon Sep 17 00:00:00 2001 From: Lucy Grindler <110352801+LucyGrind@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:16:46 -0700 Subject: [PATCH] Fixes crayon not fitting in pda by replacing attackby w/ item_interaction (#83951) ## About The Pull Request Fixes a bug, what else do you need fixes #83948 ## Why It's Good For The Game Bugs are bad for game health and crayons fitting in pdas aren't really a major change. ## Changelog :cl: fix: Crayons now fit in pdas /:cl: --- .../modular_computers/computers/item/pda.dm | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/modules/modular_computers/computers/item/pda.dm b/code/modules/modular_computers/computers/item/pda.dm index ec0d4a94e2b..c2327eac4b3 100644 --- a/code/modules/modular_computers/computers/item/pda.dm +++ b/code/modules/modular_computers/computers/item/pda.dm @@ -140,22 +140,22 @@ return . || NONE -/obj/item/modular_computer/pda/attackby(obj/item/attacking_item, mob/user, params) - . = ..() +/obj/item/modular_computer/pda/item_interaction(mob/living/user, obj/item/tool, list/modifiers) - if(!is_type_in_list(attacking_item, contained_item)) - return - if(attacking_item.w_class >= WEIGHT_CLASS_SMALL) // Anything equal to or larger than small won't work + if(!is_type_in_list(tool, contained_item)) + return NONE + if(tool.w_class >= WEIGHT_CLASS_SMALL) // Anything equal to or larger than small won't work user.balloon_alert(user, "too big!") - return + return ITEM_INTERACT_BLOCKING if(inserted_item) balloon_alert(user, "no room!") - return - if(!user.transferItemToLoc(attacking_item, src)) - return - balloon_alert(user, "inserted [attacking_item]") - inserted_item = attacking_item + return ITEM_INTERACT_BLOCKING + if(!user.transferItemToLoc(tool, src)) + return ITEM_INTERACT_BLOCKING + balloon_alert(user, "inserted [tool]") + inserted_item = tool playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE) + return ITEM_INTERACT_SUCCESS /obj/item/modular_computer/pda/item_ctrl_click(mob/user)