diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index c9ff15ba07..c1d84706e6 100755 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -83,7 +83,6 @@ - @@ -228,6 +227,7 @@ + diff --git a/OpenRA.Game/Traits/Player/PlayerProductionQueue.cs b/OpenRA.Game/Traits/Player/PlayerProductionQueue.cs index 5c69f12394..1c00fb8226 100644 --- a/OpenRA.Game/Traits/Player/PlayerProductionQueue.cs +++ b/OpenRA.Game/Traits/Player/PlayerProductionQueue.cs @@ -15,7 +15,7 @@ using OpenRA.FileFormats; namespace OpenRA.Traits { - public class PlayerProductionQueueInfo : ProductionQueueInfo, ITraitPrerequisite + public class PlayerProductionQueueInfo : ProductionQueueInfo, ITraitPrerequisite { public override object Create(ActorInitializer init) { return new PlayerProductionQueue(init.self, this); } } diff --git a/OpenRA.Game/Traits/Player/ProductionQueue.cs b/OpenRA.Game/Traits/Player/ProductionQueue.cs index 0a746aa8fa..20b98578ad 100644 --- a/OpenRA.Game/Traits/Player/ProductionQueue.cs +++ b/OpenRA.Game/Traits/Player/ProductionQueue.cs @@ -40,7 +40,7 @@ namespace OpenRA.Traits this.self = self; this.Info = info; - var ttc = playerActor.Trait(); + var ttc = playerActor.Trait(); foreach (var a in AllBuildables(Info.Type)) { diff --git a/OpenRA.Game/Traits/Player/TechTreeCache.cs b/OpenRA.Game/Traits/Player/TechTree.cs similarity index 92% rename from OpenRA.Game/Traits/Player/TechTreeCache.cs rename to OpenRA.Game/Traits/Player/TechTree.cs index 88b7e2bb12..5be3b0cdd5 100755 --- a/OpenRA.Game/Traits/Player/TechTreeCache.cs +++ b/OpenRA.Game/Traits/Player/TechTree.cs @@ -15,16 +15,16 @@ using OpenRA.GameRules; namespace OpenRA.Traits { - class TechTreeCacheInfo : ITraitInfo + class TechTreeInfo : ITraitInfo { - public object Create(ActorInitializer init) { return new TechTreeCache(init);} + public object Create(ActorInitializer init) { return new TechTree(init);} } - class TechTreeCache + class TechTree { readonly List watchers = new List(); readonly Player player; - public TechTreeCache(ActorInitializer init) + public TechTree(ActorInitializer init) { player = init.self.Owner; init.world.ActorAdded += ActorChanged; diff --git a/OpenRA.Game/Traits/SupportPower.cs b/OpenRA.Game/Traits/SupportPower.cs index 55713142a9..e9c186b251 100644 --- a/OpenRA.Game/Traits/SupportPower.cs +++ b/OpenRA.Game/Traits/SupportPower.cs @@ -12,7 +12,7 @@ using System.Linq; namespace OpenRA.Traits { - public abstract class SupportPowerInfo : ITraitInfo, ITraitPrerequisite + public abstract class SupportPowerInfo : ITraitInfo, ITraitPrerequisite { public readonly bool RequiresPower = true; public readonly bool OneShot = false; @@ -62,7 +62,7 @@ namespace OpenRA.Traits effectivePrereq = Info.Prerequisites .Select(a => a.ToLowerInvariant()).ToArray(); - self.Trait().Add( Info.OrderName, Info.Prerequisites.Select( a => a.ToLowerInvariant() ).ToList(), this ); + self.Trait().Add( Info.OrderName, Info.Prerequisites.Select( a => a.ToLowerInvariant() ).ToList(), this ); } public void Tick(Actor self) @@ -101,7 +101,7 @@ namespace OpenRA.Traits return Owner.PlayerActor.Trait().GetPowerState() == PowerState.Normal; // Takes 0.3ms on pchote's machine -- calling it every tick for every active special power is retarded - var buildings = TechTreeCache.GatherBuildings(Owner); + var buildings = TechTree.GatherBuildings(Owner); return effectivePrereq.All(a => buildings[a].Any(b => !b.Trait().Disabled)); } diff --git a/mods/cnc/rules/system.yaml b/mods/cnc/rules/system.yaml index a7ee4c4f20..8c18ec3ab7 100644 --- a/mods/cnc/rules/system.yaml +++ b/mods/cnc/rules/system.yaml @@ -1,6 +1,6 @@ Player: PlaceBuilding: - TechTreeCache: + TechTree: NukePower: Image: atomicnh ChargeTime: 5 diff --git a/mods/d2k/rules/system.yaml b/mods/d2k/rules/system.yaml index 141d8d005a..0cfc35a5bc 100644 --- a/mods/d2k/rules/system.yaml +++ b/mods/d2k/rules/system.yaml @@ -1,5 +1,5 @@ Player: - TechTreeCache: + TechTree: PlayerResources: InitialCash: 5000 ActorGroupProxy: diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index 24c48323ab..d6c5a7a63b 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -1,5 +1,5 @@ Player: - TechTreeCache: + TechTree: PlayerProductionQueue@Building: Type: Building BuildSpeed: .4