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