From 83db0cc38fe261107371b095796955829dca2007 Mon Sep 17 00:00:00 2001 From: Anewbe Date: Mon, 23 Jan 2017 23:43:44 -0600 Subject: [PATCH] Medical tweaks --- code/datums/supplypacks/medical.dm | 21 +++ code/datums/uplink/medical.dm | 10 ++ code/game/machinery/computer/cloning.dm | 2 +- .../objects/items/weapons/implants/implant.dm | 20 ++- .../objects/items/weapons/storage/firstaid.dm | 14 ++ code/game/turfs/simulated.dm | 2 + code/game/verbs/suicide.dm | 16 +- .../spacesuits/rig/modules/utility.dm | 16 ++ .../clothing/spacesuits/rig/suits/ert.dm | 2 +- code/modules/food/recipes_microwave.dm | 8 +- code/modules/mob/living/carbon/brain/life.dm | 4 - .../mob/living/carbon/carbon_defines.dm | 3 +- code/modules/mob/living/carbon/human/human.dm | 2 +- .../mob/living/carbon/human/human_organs.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 35 +++-- .../modules/mob/living/carbon/metroid/life.dm | 4 - .../mob/living/carbon/metroid/powers.dm | 2 +- code/modules/mob/living/carbon/shock.dm | 2 +- code/modules/mob/living/living.dm | 11 +- .../simple_animal/hostile/giant_spider.dm | 4 +- code/modules/mob/mob.dm | 2 +- code/modules/mob/mob_grab_specials.dm | 2 +- code/modules/organs/blood.dm | 37 +++-- code/modules/organs/internal/lungs.dm | 2 +- code/modules/organs/organ.dm | 6 +- code/modules/organs/organ_external.dm | 8 +- code/modules/organs/organ_internal.dm | 12 +- code/modules/organs/pain.dm | 137 ++++++------------ .../Chemistry-Reagents-Medicine.dm | 136 +++++++++++++---- .../Chemistry-Reagents-Toxins.dm | 7 + code/modules/reagents/Chemistry-Recipes.dm | 24 +++ .../reagent_containers/food/snacks.dm | 13 ++ .../reagents/reagent_containers/hypospray.dm | 30 ++++ code/modules/supermatter/supermatter.dm | 2 +- code/modules/surgery/bones.dm | 4 +- code/modules/surgery/encased.dm | 8 +- code/modules/surgery/generic.dm | 14 +- code/modules/surgery/organs_internal.dm | 10 +- code/modules/surgery/other.dm | 6 +- code/modules/virus2/effect.dm | 4 +- 40 files changed, 428 insertions(+), 216 deletions(-) diff --git a/code/datums/supplypacks/medical.dm b/code/datums/supplypacks/medical.dm index 51a7e6e03c5..a0d3a742ec1 100644 --- a/code/datums/supplypacks/medical.dm +++ b/code/datums/supplypacks/medical.dm @@ -66,6 +66,27 @@ containername = "Surgery crate" access = access_medical +/datum/supply_packs/med/deathalarm + name = "Death Alarm crate" + contains = list( + /obj/item/weapon/storage/box/cdeathalarm_kit, + /obj/item/weapon/storage/box/cdeathalarm_kit + ) + cost = 40 + containertype = "/obj/structure/closet/crate/secure" + containername = "Death Alarm crate" + access = access_medical + +/datum/supply_packs/med/clotting + name = "Clotting Medicine crate" + contains = list( + /obj/item/weapon/storage/firstaid/clotting + ) + cost = 40 + containertype = "/obj/structure/closet/crate/secure" + containername = "Clotting Medicine crate" + access = access_medical + /datum/supply_packs/med/sterile name = "Sterile equipment crate" contains = list( diff --git a/code/datums/uplink/medical.dm b/code/datums/uplink/medical.dm index 381221127df..eab9d9cd021 100644 --- a/code/datums/uplink/medical.dm +++ b/code/datums/uplink/medical.dm @@ -19,6 +19,16 @@ item_cost = 5 path = /obj/item/weapon/storage/box/ambrosia +/datum/uplink_item/item/medical/clotting + name = "Clotting Medicine injector" + item_cost = 10 + path = /obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting + +/datum/uplink_item/item/medical/bonemeds + name = "Bone Repair injector" + item_cost = 10 + path = /obj/item/weapon/reagent_containers/hypospray/autoinjector/bonemed + /datum/uplink_item/item/medical/ambrosiadeusseeds name = "Box of 7x ambrosia deus seed packets" item_cost = 10 diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index da165448dab..75ba732950a 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -305,7 +305,7 @@ if(subject.isSynthetic()) scantemp = "Error: Majority of subject is non-organic." return - if (subject.suiciding == 1) + if (subject.suiciding) scantemp = "Error: Subject's brain is not responding to scanning stimuli." return if ((!subject.ckey) || (!subject.client)) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 55cdc170e26..4e25bbe4fe6 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -430,23 +430,27 @@ the implant may become unstable and either pre-maturely inject the subject or si var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null) if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) ) //give the syndies a bit of stealth - a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Security") - a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Medical") + a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "General") +// a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Security") +// a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Medical") else - a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Security") - a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Medical") + a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "General") +// a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Security") +// a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Medical") qdel(a) processing_objects.Remove(src) if ("emp") var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null) var/name = prob(50) ? t.name : pick(teleportlocs) - a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Security") - a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Medical") + a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "General") +// a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Security") +// a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Medical") qdel(a) else var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null) - a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Security") - a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Medical") + a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "General") +// a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Security") +// a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Medical") qdel(a) processing_objects.Remove(src) diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 1c77e1f6cbf..61a9a99f96d 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -126,6 +126,7 @@ new /obj/item/weapon/storage/pill_bottle/dylovene(src) new /obj/item/weapon/storage/pill_bottle/tramadol(src) new /obj/item/weapon/storage/pill_bottle/spaceacillin(src) + new /obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting(src) new /obj/item/stack/medical/splint(src) return @@ -150,6 +151,19 @@ new /obj/item/stack/medical/advanced/bruise_pack(src) return +/obj/item/weapon/storage/firstaid/clotting + name = "clotting kit" + desc = "Contains chemicals to stop bleeding." + max_storage_space = ITEMSIZE_COST_SMALL * 7 + +/obj/item/weapon/storage/firstaid/clotting/New() + ..() + if (empty) + return + for(var/i = 1 to 8) + new /obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting(src) + return + /* * Pill Bottles */ diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 4172457b1fb..05f2299962b 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -182,3 +182,5 @@ this.blood_DNA["UNKNOWN BLOOD"] = "X*" else if( istype(M, /mob/living/silicon/robot )) new /obj/effect/decal/cleanable/blood/oil(src) + else if(ishuman(M)) + add_blood(M) \ No newline at end of file diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 874b6f3998b..dcef3ca1dc0 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -26,7 +26,7 @@ if(!canmove || restrained()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))" return - suiciding = 1 + suiciding = 15 does_not_breathe = 0 //Prevents ling-suicide zombies, or something var/obj/item/held_item = get_active_hand() if(held_item) @@ -51,6 +51,10 @@ else //This should not happen, but if it does, everything should still work damage_mod = 1 + if(isSynthetic()) + var/obj/item/organ/internal/cell/C = internal_organs_by_name["cell"] + C.take_damage(10, 1) + //Do 175 damage divided by the number of damage types applied. if(damagetype & BRUTELOSS) adjustBruteLoss(30/damage_mod) //hack to prevent gibbing @@ -73,10 +77,16 @@ return log_and_message_admins("[key_name(src)] commited suicide") - viewers(src) << pick("[src] is attempting to bite \his tongue off! It looks like \he's trying to commit suicide.", \ + + var/suicidemsg + suicidemsg = pick("[src] is attempting to bite \his tongue off! It looks like \he's trying to commit suicide.", \ "[src] is jamming \his thumbs into \his eye sockets! It looks like \he's trying to commit suicide.", \ "[src] is twisting \his own neck! It looks like \he's trying to commit suicide.", \ "[src] is holding \his breath! It looks like \he's trying to commit suicide.") + if(isSynthetic()) + suicidemsg = "[src] is attempting to switch \his power off! It looks like \he's trying to commit suicide." + visible_message(suicidemsg) + adjustOxyLoss(max(175 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() @@ -172,7 +182,7 @@ var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(confirm == "Yes") - suiciding = 1 + suiciding = 30 setOxyLoss(100) adjustBruteLoss(100 - getBruteLoss()) setToxLoss(100) diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm index bcd81638538..70ab02ff661 100644 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm @@ -157,6 +157,7 @@ list("antibiotics", "spaceacillin", 0, 20), list("antitoxins", "anti_toxin", 0, 20), list("nutrients", "glucose", 0, 80), + list("clotting agent", "carthatoline", 0, 80), list("hyronalin", "hyronalin", 0, 20), list("radium", "radium", 0, 20) ) @@ -246,6 +247,7 @@ list("hyperzine", "hyperzine", 0, 30), list("oxycodone", "oxycodone", 0, 30), list("nutrients", "glucose", 0, 80), + list("clotting agent", "carthatoline", 0, 80) ) interface_name = "combat chem dispenser" @@ -263,6 +265,20 @@ interface_name = "mounted chem injector" interface_desc = "Dispenses loaded chemicals via an arm-mounted injector." +/obj/item/rig_module/chem_dispenser/injector/advanced + + charges = list( + list("tricordrazine", "tricordrazine", 0, 80), + list("tramadol", "tramadol", 0, 80), + list("dexalin plus", "dexalinp", 0, 80), + list("antibiotics", "spaceacillin", 0, 80), + list("antitoxins", "anti_toxin", 0, 80), + list("nutrients", "glucose", 0, 80), + list("hyronalin", "hyronalin", 0, 80), + list("radium", "radium", 0, 80), + list("clotting agent", "carthatoline", 0, 80) + ) + /obj/item/rig_module/voice name = "hardsuit voice synthesiser" diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm index 8b13a57c8d5..5d0dd4cb8fc 100644 --- a/code/modules/clothing/spacesuits/rig/suits/ert.dm +++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm @@ -49,7 +49,7 @@ /obj/item/rig_module/ai_container, /obj/item/rig_module/maneuvering_jets, /obj/item/rig_module/device/healthscanner, - /obj/item/rig_module/chem_dispenser/injector + /obj/item/rig_module/chem_dispenser/injector/advanced ) /obj/item/weapon/rig/ert/security diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm index 611a6112962..f181f187bea 100644 --- a/code/modules/food/recipes_microwave.dm +++ b/code/modules/food/recipes_microwave.dm @@ -105,7 +105,7 @@ I said no! /datum/recipe/xenoburger items = list( /obj/item/weapon/reagent_containers/food/snacks/bun, - /obj/item/weapon/reagent_containers/food/snacks/xenomeat + /obj/item/weapon/reagent_containers/food/snacks/spidermeat // /obj/item/weapon/reagent_containers/food/snacks/xenomeat ) result = /obj/item/weapon/reagent_containers/food/snacks/xenoburger @@ -224,9 +224,9 @@ I said no! /obj/item/weapon/reagent_containers/food/snacks/dough, /obj/item/weapon/reagent_containers/food/snacks/dough, /obj/item/weapon/reagent_containers/food/snacks/dough, - /obj/item/weapon/reagent_containers/food/snacks/xenomeat, - /obj/item/weapon/reagent_containers/food/snacks/xenomeat, - /obj/item/weapon/reagent_containers/food/snacks/xenomeat, + /obj/item/weapon/reagent_containers/food/snacks/spidermeat, //xenomeat, + /obj/item/weapon/reagent_containers/food/snacks/spidermeat, //xenomeat, + /obj/item/weapon/reagent_containers/food/snacks/spidermeat, //xenomeat, /obj/item/weapon/reagent_containers/food/snacks/cheesewedge, /obj/item/weapon/reagent_containers/food/snacks/cheesewedge, /obj/item/weapon/reagent_containers/food/snacks/cheesewedge, diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index cb889b570f1..3f41f21ce55 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -71,15 +71,11 @@ /mob/living/carbon/brain/handle_chemicals_in_body() chem_effects.Cut() - analgesic = 0 if(touching) touching.metabolize() if(ingested) ingested.metabolize() if(bloodstr) bloodstr.metabolize() - if(CE_PAINKILLER in chem_effects) - analgesic = chem_effects[CE_PAINKILLER] - confused = max(0, confused - 1) // decrement dizziness counter, clamped to 0 if(resting) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index fa0cf273e25..5657ec03eab 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -7,8 +7,7 @@ var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm var/life_tick = 0 // The amount of life ticks that have processed on this mob. - var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain - // life should decrease this by 1 every tick + // total amount of wounds on mob, used to spread out healing and the like over all wounds var/number_wounds = 0 var/obj/item/handcuffed = null //Whether or not the mob is handcuffed diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 30725ee8a13..5d3e57ca748 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1042,7 +1042,7 @@ "A spike of pain jolts your [organ.name] as you bump [O] inside.", \ "Your movement jostles [O] in your [organ.name] painfully.", \ "Your movement jostles [O] in your [organ.name] painfully.") - src << msg + custom_pain(msg, 40) organ.take_damage(rand(1,3), 0, 0) if(!(organ.robotic >= ORGAN_ROBOT) && (should_have_organ(O_HEART))) //There is no blood in protheses. diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 4d405504a20..b3518055d5d 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -54,7 +54,7 @@ if (!lying && !buckled && world.time - l_move_time < 15) //Moving around with fractured ribs won't do you any good - if (prob(10) && !stat && can_feel_pain() && analgesic < 50 && E.is_broken() && E.internal_organs.len) + if (prob(10) && !stat && can_feel_pain() && chem_effects[CE_PAINKILLER] < 50 && E.is_broken() && E.internal_organs.len) custom_pain("Pain jolts through your broken [E.encased ? E.encased : E.name], staggering you!", 50) drop_item(loc) Stun(2) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 6fabb392647..c7d69d21cff 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -186,7 +186,7 @@ var/rn = rand(0, 200) if(getBrainLoss() >= 5) if(0 <= rn && rn <= 3) - custom_pain("Your head feels numb and painful.") + custom_pain("Your head feels numb and painful.", 10) if(getBrainLoss() >= 15) if(4 <= rn && rn <= 6) if(eye_blurry <= 0) src << "It becomes hard to see for some reason." @@ -328,17 +328,24 @@ if(status_flags & GODMODE) return + if(suiciding) + if(isSynthetic()) + var/obj/item/organ/internal/cell/C = internal_organs_by_name["cell"] + C.take_damage(6, 1) + else + failed_last_breath = 1 + adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster + oxygen_alert = max(oxygen_alert, 1) + suiciding -- + return 0 + if(does_not_breathe) failed_last_breath = 0 adjustOxyLoss(-5) return - if(!breath || (breath.total_moles == 0) || suiciding) + if(!breath || (breath.total_moles == 0)) failed_last_breath = 1 - if(suiciding) - adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster - oxygen_alert = max(oxygen_alert, 1) - return 0 if(health > config.health_threshold_crit) adjustOxyLoss(HUMAN_MAX_OXYLOSS) else @@ -350,8 +357,11 @@ rupture_lung() if(should_have_organ("brain")) + var/brainOxPercent = 0.02 //Default2% of your current oxyloss is applied as brain damage, 50 oxyloss is 1 brain damage + if(CE_STABLE in chem_effects) + brainOxPercent = 0.01 //Halved in effect if(prob(5)) - adjustBrainLoss(0.02 * oxyloss) //2% of your current oxyloss is applied as brain damage, 50 oxyloss is 1 brain damage + adjustBrainLoss(brainOxPercent * oxyloss) oxygen_alert = max(oxygen_alert, 1) @@ -794,7 +804,6 @@ if(reagents) chem_effects.Cut() - analgesic = 0 if(!isSynthetic()) @@ -802,9 +811,6 @@ if(ingested) ingested.metabolize() if(bloodstr) bloodstr.metabolize() - if(CE_PAINKILLER in chem_effects) - analgesic = chem_effects[CE_PAINKILLER] - var/total_phoronloss = 0 for(var/obj/item/I in src) if(I.contaminated) @@ -1155,7 +1161,7 @@ see_invisible = SEE_INVISIBLE_LIVING if(healths) - if (analgesic > 100) + if (chem_effects[CE_PAINKILLER] > 100) healths.icon_state = "health_numb" else // Generate a by-limb health display. @@ -1434,8 +1440,11 @@ shock_stage = max(shock_stage-1, 0) return + if(stat) + return 0 + if(shock_stage == 10) - src << "[pick("It hurts so much", "You really need some painkillers", "Dear god, the pain")]!" + custom_pain("[pick("It hurts so much", "You really need some painkillers", "Dear god, the pain")]!", 40) if(shock_stage >= 30) if(shock_stage == 30) emote("me",1,"is having trouble keeping their eyes open.") diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 69ddb590380..7bbc4110dde 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -67,15 +67,11 @@ /mob/living/carbon/slime/handle_chemicals_in_body() chem_effects.Cut() - analgesic = 0 if(touching) touching.metabolize() if(ingested) ingested.metabolize() if(bloodstr) bloodstr.metabolize() - if(CE_PAINKILLER in chem_effects) - analgesic = chem_effects[CE_PAINKILLER] - src.updatehealth() return //TODO: DEFERRED diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm index 2e1cc295950..933596ef5e2 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/metroid/powers.dm @@ -60,7 +60,7 @@ var/painMes = pick("You can feel your body becoming weak!", "You feel like you're about to die!", "You feel every part of your body screaming in agony!", "A low, rolling pain passes through your body!", "Your body feels as if it's falling apart!", "You feel extremely weak!", "A sharp, deep pain bathes every inch of your body!") if (ishuman(M)) var/mob/living/carbon/human/H = M - H.custom_pain(painMes) + H.custom_pain(painMes, 100) else if (istype(M, /mob/living/carbon)) var/mob/living/carbon/C = M if (C.can_feel_pain()) diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index a742bc8959d..894a0a98b02 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -14,7 +14,7 @@ 1.2 * src.getShockBruteLoss() + \ 1.7 * src.getCloneLoss() + \ 2 * src.halloss + \ - -1 * src.analgesic + -1 * src.chem_effects[CE_PAINKILLER] if(src.slurring) src.traumatic_shock -= 20 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index d31a8f2b0c4..e4baab95ede 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -716,11 +716,20 @@ default behaviour is: src << "You feel like you are about to throw up!" sleep(100) //and you have 10 more for mad dash to the bucket + //Damaged livers cause you to vomit blood. + if(!blood_vomit) + if(ishuman(src)) + var/mob/living/carbon/human/H = src + if(!H.isSynthetic()) + var/obj/item/organ/internal/liver/L = H.internal_organs_by_name["liver"] + if(L.is_broken()) + blood_vomit = 1 + Stun(5) src.visible_message("[src] throws up!","You throw up!") playsound(loc, 'sound/effects/splat.ogg', 50, 1) - var/turf/simulated/T = get_turf(src) + var/turf/simulated/T = get_turf(src) //TODO: Make add_blood_floor remove blood from human mobs if(istype(T)) if(blood_vomit) T.add_blood_floor(src) diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 030f9b8e6b9..9f8a9177739 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -16,7 +16,7 @@ speak_chance = 5 turns_per_move = 5 see_in_dark = 10 - meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat + meat_type = /obj/item/weapon/reagent_containers/food/snacks/spidermeat response_help = "pets" response_disarm = "gently pushes aside" response_harm = "punches" @@ -29,7 +29,7 @@ cold_damage_per_tick = 20 var/poison_per_bite = 5 var/poison_chance = 10 - var/poison_type = "toxin" + var/poison_type = "spidertoxin" faction = "spiders" var/busy = 0 pass_flags = PASSTABLE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7d969569d49..6ed5f6df056 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -902,7 +902,7 @@ mob/proc/yank_out_object() if(prob(selection.w_class * 5) && (affected.robotic < ORGAN_ROBOT)) //I'M SO ANEMIC I COULD JUST -DIE-. var/datum/wound/internal_bleeding/I = new (min(selection.w_class * 5, 15)) affected.wounds += I - H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1) + H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 50) if (ishuman(U)) var/mob/living/carbon/human/human_user = U diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm index e7b75a2e5de..781f198b95f 100644 --- a/code/modules/mob/mob_grab_specials.dm +++ b/code/modules/mob/mob_grab_specials.dm @@ -20,7 +20,7 @@ user << "You must stand still to feel [E] for fractures." else if(E.status & ORGAN_BROKEN) user << "The [E.encased ? E.encased : "bone in the [E.name]"] moves slightly when you poke it!" - H.custom_pain("Your [E.name] hurts where it's poked.") + H.custom_pain("Your [E.name] hurts where it's poked.", 40) else user << "The [E.encased ? E.encased : "bones in the [E.name]"] seem to be fine." diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 12accd6dd4c..85d0932e576 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -6,6 +6,7 @@ var/const/BLOOD_VOLUME_SAFE = 85 var/const/BLOOD_VOLUME_OKAY = 75 var/const/BLOOD_VOLUME_BAD = 60 var/const/BLOOD_VOLUME_SURVIVE = 40 +var/const/CE_STABLE_THRESHOLD = 0.5 /mob/living/carbon/human/var/datum/reagents/vessel // Container for blood and BLOOD ONLY. Do not transfer other chems here. /mob/living/carbon/human/var/var/pale = 0 // Should affect how mob sprite is drawn, but currently doesn't. @@ -68,14 +69,22 @@ var/const/BLOOD_VOLUME_SURVIVE = 40 if(!heart) blood_volume = 0 - else if(heart.damage > 1 && heart.damage < heart.min_bruised_damage) - blood_volume *= 0.8 - else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage) - blood_volume *= 0.6 - else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY) + if(heart.is_broken()) blood_volume *= 0.3 + else if(heart.is_bruised()) + blood_volume *= 0.7 + else if(heart.damage > 1) + blood_volume *= 0.9 //Effects of bloodloss + + var/dmg_coef = 1 //Lower means less damage taken + var/threshold_coef = 1 //Higher means the damage caps off lower + + if(CE_STABLE in chem_effects) + dmg_coef = min(1, 10/chem_effects[CE_STABLE]) //TODO: add effect for increased damage + threshold_coef = min(dmg_coef / CE_STABLE_THRESHOLD, 1) + if(blood_volume >= BLOOD_VOLUME_SAFE) if(pale) pale = 0 @@ -89,23 +98,23 @@ var/const/BLOOD_VOLUME_SURVIVE = 40 if(prob(1)) var/word = pick("dizzy","woosey","faint") src << "\red You feel [word]" - if(oxyloss < 20) - oxyloss += 3 + if(getOxyLoss() < 20 * threshold_coef) + adjustOxyLoss(3 * dmg_coef) else if(blood_volume >= BLOOD_VOLUME_BAD) if(!pale) pale = 1 update_body() eye_blurry = max(eye_blurry,6) - if(oxyloss < 50) - oxyloss += 10 - oxyloss += 1 + if(getOxyLoss() < 50 * threshold_coef) + adjustOxyLoss(10 * dmg_coef) + adjustOxyLoss(1 * dmg_coef) if(prob(15)) Paralyse(rand(1,3)) var/word = pick("dizzy","woosey","faint") src << "\red You feel extremely [word]" else if(blood_volume >= BLOOD_VOLUME_SURVIVE) - oxyloss += 5 - toxloss += 3 + adjustOxyLoss(5 * dmg_coef) + adjustToxLoss(3 * dmg_coef) if(prob(15)) var/word = pick("dizzy","woosey","faint") src << "\red You feel extremely [word]" @@ -113,7 +122,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 40 // There currently is a strange bug here. If the mob is not below -100 health // when death() is called, apparently they will be just fine, and this way it'll // spam deathgasp. Adjusting toxloss ensures the mob will stay dead. - toxloss += 300 // just to be safe! + adjustToxLoss(300 * dmg_coef) // just to be safe! death() // Without enough blood you slowly go hungry. @@ -142,6 +151,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 40 blood_loss_divisor += 5 else if((temp.organ_tag == BP_L_HAND) || (temp.organ_tag == BP_R_HAND) || (temp.organ_tag == BP_L_FOOT) || (temp.organ_tag == BP_R_FOOT)) blood_loss_divisor += 10 + if(CE_STABLE in chem_effects) //Inaprov slows bloodloss + blood_loss_divisor += 10 if(temp.applied_pressure) if(ishuman(temp.applied_pressure)) var/mob/living/carbon/human/H = temp.applied_pressure diff --git a/code/modules/organs/internal/lungs.dm b/code/modules/organs/internal/lungs.dm index ab0b10ddf86..95759e7c370 100644 --- a/code/modules/organs/internal/lungs.dm +++ b/code/modules/organs/internal/lungs.dm @@ -28,5 +28,5 @@ /obj/item/organ/internal/lungs/proc/rupture() var/obj/item/organ/external/parent = owner.get_organ(parent_organ) if(istype(parent)) - owner.custom_pain("You feel a stabbing pain in your [parent.name]!", 1) + owner.custom_pain("You feel a stabbing pain in your [parent.name]!", 50) bruise() \ No newline at end of file diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index ce4103268fe..8de4a39ffe3 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -245,7 +245,7 @@ var/list/organ_cache = list() if(owner && parent_organ && amount > 0) var/obj/item/organ/external/parent = owner.get_organ(parent_organ) if(parent && !silent) - owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1) + owner.custom_pain("Something inside your [parent.name] hurts a lot.", amount) /obj/item/organ/proc/bruise() damage = max(damage, min_bruised_damage) @@ -270,9 +270,9 @@ var/list/organ_cache = list() return switch (severity) if (1) - take_damage(5) + take_damage(rand(3, 7)) if (2) - take_damage(2) + take_damage(rand(1, 3)) /obj/item/organ/proc/removed(var/mob/living/user) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index b5def772b59..c2a54b48694 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -104,9 +104,9 @@ return switch (severity) if (1) - take_damage(8) + take_damage(rand(6, 10)) if (2) - take_damage(4) + take_damage(rand(2, 6)) /obj/item/organ/external/attack_self(var/mob/living/user) if(!contents.len) @@ -479,7 +479,7 @@ This function completely restores a damaged organ to perfect condition. if((damage > 15) && (type != BURN) && (local_damage > 30) && prob(damage) && (robotic < ORGAN_ROBOT)) var/datum/wound/internal_bleeding/I = new (min(damage - 15, 15)) wounds += I - owner.custom_pain("You feel something rip in your [name]!", 1) + owner.custom_pain("You feel something rip in your [name]!", 50) //Burn damage can cause fluid loss due to blistering and cook-off if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT)) @@ -699,7 +699,7 @@ Note that amputating the affected organ does in fact remove the infection from t owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place. if(prob(1 * wound_update_accuracy)) - owner.custom_pain("You feel a stabbing pain in your [name]!",1) + owner.custom_pain("You feel a stabbing pain in your [name]!", 50) // slow healing var/heal_amt = 0 diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 6975e747d02..3ee5ff9992d 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -248,8 +248,9 @@ if(inflamed == 1) if(prob(5)) - owner << "You feel a stinging pain in your abdomen!" - owner.emote("me", 1, "winces slightly.") + if(owner.can_feel_pain()) + owner.custom_pain("You feel a stinging pain in your abdomen!") + owner.emote("me",1,"winces slightly.") if(inflamed > 1) if(prob(3)) owner << "You feel a stabbing pain in your abdomen!" @@ -258,10 +259,13 @@ if(inflamed > 2) if(prob(1)) owner.vomit() + if(owner.can_feel_pain()) + owner.emote("me",1,"winces painfully.") if(inflamed > 3) if(prob(1)) - owner << "Your abdomen is a world of pain!" - owner.Weaken(10) + if(owner.can_feel_pain()) + owner.custom_pain("You feel a stinging pain in your abdomen!", 100) + owner.Weaken(10) var/obj/item/organ/external/groin = owner.get_organ(BP_GROIN) var/datum/wound/W = new /datum/wound/internal_bleeding(20) diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index ea9499fc436..732491481fd 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -5,118 +5,73 @@ mob/var/list/pain_stored = list() mob/var/last_pain_message = "" mob/var/next_pain_time = 0 -// partname is the name of a body part -// amount is a num from 1 to 100 -mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0) - if(stat >= 1) - return - if(!can_feel_pain()) - return - if(analgesic > 40) - return - if(world.time < next_pain_time && !force) - return - if(amount > 10 && istype(src,/mob/living/carbon/human)) - if(src:paralysis) - src:paralysis = max(0, src:paralysis-round(amount/10)) - if(amount > 50 && prob(amount / 5)) - src:drop_item() - var/msg - if(burning) - switch(amount) - if(1 to 10) - msg = "Your [partname] burns." - if(11 to 90) - flash_weak_pain() - msg = "Your [partname] burns badly!" - if(91 to 10000) - flash_pain() - msg = "OH GOD! Your [partname] is on fire!" - else - switch(amount) - if(1 to 10) - msg = "Your [partname] hurts." - if(11 to 90) - flash_weak_pain() - msg = "Your [partname] hurts badly." - if(91 to 10000) - flash_pain() - msg = "OH GOD! Your [partname] is hurting terribly!" - if(msg && (msg != last_pain_message || prob(10))) - last_pain_message = msg - src << msg - next_pain_time = world.time + (100 - amount) - - // message is the custom message to be displayed -// flash_strength is 0 for weak pain flash, 1 for strong pain flash -mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength) - if(stat >= 1) - return - if(!can_feel_pain()) - return - if(reagents.has_reagent("tramadol")) - return - if(reagents.has_reagent("oxycodone")) - return - if(analgesic) - return - var/msg = "[message]" - if(flash_strength >= 1) - msg = "[message]" +// power decides how much painkillers will stop the message +// force means it ignores anti-spam timer +mob/living/carbon/proc/custom_pain(message, power, force) + if(!message || stat || !can_feel_pain() || chem_effects[CE_PAINKILLER] > power) + return 0 + message = "[message]" + if(power >= 50) + message = "[message]" // Anti message spam checks - if(msg && ((msg != last_pain_message) || (world.time >= next_pain_time))) - last_pain_message = msg - src << msg - next_pain_time = world.time + 100 + if(force || (message != last_pain_message) || (world.time >= next_pain_time)) + last_pain_message = message + src << message + next_pain_time = world.time + (100-power) mob/living/carbon/human/proc/handle_pain() - // not when sleeping + if(stat) + return - if(!can_feel_pain()) return + if(!can_feel_pain()) + return - if(stat >= 2) return - if(analgesic > 70) + if(world.time < next_pain_time) return var/maxdam = 0 var/obj/item/organ/external/damaged_organ = null for(var/obj/item/organ/external/E in organs) - if((E.status & ORGAN_DEAD) || E.robotic >= ORGAN_ROBOT) continue + if(!E.can_feel_pain()) continue var/dam = E.get_damage() // make the choice of the organ depend on damage, // but also sometimes use one of the less damaged ones if(dam > maxdam && (maxdam == 0 || prob(70)) ) damaged_organ = E maxdam = dam - if(damaged_organ) - pain(damaged_organ.name, maxdam, 0) + if(damaged_organ && chem_effects[CE_PAINKILLER] < maxdam) + if(maxdam > 10 && paralysis) + paralysis = max(0, paralysis - round(maxdam/10)) + if(maxdam > 50 && prob(maxdam / 5)) + drop_item() + var/burning = damaged_organ.burn_dam > damaged_organ.brute_dam + var/msg + switch(maxdam) + if(1 to 10) + msg = "Your [damaged_organ.name] [burning ? "burns" : "hurts"]." + if(11 to 90) + flash_weak_pain() + msg = "Your [damaged_organ.name] [burning ? "burns" : "hurts"] badly!" + if(91 to 10000) + flash_pain() + msg = "OH GOD! Your [damaged_organ.name] is [burning ? "on fire" : "hurting terribly"]!" + custom_pain(msg, maxdam, prob(10)) // Damage to internal organs hurts a lot. for(var/obj/item/organ/I in internal_organs) if((I.status & ORGAN_DEAD) || I.robotic >= ORGAN_ROBOT) continue if(I.damage > 2) if(prob(2)) var/obj/item/organ/external/parent = get_organ(I.parent_organ) - src.custom_pain("You feel a sharp pain in your [parent.name]", 1) + src.custom_pain("You feel a sharp pain in your [parent.name]", 50) - var/toxDamageMessage = null - var/toxMessageProb = 1 - switch(getToxLoss()) - if(1 to 5) - toxMessageProb = 1 - toxDamageMessage = "Your body stings slightly." - if(6 to 10) - toxMessageProb = 2 - toxDamageMessage = "Your whole body hurts a little." - if(11 to 15) - toxMessageProb = 2 - toxDamageMessage = "Your whole body hurts." - if(15 to 25) - toxMessageProb = 3 - toxDamageMessage = "Your whole body hurts badly." - if(26 to INFINITY) - toxMessageProb = 5 - toxDamageMessage = "Your body aches all over, it's driving you mad." - - if(toxDamageMessage && prob(toxMessageProb)) - src.custom_pain(toxDamageMessage, getToxLoss() >= 15) \ No newline at end of file + if(prob(2)) + switch(getToxLoss()) + if(1 to 10) + custom_pain("Your body stings slightly.", getToxLoss()) + if(11 to 30) + custom_pain("Your body hurts a little.", getToxLoss()) + if(31 to 60) + custom_pain("Your whole body hurts badly.", getToxLoss()) + if(61 to INFINITY) + custom_pain("Your body aches all over, it's driving you mad.", getToxLoss()) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 8bbb4ac9506..6f1442f0c5c 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -13,8 +13,8 @@ /datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) - M.add_chemical_effect(CE_STABLE) - M.add_chemical_effect(CE_PAINKILLER, 25) + M.add_chemical_effect(CE_STABLE, 15) + M.add_chemical_effect(CE_PAINKILLER, 10) /datum/reagent/bicaridine name = "Bicaridine" @@ -69,6 +69,29 @@ M.hallucination = max(0, M.hallucination - 9 * removed) M.adjustToxLoss(-4 * removed) +/datum/reagent/carthatoline + name = "carthatoline" + id = "carthatoline" + description = "Carthatoline is strong evacuant used to treat severe poisoning." + reagent_state = LIQUID + color = "#225722" + scannable = 1 + +/datum/reagent/carthatoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return + if(M.getToxLoss() && prob(10)) + M.vomit(1) + M.adjustToxLoss(-8 * removed) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/internal/liver/L = H.internal_organs_by_name[O_LIVER] + if(istype(L)) + if(L.robotic >= ORGAN_ROBOT) + return + if(L.damage > 0) + L.damage = max(L.damage - 2 * removed, 0) + /datum/reagent/dexalin name = "Dexalin" id = "dexalin" @@ -100,7 +123,7 @@ if(alien == IS_VOX) M.adjustToxLoss(removed * 9) else if(alien != IS_DIONA) - M.adjustOxyLoss(-300 * removed) + M.adjustOxyLoss(-150 * removed) holder.remove_reagent("lexorin", 3 * removed) @@ -166,7 +189,7 @@ mrate_static = TRUE /datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.add_chemical_effect(CE_PAINKILLER, 50) + M.add_chemical_effect(CE_PAINKILLER, 25) /datum/reagent/paracetamol/overdose(var/mob/living/carbon/M, var/alien) ..() @@ -202,6 +225,8 @@ /datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 200) + M.eye_blurry += 10 + M.confused += 5 /datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) ..() @@ -230,7 +255,7 @@ holder.remove_reagent("mindbreaker", 5) M.hallucination = max(0, M.hallucination - 10) M.adjustToxLoss(5 * removed) // It used to be incredibly deadly due to an oversight. Not anymore! - M.add_chemical_effect(CE_PAINKILLER, 40) + M.add_chemical_effect(CE_PAINKILLER, 20) /datum/reagent/alkysine name = "Alkysine" @@ -288,9 +313,60 @@ continue if(I.damage > 0) //Peridaxon heals only non-robotic organs I.damage = max(I.damage - removed, 0) + H.confused += 5 if(I.damage <= 5 && I.organ_tag == O_EYES) + H.eye_blurry += 10 //Eyes need to reset, or something H.sdisabilities &= ~BLIND +/datum/reagent/osteodaxon + name = "Osteodaxon" + id = "osteodaxon" + description = "An experimental drug used to heal bone fractures." + reagent_state = LIQUID + color = "#C9BCE3" + metabolism = REM * 0.5 + overdose = REAGENTS_OVERDOSE * 0.5 + scannable = 1 + +/datum/reagent/osteodaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return + M.heal_organ_damage(3 * removed, 0) //Gives the bones a chance to set properly even without other meds + if(ishuman(M)) + var/mob/living/carbon/human/H = M + for(var/obj/item/organ/external/O in H.bad_external_organs) + if(O.status & ORGAN_BROKEN) + O.mend_fracture() //Only works if the bone won't rebreak, as usual + H.custom_pain("You feel a terrible agony tear through your bones!",60) + H.AdjustWeakened(1) //Bones being regrown will knock you over + +/datum/reagent/myelamine + name = "Myelamine" + id = "myelamine" + description = "Used to rapidly clot internal hemorrhages by increasing the effectiveness of platelets." + reagent_state = LIQUID + color = "#4246C7" + metabolism = REM * 0.5 + overdose = REAGENTS_OVERDOSE * 0.5 + scannable = 1 + +/datum/reagent/plategen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return + M.eye_blurry += (3 * removed) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + for(var/obj/item/organ/external/O in H.bad_external_organs) + for(var/datum/wound/W in O.wounds) + if(W.bleeding()) + W.damage = max(W.damage - removed, 0) + if(W.damage <= 0) + O.wounds -= W + if(W.internal) + W.damage = max(W.damage - removed, 0) + if(W.damage <= 0) + O.wounds -= W + /datum/reagent/ryetalyn name = "Ryetalyn" id = "ryetalyn" @@ -342,6 +418,8 @@ scannable = 1 /datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return M.radiation = max(M.radiation - 30 * removed, 0) /datum/reagent/arithrazine @@ -355,6 +433,8 @@ scannable = 1 /datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return M.radiation = max(M.radiation - 70 * removed, 0) M.adjustToxLoss(-10 * removed) if(prob(60)) @@ -406,11 +486,35 @@ scannable = 1 /datum/reagent/leporazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return if(M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) else if(M.bodytemperature < 311) M.bodytemperature = min(310, M.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) +/datum/reagent/rezadone + name = "Rezadone" + id = "rezadone" + description = "A powder with almost magical properties, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." + reagent_state = SOLID + color = "#669900" + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/rezadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return + M.adjustCloneLoss(-20 * removed) + M.adjustOxyLoss(-2 * removed) + M.heal_organ_damage(20 * removed, 20 * removed) + M.adjustToxLoss(-20 * removed) + if(dose > 3) + M.status_flags &= ~DISFIGURED + if(dose > 10) + M.make_dizzy(5) + M.make_jittery(5) + /* Antidepressants */ #define ANTIDEPRESSANT_MESSAGE_DELAY 5*60*10 @@ -480,24 +584,4 @@ M << "Your mind feels much more stable." else M << "Your mind breaks apart..." - M.hallucination += 200 - -/datum/reagent/rezadone - name = "Rezadone" - id = "rezadone" - description = "A powder with almost magical properties, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." - reagent_state = SOLID - color = "#669900" - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/rezadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.adjustCloneLoss(-20 * removed) - M.adjustOxyLoss(-2 * removed) - M.heal_organ_damage(20 * removed, 20 * removed) - M.adjustToxLoss(-20 * removed) - if(dose > 3) - M.status_flags &= ~DISFIGURED - if(dose > 10) - M.make_dizzy(5) - M.make_jittery(5) + M.hallucination += 200 \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index bbaad03664e..d964f3be196 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -39,6 +39,13 @@ color = "#003333" strength = 10 +/datum/reagent/toxin/spidertoxin + name = "Spidertoxin" + id = "spidertoxin" + description = "A liquifying toxing produced by giant spiders." + color = "#2CE893" + strength = 5 + /datum/reagent/toxin/phoron name = "Phoron" id = "phoron" diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 4d7d13e5b31..20d18d6af30 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -160,6 +160,14 @@ required_reagents = list("silicon" = 1, "potassium" = 1, "nitrogen" = 1) result_amount = 3 +/datum/chemical_reaction/carthatoline + name = "Carthatoline" + id = "carthatoline" + result = "carthatoline" + required_reagents = list("dylovene" = 1, "carbon" = 2, "phoron" = 0.1) + catalysts = list("phoron" = 1) + result_amount = 2 + /datum/chemical_reaction/tramadol name = "Tramadol" id = "tramadol" @@ -282,6 +290,15 @@ catalysts = list("phoron" = 5) result_amount = 2 +/datum/chemical_reaction/osteodaxon + name = "Osteodaxon" + id = "osteodaxon" + result = "osteodaxon" + required_reagents = list("bicaridine" = 2, "phoron" = 0.1, "carpotoxin" = 1) + catalysts = list("phoron" = 5) + inhibitors = list("clonexadone" = 1) // Messes with cryox + result_amount = 2 + /datum/chemical_reaction/virus_food name = "Virus Food" id = "virusfood" @@ -349,6 +366,13 @@ inhibitors = list("sugar" = 1) // Messes up with inaprovaline result_amount = 2 +/datum/chemical_reaction/escharamine + name = "Myelamine" + id = "myelamine" + result = "myelamine" + required_reagents = list("bicaridine" = 1, "iron" = 2, "spidertoxin" = 1) + result_amount = 2 + /datum/chemical_reaction/hyperzine name = "Hyperzine" id = "hyperzine" diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 33660f28c72..2da4b59ee25 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -713,6 +713,19 @@ reagents.add_reagent("pacid",6) src.bitesize = 6 +/obj/item/weapon/reagent_containers/food/snacks/spidermeat + name = "meat" + desc = "A slab of green meat." + icon_state = "xenomeat" + filling_color = "#43DE18" + center_of_mass = list("x"=16, "y"=10) + +/obj/item/weapon/reagent_containers/food/snacks/spidermeat/New() + ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("spidertoxin",6) + src.bitesize = 6 + /obj/item/weapon/reagent_containers/food/snacks/meatball name = "meatball" desc = "A great meal all round." diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 771ce4cc274..e9e3c62dada 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -88,3 +88,33 @@ user << "It is currently loaded." else user << "It is spent." + +/obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting + name = "clotting agent" + desc = "A rapid and safe way to administer clotting drugs by untrained or trained personnel." + icon_state = "autoinjector" + item_state = "autoinjector" + amount_per_transfer_from_this = 10 + volume = 10 + +/obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting/New() + ..() + reagents.remove_reagent("inaprovaline", 5) + reagents.add_reagent("myelamine", 10) + update_icon() + return + +/obj/item/weapon/reagent_containers/hypospray/autoinjector/bonemed + name = "bone repair injector" + desc = "A rapid and safe way to administer advanced drugs by untrained or trained personnel." + icon_state = "autoinjector" + item_state = "autoinjector" + amount_per_transfer_from_this = 10 + volume = 10 + +/obj/item/weapon/reagent_containers/hypospray/autoinjector/bonemed/New() + ..() + reagents.remove_reagent("inaprovaline", 5) + reagents.add_reagent("osteodaxon", 10) + update_icon() + return \ No newline at end of file diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index bf147afd7e9..a76bed18e68 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -50,7 +50,7 @@ var/public_alert = 0 //Stick to Engineering frequency except for big warnings when integrity bad var/warning_point = 100 var/warning_alert = "Danger! Crystal hyperstructure instability!" - var/emergency_point = 700 + var/emergency_point = 500 var/emergency_alert = "CRYSTAL DELAMINATION IMMINENT." var/explosion_point = 1000 diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index 015661351fd..80a7a1f8209 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -25,7 +25,7 @@ if (affected.stage == 0) user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool]." , \ "You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].") - target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1) + target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -58,7 +58,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to set the bone in [target]'s [affected.name] in place with \the [tool]." , \ "You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].") - target.custom_pain("The pain in your [affected.name] is going to make you pass out!",1) + target.custom_pain("The pain in your [affected.name] is going to make you pass out!", 50) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index 51200b52bf5..abcc0621dac 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -38,7 +38,7 @@ user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \ "You begin to cut through [target]'s [affected.encased] with \the [tool].") - target.custom_pain("Something hurts horribly in your [affected.name]!",1) + target.custom_pain("Something hurts horribly in your [affected.name]!", 60) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -88,7 +88,7 @@ var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]." var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]." user.visible_message(msg, self_msg) - target.custom_pain("Something hurts horribly in your [affected.name]!",1) + target.custom_pain("Something hurts horribly in your [affected.name]!", 40) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -145,7 +145,7 @@ var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]." var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]." user.visible_message(msg, self_msg) - target.custom_pain("Something hurts horribly in your [affected.name]!",1) + target.custom_pain("Something hurts horribly in your [affected.name]!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -202,7 +202,7 @@ var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]." var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]." user.visible_message(msg, self_msg) - target.custom_pain("Something hurts horribly in your [affected.name]!",1) + target.custom_pain("Something hurts horribly in your [affected.name]!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 81a105a5443..513b6096dc9 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -42,7 +42,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].", \ "You start the bloodless incision on [target]'s [affected.name] with \the [tool].") - target.custom_pain("You feel a horrible, searing pain in your [affected.name]!",1) + target.custom_pain("You feel a horrible, searing pain in your [affected.name]!", 50) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -81,7 +81,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].", \ "You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].") - target.custom_pain("You feel a horrible, searing pain in your [affected.name] as it is pushed apart!",1) + target.custom_pain("You feel a horrible, searing pain in your [affected.name] as it is pushed apart!", 50) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -124,7 +124,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \ "You start the incision on [target]'s [affected.name] with \the [tool].") - target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!",1) + target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!", 40) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -163,7 +163,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \ "You start clamping bleeders in [target]'s [affected.name] with \the [tool].") - target.custom_pain("The pain in your [affected.name] is maddening!",1) + target.custom_pain("The pain in your [affected.name] is maddening!", 40) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -205,7 +205,7 @@ msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." user.visible_message(msg, self_msg) - target.custom_pain("It feels like the skin on your [affected.name] is on fire!",1) + target.custom_pain("It feels like the skin on your [affected.name] is on fire!", 40) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -254,7 +254,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \ "You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].") - target.custom_pain("Your [affected.name] is being burned!",1) + target.custom_pain("Your [affected.name] is being burned!", 40) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -295,7 +295,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \ "You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].") - target.custom_pain("Your [affected.amputation_point] is being ripped apart!",1) + target.custom_pain("Your [affected.amputation_point] is being ripped apart!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 6abe4c36460..205089773d5 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -56,7 +56,7 @@ user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ "You start treating damage to [target]'s [I.name] with [tool_name]." ) - target.custom_pain("The pain in your [affected.name] is living hell!",1) + target.custom_pain("The pain in your [affected.name] is living hell!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -146,7 +146,7 @@ user.visible_message("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool].", \ "You start to separate [target]'s [target.op_stage.current_organ] with \the [tool]." ) - target.custom_pain("The pain in your [affected.name] is living hell!",1) + target.custom_pain("The pain in your [affected.name] is living hell!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -197,7 +197,7 @@ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool].", \ "You start removing [target]'s [target.op_stage.current_organ] with \the [tool].") - target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!",1) + target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -271,7 +271,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \ "You start transplanting \the [tool] into [target]'s [affected.name].") - target.custom_pain("Someone's rooting around in your [affected.name]!",1) + target.custom_pain("Someone's rooting around in your [affected.name]!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -322,7 +322,7 @@ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \ "You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].") - target.custom_pain("Someone's digging needles into your [target.op_stage.current_organ]!",1) + target.custom_pain("Someone's digging needles into your [target.op_stage.current_organ]!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 303dcfc141a..e9fe4299ff8 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -33,7 +33,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.name] with \the [tool]." , \ "You start patching the damaged vein in [target]'s [affected.name] with \the [tool].") - target.custom_pain("The pain in [affected.name] is unbearable!",1) + target.custom_pain("The pain in [affected.name] is unbearable!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -81,7 +81,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \ "You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].") - target.custom_pain("The pain in [affected.name] is unbearable!",1) + target.custom_pain("The pain in [affected.name] is unbearable!", 100) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -133,7 +133,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \ "You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].") - target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1) + target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 8ca82b96a17..5243bae35f6 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -121,13 +121,11 @@ stage = 4 badness = 3 activate(var/mob/living/carbon/mob,var/multiplier) - mob.suiciding = 1 + mob.suiciding = 30 //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while viewers(mob) << "\red [mob.name] is holding \his breath. It looks like \he's trying to commit suicide." mob.adjustOxyLoss(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss() - mob.getOxyLoss()) mob.updatehealth() - spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds - mob.suiciding = 0 /datum/disease2/effect/killertoxins name = "Toxification Syndrome"