From e02946f3e7dbd8aa7e7509dd8ba871b62b11a840 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 12 Jul 2017 02:14:53 -0400 Subject: [PATCH 1/4] Blood Refactor Fixes --- code/__DEFINES/combat.dm | 1 + code/game/machinery/adv_med.dm | 4 -- code/game/objects/items/devices/scanners.dm | 26 ++++---- code/game/objects/items/stacks/medical.dm | 41 ++++++------- code/modules/mob/living/carbon/carbon.dm | 2 + .../mob/living/carbon/human/examine.dm | 42 ++----------- .../mob/living/carbon/human/human_defense.dm | 2 +- .../living/carbon/human/species/species.dm | 8 ++- .../living/carbon/human/species/station.dm | 4 +- code/modules/mob/living/damage_procs.dm | 16 +++++ code/modules/reagents/chemistry/holder.dm | 3 - .../reagents/chemistry/reagents/toxins.dm | 15 +++++ .../reagents/chemistry/recipes/toxins.dm | 11 +++- code/modules/surgery/organs/blood.dm | 61 +++++++++---------- nano/templates/adv_med.tmpl | 1 - 15 files changed, 119 insertions(+), 118 deletions(-) diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 40f27d0d84f..3a8f30f254a 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -8,6 +8,7 @@ #define OXY "oxy" #define CLONE "clone" #define STAMINA "stamina" +#define BRAIN "brain" #define STUN "stun" #define WEAKEN "weaken" diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index c97836990d1..56e9d71369b 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -421,8 +421,6 @@ organStatus["robotic"] = 1 if(E.status & ORGAN_SPLINTED) organStatus["splinted"] = 1 - if(E.status & ORGAN_BLEEDING) - organStatus["bleeding"] = 1 if(E.status & ORGAN_DEAD) organStatus["dead"] = 1 @@ -589,8 +587,6 @@ lung_ruptured = "Lung ruptured:" if(e.status & ORGAN_SPLINTED) splint = "Splinted:" - if(e.status & ORGAN_BLEEDING) - bled = "Bleeding:" if(e.status & ORGAN_BROKEN) AN = "[e.broken_description]:" if(e.status & ORGAN_ROBOT) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index ac4dfac8206..53b05ef48d1 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -165,15 +165,9 @@ REAGENT SCANNER var/mob/living/carbon/human/H = M var/list/damaged = H.get_damaged_organs(1,1) user.show_message("Localized Damage, Brute/Burn:",1) - if(length(damaged)>0) + if(length(damaged) > 0) for(var/obj/item/organ/external/org in damaged) - user.show_message(text("\t []: [][] - []", \ - capitalize(org.name), \ - (org.brute_dam > 0) ? "[org.brute_dam]" :0, \ - (org.status & ORGAN_BLEEDING)?"\[Bleeding\]":"\t", \ - (org.burn_dam > 0) ? "[org.burn_dam]" :0),1) - else - user.show_message("\t Limbs are OK.",1) + user.show_message("\t\t[capitalize(org.name)]: [(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]-[(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]") OX = M.getOxyLoss() > 50 ? "Severe oxygen deprivation detected" : "Subject bloodstream oxygen level normal" TX = M.getToxLoss() > 50 ? "Dangerous amount of toxins detected" : "Subject bloodstream toxin level minimal" @@ -188,7 +182,7 @@ REAGENT SCANNER for(var/thing in M.viruses) var/datum/disease/D = thing if(!(D.visibility_flags & HIDDEN_SCANNER)) - to_chat(user, "Warning: [D.form] detected\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]") + user.show_message("Warning: [D.form] detected\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]") if(M.getStaminaLoss()) user.show_message("Subject appears to be suffering from fatigue.") if(M.getCloneLoss()) @@ -228,17 +222,21 @@ REAGENT SCANNER var/blood_id = H.get_blood_id() if(blood_id) if(H.bleed_rate) - to_chat(user, "Subject is bleeding!") + user.show_message("Subject is bleeding!") var/blood_percent = round((H.blood_volume / BLOOD_VOLUME_NORMAL)*100) var/blood_type = H.b_type if(blood_id != "blood")//special blood substance - blood_type = blood_id + var/datum/reagent/R = chemical_reagents_list[blood_id] + if(R) + blood_type = R.name + else + blood_type = blood_id if(H.blood_volume <= BLOOD_VOLUME_SAFE && H.blood_volume > BLOOD_VOLUME_OKAY) user.show_message("LOW blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") else if(H.blood_volume <= BLOOD_VOLUME_OKAY) - to_chat(user, "CRITICAL blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") - - user.show_message("blood type: [blood_type].") + user.show_message("CRITICAL blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") + else + user.show_message("Blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") if(H.undergoing_cardiac_arrest() && H.stat != DEAD) user.show_message("Subject suffering from heart attack: Apply defibrillator immediately.") diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index e63d74af020..30d68c80deb 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -96,22 +96,18 @@ var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.open == 0) - var/bandaged = affecting.bandage() - var/disinfected = affecting.disinfect() + affecting.bandage() + affecting.disinfect() - if(!(bandaged || disinfected)) - to_chat(user, "The wounds on [H]'s [affecting.name] have already been bandaged.") - return 1 - else - user.visible_message("[user] bandages the wounds on [H]'s [affecting.name].", \ - "You bandage the wounds on [H]'s [affecting.name]." ) + user.visible_message("[user] bandages the wounds on [H]'s [affecting.name].", \ + "You bandage the wounds on [H]'s [affecting.name]." ) - if(stop_bleeding) - if(!H.bleedsuppress) //so you can't stack bleed suppression - H.suppress_bloodloss(stop_bleeding) - affecting.heal_damage(heal_brute, heal_burn) - H.UpdateDamageIcon() - use(1) + if(stop_bleeding) + if(!H.bleedsuppress) //so you can't stack bleed suppression + H.suppress_bloodloss(stop_bleeding) + affecting.heal_damage(heal_brute, heal_burn) + H.UpdateDamageIcon() + use(1) else to_chat(user, "[affecting] is cut open, you'll need more than a bandage!") @@ -122,6 +118,7 @@ desc = "An advanced trauma kit for severe injuries." icon_state = "traumakit" heal_brute = 25 + stop_bleeding = 0 @@ -145,15 +142,13 @@ var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.open == 0) - if(!affecting.salve()) - to_chat(user, "The wounds on [H]'s [affecting.name] have already been salved.") - return 1 - else - user.visible_message("[user] salves the wounds on [H]'s [affecting.name].", \ - "You salve the wounds on [H]'s [affecting.name]." ) - affecting.heal_damage(heal_brute, heal_burn) - H.UpdateDamageIcon() - use(1) + affecting.salve() + + user.visible_message("[user] salves the wounds on [H]'s [affecting.name].", \ + "You salve the wounds on [H]'s [affecting.name]." ) + affecting.heal_damage(heal_brute, heal_burn) + H.UpdateDamageIcon() + use(1) else to_chat(user, "[affecting] is cut open, you'll need more than some ointment!") diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 0c4c34d6b40..597aafed824 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -247,6 +247,8 @@ for(var/obj/item/I in org.embedded_objects) to_chat(src, "\t There is \a [I] embedded in your [org.name]!") + if(H.bleed_rate) + to_chat(src, "You are bleeding!") if(staminaloss) if(staminaloss > 30) to_chat(src, "You're completely exhausted.") diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 9bb3308c944..c6ce5817714 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -288,7 +288,6 @@ var/list/wound_flavor_text = list() var/list/is_destroyed = list() - var/list/is_bleeding = list() for(var/organ_tag in species.has_limbs) var/list/organ_data = species.has_limbs[organ_tag] @@ -332,8 +331,6 @@ if(W.internal && !temp.open) continue // can't see internal wounds var/this_wound_desc = W.desc if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]" - if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]" - else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]" if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]" else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]" if(this_wound_desc in wound_descriptors) @@ -377,8 +374,6 @@ wound_flavor_text["[temp.limb_name]"] = flavor_text_string else wound_flavor_text["[temp.limb_name]"] = "" - if(temp.status & ORGAN_BLEEDING) - is_bleeding["[temp.limb_name]"] = 1 else wound_flavor_text["[temp.limb_name]"] = "" @@ -387,64 +382,39 @@ //Handles the text strings being added to the actual description. //If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext. - var/display_chest = 0 - var/display_shoes = 0 - var/display_gloves = 0 if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas))))) msg += wound_flavor_text["head"] - else if(is_bleeding["head"]) - msg += "[src] has blood running down [t_his] face!\n" if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you. msg += wound_flavor_text["chest"] - else if(is_bleeding["chest"]) - display_chest = 1 if(wound_flavor_text["l_arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["l_arm"] - else if(is_bleeding["l_arm"]) - display_chest = 1 if(wound_flavor_text["l_hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves))) msg += wound_flavor_text["l_hand"] - else if(is_bleeding["l_hand"]) - display_gloves = 1 if(wound_flavor_text["r_arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["r_arm"] - else if(is_bleeding["r_arm"]) - display_chest = 1 if(wound_flavor_text["r_hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves))) msg += wound_flavor_text["r_hand"] - else if(is_bleeding["r_hand"]) - display_gloves = 1 if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["groin"] - else if(is_bleeding["groin"]) - display_chest = 1 if(wound_flavor_text["l_leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["l_leg"] - else if(is_bleeding["l_leg"]) - display_chest = 1 if(wound_flavor_text["l_foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes))) msg += wound_flavor_text["l_foot"] - else if(is_bleeding["l_foot"]) - display_shoes = 1 if(wound_flavor_text["r_leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["r_leg"] - else if(is_bleeding["r_leg"]) - display_chest = 1 if(wound_flavor_text["r_foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes))) msg += wound_flavor_text["r_foot"] - else if(is_bleeding["r_foot"]) - display_shoes = 1 - if(display_chest) - msg += "[src] has blood soaking through from under [t_his] clothing!\n" - if(display_shoes) - msg += "[src] has blood running from [t_his] shoes!\n" - if(display_gloves) - msg += "[src] has blood running from under [t_his] gloves!\n" if(blood_volume < BLOOD_VOLUME_SAFE) msg += "[t_He] [t_has] pale skin.\n" + if(bleedsuppress) msg += "[t_He] [t_is] bandaged with something.\n" + else if(bleed_rate) + if(reagents.has_reagent("heparin")) + msg += "[t_He] [t_is] bleeding uncontrollably!\n" + else + msg += "[t_He] [t_is] bleeding!\n" if(digitalcamo) msg += "[t_He] [t_is] repulsively uncanny!\n" diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 8b9629d656b..b5796aee6d5 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -309,7 +309,7 @@ emp_act throw_alert("embeddedobject", /obj/screen/alert/embeddedobject) var/obj/item/organ/external/L = pick(bodyparts) L.embedded_objects |= I -// I.add_mob_blood(src)//it embedded itself in you, of course it's bloody! + I.add_mob_blood(src)//it embedded itself in you, of course it's bloody! I.forceMove(src) L.take_damage(I.w_class*I.embedded_impact_pain_multiplier) visible_message("[I] embeds itself in [src]'s [L.name]!","[I] embeds itself in your [L.name]!") diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index a00e183c10a..5888917b7e6 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -76,6 +76,8 @@ var/brain_mod = 1 // Brain damage damage reduction/amplification var/stun_mod = 1 // If a species is more/less impacated by stuns/weakens/paralysis + var/blood_damage_type = OXY //What type of damage does this species take if it's low on blood? + var/total_health = 100 var/punchdamagelow = 0 //lowest possible punch damage var/punchdamagehigh = 9 //highest possible punch damage @@ -464,7 +466,11 @@ // Return 1 if it should do normal processing too // Return 0 if it shouldn't deplete and do its normal effect // Other return values will cause weird badness -/datum/species/proc/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) +/datum/species/proc/handle_reagents(mob/living/carbon/human/H, datum/reagent/R) + if(R.id == exotic_blood) + H.blood_volume = min(H.blood_volume + round(R.volume, 0.1), BLOOD_VOLUME_MAXIMUM) + H.reagents.del_reagent(R.id) + return 0 return 1 // For special snowflake species effects diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index fe3d8a262b3..e13f980fde1 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -548,9 +548,11 @@ bodyflags = HAS_SKIN_COLOR | NO_EYES dietflags = DIET_CARN reagent_tag = PROCESS_ORG + blood_color = "#0064C8" exotic_blood = "water" - //ventcrawler = 1 //ventcrawling commented out + blood_damage_type = TOX + butt_sprite = "slime" //Has default darksight of 2. diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index f506a77ebc9..96caf40b191 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -27,6 +27,22 @@ updatehealth() return 1 +/mob/living/proc/apply_damage_type(damage = 0, damagetype = BRUTE) //like apply damage except it always uses the damage procs + switch(damagetype) + if(BRUTE) + return adjustBruteLoss(damage) + if(BURN) + return adjustFireLoss(damage) + if(TOX) + return adjustToxLoss(damage) + if(OXY) + return adjustOxyLoss(damage) + if(CLONE) + return adjustCloneLoss(damage) + if(STAMINA) + return adjustStaminaLoss(damage) + if(BRAIN) + return adjustBrainLoss(damage) /mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/def_zone = null, var/blocked = 0, var/stamina = 0) if(blocked >= 100) return 0 diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 9ad885cd9b7..2e89ea1c8e2 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -493,9 +493,6 @@ var/const/INGEST = 2 //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO)) can_process = 1 - if(H.species && H.species.exotic_blood) - if(R.id == H.species.exotic_blood) - can_process = 0 //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption) else if(R.process_flags != SYNTHETIC) diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index 8aa18899ac1..618aff07177 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -848,6 +848,21 @@ M.AdjustLoseBreath(1) ..() +/datum/reagent/heparin //Based on a real-life anticoagulant. + name = "Heparin" + id = "heparin" + description = "A powerful anticoagulant. Victims will bleed uncontrollably and suffer scaling bruising." + reagent_state = LIQUID + color = "#C8C8C8" //RGB: 200, 200, 200 + metabolization_rate = 0.2 * REAGENTS_METABOLISM + +/datum/reagent/heparin/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + H.bleed_rate = min(H.bleed_rate + 2, 8) + H.adjustBruteLoss(1) + ..() + /datum/reagent/sarin name = "Sarin" id = "sarin" diff --git a/code/modules/reagents/chemistry/recipes/toxins.dm b/code/modules/reagents/chemistry/recipes/toxins.dm index 082e209e18b..fb7672d6806 100644 --- a/code/modules/reagents/chemistry/recipes/toxins.dm +++ b/code/modules/reagents/chemistry/recipes/toxins.dm @@ -154,4 +154,13 @@ result = "mutagen" required_reagents = list("radium" = 1, "plasma" = 1, "chlorine" = 1) result_amount = 3 - mix_message = "The substance turns neon green and bubbles unnervingly." \ No newline at end of file + mix_message = "The substance turns neon green and bubbles unnervingly." + +/datum/chemical_reaction/heparin + name = "Heparin" + id = "Heparin" + result = "heparin" + required_reagents = list("formaldehyde" = 1, "sodium" = 1, "chlorine" = 1, "lithium" = 1) + result_amount = 4 + mix_message = "The mixture thins and loses all color." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' \ No newline at end of file diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index 5416ab777c1..6b527e97138 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -1,17 +1,18 @@ /**************************************************** BLOOD SYSTEM ****************************************************/ + /mob/living/carbon/human/proc/suppress_bloodloss(amount) if(bleedsuppress) return else - bleedsuppress = 1 - spawn(amount) - bleedsuppress = 0 - if(stat != DEAD && bleed_rate) - to_chat(src, "The blood soaks through your bandage.") - + bleedsuppress = TRUE + addtimer(src, "resume_bleeding", amount) +/mob/living/carbon/human/proc/resume_bleeding() + bleedsuppress = FALSE + if(stat != DEAD && bleed_rate) + to_chat(src, "The blood soaks through your bandage.") // Takes care blood loss and regeneration /mob/living/carbon/human/handle_blood() @@ -40,52 +41,47 @@ //Effects of bloodloss - var/oxy_immune = species.flags & NO_BREATHE //Some species have blood, but don't breathe; they should still suffer the effects of bloodloss. - + var/word = pick("dizzy","woozy","faint") switch(blood_volume) if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE) if(prob(5)) - to_chat(src, "You feel [pick("dizzy","woozy","faint")].") - if(oxy_immune) - adjustToxLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1)) - else - adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1)) + to_chat(src, "You feel [word].") + apply_damage_type(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1), species.blood_damage_type) if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY) - if(oxy_immune) - adjustToxLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1)) - else - adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1)) + apply_damage_type(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1), species.blood_damage_type) if(prob(5)) EyeBlurry(6) - - var/word = pick("dizzy","woozy","faint") to_chat(src, "You feel very [word].") if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD) - if(oxy_immune) - adjustToxLoss(5) - else - adjustOxyLoss(5) + apply_damage_type(5, species.blood_damage_type) if(prob(15)) Paralyse(rand(1,3)) - var/word = pick("dizzy","woozy","faint") to_chat(src, "You feel extremely [word].") if(0 to BLOOD_VOLUME_SURVIVE) death() - //Bleeding out var/temp_bleed = 0 - for(var/obj/item/organ/external/temp in bodyparts) - if(!(temp.status & ORGAN_BLEEDING) || temp.status & ORGAN_ROBOT) + //Bleeding out + for(var/X in bodyparts) + var/obj/item/organ/external/BP = X + var/brutedamage = BP.brute_dam + + if(BP.status & ORGAN_ROBOT) continue - for(var/datum/wound/W in temp.wounds) - if(W.bleeding()) - temp_bleed += W.damage / 4 - if(temp.open) + + //We want an accurate reading of .len + listclearnulls(BP.embedded_objects) + temp_bleed += 0.5*BP.embedded_objects.len + + if(brutedamage >= 20) + temp_bleed += (brutedamage * 0.013) + + if(BP.open) temp_bleed += 0.5 bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases - if(bleed_rate && !bleedsuppress) + if(bleed_rate && !bleedsuppress && !(status_flags & FAKEDEATH)) bleed(bleed_rate) //Makes a blood drop, leaking amt units of blood from the mob @@ -232,7 +228,6 @@ /mob/living/proc/add_splatter_floor(turf/T, small_drip) if(get_blood_id() != "blood")//is it blood or welding fuel? return - if(!T) T = get_turf(src) diff --git a/nano/templates/adv_med.tmpl b/nano/templates/adv_med.tmpl index e88db47456a..4aa7bc33fe3 100644 --- a/nano/templates/adv_med.tmpl +++ b/nano/templates/adv_med.tmpl @@ -152,7 +152,6 @@ Used In File(s): \code\game\machinery\adv_med.dm {{if value.status.destroyed}} DESTROYED
{{/if}} - {{if value.status.bleeding}} external bleeding
{{/if}} {{if value.internalBleeding}} internal bleeding
{{/if}} {{if value.lungRuptured}} lung ruptured
{{/if}} {{if value.status.broken}} {{:value.status.broken}}
{{/if}} From ac32b14910eb6c3db58dc7e78f85a65b8daf9629 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 12 Jul 2017 03:52:56 -0400 Subject: [PATCH 2/4] fix --- code/game/objects/items/stacks/medical.dm | 4 ++-- code/modules/mob/living/carbon/human/examine.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 30d68c80deb..04be0d53a1a 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -99,7 +99,7 @@ affecting.bandage() affecting.disinfect() - user.visible_message("[user] bandages the wounds on [H]'s [affecting.name].", \ + user.visible_message("[user] bandages the wounds on [H]'s [affecting.name].", \ "You bandage the wounds on [H]'s [affecting.name]." ) if(stop_bleeding) @@ -144,7 +144,7 @@ if(affecting.open == 0) affecting.salve() - user.visible_message("[user] salves the wounds on [H]'s [affecting.name].", \ + user.visible_message("[user] salves the wounds on [H]'s [affecting.name].", \ "You salve the wounds on [H]'s [affecting.name]." ) affecting.heal_damage(heal_brute, heal_burn) H.UpdateDamageIcon() diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index c6ce5817714..70034def245 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -412,7 +412,7 @@ msg += "[t_He] [t_is] bandaged with something.\n" else if(bleed_rate) if(reagents.has_reagent("heparin")) - msg += "[t_He] [t_is] bleeding uncontrollably!\n" + msg += "[t_He] [t_is] bleeding uncontrollably!\n" else msg += "[t_He] [t_is] bleeding!\n" From ecfaa6ab716e26ee15195adfc511423a82c3620a Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 12 Jul 2017 17:55:42 -0400 Subject: [PATCH 3/4] oh boy --- code/game/machinery/iv_drip.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 7ed7bc8dbc2..b3242cb76fd 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -113,8 +113,8 @@ if(beaker) // Give blood if(mode) - if(beaker.volume > 0) - var/fraction = min(transfer_amount/beaker.volume, 1) //the fraction that is transfered of the total volume + if(beaker.reagents.total_volume) + var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume beaker.reagents.reaction(attached, INGEST, fraction) //make reagents reacts, but don't spam messages beaker.reagents.trans_to(attached, transfer_amount) update_icon() From 0401e4fe6ef3da57466a11fbce3cdf2bbed614b7 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 12 Jul 2017 18:38:04 -0400 Subject: [PATCH 4/4] faster blood metabolization --- code/modules/reagents/chemistry/reagents/water.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 2600880b7ad..be3aa872f87 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -190,6 +190,7 @@ id = "blood" reagent_state = LIQUID color = "#C80000" // rgb: 200, 0, 0 + metabolization_rate = 5 //fast rate so it disappears fast. drink_icon = "glass_red" drink_name = "Glass of Tomato juice" drink_desc = "Are you sure this is tomato juice?"