diff --git a/code/datums/storage/subtypes/organ_box.dm b/code/datums/storage/subtypes/organ_box.dm new file mode 100644 index 00000000000..997e4bf50ba --- /dev/null +++ b/code/datums/storage/subtypes/organ_box.dm @@ -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() diff --git a/code/game/objects/items/storage/medkit.dm b/code/game/objects/items/storage/medkit.dm index 2c24b2e832f..43bfb4d61a9 100644 --- a/code/game/objects/items/storage/medkit.dm +++ b/code/game/objects/items/storage/medkit.dm @@ -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) diff --git a/tgstation.dme b/tgstation.dme index 545ba0065de..cc89f41caac 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"