diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 8b5e1edd91..b9ec48a1b4 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -432,6 +432,8 @@ GENETICS SCANNER var/datum/reagent/R = GLOB.chemical_reagents_list[blood_typepath] if(R) blood_type = R.name + if(C.integrating_blood) + msg += "[C.integrating_blood] cl of blood is being integrated into their bloodstream\n" if(C.scan_blood_volume() <= (BLOOD_VOLUME_SAFE*C.blood_ratio) && C.scan_blood_volume() > (BLOOD_VOLUME_OKAY*C.blood_ratio)) msg += "LOW blood level [blood_percent] %, [C.scan_blood_volume()] cl, type: [blood_type]\n" else if(C.scan_blood_volume() <= (BLOOD_VOLUME_OKAY*C.blood_ratio)) diff --git a/code/modules/antagonists/abductor/equipment/glands/heal.dm b/code/modules/antagonists/abductor/equipment/glands/heal.dm index e596901a58..5ea8f77d6c 100644 --- a/code/modules/antagonists/abductor/equipment/glands/heal.dm +++ b/code/modules/antagonists/abductor/equipment/glands/heal.dm @@ -53,7 +53,7 @@ replace_blood() return if(owner.blood_volume < BLOOD_VOLUME_OKAY) - owner.integrating_blood = BLOOD_VOLUME_NORMAL + owner.blood_volume = BLOOD_VOLUME_NORMAL to_chat(owner, "You feel your blood pulsing within you.") return @@ -144,7 +144,7 @@ owner.Stun(15) owner.adjustToxLoss(-15, TRUE, TRUE) - owner.integrating_blood = min(BLOOD_VOLUME_NORMAL, owner.blood_volume + 20) + owner.blood_volume = min(BLOOD_VOLUME_NORMAL, owner.blood_volume + 20) if(owner.blood_volume < BLOOD_VOLUME_NORMAL) keep_going = TRUE diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index b4ff8753f5..901c83b1b7 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -691,12 +691,12 @@ if(H.blood_volume < (BLOOD_VOLUME_SAFE*H.blood_ratio)) var/restore_blood = (BLOOD_VOLUME_SAFE*H.blood_ratio) - H.blood_volume if(uses*2 < restore_blood) - H.integrating_blood += uses*2 + H.blood_volume += uses*2 to_chat(user,"You use the last of your blood rites to restore what blood you could!") uses = 0 return ..() else - H.integrating_blood = (BLOOD_VOLUME_SAFE*H.blood_ratio) + H.blood_volume = (BLOOD_VOLUME_SAFE*H.blood_ratio) uses -= round(restore_blood/2) to_chat(user,"Your blood rites have restored [H == user ? "your" : "[H.p_their()]"] blood to safe levels!") var/overall_damage = H.getBruteLoss() + H.getFireLoss() + H.getToxLoss() + H.getOxyLoss() diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index cf1a158fc5..41265c384a 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -39,26 +39,31 @@ return if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood. - //Blood regeneration if there is some space - if(blood_volume < BLOOD_VOLUME_NORMAL && !HAS_TRAIT(src, TRAIT_NOHUNGER)) + if(blood_volume < BLOOD_VOLUME_NORMAL) var/nutrition_ratio = 0 - 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(integrating_blood) //Do we have blood to normalize in our system? + integrating_blood -- + blood_volume ++ + 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) + else + if(integrating_blood) + integrating_blood -- //Effects of bloodloss var/word = pick("dizzy","woozy","faint") switch(blood_volume) @@ -368,7 +373,7 @@ return blood_ratio = 1 -/mob/living/proc/AdjustBloodVol(var/value) +/mob/living/proc/AdjustBloodVol(value) if(blood_ratio == value) return blood_ratio = value diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 024130b3d3..a65f84c7f4 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 = min(H.blood_volume + round(chem.volume, 0.1), BLOOD_VOLUME_MAXIMUM) + H.integrating_blood += round(chem.volume, 0.1)) H.reagents.del_reagent(chem.type) return TRUE return FALSE diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index fb418a1da4..89b3d603ea 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -113,7 +113,7 @@ to_chat(victim, "[H] is draining your blood!") to_chat(H, "You drain some blood!") playsound(H, 'sound/items/drink.ogg', 30, 1, -2) - victim.integrating_blood = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM) + victim.blood_volume = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM) H.blood_volume = clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM) if(!victim.blood_volume) to_chat(H, "You finish off [victim]'s blood supply!") diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 25c93fdaba..3725445023 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -574,7 +574,7 @@ All effects don't start immediately, but rather get worse over time; the rate is if(AmBloodsucker(C)) disgust_bloodsucker(FALSE, 1) //Bloodsuckers get SOME blood from it, for style reasons. if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio)) - C.integrating_blood = min((BLOOD_VOLUME_NORMAL*C.blood_ratio), C.blood_volume + 3) //Bloody Mary quickly restores blood loss. + C.integrating_blood += 3 //Bloody Mary quickly restores blood loss. ..() /datum/reagent/consumable/ethanol/brave_bull diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 436ca1d98f..d5d4e733c4 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -411,7 +411,7 @@ 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 = new_blood_level + extra_regen + M.integrating_blood += extra_regen if(prob(33)) M.adjustBruteLoss(-0.5*REM, 0) M.adjustFireLoss(-0.5*REM, 0) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index d0c08b2326..4bd66d8982 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -48,7 +48,7 @@ var/mob/living/carbon/C = L var/blood_id = C.get_blood_id() if((HAS_TRAIT(C, TRAIT_NOMARROW) || blood_id == /datum/reagent/blood || blood_id == /datum/reagent/blood/jellyblood) && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits)))) - C.integrating_blood = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM * C.blood_ratio) + C.integrating_blood += round(reac_volume, 0.1) // we don't care about bloodtype here, we're just refilling the mob if(reac_volume >= 10 && istype(L) && method != INJECT)