Storage / table interactions at the bottom of the interaction chain (#85512)

Because the wings were in fact made of wax 

## About The Pull Request

Storage goes to the very bottom of the interaction chain, hardcoded in
on `/atom`.
This is not preferred, obviously, but it ends up being a lot less
snowflaking overall.

Tables also go at the very bottom by extending `base_item_interaction`. 

Fixes #83742
Fixes #84434 
Fixes #83982
Fixes #85516
Fixes #84990
Fixes #84890
Closes #85036
Closes #84025 (RMB places it on the table.)
Closes #86616

Other changes:

Refactored pod storage to be less jank. Patches some exploits around it.

## Why It's Good For The Game

Should make a lot more interactions a lot more reliable... hopefully

## Changelog

🆑 Melbert
refactor: Storage and Tables are now a lower priority action, meaning
some uses of items on storage should work... better, now. Here's hoping
at least, report any oddities.
refactor: Note: For an overwhelming majority of items, **combat mode**
will attempt to attack/insert into the target, while **non-combat-mode**
will attempt to use on a target. This means screwdrivering or emagging a
MODsuit must be done on non-combat-mode, as combat mode will simply put
the screwdriver or emag into its storage. Same applies to tables, though
when in doubt, RMB may help (for things which are also weapons, like
mops).
refactor: Refactored escape pod storage, now they actually properly show
as unlocked on red alert and above.
/🆑
This commit is contained in:
MrMelbert
2024-09-12 16:48:19 -05:00
committed by GitHub
parent 76968949d7
commit 8486f2f7e2
65 changed files with 386 additions and 357 deletions
+21
View File
@@ -20,3 +20,24 @@
small_thing.update_weight_class(WEIGHT_CLASS_BULKY)
TEST_ASSERT_NOTEQUAL(small_thing.loc, storage_item, "A small item changed back into bulky size should have ejected from the backpack")
/datum/unit_test/common_item_inserting
/datum/unit_test/common_item_inserting/Run()
var/obj/item/storage/backpack/bag = allocate(__IMPLIED_TYPE__, run_loc_floor_bottom_left)
var/mob/living/carbon/human/consistent/dummy = allocate(__IMPLIED_TYPE__, run_loc_floor_bottom_left)
bag.atom_storage.max_slots = INFINITY
bag.atom_storage.max_total_storage = INFINITY
var/list/common_noncombat_insertion_items = list(
/obj/item/reagent_containers/cup/rag,
/obj/item/soap,
/obj/item/card/emag,
/obj/item/detective_scanner,
)
dummy.set_combat_mode(TRUE)
for(var/item_type in common_noncombat_insertion_items)
var/obj/item/item = allocate(item_type, run_loc_floor_bottom_left)
item.melee_attack_chain(dummy, bag)
TEST_ASSERT_EQUAL(item.loc, bag, "[item_type] was unable to be inserted into a backpack on click while off combat mode")