From 24cbe67f27389ecc3de3c822ebaa40b7f1ead3cc Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:18:19 -0700 Subject: [PATCH 01/30] optimizations, unnecessary crap, undocumented ipc change --- code/__DEFINES/components.dm | 2 -- code/_globalvars/lists/mobs.dm | 12 +++--------- code/game/atoms.dm | 5 ++--- code/game/machinery/suit_storage_unit.dm | 2 +- code/modules/surgery/organs/heart.dm | 9 --------- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index a4ee7cc3cc..be29b70f6a 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -275,8 +275,6 @@ #define COMSIG_TURF_MAKE_DRY "make_turf_try" //(max_strength, immediate, duration_decrease = INFINITY): Returns bool. #define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength) -//Blood color -#define COMSIG_BLOOD_COLOR "blood_DNA_to_color" //RGB blood stuff //Food #define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder) diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index ae385339be..ffad931cd8 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -91,13 +91,7 @@ GLOBAL_LIST_INIT(all_types_bloods,list( "BUG" )) -GLOBAL_LIST_INIT(blood_types, list( - "blood", - "jellyblood" +GLOBAL_LIST_INIT(blood_reagent_types, list( + /datum/reagent/blood, + /datum/reagent/blood/jellyblood )) - -GLOBAL_LIST_INIT(blood_id_types, list( - "blood" = /datum/reagent/blood, - "jellyblood" = /datum/reagent/blood/jellyblood - )) - diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 1f62be8a24..465ac2e2a3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -505,9 +505,8 @@ return final_rgb /atom/proc/clean_blood() - if(islist(blood_DNA)) - blood_DNA = null - return TRUE + . = blood_DNA? TRUE : FALSE + blood_dna = null /atom/proc/wash_cream() return TRUE diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 670ce91674..42d38d2a04 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -266,7 +266,7 @@ for(var/atom/movable/AM in things_to_clear) //Scorches away blood and forensic evidence, although the SSU itself is unaffected SEND_SIGNAL(AM, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRONG) AM.clean_blood() - AM.fingerprints = list() + AM.fingerprints = null var/datum/component/radioactive/contamination = AM.GetComponent(/datum/component/radioactive) if(contamination) qdel(contamination) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 51784bdc61..2d70f44e06 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -220,21 +220,12 @@ obj/item/organ/heart/cybernetic/upgraded/on_life() addtimer(VARSET_CALLBACK(src, dose_available, TRUE), 5 MINUTES) ramount = 0 - - /obj/item/organ/heart/ipc name = "IPC heart" desc = "An electronic pump that regulates hydraulic functions, they have an auto-restart after EMPs." icon_state = "heart-c" organ_flags = ORGAN_SYNTHETIC -/obj/item/organ/heart/ipc/emp_act() - . = ..() - if(. & EMP_PROTECT_SELF) - return - Stop() - addtimer(CALLBACK(src, .proc/Restart), 10) - /obj/item/organ/heart/freedom name = "heart of freedom" desc = "This heart pumps with the passion to give... something freedom." From 78b901f66f962a465f0bd9296e1b455bbf34969b Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:18:51 -0700 Subject: [PATCH 02/30] spacing is a pet peeve --- code/modules/surgery/bodyparts/helpers.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index 51866b6719..21bc970c53 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -17,7 +17,6 @@ return L return FALSE - /mob/proc/has_left_hand(check_disabled = TRUE) return TRUE @@ -29,7 +28,7 @@ return FALSE /mob/living/carbon/alien/larva/has_left_hand() - return 1 + return TRUE /mob/proc/has_right_hand(check_disabled = TRUE) @@ -43,9 +42,7 @@ return FALSE /mob/living/carbon/alien/larva/has_right_hand() - return 1 - - + return TRUE /mob/proc/has_left_leg() return TRUE From d86af199f5b8b42aa37c52687d2f68973b8f708a Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:22:59 -0700 Subject: [PATCH 03/30] initialize --- code/modules/surgery/bodyparts/helpers.dm | 1 - .../modules/reagents/reagents/cit_reagents.dm | 22 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index 21bc970c53..eed8f62e10 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -64,7 +64,6 @@ else return FALSE - //Limb numbers /mob/proc/get_num_arms(check_disabled = TRUE) return 2 diff --git a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm index 32474263c4..90fca7f1a5 100644 --- a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm +++ b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm @@ -1,7 +1,7 @@ //body bluids /datum/reagent/consumable/semen name = "Semen" - description = "Sperm from some animal. I bet you'll drink this out of a bucket someday." + description = "Sperm from some animal. Useless for anything but insemination, really." taste_description = "something salty" taste_mult = 2 //Not very overpowering flavor data = list("donor"=null,"viruses"=null,"donor_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null) @@ -32,15 +32,15 @@ icon_state = "semen1" random_icon_states = list("semen1", "semen2", "semen3", "semen4") -/obj/effect/decal/cleanable/semen/New() - ..() - dir = pick(1,2,4,8) +/obj/effect/decal/cleanable/semen/Initialize(mapload) + . = ..() + dir = GLOB.cardinals add_blood_DNA(list("Non-human DNA" = "A+")) /obj/effect/decal/cleanable/semen/replace_decal(obj/effect/decal/cleanable/semen/S) if(S.blood_DNA) - blood_DNA |= S.blood_DNA.Copy() - ..() + blood_DNA |= S.blood_DNA + return ..() /datum/reagent/consumable/femcum name = "Female Ejaculate" @@ -65,15 +65,15 @@ blood_state = null bloodiness = null -/obj/effect/decal/cleanable/femcum/New() - ..() - dir = pick(1,2,4,8) +/obj/effect/decal/cleanable/semen/Initialize(mapload) + . = ..() + dir = GLOB.cardinals add_blood_DNA(list("Non-human DNA" = "A+")) /obj/effect/decal/cleanable/femcum/replace_decal(obj/effect/decal/cleanable/femcum/F) if(F.blood_DNA) - blood_DNA |= F.blood_DNA.Copy() - ..() + blood_DNA |= F.blood_DNA + return ..() /datum/reagent/consumable/femcum/reaction_turf(turf/T, reac_volume) if(!istype(T)) From ea65dfa631441d46ca5f1ac510b1910ddbca3232 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:32:55 -0700 Subject: [PATCH 04/30] iron undocumneted reagent change --- .../reagents/chemistry/reagents/other_reagents.dm | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index ccc966e7e4..b622eed605 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1051,14 +1051,13 @@ reagent_state = SOLID taste_description = "iron" pH = 6 - overdose_threshold = 30 color = "#c2391d" /datum/reagent/iron/on_mob_life(mob/living/carbon/C) if((HAS_TRAIT(C, TRAIT_NOMARROW))) return if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio)) - C.blood_volume += 0.01 //we'll have synthetics from medbay. + C.blood_volume += 0.5 ..() /datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, reac_volume) @@ -1067,17 +1066,6 @@ M.reagents.add_reagent(/datum/reagent/toxin, reac_volume) ..() -/datum/reagent/iron/overdose_start(mob/living/M) - to_chat(M, "You start feeling your guts twisting painfully!") - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/overdose, name) - -/datum/reagent/iron/overdose_process(mob/living/carbon/C) - if(prob(20)) - var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER) - if (istype(L)) - C.applyLiverDamage(2) //mild until the fabled med rework comes out. the organ damage galore - ..() - /datum/reagent/gold name = "Gold" description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." From 45516f27a33cd4dea13fbff099ebd60c315c8c2d Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:36:22 -0700 Subject: [PATCH 06/30] optimize lazylist length check --- code/modules/mob/living/simple_animal/bot/mulebot.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 48cf93210e..dba51ea800 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -477,7 +477,7 @@ if(isturf(next)) if(bloodiness) var/obj/effect/decal/cleanable/blood/tracks/B = new(loc) - if(blood_DNA && blood_DNA.len) + if(length(blood_DNA)) B.blood_DNA |= blood_DNA.Copy() var/newdir = get_dir(next, loc) if(newdir == dir) From 32e435502435d3bca65dcd70d96763c30b03d40c Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:44:37 -0700 Subject: [PATCH 07/30] lists are references use copy --- code/game/atoms.dm | 2 +- code/game/objects/items/stacks/stack.dm | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 465ac2e2a3..6ff286b5c3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -506,7 +506,7 @@ /atom/proc/clean_blood() . = blood_DNA? TRUE : FALSE - blood_dna = null + blood_DNA = null /atom/proc/wash_cream() return TRUE diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 324b40ac7f..1d038b008c 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -399,11 +399,14 @@ . = ..() /obj/item/stack/proc/copy_evidences(obj/item/stack/from) - blood_DNA = from.blood_DNA - fingerprints = from.fingerprints - fingerprintshidden = from.fingerprintshidden - fingerprintslast = from.fingerprintslast - //TODO bloody overlay + if(from.blood_DNA) + blood_DNA = from.blood_DNA.Copy() + if(from.fingerprints) + fingerprints = from.fingerprints.Copy() + if(from.fingerprintshidden) + fingerprintshidden = from.fingerprintshidden.Copy() + if(from.fingerprintslast) + fingerprintslast = from.fingerprintslast.Copy() /obj/item/stack/microwave_act(obj/machinery/microwave/M) if(istype(M) && M.dirty < 100) From 75e1108f3349b9f33cbc125d129ff6d43b7f6bbc Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:45:43 -0700 Subject: [PATCH 08/30] optizmize --- code/game/objects/items/storage/toolbox.dm | 2 +- code/game/objects/items/twohanded.dm | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index 880b714f76..ca0b03b08d 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -35,7 +35,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons) /obj/item/storage/toolbox/update_icon() ..() cut_overlays() - if(blood_DNA && blood_DNA.len) + if(length(blood_DNA)) add_blood_overlay() if(has_latches) var/icon/I = icon('icons/obj/storage.dmi', latches) diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 28a6fd66ee..38872db256 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -347,7 +347,6 @@ icon_state = "dualsaber[item_color][wielded]" else icon_state = "dualsaber0" - clean_blood() /obj/item/twohanded/dualsaber/attack(mob/target, mob/living/carbon/human/user) From 102252fb0270bb04cfc877319e88469c288bf41f Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:48:04 -0700 Subject: [PATCH 09/30] Undocumented change: toxloss blood penalty nerf. Sorry, love you slimefolks but put this back in another PR if you want. --- code/modules/mob/living/carbon/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 5bffc4e276..8da12aefeb 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -87,7 +87,7 @@ if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER)) //damage becomes healing and healing becomes damage amount = -amount if(amount > 0) - blood_volume -= 3*amount // x5 is too much, x3 should be still penalizing enough. + blood_volume -= 5 * amount else blood_volume -= amount return ..() From 1877f6d0f5b6513bb0d7d6353839df0ab502e06f Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:48:38 -0700 Subject: [PATCH 10/30] unused list --- code/modules/mob/living/carbon/carbon_defines.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 11c4d7dbef..689ab56842 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -49,7 +49,6 @@ //Gets filled up in create_bodyparts() var/list/hand_bodyparts = list() //a collection of arms (or actually whatever the fug /bodyparts you monsters use to wreck my systems) - var/list/leg_bodyparts = list() var/icon_render_key = "" var/static/list/limb_icon_cache = list() From b33e6cd79e59a6d78079149e50ef83885c807761 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:00:03 -0700 Subject: [PATCH 12/30] scanner fix --- code/game/objects/items/devices/scanners.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 57c5a22de0..bd080fe3e7 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -407,19 +407,19 @@ SLIME SCANNER // Blood Level if(M.has_dna()) var/mob/living/carbon/C = M - var/blood_id = C.get_blood_id() + var/blood_typepath = C.get_blood_id() if(blood_id) if(ishuman(C)) if(H.bleed_rate) msg += "Subject is bleeding!\n" var/blood_percent = round((C.scan_blood_volume() / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100) var/blood_type = C.dna.blood_type - if(blood_id != ("blood" || "jellyblood"))//special blood substance - var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id] + if(blood_typepath != /datum/reagent/blood && blood_typepath != /datum/reagent/blood/jellyblood) + var/datum/reagent/R = GLOB.chemical_reagents_list[blood_typepath] if(R) blood_type = R.name else - blood_type = blood_id + blood_type = blood_typepath 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)) From 798af43cae73fbe3b41acf27594c7b6bbf814c9b Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:01:52 -0700 Subject: [PATCH 13/30] reverts accidental/undocumented voodoo doll buff --- code/modules/antagonists/wizard/equipment/artefact.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index e6bb3f1295..492da73e66 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -246,7 +246,7 @@ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' var/mob/living/carbon/human/target = null - var/list/mob/living/carbon/human/possible = list() + var/list/mob/living/carbon/human/possible var/obj/item/voodoo_link = null var/cooldown_time = 30 //3s var/cooldown = 0 @@ -284,7 +284,7 @@ user.unset_machine() /obj/item/voodoo/attack_self(mob/user) - if(!target && possible.len) + if(!target && length(possible)) target = input(user, "Select your victim!", "Voodoo") as null|anything in possible return @@ -324,12 +324,12 @@ cooldown = world.time + cooldown_time /obj/item/voodoo/proc/update_targets() - LAZYINITLIST(possible) + possible = null if(!voodoo_link) return for(var/mob/living/carbon/human/H in GLOB.alive_mob_list) if(md5(H.dna.uni_identity) in voodoo_link.fingerprints) - possible |= H + LAZYOR(possible, H) /obj/item/voodoo/proc/GiveHint(mob/victim,force=0) if(prob(50) || force) From fec5cf13629465cfa149fb8b998001ea0fc16634 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:08:36 -0700 Subject: [PATCH 14/30] optimizations --- code/modules/mob/living/blood.dm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index ade8158e02..7c8226466f 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -29,13 +29,10 @@ // Takes care blood loss and regeneration /mob/living/carbon/human/handle_blood() - if(NOBLOOD in dna.species.species_traits) + if((NOBLOOD in dna.species.species_traits) || (bleed_rate < 0)) bleed_rate = 0 return - if(bleed_rate <= 0) - bleed_rate = 0 - if(HAS_TRAIT(src, TRAIT_NOMARROW)) //Bloodsuckers don't need to be here. return @@ -94,12 +91,12 @@ //We want an accurate reading of .len listclearnulls(BP.embedded_objects) - temp_bleed += 0.5*BP.embedded_objects.len + temp_bleed += 0.5 * BP.embedded_objects.len if(brutedamage >= 20) temp_bleed += (brutedamage * 0.013) - bleed_rate = max(bleed_rate - 0.50, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases + bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases if(bleed_rate && !bleedsuppress && !(HAS_TRAIT(src, TRAIT_FAKEDEATH))) bleed(bleed_rate) @@ -289,8 +286,7 @@ drop.update_icon() return else - temp_blood_DNA = list() - temp_blood_DNA |= drop.blood_DNA.Copy() //we transfer the dna from the drip to the splatter + temp_blood_DNA = drop.blood_DNA.Copy() //transfer dna from drip to splatter. qdel(drop)//the drip is replaced by a bigger splatter else drop = new(T, get_static_viruses()) From 4376434e01c5187997e1abab5107227b24c98c76 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:31:05 -0700 Subject: [PATCH 15/30] woops --- code/game/objects/items/devices/scanners.dm | 2 +- code/game/objects/items/stacks/stack.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index bd080fe3e7..7fc05eb3f7 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -408,7 +408,7 @@ SLIME SCANNER if(M.has_dna()) var/mob/living/carbon/C = M var/blood_typepath = C.get_blood_id() - if(blood_id) + if(blood_typepath) if(ishuman(C)) if(H.bleed_rate) msg += "Subject is bleeding!\n" diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 1d038b008c..36c4992e8f 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -406,7 +406,7 @@ if(from.fingerprintshidden) fingerprintshidden = from.fingerprintshidden.Copy() if(from.fingerprintslast) - fingerprintslast = from.fingerprintslast.Copy() + fingerprintslast = from.fingerprintslast /obj/item/stack/microwave_act(obj/machinery/microwave/M) if(istype(M) && M.dirty < 100) From 87e7d8ead0f44cb49307d338c340e02181d04286 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:44:40 -0700 Subject: [PATCH 16/30] revert cleanable/blood amount per decal oh yeah this is why cults get all that EXTRA BLOOD. --- code/game/objects/effects/decals/cleanable/humans.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index d42d7d6b88..ab0d1caca4 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -5,12 +5,12 @@ icon_state = "floor1" random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7") blood_state = BLOOD_STATE_BLOOD - bloodiness = MAX_SHOE_BLOODINESS + bloodiness = BLOOD_AMOUNT_PER_DECAL color = BLOOD_COLOR_HUMAN //default so we don't have white splotches everywhere. /obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C) if (C.blood_DNA) - blood_DNA |= C.blood_DNA.Copy() + blood_DNA |= C.blood_DNA update_icon() ..() From 8a5246c5d66bb280a80992f0df21bcc4e9243853 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:45:23 -0700 Subject: [PATCH 17/30] Reverts gibs being bloody. At all. It already makes splatters stop making blood. --- code/game/objects/effects/decals/cleanable/gibs.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/effects/decals/cleanable/gibs.dm b/code/game/objects/effects/decals/cleanable/gibs.dm index 9680dc2034..aec88c8e09 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -5,6 +5,7 @@ layer = LOW_OBJ_LAYER random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6") mergeable_decal = FALSE + bloodiness = 0 //This isn't supposed to be bloody. var/body_colors = "#e3ba84" //a default color just in case. var/gibs_reagent_id = /datum/reagent/liquidgibs var/gibs_bloodtype = "A+" From b9274c63d02e171b31ee222f371f8b2b15ff879f Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:50:28 -0700 Subject: [PATCH 18/30] define usage --- code/game/objects/effects/decals/cleanable/gibs.dm | 1 - code/modules/antagonists/cult/blood_magic.dm | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/objects/effects/decals/cleanable/gibs.dm b/code/game/objects/effects/decals/cleanable/gibs.dm index aec88c8e09..f8c59f0f2e 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -20,7 +20,6 @@ add_blood_DNA(list("Non-human DNA" = gibs_bloodtype, diseases)) update_icon() - /obj/effect/decal/cleanable/blood/gibs/update_icon() add_atom_colour(blood_DNA_to_color(), FIXED_COLOUR_PRIORITY) cut_overlays() diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 794010d9c0..1bb1b8533a 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -753,7 +753,7 @@ var/turf/T = get_turf(target) if(T) for(var/obj/effect/decal/cleanable/blood/B in view(T, 2)) - if(B.blood_state == "blood") + if(B.blood_state == BLOOD_STATE_BLOOD) if(B.bloodiness == 100) //Bonus for "pristine" bloodpools, also to prevent cheese with footprint spam temp += 30 else From ad0c5d7d04ccc6d4d4d34ea258f13b9d5b643756 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 23:00:30 -0700 Subject: [PATCH 19/30] (probably) FIXES INFINITE STREAKING --- .../objects/effects/decals/cleanable/aliens.dm | 16 +++++++++++----- .../objects/effects/decals/cleanable/gibs.dm | 14 +++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/code/game/objects/effects/decals/cleanable/aliens.dm b/code/game/objects/effects/decals/cleanable/aliens.dm index 748b8c9453..3afc0ef671 100644 --- a/code/game/objects/effects/decals/cleanable/aliens.dm +++ b/code/game/objects/effects/decals/cleanable/aliens.dm @@ -29,13 +29,19 @@ var/list/diseases = list() SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases) var/direction = pick(directions) - for(var/i in 0 to pick(0, 200; 1, 150; 2, 50)) - sleep(2) - if(i > 0) + var/dist = 0 + if(prob(50)) //yes this and the one below are different for a reason. + if(prob(25)) + dist = 2 + else + dist = 1 + if(dist) + for(var/i in 1 to dist) + sleep(2) var/obj/effect/decal/cleanable/blood/splatter/xeno/splat = new /obj/effect/decal/cleanable/blood/splatter/xeno(loc, diseases) splat.transfer_blood_dna(blood_DNA, diseases) - if(!step_to(src, get_step(src, direction), 0)) - break + if(!step_to(src, get_step(src, direction), 0)) + break /obj/effect/decal/cleanable/blood/gibs/xeno/up random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1") diff --git a/code/game/objects/effects/decals/cleanable/gibs.dm b/code/game/objects/effects/decals/cleanable/gibs.dm index f8c59f0f2e..b5cb357561 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -44,13 +44,17 @@ var/list/diseases = list() SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases) var/direction = pick(directions) - for(var/i in 0 to pick(0, 200; 1, 150; 2, 50)) - sleep(2) - if(i > 0) + if(prob(50)) //yes this and the one below are different for a reason. + if(prob(25)) + dist = 2 + else + dist = 1 + if(dist) + for(var/i in 1 to dist) var/obj/effect/decal/cleanable/blood/splatter/splat = new /obj/effect/decal/cleanable/blood/splatter(loc, diseases) splat.transfer_blood_dna(blood_DNA, diseases) - if(!step_to(src, get_step(src, direction), 0)) - break + if(!step_to(src, get_step(src, direction), 0)) + break /obj/effect/decal/cleanable/blood/gibs/up random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1") From 9827b154667494befa1f8cd302d1392ba8bf8ced Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 23:05:59 -0700 Subject: [PATCH 20/30] Unused variables wasting my memory --- code/modules/surgery/bodyparts/bodyparts.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index e2c77fa177..097be23c40 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -773,8 +773,6 @@ px_y = 12 stam_heal_tick = 4 max_stamina_damage = 50 - var/blood_state = BLOOD_STATE_NOT_BLOODY - var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0) /obj/item/bodypart/l_leg/is_disabled() if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG)) @@ -833,8 +831,6 @@ px_y = 12 max_stamina_damage = 50 stam_heal_tick = 4 - var/blood_state = BLOOD_STATE_NOT_BLOODY - var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0) /obj/item/bodypart/r_leg/is_disabled() if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG)) From 742588c7e48120be14c29d14cd13b33d14d2057d Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 23:09:26 -0700 Subject: [PATCH 21/30] spacing --- code/modules/mob/living/carbon/human/human_movement.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 460dd6ea51..f37673a5a3 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -59,7 +59,7 @@ var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T if(oldFP && (oldFP.blood_state == S.blood_state && oldFP.color == bloodtype_to_color(S.last_bloodtype))) return - S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state]-BLOOD_LOSS_PER_STEP) + S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state] - BLOOD_LOSS_PER_STEP) var/obj/effect/decal/cleanable/blood/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints(T) FP.blood_state = S.blood_state FP.entered_dirs |= dir From ec4d990bfdbaf49d46a4333af6fde0ec7aefc41b Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 23:17:29 -0700 Subject: [PATCH 22/30] don't waste memory initializing empty lists --- code/modules/detectivework/detective_work.dm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/code/modules/detectivework/detective_work.dm b/code/modules/detectivework/detective_work.dm index 634401d0d8..3b1b00fc3a 100644 --- a/code/modules/detectivework/detective_work.dm +++ b/code/modules/detectivework/detective_work.dm @@ -9,8 +9,7 @@ else if(M.bloody_hands > 1) if(add_blood_DNA(M.blood_DNA, M.diseases)) M.bloody_hands-- - if(!suit_fibers) - suit_fibers = list() + LAZYINITLIST(suit_fibers) var/fibertext var/item_multiplier = isitem(src)?1.2:1 if(M.wear_suit) @@ -66,7 +65,6 @@ fingerprintslast = M.ckey - //Set ignoregloves to add prints irrespective of the mob having gloves on. /atom/proc/add_fingerprint(mob/living/M, ignoregloves = FALSE) if(!M || !M.key) @@ -93,15 +91,10 @@ fingerprints[full_print] = full_print /atom/proc/transfer_fingerprints_to(atom/A) - // Make sure everything are lists. - LAZYINITLIST(A.fingerprints) - LAZYINITLIST(A.fingerprintshidden) - LAZYINITLIST(fingerprints) - LAZYINITLIST(fingerprintshidden) - - // Transfer if(fingerprints) - A.fingerprints |= fingerprints.Copy() //detective + LAZYINITLIST(A.fingerprints) + A.fingerprints |= fingerprints //detective if(fingerprintshidden) - A.fingerprintshidden |= fingerprintshidden.Copy() //admin - A.fingerprintslast = fingerprintslast \ No newline at end of file + LAZYINITLIST(A.fingerprintshidden) + A.fingerprintshidden |= fingerprintshidden //admin + A.fingerprintslast = fingerprintslast From 5e96ffb5a0367f835069984bbf479b64b6ca2aee Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 23:18:44 -0700 Subject: [PATCH 23/30] compile --- code/game/objects/effects/decals/cleanable/gibs.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/effects/decals/cleanable/gibs.dm b/code/game/objects/effects/decals/cleanable/gibs.dm index b5cb357561..b6b93850f1 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -44,6 +44,7 @@ var/list/diseases = list() SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases) var/direction = pick(directions) + var/dist = 0 if(prob(50)) //yes this and the one below are different for a reason. if(prob(25)) dist = 2 From 9292ff197243f9b08239c23cb69493fd7de2fc2e Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 26 Jan 2020 13:27:54 -0700 Subject: [PATCH 24/30] Update damage_procs.dm --- code/modules/mob/living/carbon/damage_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 8da12aefeb..5020cc7379 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -87,7 +87,7 @@ if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER)) //damage becomes healing and healing becomes damage amount = -amount if(amount > 0) - blood_volume -= 5 * amount + blood_volume -= 3 * amount //5x was too much, this is punishing enough. else blood_volume -= amount return ..() From 41f9669a83cfa012b9d2ccc43df19cbdf9988297 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 26 Jan 2020 13:29:55 -0700 Subject: [PATCH 25/30] Update other_reagents.dm --- .../reagents/chemistry/reagents/other_reagents.dm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index b622eed605..06634b7fbf 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1051,13 +1051,14 @@ reagent_state = SOLID taste_description = "iron" pH = 6 + overdose_threshold = 30 color = "#c2391d" /datum/reagent/iron/on_mob_life(mob/living/carbon/C) if((HAS_TRAIT(C, TRAIT_NOMARROW))) return if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio)) - C.blood_volume += 0.5 + C.blood_volume += 0.25 ..() /datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, reac_volume) @@ -1066,6 +1067,17 @@ M.reagents.add_reagent(/datum/reagent/toxin, reac_volume) ..() +/datum/reagent/iron/overdose_start(mob/living/M) + to_chat(M, "You start feeling your guts twisting painfully!") + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/overdose, name) + +/datum/reagent/iron/overdose_process(mob/living/carbon/C) + if(prob(20)) + var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER) + if (istype(L)) + C.applyLiverDamage(2) //mild until the fabled med rework comes out. the organ damage galore + ..() + /datum/reagent/gold name = "Gold" description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." From 333c0dd20169b80997467caabd4f0cad171943f7 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 2 Feb 2020 01:32:54 -0700 Subject: [PATCH 26/30] Update modular_citadel/code/modules/reagents/reagents/cit_reagents.dm Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> --- modular_citadel/code/modules/reagents/reagents/cit_reagents.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm index 90fca7f1a5..41eccb7054 100644 --- a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm +++ b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm @@ -65,7 +65,7 @@ blood_state = null bloodiness = null -/obj/effect/decal/cleanable/semen/Initialize(mapload) +/obj/effect/decal/cleanable/femcum/Initialize(mapload) . = ..() dir = GLOB.cardinals add_blood_DNA(list("Non-human DNA" = "A+")) From b59dd11adc89d2a8af049b7acdc9de4bdd285ead Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 2 Feb 2020 01:35:16 -0700 Subject: [PATCH 27/30] Update blood.dm --- code/modules/mob/living/blood.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 7c8226466f..ea58480239 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -29,9 +29,12 @@ // Takes care blood loss and regeneration /mob/living/carbon/human/handle_blood() - if((NOBLOOD in dna.species.species_traits) || (bleed_rate < 0)) + if(NOBLOOD in dna.species.species_traits) bleed_rate = 0 return + + if(bleed_rate < 0) + bleed_rate = 0 if(HAS_TRAIT(src, TRAIT_NOMARROW)) //Bloodsuckers don't need to be here. return From 38ec4f0e1114b6e7f32526187af38c9418493073 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 2 Feb 2020 01:35:38 -0700 Subject: [PATCH 28/30] Update blood.dm --- code/modules/mob/living/blood.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index ea58480239..4cf85d8905 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -32,7 +32,7 @@ if(NOBLOOD in dna.species.species_traits) bleed_rate = 0 return - + if(bleed_rate < 0) bleed_rate = 0 From e97af262361d6873ba72b463e69b74eff4960417 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 2 Feb 2020 01:37:11 -0700 Subject: [PATCH 29/30] ok ghom --- code/game/objects/items/devices/scanners.dm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 7fc05eb3f7..a8bafc6254 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -414,12 +414,9 @@ SLIME SCANNER msg += "Subject is bleeding!\n" var/blood_percent = round((C.scan_blood_volume() / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100) var/blood_type = C.dna.blood_type - if(blood_typepath != /datum/reagent/blood && blood_typepath != /datum/reagent/blood/jellyblood) - var/datum/reagent/R = GLOB.chemical_reagents_list[blood_typepath] - if(R) - blood_type = R.name - else - blood_type = blood_typepath + var/datum/reagent/R = GLOB.chemical_reagents_list[blood_typepath] + if(R) + blood_type = R.name 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)) From ee533da3d705d116a7d18159e0429f76b393cf0e Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Sun, 2 Feb 2020 18:34:14 +0100 Subject: [PATCH 30/30] Putting GLOB.blood_reagent_types at use. --- code/game/objects/items/devices/scanners.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index a8bafc6254..6f21af4504 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -414,9 +414,10 @@ SLIME SCANNER msg += "Subject is bleeding!\n" var/blood_percent = round((C.scan_blood_volume() / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100) var/blood_type = C.dna.blood_type - var/datum/reagent/R = GLOB.chemical_reagents_list[blood_typepath] - if(R) - blood_type = R.name + if(!(blood_typepath in GLOB.blood_reagent_types)) + var/datum/reagent/R = GLOB.chemical_reagents_list[blood_typepath] + if(R) + blood_type = R.name 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))