Rename BuildableInfo.ForceRace
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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")
|
||||
{
|
||||
|
||||
@@ -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 =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user