From 0b93a984d7d49fc0149d3fc95032fa1b2f54fe50 Mon Sep 17 00:00:00 2001 From: Veth-s Date: Tue, 4 Feb 2025 21:19:44 +0000 Subject: [PATCH 1/4] mo money mo problems --- .../code/modules/mech_comp/objects/interactor.dm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/monkestation/code/modules/mech_comp/objects/interactor.dm b/monkestation/code/modules/mech_comp/objects/interactor.dm index 4af0794c9607..d16b017789b8 100644 --- a/monkestation/code/modules/mech_comp/objects/interactor.dm +++ b/monkestation/code/modules/mech_comp/objects/interactor.dm @@ -18,6 +18,15 @@ var/stored_dir = NORTH ///the interaction range defaults to ontop of itself var/range = FALSE + ///blacklisted types + var/list/blacklist = list( + /obj/item/stack/spacecash, + /obj/item/stack/monkecoin, + ) + + + + /obj/item/mcobject/interactor/Initialize(mapload) . = ..() @@ -166,6 +175,9 @@ else held_item.forceMove(drop_location()) held_item = null + if(is_type_in_list(weapon, blacklist)) + say("[weapon] is incompatible with the interaction component!") + return held_item = weapon dummy_human.put_in_l_hand(weapon) update_appearance() From 68370be89e876038abe7bab2fd537ef23fc1c98e Mon Sep 17 00:00:00 2001 From: Veth-s Date: Tue, 4 Feb 2025 23:03:12 +0000 Subject: [PATCH 2/4] Update monkestation/code/modules/mech_comp/objects/interactor.dm Co-authored-by: Lucy --- .../code/modules/mech_comp/objects/interactor.dm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/monkestation/code/modules/mech_comp/objects/interactor.dm b/monkestation/code/modules/mech_comp/objects/interactor.dm index d16b017789b8..e5bebf9187d5 100644 --- a/monkestation/code/modules/mech_comp/objects/interactor.dm +++ b/monkestation/code/modules/mech_comp/objects/interactor.dm @@ -18,15 +18,11 @@ var/stored_dir = NORTH ///the interaction range defaults to ontop of itself var/range = FALSE - ///blacklisted types - var/list/blacklist = list( + /// 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/mcobject/interactor/Initialize(mapload) . = ..() From 800557a1d0ddf1bc92726e543e1c8c0904050225 Mon Sep 17 00:00:00 2001 From: Veth-s Date: Tue, 4 Feb 2025 23:03:18 +0000 Subject: [PATCH 3/4] Update monkestation/code/modules/mech_comp/objects/interactor.dm Co-authored-by: Lucy --- monkestation/code/modules/mech_comp/objects/interactor.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkestation/code/modules/mech_comp/objects/interactor.dm b/monkestation/code/modules/mech_comp/objects/interactor.dm index e5bebf9187d5..b76370092999 100644 --- a/monkestation/code/modules/mech_comp/objects/interactor.dm +++ b/monkestation/code/modules/mech_comp/objects/interactor.dm @@ -171,7 +171,7 @@ else held_item.forceMove(drop_location()) held_item = null - if(is_type_in_list(weapon, blacklist)) + if(is_type_in_typecache(weapon, item_blacklist)) say("[weapon] is incompatible with the interaction component!") return held_item = weapon From bbbedda0cc36bcfd1b72e49fa9d3c56fb604c95f Mon Sep 17 00:00:00 2001 From: Veth-s Date: Tue, 4 Feb 2025 23:04:47 +0000 Subject: [PATCH 4/4] Update interactor.dm --- monkestation/code/modules/mech_comp/objects/interactor.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/monkestation/code/modules/mech_comp/objects/interactor.dm b/monkestation/code/modules/mech_comp/objects/interactor.dm index b76370092999..e1b26bf17b1d 100644 --- a/monkestation/code/modules/mech_comp/objects/interactor.dm +++ b/monkestation/code/modules/mech_comp/objects/interactor.dm @@ -22,6 +22,7 @@ var/static/list/item_blacklist = typecacheof(list( /obj/item/stack/spacecash, /obj/item/stack/monkecoin, + /obj/item/holochip, )) /obj/item/mcobject/interactor/Initialize(mapload)