Merge pull request #8550 from VOREStation/upstream-merge-7377

[MIRROR] Species Vars Extension Pt3: Blood!
This commit is contained in:
Novacat
2020-07-31 17:19:01 -04:00
committed by GitHub
9 changed files with 30 additions and 21 deletions

View File

@@ -338,14 +338,14 @@
if(!heart)
return TRUE
var/blood_volume = round((H.vessel.get_reagent_amount("blood")/H.species.blood_volume)*100)
var/blood_volume = H.vessel.get_reagent_amount("blood")
if(!heart || heart.is_broken())
blood_volume *= 0.3
else if(heart.is_bruised())
blood_volume *= 0.7
else if(heart.damage > 1)
blood_volume *= 0.8
return blood_volume < BLOOD_VOLUME_SURVIVE
return blood_volume < H.species.blood_volume*H.species.blood_level_fatal
/obj/item/weapon/shockpaddles/proc/check_charge(var/charge_amt)
return 0

View File

@@ -272,9 +272,11 @@ HALOGEN COUNTER - Radcount on mobs
var/blood_volume = H.vessel.get_reagent_amount("blood")
var/blood_percent = round((blood_volume / H.species.blood_volume)*100)
var/blood_type = H.dna.b_type
if(blood_percent <= BLOOD_VOLUME_BAD)
if(blood_volume <= H.species.blood_volume*H.species.blood_level_danger)
dat += "<span class='danger'><i>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl. Type: [blood_type]</i></span><br>"
else if(blood_percent <= BLOOD_VOLUME_SAFE)
else if(blood_volume <= H.species.blood_volume*H.species.blood_level_warning)
dat += "<span class='danger'><i>Warning: Blood Level VERY LOW: [blood_percent]% [blood_volume]cl. Type: [blood_type]</i></span><br>"
else if(blood_volume <= H.species.blood_volume*H.species.blood_level_safe)
dat += "<span class='danger'>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span><br>"
else
dat += "<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span><br>"

View File

@@ -423,7 +423,7 @@
return
// If the human is losing too much blood, beep.
if(((H.vessel.get_reagent_amount("blood")/H.species.blood_volume)*100) < BLOOD_VOLUME_SAFE)
if(H.vessel.get_reagent_amount("blood") < H.species.blood_volume*H.species.blood_level_safe)
visible_message("\The [src] beeps loudly.")
var/datum/reagent/B = H.take_blood(beaker,amount)