removed RaceUtil

This commit is contained in:
Chris Forbes
2010-02-10 14:33:00 +13:00
parent c3f4653801
commit d03fdc00be
5 changed files with 4 additions and 26 deletions

View File

@@ -363,7 +363,7 @@ namespace OpenRa
void CycleRace(bool left)
{
// hack
var newRace = Game.world.LocalPlayer.Race == RaceUtil.Allies ? RaceUtil.Soviet : RaceUtil.Allies;
var newRace = Game.world.LocalPlayer.Race == "allies" ? "soviet" : "allies";
Game.IssueOrder(Order.Chat("/race " + newRace));
}

View File

@@ -165,7 +165,6 @@
<Compile Include="Orders\IOrderGenerator.cs" />
<Compile Include="Orders\PlaceBuildingOrderGenerator.cs" />
<Compile Include="Player.cs" />
<Compile Include="Race.cs" />
<Compile Include="Graphics\Sheet.cs" />
<Compile Include="PathFinder.cs" />
<Compile Include="Graphics\Sequence.cs" />

View File

@@ -62,7 +62,7 @@ namespace OpenRa
this.PaletteIndex = client != null ? client.PaletteIndex : index;
this.PlayerName = client != null ? client.Name : "Player {0}".F(index+1);
this.Race = client != null ? client.Race : RaceUtil.Allies;
this.Race = client != null ? client.Race : "allies";
}
void UpdatePower()

View File

@@ -1,21 +0,0 @@
using System;
namespace OpenRa
{
public static class RaceUtil
{
/* just while we do the transition */
public static readonly string Allies = "allies";
public static readonly string Soviet = "soviet";
public static readonly string DefaultRace = Allies;
}
//[Flags]
//public enum Race
//{
// None = 0,
// Allies = 1,
// Soviet = 2
//}
}

View File

@@ -109,8 +109,8 @@ namespace OpenRa
return;
}
var variants = (voicedUnit.Owner.Race == RaceUtil.Soviet)
? vi.SovietVariants : vi.AlliedVariants;
var variants = (voicedUnit.Owner.Race == "allies")
? vi.AlliedVariants : vi.SovietVariants;
var variant = variants[voicedUnit.ActorID % variants.Length];