diff --git a/aurorastation.dme b/aurorastation.dme index 505bd33fd65..67db7cab5a6 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -906,7 +906,6 @@ #include "code\game\objects\structures\curtains.dm" #include "code\game\objects\structures\displaycase.dm" #include "code\game\objects\structures\door_assembly.dm" -#include "code\game\objects\structures\electricchair.dm" #include "code\game\objects\structures\extinguisher.dm" #include "code\game\objects\structures\fireaxe_cabinet.dm" #include "code\game\objects\structures\flora.dm" @@ -929,6 +928,7 @@ #include "code\game\objects\structures\simple_doors.dm" #include "code\game\objects\structures\tank_dispenser.dm" #include "code\game\objects\structures\target_stake.dm" +#include "code\game\objects\structures\therapy.dm" #include "code\game\objects\structures\tranqcabinet.dm" #include "code\game\objects\structures\transit_tubes.dm" #include "code\game\objects\structures\under_wardrobe.dm" diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 7915e1f320e..342cf78a0f0 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -210,3 +210,9 @@ #define BRAIN_TRAUMA_MILD /datum/brain_trauma/mild #define BRAIN_TRAUMA_SEVERE /datum/brain_trauma/severe #define BRAIN_TRAUMA_SPECIAL /datum/brain_trauma/special + +#define CURE_CRYSTAL "crystal" +#define CURE_SOLITUDE "solitude" +#define CURE_HYPNOSIS "hypnosis" +#define CURE_SURGERY "surgery" +#define CURE_ADMIN "all" diff --git a/code/datums/brain_damage/brain_trauma.dm b/code/datums/brain_damage/brain_trauma.dm index 3d703303a63..6e4c66427b7 100644 --- a/code/datums/brain_damage/brain_trauma.dm +++ b/code/datums/brain_damage/brain_trauma.dm @@ -12,6 +12,12 @@ var/can_gain = TRUE //can this be gained through random traumas? var/permanent = FALSE //can this be cured? var/suppressed = 0 //currently being suppressed + var/cure_type //type of therapy that cures the trauma + //current cures: + //hypnosis - cures traumas that alter behavior + //solitude - cures traumas that produce hallucination + //electroshock - cures traumas that have physical effects + //surgery - cures traumas not covered above /datum/brain_trauma/New(obj/item/organ/brain/B, _permanent) brain = B @@ -42,6 +48,7 @@ /datum/brain_trauma/proc/on_lose(silent) if(!silent) to_chat(owner, lose_text) + owner.adjustBrainLoss(-1) //Called when hearing a spoken message /datum/brain_trauma/proc/on_hear(message, speaker, message_language, raw_message, radio_freq) diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index 5851db4f34b..84ccf16f310 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -4,6 +4,7 @@ scan_desc = "partial schizophrenia" gain_text = "You feel in good company, for some reason." lose_text = "You feel lonely again." + cure_type = CURE_SOLITUDE var/mob/abstract/mental/friend/friend /datum/brain_trauma/special/imaginary_friend/on_gain() diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index ec4839a60cd..b66a1f6a128 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -10,6 +10,7 @@ scan_desc = "schizophrenia" gain_text = "You feel your grip on reality slipping..." lose_text = "You feel more grounded." + cure_type = CURE_SOLITUDE /datum/brain_trauma/mild/hallucinations/on_life() owner.hallucination = min(owner.hallucination + 10, 50) @@ -25,6 +26,7 @@ scan_desc = "reduced mouth coordination" gain_text = "Speaking clearly is getting harder." lose_text = "You feel in control of your speech." + cure_type = CURE_CRYSTAL /datum/brain_trauma/mild/stuttering/on_life() owner.stuttering = min(owner.stuttering + 5, 25) @@ -40,6 +42,7 @@ scan_desc = "reduced brain activity" gain_text = "You feel dumber." lose_text = "You feel smart again." + cure_type = CURE_CRYSTAL /datum/brain_trauma/mild/dumbness/on_gain() owner.disabilities |= DUMB @@ -62,6 +65,7 @@ scan_desc = "communication disorder" gain_text = "You feel lost for words!" lose_text = "You regain your bearing!" + cure_type = CURE_CRYSTAL /datum/brain_trauma/mild/speech_impediment/on_gain() owner.disabilities |= UNINTELLIGIBLE @@ -77,6 +81,7 @@ scan_desc = "vulgarity problem" gain_text = "Your mind fills with foul language!" lose_text = "Your mind returns to decency." + cure_type = CURE_CRYSTAL /datum/brain_trauma/mild/tourettes/on_gain() owner.disabilities |= TOURETTES @@ -92,6 +97,7 @@ scan_desc = "left-right disorientation" gain_text = "You wonder to yourself, does three rights really make a left?!" lose_text = "You remember that you can just turn left directly!" + cure_type = CURE_HYPNOSIS /datum/brain_trauma/mild/gertie/on_gain() owner.disabilities |= GERTIE @@ -107,6 +113,7 @@ scan_desc = "a concussion" gain_text = "Your head hurts!" lose_text = "The pressure inside your head starts fading." + cure_type = CURE_SURGERY /datum/brain_trauma/mild/concussion/on_life() if(prob(25)) @@ -139,6 +146,7 @@ scan_desc = "weak motor nerve signal" gain_text = "Your muscles feel oddly faint." lose_text = "You feel in control of your muscles again." + cure_type = CURE_CRYSTAL /datum/brain_trauma/mild/muscle_weakness/on_life() var/fall_chance = 5 @@ -166,6 +174,7 @@ scan_desc = "nervous fits" gain_text = "Your muscles feel oddly faint." lose_text = "You feel in control of your muscles again." + cure_type = CURE_CRYSTAL /datum/brain_trauma/mild/muscle_spasms/on_life() if(prob(25)) @@ -224,6 +233,7 @@ scan_desc = "minor damage to the brain's occipital lobe" gain_text = "You can barely see!" lose_text = "Your vision returns." + cure_type = CURE_SURGERY /datum/brain_trauma/mild/nearsightedness/on_gain() owner.disabilities |= NEARSIGHTED diff --git a/code/datums/brain_damage/phobia.dm b/code/datums/brain_damage/phobia.dm index 1fdcc73e2c9..7b885f96369 100644 --- a/code/datums/brain_damage/phobia.dm +++ b/code/datums/brain_damage/phobia.dm @@ -13,6 +13,7 @@ var/list/trigger_objs //also checked in mob equipment var/list/trigger_turfs var/list/trigger_species + cure_type = CURE_HYPNOSIS /datum/brain_trauma/mild/phobia/New(mob/living/carbon/C, _permanent, specific_type) phobia_type = specific_type diff --git a/code/datums/brain_damage/schizo.dm b/code/datums/brain_damage/schizo.dm index d2df5e384a8..776b48551f8 100644 --- a/code/datums/brain_damage/schizo.dm +++ b/code/datums/brain_damage/schizo.dm @@ -7,6 +7,7 @@ scan_desc = "conflicting neuroimaging reports" gain_text = "You feel like your mind was split in two." lose_text = "You feel alone again." + cure_type = CURE_SOLITUDE var/current_controller = OWNER var/initialized = FALSE //to prevent personalities deleting themselves while we wait for ghosts var/mob/living/mental/split_personality/stranger_backseat //there's two so they can swap without overwriting diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm index 9bcb985dd2b..c0782d7959b 100644 --- a/code/datums/brain_damage/severe.dm +++ b/code/datums/brain_damage/severe.dm @@ -10,6 +10,7 @@ scan_desc = "extensive damage to the brain's language center" gain_text = "You forget how to speak!" lose_text = "You suddenly remember how to speak." + cure_type = CURE_CRYSTAL /datum/brain_trauma/severe/mute/on_gain() owner.sdisabilities |= MUTE @@ -31,6 +32,7 @@ scan_desc = "extensive damage to the brain's occipital lobe" gain_text = "You can't see!" lose_text = "Your vision returns." + cure_type = CURE_SURGERY /datum/brain_trauma/severe/blindness/on_gain() owner.sdisabilities |= BLIND @@ -53,6 +55,7 @@ scan_desc = "cerebral paralysis" gain_text = "You can't feel your body anymore!" lose_text = "You can feel your limbs again!" + cure_type = CURE_SURGERY /datum/brain_trauma/severe/paralysis/on_life() owner.Weaken(200) @@ -68,6 +71,7 @@ scan_desc = "traumatic narcolepsy" gain_text = "You have a constant feeling of drowsiness..." lose_text = "You feel awake and aware again." + cure_type = CURE_HYPNOSIS /datum/brain_trauma/severe/narcolepsy/on_life() ..() @@ -94,6 +98,7 @@ gain_text = "" lose_text = "You feel like you could be safe on your own." var/stress = 0 + cure_type = CURE_HYPNOSIS /datum/brain_trauma/severe/monophobia/on_gain() ..() @@ -173,6 +178,7 @@ scan_desc = "extreme discoordination" gain_text = "You can barely control your hands!" lose_text = "You feel in control of your hands again." + cure_type = CURE_CRYSTAL /datum/brain_trauma/severe/discoordination/on_gain() owner.disabilities |= MONKEYLIKE @@ -190,6 +196,7 @@ lose_text = "You suddenly remember how languages work." var/list/prev_languages = list() var/datum/language_holder/mob_language + cure_type = CURE_SURGERY /datum/brain_trauma/severe/aphasia/on_gain() for(var/datum/language/L in owner.languages) @@ -211,6 +218,7 @@ scan_desc = "pacific syndrome" gain_text = "You feel oddly peaceful." lose_text = "You no longer feel compelled to not harm." + cure_type = CURE_HYPNOSIS /datum/brain_trauma/severe/pacifism/on_gain() owner.disabilities |= PACIFIST diff --git a/code/datums/brain_damage/special_ed.dm b/code/datums/brain_damage/special_ed.dm index 96cfd0d3c07..66f9f31f102 100644 --- a/code/datums/brain_damage/special_ed.dm +++ b/code/datums/brain_damage/special_ed.dm @@ -10,6 +10,7 @@ gain_text = "You feel the bluespace pulsing around you..." lose_text = "The faint pulsing of bluespace fades into silence." var/next_portal = 0 + cure_type = CURE_SURGERY /datum/brain_trauma/special/bluespace_prophet/on_life() if(world.time > next_portal) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 29c092e6630..3f7b8395201 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -269,7 +269,9 @@ /obj/machinery/body_scanconsole/Initialize() . = ..() - src.connected = locate(/obj/machinery/bodyscanner, get_step(src, WEST)) + for(var/obj/machinery/bodyscanner/C in orange(1,src)) + connected = C + break src.connected.connected = src /obj/machinery/body_scanconsole/attack_ai(user as mob) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index a77ffb3c69b..0c5aaae72df 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -145,11 +145,8 @@ REAGENT SCANNER to_chat(user, "\tSevere brain damage detected. Subject likely to have mental traumas.") else if (H.getBrainLoss() >= 45) to_chat(user, "\tBrain damage detected.") - if(LAZYLEN(H.get_traumas())) - var/list/trauma_text = list() - for(var/datum/brain_trauma/B in H.get_traumas()) - trauma_text += B.scan_desc - to_chat(user, "\tCerebral traumas detected: subjects appears to be suffering from [english_list(trauma_text)].") + else if(LAZYLEN(H.get_traumas())) + to_chat(user, "\tSevere brain damage detected. Subject likely to have mental traumas.") for(var/name in H.organs_by_name) var/obj/item/organ/external/e = H.organs_by_name[name] if(!e) diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index 3f0ad349b10..3928352e285 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -1193,9 +1193,9 @@