mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Toxins suppress natural liver healing rate. (#13420)
This commit is contained in:
@@ -139,8 +139,12 @@
|
||||
tick_surge_damage() //Yes, this is intentional.
|
||||
|
||||
/obj/item/organ/internal/proc/handle_regeneration()
|
||||
if(!damage || BP_IS_ROBOTIC(src) || !istype(owner) || owner.chem_effects[CE_TOXIN] || (toxin_type in owner.chem_effects) || owner.is_asystole())
|
||||
return
|
||||
var/repair_modifier = owner.chem_effects[CE_ORGANREPAIR] || 0.1
|
||||
if(damage < repair_modifier*max_damage)
|
||||
heal_damage(repair_modifier)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(damage && !BP_IS_ROBOTIC(src) && istype(owner))
|
||||
if(!owner.is_asystole())
|
||||
if(!(owner.chem_effects[CE_TOXIN] || (toxin_type in owner.chem_effects)))
|
||||
var/repair_modifier = owner.chem_effects[CE_ORGANREPAIR] || 0.1
|
||||
if(damage < repair_modifier*max_damage)
|
||||
heal_damage(repair_modifier)
|
||||
return TRUE // regeneration is allowed
|
||||
return FALSE // regeneration is prevented
|
||||
|
||||
@@ -47,13 +47,6 @@
|
||||
if(owner.intoxication > 0)
|
||||
owner.adjustToxLoss(0.5 * max(2 - filter_effect, 0))
|
||||
|
||||
// Heal a bit if needed and we're not busy. This allows recovery from low amounts of toxloss.
|
||||
if(!owner.total_radiation && damage > 0)
|
||||
if(damage < min_broken_damage)
|
||||
heal_damage(0.2)
|
||||
if(damage < min_bruised_damage)
|
||||
heal_damage(0.3)
|
||||
|
||||
var/filter_strength = INTOX_FILTER_HEALTHY
|
||||
if(is_bruised())
|
||||
filter_strength = INTOX_FILTER_BRUISED
|
||||
@@ -76,6 +69,13 @@
|
||||
if(is_damaged())
|
||||
owner.adjustToxLoss(owner.chem_effects[toxin_type] * 0.1 * PROCESS_ACCURACY) // as actual organ damage is handled elsewhere
|
||||
|
||||
//We got it covered in Process with more detailed thing
|
||||
/obj/item/organ/internal/liver/handle_regeneration()
|
||||
return
|
||||
if(..())
|
||||
testing("Liver regenerating!")
|
||||
if(!owner.total_radiation && damage > 0)
|
||||
if(damage < min_broken_damage)
|
||||
heal_damage(0.2)
|
||||
if(damage < min_bruised_damage)
|
||||
heal_damage(0.3)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user