diff --git a/OpenRa.Game/Actor.cs b/OpenRa.Game/Actor.cs index d95d7b2bd2..47acc2a72d 100755 --- a/OpenRa.Game/Actor.cs +++ b/OpenRa.Game/Actor.cs @@ -2,14 +2,14 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; -using OpenRa.Game.Traits.Activities; +using OpenRa.GameRules; +using OpenRa.Traits; +using OpenRa.Traits.Activities; using OpenRa.FileFormats; -namespace OpenRa.Game +namespace OpenRa { - class Actor + public class Actor { [Sync] public readonly TypeDictionary traits = new TypeDictionary(); diff --git a/OpenRa.Game/BuildingInfluenceMap.cs b/OpenRa.Game/BuildingInfluenceMap.cs index 4d8f7bfb54..c750eb1697 100644 --- a/OpenRa.Game/BuildingInfluenceMap.cs +++ b/OpenRa.Game/BuildingInfluenceMap.cs @@ -1,9 +1,9 @@ -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { - class BuildingInfluenceMap + public class BuildingInfluenceMap { bool[,] blocked = new bool[128, 128]; Actor[,] influence = new Actor[128, 128]; diff --git a/OpenRa.Game/Chat.cs b/OpenRa.Game/Chat.cs index eaafc78f00..1f66c33e46 100644 --- a/OpenRa.Game/Chat.cs +++ b/OpenRa.Game/Chat.cs @@ -2,7 +2,7 @@ using System.Drawing; using OpenRa.FileFormats; -namespace OpenRa.Game +namespace OpenRa { class Chat { diff --git a/OpenRa.Game/Chrome.cs b/OpenRa.Game/Chrome.cs index 0ffc71272b..f614cbcd71 100644 --- a/OpenRa.Game/Chrome.cs +++ b/OpenRa.Game/Chrome.cs @@ -4,12 +4,12 @@ using System.Drawing; using System.Linq; using IjwFramework.Types; using OpenRa.FileFormats; -using OpenRa.Game.Graphics; -using OpenRa.Game.Orders; -using OpenRa.Game.Support; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Orders; +using OpenRa.Support; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { class Chrome : IHandleInput { @@ -126,7 +126,7 @@ namespace OpenRa.Game tabImageNames = groups.Select( (g, i) => Pair.New(g, - OpenRa.Game.Graphics.Util.MakeArray(3, + OpenRa.Graphics.Util.MakeArray(3, n => i.ToString()))) .ToDictionary(a => a.First, a => a.Second); diff --git a/OpenRa.Game/Combat.cs b/OpenRa.Game/Combat.cs index 7cd6c5cfa8..ed50bda6ee 100644 --- a/OpenRa.Game/Combat.cs +++ b/OpenRa.Game/Combat.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.GameRules; -using OpenRa.Game.Effects; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Effects; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { static class Combat /* some utility bits that are shared between various things */ { diff --git a/OpenRa.Game/Controller.cs b/OpenRa.Game/Controller.cs index 2d677d6de9..2c31b39f91 100644 --- a/OpenRa.Game/Controller.cs +++ b/OpenRa.Game/Controller.cs @@ -3,14 +3,14 @@ using System.Collections.Generic; using System.Linq; using IjwFramework.Collections; using IjwFramework.Types; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Orders; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Orders; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { - class Controller : IHandleInput + public class Controller : IHandleInput { public IOrderGenerator orderGenerator; diff --git a/OpenRa.Game/Cursor.cs b/OpenRa.Game/Cursor.cs index 89b5f12d94..2996b13a7f 100644 --- a/OpenRa.Game/Cursor.cs +++ b/OpenRa.Game/Cursor.cs @@ -1,8 +1,8 @@ -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game +namespace OpenRa { - class Cursor + public class Cursor { CursorSequence sequence; Cursor(string cursor) diff --git a/OpenRa.Game/Effects/Bullet.cs b/OpenRa.Game/Effects/Bullet.cs index 15b6e80fc8..c90c42181b 100755 --- a/OpenRa.Game/Effects/Bullet.cs +++ b/OpenRa.Game/Effects/Bullet.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class Bullet : IEffect { diff --git a/OpenRa.Game/Effects/Corpse.cs b/OpenRa.Game/Effects/Corpse.cs index cfa253ccdf..bae41ef8a0 100755 --- a/OpenRa.Game/Effects/Corpse.cs +++ b/OpenRa.Game/Effects/Corpse.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using OpenRa.FileFormats; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class Corpse : IEffect { diff --git a/OpenRa.Game/Effects/DelayedAction.cs b/OpenRa.Game/Effects/DelayedAction.cs index 01004f24a7..97599f4d7a 100755 --- a/OpenRa.Game/Effects/DelayedAction.cs +++ b/OpenRa.Game/Effects/DelayedAction.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Traits; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class DelayedAction : IEffect { diff --git a/OpenRa.Game/Effects/Explosion.cs b/OpenRa.Game/Effects/Explosion.cs index 5da0021aeb..fc1509c6de 100755 --- a/OpenRa.Game/Effects/Explosion.cs +++ b/OpenRa.Game/Effects/Explosion.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class Explosion : IEffect { diff --git a/OpenRa.Game/Effects/FlashTarget.cs b/OpenRa.Game/Effects/FlashTarget.cs index 21e0fe8c85..7029b2c820 100755 --- a/OpenRa.Game/Effects/FlashTarget.cs +++ b/OpenRa.Game/Effects/FlashTarget.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Traits; -using OpenRa.Game.Graphics; +using OpenRa.Traits; +using OpenRa.Graphics; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class FlashTarget : IEffect { diff --git a/OpenRa.Game/Effects/GpsSatellite.cs b/OpenRa.Game/Effects/GpsSatellite.cs index 55f58d3200..d008fdda22 100755 --- a/OpenRa.Game/Effects/GpsSatellite.cs +++ b/OpenRa.Game/Effects/GpsSatellite.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class GpsSatellite : IEffect { diff --git a/OpenRa.Game/Effects/IEffect.cs b/OpenRa.Game/Effects/IEffect.cs index feb99cd504..73cfc5e2a8 100755 --- a/OpenRa.Game/Effects/IEffect.cs +++ b/OpenRa.Game/Effects/IEffect.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { - interface IEffect + public interface IEffect { void Tick(); IEnumerable Render(); diff --git a/OpenRa.Game/Effects/InvulnEffect.cs b/OpenRa.Game/Effects/InvulnEffect.cs index b7f28a0a49..9f59bb9d8d 100755 --- a/OpenRa.Game/Effects/InvulnEffect.cs +++ b/OpenRa.Game/Effects/InvulnEffect.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class InvulnEffect : IEffect { diff --git a/OpenRa.Game/Effects/Missile.cs b/OpenRa.Game/Effects/Missile.cs index bf71137b03..da221bccad 100755 --- a/OpenRa.Game/Effects/Missile.cs +++ b/OpenRa.Game/Effects/Missile.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Traits; using System; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class Missile : IEffect { diff --git a/OpenRa.Game/Effects/MoveFlash.cs b/OpenRa.Game/Effects/MoveFlash.cs index 0c64197950..4105da8fb9 100755 --- a/OpenRa.Game/Effects/MoveFlash.cs +++ b/OpenRa.Game/Effects/MoveFlash.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class MoveFlash : IEffect { diff --git a/OpenRa.Game/Effects/PowerDownIndicator.cs b/OpenRa.Game/Effects/PowerDownIndicator.cs index 55858a6f54..ee7e1032ac 100755 --- a/OpenRa.Game/Effects/PowerDownIndicator.cs +++ b/OpenRa.Game/Effects/PowerDownIndicator.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class PowerDownIndicator : IEffect { diff --git a/OpenRa.Game/Effects/RepairIndicator.cs b/OpenRa.Game/Effects/RepairIndicator.cs index bbc94dd799..c017176b3f 100755 --- a/OpenRa.Game/Effects/RepairIndicator.cs +++ b/OpenRa.Game/Effects/RepairIndicator.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class RepairIndicator : IEffect { diff --git a/OpenRa.Game/Effects/SatelliteLaunch.cs b/OpenRa.Game/Effects/SatelliteLaunch.cs index 7cc0d36dca..0b3b267c24 100755 --- a/OpenRa.Game/Effects/SatelliteLaunch.cs +++ b/OpenRa.Game/Effects/SatelliteLaunch.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class SatelliteLaunch : IEffect { diff --git a/OpenRa.Game/Effects/Smoke.cs b/OpenRa.Game/Effects/Smoke.cs index edafcd7818..1f515f01fa 100755 --- a/OpenRa.Game/Effects/Smoke.cs +++ b/OpenRa.Game/Effects/Smoke.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class Smoke : IEffect { diff --git a/OpenRa.Game/Effects/TeslaZap.cs b/OpenRa.Game/Effects/TeslaZap.cs index 8422a260f0..ffc18611ef 100755 --- a/OpenRa.Game/Effects/TeslaZap.cs +++ b/OpenRa.Game/Effects/TeslaZap.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Effects +namespace OpenRa.Effects { class TeslaZap : IEffect { diff --git a/OpenRa.Game/Exts.cs b/OpenRa.Game/Exts.cs index 179fd8e5a5..e96afd4f6e 100644 --- a/OpenRa.Game/Exts.cs +++ b/OpenRa.Game/Exts.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { static class Exts { diff --git a/OpenRa.Game/Game.cs b/OpenRa.Game/Game.cs index b80110316a..62338fc786 100644 --- a/OpenRa.Game/Game.cs +++ b/OpenRa.Game/Game.cs @@ -4,28 +4,28 @@ using System.Drawing; using System.Linq; using System.Net.Sockets; using OpenRa.FileFormats; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Orders; -using OpenRa.Game.Support; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Orders; +using OpenRa.Support; +using OpenRa.Traits; using IjwFramework.Types; -namespace OpenRa.Game +namespace OpenRa { - static class Game + public static class Game { public static readonly int CellSize = 24; public static World world; - public static Viewport viewport; + internal static Viewport viewport; public static PathFinder PathFinder; - public static WorldRenderer worldRenderer; + internal static WorldRenderer worldRenderer; public static Controller controller; - public static Chrome chrome; + internal static Chrome chrome; public static UserSettings Settings; - public static OrderManager orderManager; + internal static OrderManager orderManager; static int localPlayerIndex; @@ -50,9 +50,9 @@ namespace OpenRa.Game static int2 clientSize; static HardwarePalette palette; static string mapName; - public static Minimap minimap; - public static Session LobbyInfo = new Session(); - public static int2[] SpawnPoints; + internal static Minimap minimap; + internal static Session LobbyInfo = new Session(); + internal static int2[] SpawnPoints; static bool changePending; public static void ChangeMap(string mapName) @@ -115,7 +115,7 @@ namespace OpenRa.Game .ToArray(); } - public static void Initialize(string mapName, Renderer renderer, int2 clientSize, + internal static void Initialize(string mapName, Renderer renderer, int2 clientSize, int localPlayer, bool useAftermath, Controller controller) { localPlayerIndex = localPlayer; @@ -169,7 +169,7 @@ namespace OpenRa.Game static int oreTicks; public static int RenderFrame = 0; - public static Chat chat = new Chat(); + internal static Chat chat = new Chat(); public static void Tick() { diff --git a/OpenRa.Game/GameRules/AftermathInfo.cs b/OpenRa.Game/GameRules/AftermathInfo.cs index 60511c4d5c..540d4c8f03 100644 --- a/OpenRa.Game/GameRules/AftermathInfo.cs +++ b/OpenRa.Game/GameRules/AftermathInfo.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { class AftermathInfo { diff --git a/OpenRa.Game/GameRules/ArmorType.cs b/OpenRa.Game/GameRules/ArmorType.cs index bc2ac7e51b..26da4c45a5 100755 --- a/OpenRa.Game/GameRules/ArmorType.cs +++ b/OpenRa.Game/GameRules/ArmorType.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { public enum ArmorType { diff --git a/OpenRa.Game/GameRules/Footprint.cs b/OpenRa.Game/GameRules/Footprint.cs index 63d1306ab8..7562b89c1f 100644 --- a/OpenRa.Game/GameRules/Footprint.cs +++ b/OpenRa.Game/GameRules/Footprint.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Traits; +using OpenRa.Traits; -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { static class Footprint { diff --git a/OpenRa.Game/GameRules/GeneralInfo.cs b/OpenRa.Game/GameRules/GeneralInfo.cs index cbd26f3d6b..82cc69b453 100644 --- a/OpenRa.Game/GameRules/GeneralInfo.cs +++ b/OpenRa.Game/GameRules/GeneralInfo.cs @@ -1,6 +1,6 @@  using System; -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { class GeneralInfo { diff --git a/OpenRa.Game/GameRules/InfoLoader.cs b/OpenRa.Game/GameRules/InfoLoader.cs index 6a35b9b510..76a4e331c3 100644 --- a/OpenRa.Game/GameRules/InfoLoader.cs +++ b/OpenRa.Game/GameRules/InfoLoader.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using OpenRa.FileFormats; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; using IjwFramework.Types; using System.Collections; -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { class InfoLoader : IEnumerable> { diff --git a/OpenRa.Game/GameRules/NewUnitInfo.cs b/OpenRa.Game/GameRules/NewUnitInfo.cs index e49b76ac82..6611b48fb0 100755 --- a/OpenRa.Game/GameRules/NewUnitInfo.cs +++ b/OpenRa.Game/GameRules/NewUnitInfo.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Linq; using OpenRa.FileFormats; -using OpenRa.Game.Traits; +using OpenRa.Traits; -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { - class NewUnitInfo + public class NewUnitInfo { public readonly string Name; public readonly string Category; diff --git a/OpenRa.Game/GameRules/ProjectileInfo.cs b/OpenRa.Game/GameRules/ProjectileInfo.cs index 97352b6f9d..92336ba80f 100644 --- a/OpenRa.Game/GameRules/ProjectileInfo.cs +++ b/OpenRa.Game/GameRules/ProjectileInfo.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { class ProjectileInfo { diff --git a/OpenRa.Game/GameRules/Rules.cs b/OpenRa.Game/GameRules/Rules.cs index 5561ff33c9..03e1ad5f11 100755 --- a/OpenRa.Game/GameRules/Rules.cs +++ b/OpenRa.Game/GameRules/Rules.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using IjwFramework.Types; using OpenRa.FileFormats; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game +namespace OpenRa { static class Rules { diff --git a/OpenRa.Game/GameRules/SupportPowerInfo.cs b/OpenRa.Game/GameRules/SupportPowerInfo.cs index e2eee76b7b..08b8f6d190 100644 --- a/OpenRa.Game/GameRules/SupportPowerInfo.cs +++ b/OpenRa.Game/GameRules/SupportPowerInfo.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { public class SupportPowerInfo { diff --git a/OpenRa.Game/GameRules/TechTree.cs b/OpenRa.Game/GameRules/TechTree.cs index f65b64a4a7..47843b51f8 100755 --- a/OpenRa.Game/GameRules/TechTree.cs +++ b/OpenRa.Game/GameRules/TechTree.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; using IjwFramework.Collections; -using OpenRa.Game.Traits; +using OpenRa.Traits; -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { class TechTree { diff --git a/OpenRa.Game/GameRules/UserSettings.cs b/OpenRa.Game/GameRules/UserSettings.cs index cb12771fd3..1fc1387018 100644 --- a/OpenRa.Game/GameRules/UserSettings.cs +++ b/OpenRa.Game/GameRules/UserSettings.cs @@ -1,7 +1,7 @@  -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { - class UserSettings + public class UserSettings { // Debug settings public readonly bool UnitDebug = false; diff --git a/OpenRa.Game/GameRules/VoiceInfo.cs b/OpenRa.Game/GameRules/VoiceInfo.cs index 509a0d57e7..a458c4a139 100644 --- a/OpenRa.Game/GameRules/VoiceInfo.cs +++ b/OpenRa.Game/GameRules/VoiceInfo.cs @@ -5,7 +5,7 @@ using System.Text; using IjwFramework.Types; using IjwFramework.Collections; -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { class VoiceInfo { diff --git a/OpenRa.Game/GameRules/WarheadInfo.cs b/OpenRa.Game/GameRules/WarheadInfo.cs index 758373f5ef..e0f5aaf51a 100644 --- a/OpenRa.Game/GameRules/WarheadInfo.cs +++ b/OpenRa.Game/GameRules/WarheadInfo.cs @@ -1,7 +1,7 @@  -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { - class WarheadInfo + public class WarheadInfo { public readonly int Spread = 1; public readonly float[] Verses = { 1, 1, 1, 1, 1 }; diff --git a/OpenRa.Game/GameRules/WeaponInfo.cs b/OpenRa.Game/GameRules/WeaponInfo.cs index b33479095b..71b3ec760e 100755 --- a/OpenRa.Game/GameRules/WeaponInfo.cs +++ b/OpenRa.Game/GameRules/WeaponInfo.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.GameRules +namespace OpenRa.GameRules { class WeaponInfo { diff --git a/OpenRa.Game/Graphics/Animation.cs b/OpenRa.Game/Graphics/Animation.cs index b35c5f7bc6..deced9f2da 100644 --- a/OpenRa.Game/Graphics/Animation.cs +++ b/OpenRa.Game/Graphics/Animation.cs @@ -1,6 +1,6 @@ using System; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class Animation { diff --git a/OpenRa.Game/Graphics/CursorSequence.cs b/OpenRa.Game/Graphics/CursorSequence.cs index e8990785a4..0627bf8485 100644 --- a/OpenRa.Game/Graphics/CursorSequence.cs +++ b/OpenRa.Game/Graphics/CursorSequence.cs @@ -1,6 +1,6 @@ using System.Xml; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class CursorSequence { diff --git a/OpenRa.Game/Graphics/CursorSheetBuilder.cs b/OpenRa.Game/Graphics/CursorSheetBuilder.cs index 1a6b7291e3..02a7af5191 100644 --- a/OpenRa.Game/Graphics/CursorSheetBuilder.cs +++ b/OpenRa.Game/Graphics/CursorSheetBuilder.cs @@ -2,7 +2,7 @@ using IjwFramework.Collections; using OpenRa.FileFormats; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { static class CursorSheetBuilder { diff --git a/OpenRa.Game/Graphics/HardwarePalette.cs b/OpenRa.Game/Graphics/HardwarePalette.cs index 147a639a34..c5e784e4a2 100644 --- a/OpenRa.Game/Graphics/HardwarePalette.cs +++ b/OpenRa.Game/Graphics/HardwarePalette.cs @@ -1,7 +1,7 @@ using System.Drawing; using OpenRa.FileFormats; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { public enum PaletteType { diff --git a/OpenRa.Game/Graphics/LineRenderer.cs b/OpenRa.Game/Graphics/LineRenderer.cs index 87b2b85c21..c7a2833a95 100644 --- a/OpenRa.Game/Graphics/LineRenderer.cs +++ b/OpenRa.Game/Graphics/LineRenderer.cs @@ -1,7 +1,7 @@ using System.Drawing; using Ijw.DirectX; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class LineRenderer { diff --git a/OpenRa.Game/Graphics/MappedImage.cs b/OpenRa.Game/Graphics/MappedImage.cs index 1d9365eae8..06da34390e 100644 --- a/OpenRa.Game/Graphics/MappedImage.cs +++ b/OpenRa.Game/Graphics/MappedImage.cs @@ -2,7 +2,7 @@ using System.Drawing; using Ijw.DirectX; using System.IO; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class MappedImage { diff --git a/OpenRa.Game/Graphics/Minimap.cs b/OpenRa.Game/Graphics/Minimap.cs index 2db93892a2..eda5bec089 100644 --- a/OpenRa.Game/Graphics/Minimap.cs +++ b/OpenRa.Game/Graphics/Minimap.cs @@ -1,11 +1,11 @@ using System; using System.Drawing; using System.Linq; -using OpenRa.Game.Traits; +using OpenRa.Traits; using OpenRa.FileFormats; using System.Drawing.Imaging; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class Minimap { diff --git a/OpenRa.Game/Graphics/OverlayRenderer.cs b/OpenRa.Game/Graphics/OverlayRenderer.cs index a9d47b34c5..16ab8eda01 100755 --- a/OpenRa.Game/Graphics/OverlayRenderer.cs +++ b/OpenRa.Game/Graphics/OverlayRenderer.cs @@ -1,7 +1,7 @@ using System.Linq; using OpenRa.FileFormats; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class OverlayRenderer { diff --git a/OpenRa.Game/Graphics/Renderer.cs b/OpenRa.Game/Graphics/Renderer.cs index dbbf5b24a5..1547b95a25 100644 --- a/OpenRa.Game/Graphics/Renderer.cs +++ b/OpenRa.Game/Graphics/Renderer.cs @@ -2,11 +2,11 @@ using System.Drawing; using System.Windows.Forms; using Ijw.DirectX; using OpenRa.FileFormats; -using OpenRa.Game.Support; +using OpenRa.Support; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { - class Renderer + internal class Renderer { internal static int SheetSize; diff --git a/OpenRa.Game/Graphics/Sequence.cs b/OpenRa.Game/Graphics/Sequence.cs index 7b569cbf81..0c88a7e354 100644 --- a/OpenRa.Game/Graphics/Sequence.cs +++ b/OpenRa.Game/Graphics/Sequence.cs @@ -1,7 +1,7 @@ using System.Xml; using Ijw.DirectX; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class Sequence { diff --git a/OpenRa.Game/Graphics/SequenceProvider.cs b/OpenRa.Game/Graphics/SequenceProvider.cs index 96512aa4e7..66a45e2f43 100644 --- a/OpenRa.Game/Graphics/SequenceProvider.cs +++ b/OpenRa.Game/Graphics/SequenceProvider.cs @@ -4,7 +4,7 @@ using System.Xml; using OpenRa.FileFormats; using System; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { static class SequenceProvider { diff --git a/OpenRa.Game/Graphics/Sheet.cs b/OpenRa.Game/Graphics/Sheet.cs index 437304d6d1..9473d2215e 100644 --- a/OpenRa.Game/Graphics/Sheet.cs +++ b/OpenRa.Game/Graphics/Sheet.cs @@ -2,22 +2,22 @@ using System.Drawing; using Ijw.DirectX; using OpenRa.FileFormats; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { - class Sheet + public class Sheet { readonly Renderer renderer; protected readonly Bitmap bitmap; Texture texture; - public Sheet(Renderer renderer, Size size) + internal Sheet(Renderer renderer, Size size) { this.renderer = renderer; this.bitmap = new Bitmap(size.Width, size.Height); } - public Sheet(Renderer renderer, string filename) + internal Sheet(Renderer renderer, string filename) { this.renderer = renderer; this.bitmap = (Bitmap)Image.FromStream(FileSystem.Open(filename)); diff --git a/OpenRa.Game/Graphics/SheetBuilder.cs b/OpenRa.Game/Graphics/SheetBuilder.cs index bfd67f0019..5db8f30202 100644 --- a/OpenRa.Game/Graphics/SheetBuilder.cs +++ b/OpenRa.Game/Graphics/SheetBuilder.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { static class SheetBuilder { diff --git a/OpenRa.Game/Graphics/Sprite.cs b/OpenRa.Game/Graphics/Sprite.cs index 3fb1a10971..655e9ab360 100644 --- a/OpenRa.Game/Graphics/Sprite.cs +++ b/OpenRa.Game/Graphics/Sprite.cs @@ -1,8 +1,8 @@ using System.Drawing; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { - class Sprite + public class Sprite { public readonly Rectangle bounds; public readonly Sheet sheet; diff --git a/OpenRa.Game/Graphics/SpriteRenderer.cs b/OpenRa.Game/Graphics/SpriteRenderer.cs index 3074c43a0f..109e8a3695 100644 --- a/OpenRa.Game/Graphics/SpriteRenderer.cs +++ b/OpenRa.Game/Graphics/SpriteRenderer.cs @@ -1,6 +1,6 @@ using Ijw.DirectX; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class SpriteRenderer { diff --git a/OpenRa.Game/Graphics/SpriteSheetBuilder.cs b/OpenRa.Game/Graphics/SpriteSheetBuilder.cs index 276ce6d90b..3b168da665 100644 --- a/OpenRa.Game/Graphics/SpriteSheetBuilder.cs +++ b/OpenRa.Game/Graphics/SpriteSheetBuilder.cs @@ -2,7 +2,7 @@ using System.Linq; using IjwFramework.Collections; using OpenRa.FileFormats; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { static class SpriteSheetBuilder { diff --git a/OpenRa.Game/Graphics/TerrainRenderer.cs b/OpenRa.Game/Graphics/TerrainRenderer.cs index 1032c3b0a0..1a3e4d68a2 100644 --- a/OpenRa.Game/Graphics/TerrainRenderer.cs +++ b/OpenRa.Game/Graphics/TerrainRenderer.cs @@ -3,7 +3,7 @@ using Ijw.DirectX; using IjwFramework.Collections; using OpenRa.FileFormats; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class TerrainRenderer { diff --git a/OpenRa.Game/Graphics/Util.cs b/OpenRa.Game/Graphics/Util.cs index 847ad9d505..f35ead78db 100644 --- a/OpenRa.Game/Graphics/Util.cs +++ b/OpenRa.Game/Graphics/Util.cs @@ -4,7 +4,7 @@ using System.Drawing.Imaging; using System.IO; using System.Drawing; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { static class Util { diff --git a/OpenRa.Game/Graphics/Vertex.cs b/OpenRa.Game/Graphics/Vertex.cs index e9d0a054f0..9082b0f595 100644 --- a/OpenRa.Game/Graphics/Vertex.cs +++ b/OpenRa.Game/Graphics/Vertex.cs @@ -1,7 +1,7 @@ using System.Runtime.InteropServices; using Ijw.DirectX; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { [StructLayout(LayoutKind.Sequential)] struct Vertex diff --git a/OpenRa.Game/Graphics/Viewport.cs b/OpenRa.Game/Graphics/Viewport.cs index b52a6f7d7a..aa4e84e3a2 100644 --- a/OpenRa.Game/Graphics/Viewport.cs +++ b/OpenRa.Game/Graphics/Viewport.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; using System.Windows.Forms; -using OpenRa.Game.Traits; +using OpenRa.Traits; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { interface IHandleInput { diff --git a/OpenRa.Game/Graphics/WorldRenderer.cs b/OpenRa.Game/Graphics/WorldRenderer.cs index a3c82c409c..f94db628e4 100644 --- a/OpenRa.Game/Graphics/WorldRenderer.cs +++ b/OpenRa.Game/Graphics/WorldRenderer.cs @@ -4,11 +4,11 @@ using System.Linq; using System.Windows.Forms; using IjwFramework.Types; using System.Collections.Generic; -using OpenRa.Game.Traits; -using OpenRa.Game.Support; -using OpenRa.Game.Effects; +using OpenRa.Traits; +using OpenRa.Support; +using OpenRa.Effects; -namespace OpenRa.Game.Graphics +namespace OpenRa.Graphics { class WorldRenderer { diff --git a/OpenRa.Game/MainWindow.cs b/OpenRa.Game/MainWindow.cs index 6d03fc3e2c..ad90bcd9ed 100755 --- a/OpenRa.Game/MainWindow.cs +++ b/OpenRa.Game/MainWindow.cs @@ -4,12 +4,12 @@ using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; using OpenRa.FileFormats; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Orders; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Orders; -namespace OpenRa.Game +namespace OpenRa { class MainWindow : Form { @@ -183,7 +183,7 @@ namespace OpenRa.Game } [Flags] - enum MouseButton + public enum MouseButton { None = (int)MouseButtons.None, Left = (int)MouseButtons.Left, @@ -192,7 +192,7 @@ namespace OpenRa.Game } [Flags] - enum Modifiers + public enum Modifiers { None = (int)Keys.None, Shift = (int)Keys.Shift, @@ -200,7 +200,7 @@ namespace OpenRa.Game Ctrl = (int)Keys.Control, } - struct MouseInput + public struct MouseInput { public MouseInputEvent Event; public int2 Location; @@ -208,5 +208,5 @@ namespace OpenRa.Game public Modifiers Modifiers; } - enum MouseInputEvent { Down, Move, Up }; + public enum MouseInputEvent { Down, Move, Up }; } diff --git a/OpenRa.Game/Orders/ChronoshiftDestinationOrderGenerator.cs b/OpenRa.Game/Orders/ChronoshiftDestinationOrderGenerator.cs index 2babfc2232..23ee821595 100644 --- a/OpenRa.Game/Orders/ChronoshiftDestinationOrderGenerator.cs +++ b/OpenRa.Game/Orders/ChronoshiftDestinationOrderGenerator.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Drawing; -using OpenRa.Game.Traits; -using OpenRa.Game.SupportPowers; +using OpenRa.Traits; +using OpenRa.SupportPowers; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class ChronoshiftDestinationOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/ChronoshiftSelfDestinationOrderGenerator.cs b/OpenRa.Game/Orders/ChronoshiftSelfDestinationOrderGenerator.cs index d44ccbd88a..f436e7609f 100644 --- a/OpenRa.Game/Orders/ChronoshiftSelfDestinationOrderGenerator.cs +++ b/OpenRa.Game/Orders/ChronoshiftSelfDestinationOrderGenerator.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; -using OpenRa.Game.Traits; +using OpenRa.Traits; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class ChronoshiftSelfDestinationOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs b/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs index bbd2ae4b22..43ff615c14 100644 --- a/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs +++ b/OpenRa.Game/Orders/ChronosphereSelectOrderGenerator.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; -using OpenRa.Game.SupportPowers; +using OpenRa.GameRules; +using OpenRa.Traits; +using OpenRa.SupportPowers; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class ChronosphereSelectOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/IOrderGenerator.cs b/OpenRa.Game/Orders/IOrderGenerator.cs index 88ac531764..17c1cb39bd 100644 --- a/OpenRa.Game/Orders/IOrderGenerator.cs +++ b/OpenRa.Game/Orders/IOrderGenerator.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -namespace OpenRa.Game +namespace OpenRa { - interface IOrderGenerator + public interface IOrderGenerator { IEnumerable Order( int2 xy, MouseInput mi ); void Tick(); diff --git a/OpenRa.Game/Orders/IOrderSource.cs b/OpenRa.Game/Orders/IOrderSource.cs index 2abd7fda74..74c3d3c252 100644 --- a/OpenRa.Game/Orders/IOrderSource.cs +++ b/OpenRa.Game/Orders/IOrderSource.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { interface IOrderSource { diff --git a/OpenRa.Game/Orders/IronCurtainOrderGenerator.cs b/OpenRa.Game/Orders/IronCurtainOrderGenerator.cs index 2d56000335..a030ba2e04 100644 --- a/OpenRa.Game/Orders/IronCurtainOrderGenerator.cs +++ b/OpenRa.Game/Orders/IronCurtainOrderGenerator.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; -using OpenRa.Game.SupportPowers; +using OpenRa.GameRules; +using OpenRa.Traits; +using OpenRa.SupportPowers; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class IronCurtainOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/LocalOrderSource.cs b/OpenRa.Game/Orders/LocalOrderSource.cs index 6dcb2b88e8..ef6d3c61af 100644 --- a/OpenRa.Game/Orders/LocalOrderSource.cs +++ b/OpenRa.Game/Orders/LocalOrderSource.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class LocalOrderSource : IOrderSource { diff --git a/OpenRa.Game/Orders/NetworkOrderSource.cs b/OpenRa.Game/Orders/NetworkOrderSource.cs index 6f279dfa6d..f6f4ea1a3f 100644 --- a/OpenRa.Game/Orders/NetworkOrderSource.cs +++ b/OpenRa.Game/Orders/NetworkOrderSource.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Net.Sockets; using System.Threading; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class NetworkOrderSource : IOrderSource { diff --git a/OpenRa.Game/Orders/Order.cs b/OpenRa.Game/Orders/Order.cs index c1994cad54..221dad9228 100644 --- a/OpenRa.Game/Orders/Order.cs +++ b/OpenRa.Game/Orders/Order.cs @@ -1,11 +1,11 @@ using System; using System.IO; using System.Linq; -using OpenRa.Game.SupportPowers; +using OpenRa.SupportPowers; -namespace OpenRa.Game +namespace OpenRa { - sealed class Order + public sealed class Order { public readonly string OrderString; readonly uint SubjectId; diff --git a/OpenRa.Game/Orders/OrderIO.cs b/OpenRa.Game/Orders/OrderIO.cs index c2940ddcf7..0adf49745b 100644 --- a/OpenRa.Game/Orders/OrderIO.cs +++ b/OpenRa.Game/Orders/OrderIO.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { static class OrderIO { diff --git a/OpenRa.Game/Orders/OrderManager.cs b/OpenRa.Game/Orders/OrderManager.cs index ee0b14a9c9..d149ec15e2 100644 --- a/OpenRa.Game/Orders/OrderManager.cs +++ b/OpenRa.Game/Orders/OrderManager.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class OrderManager { diff --git a/OpenRa.Game/Orders/PlaceBuildingOrderGenerator.cs b/OpenRa.Game/Orders/PlaceBuildingOrderGenerator.cs index a2887ebcac..282ffdd849 100644 --- a/OpenRa.Game/Orders/PlaceBuildingOrderGenerator.cs +++ b/OpenRa.Game/Orders/PlaceBuildingOrderGenerator.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Traits; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class PlaceBuildingOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/PowerDownOrderGenerator.cs b/OpenRa.Game/Orders/PowerDownOrderGenerator.cs index 80ecba3ad1..68d2c6c4fa 100644 --- a/OpenRa.Game/Orders/PowerDownOrderGenerator.cs +++ b/OpenRa.Game/Orders/PowerDownOrderGenerator.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Traits; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class PowerDownOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/RepairOrderGenerator.cs b/OpenRa.Game/Orders/RepairOrderGenerator.cs index 60d36c79ef..2fb1e49861 100644 --- a/OpenRa.Game/Orders/RepairOrderGenerator.cs +++ b/OpenRa.Game/Orders/RepairOrderGenerator.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Traits; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class RepairOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/ReplayOrderSource.cs b/OpenRa.Game/Orders/ReplayOrderSource.cs index 97d62cf8c6..d8376d0aeb 100644 --- a/OpenRa.Game/Orders/ReplayOrderSource.cs +++ b/OpenRa.Game/Orders/ReplayOrderSource.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class ReplayOrderSource : IOrderSource { diff --git a/OpenRa.Game/Orders/SellOrderGenerator.cs b/OpenRa.Game/Orders/SellOrderGenerator.cs index 5c6f240f5b..7edc0784f2 100644 --- a/OpenRa.Game/Orders/SellOrderGenerator.cs +++ b/OpenRa.Game/Orders/SellOrderGenerator.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Traits; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class SellOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/UnitOrderGenerator.cs b/OpenRa.Game/Orders/UnitOrderGenerator.cs index a7800482f7..f84b75c9e1 100644 --- a/OpenRa.Game/Orders/UnitOrderGenerator.cs +++ b/OpenRa.Game/Orders/UnitOrderGenerator.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRa.Game.Traits; -using OpenRa.Game.GameRules; +using OpenRa.Traits; +using OpenRa.GameRules; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { class UnitOrderGenerator : IOrderGenerator { diff --git a/OpenRa.Game/Orders/UnitOrders.cs b/OpenRa.Game/Orders/UnitOrders.cs index 92c2110aad..8b3445d0b9 100644 --- a/OpenRa.Game/Orders/UnitOrders.cs +++ b/OpenRa.Game/Orders/UnitOrders.cs @@ -1,10 +1,10 @@ using System.Drawing; using OpenRa.FileFormats; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game.Orders +namespace OpenRa.Orders { static class UnitOrders { diff --git a/OpenRa.Game/Ore.cs b/OpenRa.Game/Ore.cs index 07a456536b..7fb2db8efd 100644 --- a/OpenRa.Game/Ore.cs +++ b/OpenRa.Game/Ore.cs @@ -1,7 +1,7 @@ using System; using OpenRa.FileFormats; -namespace OpenRa.Game +namespace OpenRa { public static class Ore { diff --git a/OpenRa.Game/PackageDownloader.cs b/OpenRa.Game/PackageDownloader.cs index 529641b99c..74001b2fc0 100644 --- a/OpenRa.Game/PackageDownloader.cs +++ b/OpenRa.Game/PackageDownloader.cs @@ -6,7 +6,7 @@ using System.Security.Cryptography; using OpenRa.FileFormats; using System.Drawing; -namespace OpenRa.Game +namespace OpenRa { static class PackageDownloader { diff --git a/OpenRa.Game/PathFinder.cs b/OpenRa.Game/PathFinder.cs index c93b0f1f6c..d4e71fb2f1 100644 --- a/OpenRa.Game/PathFinder.cs +++ b/OpenRa.Game/PathFinder.cs @@ -2,12 +2,12 @@ using System; using System.Collections.Generic; using System.Linq; using OpenRa.FileFormats; -using OpenRa.Game.Support; -using OpenRa.Game.Traits; +using OpenRa.Support; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { - class PathFinder + public class PathFinder { float[][,] passableCost = new float[4][,]; @@ -173,7 +173,7 @@ namespace OpenRa.Game } } - struct CellInfo + public struct CellInfo { public float MinCost; public int2 Path; @@ -187,7 +187,7 @@ namespace OpenRa.Game } } - struct PathDistance : IComparable + public struct PathDistance : IComparable { public float EstTotal; public int2 Location; diff --git a/OpenRa.Game/PathSearch.cs b/OpenRa.Game/PathSearch.cs index 931733726a..5c9ee59f94 100755 --- a/OpenRa.Game/PathSearch.cs +++ b/OpenRa.Game/PathSearch.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Linq; using IjwFramework.Collections; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game +namespace OpenRa { - class PathSearch + public class PathSearch { public CellInfo[ , ] cellInfo; public PriorityQueue queue; diff --git a/OpenRa.Game/Player.cs b/OpenRa.Game/Player.cs index 8463b2a6e6..ef886f6bac 100644 --- a/OpenRa.Game/Player.cs +++ b/OpenRa.Game/Player.cs @@ -1,16 +1,16 @@ using System; using System.Linq; using System.Collections.Generic; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Traits; using OpenRa.FileFormats; -namespace OpenRa.Game +namespace OpenRa { - enum PowerState { Normal, Low, Critical }; + public enum PowerState { Normal, Low, Critical }; - class Player + public class Player { public Actor PlayerActor; public PaletteType Palette; diff --git a/OpenRa.Game/ProductionItem.cs b/OpenRa.Game/ProductionItem.cs index cc2ad552ea..91f399075c 100644 --- a/OpenRa.Game/ProductionItem.cs +++ b/OpenRa.Game/ProductionItem.cs @@ -1,6 +1,6 @@ using System; -namespace OpenRa.Game +namespace OpenRa { class ProductionItem { diff --git a/OpenRa.Game/Properties/AssemblyInfo.cs b/OpenRa.Game/Properties/AssemblyInfo.cs index dca63d92a2..7f59c29240 100644 --- a/OpenRa.Game/Properties/AssemblyInfo.cs +++ b/OpenRa.Game/Properties/AssemblyInfo.cs @@ -2,11 +2,11 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyTitle("OpenRa.Game")] +[assembly: AssemblyTitle("OpenRa")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRa.Game")] +[assembly: AssemblyProduct("OpenRa")] [assembly: AssemblyCopyright("Copyright © 2007")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/OpenRa.Game/Race.cs b/OpenRa.Game/Race.cs index 7a9a2511ab..c83771921d 100644 --- a/OpenRa.Game/Race.cs +++ b/OpenRa.Game/Race.cs @@ -1,6 +1,6 @@ using System; -namespace OpenRa.Game +namespace OpenRa { [Flags] public enum Race diff --git a/OpenRa.Game/Shroud.cs b/OpenRa.Game/Shroud.cs index cd8ccd0911..4e8ce48742 100644 --- a/OpenRa.Game/Shroud.cs +++ b/OpenRa.Game/Shroud.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using IjwFramework.Types; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { - class Shroud + public class Shroud { bool[,] explored = new bool[128, 128]; Sprite[] shadowBits = SpriteSheetBuilder.LoadAllSprites("shadow"); @@ -132,7 +132,7 @@ namespace OpenRa.Game return shadowBits[ SpecialShroudTiles[ u ^ uSides ][ v ] ]; } - public void Draw(SpriteRenderer r) + internal void Draw(SpriteRenderer r) { if (dirty) { diff --git a/OpenRa.Game/Smudge.cs b/OpenRa.Game/Smudge.cs index 2ed4746090..c7b9e1ddd2 100644 --- a/OpenRa.Game/Smudge.cs +++ b/OpenRa.Game/Smudge.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game +namespace OpenRa { static class Smudge { diff --git a/OpenRa.Game/Sound.cs b/OpenRa.Game/Sound.cs index 6c773d0ae0..e68b606f5b 100644 --- a/OpenRa.Game/Sound.cs +++ b/OpenRa.Game/Sound.cs @@ -1,10 +1,10 @@ using IjwFramework.Collections; using IrrKlang; using OpenRa.FileFormats; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { static class Sound { diff --git a/OpenRa.Game/Support/Log.cs b/OpenRa.Game/Support/Log.cs index 3c3a3098d1..c2ca4d5296 100644 --- a/OpenRa.Game/Support/Log.cs +++ b/OpenRa.Game/Support/Log.cs @@ -1,6 +1,6 @@ using System.IO; -namespace OpenRa.Game +namespace OpenRa { static class Log { diff --git a/OpenRa.Game/Support/PerfHistory.cs b/OpenRa.Game/Support/PerfHistory.cs index 2fe624e33d..d233df7a97 100644 --- a/OpenRa.Game/Support/PerfHistory.cs +++ b/OpenRa.Game/Support/PerfHistory.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using IjwFramework.Collections; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Support +namespace OpenRa.Support { static class PerfHistory { diff --git a/OpenRa.Game/Support/Program.cs b/OpenRa.Game/Support/Program.cs index 60a9d3b6fd..249d38ca5f 100644 --- a/OpenRa.Game/Support/Program.cs +++ b/OpenRa.Game/Support/Program.cs @@ -1,7 +1,7 @@ using System; using System.Diagnostics; -namespace OpenRa.Game +namespace OpenRa { static class Program { diff --git a/OpenRa.Game/Support/Settings.cs b/OpenRa.Game/Support/Settings.cs index 89f28ec471..89edc516b6 100644 --- a/OpenRa.Game/Support/Settings.cs +++ b/OpenRa.Game/Support/Settings.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; -namespace OpenRa.Game +namespace OpenRa { class Settings { diff --git a/OpenRa.Game/Support/Stopwatch.cs b/OpenRa.Game/Support/Stopwatch.cs index 7de2257a07..7387c996d3 100644 --- a/OpenRa.Game/Support/Stopwatch.cs +++ b/OpenRa.Game/Support/Stopwatch.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace OpenRa.Game.Support +namespace OpenRa.Support { class Stopwatch { diff --git a/OpenRa.Game/SupportPower.cs b/OpenRa.Game/SupportPower.cs index 75471de595..60fdf2e97d 100644 --- a/OpenRa.Game/SupportPower.cs +++ b/OpenRa.Game/SupportPower.cs @@ -1,14 +1,14 @@ using System; using System.Linq; -using OpenRa.Game.GameRules; -using OpenRa.Game.SupportPowers; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.SupportPowers; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { // todo: fix this to route Activate through the orders system (otherwise desync in netplay) - class SupportPower + public class SupportPower { public readonly SupportPowerInfo Info; public readonly Player Owner; diff --git a/OpenRa.Game/SupportPowers/ChronospherePower.cs b/OpenRa.Game/SupportPowers/ChronospherePower.cs index 0e860b987f..bb5615f072 100644 --- a/OpenRa.Game/SupportPowers/ChronospherePower.cs +++ b/OpenRa.Game/SupportPowers/ChronospherePower.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Drawing; -using OpenRa.Game.Orders; -using OpenRa.Game.Traits; +using OpenRa.Orders; +using OpenRa.Traits; -namespace OpenRa.Game.SupportPowers +namespace OpenRa.SupportPowers { class ChronospherePower : ISupportPowerImpl { diff --git a/OpenRa.Game/SupportPowers/GpsSatellite.cs b/OpenRa.Game/SupportPowers/GpsSatellite.cs index 083b352cb1..5ef5f74407 100644 --- a/OpenRa.Game/SupportPowers/GpsSatellite.cs +++ b/OpenRa.Game/SupportPowers/GpsSatellite.cs @@ -1,8 +1,8 @@ using System.Linq; -using OpenRa.Game.Effects; -using OpenRa.Game.Traits; +using OpenRa.Effects; +using OpenRa.Traits; -namespace OpenRa.Game.SupportPowers +namespace OpenRa.SupportPowers { class GpsSatellite : ISupportPowerImpl { diff --git a/OpenRa.Game/SupportPowers/ISupportPowerImpl.cs b/OpenRa.Game/SupportPowers/ISupportPowerImpl.cs index b1ef896690..c28694cf95 100644 --- a/OpenRa.Game/SupportPowers/ISupportPowerImpl.cs +++ b/OpenRa.Game/SupportPowers/ISupportPowerImpl.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.SupportPowers +namespace OpenRa.SupportPowers { - interface ISupportPowerImpl + public interface ISupportPowerImpl { void Activate(SupportPower p); void OnFireNotification(Actor target, int2 xy); diff --git a/OpenRa.Game/SupportPowers/IronCurtainPower.cs b/OpenRa.Game/SupportPowers/IronCurtainPower.cs index 65c50320ea..a612087446 100644 --- a/OpenRa.Game/SupportPowers/IronCurtainPower.cs +++ b/OpenRa.Game/SupportPowers/IronCurtainPower.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Orders; -using OpenRa.Game.Traits; +using OpenRa.Orders; +using OpenRa.Traits; -namespace OpenRa.Game.SupportPowers +namespace OpenRa.SupportPowers { class IronCurtainPower : ISupportPowerImpl { diff --git a/OpenRa.Game/SupportPowers/NullPower.cs b/OpenRa.Game/SupportPowers/NullPower.cs index 57f76dc60d..caf2c57c15 100644 --- a/OpenRa.Game/SupportPowers/NullPower.cs +++ b/OpenRa.Game/SupportPowers/NullPower.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.SupportPowers +namespace OpenRa.SupportPowers { class NullPower : ISupportPowerImpl { diff --git a/OpenRa.Game/Sync.cs b/OpenRa.Game/Sync.cs index d7d4020888..e6842eb392 100755 --- a/OpenRa.Game/Sync.cs +++ b/OpenRa.Game/Sync.cs @@ -5,7 +5,7 @@ using System.Reflection.Emit; using IjwFramework.Collections; using OpenRa.FileFormats; -namespace OpenRa.Game +namespace OpenRa { class SyncAttribute : Attribute { } diff --git a/OpenRa.Game/TerrainCosts.cs b/OpenRa.Game/TerrainCosts.cs index 7c4ffc9dfb..a1cddc3b73 100644 --- a/OpenRa.Game/TerrainCosts.cs +++ b/OpenRa.Game/TerrainCosts.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game +namespace OpenRa { public enum UnitMovementType : byte { diff --git a/OpenRa.Game/Traits/AcceptsOre.cs b/OpenRa.Game/Traits/AcceptsOre.cs index 6029420859..1f7ad2eae3 100644 --- a/OpenRa.Game/Traits/AcceptsOre.cs +++ b/OpenRa.Game/Traits/AcceptsOre.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class AcceptsOreInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Activities/Attack.cs b/OpenRa.Game/Traits/Activities/Attack.cs index 3a13213597..a13c9453c4 100644 --- a/OpenRa.Game/Traits/Activities/Attack.cs +++ b/OpenRa.Game/Traits/Activities/Attack.cs @@ -1,6 +1,6 @@ using System.Linq; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { /* non-turreted attack */ class Attack : IActivity diff --git a/OpenRa.Game/Traits/Activities/CaptureBuilding.cs b/OpenRa.Game/Traits/Activities/CaptureBuilding.cs index f6778c439b..99a178be84 100644 --- a/OpenRa.Game/Traits/Activities/CaptureBuilding.cs +++ b/OpenRa.Game/Traits/Activities/CaptureBuilding.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class CaptureBuilding : IActivity { diff --git a/OpenRa.Game/Traits/Activities/DeliverOre.cs b/OpenRa.Game/Traits/Activities/DeliverOre.cs index edc5b25f3d..7f7de0f55d 100644 --- a/OpenRa.Game/Traits/Activities/DeliverOre.cs +++ b/OpenRa.Game/Traits/Activities/DeliverOre.cs @@ -1,6 +1,6 @@ using System.Linq; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class DeliverOre : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Demolish.cs b/OpenRa.Game/Traits/Activities/Demolish.cs index 4e085bc0fe..ecf8abaaf7 100644 --- a/OpenRa.Game/Traits/Activities/Demolish.cs +++ b/OpenRa.Game/Traits/Activities/Demolish.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Effects; +using OpenRa.Effects; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Demolish : IActivity { diff --git a/OpenRa.Game/Traits/Activities/DeployMcv.cs b/OpenRa.Game/Traits/Activities/DeployMcv.cs index a738664e8a..e1d6b85f12 100755 --- a/OpenRa.Game/Traits/Activities/DeployMcv.cs +++ b/OpenRa.Game/Traits/Activities/DeployMcv.cs @@ -1,6 +1,6 @@ using System; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class DeployMcv : IActivity { diff --git a/OpenRa.Game/Traits/Activities/EnterTransport.cs b/OpenRa.Game/Traits/Activities/EnterTransport.cs index daa875173d..d320b04929 100644 --- a/OpenRa.Game/Traits/Activities/EnterTransport.cs +++ b/OpenRa.Game/Traits/Activities/EnterTransport.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class EnterTransport : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Fly.cs b/OpenRa.Game/Traits/Activities/Fly.cs index 7c6a497a17..088c2f0f8a 100644 --- a/OpenRa.Game/Traits/Activities/Fly.cs +++ b/OpenRa.Game/Traits/Activities/Fly.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Fly : IActivity { diff --git a/OpenRa.Game/Traits/Activities/FlyAttack.cs b/OpenRa.Game/Traits/Activities/FlyAttack.cs index 21baf5cba4..64f043763e 100644 --- a/OpenRa.Game/Traits/Activities/FlyAttack.cs +++ b/OpenRa.Game/Traits/Activities/FlyAttack.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class FlyAttack : IActivity { diff --git a/OpenRa.Game/Traits/Activities/FlyTimed.cs b/OpenRa.Game/Traits/Activities/FlyTimed.cs index c498dd008b..95c23d964f 100644 --- a/OpenRa.Game/Traits/Activities/FlyTimed.cs +++ b/OpenRa.Game/Traits/Activities/FlyTimed.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class FlyTimed : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Follow.cs b/OpenRa.Game/Traits/Activities/Follow.cs index e53ec7e22d..6883959731 100644 --- a/OpenRa.Game/Traits/Activities/Follow.cs +++ b/OpenRa.Game/Traits/Activities/Follow.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Follow : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Harvest.cs b/OpenRa.Game/Traits/Activities/Harvest.cs index 0de6440655..0dd6adfcb3 100644 --- a/OpenRa.Game/Traits/Activities/Harvest.cs +++ b/OpenRa.Game/Traits/Activities/Harvest.cs @@ -1,6 +1,6 @@ using System.Linq; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Harvest : IActivity { diff --git a/OpenRa.Game/Traits/Activities/HeliAttack.cs b/OpenRa.Game/Traits/Activities/HeliAttack.cs index 3bfd902388..47c65421ba 100644 --- a/OpenRa.Game/Traits/Activities/HeliAttack.cs +++ b/OpenRa.Game/Traits/Activities/HeliAttack.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class HeliAttack : IActivity { diff --git a/OpenRa.Game/Traits/Activities/HeliFly.cs b/OpenRa.Game/Traits/Activities/HeliFly.cs index 32ba04e293..428755243c 100644 --- a/OpenRa.Game/Traits/Activities/HeliFly.cs +++ b/OpenRa.Game/Traits/Activities/HeliFly.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class HeliFly : IActivity { diff --git a/OpenRa.Game/Traits/Activities/HeliLand.cs b/OpenRa.Game/Traits/Activities/HeliLand.cs index 09bf01915f..b357c59f33 100644 --- a/OpenRa.Game/Traits/Activities/HeliLand.cs +++ b/OpenRa.Game/Traits/Activities/HeliLand.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class HeliLand : IActivity { diff --git a/OpenRa.Game/Traits/Activities/HeliReturn.cs b/OpenRa.Game/Traits/Activities/HeliReturn.cs index e8123da2dd..e5fbc74a25 100644 --- a/OpenRa.Game/Traits/Activities/HeliReturn.cs +++ b/OpenRa.Game/Traits/Activities/HeliReturn.cs @@ -1,6 +1,6 @@ using System.Linq; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class HeliReturn : IActivity { diff --git a/OpenRa.Game/Traits/Activities/IActivity.cs b/OpenRa.Game/Traits/Activities/IActivity.cs index 7fb2b43d21..9659a0cb92 100644 --- a/OpenRa.Game/Traits/Activities/IActivity.cs +++ b/OpenRa.Game/Traits/Activities/IActivity.cs @@ -1,7 +1,7 @@  -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { - interface IActivity + public interface IActivity { IActivity NextActivity { get; set; } IActivity Tick( Actor self ); diff --git a/OpenRa.Game/Traits/Activities/Idle.cs b/OpenRa.Game/Traits/Activities/Idle.cs index 129bd7f6ec..f9b4729544 100644 --- a/OpenRa.Game/Traits/Activities/Idle.cs +++ b/OpenRa.Game/Traits/Activities/Idle.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Idle : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Infiltrate.cs b/OpenRa.Game/Traits/Activities/Infiltrate.cs index c32f3c32d0..bea8c3f258 100644 --- a/OpenRa.Game/Traits/Activities/Infiltrate.cs +++ b/OpenRa.Game/Traits/Activities/Infiltrate.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Infiltrate : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Land.cs b/OpenRa.Game/Traits/Activities/Land.cs index e6f6145c7e..b517e0ae11 100644 --- a/OpenRa.Game/Traits/Activities/Land.cs +++ b/OpenRa.Game/Traits/Activities/Land.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Land : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Move.cs b/OpenRa.Game/Traits/Activities/Move.cs index ebab176413..2985ab68bd 100755 --- a/OpenRa.Game/Traits/Activities/Move.cs +++ b/OpenRa.Game/Traits/Activities/Move.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Move : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Rearm.cs b/OpenRa.Game/Traits/Activities/Rearm.cs index 1d872894f1..e3719c3918 100644 --- a/OpenRa.Game/Traits/Activities/Rearm.cs +++ b/OpenRa.Game/Traits/Activities/Rearm.cs @@ -1,6 +1,6 @@ using System.Linq; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Rearm : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Repair.cs b/OpenRa.Game/Traits/Activities/Repair.cs index 1edf56ae36..b6b63f566f 100644 --- a/OpenRa.Game/Traits/Activities/Repair.cs +++ b/OpenRa.Game/Traits/Activities/Repair.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Repair : IActivity { diff --git a/OpenRa.Game/Traits/Activities/ReturnToBase.cs b/OpenRa.Game/Traits/Activities/ReturnToBase.cs index 51cac44f92..b366fbc3e8 100644 --- a/OpenRa.Game/Traits/Activities/ReturnToBase.cs +++ b/OpenRa.Game/Traits/Activities/ReturnToBase.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class ReturnToBase : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Sell.cs b/OpenRa.Game/Traits/Activities/Sell.cs index a185d47a7c..c418b5a385 100644 --- a/OpenRa.Game/Traits/Activities/Sell.cs +++ b/OpenRa.Game/Traits/Activities/Sell.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Sell : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Steal.cs b/OpenRa.Game/Traits/Activities/Steal.cs index 3fbf7751d6..1e74d74e47 100644 --- a/OpenRa.Game/Traits/Activities/Steal.cs +++ b/OpenRa.Game/Traits/Activities/Steal.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Steal : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Teleport.cs b/OpenRa.Game/Traits/Activities/Teleport.cs index f638a60a7b..05a9369e7e 100644 --- a/OpenRa.Game/Traits/Activities/Teleport.cs +++ b/OpenRa.Game/Traits/Activities/Teleport.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Teleport : IActivity { diff --git a/OpenRa.Game/Traits/Activities/Turn.cs b/OpenRa.Game/Traits/Activities/Turn.cs index a992a2aedd..d5c2338b48 100755 --- a/OpenRa.Game/Traits/Activities/Turn.cs +++ b/OpenRa.Game/Traits/Activities/Turn.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class Turn : IActivity { diff --git a/OpenRa.Game/Traits/Activities/UndeployMcv.cs b/OpenRa.Game/Traits/Activities/UndeployMcv.cs index 912c993616..fd40863ea2 100644 --- a/OpenRa.Game/Traits/Activities/UndeployMcv.cs +++ b/OpenRa.Game/Traits/Activities/UndeployMcv.cs @@ -1,6 +1,6 @@ using System; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class UndeployMcv : IActivity { diff --git a/OpenRa.Game/Traits/Activities/UnloadCargo.cs b/OpenRa.Game/Traits/Activities/UnloadCargo.cs index 3b5a1fe3a7..1c077e5a71 100644 --- a/OpenRa.Game/Traits/Activities/UnloadCargo.cs +++ b/OpenRa.Game/Traits/Activities/UnloadCargo.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits.Activities +namespace OpenRa.Traits.Activities { class UnloadCargo : IActivity { diff --git a/OpenRa.Game/Traits/AttackBase.cs b/OpenRa.Game/Traits/AttackBase.cs index b5f5bb66dd..272b04a0aa 100644 --- a/OpenRa.Game/Traits/AttackBase.cs +++ b/OpenRa.Game/Traits/AttackBase.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using IjwFramework.Types; -using OpenRa.Game.Effects; +using OpenRa.Effects; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class AttackBaseInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/AttackFrontal.cs b/OpenRa.Game/Traits/AttackFrontal.cs index a300fc308d..8997e2354a 100644 --- a/OpenRa.Game/Traits/AttackFrontal.cs +++ b/OpenRa.Game/Traits/AttackFrontal.cs @@ -1,6 +1,6 @@ using System; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { abstract class AttackFrontal : AttackBase { diff --git a/OpenRa.Game/Traits/AttackHeli.cs b/OpenRa.Game/Traits/AttackHeli.cs index 41d3fc2c51..cef9c3c16b 100644 --- a/OpenRa.Game/Traits/AttackHeli.cs +++ b/OpenRa.Game/Traits/AttackHeli.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class AttackHeliInfo : AttackBaseInfo { diff --git a/OpenRa.Game/Traits/AttackInfo.cs b/OpenRa.Game/Traits/AttackInfo.cs index e1e7ce6f92..d874e080fe 100644 --- a/OpenRa.Game/Traits/AttackInfo.cs +++ b/OpenRa.Game/Traits/AttackInfo.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class AttackInfo { diff --git a/OpenRa.Game/Traits/AttackPlane.cs b/OpenRa.Game/Traits/AttackPlane.cs index b4f4f9e02a..289cea7cf9 100644 --- a/OpenRa.Game/Traits/AttackPlane.cs +++ b/OpenRa.Game/Traits/AttackPlane.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class AttackPlaneInfo : AttackBaseInfo { diff --git a/OpenRa.Game/Traits/AttackTurreted.cs b/OpenRa.Game/Traits/AttackTurreted.cs index 33aef0b1ad..664afc3269 100755 --- a/OpenRa.Game/Traits/AttackTurreted.cs +++ b/OpenRa.Game/Traits/AttackTurreted.cs @@ -1,7 +1,7 @@ using System; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class AttackTurretedInfo : AttackBaseInfo { diff --git a/OpenRa.Game/Traits/AutoHeal.cs b/OpenRa.Game/Traits/AutoHeal.cs index c9918aee83..b4a37b5b61 100644 --- a/OpenRa.Game/Traits/AutoHeal.cs +++ b/OpenRa.Game/Traits/AutoHeal.cs @@ -1,7 +1,7 @@ using System.Linq; -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class AutoHealInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/AutoTarget.cs b/OpenRa.Game/Traits/AutoTarget.cs index a6721b6cfb..59e23260fd 100644 --- a/OpenRa.Game/Traits/AutoTarget.cs +++ b/OpenRa.Game/Traits/AutoTarget.cs @@ -1,6 +1,6 @@ using System.Linq; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class AutoTargetInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/BelowUnits.cs b/OpenRa.Game/Traits/BelowUnits.cs index f5d82d6727..0b6af66df6 100644 --- a/OpenRa.Game/Traits/BelowUnits.cs +++ b/OpenRa.Game/Traits/BelowUnits.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class BelowUnitsInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/Buildable.cs b/OpenRa.Game/Traits/Buildable.cs index 9c061390e1..28c6d408e3 100755 --- a/OpenRa.Game/Traits/Buildable.cs +++ b/OpenRa.Game/Traits/Buildable.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class BuildableInfo : StatelessTraitInfo { diff --git a/OpenRa.Game/Traits/Building.cs b/OpenRa.Game/Traits/Building.cs index f5920cfae7..018989d155 100644 --- a/OpenRa.Game/Traits/Building.cs +++ b/OpenRa.Game/Traits/Building.cs @@ -1,15 +1,11 @@ -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits.Activities; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using OpenRa.Game.Effects; -using OpenRa.Game.Graphics; +using System; +using OpenRa.Effects; +using OpenRa.GameRules; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { - class OwnedActorInfo + public class OwnedActorInfo { public readonly int HP = 0; public readonly ArmorType Armor = ArmorType.none; @@ -18,7 +14,7 @@ namespace OpenRa.Game.Traits public readonly bool WaterBound = false; } - class BuildingInfo : OwnedActorInfo, ITraitInfo + public class BuildingInfo : OwnedActorInfo, ITraitInfo { public readonly int Power = 0; public readonly bool RequiresPower = false; diff --git a/OpenRa.Game/Traits/C4Demolition.cs b/OpenRa.Game/Traits/C4Demolition.cs index 68ae518333..44c0bc21e2 100644 --- a/OpenRa.Game/Traits/C4Demolition.cs +++ b/OpenRa.Game/Traits/C4Demolition.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class C4DemolitionInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/Cargo.cs b/OpenRa.Game/Traits/Cargo.cs index daa48cc5f5..bd4e50be7a 100644 --- a/OpenRa.Game/Traits/Cargo.cs +++ b/OpenRa.Game/Traits/Cargo.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits.Activities; +using OpenRa.GameRules; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class CargoInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/ChronoshiftDeploy.cs b/OpenRa.Game/Traits/ChronoshiftDeploy.cs index 5b814d1038..50794e1d57 100644 --- a/OpenRa.Game/Traits/ChronoshiftDeploy.cs +++ b/OpenRa.Game/Traits/ChronoshiftDeploy.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Orders; +using OpenRa.Orders; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ChronoshiftDeployInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/ChronoshiftPaletteEffect.cs b/OpenRa.Game/Traits/ChronoshiftPaletteEffect.cs index 218919b93a..1037581c57 100644 --- a/OpenRa.Game/Traits/ChronoshiftPaletteEffect.cs +++ b/OpenRa.Game/Traits/ChronoshiftPaletteEffect.cs @@ -1,7 +1,7 @@ using System.Drawing; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ChronoshiftPaletteEffectInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/Chronoshiftable.cs b/OpenRa.Game/Traits/Chronoshiftable.cs index 067c43716e..34008d515c 100644 --- a/OpenRa.Game/Traits/Chronoshiftable.cs +++ b/OpenRa.Game/Traits/Chronoshiftable.cs @@ -1,9 +1,9 @@ -using OpenRa.Game.Traits; -using OpenRa.Game.Orders; +using OpenRa.Traits; +using OpenRa.Orders; using System.Collections.Generic; using System.Linq; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ChronoshiftableInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Chronosphere.cs b/OpenRa.Game/Traits/Chronosphere.cs index 2dcbef7490..db5cd3baea 100644 --- a/OpenRa.Game/Traits/Chronosphere.cs +++ b/OpenRa.Game/Traits/Chronosphere.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ChronosphereInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/Cloak.cs b/OpenRa.Game/Traits/Cloak.cs index b782d854e1..be64914098 100644 --- a/OpenRa.Game/Traits/Cloak.cs +++ b/OpenRa.Game/Traits/Cloak.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class CloakInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/ConstructionYard.cs b/OpenRa.Game/Traits/ConstructionYard.cs index 4d4368b21a..be1fb1d5c7 100644 --- a/OpenRa.Game/Traits/ConstructionYard.cs +++ b/OpenRa.Game/Traits/ConstructionYard.cs @@ -1,7 +1,7 @@ -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits.Activities; +using OpenRa.GameRules; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ConstructionYardInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/DemoTruck.cs b/OpenRa.Game/Traits/DemoTruck.cs index 2816729f98..7f8bfd65b5 100644 --- a/OpenRa.Game/Traits/DemoTruck.cs +++ b/OpenRa.Game/Traits/DemoTruck.cs @@ -1,10 +1,10 @@ -using OpenRa.Game.Effects; -using OpenRa.Game.Traits; +using OpenRa.Effects; +using OpenRa.Traits; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Orders; +using OpenRa.Orders; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class DemoTruckInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/EngineerCapture.cs b/OpenRa.Game/Traits/EngineerCapture.cs index efc03dc6cd..b02900cbbb 100644 --- a/OpenRa.Game/Traits/EngineerCapture.cs +++ b/OpenRa.Game/Traits/EngineerCapture.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class EngineerCaptureInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/Explodes.cs b/OpenRa.Game/Traits/Explodes.cs index 2b058de917..3cfc307bdf 100644 --- a/OpenRa.Game/Traits/Explodes.cs +++ b/OpenRa.Game/Traits/Explodes.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Effects; +using OpenRa.Effects; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ExplodesInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/Fake.cs b/OpenRa.Game/Traits/Fake.cs index 9eb9127856..fbc7e07a94 100644 --- a/OpenRa.Game/Traits/Fake.cs +++ b/OpenRa.Game/Traits/Fake.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class FakeInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/GeneratesGap.cs b/OpenRa.Game/Traits/GeneratesGap.cs index 7c68de6804..74ce3ad971 100644 --- a/OpenRa.Game/Traits/GeneratesGap.cs +++ b/OpenRa.Game/Traits/GeneratesGap.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using OpenRa.FileFormats; -using OpenRa.Game.Support; -using OpenRa.Game.Traits; +using OpenRa.Support; +using OpenRa.Traits; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class GeneratesGapInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/GpsLaunchSite.cs b/OpenRa.Game/Traits/GpsLaunchSite.cs index ed10b56620..f5401863bc 100644 --- a/OpenRa.Game/Traits/GpsLaunchSite.cs +++ b/OpenRa.Game/Traits/GpsLaunchSite.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Effects; +using OpenRa.Effects; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class GpsLaunchSiteInfo : StatelessTraitInfo { } class GpsLaunchSite { } diff --git a/OpenRa.Game/Traits/Harvester.cs b/OpenRa.Game/Traits/Harvester.cs index d9f72f592f..2c2273f7f2 100644 --- a/OpenRa.Game/Traits/Harvester.cs +++ b/OpenRa.Game/Traits/Harvester.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class HarvesterInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Helicopter.cs b/OpenRa.Game/Traits/Helicopter.cs index 87f2f28a03..540cb953a3 100644 --- a/OpenRa.Game/Traits/Helicopter.cs +++ b/OpenRa.Game/Traits/Helicopter.cs @@ -1,9 +1,9 @@ using System; using System.Linq; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits.Activities; +using OpenRa.GameRules; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class HelicopterInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/InvisibleToOthers.cs b/OpenRa.Game/Traits/InvisibleToOthers.cs index dab24dfc59..7548c9a0c9 100644 --- a/OpenRa.Game/Traits/InvisibleToOthers.cs +++ b/OpenRa.Game/Traits/InvisibleToOthers.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class InvisibleToOthersInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/IronCurtain.cs b/OpenRa.Game/Traits/IronCurtain.cs index e2bb3b0055..e0da51d8f1 100644 --- a/OpenRa.Game/Traits/IronCurtain.cs +++ b/OpenRa.Game/Traits/IronCurtain.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class IronCurtainInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/IronCurtainable.cs b/OpenRa.Game/Traits/IronCurtainable.cs index e00474fdd1..3645556022 100644 --- a/OpenRa.Game/Traits/IronCurtainable.cs +++ b/OpenRa.Game/Traits/IronCurtainable.cs @@ -1,7 +1,7 @@ using System.Linq; -using OpenRa.Game.Effects; +using OpenRa.Effects; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class IronCurtainableInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/LightPaletteRotator.cs b/OpenRa.Game/Traits/LightPaletteRotator.cs index 330708e685..e9313656d2 100644 --- a/OpenRa.Game/Traits/LightPaletteRotator.cs +++ b/OpenRa.Game/Traits/LightPaletteRotator.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class LightPaletteRotatorInfo : StatelessTraitInfo { } class LightPaletteRotator : ITick, IPaletteModifier diff --git a/OpenRa.Game/Traits/LimitedAmmo.cs b/OpenRa.Game/Traits/LimitedAmmo.cs index 5d1a705e6d..6d5f2bc5d4 100644 --- a/OpenRa.Game/Traits/LimitedAmmo.cs +++ b/OpenRa.Game/Traits/LimitedAmmo.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class LimitedAmmoInfo : ITraitInfo { @@ -9,7 +9,7 @@ namespace OpenRa.Game.Traits public object Create(Actor self) { return new LimitedAmmo(self); } } - class LimitedAmmo : INotifyAttack, IPips + public class LimitedAmmo : INotifyAttack, IPips { [Sync] int ammo; diff --git a/OpenRa.Game/Traits/McvDeploy.cs b/OpenRa.Game/Traits/McvDeploy.cs index ac6c0ce924..d508faae19 100644 --- a/OpenRa.Game/Traits/McvDeploy.cs +++ b/OpenRa.Game/Traits/McvDeploy.cs @@ -1,7 +1,7 @@ -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits.Activities; +using OpenRa.GameRules; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class McvDeployInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Mine.cs b/OpenRa.Game/Traits/Mine.cs index c73d5b1ff6..319d672c39 100644 --- a/OpenRa.Game/Traits/Mine.cs +++ b/OpenRa.Game/Traits/Mine.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Effects; +using OpenRa.Effects; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class MineInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/MineImmune.cs b/OpenRa.Game/Traits/MineImmune.cs index 04f488a096..ad195c13a3 100644 --- a/OpenRa.Game/Traits/MineImmune.cs +++ b/OpenRa.Game/Traits/MineImmune.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class MineImmuneInfo : StatelessTraitInfo { } class MineImmune { } diff --git a/OpenRa.Game/Traits/Minelayer.cs b/OpenRa.Game/Traits/Minelayer.cs index 0e6092f922..6909689b24 100644 --- a/OpenRa.Game/Traits/Minelayer.cs +++ b/OpenRa.Game/Traits/Minelayer.cs @@ -1,48 +1,5 @@ using System.Linq; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { - class MinelayerInfo : ITraitInfo - { - public readonly string Mine = "minv"; - - public object Create( Actor self ) - { - return new Minelayer(); - } - } - - class Minelayer : IIssueOrder, IResolveOrder - { - public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor) - { - var limitedAmmo = self.traits.GetOrDefault(); - if (limitedAmmo != null && !limitedAmmo.HasAmmo()) - return null; - - // Ensure that the cell is empty except for the minelayer - if (Game.UnitInfluence.GetUnitsAt(xy).Any(a => a != self)) - return null; - - if (mi.Button == MouseButton.Right && underCursor == self) - return new Order("Deploy", self, null, int2.Zero, null); - - return null; - } - - public void ResolveOrder(Actor self, Order order) - { - if (order.OrderString == "Deploy") - { - var limitedAmmo = self.traits.GetOrDefault(); - if (limitedAmmo != null) - limitedAmmo.Attacking(self); - - // todo: delay a bit? (req making deploy-mine an activity) - - Game.world.AddFrameEndTask( - w => w.Add(new Actor(self.Info.Traits.Get().Mine, self.Location, self.Owner))); - } - } - } } diff --git a/OpenRa.Game/Traits/Mobile.cs b/OpenRa.Game/Traits/Mobile.cs index 2a1da2f3aa..b5a456cac4 100644 --- a/OpenRa.Game/Traits/Mobile.cs +++ b/OpenRa.Game/Traits/Mobile.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class MobileInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Passenger.cs b/OpenRa.Game/Traits/Passenger.cs index 2339b37325..e48b0806a2 100644 --- a/OpenRa.Game/Traits/Passenger.cs +++ b/OpenRa.Game/Traits/Passenger.cs @@ -1,7 +1,7 @@ using System.Linq; -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class PassengerInfo : StatelessTraitInfo {} diff --git a/OpenRa.Game/Traits/Plane.cs b/OpenRa.Game/Traits/Plane.cs index 613bf1863d..6297fd071e 100644 --- a/OpenRa.Game/Traits/Plane.cs +++ b/OpenRa.Game/Traits/Plane.cs @@ -1,7 +1,7 @@ using System; -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class PlaneInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Production.cs b/OpenRa.Game/Traits/Production.cs index 28cbda8be8..7b261885ae 100755 --- a/OpenRa.Game/Traits/Production.cs +++ b/OpenRa.Game/Traits/Production.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ProductionInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/ProductionQueue.cs b/OpenRa.Game/Traits/ProductionQueue.cs index 52da243a5b..f78dadfa4e 100755 --- a/OpenRa.Game/Traits/ProductionQueue.cs +++ b/OpenRa.Game/Traits/ProductionQueue.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using IjwFramework.Collections; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ProductionQueueInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/ProductionSurround.cs b/OpenRa.Game/Traits/ProductionSurround.cs index 0bf3ec8066..3d79f27f3d 100644 --- a/OpenRa.Game/Traits/ProductionSurround.cs +++ b/OpenRa.Game/Traits/ProductionSurround.cs @@ -1,7 +1,7 @@ using System.Linq; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ProductionSurroundInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/ProvidesRadar.cs b/OpenRa.Game/Traits/ProvidesRadar.cs index ec6c0c0536..f1fa031358 100644 --- a/OpenRa.Game/Traits/ProvidesRadar.cs +++ b/OpenRa.Game/Traits/ProvidesRadar.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ProvidesRadarInfo : StatelessTraitInfo {} diff --git a/OpenRa.Game/Traits/RallyPoint.cs b/OpenRa.Game/Traits/RallyPoint.cs index 6a7fc5c434..dc4187566d 100644 --- a/OpenRa.Game/Traits/RallyPoint.cs +++ b/OpenRa.Game/Traits/RallyPoint.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.Orders; +using OpenRa.Graphics; +using OpenRa.Orders; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RallyPointInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/RenderBuilding.cs b/OpenRa.Game/Traits/RenderBuilding.cs index 1024581177..92ff37e575 100644 --- a/OpenRa.Game/Traits/RenderBuilding.cs +++ b/OpenRa.Game/Traits/RenderBuilding.cs @@ -1,7 +1,7 @@ using System; -using OpenRa.Game.Effects; +using OpenRa.Effects; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderBuildingInfo : RenderSimpleInfo { diff --git a/OpenRa.Game/Traits/RenderBuildingCharge.cs b/OpenRa.Game/Traits/RenderBuildingCharge.cs index 9c6b88efd5..01efb73cca 100644 --- a/OpenRa.Game/Traits/RenderBuildingCharge.cs +++ b/OpenRa.Game/Traits/RenderBuildingCharge.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderBuildingChargeInfo : RenderBuildingInfo { diff --git a/OpenRa.Game/Traits/RenderBuildingOre.cs b/OpenRa.Game/Traits/RenderBuildingOre.cs index 1e06072a1e..cb9dc2c061 100644 --- a/OpenRa.Game/Traits/RenderBuildingOre.cs +++ b/OpenRa.Game/Traits/RenderBuildingOre.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderBuildingOreInfo : RenderBuildingInfo { diff --git a/OpenRa.Game/Traits/RenderBuildingTurreted.cs b/OpenRa.Game/Traits/RenderBuildingTurreted.cs index 021c23ad65..d005f3b0c2 100644 --- a/OpenRa.Game/Traits/RenderBuildingTurreted.cs +++ b/OpenRa.Game/Traits/RenderBuildingTurreted.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderBuildingTurretedInfo : RenderBuildingInfo { diff --git a/OpenRa.Game/Traits/RenderBuildingWarFactory.cs b/OpenRa.Game/Traits/RenderBuildingWarFactory.cs index 6386120fa5..d070926775 100644 --- a/OpenRa.Game/Traits/RenderBuildingWarFactory.cs +++ b/OpenRa.Game/Traits/RenderBuildingWarFactory.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderWarFactoryInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/RenderInfantry.cs b/OpenRa.Game/Traits/RenderInfantry.cs index d3edc1ee33..f26b63aef3 100644 --- a/OpenRa.Game/Traits/RenderInfantry.cs +++ b/OpenRa.Game/Traits/RenderInfantry.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Effects; +using OpenRa.Effects; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderInfantryInfo : RenderSimpleInfo { diff --git a/OpenRa.Game/Traits/RenderSimple.cs b/OpenRa.Game/Traits/RenderSimple.cs index 32aa694657..895c73ceb9 100644 --- a/OpenRa.Game/Traits/RenderSimple.cs +++ b/OpenRa.Game/Traits/RenderSimple.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { abstract class RenderSimpleInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/RenderSpy.cs b/OpenRa.Game/Traits/RenderSpy.cs index 9a75d316ac..647084722a 100644 --- a/OpenRa.Game/Traits/RenderSpy.cs +++ b/OpenRa.Game/Traits/RenderSpy.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderSpyInfo : RenderInfantryInfo { diff --git a/OpenRa.Game/Traits/RenderUnit.cs b/OpenRa.Game/Traits/RenderUnit.cs index 067b4ccc90..ee9eb2f45a 100644 --- a/OpenRa.Game/Traits/RenderUnit.cs +++ b/OpenRa.Game/Traits/RenderUnit.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using OpenRa.Game.Graphics; -using OpenRa.Game.GameRules; +using OpenRa.Graphics; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderUnitInfo : RenderSimpleInfo { diff --git a/OpenRa.Game/Traits/RenderUnitMuzzleFlash.cs b/OpenRa.Game/Traits/RenderUnitMuzzleFlash.cs index 9e18c5830a..1299d44210 100644 --- a/OpenRa.Game/Traits/RenderUnitMuzzleFlash.cs +++ b/OpenRa.Game/Traits/RenderUnitMuzzleFlash.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderUnitMuzzleFlashInfo : RenderUnitInfo { diff --git a/OpenRa.Game/Traits/RenderUnitReload.cs b/OpenRa.Game/Traits/RenderUnitReload.cs index ea966477c4..192089d88c 100644 --- a/OpenRa.Game/Traits/RenderUnitReload.cs +++ b/OpenRa.Game/Traits/RenderUnitReload.cs @@ -1,6 +1,6 @@ using System.Linq; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderUnitReloadInfo : RenderUnitInfo { diff --git a/OpenRa.Game/Traits/RenderUnitRotor.cs b/OpenRa.Game/Traits/RenderUnitRotor.cs index 73dfcd581b..98a1834eba 100755 --- a/OpenRa.Game/Traits/RenderUnitRotor.cs +++ b/OpenRa.Game/Traits/RenderUnitRotor.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderUnitRotorInfo : RenderUnitInfo { diff --git a/OpenRa.Game/Traits/RenderUnitSpinner.cs b/OpenRa.Game/Traits/RenderUnitSpinner.cs index ff2237655a..f9930dc7e2 100755 --- a/OpenRa.Game/Traits/RenderUnitSpinner.cs +++ b/OpenRa.Game/Traits/RenderUnitSpinner.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderUnitSpinnerInfo : RenderUnitInfo { diff --git a/OpenRa.Game/Traits/RenderUnitTurreted.cs b/OpenRa.Game/Traits/RenderUnitTurreted.cs index 30a204f6a0..5cd0326057 100644 --- a/OpenRa.Game/Traits/RenderUnitTurreted.cs +++ b/OpenRa.Game/Traits/RenderUnitTurreted.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RenderUnitTurretedInfo : RenderUnitInfo { diff --git a/OpenRa.Game/Traits/Repairable.cs b/OpenRa.Game/Traits/Repairable.cs index 0cada1212e..93005c34b7 100644 --- a/OpenRa.Game/Traits/Repairable.cs +++ b/OpenRa.Game/Traits/Repairable.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class RepairableInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Reservable.cs b/OpenRa.Game/Traits/Reservable.cs index b25b610839..b57d280a5a 100644 --- a/OpenRa.Game/Traits/Reservable.cs +++ b/OpenRa.Game/Traits/Reservable.cs @@ -1,6 +1,6 @@ using System; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ReservableInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/SeedsOre.cs b/OpenRa.Game/Traits/SeedsOre.cs index a722e3f858..046b061a9b 100644 --- a/OpenRa.Game/Traits/SeedsOre.cs +++ b/OpenRa.Game/Traits/SeedsOre.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class SeedsOreInfo : StatelessTraitInfo {} diff --git a/OpenRa.Game/Traits/Selectable.cs b/OpenRa.Game/Traits/Selectable.cs index 5e7a42c575..494688975b 100755 --- a/OpenRa.Game/Traits/Selectable.cs +++ b/OpenRa.Game/Traits/Selectable.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class SelectableInfo : StatelessTraitInfo { diff --git a/OpenRa.Game/Traits/SelfHealing.cs b/OpenRa.Game/Traits/SelfHealing.cs index e6fe64f48f..0dcd377916 100644 --- a/OpenRa.Game/Traits/SelfHealing.cs +++ b/OpenRa.Game/Traits/SelfHealing.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class SelfHealingInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Spy.cs b/OpenRa.Game/Traits/Spy.cs index 922b0573b4..393481082c 100644 --- a/OpenRa.Game/Traits/Spy.cs +++ b/OpenRa.Game/Traits/Spy.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class SpyInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/SquishByTank.cs b/OpenRa.Game/Traits/SquishByTank.cs index baaeacb70b..990053b0f0 100644 --- a/OpenRa.Game/Traits/SquishByTank.cs +++ b/OpenRa.Game/Traits/SquishByTank.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class SquishByTankInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/StoresOre.cs b/OpenRa.Game/Traits/StoresOre.cs index f85edaa63c..cdc54e538f 100644 --- a/OpenRa.Game/Traits/StoresOre.cs +++ b/OpenRa.Game/Traits/StoresOre.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System; -using OpenRa.Game.GameRules; -namespace OpenRa.Game.Traits +using OpenRa.GameRules; +namespace OpenRa.Traits { class StoresOreInfo : StatelessTraitInfo { diff --git a/OpenRa.Game/Traits/Submarine.cs b/OpenRa.Game/Traits/Submarine.cs index 79033ed5b5..81af54a7dc 100644 --- a/OpenRa.Game/Traits/Submarine.cs +++ b/OpenRa.Game/Traits/Submarine.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class SubmarineInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/TakeCover.cs b/OpenRa.Game/Traits/TakeCover.cs index abd2148592..fb98bd0173 100644 --- a/OpenRa.Game/Traits/TakeCover.cs +++ b/OpenRa.Game/Traits/TakeCover.cs @@ -1,5 +1,5 @@  -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class TakeCoverInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Thief.cs b/OpenRa.Game/Traits/Thief.cs index 8bc00522f8..4d0e60b336 100644 --- a/OpenRa.Game/Traits/Thief.cs +++ b/OpenRa.Game/Traits/Thief.cs @@ -1,7 +1,7 @@ -using OpenRa.Game.Traits.Activities; +using OpenRa.Traits.Activities; using System.Collections.Generic; using System.Linq; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class ThiefInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/TraitsInterfaces.cs b/OpenRa.Game/Traits/TraitsInterfaces.cs index 26170266d1..3f50c948da 100644 --- a/OpenRa.Game/Traits/TraitsInterfaces.cs +++ b/OpenRa.Game/Traits/TraitsInterfaces.cs @@ -1,21 +1,21 @@ using System.Collections.Generic; using System.Drawing; using IjwFramework.Types; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; +using OpenRa.GameRules; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { - enum DamageState { Normal, Half, Dead }; + public enum DamageState { Normal, Half, Dead }; // depends on the order of pips in WorldRenderer.cs! - enum PipType { Transparent, Green, Yellow, Red, Gray }; - enum TagType { None, Fake, Primary }; + public enum PipType { Transparent, Green, Yellow, Red, Gray }; + public enum TagType { None, Fake, Primary }; - interface ITick { void Tick(Actor self); } - interface IRender { IEnumerable Render(Actor self); } - interface IIssueOrder { Order IssueOrder( Actor self, int2 xy, MouseInput mi, Actor underCursor ); } - interface IResolveOrder { void ResolveOrder( Actor self, Order order ); } + public interface ITick { void Tick(Actor self); } + public interface IRender { IEnumerable Render(Actor self); } + public interface IIssueOrder { Order IssueOrder( Actor self, int2 xy, MouseInput mi, Actor underCursor ); } + public interface IResolveOrder { void ResolveOrder(Actor self, Order order); } interface INotifySold { void Sold(Actor self); } interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } @@ -30,7 +30,7 @@ namespace OpenRa.Game.Traits bool Produce( Actor self, NewUnitInfo producee ); void SetPrimaryProducer(Actor self, bool isPrimary); } - interface IOccupySpace { IEnumerable OccupiedCells(); } + public interface IOccupySpace { IEnumerable OccupiedCells(); } interface INotifyAttack { void Attacking(Actor self); } interface IRenderModifier { IEnumerable ModifyRender(Actor self, IEnumerable r); } interface IDamageModifier { float GetDamageModifier(); } @@ -50,7 +50,7 @@ namespace OpenRa.Game.Traits bool IsCrushableBy(UnitMovementType umt, Player player); bool IsPathableCrush(UnitMovementType umt, Player player); } - struct Renderable + public struct Renderable { public readonly Sprite Sprite; public readonly float2 Pos; @@ -73,7 +73,7 @@ namespace OpenRa.Game.Traits public Renderable WithPos(float2 newPos) { return new Renderable(Sprite, newPos, Palette, ZOffset); } } - interface ITraitInfo { object Create(Actor self); } + public interface ITraitInfo { object Create(Actor self); } class StatelessTraitInfo : ITraitInfo where T : new() diff --git a/OpenRa.Game/Traits/Turreted.cs b/OpenRa.Game/Traits/Turreted.cs index 3df089fae2..a1f190951b 100644 --- a/OpenRa.Game/Traits/Turreted.cs +++ b/OpenRa.Game/Traits/Turreted.cs @@ -1,6 +1,6 @@ using System.Linq; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class TurretedInfo : ITraitInfo { diff --git a/OpenRa.Game/Traits/Unit.cs b/OpenRa.Game/Traits/Unit.cs index 9792f1da77..0594bf9955 100755 --- a/OpenRa.Game/Traits/Unit.cs +++ b/OpenRa.Game/Traits/Unit.cs @@ -1,6 +1,6 @@ -using OpenRa.Game.GameRules; +using OpenRa.GameRules; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class UnitInfo : OwnedActorInfo, ITraitInfo { diff --git a/OpenRa.Game/Traits/Util.cs b/OpenRa.Game/Traits/Util.cs index 4ac78ecf7a..069a7e09d9 100755 --- a/OpenRa.Game/Traits/Util.cs +++ b/OpenRa.Game/Traits/Util.cs @@ -1,10 +1,10 @@ using System; using System.Linq; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits.Activities; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Traits.Activities; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { static class Util { diff --git a/OpenRa.Game/Traits/WaterPaletteRotation.cs b/OpenRa.Game/Traits/WaterPaletteRotation.cs index 8b15caa8cb..9ce73301ec 100644 --- a/OpenRa.Game/Traits/WaterPaletteRotation.cs +++ b/OpenRa.Game/Traits/WaterPaletteRotation.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class WaterPaletteRotationInfo : StatelessTraitInfo { } diff --git a/OpenRa.Game/Traits/WithShadow.cs b/OpenRa.Game/Traits/WithShadow.cs index 5eb49890bc..b7013d43b8 100644 --- a/OpenRa.Game/Traits/WithShadow.cs +++ b/OpenRa.Game/Traits/WithShadow.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using OpenRa.Game.Graphics; +using OpenRa.Graphics; -namespace OpenRa.Game.Traits +namespace OpenRa.Traits { class WithShadowInfo : StatelessTraitInfo {} diff --git a/OpenRa.Game/UiOverlay.cs b/OpenRa.Game/UiOverlay.cs index 4c60fd59d3..f5491e383d 100644 --- a/OpenRa.Game/UiOverlay.cs +++ b/OpenRa.Game/UiOverlay.cs @@ -1,10 +1,10 @@ using System.Drawing; using System.Linq; -using OpenRa.Game.GameRules; -using OpenRa.Game.Graphics; -using OpenRa.Game.Traits; +using OpenRa.GameRules; +using OpenRa.Graphics; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { class UiOverlay { diff --git a/OpenRa.Game/UnitInfluenceMap.cs b/OpenRa.Game/UnitInfluenceMap.cs index c35e66ee0d..d86401d515 100644 --- a/OpenRa.Game/UnitInfluenceMap.cs +++ b/OpenRa.Game/UnitInfluenceMap.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using OpenRa.Game.Traits; +using OpenRa.Traits; -namespace OpenRa.Game +namespace OpenRa { - class UnitInfluenceMap + public class UnitInfluenceMap { List[,] influence = new List[128, 128]; readonly int2 searchDistance = new int2(2,2); @@ -60,18 +60,7 @@ namespace OpenRa.Game foreach( var ios in a.traits.WithInterface() ) foreach( var cell in ios.OccupiedCells() ) if (!influence[cell.X, cell.Y].Contains(a)) - //if( influence[ cell.X, cell.Y ] != a ) - throw new InvalidOperationException( "UIM: Sanity check failed B" ); - } - - [Conditional( "SANITY_CHECKS" )] - void SanityCheckAdd( IOccupySpace a ) - { - /* This check is too strict now that we can have multiple units in a cell - foreach( var c in a.OccupiedCells() ) - if( influence[c.X, c.Y].Any()) - throw new InvalidOperationException( "UIM: Sanity check failed (Add)" ); - */ + throw new InvalidOperationException( "UIM: Sanity check failed B" ); } public IEnumerable GetUnitsAt( int2 a ) @@ -81,7 +70,6 @@ namespace OpenRa.Game public void Add( Actor self, IOccupySpace unit ) { - SanityCheckAdd( unit ); foreach( var c in unit.OccupiedCells() ) influence[c.X, c.Y].Add(self); } diff --git a/OpenRa.Game/VoicePool.cs b/OpenRa.Game/VoicePool.cs index b6bdfa7eec..8d944db5ec 100644 --- a/OpenRa.Game/VoicePool.cs +++ b/OpenRa.Game/VoicePool.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace OpenRa.Game +namespace OpenRa { class VoicePool { diff --git a/OpenRa.Game/World.cs b/OpenRa.Game/World.cs index 83ce8d292f..a785b8a544 100644 --- a/OpenRa.Game/World.cs +++ b/OpenRa.Game/World.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; -using OpenRa.Game.Effects; -using OpenRa.Game.Support; +using OpenRa.Effects; +using OpenRa.Support; -namespace OpenRa.Game +namespace OpenRa { - class World + public class World { List actors = new List(); List effects = new List(); diff --git a/OpenRa.Mods.RA/Minelayer.cs b/OpenRa.Mods.RA/Minelayer.cs new file mode 100644 index 0000000000..6dd7a915e6 --- /dev/null +++ b/OpenRa.Mods.RA/Minelayer.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using OpenRa.Traits; +using OpenRa; + +namespace OpenRa.Mods.RA +{ + class MinelayerInfo : ITraitInfo + { + public readonly string Mine = "minv"; + + public object Create(Actor self) + { + return new Minelayer(); + } + } + + class Minelayer : IIssueOrder, IResolveOrder + { + public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor) + { + var limitedAmmo = self.traits.GetOrDefault(); + if (limitedAmmo != null && !limitedAmmo.HasAmmo()) + return null; + + // Ensure that the cell is empty except for the minelayer + if (Game.UnitInfluence.GetUnitsAt(xy).Any(a => a != self)) + return null; + + if (mi.Button == MouseButton.Right && underCursor == self) + return new Order("Deploy", self, null, int2.Zero, null); + + return null; + } + + public void ResolveOrder(Actor self, Order order) + { + if (order.OrderString == "Deploy") + { + var limitedAmmo = self.traits.GetOrDefault(); + if (limitedAmmo != null) + limitedAmmo.Attacking(self); + + // todo: delay a bit? (req making deploy-mine an activity) + + Game.world.AddFrameEndTask( + w => w.Add(new Actor(self.Info.Traits.Get().Mine, self.Location, self.Owner))); + } + } + } +} diff --git a/OpenRa.Mods.RA/OpenRa.Mods.RA.csproj b/OpenRa.Mods.RA/OpenRa.Mods.RA.csproj new file mode 100644 index 0000000000..42717417c7 --- /dev/null +++ b/OpenRa.Mods.RA/OpenRa.Mods.RA.csproj @@ -0,0 +1,69 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E} + Library + Properties + OpenRa.Mods.RA + OpenRa.Mods.RA + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA} + OpenRa.FileFormats + + + {0DFB103F-2962-400F-8C6D-E2C28CCBA633} + OpenRa.Game + + + + + \ No newline at end of file diff --git a/OpenRa.Mods.RA/Properties/AssemblyInfo.cs b/OpenRa.Mods.RA/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..7d3d51e820 --- /dev/null +++ b/OpenRa.Mods.RA/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenRa.Mods.RA")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenRa.Mods.RA")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("23828b43-3536-4681-bc2f-2eb2e0972354")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRa.sln b/OpenRa.sln index 62265d1394..97694b7989 100644 --- a/OpenRa.sln +++ b/OpenRa.sln @@ -15,6 +15,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Server", "OpenRA.Ser EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RulesConverter", "RulesConverter\RulesConverter.csproj", "{BBE7C0D7-7529-4C34-9910-206866F204EF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRa.Mods.RA", "OpenRa.Mods.RA\OpenRa.Mods.RA.csproj", "{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mods", "Mods", "{F80861C1-DD5C-40A4-94B4-02D96318AE95}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug (x86)|Any CPU = Debug (x86)|Any CPU @@ -161,8 +165,31 @@ Global {BBE7C0D7-7529-4C34-9910-206866F204EF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {BBE7C0D7-7529-4C34-9910-206866F204EF}.Release|Mixed Platforms.Build.0 = Release|Any CPU {BBE7C0D7-7529-4C34-9910-206866F204EF}.Release|Win32.ActiveCfg = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug (x86)|Any CPU.ActiveCfg = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug (x86)|Any CPU.Build.0 = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug (x86)|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug (x86)|Mixed Platforms.Build.0 = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug (x86)|Win32.ActiveCfg = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Debug|Win32.ActiveCfg = Debug|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release (x86)|Any CPU.ActiveCfg = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release (x86)|Any CPU.Build.0 = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release (x86)|Mixed Platforms.ActiveCfg = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release (x86)|Mixed Platforms.Build.0 = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release (x86)|Win32.ActiveCfg = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Any CPU.Build.0 = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}.Release|Win32.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E} = {F80861C1-DD5C-40A4-94B4-02D96318AE95} + EndGlobalSection EndGlobal