Skip to content

Commit

Permalink
changes to oxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
BeagleGaming1 committed Aug 9, 2023
1 parent 0db0582 commit 9431316
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,39 @@
b_volume *= Clamp(100 - (2 * heart.damage), 30, 100) / 100

//Effects of bloodloss
if(b_volume <= BLOOD_VOLUME_SAFE)
/// The blood volume turned into a %, with BLOOD_VOLUME_NORMAL being 100%
var/blood_percentage = b_volume / (BLOOD_VOLUME_NORMAL / 100)
/// How much oxyloss will there be from the next time blood processes
var/additional_oxyloss = (100 - blood_percentage) / 5
/// The limit of the oxyloss gained, ignoring oxyloss from the switch statement
var/maximum_oxyloss = Clamp((100 - blood_percentage) / 2, oxyloss, 100)
if(oxyloss < maximum_oxyloss)
oxyloss += max(additional_oxyloss, 0)

//Bloodloss effects on nutrition
if(nutrition >= 300)
nutrition -= 10
else if(nutrition >= 200)
nutrition -= 3

switch(b_volume)
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(prob(1))
var/word = pick("dizzy","woozy","faint")
to_chat(src, SPAN_DANGER("You feel [word]."))
if(oxyloss < 20)
oxyloss += 3
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
if(eye_blurry < 50)
AdjustEyeBlur(6)
if(oxyloss < 50)
oxyloss += 10
oxyloss += 2
oxyloss += 3
if(prob(15))
apply_effect(rand(1,3), PARALYZE)
var/word = pick("dizzy","woozy","faint")
to_chat(src, SPAN_DANGER("You feel very [word]."))
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
if(eye_blurry < 50)
AdjustEyeBlur(6)
oxyloss += 5
oxyloss += 8
toxloss += 3
if(prob(15))
apply_effect(rand(1,3), PARALYZE)
Expand All @@ -62,13 +74,6 @@
if(0 to BLOOD_VOLUME_SURVIVE)
death(create_cause_data("blood loss"))

// Without enough blood you slowly go hungry.
if(blood_volume < BLOOD_VOLUME_SAFE)
if(nutrition >= 300)
nutrition -= 10
else if(nutrition >= 200)
nutrition -= 3

// Xeno blood regeneration
/mob/living/carbon/xenomorph/handle_blood()
if(stat != DEAD) //Only living xenos regenerate blood
Expand Down

0 comments on commit 9431316

Please sign in to comment.