diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
index 8f03a6b05a..e155d1e178 100644
--- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
+++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
@@ -75,7 +75,6 @@
-
diff --git a/OpenRA.Mods.RA/Activities/DonateSupplies.cs b/OpenRA.Mods.Common/Activities/DonateSupplies.cs
similarity index 93%
rename from OpenRA.Mods.RA/Activities/DonateSupplies.cs
rename to OpenRA.Mods.Common/Activities/DonateSupplies.cs
index dbfa9a2d4d..6231480d53 100644
--- a/OpenRA.Mods.RA/Activities/DonateSupplies.cs
+++ b/OpenRA.Mods.Common/Activities/DonateSupplies.cs
@@ -8,11 +8,10 @@
*/
#endregion
-using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Effects;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Activities
+namespace OpenRA.Mods.Common.Activities
{
class DonateSupplies : Enter
{
diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
index 4010600547..6481171139 100644
--- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
+++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj
@@ -95,6 +95,7 @@
+
@@ -200,24 +201,27 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
-
+
+
+
+
+
@@ -235,6 +239,7 @@
+
@@ -271,6 +276,7 @@
+
@@ -285,32 +291,33 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -368,18 +375,18 @@
-
-
-
-
-
+
+
+
+
+
@@ -396,6 +403,9 @@
+
+
+
@@ -411,6 +421,7 @@
+
@@ -421,6 +432,7 @@
+
@@ -462,6 +474,8 @@
+
+
@@ -476,6 +490,7 @@
+
@@ -572,9 +587,6 @@
-
-
-
diff --git a/OpenRA.Mods.RA/Scripting/Properties/HarvesterProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/HarvesterProperties.cs
similarity index 95%
rename from OpenRA.Mods.RA/Scripting/Properties/HarvesterProperties.cs
rename to OpenRA.Mods.Common/Scripting/Properties/HarvesterProperties.cs
index 77bc77fd1a..ebc6a48084 100644
--- a/OpenRA.Mods.RA/Scripting/Properties/HarvesterProperties.cs
+++ b/OpenRA.Mods.Common/Scripting/Properties/HarvesterProperties.cs
@@ -12,7 +12,7 @@ using OpenRA.Mods.Common.Traits;
using OpenRA.Scripting;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Scripting
+namespace OpenRA.Mods.Common.Scripting
{
[ScriptPropertyGroup("Harvester")]
public class HarvesterProperties : ScriptActorProperties, Requires
diff --git a/OpenRA.Mods.RA/Scripting/Properties/TransportProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/TransportProperties.cs
similarity index 51%
rename from OpenRA.Mods.RA/Scripting/Properties/TransportProperties.cs
rename to OpenRA.Mods.Common/Scripting/Properties/TransportProperties.cs
index 069e1c7fac..2950d30bdd 100644
--- a/OpenRA.Mods.RA/Scripting/Properties/TransportProperties.cs
+++ b/OpenRA.Mods.Common/Scripting/Properties/TransportProperties.cs
@@ -11,11 +11,10 @@
using System.Linq;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Scripting;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Scripting
+namespace OpenRA.Mods.Common.Scripting
{
[ScriptPropertyGroup("Transports")]
public class TransportProperties : ScriptActorProperties, Requires
@@ -44,44 +43,4 @@ namespace OpenRA.Mods.RA.Scripting
Self.QueueActivity(new UnloadCargo(Self, true));
}
}
-
- [ScriptPropertyGroup("Transports")]
- public class ParadropPowers : ScriptActorProperties, Requires, Requires
- {
- readonly ParaDrop paradrop;
-
- public ParadropPowers(ScriptContext context, Actor self)
- : base(context, self)
- {
- paradrop = self.Trait();
- }
-
- [ScriptActorPropertyActivity]
- [Desc("Command transport to paradrop passengers near the target cell.")]
- public void Paradrop(CPos cell)
- {
- paradrop.SetLZ(cell, true);
- Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell)));
- Self.QueueActivity(new FlyOffMap());
- Self.QueueActivity(new RemoveSelf());
- }
- }
-
- [ScriptGlobal("Air Support Powers")]
- public class ParatroopersProperties : ScriptActorProperties, Requires
- {
- readonly ParatroopersPower pp;
-
- public ParatroopersProperties(ScriptContext context, Actor self)
- : base(context, self)
- {
- pp = self.TraitsImplementing().First();
- }
-
- [Desc("Activate the actor's Paratroopers Power. Returns the dropped units.")]
- public Actor[] SendParatroopers(WPos target, bool randomize = true, int facing = 0)
- {
- return pp.SendParatroopers(Self, target, randomize, facing);
- }
- }
}
\ No newline at end of file
diff --git a/OpenRA.Mods.RA/Traits/AcceptsSupplies.cs b/OpenRA.Mods.Common/Traits/AcceptsSupplies.cs
similarity index 84%
rename from OpenRA.Mods.RA/Traits/AcceptsSupplies.cs
rename to OpenRA.Mods.Common/Traits/AcceptsSupplies.cs
index 9e9cf3959a..8b5c4af49f 100644
--- a/OpenRA.Mods.RA/Traits/AcceptsSupplies.cs
+++ b/OpenRA.Mods.Common/Traits/AcceptsSupplies.cs
@@ -10,9 +10,9 @@
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Traits
+namespace OpenRA.Mods.Common.Traits
{
- [Desc("Tag trait for SupplyTruck: actors.")]
+ [Desc("Tag trait for `SupplyTruck` actors.")]
class AcceptsSuppliesInfo : TraitInfo { }
class AcceptsSupplies { }
diff --git a/OpenRA.Mods.RA/Traits/Attack/AttackGarrisoned.cs b/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs
similarity index 98%
rename from OpenRA.Mods.RA/Traits/Attack/AttackGarrisoned.cs
rename to OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs
index 3387c17dac..158461f851 100644
--- a/OpenRA.Mods.RA/Traits/Attack/AttackGarrisoned.cs
+++ b/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs
@@ -13,10 +13,9 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.Activities;
using OpenRA.Graphics;
-using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Traits
+namespace OpenRA.Mods.Common.Traits
{
public class FirePort
{
diff --git a/OpenRA.Mods.RA/CombatDebugOverlay.cs b/OpenRA.Mods.Common/Traits/CombatDebugOverlay.cs
similarity index 95%
rename from OpenRA.Mods.RA/CombatDebugOverlay.cs
rename to OpenRA.Mods.Common/Traits/CombatDebugOverlay.cs
index 55cb21c298..4a0886cb49 100644
--- a/OpenRA.Mods.RA/CombatDebugOverlay.cs
+++ b/OpenRA.Mods.Common/Traits/CombatDebugOverlay.cs
@@ -12,12 +12,9 @@ using System;
using System.Drawing;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Effects;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Effects;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA
+namespace OpenRA.Mods.Common.Traits
{
[Desc("Displays fireports, muzzle offsets, and hit areas in developer mode.")]
public class CombatDebugOverlayInfo : ITraitInfo
@@ -27,10 +24,11 @@ namespace OpenRA.Mods.RA
public class CombatDebugOverlay : IPostRender, INotifyDamage
{
+ readonly DeveloperMode devMode;
+
Lazy attack;
Lazy coords;
Lazy health;
- DeveloperMode devMode;
public CombatDebugOverlay(Actor self)
{
diff --git a/OpenRA.Mods.RA/Traits/EjectOnDeath.cs b/OpenRA.Mods.Common/Traits/EjectOnDeath.cs
similarity index 95%
rename from OpenRA.Mods.RA/Traits/EjectOnDeath.cs
rename to OpenRA.Mods.Common/Traits/EjectOnDeath.cs
index 42b797a9ed..e81e72979c 100644
--- a/OpenRA.Mods.RA/Traits/EjectOnDeath.cs
+++ b/OpenRA.Mods.Common/Traits/EjectOnDeath.cs
@@ -9,12 +9,10 @@
#endregion
using OpenRA.Mods.Common.Effects;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Effects;
using OpenRA.Primitives;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Traits
+namespace OpenRA.Mods.Common.Traits
{
[Desc("Eject a ground soldier or a paratrooper while in the air.")]
public class EjectOnDeathInfo : TraitInfo
diff --git a/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs b/OpenRA.Mods.Common/Traits/Render/WithBuildingPlacedOverlay.cs
similarity index 96%
rename from OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs
rename to OpenRA.Mods.Common/Traits/Render/WithBuildingPlacedOverlay.cs
index 3b1a90aa6b..e7e116f7f1 100644
--- a/OpenRA.Mods.D2k/Traits/Render/WithBuildingPlacedOverlay.cs
+++ b/OpenRA.Mods.Common/Traits/Render/WithBuildingPlacedOverlay.cs
@@ -9,11 +9,9 @@
#endregion
using OpenRA.Graphics;
-using OpenRA.Mods.Common.Traits;
-using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.D2k.Traits
+namespace OpenRA.Mods.Common.Traits
{
[Desc("Rendered when the actor constructed a building.")]
public class WithBuildingPlacedOverlayInfo : ITraitInfo, Requires, Requires
diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithFire.cs b/OpenRA.Mods.Common/Traits/Render/WithFire.cs
similarity index 94%
rename from OpenRA.Mods.Cnc/Traits/Render/WithFire.cs
rename to OpenRA.Mods.Common/Traits/Render/WithFire.cs
index 4167ecd2f4..170566355e 100644
--- a/OpenRA.Mods.Cnc/Traits/Render/WithFire.cs
+++ b/OpenRA.Mods.Common/Traits/Render/WithFire.cs
@@ -9,10 +9,9 @@
#endregion
using OpenRA.Graphics;
-using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.Cnc.Traits
+namespace OpenRA.Mods.Common.Traits
{
[Desc("Renders a flame sprite on top of the actor.")]
class WithFireInfo : ITraitInfo, Requires
diff --git a/OpenRA.Mods.D2k/Traits/Render/WithProductionOverlay.cs b/OpenRA.Mods.Common/Traits/Render/WithProductionOverlay.cs
similarity index 96%
rename from OpenRA.Mods.D2k/Traits/Render/WithProductionOverlay.cs
rename to OpenRA.Mods.Common/Traits/Render/WithProductionOverlay.cs
index 45b2c7d278..ad5148898a 100644
--- a/OpenRA.Mods.D2k/Traits/Render/WithProductionOverlay.cs
+++ b/OpenRA.Mods.Common/Traits/Render/WithProductionOverlay.cs
@@ -11,12 +11,9 @@
using System;
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.D2k.Traits
+namespace OpenRA.Mods.Common.Traits
{
[Desc("Renders an animation when the Production trait of the actor is activated.",
"Works both with per player ClassicProductionQueue and per building ProductionQueue, but needs any of these.")]
diff --git a/OpenRA.Mods.RA/Traits/SupplyTruck.cs b/OpenRA.Mods.Common/Traits/SupplyTruck.cs
similarity index 90%
rename from OpenRA.Mods.RA/Traits/SupplyTruck.cs
rename to OpenRA.Mods.Common/Traits/SupplyTruck.cs
index 2da4e0c0ee..acfad395d5 100644
--- a/OpenRA.Mods.RA/Traits/SupplyTruck.cs
+++ b/OpenRA.Mods.Common/Traits/SupplyTruck.cs
@@ -10,24 +10,23 @@
using System.Collections.Generic;
using System.Drawing;
-using OpenRA.Mods.Common;
+using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Orders;
-using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Traits
+namespace OpenRA.Mods.Common.Traits
{
- [Desc("Donate money to building if it has the AcceptSupplies: trait.")]
+ [Desc("Donate money to actors with the `AcceptSupplies` trait.")]
class SupplyTruckInfo : ITraitInfo
{
- [Desc("The amount of cash the owner of the building recieves.")]
+ [Desc("The amount of cash the owner recieves.")]
public readonly int Payload = 500;
public object Create(ActorInitializer init) { return new SupplyTruck(this); }
}
class SupplyTruck : IIssueOrder, IResolveOrder, IOrderVoice
{
- SupplyTruckInfo info;
+ readonly SupplyTruckInfo info;
public SupplyTruck(SupplyTruckInfo info)
{
diff --git a/OpenRA.Mods.RA/Traits/TransformOnPassenger.cs b/OpenRA.Mods.Common/Traits/TransformOnPassenger.cs
similarity index 94%
rename from OpenRA.Mods.RA/Traits/TransformOnPassenger.cs
rename to OpenRA.Mods.Common/Traits/TransformOnPassenger.cs
index 10ccb4a24c..3c04a97839 100644
--- a/OpenRA.Mods.RA/Traits/TransformOnPassenger.cs
+++ b/OpenRA.Mods.Common/Traits/TransformOnPassenger.cs
@@ -10,10 +10,9 @@
using System.Linq;
using OpenRA.Mods.Common.Activities;
-using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
-namespace OpenRA.Mods.RA.Traits
+namespace OpenRA.Mods.Common.Traits
{
public class TransformOnPassengerInfo : ITraitInfo
{
@@ -28,7 +27,7 @@ namespace OpenRA.Mods.RA.Traits
public class TransformOnPassenger : INotifyPassengerEntered, INotifyPassengerExited
{
- TransformOnPassengerInfo info;
+ readonly TransformOnPassengerInfo info;
public TransformOnPassenger(TransformOnPassengerInfo info) { this.info = info; }
diff --git a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
index e60412c267..6d4e14284f 100644
--- a/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
+++ b/OpenRA.Mods.D2k/OpenRA.Mods.D2k.csproj
@@ -76,11 +76,9 @@
-
-
diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
index 17d50f86dc..ed842b5d50 100644
--- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
+++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
@@ -65,54 +65,47 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenRA.Mods.RA/Scripting/Properties/ParadropProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/ParadropProperties.cs
new file mode 100644
index 0000000000..a15add80a3
--- /dev/null
+++ b/OpenRA.Mods.RA/Scripting/Properties/ParadropProperties.cs
@@ -0,0 +1,41 @@
+#region Copyright & License Information
+/*
+ * Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
+ * This file is part of OpenRA, which is free software. It is made
+ * available to you under the terms of the GNU General Public License
+ * as published by the Free Software Foundation. For more information,
+ * see COPYING.
+ */
+#endregion
+
+using System.Linq;
+using OpenRA.Mods.Common.Activities;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
+using OpenRA.Scripting;
+using OpenRA.Traits;
+
+namespace OpenRA.Mods.RA.Scripting
+{
+ [ScriptPropertyGroup("Paradrop")]
+ public class ParadropProperties : ScriptActorProperties, Requires, Requires
+ {
+ readonly ParaDrop paradrop;
+
+ public ParadropProperties(ScriptContext context, Actor self)
+ : base(context, self)
+ {
+ paradrop = self.Trait();
+ }
+
+ [ScriptActorPropertyActivity]
+ [Desc("Command transport to paradrop passengers near the target cell.")]
+ public void Paradrop(CPos cell)
+ {
+ paradrop.SetLZ(cell, true);
+ Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell)));
+ Self.QueueActivity(new FlyOffMap());
+ Self.QueueActivity(new RemoveSelf());
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenRA.Mods.RA/Scripting/Properties/ParatroopersProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/ParatroopersProperties.cs
new file mode 100644
index 0000000000..79c62f8d1a
--- /dev/null
+++ b/OpenRA.Mods.RA/Scripting/Properties/ParatroopersProperties.cs
@@ -0,0 +1,37 @@
+#region Copyright & License Information
+/*
+ * Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
+ * This file is part of OpenRA, which is free software. It is made
+ * available to you under the terms of the GNU General Public License
+ * as published by the Free Software Foundation. For more information,
+ * see COPYING.
+ */
+#endregion
+
+using System.Linq;
+using OpenRA.Mods.Common.Activities;
+using OpenRA.Mods.Common.Traits;
+using OpenRA.Mods.RA.Traits;
+using OpenRA.Scripting;
+using OpenRA.Traits;
+
+namespace OpenRA.Mods.RA.Scripting
+{
+ [ScriptPropertyGroup("Paratroopers")]
+ public class ParatroopersProperties : ScriptActorProperties, Requires
+ {
+ readonly ParatroopersPower pp;
+
+ public ParatroopersProperties(ScriptContext context, Actor self)
+ : base(context, self)
+ {
+ pp = self.TraitsImplementing().First();
+ }
+
+ [Desc("Activate the actor's Paratroopers Power. Returns the dropped units.")]
+ public Actor[] SendParatroopers(WPos target, bool randomize = true, int facing = 0)
+ {
+ return pp.SendParatroopers(Self, target, randomize, facing);
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenRA.Mods.RA/Traits/LeavesHusk.cs b/OpenRA.Mods.RA/Traits/LeavesHusk.cs
index b71e4c3c1d..c5e0ab1e4b 100644
--- a/OpenRA.Mods.RA/Traits/LeavesHusk.cs
+++ b/OpenRA.Mods.RA/Traits/LeavesHusk.cs
@@ -71,7 +71,7 @@ namespace OpenRA.Mods.RA.Traits
if (turreted != null)
td.Add(new TurretFacingInit(turreted.TurretFacing));
- var chronoshiftable = self.TraitOrDefault();
+ var chronoshiftable = self.TraitOrDefault(); // TODO: untie this and move to Mods.Common
if (chronoshiftable != null && chronoshiftable.ReturnTicks > 0)
{
td.Add(new ChronoshiftOriginInit(chronoshiftable.Origin));
diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml
index 0cfff7afb0..7c885821ee 100644
--- a/mods/cnc/mod.yaml
+++ b/mods/cnc/mod.yaml
@@ -86,7 +86,6 @@ Assemblies:
./mods/common/OpenRA.Mods.Common.dll
./mods/ra/OpenRA.Mods.RA.dll
./mods/cnc/OpenRA.Mods.Cnc.dll
- ./mods/d2k/OpenRA.Mods.D2k.dll
ChromeLayout:
./mods/cnc/chrome/install.yaml
diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml
index 25680a7853..8690ce8638 100644
--- a/mods/ra/mod.yaml
+++ b/mods/ra/mod.yaml
@@ -74,7 +74,6 @@ Assemblies:
./mods/common/OpenRA.Mods.Common.dll
./mods/ra/OpenRA.Mods.RA.dll
./mods/cnc/OpenRA.Mods.Cnc.dll
- ./mods/d2k/OpenRA.Mods.D2k.dll
ChromeLayout:
./mods/ra/chrome/install.yaml
diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml
index fadf21d7a0..c95776ef8b 100644
--- a/mods/ts/mod.yaml
+++ b/mods/ts/mod.yaml
@@ -103,7 +103,6 @@ Chrome:
Assemblies:
./mods/common/OpenRA.Mods.Common.dll
./mods/ra/OpenRA.Mods.RA.dll
- ./mods/d2k/OpenRA.Mods.D2k.dll
./mods/cnc/OpenRA.Mods.Cnc.dll
./mods/ts/OpenRA.Mods.TS.dll