mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Organs are now preserved more reliably; First pass
This commit is contained in:
@@ -107,7 +107,7 @@ var/list/organ_cache = list()
|
||||
return
|
||||
|
||||
// Don't process if we're in a freezer, an MMI or a stasis bag. //TODO: ambient temperature?
|
||||
if(istype(loc,/obj/item/device/mmi) || istype(loc,/obj/item/bodybag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer))
|
||||
if(is_preserved())
|
||||
return
|
||||
|
||||
//Process infections
|
||||
@@ -140,6 +140,25 @@ var/list/organ_cache = list()
|
||||
if(damage >= max_damage)
|
||||
die()
|
||||
|
||||
/obj/item/organ/proc/is_preserved()
|
||||
if(istype(loc,/obj/item/organ))
|
||||
var/obj/item/organ/O = loc
|
||||
return O.is_preserved()
|
||||
if(istype(loc,/obj/item/device/mmi)) // Brain items are qdel'd when put in an MMI, and recreated in perfection when removed.
|
||||
return 1 // This is all silly, but I can use this when I have MMIs actually store the brain -- Crazylemon
|
||||
if(istype(loc,/obj/item/bodybag/cryobag))
|
||||
return 1
|
||||
if(istype(loc,/obj/structure/closet/crate/freezer))
|
||||
return 1
|
||||
if(istype(loc,/turf))
|
||||
for(var/obj/structure/closet/crate/freezer/F in loc.contents)
|
||||
if(F.opened)
|
||||
return 1
|
||||
break
|
||||
|
||||
// You can do your cool location temperature organ preserving effects here!
|
||||
return 0
|
||||
|
||||
/obj/item/organ/examine(mob/user)
|
||||
..(user)
|
||||
if(status & ORGAN_DEAD)
|
||||
|
||||
Reference in New Issue
Block a user