mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
organ boxes now have a storage type (#68722)
* Organ boxes now have a storage type and, because of it, will once again prevent organ decay to organs stored inside of it.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/datum/storage/organ_box
|
||||
|
||||
/datum/storage/organ_box/handle_enter(datum/source, obj/item/arrived)
|
||||
. = ..()
|
||||
|
||||
if(!istype(arrived))
|
||||
return
|
||||
|
||||
arrived.freeze()
|
||||
|
||||
/datum/storage/organ_box/handle_exit(datum/source, obj/item/gone)
|
||||
. = ..()
|
||||
|
||||
if(!istype(gone))
|
||||
return
|
||||
|
||||
gone.unfreeze()
|
||||
@@ -524,21 +524,17 @@
|
||||
/// var to prevent it freezing the same things over and over
|
||||
var/cooling = FALSE
|
||||
|
||||
/obj/item/storage/organbox/Initialize()
|
||||
/obj/item/storage/organbox/Initialize(mapload)
|
||||
. = ..()
|
||||
atom_storage.max_specific_storage = WEIGHT_CLASS_BULKY /// you have to remove it from your bag before opening it but I think that's fine
|
||||
atom_storage.max_total_storage = 21
|
||||
|
||||
create_storage(type = /datum/storage/organ_box, max_specific_storage = WEIGHT_CLASS_BULKY, max_total_storage = 21)
|
||||
atom_storage.set_holdable(list(
|
||||
/obj/item/organ,
|
||||
/obj/item/bodypart,
|
||||
/obj/item/food/icecream
|
||||
))
|
||||
|
||||
/obj/item/storage/organbox/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(100, TRANSPARENT)
|
||||
RegisterSignal(src, COMSIG_ATOM_ENTERED, .proc/freeze)
|
||||
RegisterSignal(src, COMSIG_ATOM_EXITED, .proc/unfreeze)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/storage/organbox/process(delta_time)
|
||||
|
||||
@@ -1195,6 +1195,7 @@
|
||||
#include "code\datums\storage\subtypes\cards.dm"
|
||||
#include "code\datums\storage\subtypes\extract_inventory.dm"
|
||||
#include "code\datums\storage\subtypes\implant.dm"
|
||||
#include "code\datums\storage\subtypes\organ_box.dm"
|
||||
#include "code\datums\storage\subtypes\pockets.dm"
|
||||
#include "code\datums\votes\_vote_datum.dm"
|
||||
#include "code\datums\votes\custom_vote.dm"
|
||||
|
||||
Reference in New Issue
Block a user