From 10c5b82ef0ef6e7895c2c033f66f999c739c77ce Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Fri, 31 Jul 2015 04:52:42 +0300 Subject: [PATCH] Rename `BuildableInfo.ForceRace` --- OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs | 2 +- OpenRA.Mods.Common/Traits/Buildable.cs | 4 ++-- OpenRA.Mods.Common/Traits/Player/PlaceBuilding.cs | 4 ++-- OpenRA.Mods.Common/Traits/Production.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs b/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs index a62a22fc65..7fdd18d242 100644 --- a/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs +++ b/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs @@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Orders var buildableInfo = info.Traits.Get(); 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); diff --git a/OpenRA.Mods.Common/Traits/Buildable.cs b/OpenRA.Mods.Common/Traits/Buildable.cs index 98cae3f1db..29dca7abc0 100644 --- a/OpenRA.Mods.Common/Traits/Buildable.cs +++ b/OpenRA.Mods.Common/Traits/Buildable.cs @@ -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"; diff --git a/OpenRA.Mods.Common/Traits/Player/PlaceBuilding.cs b/OpenRA.Mods.Common/Traits/Player/PlaceBuilding.cs index a332de68c4..07113bad52 100644 --- a/OpenRA.Mods.Common/Traits/Player/PlaceBuilding.cs +++ b/OpenRA.Mods.Common/Traits/Player/PlaceBuilding.cs @@ -66,8 +66,8 @@ namespace OpenRA.Mods.Common.Traits var buildingInfo = unit.Traits.Get(); var buildableInfo = unit.Traits.GetOrDefault(); - if (buildableInfo != null && buildableInfo.ForceRace != null) - faction = buildableInfo.ForceRace; + if (buildableInfo != null && buildableInfo.ForceFaction != null) + faction = buildableInfo.ForceFaction; if (os == "LineBuild") { diff --git a/OpenRA.Mods.Common/Traits/Production.cs b/OpenRA.Mods.Common/Traits/Production.cs index 497bdf3fae..b359243b46 100644 --- a/OpenRA.Mods.Common/Traits/Production.cs +++ b/OpenRA.Mods.Common/Traits/Production.cs @@ -55,8 +55,8 @@ namespace OpenRA.Mods.Common.Traits var target = Target.FromCell(self.World, exitLocation); var bi = producee.Traits.GetOrDefault(); - if (bi != null && bi.ForceRace != null) - factionVariant = bi.ForceRace; + if (bi != null && bi.ForceFaction != null) + factionVariant = bi.ForceFaction; self.World.AddFrameEndTask(w => {