From 9dfd369446bce7785ccafa62853773743ca3d5dd Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 26 Dec 2014 02:34:49 +0100 Subject: [PATCH] Move some Building traits and related elements to Mods.Common --- .../Traits/Render/WithDeliveryAnimation.cs | 1 + OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 11 +++++++++++ .../Traits}/Buildings/Bib.cs | 3 +-- .../Traits}/Buildings/Building.cs | 3 +-- .../Traits}/Buildings/BuildingInfluence.cs | 2 +- .../Traits}/Buildings/BuildingUtils.cs | 3 +-- .../Traits}/Buildings/FootprintUtils.cs | 2 +- .../Traits/Buildings/FreeActor.cs | 2 +- .../Traits/Buildings/RepairsUnits.cs | 2 +- .../Traits/Modifiers/FrozenUnderFog.cs | 2 +- .../Traits}/Render/RenderBuilding.cs | 3 +-- .../Traits}/Render/WithMakeAnimation.cs | 4 ++-- .../Traits/World/ResourceLayer.cs | 2 +- OpenRA.Mods.Common/TraitsInterfaces.cs | 6 ++++++ OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs | 1 + OpenRA.Mods.D2k/Traits/World/D2kResourceLayer.cs | 1 + OpenRA.Mods.RA/AI/States/StateBase.cs | 1 + OpenRA.Mods.RA/Activities/Attack.cs | 1 + OpenRA.Mods.RA/Activities/CaptureActor.cs | 1 + OpenRA.Mods.RA/Activities/Infiltrate.cs | 1 + OpenRA.Mods.RA/Activities/Rearm.cs | 1 + OpenRA.Mods.RA/Activities/Teleport.cs | 1 + OpenRA.Mods.RA/Attack/AttackBase.cs | 1 + OpenRA.Mods.RA/CrateSpawner.cs | 1 + OpenRA.Mods.RA/ExternalCapturable.cs | 1 + OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 15 ++------------- OpenRA.Mods.RA/Render/RenderBuildingCharge.cs | 2 ++ OpenRA.Mods.RA/Render/WithActiveAnimation.cs | 1 + OpenRA.Mods.RA/Render/WithBuildingExplosion.cs | 1 + OpenRA.Mods.RA/Render/WithRepairAnimation.cs | 1 + OpenRA.Mods.RA/RenderRangeCircle.cs | 6 +----- OpenRA.Mods.RA/RenderShroudCircle.cs | 1 + OpenRA.Mods.RA/RepairableNear.cs | 1 + OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs | 1 + OpenRA.Mods.RA/Traits/Buildings/Bridge.cs | 1 + OpenRA.Mods.RA/Traits/Buildings/BridgeHut.cs | 1 + .../{ => Traits}/Buildings/ClonesProducedUnits.cs | 0 OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs | 1 + .../{ => Traits}/Buildings/RepairableBuilding.cs | 2 +- .../Traits/Buildings/TargetableBuilding.cs | 1 + OpenRA.Mods.RA/Traits/SeedsResource.cs | 1 + OpenRA.Mods.RA/Warheads/CreateResourceWarhead.cs | 1 + OpenRA.Mods.RA/Warheads/DestroyResourceWarhead.cs | 1 + OpenRA.Mods.RA/WithRangeCircle.cs | 1 + 44 files changed, 61 insertions(+), 35 deletions(-) rename {OpenRA.Mods.RA => OpenRA.Mods.Common/Traits}/Buildings/Bib.cs (97%) mode change 100755 => 100644 rename {OpenRA.Mods.RA => OpenRA.Mods.Common/Traits}/Buildings/Building.cs (98%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common/Traits}/Buildings/BuildingInfluence.cs (97%) mode change 100755 => 100644 rename {OpenRA.Mods.RA => OpenRA.Mods.Common/Traits}/Buildings/BuildingUtils.cs (97%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common/Traits}/Buildings/FootprintUtils.cs (98%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Traits/Buildings/FreeActor.cs (98%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Traits/Buildings/RepairsUnits.cs (94%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Traits/Modifiers/FrozenUnderFog.cs (99%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common/Traits}/Render/RenderBuilding.cs (97%) mode change 100755 => 100644 rename {OpenRA.Mods.RA => OpenRA.Mods.Common/Traits}/Render/WithMakeAnimation.cs (95%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Traits/World/ResourceLayer.cs (99%) rename OpenRA.Mods.RA/{ => Traits}/Buildings/ClonesProducedUnits.cs (100%) rename OpenRA.Mods.RA/{ => Traits}/Buildings/RepairableBuilding.cs (100%) mode change 100755 => 100644 diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithDeliveryAnimation.cs b/OpenRA.Mods.Cnc/Traits/Render/WithDeliveryAnimation.cs index a82e613dc7..01686b20a6 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/WithDeliveryAnimation.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/WithDeliveryAnimation.cs @@ -8,6 +8,7 @@ */ #endregion +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 0820f42438..56adb39da0 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -122,10 +122,17 @@ + + + + + + + @@ -137,6 +144,7 @@ + @@ -162,6 +170,7 @@ + @@ -170,6 +179,7 @@ + @@ -200,6 +210,7 @@ + diff --git a/OpenRA.Mods.RA/Buildings/Bib.cs b/OpenRA.Mods.Common/Traits/Buildings/Bib.cs old mode 100755 new mode 100644 similarity index 97% rename from OpenRA.Mods.RA/Buildings/Bib.cs rename to OpenRA.Mods.Common/Traits/Buildings/Bib.cs index 6a3f1886b9..5b181d001e --- a/OpenRA.Mods.RA/Buildings/Bib.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Bib.cs @@ -9,10 +9,9 @@ #endregion using OpenRA.Graphics; -using OpenRA.Mods.Common.Traits; using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { public class BibInfo : ITraitInfo, Requires, Requires { diff --git a/OpenRA.Mods.RA/Buildings/Building.cs b/OpenRA.Mods.Common/Traits/Buildings/Building.cs similarity index 98% rename from OpenRA.Mods.RA/Buildings/Building.cs rename to OpenRA.Mods.Common/Traits/Buildings/Building.cs index 45612b5477..ced2d3f429 100644 --- a/OpenRA.Mods.RA/Buildings/Building.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Building.cs @@ -11,11 +11,10 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.Mods.Common.Traits; using OpenRA.Primitives; using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { [Desc("Remove this trait to limit base-walking by cheap or defensive buildings.")] public class GivesBuildableAreaInfo : TraitInfo {} diff --git a/OpenRA.Mods.RA/Buildings/BuildingInfluence.cs b/OpenRA.Mods.Common/Traits/Buildings/BuildingInfluence.cs old mode 100755 new mode 100644 similarity index 97% rename from OpenRA.Mods.RA/Buildings/BuildingInfluence.cs rename to OpenRA.Mods.Common/Traits/Buildings/BuildingInfluence.cs index 86b8d6acb3..2010f62407 --- a/OpenRA.Mods.RA/Buildings/BuildingInfluence.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/BuildingInfluence.cs @@ -10,7 +10,7 @@ using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { [Desc("A dictionary of buildings placed on the map. Attach this to the world actor.")] public class BuildingInfluenceInfo : ITraitInfo diff --git a/OpenRA.Mods.RA/Buildings/BuildingUtils.cs b/OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs similarity index 97% rename from OpenRA.Mods.RA/Buildings/BuildingUtils.cs rename to OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs index 3a4ecdd38e..a06b0bad6d 100644 --- a/OpenRA.Mods.RA/Buildings/BuildingUtils.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs @@ -10,10 +10,9 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.Mods.Common.Traits; using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { public static class BuildingUtils { diff --git a/OpenRA.Mods.RA/Buildings/FootprintUtils.cs b/OpenRA.Mods.Common/Traits/Buildings/FootprintUtils.cs similarity index 98% rename from OpenRA.Mods.RA/Buildings/FootprintUtils.cs rename to OpenRA.Mods.Common/Traits/Buildings/FootprintUtils.cs index d9102c31b9..b58144d727 100644 --- a/OpenRA.Mods.RA/Buildings/FootprintUtils.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/FootprintUtils.cs @@ -12,7 +12,7 @@ using System; using System.Collections.Generic; using System.Linq; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { public static class FootprintUtils { diff --git a/OpenRA.Mods.RA/Traits/Buildings/FreeActor.cs b/OpenRA.Mods.Common/Traits/Buildings/FreeActor.cs similarity index 98% rename from OpenRA.Mods.RA/Traits/Buildings/FreeActor.cs rename to OpenRA.Mods.Common/Traits/Buildings/FreeActor.cs index c8e12e3936..d273d6ade7 100644 --- a/OpenRA.Mods.RA/Traits/Buildings/FreeActor.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/FreeActor.cs @@ -12,7 +12,7 @@ using OpenRA.Activities; using OpenRA.Primitives; using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { [Desc("Player recives a unit for free once the building is placed. This also works for structures.", "If you want more than one unit to appear copy this section and assign IDs like FreeActor@2, ...")] diff --git a/OpenRA.Mods.RA/Traits/Buildings/RepairsUnits.cs b/OpenRA.Mods.Common/Traits/Buildings/RepairsUnits.cs similarity index 94% rename from OpenRA.Mods.RA/Traits/Buildings/RepairsUnits.cs rename to OpenRA.Mods.Common/Traits/Buildings/RepairsUnits.cs index 26a7f41428..46d2d65bc8 100644 --- a/OpenRA.Mods.RA/Traits/Buildings/RepairsUnits.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/RepairsUnits.cs @@ -10,7 +10,7 @@ using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { public class RepairsUnitsInfo : TraitInfo { diff --git a/OpenRA.Mods.RA/Traits/Modifiers/FrozenUnderFog.cs b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs similarity index 99% rename from OpenRA.Mods.RA/Traits/Modifiers/FrozenUnderFog.cs rename to OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs index c145e130d0..079ed8a0fb 100644 --- a/OpenRA.Mods.RA/Traits/Modifiers/FrozenUnderFog.cs +++ b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs @@ -14,7 +14,7 @@ using System.Linq; using OpenRA.Graphics; using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { [Desc("This actor will remain visible (but not updated visually) under fog, once discovered.")] public class FrozenUnderFogInfo : ITraitInfo, Requires diff --git a/OpenRA.Mods.RA/Render/RenderBuilding.cs b/OpenRA.Mods.Common/Traits/Render/RenderBuilding.cs old mode 100755 new mode 100644 similarity index 97% rename from OpenRA.Mods.RA/Render/RenderBuilding.cs rename to OpenRA.Mods.Common/Traits/Render/RenderBuilding.cs index 3b645acd6d..9841792c75 --- a/OpenRA.Mods.RA/Render/RenderBuilding.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderBuilding.cs @@ -12,10 +12,9 @@ using System; using System.Collections.Generic; using System.Linq; using OpenRA.Graphics; -using OpenRA.Mods.Common.Traits; using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { public class RenderBuildingInfo : RenderSimpleInfo, Requires, IPlaceBuildingDecoration { diff --git a/OpenRA.Mods.RA/Render/WithMakeAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithMakeAnimation.cs similarity index 95% rename from OpenRA.Mods.RA/Render/WithMakeAnimation.cs rename to OpenRA.Mods.Common/Traits/Render/WithMakeAnimation.cs index 17c1e64ea4..9fe5f72a66 100644 --- a/OpenRA.Mods.RA/Render/WithMakeAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithMakeAnimation.cs @@ -12,10 +12,10 @@ using System; using System.Linq; using OpenRA.Activities; using OpenRA.Graphics; -using OpenRA.Mods.RA.Activities; +using OpenRA.Mods.Common.Activities; using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { public class WithMakeAnimationInfo : ITraitInfo, Requires, Requires { diff --git a/OpenRA.Mods.RA/Traits/World/ResourceLayer.cs b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs similarity index 99% rename from OpenRA.Mods.RA/Traits/World/ResourceLayer.cs rename to OpenRA.Mods.Common/Traits/World/ResourceLayer.cs index 33edc6b0c8..86c97cf6ad 100644 --- a/OpenRA.Mods.RA/Traits/World/ResourceLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs @@ -14,7 +14,7 @@ using System.Linq; using OpenRA.Graphics; using OpenRA.Traits; -namespace OpenRA.Mods.RA.Traits +namespace OpenRA.Mods.Common.Traits { [Desc("Attach this to the world actor.", "Order of the layers defines the Z sorting.")] public class ResourceLayerInfo : TraitInfo, Requires { } diff --git a/OpenRA.Mods.Common/TraitsInterfaces.cs b/OpenRA.Mods.Common/TraitsInterfaces.cs index 8164b53296..bf8b512b43 100644 --- a/OpenRA.Mods.Common/TraitsInterfaces.cs +++ b/OpenRA.Mods.Common/TraitsInterfaces.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using OpenRA.Activities; +using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; using OpenRA.Traits; @@ -20,6 +21,11 @@ namespace OpenRA.Mods.Common.Traits void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer); } + public interface IPlaceBuildingDecoration + { + IEnumerable Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition); + } + public interface INotifyChat { bool OnChat(string from, string message); } public interface INotifyParachuteLanded { void OnLanded(); } public interface IRenderActorPreviewInfo { IEnumerable RenderPreview(ActorPreviewInitializer init); } diff --git a/OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs b/OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs index 665a5936d4..5ccdc47097 100644 --- a/OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs +++ b/OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs @@ -9,6 +9,7 @@ #endregion using System.Linq; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.D2k/Traits/World/D2kResourceLayer.cs b/OpenRA.Mods.D2k/Traits/World/D2kResourceLayer.cs index af795d9dd7..ff401620f4 100644 --- a/OpenRA.Mods.D2k/Traits/World/D2kResourceLayer.cs +++ b/OpenRA.Mods.D2k/Traits/World/D2kResourceLayer.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/AI/States/StateBase.cs b/OpenRA.Mods.RA/AI/States/StateBase.cs index 028ad92f21..84b5ae36c9 100644 --- a/OpenRA.Mods.RA/AI/States/StateBase.cs +++ b/OpenRA.Mods.RA/AI/States/StateBase.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Activities/Attack.cs b/OpenRA.Mods.RA/Activities/Attack.cs index d3eb37c7c2..844cc30e36 100755 --- a/OpenRA.Mods.RA/Activities/Attack.cs +++ b/OpenRA.Mods.RA/Activities/Attack.cs @@ -10,6 +10,7 @@ using OpenRA.Activities; using OpenRA.Mods.Common.Activities; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Activities/CaptureActor.cs b/OpenRA.Mods.RA/Activities/CaptureActor.cs index 8cf9ed2293..8f220b15c6 100644 --- a/OpenRA.Mods.RA/Activities/CaptureActor.cs +++ b/OpenRA.Mods.RA/Activities/CaptureActor.cs @@ -9,6 +9,7 @@ #endregion using OpenRA.Activities; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Activities/Infiltrate.cs b/OpenRA.Mods.RA/Activities/Infiltrate.cs index a5c349dbcf..bd17ca10ca 100644 --- a/OpenRA.Mods.RA/Activities/Infiltrate.cs +++ b/OpenRA.Mods.RA/Activities/Infiltrate.cs @@ -9,6 +9,7 @@ #endregion using OpenRA.Activities; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Activities/Rearm.cs b/OpenRA.Mods.RA/Activities/Rearm.cs index 4b00e25e34..bc86046d95 100644 --- a/OpenRA.Mods.RA/Activities/Rearm.cs +++ b/OpenRA.Mods.RA/Activities/Rearm.cs @@ -10,6 +10,7 @@ using System.Linq; using OpenRA.Activities; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Activities/Teleport.cs b/OpenRA.Mods.RA/Activities/Teleport.cs index 2a149f7599..4fedc95fbb 100755 --- a/OpenRA.Mods.RA/Activities/Teleport.cs +++ b/OpenRA.Mods.RA/Activities/Teleport.cs @@ -12,6 +12,7 @@ using System; using System.Collections.Generic; using System.Linq; using OpenRA.Activities; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Attack/AttackBase.cs b/OpenRA.Mods.RA/Attack/AttackBase.cs index 369c05028d..e7453a8804 100644 --- a/OpenRA.Mods.RA/Attack/AttackBase.cs +++ b/OpenRA.Mods.RA/Attack/AttackBase.cs @@ -14,6 +14,7 @@ using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.GameRules; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/CrateSpawner.cs b/OpenRA.Mods.RA/CrateSpawner.cs index 0024bac899..a539224b33 100644 --- a/OpenRA.Mods.RA/CrateSpawner.cs +++ b/OpenRA.Mods.RA/CrateSpawner.cs @@ -11,6 +11,7 @@ using System; using System.Linq; using OpenRA.Mods.Common.Activities; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Activities; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/ExternalCapturable.cs b/OpenRA.Mods.RA/ExternalCapturable.cs index e7ecbf8070..ae6d21fb12 100644 --- a/OpenRA.Mods.RA/ExternalCapturable.cs +++ b/OpenRA.Mods.RA/ExternalCapturable.cs @@ -9,6 +9,7 @@ #endregion using System.Linq; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 69c1115ec2..e1a46053f2 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -147,11 +147,6 @@ - - - - - @@ -225,7 +220,6 @@ - @@ -270,23 +264,20 @@ - - + - - @@ -338,7 +329,6 @@ - @@ -369,12 +359,11 @@ - - + diff --git a/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs b/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs index fa272399d1..ac5d0e3cb3 100755 --- a/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs +++ b/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs @@ -8,6 +8,8 @@ */ #endregion +using OpenRA.Mods.Common.Traits; + namespace OpenRA.Mods.RA.Traits { [Desc("Used for tesla coil and obelisk.")] diff --git a/OpenRA.Mods.RA/Render/WithActiveAnimation.cs b/OpenRA.Mods.RA/Render/WithActiveAnimation.cs index bf10ee4191..cfd6148893 100644 --- a/OpenRA.Mods.RA/Render/WithActiveAnimation.cs +++ b/OpenRA.Mods.RA/Render/WithActiveAnimation.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Graphics; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs b/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs index 5f35cd885a..00dc7e7075 100755 --- a/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs +++ b/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs @@ -9,6 +9,7 @@ #endregion using OpenRA.Mods.Common.Effects; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/Render/WithRepairAnimation.cs b/OpenRA.Mods.RA/Render/WithRepairAnimation.cs index b38fd7fb8b..4598521c92 100644 --- a/OpenRA.Mods.RA/Render/WithRepairAnimation.cs +++ b/OpenRA.Mods.RA/Render/WithRepairAnimation.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Linq; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/RenderRangeCircle.cs b/OpenRA.Mods.RA/RenderRangeCircle.cs index d7f9f9ca2e..1cdbe84191 100644 --- a/OpenRA.Mods.RA/RenderRangeCircle.cs +++ b/OpenRA.Mods.RA/RenderRangeCircle.cs @@ -13,15 +13,11 @@ using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits { - public interface IPlaceBuildingDecoration - { - IEnumerable Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition); - } - [Desc("Draw a circle indicating my weapon's range.")] class RenderRangeCircleInfo : ITraitInfo, IPlaceBuildingDecoration, Requires { diff --git a/OpenRA.Mods.RA/RenderShroudCircle.cs b/OpenRA.Mods.RA/RenderShroudCircle.cs index 84cbec1bad..825faaf5a4 100644 --- a/OpenRA.Mods.RA/RenderShroudCircle.cs +++ b/OpenRA.Mods.RA/RenderShroudCircle.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/RepairableNear.cs b/OpenRA.Mods.RA/RepairableNear.cs index b892b14bb9..4a21b03711 100644 --- a/OpenRA.Mods.RA/RepairableNear.cs +++ b/OpenRA.Mods.RA/RepairableNear.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.Mods.Common.Orders; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Activities; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs b/OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs index 648cb734bc..e011277438 100644 --- a/OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs +++ b/OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs @@ -10,6 +10,7 @@ using System.Linq; using OpenRA.Mods.Common.Activities; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Activities; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Traits/Buildings/Bridge.cs b/OpenRA.Mods.RA/Traits/Buildings/Bridge.cs index abee5f2833..7c378041ca 100644 --- a/OpenRA.Mods.RA/Traits/Buildings/Bridge.cs +++ b/OpenRA.Mods.RA/Traits/Buildings/Bridge.cs @@ -14,6 +14,7 @@ using System.Linq; using OpenRA.Effects; using OpenRA.GameRules; using OpenRA.Graphics; +using OpenRA.Mods.Common.Traits; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Traits/Buildings/BridgeHut.cs b/OpenRA.Mods.RA/Traits/Buildings/BridgeHut.cs index d89b1f7930..a29f299fba 100644 --- a/OpenRA.Mods.RA/Traits/Buildings/BridgeHut.cs +++ b/OpenRA.Mods.RA/Traits/Buildings/BridgeHut.cs @@ -10,6 +10,7 @@ using System; using System.Linq; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/Buildings/ClonesProducedUnits.cs b/OpenRA.Mods.RA/Traits/Buildings/ClonesProducedUnits.cs similarity index 100% rename from OpenRA.Mods.RA/Buildings/ClonesProducedUnits.cs rename to OpenRA.Mods.RA/Traits/Buildings/ClonesProducedUnits.cs diff --git a/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs b/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs index 71a602b92a..1fd8572c15 100644 --- a/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs +++ b/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs @@ -13,6 +13,7 @@ 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; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs b/OpenRA.Mods.RA/Traits/Buildings/RepairableBuilding.cs old mode 100755 new mode 100644 similarity index 100% rename from OpenRA.Mods.RA/Buildings/RepairableBuilding.cs rename to OpenRA.Mods.RA/Traits/Buildings/RepairableBuilding.cs index aead1270ec..f19dcb0403 --- a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs +++ b/OpenRA.Mods.RA/Traits/Buildings/RepairableBuilding.cs @@ -12,8 +12,8 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/Traits/Buildings/TargetableBuilding.cs b/OpenRA.Mods.RA/Traits/Buildings/TargetableBuilding.cs index 67d4c943d6..d60e3efdfe 100644 --- a/OpenRA.Mods.RA/Traits/Buildings/TargetableBuilding.cs +++ b/OpenRA.Mods.RA/Traits/Buildings/TargetableBuilding.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Linq; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits diff --git a/OpenRA.Mods.RA/Traits/SeedsResource.cs b/OpenRA.Mods.RA/Traits/SeedsResource.cs index c270864384..4edf5b79bc 100644 --- a/OpenRA.Mods.RA/Traits/SeedsResource.cs +++ b/OpenRA.Mods.RA/Traits/SeedsResource.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; using System.Linq; +using OpenRA.Mods.Common.Traits; using OpenRA.Support; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Warheads/CreateResourceWarhead.cs b/OpenRA.Mods.RA/Warheads/CreateResourceWarhead.cs index 0f85697645..a846874a98 100644 --- a/OpenRA.Mods.RA/Warheads/CreateResourceWarhead.cs +++ b/OpenRA.Mods.RA/Warheads/CreateResourceWarhead.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Effects; using OpenRA.GameRules; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Warheads/DestroyResourceWarhead.cs b/OpenRA.Mods.RA/Warheads/DestroyResourceWarhead.cs index a1c7b9d7cb..05f2c02c30 100644 --- a/OpenRA.Mods.RA/Warheads/DestroyResourceWarhead.cs +++ b/OpenRA.Mods.RA/Warheads/DestroyResourceWarhead.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Effects; using OpenRA.GameRules; +using OpenRA.Mods.Common.Traits; using OpenRA.Mods.RA.Traits; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/WithRangeCircle.cs b/OpenRA.Mods.RA/WithRangeCircle.cs index 11ffc8146d..7b7e5e8148 100644 --- a/OpenRA.Mods.RA/WithRangeCircle.cs +++ b/OpenRA.Mods.RA/WithRangeCircle.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Drawing; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; +using OpenRA.Mods.Common.Traits; using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits