diff --git a/OpenRA.Mods.Cnc/Traits/AttackPopupTurreted.cs b/OpenRA.Mods.Cnc/Traits/AttackPopupTurreted.cs
index 8f731068c6..d7e1fe6144 100644
--- a/OpenRA.Mods.Cnc/Traits/AttackPopupTurreted.cs
+++ b/OpenRA.Mods.Cnc/Traits/AttackPopupTurreted.cs
@@ -13,8 +13,7 @@ using OpenRA.Activities;
using OpenRA.GameRules;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA;
-using OpenRA.Mods.RA.Buildings;
-using OpenRA.Mods.RA.Render;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
diff --git a/OpenRA.Mods.Cnc/Traits/Render/RenderGunboat.cs b/OpenRA.Mods.Cnc/Traits/Render/RenderGunboat.cs
index 5ecfc14440..fe6c4e3105 100644
--- a/OpenRA.Mods.Cnc/Traits/Render/RenderGunboat.cs
+++ b/OpenRA.Mods.Cnc/Traits/Render/RenderGunboat.cs
@@ -11,7 +11,7 @@
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithDeliveryAnimation.cs b/OpenRA.Mods.Cnc/Traits/Render/WithDeliveryAnimation.cs
index 8aaa2b1179..01686b20a6 100644
--- a/OpenRA.Mods.Cnc/Traits/Render/WithDeliveryAnimation.cs
+++ b/OpenRA.Mods.Cnc/Traits/Render/WithDeliveryAnimation.cs
@@ -8,7 +8,8 @@
*/
#endregion
-using OpenRA.Mods.RA.Render;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
diff --git a/OpenRA.Mods.Cnc/Traits/SupportPowers/IonCannonPower.cs b/OpenRA.Mods.Cnc/Traits/SupportPowers/IonCannonPower.cs
index 4270c90ff3..b9c454c411 100644
--- a/OpenRA.Mods.Cnc/Traits/SupportPowers/IonCannonPower.cs
+++ b/OpenRA.Mods.Cnc/Traits/SupportPowers/IonCannonPower.cs
@@ -10,7 +10,7 @@
using OpenRA.Mods.Cnc.Effects;
using OpenRA.Mods.Common.Activities;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
index c46f3e917c..c9b4327873 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,7 +179,10 @@
+
+
+
@@ -198,6 +210,7 @@
+
@@ -220,6 +233,8 @@
+
+
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 a59412636c..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.Buildings
+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 94%
rename from OpenRA.Mods.RA/Buildings/Building.cs
rename to OpenRA.Mods.Common/Traits/Buildings/Building.cs
index 80b473c5be..145d56a5a4 100644
--- a/OpenRA.Mods.RA/Buildings/Building.cs
+++ b/OpenRA.Mods.Common/Traits/Buildings/Building.cs
@@ -11,21 +11,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Render;
using OpenRA.Primitives;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Buildings
+namespace OpenRA.Mods.Common.Traits
{
[Desc("Remove this trait to limit base-walking by cheap or defensive buildings.")]
- public class GivesBuildableAreaInfo : TraitInfo {}
- public class GivesBuildableArea {}
+ public class GivesBuildableAreaInfo : TraitInfo { }
+ public class GivesBuildableArea { }
public class BuildingInfo : ITraitInfo, IOccupySpaceInfo, UsesInit
{
[Desc("Where you are allowed to place the building (Water, Clear, ...)")]
- public readonly string[] TerrainTypes = {};
+ public readonly string[] TerrainTypes = { };
[Desc("The range to the next building it can be constructed. Set it higher for walls.")]
public readonly int Adjacent = 2;
[Desc("x means space it blocks, _ is a part that is passable by actors.")]
@@ -53,6 +51,7 @@ namespace OpenRA.Mods.RA.Buildings
if (target.IsInRange(center, WRange.FromCells(bp.Trait.Info.Range)))
return bp.Actor;
}
+
return null;
}
@@ -66,7 +65,7 @@ namespace OpenRA.Mods.RA.Buildings
var buildingMaxBounds = Dimensions;
var buildingTraits = world.Map.Rules.Actors[buildingName].Traits;
- if (buildingTraits.Contains() && !(buildingTraits.Get().HasMinibib))
+ if (buildingTraits.Contains() && !buildingTraits.Get().HasMinibib)
buildingMaxBounds += new CVec(0, 1);
var scanStart = world.Map.Clamp(topLeft - new CVec(Adjacent, Adjacent));
@@ -132,7 +131,7 @@ namespace OpenRA.Mods.RA.Buildings
this.topLeft = init.Get();
this.Info = info;
- occupiedCells = FootprintUtils.UnpathableTiles( self.Info.Name, Info, TopLeft )
+ occupiedCells = FootprintUtils.UnpathableTiles(self.Info.Name, Info, TopLeft)
.Select(c => Pair.New(c, SubCell.FullCell)).ToArray();
CenterPosition = init.world.Map.CenterOfCell(topLeft) + FootprintUtils.CenterOffset(init.world, Info);
@@ -186,6 +185,7 @@ namespace OpenRA.Mods.RA.Buildings
foreach (var s in Info.UndeploySounds)
Sound.PlayToPlayer(self.Owner, s, self.CenterPosition);
}
+
public void OnTransform(Actor self) { }
public void AfterTransform(Actor self) { }
}
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 71dcec3ced..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.Buildings
+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 91%
rename from OpenRA.Mods.RA/Buildings/BuildingUtils.cs
rename to OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs
index 9abc021d87..21d039816e 100644
--- a/OpenRA.Mods.RA/Buildings/BuildingUtils.cs
+++ b/OpenRA.Mods.Common/Traits/Buildings/BuildingUtils.cs
@@ -10,11 +10,9 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Buildings
+namespace OpenRA.Mods.Common.Traits
{
public static class BuildingUtils
{
@@ -68,10 +66,9 @@ namespace OpenRA.Mods.RA.Buildings
// Cell contains an actor. Is it the type we want?
if (world.ActorsWithTrait().Any(a =>
- (
- a.Actor.Location == cell &&
- a.Actor.Info.Traits.Get().Types.Intersect(lbi.NodeTypes).Any()
- )))
+ (a.Actor.Location == cell &&
+ a.Actor.Info.Traits.Get()
+ .Types.Intersect(lbi.NodeTypes).Any())))
dirs[d] = i; // Cell contains actor of correct type
else
dirs[d] = -1; // Cell is blocked by another actor type
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 95a595bfe1..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.Buildings
+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 81%
rename from OpenRA.Mods.RA/Traits/Buildings/FreeActor.cs
rename to OpenRA.Mods.Common/Traits/Buildings/FreeActor.cs
index c8e12e3936..4ec3454057 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, ...")]
@@ -28,14 +28,14 @@ namespace OpenRA.Mods.RA.Traits
[Desc("Which direction the unit should face.")]
public readonly int Facing = 0;
- public object Create( ActorInitializer init ) { return new FreeActor(init, this); }
+ public object Create(ActorInitializer init) { return new FreeActor(init, this); }
}
public class FreeActor
{
public FreeActor(ActorInitializer init, FreeActorInfo info)
{
- if (init.Contains() && !init.Get().value)
+ if (init.Contains() && !init.Get().ActorValue)
return;
init.self.World.AddFrameEndTask(w =>
@@ -57,16 +57,16 @@ namespace OpenRA.Mods.RA.Traits
public class FreeActorInit : IActorInit
{
[FieldFromYamlKey]
- public readonly bool value = true;
+ public readonly bool ActorValue = true;
public FreeActorInit() { }
- public FreeActorInit(bool init) { value = init; }
- public bool Value(World world) { return value; }
+ public FreeActorInit(bool init) { ActorValue = init; }
+ public bool Value(World world) { return ActorValue; }
}
public class ParentActorInit : IActorInit
{
- public readonly Actor value;
- public ParentActorInit(Actor parent) { value = parent; }
- public Actor Value(World world) { return value; }
+ public readonly Actor ActorValue;
+ public ParentActorInit(Actor parent) { ActorValue = parent; }
+ public Actor Value(World world) { return ActorValue; }
}
}
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 98%
rename from OpenRA.Mods.RA/Traits/Modifiers/FrozenUnderFog.cs
rename to OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs
index 3526bef279..079ed8a0fb 100644
--- a/OpenRA.Mods.RA/Traits/Modifiers/FrozenUnderFog.cs
+++ b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs
@@ -12,10 +12,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.RA.Buildings;
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 95%
rename from OpenRA.Mods.RA/Render/RenderBuilding.cs
rename to OpenRA.Mods.Common/Traits/Render/RenderBuilding.cs
index bd60e8566f..1380d7dff5
--- a/OpenRA.Mods.RA/Render/RenderBuilding.cs
+++ b/OpenRA.Mods.Common/Traits/Render/RenderBuilding.cs
@@ -12,17 +12,15 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.Common.Traits
{
public class RenderBuildingInfo : RenderSimpleInfo, Requires, IPlaceBuildingDecoration
{
public readonly bool PauseOnLowPower = false;
- public override object Create(ActorInitializer init) { return new RenderBuilding(init, this);}
+ public override object Create(ActorInitializer init) { return new RenderBuilding(init, this); }
public IEnumerable Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition)
{
diff --git a/OpenRA.Mods.RA/Render/WithCrateBody.cs b/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs
old mode 100755
new mode 100644
similarity index 95%
rename from OpenRA.Mods.RA/Render/WithCrateBody.cs
rename to OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs
index fb405bc3ac..38e936652e
--- a/OpenRA.Mods.RA/Render/WithCrateBody.cs
+++ b/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs
@@ -11,10 +11,9 @@
using System;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.Common.Traits
{
[Desc("Renders crates with both water and land variants.")]
class WithCrateBodyInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/Render/WithHarvestAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs
similarity index 88%
rename from OpenRA.Mods.RA/Render/WithHarvestAnimation.cs
rename to OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs
index 264d2c25d3..2354c03930 100644
--- a/OpenRA.Mods.RA/Render/WithHarvestAnimation.cs
+++ b/OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs
@@ -8,12 +8,11 @@
*/
#endregion
-using OpenRA.Graphics;
using OpenRA.Activities;
-using OpenRA.Mods.Common.Traits;
+using OpenRA.Graphics;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.Common.Traits
{
[Desc("Displays an overlay whenever resources are harvested by the actor.")]
class WithHarvestAnimationInfo : ITraitInfo, Requires, Requires
@@ -45,7 +44,7 @@ namespace OpenRA.Mods.RA.Render
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
() => !visible,
() => false,
- p => WithTurret.ZOffsetFromCenter(self, p, 0)));
+ p => ZOffsetFromCenter(self, p, 0)));
}
public void Harvested(Actor self, ResourceType resource)
@@ -60,5 +59,11 @@ namespace OpenRA.Mods.RA.Render
public void MovingToResources(Actor self, CPos targetCell, Activity next) { }
public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
public void MovementCancelled(Actor self) { }
+
+ public static int ZOffsetFromCenter(Actor self, WPos pos, int offset)
+ {
+ var delta = self.CenterPosition - pos;
+ return delta.Y + delta.Z + offset;
+ }
}
}
diff --git a/OpenRA.Mods.RA/Render/WithMakeAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithMakeAnimation.cs
similarity index 92%
rename from OpenRA.Mods.RA/Render/WithMakeAnimation.cs
rename to OpenRA.Mods.Common/Traits/Render/WithMakeAnimation.cs
index df7c77894a..9fe5f72a66 100644
--- a/OpenRA.Mods.RA/Render/WithMakeAnimation.cs
+++ b/OpenRA.Mods.Common/Traits/Render/WithMakeAnimation.cs
@@ -12,12 +12,10 @@ using System;
using System.Linq;
using OpenRA.Activities;
using OpenRA.Graphics;
-using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Buildings;
-using OpenRA.Mods.RA.Render;
+using OpenRA.Mods.Common.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+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 98%
rename from OpenRA.Mods.RA/Traits/World/ResourceLayer.cs
rename to OpenRA.Mods.Common/Traits/World/ResourceLayer.cs
index 88c7aa0183..86c97cf6ad 100644
--- a/OpenRA.Mods.RA/Traits/World/ResourceLayer.cs
+++ b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs
@@ -12,10 +12,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.RA.Buildings;
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 cbb4683e07..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,7 +21,13 @@ 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); }
public interface ICruiseAltitudeInfo { WRange GetCruiseAltitude(); }
diff --git a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs
index 52976ab2dc..04182a7612 100644
--- a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs
+++ b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs
@@ -15,7 +15,7 @@ using OpenRA.GameRules;
using OpenRA.Mods.Common.Effects;
using OpenRA.Traits;
-namespace OpenRA.Mods.Common
+namespace OpenRA.Mods.Common.Warheads
{
public class CreateEffectWarhead : Warhead
{
diff --git a/OpenRA.Mods.RA/Warheads/CreateResourceWarhead.cs b/OpenRA.Mods.Common/Warheads/CreateResourceWarhead.cs
similarity index 93%
rename from OpenRA.Mods.RA/Warheads/CreateResourceWarhead.cs
rename to OpenRA.Mods.Common/Warheads/CreateResourceWarhead.cs
index 0f85697645..44c84d3637 100644
--- a/OpenRA.Mods.RA/Warheads/CreateResourceWarhead.cs
+++ b/OpenRA.Mods.Common/Warheads/CreateResourceWarhead.cs
@@ -12,10 +12,10 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Effects;
using OpenRA.GameRules;
-using OpenRA.Mods.RA.Traits;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.Common.Warheads
{
public class CreateResourceWarhead : Warhead
{
@@ -26,7 +26,6 @@ namespace OpenRA.Mods.RA
public readonly string AddsResourceType = null;
// TODO: Allow maximum resource splatter to be defined. (Per tile, and in total).
-
public override void DoImpact(Target target, Actor firedBy, IEnumerable damageModifiers)
{
if (string.IsNullOrEmpty(AddsResourceType))
@@ -34,7 +33,7 @@ namespace OpenRA.Mods.RA
var world = firedBy.World;
var targetTile = world.Map.CellContaining(target.CenterPosition);
- var resLayer = world.WorldActor.Trait();
+ var resLayer = world.WorldActor.Trait();
var minRange = (Size.Length > 1 && Size[1] > 0) ? Size[1] : 0;
var allCells = world.Map.FindTilesInAnnulus(targetTile, minRange, Size[0]);
diff --git a/OpenRA.Mods.RA/Warheads/DestroyResourceWarhead.cs b/OpenRA.Mods.Common/Warheads/DestroyResourceWarhead.cs
similarity index 94%
rename from OpenRA.Mods.RA/Warheads/DestroyResourceWarhead.cs
rename to OpenRA.Mods.Common/Warheads/DestroyResourceWarhead.cs
index a1c7b9d7cb..15ff1d1704 100644
--- a/OpenRA.Mods.RA/Warheads/DestroyResourceWarhead.cs
+++ b/OpenRA.Mods.Common/Warheads/DestroyResourceWarhead.cs
@@ -12,10 +12,10 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Effects;
using OpenRA.GameRules;
-using OpenRA.Mods.RA.Traits;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.Common.Warheads
{
public class DestroyResourceWarhead : Warhead
{
@@ -23,7 +23,6 @@ namespace OpenRA.Mods.RA
public readonly int[] Size = { 0, 0 };
// TODO: Allow maximum resource removal to be defined. (Per tile, and in total).
-
public override void DoImpact(Target target, Actor firedBy, IEnumerable damageModifiers)
{
var world = firedBy.World;
diff --git a/OpenRA.Mods.Common/Warheads/HealthPercentageDamageWarhead.cs b/OpenRA.Mods.Common/Warheads/HealthPercentageDamageWarhead.cs
index 61d9338803..ed4508e19f 100644
--- a/OpenRA.Mods.Common/Warheads/HealthPercentageDamageWarhead.cs
+++ b/OpenRA.Mods.Common/Warheads/HealthPercentageDamageWarhead.cs
@@ -15,7 +15,7 @@ using OpenRA.Effects;
using OpenRA.GameRules;
using OpenRA.Traits;
-namespace OpenRA.Mods.Common
+namespace OpenRA.Mods.Common.Warheads
{
public class HealthPercentageDamageWarhead : DamageWarhead
{
diff --git a/OpenRA.Mods.Common/Warheads/LeaveSmudgeWarhead.cs b/OpenRA.Mods.Common/Warheads/LeaveSmudgeWarhead.cs
index bef3f45cf9..192ab6e622 100644
--- a/OpenRA.Mods.Common/Warheads/LeaveSmudgeWarhead.cs
+++ b/OpenRA.Mods.Common/Warheads/LeaveSmudgeWarhead.cs
@@ -16,7 +16,7 @@ using OpenRA.GameRules;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.Common
+namespace OpenRA.Mods.Common.Warheads
{
public class LeaveSmudgeWarhead : Warhead
{
diff --git a/OpenRA.Mods.Common/Warheads/SpreadDamageWarhead.cs b/OpenRA.Mods.Common/Warheads/SpreadDamageWarhead.cs
index 78bbfd00a7..627aacb22a 100644
--- a/OpenRA.Mods.Common/Warheads/SpreadDamageWarhead.cs
+++ b/OpenRA.Mods.Common/Warheads/SpreadDamageWarhead.cs
@@ -15,7 +15,7 @@ using OpenRA.Effects;
using OpenRA.GameRules;
using OpenRA.Traits;
-namespace OpenRA.Mods.Common
+namespace OpenRA.Mods.Common.Warheads
{
public class SpreadDamageWarhead : DamageWarhead
{
diff --git a/OpenRA.Mods.D2k/Traits/AttackSwallow.cs b/OpenRA.Mods.D2k/Traits/AttackSwallow.cs
index 3293cae7d5..ebee958c8f 100644
--- a/OpenRA.Mods.D2k/Traits/AttackSwallow.cs
+++ b/OpenRA.Mods.D2k/Traits/AttackSwallow.cs
@@ -9,7 +9,7 @@
#endregion
using OpenRA.Mods.D2k.Activities;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits
diff --git a/OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs b/OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs
index 08161fd446..5ccdc47097 100644
--- a/OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs
+++ b/OpenRA.Mods.D2k/Traits/Buildings/LaysTerrain.cs
@@ -9,7 +9,8 @@
#endregion
using System.Linq;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits
diff --git a/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs b/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs
index 9f5b145ec2..ed03337e71 100644
--- a/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs
+++ b/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs
@@ -10,7 +10,7 @@
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits
diff --git a/OpenRA.Mods.D2k/Traits/Render/WithDeliveryOverlay.cs b/OpenRA.Mods.D2k/Traits/Render/WithDeliveryOverlay.cs
index 08de7c7803..b37b00ed1a 100644
--- a/OpenRA.Mods.D2k/Traits/Render/WithDeliveryOverlay.cs
+++ b/OpenRA.Mods.D2k/Traits/Render/WithDeliveryOverlay.cs
@@ -11,7 +11,7 @@
using OpenRA.Effects;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits
diff --git a/OpenRA.Mods.D2k/Traits/Render/WithDockingOverlay.cs b/OpenRA.Mods.D2k/Traits/Render/WithDockingOverlay.cs
index 400c2c82e7..e7014154ed 100644
--- a/OpenRA.Mods.D2k/Traits/Render/WithDockingOverlay.cs
+++ b/OpenRA.Mods.D2k/Traits/Render/WithDockingOverlay.cs
@@ -11,7 +11,7 @@
using OpenRA.Effects;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits
diff --git a/OpenRA.Mods.D2k/Traits/Render/WithProductionOverlay.cs b/OpenRA.Mods.D2k/Traits/Render/WithProductionOverlay.cs
index 488653f00c..a3a4bc3a30 100644
--- a/OpenRA.Mods.D2k/Traits/Render/WithProductionOverlay.cs
+++ b/OpenRA.Mods.D2k/Traits/Render/WithProductionOverlay.cs
@@ -13,7 +13,6 @@ using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA;
-using OpenRA.Mods.RA.Buildings;
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.D2k/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.D2k/Widgets/BuildPaletteWidget.cs
index e3546fed1e..f03c354527 100644
--- a/OpenRA.Mods.D2k/Widgets/BuildPaletteWidget.cs
+++ b/OpenRA.Mods.D2k/Widgets/BuildPaletteWidget.cs
@@ -15,8 +15,8 @@ using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Orders;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Network;
using OpenRA.Primitives;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.D2k/Widgets/SupportPowerBinWidget.cs b/OpenRA.Mods.D2k/Widgets/SupportPowerBinWidget.cs
index b97ac8d84f..79f8d78c29 100644
--- a/OpenRA.Mods.D2k/Widgets/SupportPowerBinWidget.cs
+++ b/OpenRA.Mods.D2k/Widgets/SupportPowerBinWidget.cs
@@ -13,7 +13,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives;
using OpenRA.Widgets;
diff --git a/OpenRA.Mods.RA/AI/BaseBuilder.cs b/OpenRA.Mods.RA/AI/BaseBuilder.cs
index a5600ca94c..cdf7853976 100644
--- a/OpenRA.Mods.RA/AI/BaseBuilder.cs
+++ b/OpenRA.Mods.RA/AI/BaseBuilder.cs
@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs
index 0f69372e5e..87ebaac91f 100644
--- a/OpenRA.Mods.RA/AI/HackyAI.cs
+++ b/OpenRA.Mods.RA/AI/HackyAI.cs
@@ -15,7 +15,6 @@ using System.Linq;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives;
using OpenRA.Support;
diff --git a/OpenRA.Mods.RA/AI/States/StateBase.cs b/OpenRA.Mods.RA/AI/States/StateBase.cs
index 601fec2837..84b5ae36c9 100644
--- a/OpenRA.Mods.RA/AI/States/StateBase.cs
+++ b/OpenRA.Mods.RA/AI/States/StateBase.cs
@@ -11,9 +11,9 @@
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.Mods.RA.Buildings;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.AI
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 ea9ab6dcc0..8f220b15c6 100644
--- a/OpenRA.Mods.RA/Activities/CaptureActor.cs
+++ b/OpenRA.Mods.RA/Activities/CaptureActor.cs
@@ -9,7 +9,8 @@
#endregion
using OpenRA.Activities;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
diff --git a/OpenRA.Mods.RA/Activities/Heal.cs b/OpenRA.Mods.RA/Activities/Heal.cs
index 3e2606084f..d7fbc0ee3b 100755
--- a/OpenRA.Mods.RA/Activities/Heal.cs
+++ b/OpenRA.Mods.RA/Activities/Heal.cs
@@ -9,6 +9,7 @@
#endregion
using OpenRA.Activities;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
diff --git a/OpenRA.Mods.RA/Activities/Hunt.cs b/OpenRA.Mods.RA/Activities/Hunt.cs
index b2a10cb3c4..b3030217bb 100644
--- a/OpenRA.Mods.RA/Activities/Hunt.cs
+++ b/OpenRA.Mods.RA/Activities/Hunt.cs
@@ -13,6 +13,7 @@ using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
diff --git a/OpenRA.Mods.RA/Activities/Infiltrate.cs b/OpenRA.Mods.RA/Activities/Infiltrate.cs
index a73e29e282..bd17ca10ca 100644
--- a/OpenRA.Mods.RA/Activities/Infiltrate.cs
+++ b/OpenRA.Mods.RA/Activities/Infiltrate.cs
@@ -9,7 +9,7 @@
#endregion
using OpenRA.Activities;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Activities/Leap.cs b/OpenRA.Mods.RA/Activities/Leap.cs
index 54bf7d8284..8174277cb6 100644
--- a/OpenRA.Mods.RA/Activities/Leap.cs
+++ b/OpenRA.Mods.RA/Activities/Leap.cs
@@ -13,7 +13,6 @@ using System.Linq;
using OpenRA.Activities;
using OpenRA.GameRules;
using OpenRA.Mods.RA.Traits;
-using OpenRA.Mods.RA.Render;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
diff --git a/OpenRA.Mods.RA/Activities/Rearm.cs b/OpenRA.Mods.RA/Activities/Rearm.cs
index f5fadfd106..bc86046d95 100644
--- a/OpenRA.Mods.RA/Activities/Rearm.cs
+++ b/OpenRA.Mods.RA/Activities/Rearm.cs
@@ -10,7 +10,8 @@
using System.Linq;
using OpenRA.Activities;
-using OpenRA.Mods.RA.Render;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
diff --git a/OpenRA.Mods.RA/Activities/Sell.cs b/OpenRA.Mods.RA/Activities/Sell.cs
index fd2a9166b4..217d570e85 100755
--- a/OpenRA.Mods.RA/Activities/Sell.cs
+++ b/OpenRA.Mods.RA/Activities/Sell.cs
@@ -9,8 +9,9 @@
#endregion
using OpenRA.Activities;
-using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Effects;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
diff --git a/OpenRA.Mods.RA/Activities/Teleport.cs b/OpenRA.Mods.RA/Activities/Teleport.cs
index cf7e37a44c..4fedc95fbb 100755
--- a/OpenRA.Mods.RA/Activities/Teleport.cs
+++ b/OpenRA.Mods.RA/Activities/Teleport.cs
@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Activities;
-using OpenRA.Mods.RA.Render;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/ActorExts.cs b/OpenRA.Mods.RA/ActorExts.cs
index b15ea0854a..4a0dceb383 100644
--- a/OpenRA.Mods.RA/ActorExts.cs
+++ b/OpenRA.Mods.RA/ActorExts.cs
@@ -11,7 +11,7 @@
using System.Drawing;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
public static class ActorExts
{
diff --git a/OpenRA.Mods.RA/Armament.cs b/OpenRA.Mods.RA/Armament.cs
index 2f463560df..4b5cec1d9a 100644
--- a/OpenRA.Mods.RA/Armament.cs
+++ b/OpenRA.Mods.RA/Armament.cs
@@ -16,7 +16,7 @@ using OpenRA.Mods.Common.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
public class Barrel
{
diff --git a/OpenRA.Mods.RA/Attack/AttackBase.cs b/OpenRA.Mods.RA/Attack/AttackBase.cs
index dd5fd1053e..e7453a8804 100644
--- a/OpenRA.Mods.RA/Attack/AttackBase.cs
+++ b/OpenRA.Mods.RA/Attack/AttackBase.cs
@@ -14,10 +14,10 @@ using System.Drawing;
using System.Linq;
using OpenRA.Activities;
using OpenRA.GameRules;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
public abstract class AttackBaseInfo : ITraitInfo
{
diff --git a/OpenRA.Mods.RA/Attack/AttackCharge.cs b/OpenRA.Mods.RA/Attack/AttackCharge.cs
index b8546021ab..73ec971f10 100644
--- a/OpenRA.Mods.RA/Attack/AttackCharge.cs
+++ b/OpenRA.Mods.RA/Attack/AttackCharge.cs
@@ -10,10 +10,9 @@
using OpenRA.Activities;
using OpenRA.Mods.Common.Activities;
-using OpenRA.Mods.RA.Render;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Charges up before being able to attack.")]
class AttackChargeInfo : AttackOmniInfo
diff --git a/OpenRA.Mods.RA/Attack/AttackFollow.cs b/OpenRA.Mods.RA/Attack/AttackFollow.cs
index 6d4aa96c53..96fbeb7ba7 100644
--- a/OpenRA.Mods.RA/Attack/AttackFollow.cs
+++ b/OpenRA.Mods.RA/Attack/AttackFollow.cs
@@ -10,10 +10,9 @@
using System;
using OpenRA.Activities;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Actor will follow units until in range to attack them.")]
public class AttackFollowInfo : AttackBaseInfo
diff --git a/OpenRA.Mods.RA/Attack/AttackFrontal.cs b/OpenRA.Mods.RA/Attack/AttackFrontal.cs
index 4be58b4508..18be6c43ee 100644
--- a/OpenRA.Mods.RA/Attack/AttackFrontal.cs
+++ b/OpenRA.Mods.RA/Attack/AttackFrontal.cs
@@ -12,7 +12,7 @@ using System;
using OpenRA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Unit got to face the target")]
public class AttackFrontalInfo : AttackBaseInfo, Requires
diff --git a/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs b/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs
index f251df8f48..663ecd585b 100644
--- a/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs
+++ b/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs
@@ -14,10 +14,9 @@ using System.Linq;
using OpenRA.Activities;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Render;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
public class FirePort
{
diff --git a/OpenRA.Mods.RA/Attack/AttackMedic.cs b/OpenRA.Mods.RA/Attack/AttackMedic.cs
index 9641da91de..01033d7a8a 100644
--- a/OpenRA.Mods.RA/Attack/AttackMedic.cs
+++ b/OpenRA.Mods.RA/Attack/AttackMedic.cs
@@ -11,7 +11,7 @@
using OpenRA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Give the unit a \"heal-weapon\" that attacks friendly targets if they are damaged.",
"It conflicts with any other weapon or Attack*: trait because it will hurt friendlies during the",
diff --git a/OpenRA.Mods.RA/Attack/AttackOmni.cs b/OpenRA.Mods.RA/Attack/AttackOmni.cs
index 50960e0c4d..9c6047387e 100644
--- a/OpenRA.Mods.RA/Attack/AttackOmni.cs
+++ b/OpenRA.Mods.RA/Attack/AttackOmni.cs
@@ -11,7 +11,7 @@
using OpenRA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class AttackOmniInfo : AttackBaseInfo
{
diff --git a/OpenRA.Mods.RA/Attack/AttackTurreted.cs b/OpenRA.Mods.RA/Attack/AttackTurreted.cs
index 01eb58b8d8..47a2ed1a6b 100644
--- a/OpenRA.Mods.RA/Attack/AttackTurreted.cs
+++ b/OpenRA.Mods.RA/Attack/AttackTurreted.cs
@@ -12,7 +12,7 @@ using System.Collections.Generic;
using OpenRA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Actor has a visual turret used to attack.")]
public class AttackTurretedInfo : AttackFollowInfo, Requires
diff --git a/OpenRA.Mods.RA/Attack/AttackWander.cs b/OpenRA.Mods.RA/Attack/AttackWander.cs
index 1662727c73..d48b0b943c 100644
--- a/OpenRA.Mods.RA/Attack/AttackWander.cs
+++ b/OpenRA.Mods.RA/Attack/AttackWander.cs
@@ -9,10 +9,9 @@
#endregion
using OpenRA.Activities;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Will AttackMove to a random location within MoveRadius when idle.",
"This conflicts with player orders and should only be added to animal creeps.")]
diff --git a/OpenRA.Mods.RA/AutoHeal.cs b/OpenRA.Mods.RA/AutoHeal.cs
index 1af562c599..024f80ed02 100644
--- a/OpenRA.Mods.RA/AutoHeal.cs
+++ b/OpenRA.Mods.RA/AutoHeal.cs
@@ -11,7 +11,7 @@
using System.Linq;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Used together with AttackMedic: to make the healer do it's job automatically to nearby units.")]
class AutoHealInfo : TraitInfo, Requires { }
diff --git a/OpenRA.Mods.RA/AutoTarget.cs b/OpenRA.Mods.RA/AutoTarget.cs
index 9eaf2acbed..d343de63f5 100644
--- a/OpenRA.Mods.RA/AutoTarget.cs
+++ b/OpenRA.Mods.RA/AutoTarget.cs
@@ -13,7 +13,7 @@ using System.Linq;
using OpenRA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("The actor will automatically engage the enemy when it is in range.")]
public class AutoTargetInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/C4Demolition.cs b/OpenRA.Mods.RA/C4Demolition.cs
index 3760ec3a19..ec67887fe7 100644
--- a/OpenRA.Mods.RA/C4Demolition.cs
+++ b/OpenRA.Mods.RA/C4Demolition.cs
@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class C4DemolitionInfo : ITraitInfo
{
diff --git a/OpenRA.Mods.RA/Capturable.cs b/OpenRA.Mods.RA/Capturable.cs
index ef186484a5..5980a6307b 100644
--- a/OpenRA.Mods.RA/Capturable.cs
+++ b/OpenRA.Mods.RA/Capturable.cs
@@ -11,7 +11,7 @@
using System.Linq;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("This actor can be captured by a unit with Captures: trait.")]
class CapturableInfo : ITraitInfo
diff --git a/OpenRA.Mods.RA/CaptureNotification.cs b/OpenRA.Mods.RA/CaptureNotification.cs
index b6191e2f6f..ec4025af53 100644
--- a/OpenRA.Mods.RA/CaptureNotification.cs
+++ b/OpenRA.Mods.RA/CaptureNotification.cs
@@ -10,7 +10,7 @@
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class CaptureNotificationInfo : ITraitInfo
{
diff --git a/OpenRA.Mods.RA/Captures.cs b/OpenRA.Mods.RA/Captures.cs
index 64fd9fc63b..6a025a207f 100644
--- a/OpenRA.Mods.RA/Captures.cs
+++ b/OpenRA.Mods.RA/Captures.cs
@@ -14,7 +14,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("This actor can capture other actors which have the Capturable: trait.")]
class CapturesInfo : ITraitInfo
diff --git a/OpenRA.Mods.RA/CombatDebugOverlay.cs b/OpenRA.Mods.RA/CombatDebugOverlay.cs
index 7d21c375cc..8f1fb192f7 100644
--- a/OpenRA.Mods.RA/CombatDebugOverlay.cs
+++ b/OpenRA.Mods.RA/CombatDebugOverlay.cs
@@ -11,9 +11,10 @@
using System;
using System.Drawing;
using OpenRA.Graphics;
-using OpenRA.Traits;
using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.RA.Effects;
+using OpenRA.Mods.RA.Traits;
+using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
diff --git a/OpenRA.Mods.RA/CrateSpawner.cs b/OpenRA.Mods.RA/CrateSpawner.cs
index 5c0d19c3a0..a539224b33 100644
--- a/OpenRA.Mods.RA/CrateSpawner.cs
+++ b/OpenRA.Mods.RA/CrateSpawner.cs
@@ -11,8 +11,8 @@
using System;
using System.Linq;
using OpenRA.Mods.Common.Activities;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Primitives;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Disguise.cs b/OpenRA.Mods.RA/Disguise.cs
index ece609d8ec..27034fc90e 100644
--- a/OpenRA.Mods.RA/Disguise.cs
+++ b/OpenRA.Mods.RA/Disguise.cs
@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Overrides the default ToolTip when this actor is disguised (aids in deceiving enemy players).")]
class DisguiseToolTipInfo : TooltipInfo, Requires
diff --git a/OpenRA.Mods.RA/Effects/Parachute.cs b/OpenRA.Mods.RA/Effects/Parachute.cs
index 3700c5dcb6..34b765578a 100644
--- a/OpenRA.Mods.RA/Effects/Parachute.cs
+++ b/OpenRA.Mods.RA/Effects/Parachute.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Effects;
using OpenRA.Graphics;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Effects
diff --git a/OpenRA.Mods.RA/Effects/RepairIndicator.cs b/OpenRA.Mods.RA/Effects/RepairIndicator.cs
index 5672a27db6..48a5d54ecb 100755
--- a/OpenRA.Mods.RA/Effects/RepairIndicator.cs
+++ b/OpenRA.Mods.RA/Effects/RepairIndicator.cs
@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Effects;
using OpenRA.Graphics;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
namespace OpenRA.Mods.RA.Effects
{
diff --git a/OpenRA.Mods.RA/EmitInfantryOnSell.cs b/OpenRA.Mods.RA/EmitInfantryOnSell.cs
index cc8ad2fd70..2793d05215 100644
--- a/OpenRA.Mods.RA/EmitInfantryOnSell.cs
+++ b/OpenRA.Mods.RA/EmitInfantryOnSell.cs
@@ -10,11 +10,10 @@
using System.Linq;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Primitives;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Spawn new actors when sold.")]
class EmitInfantryOnSellInfo : TraitInfo
diff --git a/OpenRA.Mods.RA/EngineerRepair.cs b/OpenRA.Mods.RA/EngineerRepair.cs
index e0ce938568..fbe030df76 100644
--- a/OpenRA.Mods.RA/EngineerRepair.cs
+++ b/OpenRA.Mods.RA/EngineerRepair.cs
@@ -14,7 +14,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Can instantly repair other actors, but gets consumed afterwards.")]
class EngineerRepairInfo : TraitInfo { }
diff --git a/OpenRA.Mods.RA/ExternalCapturable.cs b/OpenRA.Mods.RA/ExternalCapturable.cs
index c48a671046..ae6d21fb12 100644
--- a/OpenRA.Mods.RA/ExternalCapturable.cs
+++ b/OpenRA.Mods.RA/ExternalCapturable.cs
@@ -9,10 +9,10 @@
#endregion
using System.Linq;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("This actor can be captured by a unit with ExternalCaptures: trait.")]
public class ExternalCapturableInfo : ITraitInfo
diff --git a/OpenRA.Mods.RA/ExternalCapturableBar.cs b/OpenRA.Mods.RA/ExternalCapturableBar.cs
index 7028fff520..746c7ec1e3 100644
--- a/OpenRA.Mods.RA/ExternalCapturableBar.cs
+++ b/OpenRA.Mods.RA/ExternalCapturableBar.cs
@@ -11,7 +11,7 @@
using System.Drawing;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Visualize the remaining CaptureCompleteTime from ExternalCapturable: trait.")]
class ExternalCapturableBarInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/ExternalCaptures.cs b/OpenRA.Mods.RA/ExternalCaptures.cs
index 32b1aa3adc..ea1d8be5c3 100644
--- a/OpenRA.Mods.RA/ExternalCaptures.cs
+++ b/OpenRA.Mods.RA/ExternalCaptures.cs
@@ -14,7 +14,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("This actor can capture other actors which have the ExternalCapturable: trait.")]
class ExternalCapturesInfo : ITraitInfo
diff --git a/OpenRA.Mods.RA/Guard.cs b/OpenRA.Mods.RA/Guard.cs
index 96b24c002f..8a7a47b35f 100644
--- a/OpenRA.Mods.RA/Guard.cs
+++ b/OpenRA.Mods.RA/Guard.cs
@@ -15,7 +15,7 @@ using OpenRA.Graphics;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("The player can give this unit the order to follow and protect friendly units with the Guardable trait.")]
class GuardInfo : TraitInfo { }
diff --git a/OpenRA.Mods.RA/LimitedAmmo.cs b/OpenRA.Mods.RA/LimitedAmmo.cs
index 6228c0dbb4..e56305e9cc 100644
--- a/OpenRA.Mods.RA/LimitedAmmo.cs
+++ b/OpenRA.Mods.RA/LimitedAmmo.cs
@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Actor has a limited amount of ammo, after using it all the actor must reload in some way.")]
public class LimitedAmmoInfo : ITraitInfo
diff --git a/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs b/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs
index 271bdb8f39..995d88e67c 100644
--- a/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs
+++ b/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs
@@ -11,7 +11,7 @@
using System;
using System.Linq;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
index 856c4d365b..dd600f772f 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 @@
-
-
+
-
-
@@ -336,10 +327,8 @@
-
-
@@ -347,7 +336,6 @@
-
@@ -371,12 +359,11 @@
-
-
+
@@ -394,8 +381,6 @@
-
-
diff --git a/OpenRA.Mods.RA/Orders/GlobalButtonOrderGenerator.cs b/OpenRA.Mods.RA/Orders/GlobalButtonOrderGenerator.cs
index f228f576e6..95daf08be2 100755
--- a/OpenRA.Mods.RA/Orders/GlobalButtonOrderGenerator.cs
+++ b/OpenRA.Mods.RA/Orders/GlobalButtonOrderGenerator.cs
@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Orders
diff --git a/OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs b/OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs
index f2b247cf4a..d8724357e2 100644
--- a/OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs
+++ b/OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs
@@ -14,11 +14,9 @@ using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
-using OpenRA.Mods.RA.Render;
using OpenRA.Mods.RA.Traits;
-using OpenRA.Traits;
using OpenRA.Primitives;
+using OpenRA.Traits;
namespace OpenRA.Mods.RA.Orders
{
diff --git a/OpenRA.Mods.RA/Orders/RepairOrderGenerator.cs b/OpenRA.Mods.RA/Orders/RepairOrderGenerator.cs
index af934dae5d..bf1e0bac08 100644
--- a/OpenRA.Mods.RA/Orders/RepairOrderGenerator.cs
+++ b/OpenRA.Mods.RA/Orders/RepairOrderGenerator.cs
@@ -11,7 +11,7 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Orders
diff --git a/OpenRA.Mods.RA/Parachutable.cs b/OpenRA.Mods.RA/Parachutable.cs
index 5a91bd1d74..945d404c04 100644
--- a/OpenRA.Mods.RA/Parachutable.cs
+++ b/OpenRA.Mods.RA/Parachutable.cs
@@ -9,7 +9,8 @@
#endregion
using OpenRA.Mods.Common.Effects;
-using OpenRA.Mods.RA.Render;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Player/AllyRepair.cs b/OpenRA.Mods.RA/Player/AllyRepair.cs
index 91b8df54c4..4e8fd6fc79 100644
--- a/OpenRA.Mods.RA/Player/AllyRepair.cs
+++ b/OpenRA.Mods.RA/Player/AllyRepair.cs
@@ -8,10 +8,9 @@
*/
#endregion
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Attach this to the player actor to allow building repair by team mates.")]
diff --git a/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs b/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs
index d05f570cef..f761bfa979 100644
--- a/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs
+++ b/OpenRA.Mods.RA/Player/BaseAttackNotifier.cs
@@ -10,10 +10,9 @@
using System.Drawing;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Plays an audio notification and shows a radar ping when a building is attacked.",
"Attach this to the player actor.")]
diff --git a/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs b/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs
index 12e4c7dd97..1c8e7a8f9b 100644
--- a/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs
+++ b/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs
@@ -11,7 +11,6 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Player/PlaceBuilding.cs b/OpenRA.Mods.RA/Player/PlaceBuilding.cs
index 0cb8765738..33fe5f6844 100644
--- a/OpenRA.Mods.RA/Player/PlaceBuilding.cs
+++ b/OpenRA.Mods.RA/Player/PlaceBuilding.cs
@@ -11,7 +11,6 @@
using System.Linq;
using OpenRA.Effects;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Player/PlayerStatistics.cs b/OpenRA.Mods.RA/Player/PlayerStatistics.cs
index 82bfaa0bad..21a78dbae9 100644
--- a/OpenRA.Mods.RA/Player/PlayerStatistics.cs
+++ b/OpenRA.Mods.RA/Player/PlayerStatistics.cs
@@ -11,7 +11,7 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
diff --git a/OpenRA.Mods.RA/Player/ProductionQueue.cs b/OpenRA.Mods.RA/Player/ProductionQueue.cs
index e36e3ba5ad..a520f31f6d 100644
--- a/OpenRA.Mods.RA/Player/ProductionQueue.cs
+++ b/OpenRA.Mods.RA/Player/ProductionQueue.cs
@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Reloads.cs b/OpenRA.Mods.RA/Reloads.cs
index 008a323e3d..25bdf1c1e2 100644
--- a/OpenRA.Mods.RA/Reloads.cs
+++ b/OpenRA.Mods.RA/Reloads.cs
@@ -10,7 +10,7 @@
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Unit will reload its limited ammo itself.")]
public class ReloadsInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/Render/Hovers.cs b/OpenRA.Mods.RA/Render/Hovers.cs
index 357fa5e58e..133a0eb3c4 100644
--- a/OpenRA.Mods.RA/Render/Hovers.cs
+++ b/OpenRA.Mods.RA/Render/Hovers.cs
@@ -13,10 +13,9 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Changes the visual Z position periodically.")]
class HoversInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs b/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs
index f39d6d6e86..ac5d0e3cb3 100755
--- a/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs
+++ b/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs
@@ -8,7 +8,9 @@
*/
#endregion
-namespace OpenRA.Mods.RA.Render
+using OpenRA.Mods.Common.Traits;
+
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Used for tesla coil and obelisk.")]
public class RenderBuildingChargeInfo : RenderBuildingInfo
diff --git a/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs b/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs
index 1643e82bb9..543c765b0b 100644
--- a/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs
+++ b/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs
@@ -10,11 +10,11 @@
using System.Collections.Generic;
using OpenRA.Graphics;
+using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-using OpenRA.Mods.Common.Graphics;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
class RenderBuildingSiloInfo : RenderBuildingInfo
{
diff --git a/OpenRA.Mods.RA/Render/RenderBuildingTurreted.cs b/OpenRA.Mods.RA/Render/RenderBuildingTurreted.cs
index c31b619d65..d2515a59ee 100644
--- a/OpenRA.Mods.RA/Render/RenderBuildingTurreted.cs
+++ b/OpenRA.Mods.RA/Render/RenderBuildingTurreted.cs
@@ -16,7 +16,7 @@ using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
class RenderBuildingTurretedInfo : RenderBuildingInfo, Requires
{
diff --git a/OpenRA.Mods.RA/Render/RenderBuildingWall.cs b/OpenRA.Mods.RA/Render/RenderBuildingWall.cs
index ea59bf81f3..35ca3ada9f 100644
--- a/OpenRA.Mods.RA/Render/RenderBuildingWall.cs
+++ b/OpenRA.Mods.RA/Render/RenderBuildingWall.cs
@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
class RenderBuildingWallInfo : RenderBuildingInfo
{
diff --git a/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs b/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs
index 990786f546..ba2b3ce15a 100755
--- a/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs
+++ b/OpenRA.Mods.RA/Render/RenderBuildingWarFactory.cs
@@ -11,12 +11,11 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.Common.Graphics;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
class RenderBuildingWarFactoryInfo : RenderBuildingInfo
{
diff --git a/OpenRA.Mods.RA/Render/RenderDisguise.cs b/OpenRA.Mods.RA/Render/RenderDisguise.cs
index 7e61373b86..d668f06ca3 100644
--- a/OpenRA.Mods.RA/Render/RenderDisguise.cs
+++ b/OpenRA.Mods.RA/Render/RenderDisguise.cs
@@ -10,7 +10,7 @@
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
class RenderDisguiseInfo : RenderInfantryInfo, Requires
{
diff --git a/OpenRA.Mods.RA/Render/RenderHarvester.cs b/OpenRA.Mods.RA/Render/RenderHarvester.cs
index 36efb82cf8..c98823c35f 100644
--- a/OpenRA.Mods.RA/Render/RenderHarvester.cs
+++ b/OpenRA.Mods.RA/Render/RenderHarvester.cs
@@ -11,10 +11,9 @@
using OpenRA.Activities;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
class RenderHarvesterInfo : RenderUnitInfo, Requires
{
diff --git a/OpenRA.Mods.RA/Render/RenderInfantry.cs b/OpenRA.Mods.RA/Render/RenderInfantry.cs
index 89409c03b4..bece80c4ce 100644
--- a/OpenRA.Mods.RA/Render/RenderInfantry.cs
+++ b/OpenRA.Mods.RA/Render/RenderInfantry.cs
@@ -10,12 +10,12 @@
using System.Collections.Generic;
using System.Linq;
+using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Graphics;
-using OpenRA.Graphics;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
public class RenderInfantryInfo : RenderSimpleInfo, Requires
{
diff --git a/OpenRA.Mods.RA/Render/RenderLandingCraft.cs b/OpenRA.Mods.RA/Render/RenderLandingCraft.cs
index 9643a0bdde..7ddafe7353 100644
--- a/OpenRA.Mods.RA/Render/RenderLandingCraft.cs
+++ b/OpenRA.Mods.RA/Render/RenderLandingCraft.cs
@@ -12,7 +12,7 @@ using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
public class RenderLandingCraftInfo : RenderUnitInfo, Requires, Requires
{
diff --git a/OpenRA.Mods.RA/Render/RenderUnitReload.cs b/OpenRA.Mods.RA/Render/RenderUnitReload.cs
index 3468c38bbf..e2f9de01d2 100755
--- a/OpenRA.Mods.RA/Render/RenderUnitReload.cs
+++ b/OpenRA.Mods.RA/Render/RenderUnitReload.cs
@@ -12,7 +12,7 @@ using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
class RenderUnitReloadInfo : RenderUnitInfo, Requires, Requires
{
diff --git a/OpenRA.Mods.RA/Render/WithActiveAnimation.cs b/OpenRA.Mods.RA/Render/WithActiveAnimation.cs
index dec588eb60..cfd6148893 100644
--- a/OpenRA.Mods.RA/Render/WithActiveAnimation.cs
+++ b/OpenRA.Mods.RA/Render/WithActiveAnimation.cs
@@ -11,9 +11,10 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Replaces the idle animation of a building.")]
public class WithActiveAnimationInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/Render/WithBarrel.cs b/OpenRA.Mods.RA/Render/WithBarrel.cs
index ba969b4520..86482894a2 100644
--- a/OpenRA.Mods.RA/Render/WithBarrel.cs
+++ b/OpenRA.Mods.RA/Render/WithBarrel.cs
@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Renders barrels for units with the Turreted trait.")]
class WithBarrelInfo : ITraitInfo, IRenderActorPreviewSpritesInfo, Requires, Requires
diff --git a/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs b/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs
index ae839c0d11..00dc7e7075 100755
--- a/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs
+++ b/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs
@@ -8,11 +8,11 @@
*/
#endregion
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.Common.Effects;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Display explosions over the building footprint when it is destroyed.")]
class WithBuildingExplosionInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/Render/WithIdleOverlay.cs b/OpenRA.Mods.RA/Render/WithIdleOverlay.cs
index 5f04a2c350..494983bdd3 100644
--- a/OpenRA.Mods.RA/Render/WithIdleOverlay.cs
+++ b/OpenRA.Mods.RA/Render/WithIdleOverlay.cs
@@ -11,12 +11,11 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.Common.Graphics;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Renders a decorative animation on units and buildings.")]
public class WithIdleOverlayInfo : ITraitInfo, IRenderActorPreviewSpritesInfo, Requires, Requires
diff --git a/OpenRA.Mods.RA/Render/WithMuzzleFlash.cs b/OpenRA.Mods.RA/Render/WithMuzzleFlash.cs
index 66e1e06ab1..3d38dc75bf 100644
--- a/OpenRA.Mods.RA/Render/WithMuzzleFlash.cs
+++ b/OpenRA.Mods.RA/Render/WithMuzzleFlash.cs
@@ -13,10 +13,9 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Renders the MuzzleSequence from the Armament trait.")]
class WithMuzzleFlashInfo : ITraitInfo, Requires, Requires, Requires
diff --git a/OpenRA.Mods.RA/Render/WithRepairAnimation.cs b/OpenRA.Mods.RA/Render/WithRepairAnimation.cs
index 720efd600a..4598521c92 100644
--- a/OpenRA.Mods.RA/Render/WithRepairAnimation.cs
+++ b/OpenRA.Mods.RA/Render/WithRepairAnimation.cs
@@ -10,9 +10,10 @@
using System.Collections.Generic;
using System.Linq;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Replaces the building animation when it repairs a unit.")]
public class WithRepairAnimationInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/Render/WithRepairOverlay.cs b/OpenRA.Mods.RA/Render/WithRepairOverlay.cs
index 97a890d1c2..c3d62b91bb 100644
--- a/OpenRA.Mods.RA/Render/WithRepairOverlay.cs
+++ b/OpenRA.Mods.RA/Render/WithRepairOverlay.cs
@@ -12,10 +12,9 @@ using System.Linq;
using OpenRA.Effects;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Displays an overlay when the building is being repaired by the player.")]
public class WithRepairOverlayInfo : ITraitInfo, Requires, Requires
diff --git a/OpenRA.Mods.RA/Render/WithTurret.cs b/OpenRA.Mods.RA/Render/WithTurret.cs
index 2cda39b871..4df64128cd 100755
--- a/OpenRA.Mods.RA/Render/WithTurret.cs
+++ b/OpenRA.Mods.RA/Render/WithTurret.cs
@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Render
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Renders turrets for units with the Turreted trait.")]
class WithTurretInfo : ITraitInfo, IRenderActorPreviewSpritesInfo, Requires, Requires, Requires
diff --git a/OpenRA.Mods.RA/RenderDetectionCircle.cs b/OpenRA.Mods.RA/RenderDetectionCircle.cs
index 2898844803..2bcde1a5b8 100644
--- a/OpenRA.Mods.RA/RenderDetectionCircle.cs
+++ b/OpenRA.Mods.RA/RenderDetectionCircle.cs
@@ -14,7 +14,7 @@ using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class RenderDetectionCircleInfo : ITraitInfo
{
diff --git a/OpenRA.Mods.RA/RenderJammerCircle.cs b/OpenRA.Mods.RA/RenderJammerCircle.cs
index fb94d20e3f..6119433276 100644
--- a/OpenRA.Mods.RA/RenderJammerCircle.cs
+++ b/OpenRA.Mods.RA/RenderJammerCircle.cs
@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
// TODO: remove all the Render*Circle duplication
class RenderJammerCircleInfo : ITraitInfo, IPlaceBuildingDecoration
diff --git a/OpenRA.Mods.RA/RenderRangeCircle.cs b/OpenRA.Mods.RA/RenderRangeCircle.cs
index 21168f432d..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
+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 b990920bea..825faaf5a4 100644
--- a/OpenRA.Mods.RA/RenderShroudCircle.cs
+++ b/OpenRA.Mods.RA/RenderShroudCircle.cs
@@ -12,9 +12,10 @@ 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
+namespace OpenRA.Mods.RA.Traits
{
class RenderShroudCircleInfo : ITraitInfo, IPlaceBuildingDecoration
{
diff --git a/OpenRA.Mods.RA/Repairable.cs b/OpenRA.Mods.RA/Repairable.cs
index 44f8bab03d..3cb58a03f2 100644
--- a/OpenRA.Mods.RA/Repairable.cs
+++ b/OpenRA.Mods.RA/Repairable.cs
@@ -16,10 +16,9 @@ using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("This actor can be sent to a structure for repairs.")]
class RepairableInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/RepairableNear.cs b/OpenRA.Mods.RA/RepairableNear.cs
index 5b54874ed2..4a21b03711 100644
--- a/OpenRA.Mods.RA/RepairableNear.cs
+++ b/OpenRA.Mods.RA/RepairableNear.cs
@@ -12,11 +12,11 @@ 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.Mods.RA.Buildings;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class RepairableNearInfo : ITraitInfo, Requires
{
diff --git a/OpenRA.Mods.RA/Scripting/Properties/GeneralProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/GeneralProperties.cs
index 70793f2ac6..c0bfa67261 100644
--- a/OpenRA.Mods.RA/Scripting/Properties/GeneralProperties.cs
+++ b/OpenRA.Mods.RA/Scripting/Properties/GeneralProperties.cs
@@ -11,6 +11,7 @@
using Eluant;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.RA.Activities;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Scripting;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Scripting/Properties/GuardProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/GuardProperties.cs
index fd1e744b98..8d81d61c10 100644
--- a/OpenRA.Mods.RA/Scripting/Properties/GuardProperties.cs
+++ b/OpenRA.Mods.RA/Scripting/Properties/GuardProperties.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using OpenRA.Mods.RA.Traits;
using OpenRA.Scripting;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Scripting/Properties/RepairableBuildingProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/RepairableBuildingProperties.cs
index d60bab6065..6dd5354411 100644
--- a/OpenRA.Mods.RA/Scripting/Properties/RepairableBuildingProperties.cs
+++ b/OpenRA.Mods.RA/Scripting/Properties/RepairableBuildingProperties.cs
@@ -8,7 +8,7 @@
*/
#endregion
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Scripting;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Scripting/Properties/TransformProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/TransformProperties.cs
index 6f5f656bc4..c1a160ff50 100644
--- a/OpenRA.Mods.RA/Scripting/Properties/TransformProperties.cs
+++ b/OpenRA.Mods.RA/Scripting/Properties/TransformProperties.cs
@@ -8,6 +8,7 @@
*/
#endregion
+using OpenRA.Mods.RA.Traits;
using OpenRA.Scripting;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Sellable.cs b/OpenRA.Mods.RA/Sellable.cs
index 6301dae583..34de9f7cd6 100644
--- a/OpenRA.Mods.RA/Sellable.cs
+++ b/OpenRA.Mods.RA/Sellable.cs
@@ -11,11 +11,9 @@
using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Buildings;
-using OpenRA.Mods.RA.Render;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Actor can be sold")]
diff --git a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs
index 587508b87d..79bdfa6f3c 100644
--- a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs
@@ -14,11 +14,10 @@ using System.Linq;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class AirstrikePowerInfo : SupportPowerInfo
{
diff --git a/OpenRA.Mods.RA/SupportPowers/GrantUpgradePower.cs b/OpenRA.Mods.RA/SupportPowers/GrantUpgradePower.cs
index ff4fb5618c..220dab0c75 100644
--- a/OpenRA.Mods.RA/SupportPowers/GrantUpgradePower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/GrantUpgradePower.cs
@@ -13,10 +13,9 @@ using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Render;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class GrantUpgradePowerInfo : SupportPowerInfo
{
diff --git a/OpenRA.Mods.RA/SupportPowers/NukePower.cs b/OpenRA.Mods.RA/SupportPowers/NukePower.cs
index ee35a667f9..a2dc1c61ac 100755
--- a/OpenRA.Mods.RA/SupportPowers/NukePower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/NukePower.cs
@@ -17,7 +17,7 @@ using OpenRA.Mods.RA.Activities;
using OpenRA.Primitives;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class NukePowerInfo : SupportPowerInfo, Requires
{
diff --git a/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs b/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs
index 63ecf25d61..65d874a578 100644
--- a/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs
@@ -14,11 +14,10 @@ using System.Linq;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
public class ParatroopersPowerInfo : SupportPowerInfo
{
diff --git a/OpenRA.Mods.RA/SupportPowers/SpawnActorPower.cs b/OpenRA.Mods.RA/SupportPowers/SpawnActorPower.cs
index 75425787c8..ddc755fb5c 100755
--- a/OpenRA.Mods.RA/SupportPowers/SpawnActorPower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/SpawnActorPower.cs
@@ -14,7 +14,7 @@ using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Effects;
using OpenRA.Primitives;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Spawns an actor that stays for a limited amount of time.")]
public class SpawnActorPowerInfo : SupportPowerInfo
diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPower.cs b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs
index 93ac8d56ef..f72425fe25 100755
--- a/OpenRA.Mods.RA/SupportPowers/SupportPower.cs
+++ b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs
@@ -11,7 +11,7 @@
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
public abstract class SupportPowerInfo : ITraitInfo
{
diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPowerChargeBar.cs b/OpenRA.Mods.RA/SupportPowers/SupportPowerChargeBar.cs
index 2011c21438..eb52c2d9b2 100644
--- a/OpenRA.Mods.RA/SupportPowers/SupportPowerChargeBar.cs
+++ b/OpenRA.Mods.RA/SupportPowers/SupportPowerChargeBar.cs
@@ -12,7 +12,7 @@ using System.Drawing;
using System.Linq;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Display the time remaining until the super weapon attached to the actor is ready to the player and his allies.")]
class SupportPowerChargeBarInfo : ITraitInfo
diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs
index e12c3ef08a..2e5acb3fa0 100644
--- a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs
+++ b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs
@@ -15,7 +15,7 @@ using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Attach this to the player actor.")]
public class SupportPowerManagerInfo : ITraitInfo, Requires, Requires
diff --git a/OpenRA.Mods.RA/TakeCover.cs b/OpenRA.Mods.RA/TakeCover.cs
index 8a92c09981..3a3a2d54e4 100644
--- a/OpenRA.Mods.RA/TakeCover.cs
+++ b/OpenRA.Mods.RA/TakeCover.cs
@@ -11,7 +11,7 @@
using OpenRA.GameRules;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Make the unit go prone when under attack, in an attempt to reduce damage.")]
public class TakeCoverInfo : TurretedInfo
diff --git a/OpenRA.Mods.RA/ThrowsParticle.cs b/OpenRA.Mods.RA/ThrowsParticle.cs
index 375e29ba66..c2b958d143 100644
--- a/OpenRA.Mods.RA/ThrowsParticle.cs
+++ b/OpenRA.Mods.RA/ThrowsParticle.cs
@@ -12,7 +12,7 @@ using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
class ThrowsParticleInfo : ITraitInfo, Requires, Requires
{
diff --git a/OpenRA.Mods.RA/Traits/Air/Aircraft.cs b/OpenRA.Mods.RA/Traits/Air/Aircraft.cs
index b1b583a94c..6807bc10eb 100644
--- a/OpenRA.Mods.RA/Traits/Air/Aircraft.cs
+++ b/OpenRA.Mods.RA/Traits/Air/Aircraft.cs
@@ -14,9 +14,7 @@ using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Primitives;
using OpenRA.Traits;
diff --git a/OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs b/OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs
index fecf4a4083..e011277438 100644
--- a/OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs
+++ b/OpenRA.Mods.RA/Traits/Air/ReturnOnIdle.cs
@@ -10,9 +10,8 @@
using System.Linq;
using OpenRA.Mods.Common.Activities;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Traits
diff --git a/OpenRA.Mods.RA/Traits/Buildings/Bridge.cs b/OpenRA.Mods.RA/Traits/Buildings/Bridge.cs
index 1470bc0a85..7c378041ca 100644
--- a/OpenRA.Mods.RA/Traits/Buildings/Bridge.cs
+++ b/OpenRA.Mods.RA/Traits/Buildings/Bridge.cs
@@ -14,7 +14,7 @@ using System.Linq;
using OpenRA.Effects;
using OpenRA.GameRules;
using OpenRA.Graphics;
-using OpenRA.Mods.RA.Buildings;
+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..c8749909c3 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
@@ -32,7 +33,7 @@ namespace OpenRA.Mods.RA.Traits
public BridgeHut(ActorInitializer init)
{
- Bridge = init.Get().value.Trait();
+ Bridge = init.Get().ActorValue.Trait();
Bridge.AddHut(this);
FirstBridge = Bridge.Enumerate(0, true).Last();
}
diff --git a/OpenRA.Mods.RA/Buildings/ClonesProducedUnits.cs b/OpenRA.Mods.RA/Traits/Buildings/ClonesProducedUnits.cs
similarity index 96%
rename from OpenRA.Mods.RA/Buildings/ClonesProducedUnits.cs
rename to OpenRA.Mods.RA/Traits/Buildings/ClonesProducedUnits.cs
index 83f160f091..713e380842 100644
--- a/OpenRA.Mods.RA/Buildings/ClonesProducedUnits.cs
+++ b/OpenRA.Mods.RA/Traits/Buildings/ClonesProducedUnits.cs
@@ -10,10 +10,9 @@
using System;
using System.Linq;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Creates a free duplicate of produced units.")]
public class ClonesProducedUnitsInfo : ITraitInfo, Requires, Requires
diff --git a/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs b/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs
index dd2320d944..1fd8572c15 100644
--- a/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs
+++ b/OpenRA.Mods.RA/Traits/Buildings/OreRefinery.cs
@@ -13,8 +13,8 @@ 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.Mods.RA.Render;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.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 99%
rename from OpenRA.Mods.RA/Buildings/RepairableBuilding.cs
rename to OpenRA.Mods.RA/Traits/Buildings/RepairableBuilding.cs
index 16f5dced7e..f19dcb0403
--- a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs
+++ b/OpenRA.Mods.RA/Traits/Buildings/RepairableBuilding.cs
@@ -12,11 +12,11 @@ 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.Buildings
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Building can be repaired by the repair button.")]
public class RepairableBuildingInfo : UpgradableTraitInfo, ITraitInfo, Requires
diff --git a/OpenRA.Mods.RA/Traits/Buildings/TargetableBuilding.cs b/OpenRA.Mods.RA/Traits/Buildings/TargetableBuilding.cs
index f568aa3286..d60e3efdfe 100644
--- a/OpenRA.Mods.RA/Traits/Buildings/TargetableBuilding.cs
+++ b/OpenRA.Mods.RA/Traits/Buildings/TargetableBuilding.cs
@@ -10,7 +10,7 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Traits
diff --git a/OpenRA.Mods.RA/Traits/Crates/Crate.cs b/OpenRA.Mods.RA/Traits/Crates/Crate.cs
index 367d8724e5..a2c99f9683 100644
--- a/OpenRA.Mods.RA/Traits/Crates/Crate.cs
+++ b/OpenRA.Mods.RA/Traits/Crates/Crate.cs
@@ -11,7 +11,6 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
using OpenRA.Primitives;
using OpenRA.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/TraitsInterfaces.cs b/OpenRA.Mods.RA/TraitsInterfaces.cs
index f0942833a2..519cb4457d 100755
--- a/OpenRA.Mods.RA/TraitsInterfaces.cs
+++ b/OpenRA.Mods.RA/TraitsInterfaces.cs
@@ -9,6 +9,7 @@
#endregion
using OpenRA.Mods.RA.Activities;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
@@ -27,6 +28,5 @@ namespace OpenRA.Mods.RA
void OnDock(Actor self, Actor harv, DeliverResources dockOrder);
}
- public interface INotifyParachuteLanded { void OnLanded(); }
public interface INotifyAttack { void Attacking(Actor self, Target target, Armament a, Barrel barrel); }
}
diff --git a/OpenRA.Mods.RA/Transforms.cs b/OpenRA.Mods.RA/Transforms.cs
index 43bf190d67..873f55cb46 100644
--- a/OpenRA.Mods.RA/Transforms.cs
+++ b/OpenRA.Mods.RA/Transforms.cs
@@ -10,14 +10,12 @@
using System.Collections.Generic;
using OpenRA.Mods.Common.Activities;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Traits;
-using OpenRA.Mods.RA.Render;
-using OpenRA.Mods.RA.Buildings;
-using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.Common.Orders;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Activities;
+using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Actor becomes a specified actor type when this trait is triggered.")]
class TransformsInfo : ITraitInfo
diff --git a/OpenRA.Mods.RA/Turreted.cs b/OpenRA.Mods.RA/Turreted.cs
index 9910c7b997..99ba34d295 100755
--- a/OpenRA.Mods.RA/Turreted.cs
+++ b/OpenRA.Mods.RA/Turreted.cs
@@ -11,7 +11,7 @@
using System;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.RA.Traits
{
public class TurretedInfo : ITraitInfo, UsesInit
{
diff --git a/OpenRA.Mods.RA/UtilityCommands/ActorStatsExport.cs b/OpenRA.Mods.RA/UtilityCommands/ActorStatsExport.cs
index 0b2b36988f..7e945aa022 100644
--- a/OpenRA.Mods.RA/UtilityCommands/ActorStatsExport.cs
+++ b/OpenRA.Mods.RA/UtilityCommands/ActorStatsExport.cs
@@ -14,6 +14,7 @@ using System.Data;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.UtilityCommands
diff --git a/OpenRA.Mods.RA/Widgets/Logic/SupportPowerTooltipLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/SupportPowerTooltipLogic.cs
index 1dad90ff84..234594633c 100644
--- a/OpenRA.Mods.RA/Widgets/Logic/SupportPowerTooltipLogic.cs
+++ b/OpenRA.Mods.RA/Widgets/Logic/SupportPowerTooltipLogic.cs
@@ -9,7 +9,7 @@
#endregion
using System;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
diff --git a/OpenRA.Mods.RA/Widgets/ObserverSupportPowerIconsWidget.cs b/OpenRA.Mods.RA/Widgets/ObserverSupportPowerIconsWidget.cs
index 8e9318d36f..037a199ad9 100644
--- a/OpenRA.Mods.RA/Widgets/ObserverSupportPowerIconsWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/ObserverSupportPowerIconsWidget.cs
@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
diff --git a/OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs
index 59a05b1519..a1ac3f0e00 100644
--- a/OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/ProductionPaletteWidget.cs
@@ -14,7 +14,7 @@ using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Buildings;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Mods.RA.Orders;
using OpenRA.Network;
using OpenRA.Widgets;
diff --git a/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs b/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs
index 5ff7f3f744..cdaebc64e4 100644
--- a/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs
@@ -11,6 +11,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives;
using OpenRA.Widgets;
diff --git a/OpenRA.Mods.RA/Widgets/SupportPowersWidget.cs b/OpenRA.Mods.RA/Widgets/SupportPowersWidget.cs
index e3677e8b87..e482152ad0 100644
--- a/OpenRA.Mods.RA/Widgets/SupportPowersWidget.cs
+++ b/OpenRA.Mods.RA/Widgets/SupportPowersWidget.cs
@@ -13,7 +13,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets
diff --git a/OpenRA.Mods.RA/WithRangeCircle.cs b/OpenRA.Mods.RA/WithRangeCircle.cs
index c6f885f26a..7b7e5e8148 100644
--- a/OpenRA.Mods.RA/WithRangeCircle.cs
+++ b/OpenRA.Mods.RA/WithRangeCircle.cs
@@ -12,9 +12,10 @@ 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
+namespace OpenRA.Mods.RA.Traits
{
[Desc("Renders an arbitrary circle when selected or placing a structure")]
class WithRangeCircleInfo : ITraitInfo, IPlaceBuildingDecoration
diff --git a/OpenRA.Mods.TS/Traits/Render/WithVoxelBarrel.cs b/OpenRA.Mods.TS/Traits/Render/WithVoxelBarrel.cs
index 91eff71783..18b70582ff 100644
--- a/OpenRA.Mods.TS/Traits/Render/WithVoxelBarrel.cs
+++ b/OpenRA.Mods.TS/Traits/Render/WithVoxelBarrel.cs
@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits
diff --git a/OpenRA.Mods.TS/Traits/Render/WithVoxelTurret.cs b/OpenRA.Mods.TS/Traits/Render/WithVoxelTurret.cs
index 51125515ba..8856039d3f 100644
--- a/OpenRA.Mods.TS/Traits/Render/WithVoxelTurret.cs
+++ b/OpenRA.Mods.TS/Traits/Render/WithVoxelTurret.cs
@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
-using OpenRA.Mods.RA;
+using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits