diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm
new file mode 100644
index 00000000000..3cb6089e582
--- /dev/null
+++ b/code/game/objects/effects/anomalies.dm
@@ -0,0 +1,179 @@
+//Anomalies, used for events. Note that these DO NOT work by themselves; their procs are called by the event datum.
+
+/obj/effect/anomaly
+ name = "anomaly"
+ icon = 'icons/effects/effects.dmi'
+ desc = "A mysterious anomaly, seen commonly only in the region of space that the station orbits..."
+ icon_state = "bhole3"
+ unacidable = 1
+ density = 0
+ anchored = 1
+ luminosity = 3
+ var/obj/item/device/assembly/signaler/anomaly/aSignal = null
+
+/obj/effect/anomaly/New()
+ SetLuminosity(initial(luminosity))
+ aSignal = new(src)
+ aSignal.code = rand(1,100)
+
+ aSignal.frequency = rand(1200, 1599)
+ if(IsMultiple(aSignal.frequency, 2))//signaller frequencies are always uneven!
+ aSignal.frequency++
+
+
+/obj/effect/anomaly/proc/anomalyEffect()
+ if(prob(50))
+ step(src,pick(alldirs))
+
+
+/obj/effect/anomaly/proc/anomalyNeutralize()
+ new /obj/effect/effect/bad_smoke(loc)
+
+ for(var/atom/movable/O in src)
+ O.loc = src.loc
+
+ del(src)
+
+
+/obj/effect/anomaly/attackby(obj/item/I, mob/user)
+ if(istype(I, /obj/item/device/analyzer))
+ user << "Analyzing... [src]'s unstable field is fluctuating along frequency [aSignal.code]:[format_frequency(aSignal.frequency)]."
+
+///////////////////////
+
+/obj/effect/anomaly/grav
+ name = "gravitational anomaly"
+ icon_state = "shield2"
+ density = 1
+ var/boing = 0
+
+/obj/effect/anomaly/grav/New()
+ ..()
+ aSignal.origin_tech = "magnets=5;powerstorage=4"
+
+/obj/effect/anomaly/grav/anomalyEffect()
+ ..()
+
+ boing = 1
+ for(var/obj/O in orange(4, src))
+ if(!O.anchored)
+ step_towards(O,src)
+ for(var/mob/living/M in orange(4, src))
+ step_towards(M,src)
+
+/obj/effect/anomaly/grav/Bump(mob/A)
+ gravShock(A)
+ return
+
+/obj/effect/anomaly/grav/Bumped(mob/A)
+ gravShock(A)
+ return
+
+/obj/effect/anomaly/grav/proc/gravShock(var/mob/A)
+ if(boing && isliving(A) && !A.stat)
+ A.Weaken(2)
+ var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
+ A.throw_at(target, 5, 1)
+ boing = 0
+ return
+
+/////////////////////
+
+/obj/effect/anomaly/flux
+ name = "flux wave anomaly"
+ icon_state = "electricity2"
+
+/obj/effect/anomaly/flux/New()
+ ..()
+ aSignal.origin_tech = "powerstorage=5;programming=3;plasmatech=2"
+
+/////////////////////
+
+/obj/effect/anomaly/bluespace
+ name = "bluespace anomaly"
+ icon = 'icons/obj/projectiles.dmi'
+ icon_state = "bluespace"
+ density = 1
+
+/obj/effect/anomaly/bluespace/New()
+ ..()
+ aSignal.origin_tech = "bluespace=5;magnets=3;powerstorage=2"
+
+/obj/effect/anomaly/bluespace/Bumped(atom/A)
+ if(isliving(A))
+ do_teleport(A, locate(A.x, A.y, A.z), 10)
+ return
+
+/////////////////////
+
+/obj/effect/anomaly/pyro
+ name = "pyroclastic anomaly"
+ icon_state = "mustard"
+
+/obj/effect/anomaly/pyro/New()
+ ..()
+ aSignal.origin_tech = "plasmatech=5;powerstorage=3;biotech=3"
+
+/obj/effect/anomaly/pyro/anomalyEffect()
+ ..()
+ var/turf/simulated/T = get_turf(src)
+ if(istype(T))
+ T.atmos_spawn_air("fire", 3)
+
+/////////////////////
+
+/obj/effect/anomaly/bhole
+ name = "vortex anomaly"
+ icon_state = "bhole3"
+ desc = "That's a nice station you have there. It'd be a shame if something happened to it."
+
+/obj/effect/anomaly/bhole/New()
+ ..()
+ aSignal.origin_tech = "materials=5;combat=4;engineering=3"
+
+/obj/effect/anomaly/bhole/anomalyEffect()
+ ..()
+ if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
+ del(src)
+ return
+
+ grav(rand(0,3), rand(2,3), 50, 25)
+
+ //Throwing stuff around!
+ for(var/obj/O in orange(1,src))
+ if(!O.anchored)
+ var/mob/living/target = locate() in view(5,src)
+ if(!target)
+ return
+ O.throw_at(target, 5, 10)
+ return
+ else
+ O.ex_act(2)
+
+/obj/effect/anomaly/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
+ for(var/t = -r, t < r, t++)
+ affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance)
+ affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance)
+ affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance)
+ affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance)
+ return
+
+/obj/effect/anomaly/bhole/proc/affect_coord(var/x, var/y, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
+ //Get turf at coordinate
+ var/turf/T = locate(x, y, z)
+ if(isnull(T)) return
+
+ //Pulling and/or ex_act-ing movable atoms in that turf
+ if(prob(pull_chance))
+ for(var/obj/O in T.contents)
+ if(O.anchored)
+ O.ex_act(ex_act_force)
+ else
+ step_towards(O,src)
+ for(var/mob/living/M in T.contents)
+ step_towards(M,src)
+
+ //Damaging the turf
+ if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
+ T.ex_act(ex_act_force)
+ return
\ No newline at end of file
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index e5921b45734..b8a6fca011e 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -428,19 +428,22 @@ var/global/floorIsLava = 0
"}
- if(check_rights(R_FUN,0))
+ if(check_rights(R_FUN,0))//TODO: Make all this hardcoded random event panel stuff its own proc so we can actually remove poor events without making the code stop compiling
dat += {"
'Random' Events
- Trigger a gravity-failure event.
+ Trigger a gravity-failure event
Spawn a wave of meteors (aka lagocolyptic shower)
- Spawn a gravitational anomaly (aka lagitational anomolag)
+ Spawn a vortex anomaly
+ Spawn a gravitational anomaly
+ Spawn a pyroclastic anomaly
+ Spawn a flux wave anomaly
+ Spawn a bluespace anomaly
Spawn wormholes
Spawn blob
Trigger an Alien infestation
Spawn an Alien silently
Trigger a Spider infestation
- Trigger a Bluespace Anomaly
Send in a space ninja
Trigger an Carp migration
Irradiate the station
@@ -451,7 +454,6 @@ var/global/floorIsLava = 0
Spawn an Ion Storm
Spawn Space-Vines
Trigger a communication blackout
- Trigger a hyper-energetic flux
Fun Secrets
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index ce1d1fe1308..d6338c1d8c3 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1458,7 +1458,7 @@
if(!check_rights(R_FUN,0))
removed_paths += dirty_path
continue
- else if(ispath(path, /obj/effect/bhole))
+ else if(ispath(path, /obj/effect/anomaly/bhole))
if(!check_rights(R_FUN,0))
removed_paths += dirty_path
continue
@@ -1673,63 +1673,31 @@
message_admins("\red [key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]", 1)
log_admin("[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
-/* if("shockwave")
- ok = 1
- world << "\red ALERT: STATION STRESS CRITICAL"
- sleep(60)
- world << "\red ALERT: STATION STRESS CRITICAL. TOLERABLE LEVELS EXCEEDED!"
- sleep(80)
- world << "\red ALERT: STATION STRUCTURAL STRESS CRITICAL. SAFETY MECHANISMS FAILED!"
- sleep(40)
- for(var/mob/M in world)
- shake_camera(M, 400, 1)
- for(var/obj/structure/window/W in world)
- spawn(0)
- sleep(rand(10,400))
- W.ex_act(rand(2,1))
- for(var/obj/structure/grille/G in world)
- spawn(0)
- sleep(rand(20,400))
- G.ex_act(rand(2,1))
- for(var/obj/machinery/door/D in world)
- spawn(0)
- sleep(rand(20,400))
- D.ex_act(rand(2,1))
- for(var/turf/station/floor/Floor in world)
- spawn(0)
- sleep(rand(30,400))
- Floor.ex_act(rand(2,1))
- for(var/obj/structure/cable/Cable in world)
- spawn(0)
- sleep(rand(30,400))
- Cable.ex_act(rand(2,1))
- for(var/obj/structure/closet/Closet in world)
- spawn(0)
- sleep(rand(30,400))
- Closet.ex_act(rand(2,1))
- for(var/obj/machinery/Machinery in world)
- spawn(0)
- sleep(rand(30,400))
- Machinery.ex_act(rand(1,3))
- for(var/turf/station/wall/Wall in world)
- spawn(0)
- sleep(rand(30,400))
- Wall.ex_act(rand(2,1)) */
if("wave")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","MW")
+ message_admins("[key_name_admin(usr)] has spawned meteors")
E = new /datum/round_event/meteor_wave()
-
if("gravanomalies")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","GA")
- E = new /datum/round_event/gravitational_anomaly()
-
+ message_admins("[key_name_admin(usr)] has spawned a gravitational anomaly")
+ E = new /datum/round_event/anomaly/anomaly_grav()
+ if("pyroanomalies")
+ feedback_inc("admin_secrets_fun_used",1)
+ feedback_add_details("admin_secrets_fun_used","PYRO")
+ message_admins("[key_name_admin(usr)] has spawned a pyroclastic anomaly")
+ E = new /datum/round_event/anomaly/anomaly_pyro()
+ if("blackhole")
+ feedback_inc("admin_secrets_fun_used",1)
+ feedback_add_details("admin_secrets_fun_used","BH")
+ message_admins("[key_name_admin(usr)] has spawned a vortex anomaly")
+ E = new /datum/round_event/anomaly/anomaly_vortex()
if("timeanomalies") //dear god this code was awful :P Still needs further optimisation
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","STA")
+ message_admins("[key_name_admin(usr)] has made wormholes")
E = new /datum/round_event/wormholes()
-
if("goblob")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BL")
@@ -1750,7 +1718,7 @@
feedback_add_details("admin_secrets_fun_used","SL")
message_admins("[key_name_admin(usr)] has spawned spiders", 1)
if("bluespaceanomaly")
- E = new /datum/round_event/bluespace_anomaly()
+ E = new /datum/round_event/anomaly/anomaly_bluespace()
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BA")
message_admins("[key_name_admin(usr)] has triggered a bluespace anomaly", 1)
@@ -1911,7 +1879,7 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","FLUX")
message_admins("[key_name_admin(usr)] has triggered an energetic flux")
- E = new /datum/round_event/energetic_flux()
+ E = new /datum/round_event/anomaly/anomaly_flux()
if(E)
E.processing = 0
if(E.announceWhen>0)
diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm
index b8ab1b44c13..cd5b0ee2d3f 100644
--- a/code/modules/assembly/signaler.dm
+++ b/code/modules/assembly/signaler.dm
@@ -168,3 +168,19 @@
receive_signal(datum/signal/signal)
if(!on) return
return ..(signal)
+
+
+// Embedded signaller used in anomalies.
+/obj/item/device/assembly/signaler/anomaly
+ name = "anomaly core"
+ desc = "The neutralized core of an anomaly. It'd probably be valuable for research."
+ icon_state = "anomaly core"
+ item_state = "electronic"
+
+/obj/item/device/assembly/signaler/anomaly/receive_signal(datum/signal/signal)
+ ..()
+ for(var/obj/effect/anomaly/A in orange(0, src))
+ A.anomalyNeutralize()
+
+/obj/item/device/assembly/signaler/anomaly/attack_self()
+ return
\ No newline at end of file
diff --git a/code/modules/events/anomaly.dm b/code/modules/events/anomaly.dm
new file mode 100644
index 00000000000..9e259ef7e48
--- /dev/null
+++ b/code/modules/events/anomaly.dm
@@ -0,0 +1,31 @@
+/datum/round_event_control/anomaly
+ name = "Energetic Flux"
+ typepath = /datum/round_event/anomaly
+ max_occurrences = 0 //This one probably shouldn't occur! It'd work, but it wouldn't be very fun.
+ weight = 15
+
+/datum/round_event/anomaly
+ var/area/impact_area
+ var/obj/effect/anomaly/newAnomaly
+
+
+/datum/round_event/anomaly/setup()
+ impact_area = findEventArea()
+
+/datum/round_event/anomaly/announce()
+ command_alert("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
+
+/datum/round_event/anomaly/start()
+ var/turf/T = pick(get_area_turfs(impact_area))
+ if(T)
+ newAnomaly = new /obj/effect/anomaly/flux(T.loc)
+
+/datum/round_event/anomaly/tick()
+ if(!newAnomaly)
+ kill()
+ return
+ newAnomaly.anomalyEffect()
+
+/datum/round_event/anomaly/end()
+ if(newAnomaly)//Kill the anomaly if it still exists at the end.
+ del(newAnomaly)
\ No newline at end of file
diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm
new file mode 100644
index 00000000000..2974ce6bd8b
--- /dev/null
+++ b/code/modules/events/anomaly_bluespace.dm
@@ -0,0 +1,77 @@
+/datum/round_event_control/anomaly/anomaly_bluespace
+ name = "Bluespace Anomaly"
+ typepath = /datum/round_event/anomaly/anomaly_bluespace
+ max_occurrences = 1
+ weight = 5
+
+/datum/round_event/anomaly/anomaly_bluespace
+ startWhen = 3
+ announceWhen = 10
+ endWhen = 55
+
+
+/datum/round_event/anomaly/anomaly_bluespace/announce()
+ command_alert("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
+
+
+/datum/round_event/anomaly/anomaly_bluespace/start()
+ var/turf/T = pick(get_area_turfs(impact_area))
+ if(T)
+ newAnomaly = new /obj/effect/anomaly/bluespace(T.loc)
+
+
+/datum/round_event/anomaly/anomaly_bluespace/end()
+ if(newAnomaly)//If it hasn't been neutralized, it's time to warp half the station away jeez
+ var/turf/T = pick(get_area_turfs(impact_area))
+ if(T)
+ // Calculate new position (searches through beacons in world)
+ var/obj/item/device/radio/beacon/chosen
+ var/list/possible = list()
+ for(var/obj/item/device/radio/beacon/W in world)
+ possible += W
+
+ if(possible.len > 0)
+ chosen = pick(possible)
+
+ if(chosen)
+ // Calculate previous position for transition
+
+ var/turf/FROM = T // the turf of origin we're travelling FROM
+ var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
+
+ playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
+ command_alert("Massive bluespace translocation detected.", "Anomaly Alert")
+
+ var/list/flashers = list()
+ for(var/mob/living/carbon/human/M in viewers(TO, null))
+ if(M:eyecheck() <= 0)
+ flick("e_flash", M.flash) // flash dose faggots
+ flashers += M
+
+ var/y_distance = TO.y - FROM.y
+ var/x_distance = TO.x - FROM.x
+ for (var/atom/movable/A in range(12, FROM )) // iterate thru list of mobs in the area
+ if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid
+ if(A.anchored && istype(A, /obj/machinery)) continue
+ if(istype(A, /obj/structure/disposalpipe )) continue
+ if(istype(A, /obj/structure/cable )) continue
+
+ var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
+ if(!A.Move(newloc)) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
+ A.loc = locate(A.x + x_distance, A.y + y_distance, TO.z)
+
+ spawn()
+ if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect
+ var/mob/M = A
+ if(M.client)
+ var/obj/blueeffect = new /obj(src)
+ blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH"
+ blueeffect.icon = 'icons/effects/effects.dmi'
+ blueeffect.icon_state = "shieldsparkles"
+ blueeffect.layer = 17
+ blueeffect.mouse_opacity = 0
+ M.client.screen += blueeffect
+ sleep(20)
+ M.client.screen -= blueeffect
+ del(blueeffect)
+ del(newAnomaly)
\ No newline at end of file
diff --git a/code/modules/events/anomaly_flux.dm b/code/modules/events/anomaly_flux.dm
new file mode 100644
index 00000000000..eeb61e90ac0
--- /dev/null
+++ b/code/modules/events/anomaly_flux.dm
@@ -0,0 +1,26 @@
+/datum/round_event_control/anomaly/anomaly_flux
+ name = "Energetic Flux"
+ typepath = /datum/round_event/anomaly/anomaly_flux
+ max_occurrences = 2
+ weight = 15
+
+/datum/round_event/anomaly/anomaly_flux
+ startWhen = 3
+ announceWhen = 20
+ endWhen = 60
+
+
+/datum/round_event/anomaly/anomaly_flux/announce()
+ command_alert("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
+
+
+/datum/round_event/anomaly/anomaly_flux/start()
+ var/turf/T = pick(get_area_turfs(impact_area))
+ if(T)
+ newAnomaly = new /obj/effect/anomaly/flux(T.loc)
+
+
+/datum/round_event/anomaly/anomaly_flux/end()
+ if(newAnomaly)//If it hasn't been neutralized, it's time to blow up.
+ explosion(newAnomaly, -1, 3, 5, 5)
+ del(newAnomaly)
\ No newline at end of file
diff --git a/code/modules/events/anomaly_grav.dm b/code/modules/events/anomaly_grav.dm
new file mode 100644
index 00000000000..45e80c6d733
--- /dev/null
+++ b/code/modules/events/anomaly_grav.dm
@@ -0,0 +1,19 @@
+/datum/round_event_control/anomaly/anomaly_grav
+ name = "Gravitational Anomaly"
+ typepath = /datum/round_event/anomaly/anomaly_grav
+ max_occurrences = 2
+ weight = 15
+
+/datum/round_event/anomaly/anomaly_grav
+ startWhen = 3
+ announceWhen = 20
+ endWhen = 50
+
+
+/datum/round_event/anomaly/anomaly_grav/announce()
+ command_alert("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
+
+/datum/round_event/anomaly/anomaly_grav/start()
+ var/turf/T = pick(get_area_turfs(impact_area))
+ if(T)
+ newAnomaly = new /obj/effect/anomaly/grav(T.loc)
\ No newline at end of file
diff --git a/code/modules/events/anomaly_pyro.dm b/code/modules/events/anomaly_pyro.dm
new file mode 100644
index 00000000000..c258cff6c8b
--- /dev/null
+++ b/code/modules/events/anomaly_pyro.dm
@@ -0,0 +1,26 @@
+/datum/round_event_control/anomaly/anomaly_pyro
+ name = "Pyroclastic Anomaly"
+ typepath = /datum/round_event/anomaly/anomaly_pyro
+ max_occurrences = 2
+ weight = 15
+
+/datum/round_event/anomaly/anomaly_pyro
+ startWhen = 10
+ announceWhen = 3
+ endWhen = 70
+
+
+/datum/round_event/anomaly/anomaly_pyro/announce()
+ command_alert("Atmospheric anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
+
+/datum/round_event/anomaly/anomaly_pyro/start()
+ var/turf/T = pick(get_area_turfs(impact_area))
+ if(T)
+ newAnomaly = new /obj/effect/anomaly/pyro(T.loc)
+
+/datum/round_event/anomaly/anomaly_pyro/tick()
+ if(!newAnomaly)
+ kill()
+ return
+ if(IsMultiple(activeFor, 5))
+ newAnomaly.anomalyEffect()
\ No newline at end of file
diff --git a/code/modules/events/anomaly_vortex.dm b/code/modules/events/anomaly_vortex.dm
new file mode 100644
index 00000000000..4fe6d440691
--- /dev/null
+++ b/code/modules/events/anomaly_vortex.dm
@@ -0,0 +1,19 @@
+/datum/round_event_control/anomaly/anomaly_vortex
+ name = "Vortex Anomaly"
+ typepath = /datum/round_event/anomaly/anomaly_vortex
+ max_occurrences = 5
+ weight = 2
+
+/datum/round_event/anomaly/anomaly_vortex
+ startWhen = 10
+ announceWhen = 3
+ endWhen = 80
+
+
+/datum/round_event/anomaly/anomaly_vortex/announce()
+ command_alert("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert")
+
+/datum/round_event/anomaly/anomaly_vortex/start()
+ var/turf/T = pick(get_area_turfs(impact_area))
+ if(T)
+ newAnomaly = new /obj/effect/anomaly/bhole(T.loc)
\ No newline at end of file
diff --git a/code/modules/events/bluespaceanomaly.dm b/code/modules/events/bluespaceanomaly.dm
deleted file mode 100644
index a2956717d2b..00000000000
--- a/code/modules/events/bluespaceanomaly.dm
+++ /dev/null
@@ -1,94 +0,0 @@
-/datum/round_event_control/bluespace_anomaly
- name = "Bluespace Anomaly"
- typepath = /datum/round_event/bluespace_anomaly
- weight = 5
- max_occurrences = 1
-
-/datum/round_event/bluespace_anomaly
- announceWhen = 20
-
- var/area/impact_area
-
-
-/datum/round_event/bluespace_anomaly/setup()
- var/list/safe_areas = list(
- /area/turret_protected/ai,
- /area/turret_protected/ai_upload,
- /area/engine,
- /area/solar,
- /area/holodeck,
- /area/shuttle/arrival,
- /area/shuttle/escape/station,
- /area/shuttle/escape_pod1/station,
- /area/shuttle/escape_pod2/station,
- /area/shuttle/escape_pod3/station,
- /area/shuttle/escape_pod5/station,
- /area/shuttle/mining/station,
- /area/shuttle/transport1/station,
- /area/shuttle/specops/station)
-
- //These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up.
- var/list/danger_areas = list(
- /area/engine/break_room,
- /area/engine/chiefs_office)
-
-
- impact_area = locate(pick((the_station_areas - safe_areas) + danger_areas)) //need to locate() as it's just a list of paths.
-
-
-/datum/round_event/bluespace_anomaly/announce()
- command_alert("Bluespace anomaly detected in the vicinity of [station_name()]. [impact_area.name] has gone missing.", "Anomaly Alert")
-
-
-/datum/round_event/bluespace_anomaly/start()
- var/turf/T = pick(get_area_turfs(impact_area))
- if(T)
- // Calculate new position (searches through beacons in world)
- var/obj/item/device/radio/beacon/chosen
- var/list/possible = list()
- for(var/obj/item/device/radio/beacon/W in world)
- possible += W
-
- if(possible.len > 0)
- chosen = pick(possible)
-
- if(chosen)
- // Calculate previous position for transition
-
- var/turf/FROM = T // the turf of origin we're travelling FROM
- var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
-
- playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
-
- var/list/flashers = list()
- for(var/mob/living/carbon/human/M in viewers(TO, null))
- if(M:eyecheck() <= 0)
- flick("e_flash", M.flash) // flash dose faggots
- flashers += M
-
- var/y_distance = TO.y - FROM.y
- var/x_distance = TO.x - FROM.x
- for (var/atom/movable/A in range(12, FROM )) // iterate thru list of mobs in the area
- if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid
- if(A.anchored && istype(A, /obj/machinery)) continue
- if(istype(A, /obj/structure/disposalpipe )) continue
- if(istype(A, /obj/structure/cable )) continue
-
- var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
- if(!A.Move(newloc)) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
- A.loc = locate(A.x + x_distance, A.y + y_distance, TO.z)
-
- spawn()
- if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect
- var/mob/M = A
- if(M.client)
- var/obj/blueeffect = new /obj(src)
- blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH"
- blueeffect.icon = 'icons/effects/effects.dmi'
- blueeffect.icon_state = "shieldsparkles"
- blueeffect.layer = 17
- blueeffect.mouse_opacity = 0
- M.client.screen += blueeffect
- sleep(20)
- M.client.screen -= blueeffect
- del(blueeffect)
\ No newline at end of file
diff --git a/code/modules/events/energetic_flux.dm b/code/modules/events/energetic_flux.dm
deleted file mode 100644
index fed6a5359ba..00000000000
--- a/code/modules/events/energetic_flux.dm
+++ /dev/null
@@ -1,46 +0,0 @@
-/datum/round_event_control/energetic_flux
- name = "Energetic Flux"
- typepath = /datum/round_event/energetic_flux
- max_occurrences = 2
- weight = 15
-
-/datum/round_event/energetic_flux
- startWhen = 30
-
- var/area/impact_area
-
-
-/datum/round_event/energetic_flux/setup()
- var/list/safe_areas = list(
- /area/turret_protected/ai,
- /area/turret_protected/ai_upload,
- /area/engine,
- /area/solar,
- /area/holodeck,
- /area/shuttle/arrival,
- /area/shuttle/escape/station,
- /area/shuttle/escape_pod1/station,
- /area/shuttle/escape_pod2/station,
- /area/shuttle/escape_pod3/station,
- /area/shuttle/escape_pod5/station,
- /area/shuttle/mining/station,
- /area/shuttle/transport1/station,
- /area/shuttle/specops/station)
-
- //These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up.
- var/list/danger_areas = list(
- /area/engine/break_room,
- /area/engine/chiefs_office)
-
-
- impact_area = locate(pick((the_station_areas - safe_areas) + danger_areas)) //need to locate() as it's just a list of paths.
-
-
-/datum/round_event/energetic_flux/announce()
- command_alert("Warning! Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name]. Vacate [impact_area.name].", "Anomaly Alert")
-
-
-/datum/round_event/energetic_flux/start()
- var/turf/T = pick(get_area_turfs(impact_area))
- if(T)
- explosion(T, -1, 2, 4, 5)
\ No newline at end of file
diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm
index c11bc109001..52ffee5fc4c 100644
--- a/code/modules/events/event_manager.dm
+++ b/code/modules/events/event_manager.dm
@@ -81,6 +81,34 @@ var/datum/controller/event/events
continue
return
+
+/datum/round_event/proc/findEventArea() //Here's a nice proc to use to find an area for your event to land in!
+ var/list/safe_areas = list(
+ /area/turret_protected/ai,
+ /area/turret_protected/ai_upload,
+ /area/engine,
+ /area/solar,
+ /area/holodeck,
+ /area/shuttle/arrival,
+ /area/shuttle/escape/station,
+ /area/shuttle/escape_pod1/station,
+ /area/shuttle/escape_pod2/station,
+ /area/shuttle/escape_pod3/station,
+ /area/shuttle/escape_pod5/station,
+ /area/shuttle/mining/station,
+ /area/shuttle/transport1/station,
+ /area/shuttle/specops/station)
+
+ //These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up.
+ var/list/danger_areas = list(
+ /area/engine/break_room,
+ /area/engine/chiefs_office)
+
+ //Need to locate() as it's just a list of paths.
+ return locate(pick((the_station_areas - safe_areas) + danger_areas))
+
+
+
//allows a client to trigger an event (For Debugging Purposes)
/client/proc/forceEvent(var/datum/round_event_control/E in events.control)
set name = "Trigger Event (Debug Only)"
@@ -93,6 +121,7 @@ var/datum/controller/event/events
E.runEvent()
message_admins("[key_name_admin(usr)] has triggered an event. ([E.name])", 1)
+
/*
//////////////
// HOLIDAYS //
diff --git a/code/modules/events/gravitational_anomaly.dm b/code/modules/events/gravitational_anomaly.dm
deleted file mode 100644
index a39c26561b2..00000000000
--- a/code/modules/events/gravitational_anomaly.dm
+++ /dev/null
@@ -1,114 +0,0 @@
-/datum/round_event_control/gravitational_anomaly
- name = "Gravitational Anomaly"
- typepath = /datum/round_event/gravitational_anomaly
- max_occurrences = 5
- weight = 2
-
-/datum/round_event/gravitational_anomaly
- startWhen = 10
-
- var/obj/effect/bhole/blackhole
-
-/datum/round_event/gravitational_anomaly/announce()
- command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
- for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player))
- M << sound('sound/AI/granomalies.ogg')
-
-/datum/round_event/gravitational_anomaly/setup()
- endWhen = rand(50, 200)
-
-/datum/round_event/gravitational_anomaly/start()
- var/turf/T = pick(blobstart)
- blackhole = new /obj/effect/bhole( T.loc, 30 )
-
-/datum/round_event/gravitational_anomaly/end()
- del(blackhole)
-
-
-/obj/effect/bhole
- name = "black hole"
- icon = 'icons/obj/objects.dmi'
- desc = "FUCK FUCK FUCK AAAHHH"
- icon_state = "bhole3"
- opacity = 1
- unacidable = 1
- density = 0
- anchored = 1
-
-/obj/effect/bhole/New()
- spawn(4)
- controller()
-
-/obj/effect/bhole/proc/controller()
- while(src)
-
- if(!isturf(loc))
- del(src)
- return
-
- //DESTROYING STUFF AT THE EPICENTER
- for(var/mob/living/M in orange(1,src))
- del(M)
- for(var/obj/O in orange(1,src))
- del(O)
- for(var/turf/simulated/ST in orange(1,src))
- ST.ChangeTurf(/turf/space)
-
- sleep(6)
- grav(10, 4, 10, 0 )
- sleep(6)
- grav( 8, 4, 10, 0 )
- sleep(6)
- grav( 9, 4, 10, 0 )
- sleep(6)
- grav( 7, 3, 40, 1 )
- sleep(6)
- grav( 5, 3, 40, 1 )
- sleep(6)
- grav( 6, 3, 40, 1 )
- sleep(6)
- grav( 4, 2, 50, 6 )
- sleep(6)
- grav( 3, 2, 50, 6 )
- sleep(6)
- grav( 2, 2, 75,25 )
- sleep(6)
-
- //MOVEMENT
- if( prob(50) )
- src.anchored = 0
- step(src,pick(alldirs))
- src.anchored = 1
-
-/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
- if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
- del(src)
- return
- for(var/t = -r, t < r, t++)
- affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance)
- affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance)
- affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance)
- affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance)
- return
-
-/obj/effect/bhole/proc/affect_coord(var/x, var/y, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
- //Get turf at coordinate
- var/turf/T = locate(x, y, z)
- if(isnull(T)) return
-
- //Pulling and/or ex_act-ing movable atoms in that turf
- if( prob(pull_chance) )
- for(var/obj/O in T.contents)
- if(O.anchored)
- O.ex_act(ex_act_force)
- else
- step_towards(O,src)
- for(var/mob/living/M in T.contents)
- step_towards(M,src)
-
- //Destroying the turf
- if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
- var/turf/simulated/ST = T
- ST.ChangeTurf(/turf/space)
- return
\ No newline at end of file
diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi
index e397ed768ae..e99e87a425d 100644
Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ
diff --git a/icons/obj/assemblies/new_assemblies.dmi b/icons/obj/assemblies/new_assemblies.dmi
index 96b36bbf369..ae869fa9094 100644
Binary files a/icons/obj/assemblies/new_assemblies.dmi and b/icons/obj/assemblies/new_assemblies.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index 789d0f5be3e..d90574fd1f4 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -412,6 +412,7 @@
#include "code\game\objects\structures.dm"
#include "code\game\objects\weapons.dm"
#include "code\game\objects\effects\aliens.dm"
+#include "code\game\objects\effects\anomalies.dm"
#include "code\game\objects\effects\bump_teleporter.dm"
#include "code\game\objects\effects\effect_system.dm"
#include "code\game\objects\effects\forcefields.dm"
@@ -754,19 +755,22 @@
#include "code\modules\detectivework\footprints_and_rag.dm"
#include "code\modules\detectivework\scanner.dm"
#include "code\modules\events\alien_infestation.dm"
+#include "code\modules\events\anomaly.dm"
+#include "code\modules\events\anomaly_bluespace.dm"
+#include "code\modules\events\anomaly_flux.dm"
+#include "code\modules\events\anomaly_grav.dm"
+#include "code\modules\events\anomaly_pyro.dm"
+#include "code\modules\events\anomaly_vortex.dm"
#include "code\modules\events\blob.dm"
-#include "code\modules\events\bluespaceanomaly.dm"
#include "code\modules\events\brand_intelligence.dm"
#include "code\modules\events\carp_migration.dm"
#include "code\modules\events\communications_blackout.dm"
#include "code\modules\events\disease_outbreak.dm"
#include "code\modules\events\dust.dm"
#include "code\modules\events\electrical_storm.dm"
-#include "code\modules\events\energetic_flux.dm"
#include "code\modules\events\event.dm"
#include "code\modules\events\event_manager.dm"
#include "code\modules\events\false_alarm.dm"
-#include "code\modules\events\gravitational_anomaly.dm"
#include "code\modules\events\immovable_rod.dm"
#include "code\modules\events\ion_storm.dm"
#include "code\modules\events\mass_hallucination.dm"