Painkillers now actually induce analgesic effects (#81335)

## About The Pull Request

This adds a new trait, `TRAIT_ANALGESIA`, and makes various painkillers
(+ tenacity trauma) apply said trait.

This prevents various pain-related effects, such as screaming due to
pain, and also provides a speed bonus during surgery.

## Why It's Good For The Game

Gives more of an incentive to actually use reagents such as morphine or
miner's salve.

## Changelog
🆑
add: Painkillers (i.e morphine, miner's salve) now actually induce
analgesic effects, preventing various pain-related effects, such as
screaming due to pain, and also provides a speed bonus during surgery.
add: The tenacity trauma (traumatic neuropathy) also applies analgesic
effects.
refactor: Simplified code related to reagents adding traits.
/🆑
This commit is contained in:
Lucy
2024-02-14 01:01:06 +01:00
committed by GitHub
parent 027b82044f
commit 081b84c631
19 changed files with 118 additions and 256 deletions
+2
View File
@@ -425,6 +425,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_FOV_APPLIED "fov_applied"
/// Mob is using the scope component
#define TRAIT_USER_SCOPED "user_scoped"
/// Mob is unable to feel pain
#define TRAIT_ANALGESIA "analgesia"
/// Trait added when a revenant is visible.
#define TRAIT_REVENANT_REVEALED "revenant_revealed"
+1
View File
@@ -118,6 +118,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_ALLOW_HERETIC_CASTING" = TRAIT_ALLOW_HERETIC_CASTING,
"TRAIT_ALWAYS_NO_ACCESS" = TRAIT_ALWAYS_NO_ACCESS,
"TRAIT_ALWAYS_WANTED" = TRAIT_ALWAYS_WANTED,
"TRAIT_ANALGESIA" = TRAIT_ANALGESIA,
"TRAIT_ANGELIC" = TRAIT_ANGELIC,
"TRAIT_ANTENNAE" = TRAIT_ANTENNAE,
"TRAIT_ANTICONVULSANT" = TRAIT_ANTICONVULSANT,
+2 -2
View File
@@ -267,11 +267,11 @@
lose_text = span_warning("You realize you can feel pain again.")
/datum/brain_trauma/special/tenacity/on_gain()
owner.add_traits(list(TRAIT_NOSOFTCRIT, TRAIT_NOHARDCRIT), TRAUMA_TRAIT)
owner.add_traits(list(TRAIT_NOSOFTCRIT, TRAIT_NOHARDCRIT, TRAIT_ANALGESIA), TRAUMA_TRAIT)
..()
/datum/brain_trauma/special/tenacity/on_lose()
owner.remove_traits(list(TRAIT_NOSOFTCRIT, TRAIT_NOHARDCRIT), TRAUMA_TRAIT)
owner.remove_traits(list(TRAIT_NOSOFTCRIT, TRAIT_NOHARDCRIT, TRAIT_ANALGESIA), TRAUMA_TRAIT)
..()
/datum/brain_trauma/special/death_whispers
@@ -92,6 +92,12 @@
mood_change = -3
timeout = 2 MINUTES
/datum/mood_event/reattachment/New(mob/M, ...)
if(HAS_TRAIT(M, TRAIT_ANALGESIA))
qdel(src)
return
return ..()
/datum/mood_event/reattachment/add_effects(obj/item/bodypart/limb)
if(limb)
description = "Ouch! My [limb.plaintext_zone] feels like I fell asleep on it."
@@ -122,6 +128,12 @@
mood_change = -3
timeout = 3 MINUTES
/datum/mood_event/table_limbsmash/New(mob/M, ...)
if(HAS_TRAIT(M, TRAIT_ANALGESIA))
qdel(src)
return
return ..()
/datum/mood_event/table_limbsmash/add_effects(obj/item/bodypart/banged_limb)
if(banged_limb)
description = "My fucking [banged_limb.plaintext_zone], man that hurts..."
@@ -194,6 +206,12 @@
mood_change = -5
timeout = 60 SECONDS
/datum/mood_event/painful_medicine/New(mob/M, ...)
if(HAS_TRAIT(M, TRAIT_ANALGESIA))
qdel(src)
return
return ..()
/datum/mood_event/spooked
description = "The rattling of those bones... It still haunts me."
mood_change = -4
@@ -231,6 +249,12 @@
description = "Bags never sit right on my back, this hurts like hell!"
mood_change = -15
/datum/mood_event/back_pain/New(mob/M, ...)
if(HAS_TRAIT(M, TRAIT_ANALGESIA))
qdel(src)
return
return ..()
/datum/mood_event/sad_empath
description = "Someone seems upset..."
mood_change = -1
+5 -16
View File
@@ -413,22 +413,11 @@
user.visible_message(span_notice("[user] finishes applying [I] to [victim]'s [limb.plaintext_zone], emitting a fizzing noise!"), span_notice("You finish applying [I] to [victim]'s [limb.plaintext_zone]!"), ignored_mobs=victim)
to_chat(victim, span_userdanger("[user] finishes applying [I] to your [limb.plaintext_zone], and you can feel the bones exploding with pain as they begin melting and reforming!"))
else
var/painkiller_bonus = 0
if(victim.get_drunk_amount() > 10)
painkiller_bonus += 10
if(victim.reagents.has_reagent(/datum/reagent/medicine/morphine))
painkiller_bonus += 20
if(victim.reagents.has_reagent(/datum/reagent/determination))
painkiller_bonus += 10
if(victim.reagents.has_reagent(/datum/reagent/consumable/ethanol/painkiller))
painkiller_bonus += 15
if(victim.reagents.has_reagent(/datum/reagent/medicine/mine_salve))
painkiller_bonus += 20
if(prob(25 + (20 * (severity - 2)) - painkiller_bonus)) // 25%/45% chance to fail self-applying with severe and critical wounds, modded by painkillers
victim.visible_message(span_danger("[victim] fails to finish applying [I] to [victim.p_their()] [limb.plaintext_zone], passing out from the pain!"), span_notice("You pass out from the pain of applying [I] to your [limb.plaintext_zone] before you can finish!"))
victim.AdjustUnconscious(5 SECONDS)
return TRUE
if(!HAS_TRAIT(victim, TRAIT_ANALGESIA))
if(prob(25 + (20 * (severity - 2)) - min(victim.get_drunk_amount(), 10))) // 25%/45% chance to fail self-applying with severe and critical wounds, modded by drunkenness
victim.visible_message(span_danger("[victim] fails to finish applying [I] to [victim.p_their()] [limb.plaintext_zone], passing out from the pain!"), span_notice("You pass out from the pain of applying [I] to your [limb.plaintext_zone] before you can finish!"))
victim.AdjustUnconscious(5 SECONDS)
return TRUE
victim.visible_message(span_notice("[victim] finishes applying [I] to [victim.p_their()] [limb.plaintext_zone], grimacing from the pain!"), span_notice("You finish applying [I] to your [limb.plaintext_zone], and your bones explode in pain!"))
limb.receive_damage(25, wound_bonus=CANT_WOUND)
@@ -81,10 +81,14 @@
only_forced_audio = TRUE
vary = TRUE
/datum/emote/carbon/human/scream/run_emote(mob/user, params, type_override, intentional = FALSE)
if(!intentional && HAS_TRAIT(user, TRAIT_ANALGESIA))
return
return ..()
/datum/emote/living/carbon/human/scream/get_sound(mob/living/carbon/human/user)
if(!istype(user))
return
return user.dna.species.get_scream_sound(user)
/datum/emote/living/carbon/human/scream/screech //If a human tries to screech it'll just scream.
+5
View File
@@ -342,6 +342,11 @@
emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE
mob_type_blacklist_typecache = list(/mob/living/carbon/human) //Humans get specialized scream.
/datum/emote/living/scream/run_emote(mob/user, params, type_override, intentional = FALSE)
if(!intentional && HAS_TRAIT(user, TRAIT_ANALGESIA))
return
return ..()
/datum/emote/living/scream/select_message_type(mob/user, message, intentional)
. = ..()
if(!intentional && isanimal_or_basicmob(user))
+12 -4
View File
@@ -74,6 +74,10 @@
/// The affected respiration type, if the reagent damages/heals oxygen damage of an affected mob.
/// See "Mob bio-types flags" in /code/_DEFINES/mobs.dm
var/affected_respiration_type = ALL
/// A list of traits to apply while the reagent is being metabolized.
var/list/metabolized_traits
/// A list of traits to apply while the reagent is in a mob.
var/list/added_traits
///The default reagent container for the reagent, used for icon generation
var/obj/item/reagent_containers/default_container = /obj/item/reagent_containers/cup/bottle
@@ -191,20 +195,24 @@ Primarily used in reagents/reaction_agents
/// Called when this reagent is first added to a mob
/datum/reagent/proc/on_mob_add(mob/living/affected_mob, amount)
overdose_threshold /= max(normalise_creation_purity(), 1) //Maybe??? Seems like it would help pure chems be even better but, if I normalised this to 1, then everything would take a 25% reduction
return
if(added_traits)
affected_mob.add_traits(added_traits, "base:[type]")
/// Called when this reagent is removed while inside a mob
/datum/reagent/proc/on_mob_delete(mob/living/affected_mob)
affected_mob.clear_mood_event("[type]_overdose")
return
REMOVE_TRAITS_IN(affected_mob, "base:[type]")
/// Called when this reagent first starts being metabolized by a liver
/datum/reagent/proc/on_mob_metabolize(mob/living/affected_mob)
return
SHOULD_CALL_PARENT(TRUE)
if(metabolized_traits)
affected_mob.add_traits(metabolized_traits, "metabolize:[type]")
/// Called when this reagent stops being metabolized by a liver
/datum/reagent/proc/on_mob_end_metabolize(mob/living/affected_mob)
return
SHOULD_CALL_PARENT(TRUE)
REMOVE_TRAITS_IN(affected_mob, "metabolize:[type]")
/**
* Called when a reagent is inside of a mob when they are dead if the reagent has the REAGENT_DEAD_PROCESS flag
@@ -23,16 +23,15 @@
color = "90560B"
taste_description = "minty"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
metabolized_traits = list(TRAIT_RESISTHEAT)
/datum/reagent/halon/on_mob_metabolize(mob/living/breather)
. = ..()
breather.add_movespeed_modifier(/datum/movespeed_modifier/reagent/halon)
ADD_TRAIT(breather, TRAIT_RESISTHEAT, type)
/datum/reagent/halon/on_mob_end_metabolize(mob/living/breather)
. = ..()
breather.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/halon)
REMOVE_TRAIT(breather, TRAIT_RESISTHEAT, type)
/datum/reagent/healium
name = "Healium"
@@ -81,14 +80,7 @@
ph = 1.8
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
addiction_types = list(/datum/addiction/stimulants = 14)
/datum/reagent/nitrium_high_metabolization/on_mob_metabolize(mob/living/breather)
. = ..()
ADD_TRAIT(breather, TRAIT_SLEEPIMMUNE, type)
/datum/reagent/nitrium_high_metabolization/on_mob_end_metabolize(mob/living/breather)
. = ..()
REMOVE_TRAIT(breather, TRAIT_SLEEPIMMUNE, type)
metabolized_traits = list(TRAIT_SLEEPIMMUNE)
/datum/reagent/nitrium_high_metabolization/on_mob_life(mob/living/carbon/breather, seconds_per_tick, times_fired)
. = ..()
@@ -584,8 +584,10 @@
if(affected_mob.health <= (affected_mob.crit_threshold + HEALTH_THRESHOLD_FULLCRIT*(2*normalise_creation_purity()))) //certain death below this threshold
REMOVE_TRAIT(affected_mob, TRAIT_STABLEHEART, type) //we have to remove the stable heart trait before we give them a heart attack
to_chat(affected_mob,span_danger("You feel something rupturing inside your chest!"))
affected_mob.emote("scream")
affected_mob.remove_traits(subject_traits, type)
to_chat(affected_mob, span_danger("You feel something rupturing inside your chest!"))
if(!HAS_TRAIT(affected_mob, TRAIT_ANALGESIA))
affected_mob.emote("scream")
affected_mob.set_heartattack(TRUE)
volume = 0
if(need_mob_update)
@@ -158,6 +158,7 @@
drinker.add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY)
/datum/reagent/consumable/ethanol/beer/green/on_mob_end_metabolize(mob/living/drinker)
. = ..()
drinker.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, color)
/datum/reagent/consumable/ethanol/beer/green/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
@@ -684,6 +685,7 @@
taste_description = "alcoholic bravery"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_EASY
metabolized_traits = list(TRAIT_FEARLESS, TRAIT_ANALGESIA)
var/tough_text
/datum/reagent/consumable/ethanol/brave_bull/on_mob_metabolize(mob/living/drinker)
@@ -692,14 +694,12 @@
to_chat(drinker, span_notice("You feel [tough_text]!"))
drinker.maxHealth += 10 //Brave Bull makes you sturdier, and thus capable of withstanding a tiny bit more punishment.
drinker.health += 10
ADD_TRAIT(drinker, TRAIT_FEARLESS, type)
/datum/reagent/consumable/ethanol/brave_bull/on_mob_end_metabolize(mob/living/drinker)
. = ..()
to_chat(drinker, span_notice("You no longer feel [tough_text]."))
drinker.maxHealth -= 10
drinker.health = min(drinker.health - 10, drinker.maxHealth) //This can indeed crit you if you're alive solely based on alchol ingestion
REMOVE_TRAIT(drinker, TRAIT_FEARLESS, type)
/datum/reagent/consumable/ethanol/tequila_sunrise
name = "Tequila Sunrise"
@@ -1073,15 +1073,11 @@
quality = DRINK_VERYGOOD
taste_description = "concentrated matter"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_MADNESS_IMMUNE)
var/static/list/ray_filter = list(type = "rays", size = 40, density = 15, color = SUPERMATTER_SINGULARITY_RAYS_COLOUR, factor = 15)
/datum/reagent/consumable/ethanol/singulo/on_mob_metabolize(mob/living/drinker)
. = ..()
ADD_TRAIT(drinker, TRAIT_MADNESS_IMMUNE, type)
/datum/reagent/consumable/ethanol/singulo/on_mob_end_metabolize(mob/living/drinker)
. = ..()
REMOVE_TRAIT(drinker, TRAIT_MADNESS_IMMUNE, type)
drinker.remove_filter("singulo_rays")
/datum/reagent/consumable/ethanol/singulo/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, times_fired)
@@ -2173,14 +2169,7 @@
quality = DRINK_GOOD
taste_description = "artifical fruityness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/ethanol/rubberneck/on_mob_metabolize(mob/living/drinker)
. = ..()
ADD_TRAIT(drinker, TRAIT_SHOCKIMMUNE, type)
/datum/reagent/consumable/ethanol/rubberneck/on_mob_end_metabolize(mob/living/drinker)
REMOVE_TRAIT(drinker, TRAIT_SHOCKIMMUNE, type)
return ..()
metabolized_traits = list(TRAIT_SHOCKIMMUNE)
/datum/reagent/consumable/ethanol/duplex
name = "Duplex"
@@ -2260,6 +2249,7 @@
quality = DRINK_NICE
taste_description = "sugary tartness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_ANALGESIA)
/datum/reagent/consumable/ethanol/pina_colada
name = "Pina Colada"
@@ -2642,20 +2632,13 @@
/datum/reagent/consumable/ethanol/telepole
name = "Telepole"
description = "A grounding rod in the form of a drink. Recharges ethereals, and gives temporary shock resistance."
description = "A grounding rod in the form of a drink. Recharges ethereals, and gives temporary shock resistance."
boozepwr = 50
color = "#b300ff"
quality = DRINK_NICE
taste_description = "the howling storm"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/ethanol/telepole/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_SHOCKIMMUNE, type)
/datum/reagent/consumable/ethanol/telepole/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_SHOCKIMMUNE, type)
metabolized_traits = list(TRAIT_SHOCKIMMUNE)
/datum/reagent/consumable/ethanol/telepole/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume) //can't be on life because of the way blood works.
. = ..()
@@ -497,19 +497,15 @@
quality = DRINK_VERYGOOD
taste_description = "carbonated oil"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_SHOCKIMMUNE)
/datum/reagent/consumable/grey_bull/on_mob_metabolize(mob/living/carbon/affected_atom)
. = ..()
ADD_TRAIT(affected_atom, TRAIT_SHOCKIMMUNE, type)
var/obj/item/organ/internal/liver/liver = affected_atom.get_organ_slot(ORGAN_SLOT_LIVER)
if(HAS_TRAIT(liver, TRAIT_MAINTENANCE_METABOLISM))
affected_atom.add_mood_event("maintenance_fun", /datum/mood_event/maintenance_high)
metabolization_rate *= 0.8
/datum/reagent/consumable/grey_bull/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_SHOCKIMMUNE, type)
/datum/reagent/consumable/grey_bull/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
affected_mob.set_jitter_if_lower(40 SECONDS * REM * seconds_per_tick)
@@ -5,6 +5,7 @@
var/trippy = TRUE //Does this drug make you trip?
/datum/reagent/drug/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
if(trippy)
affected_mob.clear_mood_event("[type]_high")
@@ -214,13 +215,13 @@
overdose_threshold = 20
taste_description = "salt" // because they're bathsalts?
addiction_types = list(/datum/addiction/stimulants = 25) //8 per 2 seconds
var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage
ph = 8.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STUNIMMUNE, TRAIT_SLEEPIMMUNE, TRAIT_ANALGESIA)
var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage
/datum/reagent/drug/bath_salts/on_mob_metabolize(mob/living/affected_mob)
. = ..()
affected_mob.add_traits(list(TRAIT_STUNIMMUNE, TRAIT_SLEEPIMMUNE), type)
if(iscarbon(affected_mob))
var/mob/living/carbon/carbon_mob = affected_mob
rage = new()
@@ -228,7 +229,6 @@
/datum/reagent/drug/bath_salts/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
affected_mob.remove_traits(list(TRAIT_STUNIMMUNE, TRAIT_SLEEPIMMUNE), type)
if(rage)
QDEL_NULL(rage)
@@ -290,15 +290,14 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
taste_description = "paint thinner"
addiction_types = list(/datum/addiction/hallucinogens = 18)
metabolized_traits = list(TRAIT_FEARLESS, TRAIT_ANALGESIA)
/datum/reagent/drug/happiness/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_FEARLESS, type)
affected_mob.add_mood_event("happiness_drug", /datum/mood_event/happiness_drug)
/datum/reagent/drug/happiness/on_mob_delete(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_FEARLESS, type)
affected_mob.clear_mood_event("happiness_drug")
/datum/reagent/drug/happiness/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
@@ -335,19 +334,15 @@
overdose_threshold = 30
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 6) //2.6 per 2 seconds
metabolized_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_ANALGESIA)
/datum/reagent/drug/pumpup/on_mob_metabolize(mob/living/carbon/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
var/obj/item/organ/internal/liver/liver = affected_mob.get_organ_slot(ORGAN_SLOT_LIVER)
if(liver && HAS_TRAIT(liver, TRAIT_MAINTENANCE_METABOLISM))
affected_mob.add_mood_event("maintenance_fun", /datum/mood_event/maintenance_high)
metabolization_rate *= 0.8
/datum/reagent/drug/pumpup/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
/datum/reagent/drug/pumpup/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
affected_mob.set_jitter_if_lower(10 SECONDS * REM * seconds_per_tick)
@@ -432,20 +427,13 @@
overdose_threshold = 25
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/maintenance_drugs = 8)
/datum/reagent/drug/maint/sludge/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob,TRAIT_HARDLY_WOUNDED,type)
metabolized_traits = list(TRAIT_HARDLY_WOUNDED, TRAIT_ANALGESIA)
/datum/reagent/drug/maint/sludge/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
if(affected_mob.adjustToxLoss(0.5 * REM * seconds_per_tick, required_biotype = affected_biotype))
return UPDATE_MOB_HEALTH
/datum/reagent/drug/maint/sludge/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_HARDLY_WOUNDED,type)
/datum/reagent/drug/maint/sludge/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = ..()
if(!iscarbon(affected_mob))
@@ -525,14 +525,7 @@
taste_description = "garlic"
metabolization_rate = 0.15 * REAGENTS_METABOLISM
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/garlic/on_mob_add(mob/living/affected_mob, amount)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_GARLIC_BREATH, type)
/datum/reagent/consumable/garlic/on_mob_delete(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_GARLIC_BREATH, type)
added_traits = list(TRAIT_GARLIC_BREATH)
/datum/reagent/consumable/garlic/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -847,14 +847,7 @@ Basically, we fill the time between now and 2s from now with hands based off the
ph = 4.5
metabolization_rate = 0.08 * REM
tox_damage = 0
/datum/reagent/inverse/salbutamol/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_EASYBLEED, type)
/datum/reagent/inverse/salbutamol/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_EASYBLEED, type)
metabolized_traits = list(TRAIT_EASYBLEED)
/datum/reagent/inverse/pen_acid
name = "Pendetide"
@@ -41,6 +41,7 @@
color = "#E0BB00" //golden for the gods
taste_description = "badmins"
chemical_flags = REAGENT_DEAD_PROCESS
metabolized_traits = list(TRAIT_ANALGESIA)
/// Flags to fullheal every metabolism tick
var/full_heal_flags = ~(HEAL_BRUTE|HEAL_BURN|HEAL_TOX|HEAL_RESTRAINTS|HEAL_REFRESH_ORGANS)
@@ -252,14 +253,7 @@
metabolization_rate = 0.1 * REAGENTS_METABOLISM
ph = 8.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/spaceacillin/on_mob_add(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_VIRUS_RESISTANCE, type)
/datum/reagent/medicine/spaceacillin/on_mob_delete(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_VIRUS_RESISTANCE, type)
added_traits = list(TRAIT_VIRUS_RESISTANCE)
//Goon Chems. Ported mainly from Goonstation. Easily mixable (or not so easily) and provide a variety of effects.
@@ -349,6 +343,7 @@
metabolization_rate = 0.4 * REAGENTS_METABOLISM
ph = 2.6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_AFFECTS_WOUNDS
metabolized_traits = list(TRAIT_ANALGESIA)
/datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -496,14 +491,7 @@
metabolization_rate = 2 * REAGENTS_METABOLISM
ph = 12 //It's a reducing agent
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/potass_iodide/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
/datum/reagent/medicine/potass_iodide/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
metabolized_traits = list(TRAIT_HALT_RADIATION_EFFECTS)
/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -521,14 +509,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
inverse_chem_val = 0.4
inverse_chem = /datum/reagent/inverse/pen_acid
/datum/reagent/medicine/pen_acid/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
/datum/reagent/medicine/pen_acid/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
metabolized_traits = list(TRAIT_HALT_RADIATION_EFFECTS)
/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -603,16 +584,15 @@
addiction_types = list(/datum/addiction/stimulants = 4) //1.6 per 2 seconds
inverse_chem = /datum/reagent/inverse/corazargh
inverse_chem_val = 0.4
metabolized_traits = list(TRAIT_BATON_RESISTANCE)
/datum/reagent/medicine/ephedrine/on_mob_metabolize(mob/living/affected_mob)
. = ..()
affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
ADD_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
/datum/reagent/medicine/ephedrine/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
REMOVE_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -668,6 +648,7 @@
ph = 8.96
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/opioids = 10)
metabolized_traits = list(TRAIT_ANALGESIA)
/datum/reagent/medicine/morphine/on_mob_metabolize(mob/living/affected_mob)
. = ..()
@@ -820,14 +801,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
inverse_chem_val = 0.35
inverse_chem = /datum/reagent/inverse/atropine
/datum/reagent/medicine/atropine/on_mob_add(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION, "[type]")
/datum/reagent/medicine/atropine/on_mob_delete(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION, "[type]")
added_traits = list(TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION)
/datum/reagent/medicine/atropine/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -863,14 +837,7 @@
overdose_threshold = 30
ph = 10.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/epinephrine/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_NOCRITDAMAGE, type)
/datum/reagent/medicine/epinephrine/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_NOCRITDAMAGE, type)
metabolized_traits = list(TRAIT_NOCRITDAMAGE)
/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -1039,21 +1006,13 @@
purity = REAGENT_STANDARD_PURITY
inverse_chem = /datum/reagent/inverse
inverse_chem_val = 0.45
metabolized_traits = list(TRAIT_TUMOR_SUPPRESSED) //Having mannitol in you will pause the brain damage from brain tumor (so it heals an even 2 brain damage instead of 1.8)
/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
if(affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2 * REM * seconds_per_tick * normalise_creation_purity(), required_organ_flag = affected_organ_flags))
return UPDATE_MOB_HEALTH
//Having mannitol in you will pause the brain damage from brain tumor (so it heals an even 2 brain damage instead of 1.8)
/datum/reagent/medicine/mannitol/on_mob_metabolize(mob/living/carbon/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC)
/datum/reagent/medicine/mannitol/on_mob_end_metabolize(mob/living/carbon/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC)
/datum/reagent/medicine/mannitol/overdose_start(mob/living/affected_mob)
. = ..()
to_chat(affected_mob, span_notice("You suddenly feel <span class='purple'>E N L I G H T E N E D!</span>"))
@@ -1080,12 +1039,12 @@
purity = REAGENT_STANDARD_PURITY
inverse_chem_val = 0.5
inverse_chem = /datum/reagent/inverse/neurine
added_traits = list(TRAIT_ANTICONVULSANT)
///brain damage level when we first started taking the chem
var/initial_bdamage = 200
/datum/reagent/medicine/neurine/on_mob_add(mob/living/affected_mob, amount)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_ANTICONVULSANT, name)
if(!iscarbon(affected_mob))
return
var/mob/living/carbon/affected_carbon = affected_mob
@@ -1094,7 +1053,6 @@
/datum/reagent/medicine/neurine/on_mob_delete(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_ANTICONVULSANT, name)
if(!iscarbon(affected_mob))
return
var/mob/living/carbon/affected_carbon = affected_mob
@@ -1172,16 +1130,15 @@
ph = 8.7
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
addiction_types = list(/datum/addiction/stimulants = 4) //0.8 per 2 seconds
metabolized_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_ANALGESIA)
/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/affected_mob)
. = ..()
affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/stimulants)
ADD_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
/datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/stimulants)
REMOVE_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
/datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -1298,6 +1255,7 @@
ph = 11
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/hallucinogens = 14)
metabolized_traits = list(TRAIT_PACIFISM)
/datum/reagent/medicine/earthsblood/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -1323,14 +1281,6 @@
if(need_mob_update)
return UPDATE_MOB_HEALTH
/datum/reagent/medicine/earthsblood/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_PACIFISM, type)
/datum/reagent/medicine/earthsblood/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_PACIFISM, type)
/datum/reagent/medicine/earthsblood/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = ..()
affected_mob.adjust_hallucinations_up_to(10 SECONDS * REM * seconds_per_tick, 120 SECONDS)
@@ -1446,14 +1396,7 @@
color = "#FF3542"
self_consuming = TRUE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/higadrite/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_STABLELIVER, type)
/datum/reagent/medicine/higadrite/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_STABLELIVER, type)
metabolized_traits = list(TRAIT_STABLELIVER)
/datum/reagent/medicine/cordiolis_hepatico
name = "Cordiolis Hepatico"
@@ -1474,6 +1417,7 @@
name = "Muscle Stimulant"
description = "A potent chemical that allows someone under its influence to be at full physical ability even when under massive amounts of pain."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
metabolized_traits = list(TRAIT_ANALGESIA)
/datum/reagent/medicine/muscle_stimulant/on_mob_metabolize(mob/living/affected_mob)
. = ..()
@@ -1494,14 +1438,7 @@
var/overdose_progress = 0 // to track overdose progress
ph = 7.89
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/modafinil/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_SLEEPIMMUNE, type)
/datum/reagent/medicine/modafinil/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_SLEEPIMMUNE, type)
metabolized_traits = list(TRAIT_SLEEPIMMUNE)
/datum/reagent/medicine/modafinil/on_mob_life(mob/living/carbon/metabolizer, seconds_per_tick, times_fired)
. = ..()
@@ -1565,14 +1502,7 @@
overdose_threshold = 30
ph = 9.12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/psicodine/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_FEARLESS, type)
/datum/reagent/medicine/psicodine/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_FEARLESS, type)
metabolized_traits = list(TRAIT_FEARLESS)
/datum/reagent/medicine/psicodine/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -1694,19 +1624,16 @@
/// For tracking when we tell the person we're no longer bleeding
var/was_working
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_COAGULATING)
/datum/reagent/medicine/coagulant/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_COAGULATING, /datum/reagent/medicine/coagulant)
if(ishuman(affected_mob))
var/mob/living/carbon/human/blood_boy = affected_mob
blood_boy.physiology?.bleed_mod *= passive_bleed_modifier
/datum/reagent/medicine/coagulant/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_COAGULATING, /datum/reagent/medicine/coagulant)
if(was_working)
to_chat(affected_mob, span_warning("The medicine thickening your blood loses its effect!"))
if(ishuman(affected_mob))
@@ -347,6 +347,7 @@
ph = 7.5 //God is alkaline
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_CLEANS|REAGENT_UNAFFECTED_BY_METABOLISM // Operates at fixed metabolism for balancing memes.
default_container = /obj/item/reagent_containers/cup/glass/bottle/holywater
metabolized_traits = list(TRAIT_HOLY)
/datum/glass_style/drinking_glass/holywater
required_drink_type = /datum/reagent/water/holywater
@@ -369,14 +370,6 @@
mytray.adjust_plant_health(round(volume * 0.1))
mytray.myseed?.adjust_instability(round(volume * 0.15))
/datum/reagent/water/holywater/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_HOLY, type)
/datum/reagent/water/holywater/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_HOLY, type)
/datum/reagent/water/holywater/on_mob_add(mob/living/affected_mob, amount)
. = ..()
if(IS_CULTIST(affected_mob))
@@ -2507,14 +2500,7 @@
metabolization_rate = 0.25 * REAGENTS_METABOLISM
ph = 15
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/pax/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_PACIFISM, type)
/datum/reagent/pax/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_PACIFISM, type)
metabolized_traits = list(TRAIT_PACIFISM)
/datum/reagent/bz_metabolites
name = "BZ Metabolites"
@@ -2523,14 +2509,7 @@
taste_description = "acrid cinnamon"
metabolization_rate = 0.2 * REAGENTS_METABOLISM
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
/datum/reagent/bz_metabolites/on_mob_metabolize(mob/living/ling)
. = ..()
ADD_TRAIT(ling, TRAIT_CHANGELING_HIVEMIND_MUTE, type)
/datum/reagent/bz_metabolites/on_mob_end_metabolize(mob/living/ling)
. = ..()
REMOVE_TRAIT(ling, TRAIT_CHANGELING_HIVEMIND_MUTE, type)
metabolized_traits = list(TRAIT_CHANGELING_HIVEMIND_MUTE)
/datum/reagent/bz_metabolites/on_mob_life(mob/living/carbon/target, seconds_per_tick, times_fired)
. = ..()
@@ -2767,6 +2746,7 @@
metabolization_rate = 0.75 * REAGENTS_METABOLISM // 5u (WOUND_DETERMINATION_CRITICAL) will last for ~34 seconds
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
self_consuming = TRUE
metabolized_traits = list(TRAIT_ANALGESIA)
/// Whether we've had at least WOUND_DETERMINATION_SEVERE (2.5u) of determination at any given time. No damage slowdown immunity or indication we're having a second wind if it's just a single moderate wound
var/significant = FALSE
@@ -3055,6 +3035,7 @@
addtimer(CALLBACK(exposed_obj, TYPE_PROC_REF(/atom/movable/, remove_haunted), HAUNTIUM_REAGENT_TRAIT), volume * 20 SECONDS)
/datum/reagent/hauntium/on_mob_metabolize(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
to_chat(affected_mob, span_userdanger("You feel an evil presence inside you!"))
if(affected_mob.mob_biotypes & MOB_UNDEAD || HAS_MIND_TRAIT(affected_mob, TRAIT_MORBID))
affected_mob.add_mood_event("morbid_hauntium", /datum/mood_event/morbid_hauntium, name) //8 minutes of slight mood buff if undead or morbid
@@ -295,14 +295,7 @@
taste_description = "death"
ph = 14.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/toxin/ghoulpowder/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_FAKEDEATH, type)
/datum/reagent/toxin/ghoulpowder/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_FAKEDEATH, type)
metabolized_traits = list(TRAIT_FAKEDEATH)
/datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -321,14 +314,7 @@
inverse_chem = /datum/reagent/impurity/rosenol
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/hallucinogens = 18) //7.2 per 2 seconds
/datum/reagent/toxin/mindbreaker/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_RDS_SUPPRESSED, type)
/datum/reagent/toxin/mindbreaker/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_RDS_SUPPRESSED, type)
metabolized_traits = list(TRAIT_RDS_SUPPRESSED)
/datum/reagent/toxin/mindbreaker/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -848,14 +834,7 @@
metabolization_rate = 0.75 * REAGENTS_METABOLISM
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
/datum/reagent/toxin/sodium_thiopental/on_mob_add(mob/living/affected_mob, amount)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_ANTICONVULSANT, name)
/datum/reagent/toxin/sodium_thiopental/on_mob_delete(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_ANTICONVULSANT, name)
added_traits = list(TRAIT_ANTICONVULSANT)
/datum/reagent/toxin/sodium_thiopental/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
@@ -1000,20 +979,13 @@
toxpwr = 0
ph = 11.6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_BLOODY_MESS)
/datum/reagent/toxin/heparin/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
if(holder.has_reagent(/datum/reagent/medicine/coagulant)) //Directly purges coagulants from the system. Get rid of the heparin BEFORE attempting to use coagulants.
holder.remove_reagent(/datum/reagent/medicine/coagulant, 2 * REM * seconds_per_tick)
return ..()
/datum/reagent/toxin/heparin/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_BLOODY_MESS, /datum/reagent/toxin/heparin)
/datum/reagent/toxin/heparin/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_BLOODY_MESS, /datum/reagent/toxin/heparin)
/datum/reagent/toxin/rotatium //Rotatium. Fucks up your rotation and is hilarious
name = "Rotatium"
description = "A constantly swirling, oddly colourful fluid. Causes the consumer's sense of direction and hand-eye coordination to become wild."
@@ -1184,14 +1156,7 @@
ph = 1.7
taste_description = "stillness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/toxin/mimesbane/on_mob_metabolize(mob/living/affected_mob)
. = ..()
ADD_TRAIT(affected_mob, TRAIT_EMOTEMUTE, type)
/datum/reagent/toxin/mimesbane/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
REMOVE_TRAIT(affected_mob, TRAIT_EMOTEMUTE, type)
metabolized_traits = list(TRAIT_EMOTEMUTE)
/datum/reagent/toxin/bonehurtingjuice //oof ouch
name = "Bone Hurting Juice"
+12 -3
View File
@@ -70,6 +70,8 @@
#define SURGERY_SPEED_DISSECTION_MODIFIER 0.8
///Modifier given to users with TRAIT_MORBID on certain surgeries
#define SURGERY_SPEED_MORBID_CURIOSITY 0.7
///Modifier given to patients with TRAIT_ANALGESIA
#define SURGERY_SPEED_TRAIT_ANALGESIA 0.8
/datum/surgery_step/proc/initiate(mob/living/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
// Only followers of Asclepius have the ability to use Healing Touch and perform miracle feats of surgery.
@@ -95,6 +97,9 @@
if(check_morbid_curiosity(user, tool, surgery))
speed_mod *= SURGERY_SPEED_MORBID_CURIOSITY
if(HAS_TRAIT(target, TRAIT_ANALGESIA))
speed_mod *= SURGERY_SPEED_TRAIT_ANALGESIA
var/implement_speed_mod = 1
if(implement_type) //this means it isn't a require hand or any item step.
implement_speed_mod = implements[implement_type] / 100.0
@@ -260,10 +265,14 @@
*/
/datum/surgery_step/proc/display_pain(mob/living/target, pain_message, mechanical_surgery = FALSE)
if(target.stat < UNCONSCIOUS)
to_chat(target, span_userdanger(pain_message))
if(prob(30) && !mechanical_surgery)
target.emote("scream")
if(HAS_TRAIT(target, TRAIT_ANALGESIA))
to_chat(target, span_notice("You feel a dull, numb sensation as your body is surgically operated on."))
else
to_chat(target, span_userdanger(pain_message))
if(prob(30) && !mechanical_surgery)
target.emote("scream")
#undef SURGERY_SPEED_TRAIT_ANALGESIA
#undef SURGERY_SPEED_DISSECTION_MODIFIER
#undef SURGERY_SPEED_MORBID_CURIOSITY
#undef SURGERY_SLOWDOWN_CAP_MULTIPLIER