Gives internal organs passive regeneration (#18470)

* Organ heal

* Changes

* Use the config
This commit is contained in:
Guti
2025-09-15 00:44:33 +02:00
committed by GitHub
parent 27879ed982
commit b078ff772d
@@ -5,12 +5,26 @@
var/dead_icon // Icon to use when the organ has died.
var/supply_conversion_value = 0
var/healing_factor = 0.005 // How much this organ will heal passively
/obj/item/organ/internal/Initialize(mapload, internal)
. = ..()
if(supply_conversion_value)
AddElement(/datum/element/sellable/organ)
/obj/item/organ/internal/process()
..()
passive_heal()
// Heals the internal organ passively as long as it's under the bruised threshold
// Not a lot of MATH just yet, but nutrition or other factors could be taken into account
/obj/item/organ/internal/proc/passive_heal()
if(!is_bruised() && !is_broken())
return
var/heal_amt = healing_factor * CONFIG_GET(number/organ_regeneration_multiplier)
damage = max(damage - heal_amt, 0)
/obj/item/organ/internal/die()
..()
if((status & ORGAN_DEAD) && dead_icon)