Skip to content

Commit

Permalink
Merge pull request #147 from Mirag1993/Мердж-с-оффами
Browse files Browse the repository at this point in the history
Static Whispers (shiptest-ss13#2465)
  • Loading branch information
MysticalFaceLesS authored Nov 14, 2023
2 parents 1bc8a6e + ddeb002 commit 575253b
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 11 deletions.
3 changes: 0 additions & 3 deletions code/__DEFINES/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@
#define SPAN_COMMAND "command_headset"
#define SPAN_CLOWN "clown"
#define SPAN_SINGING "singing"

//WS Spans - Begin
#define SPAN_SGA "sga"
//WS Spans - End

//bitflag #defines for return value of the radio() proc.
#define ITALICS (1<<0)
Expand Down
69 changes: 61 additions & 8 deletions code/game/objects/effects/anomalies/anomalies_static.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@
aSignal = /obj/item/assembly/signaler/anomaly/tvstatic
effectrange = 4
pulse_delay = 4 SECONDS
verb_say = "pleads"
verb_ask = "begs"
verb_exclaim = "screams"
verb_whisper = "whimpers"
verb_yell = "screams"
speech_span = SPAN_ITALICS
var/mob/living/carbon/stored_mob = null

/obj/effect/anomaly/tvstatic/examine(mob/user)
. = ..()
if(!iscarbon(user))
return
if(iscarbon(user) && !user.research_scanner) //this'll probably cause some weirdness when I start using research scanner in more places / on more items. Oh well.
var/mob/living/carbon/bah = user
to_chat(bah, span_userdanger("Your head aches as you stare into the [src]!"))
bah.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5, 100)
var/mob/living/carbon/victim = user
to_chat(victim, span_userdanger("Your head aches as you stare into [src]!"))
victim.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5, 100)

/obj/effect/anomaly/tvstatic/anomalyEffect()
..()
Expand All @@ -29,11 +35,13 @@

COOLDOWN_START(src, pulse_cooldown, pulse_delay)

for(var/mob/living/carbon/looking in range(effectrange, src))
playsound(src, 'sound/effects/walkietalkie.ogg', 100)
if (!HAS_TRAIT(looking, TRAIT_MINDSHIELD) && looking.stat != DEAD || !looking.research_scanner && looking.stat != DEAD)
for(var/mob/living/carbon/human/looking in range(effectrange, src))
playsound(src, 'sound/effects/walkietalkie.ogg', 75)
if(stored_mob && looking.stat != DEAD && prob(25))
say_fucky_things()
if (!HAS_TRAIT(looking, TRAIT_MINDSHIELD) && looking.stat != DEAD || !looking.research_scanner && looking.stat != DEAD || !HAS_TRAIT(looking, TRAIT_DEAF))
looking.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10, 200)
playsound(src, 'sound/effects/stall.ogg', 100)
playsound(src, 'sound/effects/stall.ogg', 50)
if(looking.getOrganLoss(ORGAN_SLOT_BRAIN) >= 150 && looking.stat != DEAD)
if(prob(20))
var/mob/living/carbon/victim = looking
Expand All @@ -49,15 +57,55 @@
/obj/effect/anomaly/tvstatic/Bumped(atom/movable/AM)
anomalyEffect()

/obj/effect/anomaly/tvstatic/proc/say_fucky_things()
switch(rand(1, 13))
if(1)
say("... Help me...")
if(2)
say("... I need to get out ...")
if(3)
say("...No hope....")
if(4)
say("....Let me loose...")
if(5)
say("...stay with me...")
if(6)
say("...I hope I live...")
if(7)
say("...please don't go...")
if(8)
say("...don't forget me...")
if(9)
say("...Are you there...?")
if(10)
say("...it hurts...")
if(11)
say("...the eyes...")
if(12)
say("...need to run...")
if(13)
say("...don't become like me...")
return

/obj/effect/anomaly/tvstatic/detonate()
for(var/mob/living/carbon/looking in range(effectrange, src))
for(var/mob/living/carbon/human/looking in range(effectrange, src))
visible_message("<span class='boldwarning'> The static lashes out, agony filling your mind as its tendrils scrape your thoughts!</span>")
if (!HAS_TRAIT(looking, TRAIT_MINDSHIELD) && looking.stat != DEAD)
looking.adjustOrganLoss(ORGAN_SLOT_BRAIN, 100, 200)
playsound(src, 'sound/effects/stall.ogg', 100)
if(stored_mob)
mangle_corpse()
visible_message("<span class='warning'>The static sputters out [stored_mob], their body coming out in a burst of blood and gore!</span>")
new /obj/effect/gibspawner/human(loc)
stored_mob.forceMove(get_turf(src))
stored_mob = null
anomalyEffect()
. = ..()

/obj/effect/anomaly/tvstatic/proc/mangle_corpse()
if(!stored_mob)
return
stored_mob.adjustBruteLoss(400)

/obj/effect/anomaly/tvstatic/anomalyNeutralize()
var/turf/T = get_turf(src)
Expand All @@ -73,6 +121,11 @@
immortal = TRUE
immobile = TRUE

/obj/effect/anomaly/tvstatic/planetary/Initialize(mapload)
if(prob(25))
stored_mob = /obj/effect/mob_spawn/human/corpse/damaged
. = ..()

/obj/effect/particle_effect/staticball
name = "static blob"
desc = "An unsettling mass of free floating static"
Expand Down

0 comments on commit 575253b

Please sign in to comment.