diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 66f5d2c713f..809a5ef8ade 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -293,6 +293,7 @@ // Replace completely missing limbs. for(var/limb_type in src.species.has_limbs) var/obj/item/organ/external/E = src.organs_by_name[limb_type] + if(E && E.disfigured) E.disfigured = 0 if(E && (E.is_stump() || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD|ORGAN_MUTATED)))) @@ -305,6 +306,10 @@ var/obj/item/organ/O = new limb_path(src) organ_data["descriptor"] = O.name to_chat(src, "You feel a slithering sensation as your [O.name] reform.") + + var/agony_to_apply = round(0.66 * O.max_damage) // 66% of the limb's health is converted into pain. + src.apply_damage(agony_to_apply, HALLOSS) + update_icons_body() active_regen = FALSE else diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index 1a24ad9e1b5..ceed12ab417 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -153,7 +153,11 @@ var/datum/species/shapeshifter/promethean/prometheans H.gib() /datum/species/shapeshifter/promethean/handle_environment_special(var/mob/living/carbon/human/H) -/* VOREStation Removal - Too crazy with our uncapped hunger and slowdown stuff. + var/regen_brute = 1 + var/regen_burn = 1 + var/regen_tox = 1 + var/regen_oxy = 1 + var/turf/T = H.loc if(istype(T)) var/obj/effect/decal/cleanable/C = locate() in T @@ -162,33 +166,53 @@ var/datum/species/shapeshifter/promethean/prometheans if (istype(T, /turf/simulated)) var/turf/simulated/S = T S.dirt = 0 + H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped + + T = get_turf(H) // Swap over to an actual turf, because we need to get the pressure. + if(istype(T)) // Make sure it exists, and is a turf again. + var/datum/gas_mixture/environment = T.return_air() + var/pressure = environment.return_pressure() + var/affecting_pressure = H.calculate_affecting_pressure(pressure) + if(affecting_pressure <= hazard_low_pressure) // Dangerous low pressure stops the regeneration of physical wounds. Body is focusing on keeping them intact rather than sealing. + regen_brute = 0 + regen_burn = 0 - H.nutrition = min(500, max(0, H.nutrition + rand(15, 30))) -VOREStation Removal End */ // Heal remaining damage. if(H.fire_stacks >= 0) if(H.getBruteLoss() || H.getFireLoss() || H.getOxyLoss() || H.getToxLoss()) var/nutrition_cost = 0 - var/nutrition_debt = H.getBruteLoss() + var/nutrition_debt = 0 var/starve_mod = 1 if(H.nutrition <= 25) starve_mod = 0.75 - H.adjustBruteLoss(-heal_rate * starve_mod) - nutrition_cost += nutrition_debt - H.getBruteLoss() - nutrition_debt = H.getFireLoss() - H.adjustFireLoss(-heal_rate * starve_mod) - nutrition_cost += nutrition_debt - H.getFireLoss() + if(regen_brute) + nutrition_debt = H.getBruteLoss() + H.adjustBruteLoss(-heal_rate * starve_mod) + nutrition_cost += nutrition_debt - H.getBruteLoss() - nutrition_debt = H.getOxyLoss() - H.adjustOxyLoss(-heal_rate * starve_mod) - nutrition_cost += nutrition_debt - H.getOxyLoss() + if(regen_burn) + nutrition_debt = H.getFireLoss() + H.adjustFireLoss(-heal_rate * starve_mod) + nutrition_cost += nutrition_debt - H.getFireLoss() - nutrition_debt = H.getToxLoss() - H.adjustToxLoss(-heal_rate * starve_mod) - nutrition_cost += nutrition_debt - H.getToxLoss() - H.nutrition -= (2 * nutrition_cost) //Costs Nutrition when damage is being repaired, corresponding to the amount of damage being repaired. + if(regen_oxy) + nutrition_debt = H.getOxyLoss() + H.adjustOxyLoss(-heal_rate * starve_mod) + nutrition_cost += nutrition_debt - H.getOxyLoss() + + if(regen_tox) + nutrition_debt = H.getToxLoss() + H.adjustToxLoss(-heal_rate * starve_mod) + nutrition_cost += nutrition_debt - H.getToxLoss() + + H.nutrition -= (3 * nutrition_cost) //Costs Nutrition when damage is being repaired, corresponding to the amount of damage being repaired. H.nutrition = max(0, H.nutrition) //Ensure it's not below 0. + + var/agony_to_apply = ((1 / starve_mod) * nutrition_cost) //Regenerating damage causes minor pain over time. Small injures will be no issue, large ones will cause problems. + if((H.getHalLoss() + agony_to_apply) <= 70) // Don't permalock, but make it far easier to knock them down. + H.apply_damage(agony_to_apply, HALLOSS) + //else//VOREStation Removal //H.adjustToxLoss(2*heal_rate) // Doubled because 0.5 is miniscule, and fire_stacks are capped in both directions