Rename BuildableInfo.ForceRace

This commit is contained in:
Pavel Penev
2015-07-31 04:52:42 +03:00
parent 720cb062b6
commit 10c5b82ef0
4 changed files with 7 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Orders
var buildableInfo = info.Traits.Get<BuildableInfo>();
var mostLikelyProducer = queue.MostLikelyProducer();
faction = buildableInfo.ForceRace
faction = buildableInfo.ForceFaction
?? (mostLikelyProducer.Trait != null ? mostLikelyProducer.Trait.Faction : producer.Owner.Faction.InternalName);
buildOk = map.SequenceProvider.GetSequence("overlay", "build-valid-{0}".F(tileset)).GetSprite(0);

View File

@@ -29,8 +29,8 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Disable production when there are more than this many of this actor on the battlefield. Set to 0 to disable.")]
public readonly int BuildLimit = 0;
[Desc("Force a specific race variant, overriding the race of the producing actor.")]
public readonly string ForceRace = null;
[Desc("Force a specific faction variant, overriding the faction of the producing actor.")]
public readonly string ForceFaction = null;
[Desc("Palette used for the production icon.")]
public readonly string IconPalette = "chrome";

View File

@@ -66,8 +66,8 @@ namespace OpenRA.Mods.Common.Traits
var buildingInfo = unit.Traits.Get<BuildingInfo>();
var buildableInfo = unit.Traits.GetOrDefault<BuildableInfo>();
if (buildableInfo != null && buildableInfo.ForceRace != null)
faction = buildableInfo.ForceRace;
if (buildableInfo != null && buildableInfo.ForceFaction != null)
faction = buildableInfo.ForceFaction;
if (os == "LineBuild")
{

View File

@@ -55,8 +55,8 @@ namespace OpenRA.Mods.Common.Traits
var target = Target.FromCell(self.World, exitLocation);
var bi = producee.Traits.GetOrDefault<BuildableInfo>();
if (bi != null && bi.ForceRace != null)
factionVariant = bi.ForceRace;
if (bi != null && bi.ForceFaction != null)
factionVariant = bi.ForceFaction;
self.World.AddFrameEndTask(w =>
{