This commit is contained in:
kevinz000
2020-01-25 22:03:53 -07:00
parent 603ab65ed1
commit 8b4a050ad3
2 changed files with 19 additions and 7 deletions
+15 -3
View File
@@ -18,6 +18,7 @@
announceWhen = 1
var/list/wave_type
var/wave_name = "normal"
var/direction
/datum/round_event/meteor_wave/setup()
announceWhen = 1
@@ -26,7 +27,6 @@
startWhen *= 1 - min(GLOB.singularity_counter * SINGULO_BEACON_DISTURBANCE, SINGULO_BEACON_MAX_DISTURBANCE)
endWhen = startWhen + 60
/datum/round_event/meteor_wave/New()
..()
if(!wave_type)
@@ -38,6 +38,8 @@
"normal" = 50,
"threatening" = 40,
"catastrophic" = 10))
if(!direction)
direction = pick(GLOB.cardinals)
switch(wave_name)
if("normal")
wave_type = GLOB.meteors_normal
@@ -59,11 +61,21 @@
kill()
/datum/round_event/meteor_wave/announce(fake)
priority_announce("Meteors have been detected on collision course with the station. Estimated time until impact: [round(startWhen/60)] minutes.[GLOB.singularity_counter ? " Warning: Anomalous gravity pulse detected, Syndicate technology interference likely." : ""]", "Meteor Alert", "meteors")
var/directionstring
switch(direction)
if(NORTH)
directionstring = " from the north."
if(SOUTH)
directionstring = " from the south."
if(EAST)
directionstring = " from the east."
if(WEST)
directionstring = " from the west."
priority_announce("Meteors have been detected on collision course with the station[directionstring]. Estimated time until impact: [round(startWhen/60)] minutes.[GLOB.singularity_counter ? " Warning: Anomalous gravity pulse detected, Syndicate technology interference likely." : ""]", "Meteor Alert", "meteors")
/datum/round_event/meteor_wave/tick()
if(ISMULTIPLE(activeFor, 3))
spawn_meteors(5, wave_type) //meteor list types defined in gamemode/meteor/meteors.dm
spawn_meteors(5, wave_type, direction) //meteor list types defined in gamemode/meteor/meteors.dm
/datum/round_event_control/meteor_wave/threatening
name = "Meteor Wave: Threatening"