From 12bd3f5b7ff684773b863ef3ae0bdd03ba7d3df1 Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Thu, 24 Feb 2011 03:22:18 +0000 Subject: [PATCH] Added big meteors, since the regular kind aren't proving sufficiently robust. For the sanity of the admins, meteor explosions are no longer adminlogged. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1112 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/gamemodes/meteor/meteors.dm | 36 +++++++++++++++++++++++---- code/game/objects/explosion.dm | 5 ++-- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 07c93840f3e..ebe647a9169 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -66,10 +66,14 @@ var/obj/meteor/M - if(rand(50)) - M = new /obj/meteor( pickedstart ) - else - M = new /obj/meteor/small( pickedstart ) + switch(rand(1, 100)) + + if(1 to 10) + M = new /obj/meteor/big( pickedstart ) + if(11 to 75) + M = new /obj/meteor( pickedstart ) + if(76 to 100) + M = new /obj/meteor/small( pickedstart ) M.dest = pickedgoal spawn(0) @@ -107,7 +111,7 @@ playsound(src.loc, 'meteorimpact.ogg', 40, 1) if (--src.hits <= 0) if(prob(15) && !istype(A, /obj/grille)) - explosion(src.loc, 0, 1, 2, 3) + explosion(src.loc, 0, 1, 2, 3, 0) playsound(src.loc, "explosion", 50, 1) del(src) return @@ -118,3 +122,25 @@ if (severity < 4) del(src) return + +/obj/meteor/big + name = "big meteor" + hits = 5 + + ex_act(severity) + return + + Bump(atom/A) + spawn(0) + for(var/mob/M in range(10, src)) + 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) + playsound(src.loc, 'meteorimpact.ogg', 40, 1) + if (--src.hits <= 0) + if(prob(15) && !istype(A, /obj/grille)) + explosion(src.loc, 1, 2, 3, 4, 0) + playsound(src.loc, "explosion", 50, 1) + del(src) + return \ No newline at end of file diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 9b314e6b12c..f7267080ed2 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -1,4 +1,4 @@ -proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range) +proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1) if(!epicenter) return spawn(0) defer_powernet_rebuild = 1 @@ -7,7 +7,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa return explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range) playsound(epicenter.loc, 'explosionfar.ogg', 100, 1, round(devastation_range*2,1) ) playsound(epicenter.loc, "explosion", 100, 1, round(devastation_range,1) ) - message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") + if (adminlog) + message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") if(heavy_impact_range > 1) var/datum/effects/system/explosion/E = new/datum/effects/system/explosion()