From 9f3abbcd732ba5ae0b2a353dcd3ad14b1235ea22 Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Wed, 23 Feb 2011 21:26:41 +0000 Subject: [PATCH] Meteor mode actually pummels the station with meteors now. The meteors don't start right away, and a centcomm report is still sent. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1101 316c924e-a436-60f5-8080-3fe189b3f50e --- .../game/gamemodes/malfunction/malfunction.dm | 2 +- code/game/gamemodes/meteor/meteor.dm | 44 ++++++++++++++++++- code/game/gamemodes/meteor/meteors.dm | 4 +- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 2d6119016ac..cbdebbd3470 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -102,7 +102,7 @@ comm.messagetext.Add(intercepttext) command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") - + world << sound('intercept.ogg') /datum/game_mode/malfunction/process() if (apcs >= 3 && malf_mode_declared) diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index 3a651045851..c4329a71be8 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -1,11 +1,26 @@ /datum/game_mode/meteor name = "meteor" config_tag = "meteor" + 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/meteordelay = 2000 + var/nometeors = 1 /datum/game_mode/meteor/announce() world << "The current game mode is - Meteor!" world << "The space station has been stuck in a major meteor shower. You must escape from the station or at least live." +/datum/game_mode/meteor/post_setup() + spawn (rand(waittime_l, waittime_h)) + send_intercept() + spawn(meteordelay) + nometeors = 0 + +/datum/game_mode/meteor/process() + if (nometeors) return + if (prob(10)) meteor_wave() + else spawn_meteors() + /datum/game_mode/meteor/declare_completion() var/list/survivors = list() var/area/escape_zone = locate(/area/shuttle/escape/centcom) @@ -36,4 +51,31 @@ else world << "\blue No one survived the meteor attack!" - return 1 \ No newline at end of file + return 1 + +/datum/game_mode/meteor/send_intercept() + var/intercepttext = "Cent. Com. Update Requested staus information:
" + intercepttext += " Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:" + + var/list/possible_modes = list() + possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf", "changeling", "cult") + var/number = pick(3, 4) + var/i = 0 + for(i = 0, i < number, i++) + possible_modes.Remove(pick(possible_modes)) + + var/datum/intercept_text/i_text = new /datum/intercept_text + for(var/A in possible_modes) + intercepttext += i_text.build(A, pick(ticker.minds)) + + for (var/obj/machinery/computer/communications/comm in world) + if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) + var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) + intercept.name = "paper- 'Cent. Com. Status Summary'" + intercept.info = intercepttext + + comm.messagetitle.Add("Cent. Com. Status Summary") + comm.messagetext.Add(intercepttext) + + command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.") + world << sound('intercept.ogg') \ No newline at end of file diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 1044959b6ef..07c93840f3e 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -3,8 +3,8 @@ /var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds //set to at least 100 unless you want evarr ruining every round -/var/const/meteors_in_wave = 150 -/var/const/meteors_in_small_wave = 3 +/var/const/meteors_in_wave = 50 +/var/const/meteors_in_small_wave = 10 /proc/meteor_wave() if(!ticker || wavesecret)