From 8d773e827c1a67f5f9df423db3643f9777232ac8 Mon Sep 17 00:00:00 2001 From: "petethegoat@gmail.com" Date: Sat, 12 Jan 2013 18:05:41 +0000 Subject: [PATCH] Made the alien infestation event only create a command report if it successfully spawns an alien. Slightly improved comms blackout code. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5530 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/events/alien_infestation.dm | 11 +++++++---- code/modules/events/communications_blackout.dm | 14 ++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 2b8aef95c1c..4a47cd98adb 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -3,6 +3,7 @@ oneShot = 1 var/spawncount = 1 + var/successSpawn = 0 //So we don't make a command report if nothing gets spawned. /datum/event/alien_infestation/setup() @@ -10,8 +11,9 @@ spawncount = rand(1, 2) /datum/event/alien_infestation/announce() - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') + if(successSpawn) + command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") + world << sound('sound/AI/aliens.ogg') /datum/event/alien_infestation/start() @@ -23,7 +25,7 @@ var/list/candidates = get_alien_candidates() - while((spawncount >= 1) && vents.len && candidates.len) + while(spawncount > 0 && vents.len >= spawncount && candidates.len >= spawncount) var/obj/vent = pick(vents) var/candidate = pick(candidates) @@ -32,4 +34,5 @@ candidates -= candidate vents -= vent - spawncount-- \ No newline at end of file + spawncount-- + successSpawn = 1 \ No newline at end of file diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm index 5e8bdf4a957..194d45e90de 100644 --- a/code/modules/events/communications_blackout.dm +++ b/code/modules/events/communications_blackout.dm @@ -1,12 +1,10 @@ /datum/event/communications_blackout/announce() - var/list/alerts = list( "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you*%fj00)`5vc-BZZT", \ - "Ionospheric anomalies detected. Temporary telecommunication failu*3mga;b4;'1v¬-BZZZT", \ - "Ionospheric anomalies detected. Temporary telec#MCi46:5.;@63-BZZZZT", \ - "Ionospheric anomalies dete'fZ\\kg5_0-BZZZZZT", \ - "Ionospheri:%£ MCayj^j<.3-BZZZZZZT", \ - "#4nd%;f4y6,>£%-BZZZZZZZT") - - var/alert = pick(alerts) + var/alert = pick( "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you*%fj00)`5vc-BZZT", \ + "Ionospheric anomalies detected. Temporary telecommunication failu*3mga;b4;'1v¬-BZZZT", \ + "Ionospheric anomalies detected. Temporary telec#MCi46:5.;@63-BZZZZT", \ + "Ionospheric anomalies dete'fZ\\kg5_0-BZZZZZT", \ + "Ionospheri:%£ MCayj^j<.3-BZZZZZZT", \ + "#4nd%;f4y6,>£%-BZZZZZZZT") for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts. A << "
"