Initial Event Rework

Adds anomalies, special effects which tie into the event system.

Ports bholes into an anomaly, cleans up their code.
Adds new gravitational anomalies. Imagine a trampoline.
Flux event is now an anomaly.
Adds a new pyro anomaly.
This commit is contained in:
Cheridan
2013-09-17 15:46:00 -05:00
parent 0e33492e19
commit 2ee9e23ea9
11 changed files with 315 additions and 177 deletions
+5 -3
View File
@@ -428,14 +428,16 @@ 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 black hole</A><BR>
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes</A><BR>
<A href='?src=\ref[src];secretsfun=pyroanomalies'>Spawn a pyroclastic anomaly</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>
+16 -48
View File
@@ -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_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_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_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")
@@ -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_flux()
if(E)
E.processing = 0
if(E.announceWhen>0)