From b888e72baa2a1041c50eab6578fe7822df9035fa Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Mon, 16 Nov 2015 19:40:47 -0500 Subject: [PATCH] Update to meteor gamemode --- code/game/gamemodes/meteor/meteor.dm | 14 +++++--------- code/game/gamemodes/meteor/meteors.dm | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index 1574234911f..a7c61156095 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -4,7 +4,7 @@ var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) var/const/initialmeteordelay = 6000 - var/nometeors = 1 + var/wave = 1 required_players = 0 uplink_welcome = "EVIL METEOR Uplink Console:" @@ -20,24 +20,20 @@ spawn (rand(waittime_l, waittime_h)) command_announcement.Announce("The station is on the path of an incoming wave of meteors. Reinforce the hull and prepare damage control parties.", "Incoming Meteors", 'sound/effects/siren.ogg') spawn(initialmeteordelay) - nometeors = 0 + sendmeteors() ..() -/datum/game_mode/meteor/process() - if(nometeors) return - sendmeteors() - /datum/game_mode/meteor/proc/sendmeteors() - nometeors = 1 - var/waveduration = world.time + rand(1500,3000) + var/waveduration = world.time + rand(0,2000) + text2num("[wave]000") var/waitduration = rand(3000,9000) while(waveduration - world.time > 0) sleep(20) spawn() spawn_meteors(6, meteors_normal) + wave++ sleep(waitduration) - nometeors = 0 + sendmeteors() /datum/game_mode/meteor/declare_completion() var/text diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 23611eb1af5..1a6d5692288 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -170,7 +170,8 @@ if(!T || T.z != src.z) continue var/dist = get_dist(M.loc, src.loc) - shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3) + if(prob(25)) + shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3) M.playsound_local(src.loc, meteorsound, 50, 1, get_rand_frequency(), 10) ///////////////////////