mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Freezer Fixes
Freezer crates, freezer boxes, cryobags, and medical grippers now properly preserve organs, as well as organs attached to organs. Cleans up storage.dm slightly by removing loc setting with forceMove(), for the above to work.
This commit is contained in:
@@ -331,18 +331,34 @@
|
||||
var/target_temp = T0C - 40
|
||||
var/cooling_power = 40
|
||||
|
||||
return_air()
|
||||
var/datum/gas_mixture/gas = (..())
|
||||
if(!gas) return null
|
||||
var/datum/gas_mixture/newgas = new/datum/gas_mixture()
|
||||
newgas.copy_from(gas)
|
||||
if(newgas.temperature <= target_temp) return
|
||||
/obj/structure/closet/crate/freezer/return_air()
|
||||
var/datum/gas_mixture/gas = (..())
|
||||
if(!gas) return null
|
||||
var/datum/gas_mixture/newgas = new/datum/gas_mixture()
|
||||
newgas.copy_from(gas)
|
||||
if(newgas.temperature <= target_temp) return
|
||||
|
||||
if((newgas.temperature - cooling_power) > target_temp)
|
||||
newgas.temperature -= cooling_power
|
||||
else
|
||||
newgas.temperature = target_temp
|
||||
return newgas
|
||||
if((newgas.temperature - cooling_power) > target_temp)
|
||||
newgas.temperature -= cooling_power
|
||||
else
|
||||
newgas.temperature = target_temp
|
||||
return newgas
|
||||
|
||||
/obj/structure/closet/crate/freezer/Entered(var/atom/movable/AM)
|
||||
if(istype(AM, /obj/item/organ))
|
||||
var/obj/item/organ/O = AM
|
||||
O.preserved = 1
|
||||
for(var/obj/item/organ/organ in O)
|
||||
organ.preserved = 1
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/freezer/Exited(var/atom/movable/AM)
|
||||
if(istype(AM, /obj/item/organ))
|
||||
var/obj/item/organ/O = AM
|
||||
O.preserved = 0
|
||||
for(var/obj/item/organ/organ in O)
|
||||
organ.preserved = 0
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/freezer/rations //Fpr use in the escape shuttle
|
||||
name = "emergency rations"
|
||||
|
||||
Reference in New Issue
Block a user