Stops organs from turning against you in cold environments and freezers.
This commit is contained in:
@@ -101,7 +101,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
|
||||
/obj/item/organ/dwarfgland/on_life() //Primary loop to hook into to start delayed loops for other loops..
|
||||
. = ..()
|
||||
if(!owner || owner.stat == DEAD)
|
||||
if(owner && owner.stat != DEAD)
|
||||
dwarf_cycle_ticker()
|
||||
|
||||
//Handles the delayed tick cycle by just adding on increments per each on_life() tick
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/obj/item/organ/appendix/on_life()
|
||||
. = ..()
|
||||
if(.)
|
||||
if(. || !owner)
|
||||
return
|
||||
owner.adjustToxLoss(4, TRUE, TRUE) //forced to ensure people don't use it to gain tox as slime person
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/item/organ/liver/on_life()
|
||||
. = ..()
|
||||
if(!.)//can't process reagents with a failing liver
|
||||
if(!. || !owner)//can't process reagents with a failing liver
|
||||
return
|
||||
|
||||
if(filterToxins && !HAS_TRAIT(owner, TRAIT_TOXINLOVER))
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
var/datum/gas_mixture/enviro = T.return_air()
|
||||
local_temp = enviro.temperature
|
||||
|
||||
else if(istype(loc, /mob/) && !owner)
|
||||
else if(!owner && ismob(loc))
|
||||
var/mob/M = loc
|
||||
if(is_type_in_typecache(M.loc, GLOB.freezing_objects))
|
||||
if(!(organ_flags & ORGAN_FROZEN))
|
||||
@@ -137,9 +137,7 @@
|
||||
/obj/item/organ/proc/on_life() //repair organ damage if the organ is not failing or synthetic
|
||||
if(organ_flags & ORGAN_FAILING || !owner)
|
||||
return FALSE
|
||||
if(is_cold())
|
||||
return FALSE
|
||||
if(damage)
|
||||
if(!is_cold() && damage)
|
||||
///Damage decrements by a percent of its maxhealth
|
||||
var/healing_amount = -(maxHealth * healing_factor)
|
||||
///Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's satiety
|
||||
|
||||
Reference in New Issue
Block a user