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 buildableInfo = info.Traits.Get<BuildableInfo>();
var mostLikelyProducer = queue.MostLikelyProducer(); var mostLikelyProducer = queue.MostLikelyProducer();
faction = buildableInfo.ForceRace faction = buildableInfo.ForceFaction
?? (mostLikelyProducer.Trait != null ? mostLikelyProducer.Trait.Faction : producer.Owner.Faction.InternalName); ?? (mostLikelyProducer.Trait != null ? mostLikelyProducer.Trait.Faction : producer.Owner.Faction.InternalName);
buildOk = map.SequenceProvider.GetSequence("overlay", "build-valid-{0}".F(tileset)).GetSprite(0); 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.")] [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; public readonly int BuildLimit = 0;
[Desc("Force a specific race variant, overriding the race of the producing actor.")] [Desc("Force a specific faction variant, overriding the faction of the producing actor.")]
public readonly string ForceRace = null; public readonly string ForceFaction = null;
[Desc("Palette used for the production icon.")] [Desc("Palette used for the production icon.")]
public readonly string IconPalette = "chrome"; public readonly string IconPalette = "chrome";

View File

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

View File

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