Migrates meson stuff FULLY to traits (#21609)

* fuckin TRAITS

* pickup -> equip
This commit is contained in:
Contrabang
2023-07-17 05:53:47 -04:00
committed by GitHub
parent 5b4796d3f0
commit 4c3180ff21
5 changed files with 35 additions and 24 deletions
@@ -454,14 +454,9 @@
if(isbrain(M)) //Ignore brains
continue
if(M.stat == CONSCIOUS)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(istype(H.glasses, /obj/item/clothing/glasses/meson))
var/obj/item/clothing/glasses/meson/MS = H.glasses
if(MS.vision_flags == SEE_TURFS)
to_chat(H, "<span class='notice'>You look directly into [src], good thing you had your protective eyewear on!</span>")
return
if(HAS_TRAIT(M, TRAIT_MESON_VISION))
to_chat(M, "<span class='notice'>You look directly into [src], but your meson vision protects you!</span>")
return
M.Stun(6 SECONDS)
M.visible_message("<span class='danger'>[M] stares blankly at [src]!</span>", \
@@ -240,8 +240,7 @@
. = ..()
var/mob/living/carbon/human/H = user
if(istype(H))
var/immune = istype(H.glasses, /obj/item/clothing/glasses/meson)
if(!immune && !HAS_TRAIT(H, TRAIT_MESON_VISION) && (get_dist(user, src) < HALLUCINATION_RANGE(power)))
if(!HAS_TRAIT(H, TRAIT_MESON_VISION) && (get_dist(user, src) < HALLUCINATION_RANGE(power)))
. += "<span class='danger'>You get headaches just from looking at it.</span>"
. += "<span class='notice'>When actived by an item hitting this awe-inspiring feat of engineering, it emits radiation and heat. This is the basis of the use of the pseudo-perpetual energy source, the supermatter crystal.</span>"
. +="<span class='notice'>Any object that touches [src] instantly turns to dust, be it complex as a human or as simple as a metal rod. These bursts of energy can cause hallucinations if meson scanners are not worn near the crystal.</span>"
@@ -551,7 +550,7 @@
//Makes em go mad and accumulate rads.
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(!istype(l.glasses, /obj/item/clothing/glasses/meson) && !HAS_TRAIT(l, TRAIT_MESON_VISION) && !HAS_TRAIT(l, SM_HALLUCINATION_IMMUNE))
if(!HAS_TRAIT(l, TRAIT_MESON_VISION) && !HAS_TRAIT(l, SM_HALLUCINATION_IMMUNE))
var/D = sqrt(1 / max(1, get_dist(l, src)))
var/hallucination_amount = power * hallucination_power * D
l.AdjustHallucinate(hallucination_amount, 0, 200 SECONDS)