diff --git a/OpenRa.Game/Game.cs b/OpenRa.Game/Game.cs
index 62338fc786..430b755e2b 100644
--- a/OpenRa.Game/Game.cs
+++ b/OpenRa.Game/Game.cs
@@ -3,13 +3,13 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Net.Sockets;
+using IjwFramework.Types;
using OpenRa.FileFormats;
using OpenRa.GameRules;
using OpenRa.Graphics;
using OpenRa.Orders;
using OpenRa.Support;
using OpenRa.Traits;
-using IjwFramework.Types;
namespace OpenRa
{
@@ -20,7 +20,7 @@ namespace OpenRa
public static World world;
internal static Viewport viewport;
public static PathFinder PathFinder;
- internal static WorldRenderer worldRenderer;
+ public static WorldRenderer worldRenderer;
public static Controller controller;
internal static Chrome chrome;
public static UserSettings Settings;
diff --git a/OpenRa.Game/Graphics/WorldRenderer.cs b/OpenRa.Game/Graphics/WorldRenderer.cs
index f94db628e4..0dd480911c 100644
--- a/OpenRa.Game/Graphics/WorldRenderer.cs
+++ b/OpenRa.Game/Graphics/WorldRenderer.cs
@@ -1,26 +1,21 @@
-using System.Drawing;
-using System;
-using System.Linq;
-using System.Windows.Forms;
-using IjwFramework.Types;
using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
using OpenRa.Traits;
-using OpenRa.Support;
-using OpenRa.Effects;
namespace OpenRa.Graphics
{
- class WorldRenderer
+ public class WorldRenderer
{
- public readonly TerrainRenderer terrainRenderer;
- public readonly SpriteRenderer spriteRenderer;
- public readonly LineRenderer lineRenderer;
- public readonly UiOverlay uiOverlay;
- public readonly Renderer renderer;
+ internal readonly TerrainRenderer terrainRenderer;
+ internal readonly SpriteRenderer spriteRenderer;
+ internal readonly LineRenderer lineRenderer;
+ internal readonly UiOverlay uiOverlay;
+ internal readonly Renderer renderer;
public static bool ShowUnitPaths = false;
- public WorldRenderer(Renderer renderer)
+ internal WorldRenderer(Renderer renderer)
{
terrainRenderer = new TerrainRenderer(renderer, Rules.Map);
diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj
index b54e0211b0..2129a0b738 100644
--- a/OpenRa.Game/OpenRa.Game.csproj
+++ b/OpenRa.Game/OpenRa.Game.csproj
@@ -103,7 +103,6 @@
-
@@ -224,7 +223,6 @@
-
diff --git a/OpenRa.Game/Sound.cs b/OpenRa.Game/Sound.cs
index e68b606f5b..25d3cf0e0f 100644
--- a/OpenRa.Game/Sound.cs
+++ b/OpenRa.Game/Sound.cs
@@ -1,12 +1,11 @@
using IjwFramework.Collections;
using IrrKlang;
using OpenRa.FileFormats;
-using OpenRa.GameRules;
using OpenRa.Traits;
namespace OpenRa
{
- static class Sound
+ public static class Sound
{
static ISoundEngine soundEngine;
static Cache sounds;
diff --git a/OpenRa.Game/Sync.cs b/OpenRa.Game/Sync.cs
index e6842eb392..57fb3815f7 100755
--- a/OpenRa.Game/Sync.cs
+++ b/OpenRa.Game/Sync.cs
@@ -7,7 +7,7 @@ using OpenRa.FileFormats;
namespace OpenRa
{
- class SyncAttribute : Attribute { }
+ public class SyncAttribute : Attribute { }
static class Sync
{
diff --git a/OpenRa.Game/Traits/Activities/Teleport.cs b/OpenRa.Game/Traits/Activities/Teleport.cs
index 05a9369e7e..33df5dbf2c 100644
--- a/OpenRa.Game/Traits/Activities/Teleport.cs
+++ b/OpenRa.Game/Traits/Activities/Teleport.cs
@@ -1,12 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using OpenRa.GameRules;
-
+
namespace OpenRa.Traits.Activities
{
- class Teleport : IActivity
+ public class Teleport : IActivity
{
public IActivity NextActivity { get; set; }
diff --git a/OpenRa.Game/Traits/ChronoshiftPaletteEffect.cs b/OpenRa.Game/Traits/ChronoshiftPaletteEffect.cs
index 1037581c57..cb452e958f 100644
--- a/OpenRa.Game/Traits/ChronoshiftPaletteEffect.cs
+++ b/OpenRa.Game/Traits/ChronoshiftPaletteEffect.cs
@@ -5,7 +5,7 @@ namespace OpenRa.Traits
{
class ChronoshiftPaletteEffectInfo : StatelessTraitInfo { }
- class ChronoshiftPaletteEffect : IPaletteModifier, ITick
+ public class ChronoshiftPaletteEffect : IPaletteModifier, ITick
{
const int chronoEffectLength = 20;
int remainingFrames;
diff --git a/OpenRa.Game/Traits/DemoTruck.cs b/OpenRa.Game/Traits/DemoTruck.cs
deleted file mode 100644
index 8845e5bb54..0000000000
--- a/OpenRa.Game/Traits/DemoTruck.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using OpenRa.Effects;
-using OpenRa.Traits;
-using System.Collections.Generic;
-using System.Linq;
-using OpenRa.Orders;
-
-namespace OpenRa.Traits
-{
-
-}
diff --git a/OpenRa.Game/Traits/ChronoshiftDeploy.cs b/OpenRa.Mods.Aftermath/ChronoshiftDeploy.cs
similarity index 77%
rename from OpenRa.Game/Traits/ChronoshiftDeploy.cs
rename to OpenRa.Mods.Aftermath/ChronoshiftDeploy.cs
index 50794e1d57..cec1075f5e 100644
--- a/OpenRa.Game/Traits/ChronoshiftDeploy.cs
+++ b/OpenRa.Mods.Aftermath/ChronoshiftDeploy.cs
@@ -1,15 +1,17 @@
using System.Collections.Generic;
using System.Linq;
-using OpenRa.Orders;
+using OpenRa.Mods.Aftermath.Orders;
+using OpenRa.Traits;
+using OpenRa.Traits.Activities;
-namespace OpenRa.Traits
+namespace OpenRa.Mods.Aftermath
{
class ChronoshiftDeployInfo : ITraitInfo
{
public object Create(Actor self) { return new ChronoshiftDeploy(self); }
}
- class ChronoshiftDeploy : IIssueOrder, IResolveOrder, ISpeedModifier, ITick, IPips
+ class ChronoshiftDeploy : IIssueOrder, IResolveOrder, ITick, IPips
{
// Recharge logic
[Sync]
@@ -17,7 +19,7 @@ namespace OpenRa.Traits
readonly int chargeLength = (int)(Rules.Aftermath.ChronoTankDuration * 60 * 25); // How long between shifts?
public ChronoshiftDeploy(Actor self) { }
-
+
public void Tick(Actor self)
{
if (chargeTick > 0)
@@ -36,7 +38,7 @@ namespace OpenRa.Traits
{
if (order.OrderString == "Deploy")
{
- Game.controller.orderGenerator = new ChronoshiftSelfDestinationOrderGenerator(self);
+ Game.controller.orderGenerator = new SetChronoTankDestination(self);
return;
}
@@ -46,10 +48,10 @@ namespace OpenRa.Traits
// Cannot chronoshift into unexplored location
if (!self.Owner.Shroud.IsExplored(order.TargetLocation))
return;
-
+
Game.controller.CancelInputMode();
self.CancelActivity();
- self.QueueActivity(new Activities.Teleport(order.TargetLocation));
+ self.QueueActivity(new Teleport(order.TargetLocation));
Sound.Play("chrotnk1.aud");
chargeTick = chargeLength;
@@ -57,13 +59,7 @@ namespace OpenRa.Traits
a.traits.Get().DoChronoshift();
}
}
-
- public float GetSpeedModifier()
- {
- // ARGH! You must not do this, it will desync!
- return (Game.controller.orderGenerator is ChronoshiftDestinationOrderGenerator) ? 0f : 1f;
- }
-
+
// Display 5 pips indicating the current charge status
public IEnumerable GetPips(Actor self)
{
@@ -75,7 +71,7 @@ namespace OpenRa.Traits
yield return PipType.Transparent;
continue;
}
-
+
switch (i)
{
case 0:
diff --git a/OpenRa.Mods.Aftermath/OpenRa.Mods.Aftermath.csproj b/OpenRa.Mods.Aftermath/OpenRa.Mods.Aftermath.csproj
index 6805a88558..8bd416ae04 100644
--- a/OpenRa.Mods.Aftermath/OpenRa.Mods.Aftermath.csproj
+++ b/OpenRa.Mods.Aftermath/OpenRa.Mods.Aftermath.csproj
@@ -35,6 +35,7 @@
3.5
+
3.5
@@ -45,6 +46,8 @@
+
+
diff --git a/OpenRa.Game/Orders/ChronoshiftSelfDestinationOrderGenerator.cs b/OpenRa.Mods.Aftermath/Orders/SetChronoTankDestination.cs
similarity index 72%
rename from OpenRa.Game/Orders/ChronoshiftSelfDestinationOrderGenerator.cs
rename to OpenRa.Mods.Aftermath/Orders/SetChronoTankDestination.cs
index f436e7609f..3770294dd0 100644
--- a/OpenRa.Game/Orders/ChronoshiftSelfDestinationOrderGenerator.cs
+++ b/OpenRa.Mods.Aftermath/Orders/SetChronoTankDestination.cs
@@ -1,17 +1,14 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Collections.Generic;
using System.Drawing;
using OpenRa.Traits;
-namespace OpenRa.Orders
+namespace OpenRa.Mods.Aftermath.Orders
{
- class ChronoshiftSelfDestinationOrderGenerator : IOrderGenerator
+ class SetChronoTankDestination : IOrderGenerator
{
public readonly Actor self;
- public ChronoshiftSelfDestinationOrderGenerator(Actor self)
+ public SetChronoTankDestination(Actor self)
{
this.self = self;
}
diff --git a/OpenRa.Mods.RA/OpenRa.Mods.RA.csproj b/OpenRa.Mods.RA/OpenRa.Mods.RA.csproj
index 88746d0e66..0f1cda0826 100644
--- a/OpenRa.Mods.RA/OpenRa.Mods.RA.csproj
+++ b/OpenRa.Mods.RA/OpenRa.Mods.RA.csproj
@@ -35,6 +35,7 @@
3.5
+
3.5