ok
This commit is contained in:
@@ -21,16 +21,16 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
//Meteor spawning global procs
|
||||
///////////////////////////////
|
||||
|
||||
/proc/spawn_meteors(number = 10, list/meteortypes)
|
||||
/proc/spawn_meteors(number = 10, list/meteortypes, dir)
|
||||
for(var/i = 0; i < number; i++)
|
||||
spawn_meteor(meteortypes)
|
||||
spawn_meteor(meteortypes, dir)
|
||||
|
||||
/proc/spawn_meteor(list/meteortypes)
|
||||
/proc/spawn_meteor(list/meteortypes, dir)
|
||||
var/turf/pickedstart
|
||||
var/turf/pickedgoal
|
||||
var/max_i = 10//number of tries to spawn meteor.
|
||||
while(!isspaceturf(pickedstart))
|
||||
var/startSide = pick(GLOB.cardinals)
|
||||
var/startSide = dir || pick(GLOB.cardinals)
|
||||
var/startZ = pick(SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
pickedstart = spaceDebrisStartLoc(startSide, startZ)
|
||||
pickedgoal = spaceDebrisFinishLoc(startSide, startZ)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user