mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Duiffel Spotfix (#76442)
## About The Pull Request Gives duffelbags their proper slot count They inherited this from backpacks, but I sorta just forgot about that [Creates "levels" of locked objects, uses that to make locked duffels work](https://github.com/tgstation/tgstation/pull/76442/commits/c613c00f62fa3ff03bb33737d24da9acbf2050e3) [c613c00](https://github.com/tgstation/tgstation/pull/76442/commits/c613c00f62fa3ff03bb33737d24da9acbf2050e3) Turns locked into something that holds defines, this makes life a lot easier. Requires a lot of boilerplate because of how many uses of these procs there are and all the passthrough and shit. Adds a few outfit subtypes to avoid this class of failure in future. Renames the args in a few but not all touched procs, one thing at a time Closes #76407 Closes #76430 Had the lock check in the wrong place Closes #76441 GOD I HATE TK SO MUCH Wrote half the pr without glasses so if it's weird gimme some grace yeah? ## Changelog 🆑 fix: Fixes some fuck with duffelbags, them not holding enough + issues with spawning gear in them (job shit and all) /🆑
This commit is contained in:
@@ -19,6 +19,26 @@
|
||||
l_hand = /obj/item/stack/spacecash/c1000
|
||||
r_hand = /obj/item/stack/spacecash/c1000
|
||||
|
||||
/// outfit_sanity needs to cover insertions into duffelbags
|
||||
/datum/outfit/duffel_user
|
||||
name = "Mr. Runtime"
|
||||
back = /obj/item/storage/backpack/duffelbag
|
||||
backpack_contents = list(/obj/item/clothing/mask/cigarette/cigar/havana)
|
||||
|
||||
/// Satchels too
|
||||
/datum/outfit/stachel_user
|
||||
name = "Mr. Runtime"
|
||||
back = /obj/item/storage/backpack/satchel
|
||||
backpack_contents = list(/obj/item/clothing/mask/cigarette/cigar/havana)
|
||||
|
||||
/// And just in case we'll check backpacks
|
||||
/datum/outfit/backpack_user
|
||||
name = "Mr. Runtime"
|
||||
back = /obj/item/storage/backpack
|
||||
backpack_contents = list(/obj/item/clothing/mask/cigarette/cigar/havana)
|
||||
|
||||
|
||||
|
||||
/datum/unit_test/outfit_sanity/Run()
|
||||
var/datum/outfit/prototype_outfit = /datum/outfit
|
||||
var/prototype_name = initial(prototype_outfit.name)
|
||||
@@ -61,7 +81,7 @@
|
||||
for (var/path in backpack_contents)
|
||||
var/number = backpack_contents[path] || 1
|
||||
for (var/_ in 1 to number)
|
||||
if (!H.equip_to_slot_or_del(new path(H), ITEM_SLOT_BACKPACK, TRUE))
|
||||
if (!H.equip_to_slot_or_del(new path(H), ITEM_SLOT_BACKPACK, TRUE, indirect_action = TRUE))
|
||||
TEST_FAIL("[outfit.name]'s backpack_contents are invalid! Couldn't add [path] to backpack.")
|
||||
|
||||
#undef CHECK_OUTFIT_SLOT
|
||||
|
||||
Reference in New Issue
Block a user