mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Refactor supermatter proximity effects (#55653)
- Psychologists are no longer mistakenly told they have headaches when near the supermatter. - Immunity to supermatter hallucinations is now provided by a new trait `TRAIT_SUPERMATTER_MADNESS_IMMUNE`, provided by mesons, and being the Psychologist. - The ability for Psychologists to cause the supermatter to act slightly differently (by turning pink, and having a higher minimum healing temperature) is now a trait, `TRAIT_SUPERMATTER_SOOTHER`, which currently only Psychologists get.
This commit is contained in:
@@ -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("<span class='suicide'>[user] is putting \the [src] to [user.p_their()] eyes and overloading the brightness! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)))
|
||||
. += "<span class='danger'>You get headaches just from looking at it.</span>"
|
||||
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)))
|
||||
. += "<span class='danger'>You get headaches just from looking at it.</span>"
|
||||
|
||||
/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)
|
||||
|
||||
Reference in New Issue
Block a user