mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
## About The Pull Request Continuation of #90365 - Formatted some usages of `set_holdable()` to be more readable - `exception_hold` list now stores its values inside ` GLOB.cached_storage_typecaches`. This means we don't have to manage a static typecache list per storage but can share the value across all storages making memory management slightly more efficient - Monkey cube boxes now cannot hold gorilla cubes cause that would make gorilla cube boxes obsolete also now gorilla cube boxes can now only hold gorilla cubes & not general monkey cubes(which gorilla cubes is a subtype of) cause that would make monkey cube boxes obsolete. We are specializing each box for that specific use case ## Changelog 🆑 code: further improved storage code fix: monkey cube boxes can no longer hold gorilla cubes & vice versa /🆑
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
/*****************************Money bag********************************/
|
|
|
|
/obj/item/storage/bag/money
|
|
name = "money bag"
|
|
desc = "A bag for storing your profits."
|
|
icon_state = "moneybag"
|
|
worn_icon_state = "moneybag"
|
|
force = 10
|
|
throwforce = 0
|
|
resistance_flags = FLAMMABLE
|
|
max_integrity = 100
|
|
w_class = WEIGHT_CLASS_BULKY
|
|
|
|
/obj/item/storage/bag/money/Initialize(mapload)
|
|
. = ..()
|
|
if(prob(20))
|
|
icon_state = "moneybagalt"
|
|
atom_storage.max_slots = 40
|
|
atom_storage.max_specific_storage = 40
|
|
atom_storage.set_holdable(list(
|
|
/obj/item/coin,
|
|
/obj/item/stack/spacecash,
|
|
/obj/item/holochip
|
|
))
|
|
|
|
/obj/item/storage/bag/money/vault/PopulateContents()
|
|
new /obj/item/coin/silver(src)
|
|
new /obj/item/coin/silver(src)
|
|
new /obj/item/coin/silver(src)
|
|
new /obj/item/coin/silver(src)
|
|
new /obj/item/coin/gold(src)
|
|
new /obj/item/coin/gold(src)
|
|
new /obj/item/coin/adamantine(src)
|
|
|
|
///Used in the dutchmen pirate shuttle.
|
|
/obj/item/storage/bag/money/dutchmen/PopulateContents()
|
|
for(var/iteration in 1 to 9)
|
|
new /obj/item/coin/silver/doubloon(src)
|
|
for(var/iteration in 1 to 9)
|
|
new /obj/item/coin/gold/doubloon(src)
|
|
new /obj/item/coin/adamantine/doubloon(src)
|