add minHealth which controls when carbons die so we can set it in species (#6938)

This commit is contained in:
Timothy Teakettle
2024-12-31 14:35:45 +01:00
committed by GitHub
parent 15240f41f5
commit faa992ac89
22 changed files with 56 additions and 27 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
//Burn damage can cause fluid loss due to blistering and cook-off
if((damage > 5 || damage + burn_dam >= 15) && type == WOUND_TYPE_BURN && (robotic < ORGAN_ROBOT) && !(species.species_flags & NO_BLOOD))
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - config_legacy.health_threshold_dead)) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal)
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - owner.getMinHealth())) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal)
owner.remove_blood(fluid_loss)
// first check whether we can widen an existing wound