Skip to content

Commit

Permalink
Blacklists money from interaction component (#5293)
Browse files Browse the repository at this point in the history
## About The Pull Request

Fixes #5245, #5262.

Disables money from being placed within an interaction component, fixing
a money dupe.


## Changelog
:cl:
fix: Fixes a money dupe by blacklisting spacecash and monkecoin from
interaction components.
/:cl:

---------

Co-authored-by: Lucy <[email protected]>
  • Loading branch information
Veth-s and Absolucy authored Feb 4, 2025
1 parent ed194da commit 5cf13a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions monkestation/code/modules/mech_comp/objects/interactor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
var/stored_dir = NORTH
///the interaction range defaults to ontop of itself
var/range = FALSE
/// Typecache of items forbidden from being held and used by the component.
var/static/list/item_blacklist = typecacheof(list(
/obj/item/stack/spacecash,
/obj/item/stack/monkecoin,
/obj/item/holochip,
))

/obj/item/mcobject/interactor/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -166,6 +172,9 @@
else
held_item.forceMove(drop_location())
held_item = null
if(is_type_in_typecache(weapon, item_blacklist))
say("[weapon] is incompatible with the interaction component!")
return
held_item = weapon
dummy_human.put_in_l_hand(weapon)
update_appearance()

0 comments on commit 5cf13a3

Please sign in to comment.