diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index f4e9ef1133d..1c1639d676d 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -37,12 +37,6 @@ surgery_steps += S sort_surgeries() - //Medical side effects. List all effects by their names - paths = typesof(/datum/medical_effect)-/datum/medical_effect - for(var/T in paths) - var/datum/medical_effect/M = new T - side_effects[M.name] = T - //List of job. I can't believe this was calculated multiple times per tick! paths = typesof(/datum/job) -list(/datum/job,/datum/job/ai,/datum/job/cyborg) for(var/T in paths) diff --git a/code/datums/medical_effects.dm b/code/datums/medical_effects.dm deleted file mode 100644 index d6392582ef1..00000000000 --- a/code/datums/medical_effects.dm +++ /dev/null @@ -1,147 +0,0 @@ -// MEDICAL SIDE EFFECT BASE -// ======================== -/datum/medical_effect - var/name = "None" - var/strength = 0 - var/start = 0 - var/list/triggers - var/list/cures - var/cure_message - -/datum/medical_effect/proc/manifest(mob/living/carbon/human/H) - for(var/R in cures) - if(H.reagents.has_reagent(R)) - return 0 - for(var/R in triggers) - if(H.reagents.get_reagent_amount(R) >= triggers[R]) - return 1 - return 0 - -/datum/medical_effect/proc/on_life(mob/living/carbon/human/H, strength) - return - -/datum/medical_effect/proc/cure(mob/living/carbon/human/H) - for(var/R in cures) - if(H.reagents.has_reagent(R)) - if (cure_message) - H <<"\blue [cure_message]" - return 1 - return 0 - -// MOB HELPERS -// =========== -/mob/living/carbon/human/var/list/datum/medical_effect/side_effects = list() -/mob/proc/add_side_effect(name, strength = 0) -/mob/living/carbon/human/add_side_effect(name, strength = 0) - for(var/datum/medical_effect/M in src.side_effects) - if(M.name == name) - M.strength = max(M.strength, 10) - M.start = life_tick - return - - var/T = side_effects[name] - if (!T) - return - - var/datum/medical_effect/M = new T - if(M.name == name) - M.strength = strength - M.start = life_tick - side_effects += M - -/mob/living/carbon/human/proc/handle_medical_side_effects() - //Going to handle those things only every few ticks. - if(life_tick % 15 != 0) - return 0 - - var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect - for(var/T in L) - var/datum/medical_effect/M = new T - if (M.manifest(src)) - src.add_side_effect(M.name) - - // One full cycle(in terms of strength) every 10 minutes - for (var/datum/medical_effect/M in side_effects) - if (!M) continue - var/strength_percent = sin((life_tick - M.start) / 2) - - // Only do anything if the effect is currently strong enough - if(strength_percent >= 0.4) - if (M.cure(src) || M.strength > 50) - side_effects -= M - M = null - else - if(life_tick % 45 == 0) - M.on_life(src, strength_percent*M.strength) - // Effect slowly growing stronger - M.strength+=0.08 - -// HEADACHE -// ======== -/datum/medical_effect/headache - name = "Headache" - triggers = list("cryoxadone" = 10) - cures = list("mannitol", "morphine", "sal_acid", "hydrocodone") - cure_message = "Your head stops throbbing..." - -/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength) - switch(strength) - if(1 to 10) - H.custom_pain("You feel a light pain in your head.",0) - if(11 to 30) - H.custom_pain("You feel a throbbing pain in your head!",1) - if(31 to INFINITY) - H.custom_pain("You feel an excrutiating pain in your head!",1) - -// BAD STOMACH -// =========== -/datum/medical_effect/bad_stomach - name = "Bad Stomach" - triggers = list() - cures = list() - cure_message = "Your stomach feels a little better now..." - -/datum/medical_effect/bad_stomach/on_life(mob/living/carbon/human/H, strength) - switch(strength) - if(1 to 10) - H.custom_pain("You feel a bit light around the stomach.",0) - if(11 to 30) - H.custom_pain("Your stomach hurts.",0) - if(31 to INFINITY) - H.custom_pain("You feel sick.",1) - -// CRAMPS -// ====== -/datum/medical_effect/cramps - name = "Cramps" - triggers = list("morphine" = 15) - cures = list("epinephrine") - cure_message = "The cramps let up..." - -/datum/medical_effect/cramps/on_life(mob/living/carbon/human/H, strength) - switch(strength) - if(1 to 10) - H.custom_pain("The muscles in your body hurt a little.",0) - if(11 to 30) - H.custom_pain("The muscles in your body cramp up painfully.",0) - if(31 to INFINITY) - H.emote("me",1,"flinches as all the muscles in their body cramp up.") - H.custom_pain("There's pain all over your body.",1) - -// ITCH -// ==== -/datum/medical_effect/itch - name = "Itch" - triggers = list("space_drugs" = 10) - cures = list("epinephrine") - cure_message = "The itching stops..." - -/datum/medical_effect/itch/on_life(mob/living/carbon/human/H, strength) - switch(strength) - if(1 to 10) - H.custom_pain("You feel a slight itch.",0) - if(11 to 30) - H.custom_pain("You want to scratch your itch badly.",0) - if(31 to INFINITY) - H.emote("me",1,"shivers slightly.") - H.custom_pain("This itch makes it really hard to concentrate.",1) \ No newline at end of file diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index f3fd4eba26d..08e60558d38 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -447,7 +447,6 @@ src.icon_state = "pod_0" src.eject_wait = 0 //If it's still set somehow. domutcheck(src.occupant) //Waiting until they're out before possible notransform. - src.occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free. src.occupant = null return diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 2cbe1e9f8ce..951e9f03563 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -118,8 +118,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc handle_pain() - handle_medical_side_effects() - handle_heartbeat() handle_heartattack() diff --git a/paradise.dme b/paradise.dme index 34f32f368a8..9e9c95e47c4 100644 --- a/paradise.dme +++ b/paradise.dme @@ -166,7 +166,6 @@ #include "code\datums\datumvars.dm" #include "code\datums\gas_mixture.dm" #include "code\datums\martial.dm" -#include "code\datums\medical_effects.dm" #include "code\datums\mind.dm" #include "code\datums\mixed.dm" #include "code\datums\modules.dm"