Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anomaly Edits / Improvements #3365

Merged
merged 11 commits into from
Oct 14, 2024
46 changes: 15 additions & 31 deletions code/game/objects/effects/anomalies/_anomalies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
anchored = TRUE
light_range = 3

//aSignal drops as the core, bSignal allows people to signal to detonate
var/obj/item/assembly/signaler/anomaly/aSignal = /obj/item/assembly/signaler/anomaly
var/obj/item/assembly/signaler/anomaly/bSignal = /obj/item/assembly/signaler/anomaly/det_signal
var/obj/item/assembly/signaler/anomaly/core = /obj/item/assembly/signaler/anomaly
var/area/impact_area

var/lifespan = 990
Expand Down Expand Up @@ -46,27 +44,17 @@
pulse_delay = rand(pulse_delay*0.5, pulse_delay*1.5)

src.drops_core = drops_core
if(aSignal)
aSignal = new aSignal(src)
aSignal.code = rand(1,100)
aSignal.anomaly_type = type
aSignal.research = research_value
if(core)
core = new core(src)
core.code = rand(1,100)
core.code_b = rand(1,100)
core.anomaly_type = type
core.research = research_value

var/frequency = rand(MIN_FREE_FREQ, MAX_FREE_FREQ)
if(ISMULTIPLE(frequency, 2))//signaller frequencies are always uneven!
frequency++
aSignal.set_frequency(frequency)

if(bSignal)
bSignal = new bSignal(src)
bSignal.code = rand(1,100)
bSignal.anomaly_type = type
var/frequency = rand(MIN_FREE_FREQ, MAX_FREE_FREQ)
if(ISMULTIPLE(frequency, 2))//signaller frequencies are always uneven!
frequency++
bSignal.set_frequency(frequency)


core.set_frequency(frequency)

if(lifespan)
if(new_lifespan)
Expand Down Expand Up @@ -97,7 +85,7 @@
/obj/effect/anomaly/Destroy()
STOP_PROCESSING(SSobj, src)
QDEL_NULL(countdown)
QDEL_NULL(aSignal)
QDEL_NULL(core)
return ..()

/obj/effect/anomaly/proc/anomalyEffect(seconds_per_tick)
Expand All @@ -118,30 +106,26 @@

/obj/effect/anomaly/proc/anomalyNeutralize()
new /obj/effect/particle_effect/smoke/bad(loc)

if(drops_core)
if(isnull(aSignal))
if(isnull(core))
stack_trace("An anomaly ([src]) exists that drops a core, yet has no core!")
else
aSignal.forceMove(drop_location())
aSignal = null
core.forceMove(drop_location())
core = null
// else, anomaly core gets deleted by qdel(src).

qdel(src)


/obj/effect/anomaly/attackby(obj/item/weapon, mob/user, params)
if(weapon.tool_behaviour == TOOL_ANALYZER && aSignal)
if(weapon.tool_behaviour == TOOL_ANALYZER && core)
to_chat(user, span_notice("You start analyzing [src]."))
if(do_after(user, 20, src, hidden = TRUE))
to_chat(user, span_notice("[src]'s primary field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code]."))
if(bSignal)
to_chat(user, span_notice("A second field is fluctuating along [format_frequency(bSignal.frequency)], code [bSignal.code]. It is highly unstable." ))
return TRUE
to_chat(user, span_notice("[src]'s primary field is fluctuating along frequency [format_frequency(core.frequency)], code [core.code]."))

return TRUE
return ..()


/obj/effect/anomaly/examine(mob/user)
. = ..()
if(user.research_scanner == TRUE)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/anomalies/anomalies_bluespace.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/obj/effect/anomaly/bluespace
name = "jumper"
icon_state = "bluespace"
desc = "A mysterious anomaly that causes teleportation around it."
desc = "A hole in the fabric of bluespace, perforating reality around it."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda meh on this change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean. What else teleports things lol. I think its fine for it to be blue-space.

density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/bluespace
core = /obj/item/assembly/signaler/anomaly/bluespace
///range from which we can teleport someone
effectrange = 3
var/reagent_amount = 3
Expand Down
11 changes: 8 additions & 3 deletions code/game/objects/effects/anomalies/anomalies_flux.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/obj/effect/anomaly/flux
name = "tesla"
icon_state = "flux"
desc = "A mysterious anomaly that sends out a near constant stream of electrical arcs."
icon_state = "tesla"
//double-check that these only happen in atmosphere now
desc = "A break in the atmosphere, small yet potent lightning arcs flashing off it."
density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/flux
core = /obj/item/assembly/signaler/anomaly/flux
pulse_delay = 2 SECONDS
effectrange = 0
var/canshock = FALSE
Expand Down Expand Up @@ -99,3 +100,7 @@
/obj/effect/anomaly/flux/big/planetary
immortal = TRUE
immobile = TRUE

