Fix static readonly field capitalisation conventions

This commit is contained in:
Scott_NZ
2012-08-14 21:58:29 +12:00
parent c41fcb15b0
commit 1ed0d80348
2 changed files with 25 additions and 24 deletions

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.RA.Missions
class Allies01Script : IWorldLoaded, ITick class Allies01Script : IWorldLoaded, ITick
{ {
static readonly string[] objectives = static readonly string[] Objectives =
{ {
"Find Einstein. Tanya and Einstein must survive.", "Find Einstein. Tanya and Einstein must survive.",
"Wait for the helicopter and extract Einstein. Tanya and Einstein must survive." "Wait for the helicopter and extract Einstein. Tanya and Einstein must survive."
@@ -50,13 +50,13 @@ namespace OpenRA.Mods.RA.Missions
World world; World world;
static readonly string[] taunts = { "laugh1.aud", "lefty1.aud", "cmon1.aud", "gotit1.aud" }; static readonly string[] Taunts = { "laugh1.aud", "lefty1.aud", "cmon1.aud", "gotit1.aud" };
static readonly string[] ships = { "ca", "ca", "ca", "ca" }; static readonly string[] Ships = { "ca", "ca", "ca", "ca" };
static readonly string[] patrol = { "e1", "dog", "e1" }; static readonly string[] Patrol = { "e1", "dog", "e1" };
static readonly string[] attackWave = { "e1", "e1", "e1", "e1", "e2", "e2", "e2", "e2", "dog" }; static readonly string[] AttackWave = { "e1", "e1", "e1", "e1", "e2", "e2", "e2", "e2", "dog" };
static readonly string[] lastAttackWaveAddition = { "3tnk", "e1", "e1", "e1", "e1", "e2", "e2", "e2", "e2" }; static readonly string[] LastAttackWaveAddition = { "3tnk", "e1", "e1", "e1", "e1", "e2", "e2", "e2", "e2" };
int currentAttackWaveFrameNumber; int currentAttackWaveFrameNumber;
int currentAttackWave; int currentAttackWave;
const int EinsteinChinookAttackWave = 5; const int EinsteinChinookAttackWave = 5;
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.RA.Missions
void DisplayObjective() void DisplayObjective()
{ {
Game.AddChatLine(Color.LimeGreen, "Objective", objectives[currentObjective]); Game.AddChatLine(Color.LimeGreen, "Objective", Objectives[currentObjective]);
Sound.Play("bleep6.aud"); Sound.Play("bleep6.aud");
} }
@@ -113,7 +113,7 @@ namespace OpenRA.Mods.RA.Missions
// taunt every so often // taunt every so often
if (world.FrameNumber % 1000 == 0) if (world.FrameNumber % 1000 == 0)
{ {
Sound.Play(taunts[world.SharedRandom.Next(taunts.Length)]); Sound.Play(Taunts[world.SharedRandom.Next(Taunts.Length)]);
} }
// take Tanya to the LZ // take Tanya to the LZ
if (world.FrameNumber == 1) if (world.FrameNumber == 1)
@@ -144,12 +144,12 @@ namespace OpenRA.Mods.RA.Missions
if (world.FrameNumber >= currentAttackWaveFrameNumber + 600) if (world.FrameNumber >= currentAttackWaveFrameNumber + 600)
{ {
Sound.Play("enmyapp1.aud"); Sound.Play("enmyapp1.aud");
SendAttackWave(attackWave); SendAttackWave(AttackWave);
currentAttackWave++; currentAttackWave++;
currentAttackWaveFrameNumber = world.FrameNumber; currentAttackWaveFrameNumber = world.FrameNumber;
if (currentAttackWave >= EinsteinChinookAttackWave) if (currentAttackWave >= EinsteinChinookAttackWave)
{ {
SendAttackWave(lastAttackWaveAddition); SendAttackWave(LastAttackWaveAddition);
} }
if (currentAttackWave == EinsteinChinookAttackWave) if (currentAttackWave == EinsteinChinookAttackWave)
{ {
@@ -212,9 +212,9 @@ namespace OpenRA.Mods.RA.Missions
void SendPatrol() void SendPatrol()
{ {
for (int i = 0; i < patrol.Length; i++) for (int i = 0; i < Patrol.Length; i++)
{ {
var actor = world.CreateActor(patrol[i], new TypeDictionary { new OwnerInit(soviets), new LocationInit(insertionLZ.Location + new CVec(-1 + i, 10 + i * 2)) }); var actor = world.CreateActor(Patrol[i], new TypeDictionary { new OwnerInit(soviets), new LocationInit(insertionLZ.Location + new CVec(-1 + i, 10 + i * 2)) });
actor.QueueActivity(new Move.Move(insertionLZ.Location)); actor.QueueActivity(new Move.Move(insertionLZ.Location));
} }
} }
@@ -239,9 +239,9 @@ namespace OpenRA.Mods.RA.Missions
void SendShips() void SendShips()
{ {
for (int i = 0; i < ships.Length; i++) for (int i = 0; i < Ships.Length; i++)
{ {
var actor = world.CreateActor(ships[i], var actor = world.CreateActor(Ships[i],
new TypeDictionary { new OwnerInit(allies), new LocationInit(shipSpawnPoint.Location + new CVec(i * 2, 0)) }); new TypeDictionary { new OwnerInit(allies), new LocationInit(shipSpawnPoint.Location + new CVec(i * 2, 0)) });
actor.QueueActivity(new Move.Move(shipMovePoint.Location + new CVec(i * 4, 0))); actor.QueueActivity(new Move.Move(shipMovePoint.Location + new CVec(i * 4, 0)));
} }

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Missions
class Allies02Script : IWorldLoaded, ITick class Allies02Script : IWorldLoaded, ITick
{ {
static readonly string[] objectives = static readonly string[] Objectives =
{ {
"Hold off the Soviet forces and destroy the SAM sites. Tanya and Einstein must survive.", "Hold off the Soviet forces and destroy the SAM sites. Tanya and Einstein must survive.",
"Wait for the helicopter and extract Einstein. Tanya and Einstein must survive." "Wait for the helicopter and extract Einstein. Tanya and Einstein must survive."
@@ -64,11 +64,12 @@ namespace OpenRA.Mods.RA.Missions
const string InfantryQueueName = "Infantry"; const string InfantryQueueName = "Infantry";
const string VehicleQueueName = "Vehicle"; const string VehicleQueueName = "Vehicle";
static readonly string[] sovietInfantry = { "e1", "e2", "e3", "dog" }; static readonly string[] SovietInfantry = { "e1", "e2", "e3", "dog" };
static readonly string[] sovietVehicles = { "3tnk", "v2rl" }; static readonly string[] SovietVehicles = { "3tnk", "v2rl" };
const int ReinforcementsTicks = 1500 * 12; const int ReinforcementsTicks = 1500 * 12;
static readonly string[] reinforcements = { "1tnk", "1tnk", "jeep", "mcv" }; static readonly string[] Reinforcements = { "1tnk", "1tnk", "jeep", "mcv" };
const int ReinforcementsCash = 2000;
const string ChinookName = "tran"; const string ChinookName = "tran";
const string SignalFlareName = "flare"; const string SignalFlareName = "flare";
@@ -77,7 +78,7 @@ namespace OpenRA.Mods.RA.Missions
void DisplayObjective() void DisplayObjective()
{ {
Game.AddChatLine(Color.LimeGreen, "Objective", objectives[currentObjective]); Game.AddChatLine(Color.LimeGreen, "Objective", Objectives[currentObjective]);
Sound.Play("bleep6.aud"); Sound.Play("bleep6.aud");
} }
@@ -182,17 +183,17 @@ namespace OpenRA.Mods.RA.Missions
return; return;
} }
var resources = soviets.PlayerActor.Trait<PlayerResources>(); var resources = soviets.PlayerActor.Trait<PlayerResources>();
if (resources.Cash < 2000) if (resources.Cash < ReinforcementsCash)
{ {
resources.GiveCash(2000); resources.GiveCash(ReinforcementsCash);
} }
if (!sovietBarracks.Destroyed) if (!sovietBarracks.Destroyed)
{ {
BuildUnitIfQueueIdle(soviets, InfantryQueueName, sovietInfantry[world.SharedRandom.Next(sovietInfantry.Length)]); BuildUnitIfQueueIdle(soviets, InfantryQueueName, SovietInfantry[world.SharedRandom.Next(SovietInfantry.Length)]);
} }
if (!sovietWarFactory.Destroyed) if (!sovietWarFactory.Destroyed)
{ {
BuildUnitIfQueueIdle(soviets, VehicleQueueName, sovietVehicles[world.SharedRandom.Next(sovietVehicles.Length)]); BuildUnitIfQueueIdle(soviets, VehicleQueueName, SovietVehicles[world.SharedRandom.Next(SovietVehicles.Length)]);
} }
} }
@@ -244,7 +245,7 @@ namespace OpenRA.Mods.RA.Missions
Sound.Play("reinfor1.aud"); Sound.Play("reinfor1.aud");
var resources = allies2.PlayerActor.Trait<PlayerResources>(); var resources = allies2.PlayerActor.Trait<PlayerResources>();
resources.GiveCash(2000); resources.GiveCash(2000);
foreach (var unit in reinforcements) foreach (var unit in Reinforcements)
{ {
var actor = world.CreateActor(unit, new TypeDictionary var actor = world.CreateActor(unit, new TypeDictionary
{ {