mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 22:43:46 +00:00
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 🆑 fix: Crayons now fit in pdas /🆑
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user