/obj/effect/anomaly/flux/storm
drops_core = FALSE
explosive = FLUX_LOW_EXPLOSIVE
5 changes: 2 additions & 3 deletions code/game/objects/effects/anomalies/anomalies_gravity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
/obj/effect/anomaly/grav
name = "throngler"
icon_state = "gravity"
desc = "A mysterious anomaly that sucks things towards it with a gravitational field, ending in what has been termed a 'throngling'."
desc = "A miniature gravity well, constantly pulling the world around it into a 'throngling'."
density = FALSE
aSignal = /obj/item/assembly/signaler/anomaly/grav
bSignal = null
core = /obj/item/assembly/signaler/anomaly/grav
effectrange = 4
var/boing = 0
///Warp effect holder for displacement filter to "pulse" the anomaly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
/obj/effect/anomaly/hallucination
name = "hallucination anomaly"
icon_state = "hallucination"
aSignal = /obj/item/assembly/signaler/anomaly/hallucination
desc = "A shimmering mirage suspended above the ground, never in the same place as it was a second ago."
core = /obj/item/assembly/signaler/anomaly/hallucination
/// Time passed since the last effect, increased by delta_time of the SSobj
var/ticks = 0
/// How many seconds between each small hallucination pulses
Expand All @@ -18,6 +19,8 @@
var/turf/open/our_turf = get_turf(src)
if(istype(our_turf))
hallucination_pulse(our_turf, 5)
pixel_x = pixel_x + clamp(rand(-5, 5), -16, 16)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes the anomaly shift around (like the desc implies)

pixel_y = pixel_y + clamp(rand(-5, 5), -16, 16)

/obj/effect/anomaly/hallucination/detonate()
var/turf/open/our_turf = get_turf(src)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/anomalies/anomalies_heartbeat.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/obj/effect/anomaly/heartbeat
name = "heartbeat"
icon_state = "heartbeat"
desc = "A mysterious anomaly, it ionizes the world around it."
desc = "A throbbing vertex, spreading a cancer to the world around itself."
density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/heartbeat
core = /obj/item/assembly/signaler/anomaly/heartbeat
effectrange = 3
pulse_delay = 6 SECONDS
var/reagent_amount = 5
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/effects/anomalies/anomalies_melter.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/obj/effect/anomaly/melter
name = "melter"
icon_state = "melter"
desc = "A mysterious anomaly. Everburning green flames with a horrid sizzle, melting what's near"
desc = "Everburning green flames, eager to lash out at anything that intrudes near."
effectrange = 2
pulse_delay = 10 SECONDS
aSignal = /obj/item/assembly/signaler/anomaly/melter
core = /obj/item/assembly/signaler/anomaly/melter

/obj/effect/anomaly/melter/anomalyEffect(seconds_per_tick)
..()
Expand All @@ -20,7 +20,7 @@
I.acid_act(20, 20)
I.update_appearance()
for (var/obj/item/melt in range(effectrange, src))

//don't melt yourself
if(istype(melt, /obj/item/assembly/signaler/anomaly))
return
else
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/anomalies/anomalies_phantom.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/obj/effect/anomaly/phantom
name = "phantom"
icon_state = "phantom"
desc = "A mysterious anomaly, the outline of a humanoid, endlessly screaming in agony."
desc = "A familiar outline, it calls out for companionship. It screams for you."
density = FALSE
aSignal = /obj/item/assembly/signaler/anomaly/phantom
core = /obj/item/assembly/signaler/anomaly/phantom
effectrange = 3
pulse_delay = 2 SECONDS

Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/anomalies/anomalies_plasmasoul.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/obj/effect/anomaly/plasmasoul
name = "plasma soul"
icon_state = "plasmasoul"
desc = "A mysterious anomaly, it slowly leaks plasma into the world around it."
desc = "A plasmatic pool, small crystals growing around it, spreading into the ground."
density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/plasmasoul
core = /obj/item/assembly/signaler/anomaly/plasmasoul
effectrange = 3
pulse_delay = 6 SECONDS
var/reagent_amount = 5
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/anomalies/anomalies_pulsar.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/obj/effect/anomaly/pulsar
name = "pulsar"
icon_state = "pulsar"
desc = "A mysterious anomaly, endless electromagnetic disturbances roll out from it"
desc = "A near transparent shell hovering, containing a near constant electromagnetic turmoil."
density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/pulsar
core = /obj/item/assembly/signaler/anomaly/pulsar
effectrange = 4
pulse_delay = 15 SECONDS

