Merge pull request #2580 from ZomgPonies/meteors2

Update to meteor gamemode
This commit is contained in:
Fox McCloud
2015-11-18 13:36:14 -05:00
2 changed files with 7 additions and 10 deletions
+5 -9
View File
@@ -2,7 +2,7 @@
name = "meteor"
config_tag = "meteor"
var/const/initialmeteordelay = 6000
var/nometeors = 1
var/wave = 1
required_players = 0
uplink_welcome = "EVIL METEOR Uplink Console:"
@@ -18,24 +18,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
+2 -1
View File
@@ -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)
///////////////////////