diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj index 350b3f8e9e..1798c1eeb1 100644 --- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj +++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj @@ -72,7 +72,7 @@ - + diff --git a/OpenRA.Mods.Cnc/Traits/Buildings/TiberiumRefinery.cs b/OpenRA.Mods.Cnc/Traits/Buildings/TiberianDawnRefinery.cs similarity index 72% rename from OpenRA.Mods.Cnc/Traits/Buildings/TiberiumRefinery.cs rename to OpenRA.Mods.Cnc/Traits/Buildings/TiberianDawnRefinery.cs index f0826bbd5b..2b1cef2e96 100644 --- a/OpenRA.Mods.Cnc/Traits/Buildings/TiberiumRefinery.cs +++ b/OpenRA.Mods.Cnc/Traits/Buildings/TiberianDawnRefinery.cs @@ -11,18 +11,17 @@ using OpenRA.Activities; using OpenRA.Mods.Cnc.Activities; using OpenRA.Mods.RA.Traits; -using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits { - public class TiberiumRefineryInfo : OreRefineryInfo + public class TiberianDawnRefineryInfo : RefineryInfo { - public override object Create(ActorInitializer init) { return new TiberiumRefinery(init.Self, this); } + public override object Create(ActorInitializer init) { return new TiberianDawnRefinery(init.Self, this); } } - public class TiberiumRefinery : OreRefinery + public class TiberianDawnRefinery : Refinery { - public TiberiumRefinery(Actor self, TiberiumRefineryInfo info) : base(self, info) { } + public TiberianDawnRefinery(Actor self, RefineryInfo info) : base(self, info) { } public override Activity DockSequence(Actor harv, Actor self) { diff --git a/OpenRA.Mods.RA/AI/BaseBuilder.cs b/OpenRA.Mods.RA/AI/BaseBuilder.cs index 6a32de4fe4..bdd69ccecd 100644 --- a/OpenRA.Mods.RA/AI/BaseBuilder.cs +++ b/OpenRA.Mods.RA/AI/BaseBuilder.cs @@ -81,7 +81,7 @@ namespace OpenRA.Mods.RA.AI var type = BuildingType.Building; if (world.Map.Rules.Actors[currentBuilding.Item].Traits.Contains()) type = BuildingType.Defense; - else if (world.Map.Rules.Actors[currentBuilding.Item].Traits.Contains()) + else if (world.Map.Rules.Actors[currentBuilding.Item].Traits.Contains()) type = BuildingType.Refinery; var location = ai.ChooseBuildLocation(currentBuilding.Item, true, type); diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 4757d2323e..a1c3369154 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -111,7 +111,7 @@ - + diff --git a/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs b/OpenRA.Mods.RA/Traits/Buildings/Refinery.cs similarity index 87% rename from OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs rename to OpenRA.Mods.RA/Traits/Buildings/Refinery.cs index 6c495da762..b61dd21490 100644 --- a/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs +++ b/OpenRA.Mods.RA/Traits/Buildings/Refinery.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Activities; -using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Activities; @@ -19,7 +18,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits { - public class OreRefineryInfo : ITraitInfo + public class RefineryInfo : ITraitInfo { [Desc("Docking cell relative to top-left cell.")] public readonly CVec DockOffset = new CVec(1, 2); @@ -28,16 +27,16 @@ namespace OpenRA.Mods.RA.Traits public readonly int TickLifetime = 30; public readonly int TickVelocity = 2; public readonly int TickRate = 10; - [Desc("Actually harvester facing when docking, 0-255 counter-clock-wise.")] + [Desc("Actual harvester facing when docking, 0-255 counter-clock-wise.")] public readonly int DockAngle = 64; - public virtual object Create(ActorInitializer init) { return new OreRefinery(init.Self, this); } + public virtual object Create(ActorInitializer init) { return new Refinery(init.Self, this); } } - public class OreRefinery : ITick, IAcceptResources, INotifyKilled, INotifySold, INotifyCapture, INotifyOwnerChanged, IExplodeModifier, ISync + public class Refinery : ITick, IAcceptResources, INotifyKilled, INotifySold, INotifyCapture, INotifyOwnerChanged, IExplodeModifier, ISync { readonly Actor self; - readonly OreRefineryInfo info; + readonly RefineryInfo info; PlayerResources playerResources; int currentDisplayTick = 0; @@ -50,9 +49,7 @@ namespace OpenRA.Mods.RA.Traits public bool AllowDocking { get { return !preventDock; } } public CVec DeliveryOffset { get { return info.DockOffset; } } - public virtual Activity DockSequence(Actor harv, Actor self) { return new RAHarvesterDockSequence(harv, self, info.DockAngle); } - - public OreRefinery(Actor self, OreRefineryInfo info) + public Refinery(Actor self, RefineryInfo info) { this.self = self; this.info = info; @@ -60,6 +57,11 @@ namespace OpenRA.Mods.RA.Traits currentDisplayTick = info.TickRate; } + public virtual Activity DockSequence(Actor harv, Actor self) + { + return new RAHarvesterDockSequence(harv, self, info.DockAngle); + } + public IEnumerable> GetLinkedHarvesters() { return self.World.ActorsWithTrait() diff --git a/OpenRA.Mods.TS/Traits/Buildings/TiberianSunRefinery.cs b/OpenRA.Mods.TS/Traits/Buildings/TiberianSunRefinery.cs index 8e91a49810..490d4fd6ec 100644 --- a/OpenRA.Mods.TS/Traits/Buildings/TiberianSunRefinery.cs +++ b/OpenRA.Mods.TS/Traits/Buildings/TiberianSunRefinery.cs @@ -11,18 +11,17 @@ using OpenRA.Activities; using OpenRA.Mods.RA.Traits; using OpenRA.Mods.TS.Activities; -using OpenRA.Traits; namespace OpenRA.Mods.TS.Traits { - public class TiberianSunRefineryInfo : OreRefineryInfo + public class TiberianSunRefineryInfo : RefineryInfo { public override object Create(ActorInitializer init) { return new TiberianSunRefinery(init.Self, this); } } - public class TiberianSunRefinery : OreRefinery + public class TiberianSunRefinery : Refinery { - public TiberianSunRefinery(Actor self, TiberianSunRefineryInfo info) : base(self, info) { } + public TiberianSunRefinery(Actor self, RefineryInfo info) : base(self, info) { } public override Activity DockSequence(Actor harv, Actor self) {