mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Merge pull request #1415 from Cheridan/ProjectStormchaser
"Anomaly" Events!
This commit is contained in:
@@ -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 << "<span class='notice'>Analyzing... [src]'s unstable field is fluctuating along frequency [aSignal.code]:[format_frequency(aSignal.frequency)].</span>"
|
||||
|
||||
///////////////////////
|
||||
|
||||
/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
|
||||
@@ -428,19 +428,22 @@ var/global/floorIsLava = 0
|
||||
<BR>
|
||||
"}
|
||||
|
||||
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 += {"
|
||||
<B>'Random' Events</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravity'>Trigger a gravity-failure event.</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravity'>Trigger a gravity-failure event</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=wave'>Spawn a wave of meteors (aka lagocolyptic shower)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly (aka lagitational anomolag)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=blackhole'>Spawn a vortex anomaly</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=pyroanomalies'>Spawn a pyroclastic anomaly</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=energeticflux'>Spawn a flux wave anomaly</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=bluespaceanomaly'>Spawn a bluespace anomaly</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=goblob'>Spawn blob</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=alien_silent'>Spawn an Alien silently</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spiders'>Trigger a Spider infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=bluespaceanomaly'>Trigger a Bluespace Anomaly</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spaceninja'>Send in a space ninja</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=carp'>Trigger an Carp migration</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=radiation'>Irradiate the station</A><BR>
|
||||
@@ -451,7 +454,6 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];secretsfun=ionstorm'>Spawn an Ion Storm</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spacevines'>Spawn Space-Vines</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=comms_blackout'>Trigger a communication blackout</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=energeticflux'>Trigger a hyper-energetic flux</A><BR>
|
||||
<BR>
|
||||
<B>Fun Secrets</B><BR>
|
||||
<BR>
|
||||
|
||||
+17
-49
@@ -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 <b> [key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]</b>", 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 <B><big>ALERT: STATION STRESS CRITICAL</big></B>"
|
||||
sleep(60)
|
||||
world << "\red <B><big>ALERT: STATION STRESS CRITICAL. TOLERABLE LEVELS EXCEEDED!</big></B>"
|
||||
sleep(80)
|
||||
world << "\red <B><big>ALERT: STATION STRUCTURAL STRESS CRITICAL. SAFETY MECHANISMS FAILED!</big></B>"
|
||||
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)
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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()
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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 //
|
||||
|
||||
@@ -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
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 259 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 11 KiB |
+7
-3
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user