forgot to push some final changes

This commit is contained in:
Timothy Teakettle
2022-06-16 15:37:04 +01:00
parent a8687f0cca
commit 0a61bb3813
3 changed files with 55 additions and 55 deletions
+50 -52
View File
@@ -38,60 +38,58 @@
if(HAS_TRAIT(src, TRAIT_NOMARROW)) //Bloodsuckers don't need to be here.
return
if(HAS_TRAIT(src, TRAIT_SNOWFLAKE_BLOOD_PROCESS)) //slimes regenerate blood in their own way and take damage from not having blood in their own way
return
if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood.
if(integrating_blood > 0)
var/blood_integrated = max(integrating_blood - 1, 0)
var/blood_diff = integrating_blood - blood_integrated
integrating_blood = blood_integrated
if(blood_volume < BLOOD_VOLUME_MAXIMUM)
blood_volume += blood_diff
if(blood_volume < BLOOD_VOLUME_NORMAL)
var/nutrition_ratio = 0
if(!HAS_TRAIT(src, TRAIT_NOHUNGER))
switch(nutrition)
if(0 to NUTRITION_LEVEL_STARVING)
nutrition_ratio = 0.2
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
nutrition_ratio = 0.4
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
nutrition_ratio = 0.6
if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
nutrition_ratio = 0.8
else
nutrition_ratio = 1
if(satiety > 80)
nutrition_ratio *= 1.25
adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
if(!HAS_TRAIT(src, TRAIT_SNOWFLAKE_BLOOD_PROCESS)))
if(integrating_blood > 0)
var/blood_integrated = max(integrating_blood - 1, 0)
var/blood_diff = integrating_blood - blood_integrated
integrating_blood = blood_integrated
if(blood_volume < BLOOD_VOLUME_MAXIMUM)
blood_volume += blood_diff
if(blood_volume < BLOOD_VOLUME_NORMAL)
var/nutrition_ratio = 0
if(!HAS_TRAIT(src, TRAIT_NOHUNGER))
switch(nutrition)
if(0 to NUTRITION_LEVEL_STARVING)
nutrition_ratio = 0.2
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
nutrition_ratio = 0.4
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
nutrition_ratio = 0.6
if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
nutrition_ratio = 0.8
else
nutrition_ratio = 1
if(satiety > 80)
nutrition_ratio *= 1.25
adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
//Effects of bloodloss
if(!HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM)) //Synths are immune to direct consequences of bloodloss, instead suffering penalties to heat exchange.
var/word = pick("dizzy","woozy","faint")
var/blood_effect_volume = blood_volume + integrating_blood
switch(blood_effect_volume)
if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
if(prob(10))
to_chat(src, "<span class='warning'>You feel terribly bloated.</span>")
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(prob(5))
to_chat(src, "<span class='warning'>You feel [word].</span>")
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1))
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
if(prob(5))
blur_eyes(6)
to_chat(src, "<span class='warning'>You feel very [word].</span>")
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
adjustOxyLoss(5)
if(prob(15))
Unconscious(rand(20,60))
to_chat(src, "<span class='warning'>You feel extremely [word].</span>")
if(-INFINITY to BLOOD_VOLUME_SURVIVE)
if(!HAS_TRAIT(src, TRAIT_NODEATH))
death()
//Effects of bloodloss
if(!HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM)) //Synths are immune to direct consequences of bloodloss, instead suffering penalties to heat exchange.
var/word = pick("dizzy","woozy","faint")
var/blood_effect_volume = blood_volume + integrating_blood
switch(blood_effect_volume)
if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
if(prob(10))
to_chat(src, "<span class='warning'>You feel terribly bloated.</span>")
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(prob(5))
to_chat(src, "<span class='warning'>You feel [word].</span>")
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1))
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
if(prob(5))
blur_eyes(6)
to_chat(src, "<span class='warning'>You feel very [word].</span>")
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
adjustOxyLoss(5)
if(prob(15))
Unconscious(rand(20,60))
to_chat(src, "<span class='warning'>You feel extremely [word].</span>")
if(-INFINITY to BLOOD_VOLUME_SURVIVE)
if(!HAS_TRAIT(src, TRAIT_NODEATH))
death()
var/temp_bleed = 0
//Bleeding out
@@ -90,10 +90,12 @@
/mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT)
if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER) && toxins_type != TOX_SYSCORRUPT) //damage becomes healing and healing becomes damage
amount = -amount
// don't allow toxinlover to push blood levels past BLOOD_VOLUME_MAXIMUM, but also don't set it back down to this if it's higher from something else
var/blood_cap = blood_volume > BLOOD_VOLUME_MAXIMUM ? blood_volume : BLOOD_VOLUME_MAXIMUM
if(amount > 0)
blood_volume -= 3 * amount //5x was too much, this is punishing enough.
blood_volume blood_volume - min((3 * amount), blood_cap) //5x was too much, this is punishing enough.
else
blood_volume -= amount
blood_volume = min(blood_volume - amount), blood_cap)
return ..()
/mob/living/carbon/getStaminaLoss()
@@ -59,7 +59,7 @@
if(H.stat == DEAD) //can't farm slime jelly from a dead slime/jelly person indefinitely
return
if(!H.blood_volume)
if(H.blood_volume <= 0)
H.blood_volume += 2.5 * delta_time
H.adjustBruteLoss(2.5 * delta_time)
to_chat(H, span_danger("You feel empty!"))