mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Locking a storage item now locks you out of other storage items inside it. (#90243)
## About The Pull Request This PR introduces the `set_locked()` proc, which I'll also need for something else later. ## Why It's Good For The Game I could still interact with the storage of a box I placed into a secure safe after I locked the latter. ## Changelog 🆑 fix: Locking a storage item now locks you out of other storage items inside it. /🆑
This commit is contained in:
@@ -22,19 +22,19 @@
|
||||
. = ..()
|
||||
create_storage(max_specific_storage = max_w_class, max_total_storage = max_combined_w_class, max_slots = max_items)
|
||||
atom_storage.allow_big_nesting = TRUE
|
||||
atom_storage.locked = STORAGE_FULLY_LOCKED
|
||||
atom_storage.set_locked(STORAGE_FULLY_LOCKED)
|
||||
|
||||
/obj/item/mod/module/storage/on_install()
|
||||
var/datum/storage/modstorage = mod.create_storage(max_specific_storage = max_w_class, max_total_storage = max_combined_w_class, max_slots = max_items)
|
||||
modstorage.set_real_location(src)
|
||||
modstorage.allow_big_nesting = big_nesting
|
||||
atom_storage.locked = STORAGE_NOT_LOCKED
|
||||
atom_storage.set_locked(STORAGE_NOT_LOCKED)
|
||||
var/obj/item/clothing/suit = mod.get_part_from_slot(ITEM_SLOT_OCLOTHING)
|
||||
if(istype(suit))
|
||||
RegisterSignal(suit, COMSIG_ITEM_PRE_UNEQUIP, PROC_REF(on_suit_unequip))
|
||||
|
||||
/obj/item/mod/module/storage/on_uninstall(deleting = FALSE)
|
||||
atom_storage.locked = STORAGE_FULLY_LOCKED
|
||||
atom_storage.set_locked(STORAGE_FULLY_LOCKED)
|
||||
QDEL_NULL(mod.atom_storage)
|
||||
if(!deleting)
|
||||
atom_storage.remove_all(mod.drop_location())
|
||||
|
||||
Reference in New Issue
Block a user