diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 164686d7050..8c4321cbfa4 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -211,6 +211,16 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_SIGN_LANG "sign_language" //Galactic Common Sign Language #define TRAIT_NANITE_MONITORING "nanite_monitoring" //The mob's nanites are sending a monitoring signal visible on diag HUD +// You can stare into the abyss, but it does not stare back. +// You're immune to the hallucination effect of the supermatter, either +// through force of will, or equipment. +#define TRAIT_SUPERMATTER_MADNESS_IMMUNE "supermatter_madness_immune" + +// You can stare into the abyss, and it turns pink. +// Being close enough to the supermatter makes it heal at higher temperatures +// and emit less heat. A trait applied to a mind. +#define TRAIT_SUPERMATTER_SOOTHER "supermatter_soother" + //SKILLS #define TRAIT_UNDERWATER_BASKETWEAVING_KNOWLEDGE "underwater_basketweaving" #define TRAIT_WINE_TASTER "wine_taster" diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index c0e7e4c4949..4bde967c847 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -64,6 +64,15 @@ lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE glass_colour_type = /datum/client_colour/glass_colour/lightgreen +/obj/item/clothing/glasses/meson/equipped(mob/user, slot) + . = ..() + if(ishuman(user) && slot == ITEM_SLOT_EYES) + ADD_TRAIT(user, TRAIT_SUPERMATTER_MADNESS_IMMUNE, CLOTHING_TRAIT) + +/obj/item/clothing/glasses/meson/dropped(mob/user) + . = ..() + REMOVE_TRAIT(user, TRAIT_SUPERMATTER_MADNESS_IMMUNE, CLOTHING_TRAIT) + /obj/item/clothing/glasses/meson/suicide_act(mob/living/carbon/user) user.visible_message("[user] is putting \the [src] to [user.p_their()] eyes and overloading the brightness! It looks like [user.p_theyre()] trying to commit suicide!") return BRUTELOSS diff --git a/code/modules/jobs/job_types/psychologist.dm b/code/modules/jobs/job_types/psychologist.dm index 5d3411b3611..f211e8778ee 100644 --- a/code/modules/jobs/job_types/psychologist.dm +++ b/code/modules/jobs/job_types/psychologist.dm @@ -14,6 +14,8 @@ paycheck = PAYCHECK_MEDIUM paycheck_department = ACCOUNT_SRV + mind_traits = list(TRAIT_SUPERMATTER_SOOTHER, TRAIT_SUPERMATTER_MADNESS_IMMUNE) + display_order = JOB_DISPLAY_ORDER_PSYCHOLOGIST /datum/outfit/job/psychologist diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 456555a75bb..6f51f71a44e 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -350,10 +350,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) /obj/machinery/power/supermatter_crystal/examine(mob/user) . = ..() - if (istype(user, /mob/living/carbon)) - var/mob/living/carbon/C = user - if (!istype(C.glasses, /obj/item/clothing/glasses/meson) && (get_dist(user, src) < HALLUCINATION_RANGE(power))) - . += "You get headaches just from looking at it." + var/immune = HAS_TRAIT(user, TRAIT_SUPERMATTER_MADNESS_IMMUNE) || HAS_TRAIT(user.mind, TRAIT_SUPERMATTER_MADNESS_IMMUNE) + if(isliving(user) && !immune && (get_dist(user, src) < HALLUCINATION_RANGE(power))) + . += "You get headaches just from looking at it." /obj/machinery/power/supermatter_crystal/proc/get_status() var/turf/T = get_turf(src) @@ -707,11 +706,14 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //Makes em go mad and accumulate rads. var/toAdd = -0.05 - for(var/mob/living/carbon/human/l in view(src, HALLUCINATION_RANGE(power))) // If they can see it without mesons on. Bad on them. - if(l.mind?.assigned_role == "Psychologist") + for(var/mob/living/carbon/human/l in view(src, HALLUCINATION_RANGE(power))) + // Someone (generally a Psychologist), when looking at the SM + // within hallucination range makes it easier to manage. + if(HAS_TRAIT(l.mind, TRAIT_SUPERMATTER_SOOTHER)) toAdd = 0.05 psy_overlay = TRUE - else if(!istype(l.glasses, /obj/item/clothing/glasses/meson)) + // If they can see it without being immune (mesons, Psychologist) + if (!(HAS_TRAIT(l, TRAIT_SUPERMATTER_MADNESS_IMMUNE) || HAS_TRAIT(l.mind, TRAIT_SUPERMATTER_MADNESS_IMMUNE))) var/D = sqrt(1 / max(1, get_dist(l, src))) l.hallucination += power * hallucination_power * D l.hallucination = clamp(l.hallucination, 0, 200)