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:
magatsuchi
2022-07-29 19:57:06 -04:00
committed by GitHub
parent 4c4fbe0f79
commit 0bb21efbd4
3 changed files with 21 additions and 7 deletions
+17
View File
@@ -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()
+3 -7
View File
@@ -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)
+1
View File
@@ -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"