Expand Down
10 changes: 6 additions & 4 deletions code/game/objects/effects/anomalies/anomalies_pyroclastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
/obj/effect/anomaly/pyro
name = "plasmaball"
icon_state = "pyroclastic"
desc = "A mysterious anomaly, made of an everburning gas. Those who approach it tend to absorb it's heat, or even ignite."
desc = "A floating orb of everburning gas, not unlike a sun. It radiates a dangerous amount of heat."
effectrange = 4
pulse_delay = 10 SECONDS
aSignal = /obj/item/assembly/signaler/anomaly/pyro
core = /obj/item/assembly/signaler/anomaly/pyro

/obj/effect/anomaly/pyro/anomalyEffect(seconds_per_tick)
..()

for(var/mob/living/carbon/nearby in range(effectrange, src))
nearby.adjust_bodytemperature(20)
visible_message("[src] pulses!")

if(!COOLDOWN_FINISHED(src, pulse_cooldown))
return
Expand All @@ -21,7 +20,7 @@
for(var/mob/living/carbon/nearby in range(effectrange/2, src))
nearby.fire_stacks += 3
nearby.IgniteMob()
visible_message("<span class='warning'>[src] ignites [nearby]!")
visible_message("<span class='warning'>[src] lets out a flare, igniting [nearby]!")


/obj/effect/anomaly/pyro/Bumped(atom/movable/AM)
Expand Down Expand Up @@ -84,3 +83,6 @@
/obj/effect/anomaly/pyro/big/planetary
immortal = TRUE
immobile = TRUE

/obj/effect/anomaly/pyro/storm
drops_core = FALSE
4 changes: 2 additions & 2 deletions code/game/objects/effects/anomalies/anomalies_sparkler.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/obj/effect/anomaly/sparkler
name = "sparkler"
icon_state = "sparkler"
desc = "A mysterious anomaly, constantly throwing sparks into its vicinity."
desc = "A series of shimmering sparks flying to and fro. They try to spread, yet fail."
density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/sparkler
core = /obj/item/assembly/signaler/anomaly/sparkler
effectrange = 4
pulse_delay = 1 SECONDS

Expand Down
56 changes: 23 additions & 33 deletions code/game/objects/effects/anomalies/anomalies_static.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
GLOBAL_LIST_INIT(tvstatic_sayings, list(
"... Help me...",
"... I need to get out ...",
"...No hope....",
"...Let me loose...",
"...stay with me...",
"...Not like this...",
"...please don't go...",
"...don't forget me...",
"...Are you there...?",
"...it hurts...",
"...the eyes...",
"...need to run...",
"...is anyone there..."
))

/obj/effect/anomaly/tvstatic
name = "static"
icon_state = "static"
desc = "A mysterious anomaly. A hole in the world, endless buzzing emitting from it."
desc = "A hole in the world emitting an endless buzzing. It hides something precious."
density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/tvstatic
core = /obj/item/assembly/signaler/anomaly/tvstatic
effectrange = 4
pulse_delay = 4 SECONDS
verb_say = "pleads"
Expand Down Expand Up @@ -48,7 +64,7 @@
var/mob/living/carbon/victim = looking
var/obj/effect/anomaly/tvstatic/planetary/expansion
expansion = new(get_turf(victim))
visible_message(span_warning("The static overtakes [victim], [expansion] taking their place!"))
visible_message(span_warning("[src] overtakes [victim], [expansion] taking their place!"))
victim.death()
expansion.stored_mob = victim
victim.forceMove(expansion)
Expand All @@ -58,44 +74,18 @@
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...")
say(pick(GLOB.tvstatic_sayings))
return

/obj/effect/anomaly/tvstatic/detonate()
for(var/mob/living/carbon/human/looking in range(effectrange, src))
visible_message(span_boldwarning(" The static lashes out, agony filling your mind as its tendrils scrape your thoughts!"))
visible_message(span_boldwarning("[src] lashes out, agony filling your mind as its tendrils scrape your thoughts!"))
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_warning("The static sputters out [stored_mob], their body coming out in a burst of blood and gore!"))
visible_message(span_warning("[src] sputters out [stored_mob], their body coming out in a burst of blood and gore!"))
new /obj/effect/gibspawner/human(loc)
stored_mob.forceMove(get_turf(src))
stored_mob = null
Expand All @@ -111,7 +101,7 @@
var/turf/T = get_turf(src)
if(T)
if(stored_mob)
visible_message(span_warning("The static spits out [stored_mob], their body coming out in a burst!"))
visible_message(span_warning("[src] spits out [stored_mob], their body coming out in a burst!"))
stored_mob.forceMove(get_turf(src))
stored_mob = null
. = ..()
Expand Down
Loading
Loading