From f5d397030cc5ff395e292dcdd7cbf8370b62d44a Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Tue, 19 Jun 2012 01:19:09 +1200 Subject: [PATCH] Remove unneeded UnitsNearExtractionLZ code --- OpenRA.Mods.RA/Missions/Allies01Script.cs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/OpenRA.Mods.RA/Missions/Allies01Script.cs b/OpenRA.Mods.RA/Missions/Allies01Script.cs index 1bf7a49170..1625160cc5 100644 --- a/OpenRA.Mods.RA/Missions/Allies01Script.cs +++ b/OpenRA.Mods.RA/Missions/Allies01Script.cs @@ -69,14 +69,14 @@ namespace OpenRA.Mods.RA.Missions private const string tanyaName = "e7"; private const string chinookName = "tran"; - private void NextObjective(int currentFrameNumber) + private void NextObjective() { currentObjective++; } - private void DisplayObjective(string text) + private void DisplayObjective() { - Game.AddChatLine(Color.LimeGreen, "Objective", text); + Game.AddChatLine(Color.LimeGreen, "Objective", objectives[currentObjective]); } private void MissionFailed(Actor self, string text) @@ -114,7 +114,7 @@ namespace OpenRA.Mods.RA.Missions // display current objective every so often if (self.World.FrameNumber % 1500 == 1) { - DisplayObjective(objectives[currentObjective]); + DisplayObjective(); } // taunt every so often if (self.World.FrameNumber % 1000 == 0) @@ -140,8 +140,8 @@ namespace OpenRA.Mods.RA.Missions SpawnEinsteinAtLab(self); // spawn Einstein once the area is clear Sound.Play("einok1.aud"); // "Incredible!" - Einstein SendShips(self); - NextObjective(self.World.FrameNumber); - DisplayObjective(objectives[currentObjective]); + NextObjective(); + DisplayObjective(); } if (lab.Destroyed) { @@ -164,7 +164,7 @@ namespace OpenRA.Mods.RA.Missions { if (einsteinChinook.Trait().Passengers.Contains(einstein)) { - FlyFromExtractionLZ(); + FlyEinsteinFromExtractionLZ(); } if (UnitsNearActor(self, chinookExitPoint, 5).Contains(einsteinChinook) && !einstein.IsInWorld) { @@ -199,11 +199,6 @@ namespace OpenRA.Mods.RA.Missions .Where(a => a.IsInWorld && a != self.World.WorldActor && !a.Destroyed && a.HasTrait() && !a.Owner.NonCombatant); } - private IEnumerable UnitsNearExtractionLZ(Actor self, int range) - { - return UnitsNearActor(self, extractionLZ, range); - } - private IEnumerable UnitsNearLab(Actor self, int range) { return UnitsNearActor(self, lab, range); @@ -230,7 +225,7 @@ namespace OpenRA.Mods.RA.Missions } } - private void FlyFromExtractionLZ() + private void FlyEinsteinFromExtractionLZ() { einsteinChinook.QueueActivity(new Wait(150)); einsteinChinook.QueueActivity(new HeliFly(chinookExitPoint.CenterLocation));