From b04400e11c6a24f0ef670c3dcdf9aa63ad1b12fa Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Wed, 14 Dec 2011 02:32:33 +0000 Subject: [PATCH] Hopefully made meteor mode more deadly. Fixed meteor spawning so all the meteors that are set to spawn actually hit, but noticed that 50 meteors every 5 seconds proved itself to be way too laggy when all of them actually spawned properly and aren't deleted at soon as they're created due to being on the map's edge. Instead I lowered it to 6 per second. Wrote this in the changelog. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2679 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/gamemodes/meteor/meteor.dm | 7 +++---- code/game/gamemodes/meteor/meteors.dm | 27 ++++++++++++++++----------- code/game/turf.dm | 6 +++++- html/changelog.html | 9 +++++++++ 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index 9ac4c73a76e..866f9c4ba7c 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -24,14 +24,13 @@ /datum/game_mode/meteor/process() if(nometeors) return - if(prob(80)) + /*if(prob(80)) spawn() dust_swarm("norm") else spawn() - dust_swarm("strong") - if(prob(10)) meteor_wave() - else spawn_meteors() + dust_swarm("strong")*/ + spawn() spawn_meteors(6) /datum/game_mode/meteor/declare_completion() diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index b4bfe0e5d3a..c4a910c32b8 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -6,19 +6,19 @@ /var/const/meteors_in_wave = 50 /var/const/meteors_in_small_wave = 10 -/proc/meteor_wave() +/proc/meteor_wave(var/number = meteors_in_wave) if(!ticker || wavesecret) return wavesecret = 1 - for(var/i = 0 to meteors_in_wave) + for(var/i = 0 to number) spawn(rand(10,100)) spawn_meteor() spawn(meteor_wave_delay) wavesecret = 0 -/proc/spawn_meteors() - for(var/i = 0; i < meteors_in_small_wave; i++) +/proc/spawn_meteors(var/number = meteors_in_small_wave) + for(var/i = 0; i < number; i++) spawn(0) spawn_meteor() @@ -36,23 +36,23 @@ do switch(pick(1,2,3,4)) if(1) //NORTH - starty = world.maxy-1 + starty = world.maxy-3 startx = rand(1, world.maxx-1) endy = 1 endx = rand(1, world.maxx-1) if(2) //EAST starty = rand(1,world.maxy-1) - startx = world.maxx-1 + startx = world.maxx-3 endy = rand(1, world.maxy-1) endx = 1 if(3) //SOUTH - starty = 1 + starty = 3 startx = rand(1, world.maxx-1) endy = world.maxy-1 endx = rand(1, world.maxx-1) if(4) //WEST starty = rand(1, world.maxy-1) - startx = 1 + startx = 3 endy = rand(1,world.maxy-1) endx = world.maxx-1 @@ -67,9 +67,9 @@ var/obj/effect/meteor/M switch(rand(1, 100)) - if(1 to 10) + if(1 to 20) M = new /obj/effect/meteor/big( pickedstart ) - if(11 to 75) + if(21 to 75) M = new /obj/effect/meteor( pickedstart ) if(76 to 100) M = new /obj/effect/meteor/small( pickedstart ) @@ -137,7 +137,12 @@ if(!M.stat && !istype(M, /mob/living/silicon/ai)) //bad idea to shake an ai's view shake_camera(M, 3, 1) if (A) - explosion(src.loc, 0, 1, 2, 3, 0) + if(isobj(A)) + del(A) + else + meteorhit(A) + src.hits-- + return playsound(src.loc, 'meteorimpact.ogg', 40, 1) if (--src.hits <= 0) if(prob(15) && !istype(A, /obj/structure/grille)) diff --git a/code/game/turf.dm b/code/game/turf.dm index e2d55d8104d..c05fd4ae961 100644 --- a/code/game/turf.dm +++ b/code/game/turf.dm @@ -618,8 +618,12 @@ return /turf/simulated/wall/meteorhit(obj/M as obj) - if (M.icon_state == "flaming") + if (prob(15)) dismantle_wall() + else if(prob(70)) + ReplaceWithPlating() + else + ReplaceWithLattice() return 0 diff --git a/html/changelog.html b/html/changelog.html index f203ccda560..e97f6eeba74 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -54,6 +54,15 @@ Stuff which is in development and not yet visible to players or just code relate (ie. code improvements for expandability, etc.) should not be listed here. They should be listed in the changelog upon commit tho. Thanks. --> +14 December 2011 +
    +
  • Erro updated: +
      +
    • Meteor mode is hopefully deadly again!
    • +
    +
  • +
+ 11 December 2011
  • NEO updated: