From 28205f9dce7337fc58caa7bbf89fe054ab02ffc7 Mon Sep 17 00:00:00 2001 From: Artur Date: Wed, 5 May 2021 17:41:37 +0300 Subject: [PATCH] More fixes to make it work --- .../antagonists/bloodsucker/bloodsucker_life.dm | 1 + code/modules/mob/living/blood.dm | 10 ++++++++-- code/modules/mob/living/carbon/human/species.dm | 2 +- .../reagents/chemistry/reagents/medicine_reagents.dm | 7 ++----- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_life.dm b/code/modules/antagonists/bloodsucker/bloodsucker_life.dm index 3e358cd795..29e64a4913 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_life.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_life.dm @@ -89,6 +89,7 @@ owner.current.adjustStaminaLoss(-1.5 + (actual_regen * -7) * mult, 0) // Humans lose stamina damage really quickly. Vamps should heal more. owner.current.adjustCloneLoss(-0.1 * (actual_regen * 2) * mult, 0) owner.current.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1 * (actual_regen * 4) * mult) + owner.current.integrating_blood = 0 // No Bleeding /*if(ishuman(owner.current)) //NOTE Current bleeding is horrible, not to count the amount of blood ballistics delete. var/mob/living/carbon/human/H = owner.current diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 41265c384a..5e25888851 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -39,12 +39,13 @@ return if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood. + integrating_blood -- //Blood regeneration if there is some space if(blood_volume < BLOOD_VOLUME_NORMAL) var/nutrition_ratio = 0 if(integrating_blood) //Do we have blood to normalize in our system? - integrating_blood -- blood_volume ++ + //vomit(blood = TRUE) //Too much, just too much if(!HAS_TRAIT(src, TRAIT_NOHUNGER)) switch(nutrition) if(0 to NUTRITION_LEVEL_STARVING) @@ -64,9 +65,14 @@ else if(integrating_blood) integrating_blood -- + if(integrating_blood > BLOOD_VOLUME_NORMAL) //Let's not allow too much + integrating_blood = BLOOD_VOLUME_NORMAL + if(integrating_blood > blood_volume) + integrating_blood = BLOOD_VOLUME_NORMAL - //Effects of bloodloss var/word = pick("dizzy","woozy","faint") - switch(blood_volume) + 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, "You feel terribly bloated.") diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index a65f84c7f4..7e47efdcad 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1365,7 +1365,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) /datum/species/proc/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H) if(chem.type == exotic_blood && !istype(exotic_blood, /datum/reagent/blood)) - H.integrating_blood += round(chem.volume, 0.1)) + H.integrating_blood += round(chem.volume, 0.1) H.reagents.del_reagent(chem.type) return TRUE return FALSE diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index d5d4e733c4..084c81f7d3 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -405,13 +405,10 @@ if((HAS_TRAIT(M, TRAIT_NOMARROW))) return if(last_added) - M.blood_volume -= last_added + M.integrating_blood -= min(M.integrating_blood, last_added) last_added = 0 if(M.blood_volume < maximum_reachable) //Can only up to double your effective blood level. - var/amount_to_add = min(M.blood_volume, volume*5) - var/new_blood_level = min(M.blood_volume + amount_to_add, maximum_reachable) - last_added = new_blood_level - M.blood_volume - M.integrating_blood += extra_regen + last_added = volume * 5 if(prob(33)) M.adjustBruteLoss(-0.5*REM, 0) M.adjustFireLoss(-0.5*REM, 0)