From 996756dd01111697c2ddc624ee02063a60fd8ade Mon Sep 17 00:00:00 2001 From: Burzah <116982774+Burzah@users.noreply.github.com> Date: Sat, 25 Mar 2023 00:07:33 -0700 Subject: [PATCH] Smuggler's satchel now fits in Bag of Holding (#20630) * adds an override to storage_base.dm allows for BOH to hold smugglers satchel * formatting fix * Update code/game/objects/items/weapons/storage/storage_base.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/storage_base.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/storage_base.dm Co-authored-by: Farie82 * Update code/game/objects/items/weapons/storage/storage_base.dm Co-authored-by: Farie82 * Update code/game/objects/items/weapons/storage/storage_base.dm Co-authored-by: Farie82 * small tweak after testing --------- Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> Co-authored-by: Farie82 --- code/game/objects/items/weapons/storage/backpack.dm | 1 + code/game/objects/items/weapons/storage/storage_base.dm | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 21dff37fb48..ec7a23fe24a 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -60,6 +60,7 @@ resistance_flags = FIRE_PROOF flags_2 = NO_MAT_REDEMPTION_2 cant_hold = list(/obj/item/storage/backpack, /obj/item/storage/belt/bluespace) + cant_hold_override = list(/obj/item/storage/backpack/satchel_flat) armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 60, ACID = 50) /obj/item/storage/backpack/holding/attackby(obj/item/W, mob/user, params) diff --git a/code/game/objects/items/weapons/storage/storage_base.dm b/code/game/objects/items/weapons/storage/storage_base.dm index 5639f044353..efad0782d27 100644 --- a/code/game/objects/items/weapons/storage/storage_base.dm +++ b/code/game/objects/items/weapons/storage/storage_base.dm @@ -15,6 +15,8 @@ var/list/can_hold = list() /// List of objects which this item can't store (in effect only if can_hold isn't set) var/list/cant_hold = list() + /// List of objects which this item overrides the cant_hold list (used to negate cant_hold on specific items. Ex: Allowing Smuggler's Satchels (subtype of backpack) to be stored inside bags of holding.) + var/list/cant_hold_override = list() /// Max size of objects that this object can store (in effect only if can_hold isn't set) var/max_w_class = WEIGHT_CLASS_SMALL /// The sum of the w_classes of all the items in this storage item. @@ -48,7 +50,7 @@ /obj/item/storage/Initialize(mapload) . = ..() can_hold = typecacheof(can_hold) - cant_hold = typecacheof(cant_hold) + cant_hold = typecacheof(cant_hold) - typecacheof(cant_hold_override) if(allow_quick_empty) verbs += /obj/item/storage/verb/quick_empty