From 8b4a050ad3added768f836bfd99c73d7d721e9a6 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sat, 25 Jan 2020 22:03:53 -0700 Subject: [PATCH 1/2] ok --- code/game/gamemodes/meteor/meteors.dm | 8 ++++---- code/modules/events/meteor_wave.dm | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 6d681f8108..cfb4c9a120 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -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) diff --git a/code/modules/events/meteor_wave.dm b/code/modules/events/meteor_wave.dm index a1a82ea5f7..b46d253d9f 100644 --- a/code/modules/events/meteor_wave.dm +++ b/code/modules/events/meteor_wave.dm @@ -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" From 54f9df9f882a1477707abb26c0eb4be35f3e6971 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 27 Jan 2020 13:19:53 -0700 Subject: [PATCH 2/2] ;GUYS WHERE'S PORT I KEEP FORGETTING MY DIRECTIONS --- code/modules/events/meteor_wave.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/events/meteor_wave.dm b/code/modules/events/meteor_wave.dm index b46d253d9f..79d80b960a 100644 --- a/code/modules/events/meteor_wave.dm +++ b/code/modules/events/meteor_wave.dm @@ -64,13 +64,13 @@ var/directionstring switch(direction) if(NORTH) - directionstring = " from the north." + directionstring = " towards the fore" if(SOUTH) - directionstring = " from the south." + directionstring = " towards the aft" if(EAST) - directionstring = " from the east." + directionstring = " towards starboard" if(WEST) - directionstring = " from the west." + directionstring = " towards port" 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()