diff --git a/OpenRA.Game/Traits/Buildable.cs b/OpenRA.Game/Traits/Buildable.cs index 71d9196da6..9e37eab7f4 100755 --- a/OpenRA.Game/Traits/Buildable.cs +++ b/OpenRA.Game/Traits/Buildable.cs @@ -1,4 +1,4 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. * This file is part of OpenRA. @@ -25,6 +25,7 @@ namespace OpenRA.Traits public readonly int Cost = 0; public readonly string Description = ""; public readonly string LongDesc = ""; + public readonly string[] Owner = { }; public virtual object Create(Actor self) { return new Valued(); } } @@ -33,7 +34,6 @@ namespace OpenRA.Traits { public readonly string[] Prerequisites = { }; public readonly string[] BuiltAt = { }; - public readonly string[] Owner = { }; public readonly string Icon = null; public readonly string[] AlternateName = { }; diff --git a/OpenRA.Game/Traits/Building.cs b/OpenRA.Game/Traits/Building.cs index f1d3d768bf..4238584e73 100644 --- a/OpenRA.Game/Traits/Building.cs +++ b/OpenRA.Game/Traits/Building.cs @@ -124,7 +124,7 @@ namespace OpenRA.Traits if (remainingTicks == 0) { var csv = self.Info.Traits.GetOrDefault(); - var buildingValue = csv != null ? csv.Value : self.Info.Traits.Get().Cost; + var buildingValue = csv != null ? csv.Value : self.Info.Traits.Get().Cost; var maxHP = self.Info.Traits.Get().HP; var costPerHp = (self.World.Defaults.RepairPercent * buildingValue) / maxHP; var hpToRepair = Math.Min(self.World.Defaults.RepairStep, maxHP - self.Health); diff --git a/OpenRA.Game/Traits/SupportPower.cs b/OpenRA.Game/Traits/SupportPower.cs index a6b393ba01..8b5aa8c3ea 100644 --- a/OpenRA.Game/Traits/SupportPower.cs +++ b/OpenRA.Game/Traits/SupportPower.cs @@ -101,7 +101,7 @@ namespace OpenRA.Traits var buildings = Rules.TechTree.GatherBuildings(Owner); var effectivePrereq = Info.Prerequisites .Select(a => a.ToLowerInvariant()) - .Where(a => Rules.Info[a].Traits.Get().Owner.Contains(Owner.Country.Race)); + .Where(a => Rules.Info[a].Traits.Get().Owner.Contains(Owner.Country.Race)); if (Info.Prerequisites.Count() == 0) return Owner.PlayerActor.traits.Get().GetPowerState() == PowerState.Normal;