From 91bc1acca3b16ea01588520ce4053f54d2e814c5 Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sat, 14 Jun 2014 01:37:39 +1200 Subject: [PATCH 1/8] Fixed selectedAuthor in ModBrowserLogic not being the correct value if mod.Author is null --- OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs index 20baddfc9d..c0395ff430 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs @@ -150,7 +150,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic void SelectMod(ModMetadata mod) { selectedMod = mod; - selectedAuthor = "By " + mod.Author ?? "unknown author"; + selectedAuthor = "By " + (mod.Author ?? "unknown author"); selectedDescription = (mod.Description ?? "").Replace("\\n", "\n"); var selectedIndex = Array.IndexOf(allMods, mod); if (selectedIndex - modOffset > 4) From 375fc1c5f12a79350da77d0b32f7cc757162abca Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sat, 14 Jun 2014 01:51:13 +1200 Subject: [PATCH 2/8] Remove redundant constructors --- OpenRA.Mods.RA/Buildings/Demolishable.cs | 2 -- OpenRA.Mods.RA/Console/DevCommands.cs | 2 -- OpenRA.Mods.RA/Console/PlayerCommands.cs | 2 -- 3 files changed, 6 deletions(-) diff --git a/OpenRA.Mods.RA/Buildings/Demolishable.cs b/OpenRA.Mods.RA/Buildings/Demolishable.cs index 7afa32ca47..2495ff493e 100644 --- a/OpenRA.Mods.RA/Buildings/Demolishable.cs +++ b/OpenRA.Mods.RA/Buildings/Demolishable.cs @@ -23,8 +23,6 @@ namespace OpenRA.Mods.RA public class Demolishable : IDemolishable { - public Demolishable() { } - public void Demolish(Actor self, Actor saboteur) { self.Kill(saboteur); diff --git a/OpenRA.Mods.RA/Console/DevCommands.cs b/OpenRA.Mods.RA/Console/DevCommands.cs index 1a2ba4a548..22a3b1b0a1 100644 --- a/OpenRA.Mods.RA/Console/DevCommands.cs +++ b/OpenRA.Mods.RA/Console/DevCommands.cs @@ -22,8 +22,6 @@ namespace OpenRA.Mods.RA { World world; - public DevCommands() { } - public void WorldLoaded(World w, WorldRenderer wr) { world = w; diff --git a/OpenRA.Mods.RA/Console/PlayerCommands.cs b/OpenRA.Mods.RA/Console/PlayerCommands.cs index 5df5326dbd..fd88f94912 100644 --- a/OpenRA.Mods.RA/Console/PlayerCommands.cs +++ b/OpenRA.Mods.RA/Console/PlayerCommands.cs @@ -19,8 +19,6 @@ namespace OpenRA.Mods.RA { World world; - public PlayerCommands() { } - public void WorldLoaded(World w, WorldRenderer wr) { world = w; From 6b85660d7d1bab4ba8d3f8abfbddbdb564866e2b Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sat, 14 Jun 2014 01:57:46 +1200 Subject: [PATCH 3/8] Compact lambda expressions in some (not all) places --- OpenRA.Game/Settings.cs | 5 +---- OpenRA.Game/Widgets/ButtonWidget.cs | 2 +- OpenRA.Game/Widgets/SpriteWidget.cs | 2 +- OpenRA.Mods.RA/DemoTruck.cs | 5 +---- OpenRA.Mods.RA/Render/RenderUnit.cs | 2 +- .../Widgets/Logic/DownloadPackagesLogic.cs | 16 +++++----------- OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs | 5 +---- .../Widgets/Logic/ReplayBrowserLogic.cs | 13 +++++-------- 8 files changed, 16 insertions(+), 34 deletions(-) diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index b281737c74..284b7cc6f5 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -230,10 +230,7 @@ namespace OpenRA var err1 = FieldLoader.UnknownFieldAction; var err2 = FieldLoader.InvalidValueAction; - FieldLoader.UnknownFieldAction = (s, f) => - { - Console.WriteLine("Ignoring unknown field `{0}` on `{1}`".F(s, f.Name)); - }; + FieldLoader.UnknownFieldAction = (s, f) => Console.WriteLine("Ignoring unknown field `{0}` on `{1}`".F(s, f.Name)); if (File.Exists(settingsFile)) { diff --git a/OpenRA.Game/Widgets/ButtonWidget.cs b/OpenRA.Game/Widgets/ButtonWidget.cs index 862d2257ee..19a3a322cb 100644 --- a/OpenRA.Game/Widgets/ButtonWidget.cs +++ b/OpenRA.Game/Widgets/ButtonWidget.cs @@ -60,7 +60,7 @@ namespace OpenRA.Widgets { this.modRules = modRules; - GetText = () => { return Text; }; + GetText = () => Text; GetColor = () => TextColor; GetColorDisabled = () => TextColorDisabled; GetContrastColor = () => ContrastColor; diff --git a/OpenRA.Game/Widgets/SpriteWidget.cs b/OpenRA.Game/Widgets/SpriteWidget.cs index 5c9a5ab860..7b3fbde15c 100644 --- a/OpenRA.Game/Widgets/SpriteWidget.cs +++ b/OpenRA.Game/Widgets/SpriteWidget.cs @@ -24,7 +24,7 @@ namespace OpenRA.Widgets [ObjectCreator.UseCtor] public SpriteWidget(WorldRenderer worldRenderer) { - GetPalette = () => { return Palette; }; + GetPalette = () => Palette; this.worldRenderer = worldRenderer; } diff --git a/OpenRA.Mods.RA/DemoTruck.cs b/OpenRA.Mods.RA/DemoTruck.cs index d1ca5da41c..0835c05c1d 100644 --- a/OpenRA.Mods.RA/DemoTruck.cs +++ b/OpenRA.Mods.RA/DemoTruck.cs @@ -22,10 +22,7 @@ namespace OpenRA.Mods.RA { static void Explode(Actor self) { - self.World.AddFrameEndTask(w => - { - self.InflictDamage(self, int.MaxValue, null); - }); + self.World.AddFrameEndTask(w => self.InflictDamage(self, int.MaxValue, null)); } public IEnumerable Orders diff --git a/OpenRA.Mods.RA/Render/RenderUnit.cs b/OpenRA.Mods.RA/Render/RenderUnit.cs index 42a9d33fde..e9774a3131 100644 --- a/OpenRA.Mods.RA/Render/RenderUnit.cs +++ b/OpenRA.Mods.RA/Render/RenderUnit.cs @@ -31,7 +31,7 @@ namespace OpenRA.Mods.RA.Render public void PlayCustomAnimRepeating(Actor self, string name) { DefaultAnimation.PlayThen(name, - () => { PlayCustomAnimRepeating(self, name); }); + () => PlayCustomAnimRepeating(self, name)); } public void PlayCustomAnimBackwards(Actor self, string name, Action after) diff --git a/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs index 3bbb7afe43..709734a151 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs @@ -65,19 +65,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic mirror != null ? new Uri(mirror).Host : "unknown host"); }; - Action onExtractProgress = s => - { - Game.RunAfterTick(() => statusLabel.GetText = () => s); - }; + Action onExtractProgress = s => Game.RunAfterTick(() => statusLabel.GetText = () => s); - Action onError = s => + Action onError = s => Game.RunAfterTick(() => { - Game.RunAfterTick(() => - { - statusLabel.GetText = () => "Error: " + s; - retryButton.IsVisible = () => true; - }); - }; + statusLabel.GetText = () => "Error: " + s; + retryButton.IsVisible = () => true; + }); Action onDownloadComplete = (i, cancelled) => { diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs index da5d814ce8..430ed5d044 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs @@ -66,10 +66,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic }); }; - Action onRetry = password => - { - ConnectionLogic.Connect(om.Host, om.Port, password, onConnect, onExit); - }; + Action onRetry = password => ConnectionLogic.Connect(om.Host, om.Port, password, onConnect, onExit); Ui.OpenWindow("CONNECTIONFAILED_PANEL", new WidgetArgs() { diff --git a/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs index 33f025709b..6df12589ee 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs @@ -58,8 +58,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic { replays = Directory .GetFiles(dir, "*.rep") - .Select((filename) => ReplayMetadata.Read(filename)) - .Where((r) => r != null) + .Select(ReplayMetadata.Read) + .Where(r => r != null) .OrderByDescending(r => r.GameInfo.StartTimeUtc) .ToList(); } @@ -365,14 +365,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic "Rename Replay", "Enter a new file name:", initialName, - onAccept: (newName) => - { - RenameReplay(r, newName); - }, + onAccept: newName => RenameReplay(r, newName), onCancel: null, acceptText: "Rename", cancelText: null, - inputValidator: (newName) => + inputValidator: newName => { if (newName == initialName) return false; @@ -439,7 +436,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic "Delete {0} replays?".F(list.Count), () => { - list.ForEach((r) => DeleteReplay(r)); + list.ForEach(DeleteReplay); if (selectedReplay == null) SelectFirstVisibleReplay(); }, From 831b9b3ca35be2f23795e7f94c9abd85557f9525 Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sat, 14 Jun 2014 02:02:38 +1200 Subject: [PATCH 4/8] Remove some stray semicolons --- OpenRA.Game/Map/MapCache.cs | 2 +- OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Map/MapCache.cs b/OpenRA.Game/Map/MapCache.cs index dc986a2a5b..20d9706508 100644 --- a/OpenRA.Game/Map/MapCache.cs +++ b/OpenRA.Game/Map/MapCache.cs @@ -172,7 +172,7 @@ namespace OpenRA // Yuck... But this helps the UI Jank when opening the map selector significantly. Thread.Sleep(Environment.ProcessorCount == 1 ? 25 : 5); - }; + } } Log.Write("debug", "MapCache.LoadAsyncInternal ended"); } diff --git a/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs index ae32eaac49..5231c797cd 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs @@ -165,7 +165,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic newsHighlighted = false; }; - newsButton.IsHighlighted = () => newsHighlighted && Game.LocalTick % 50 < 25;; + newsButton.IsHighlighted = () => newsHighlighted && Game.LocalTick % 50 < 25; } } From 5e641750aa88e8a649c711163a5bda6db9007fcc Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sat, 14 Jun 2014 02:04:51 +1200 Subject: [PATCH 5/8] Use Any() instead of Count() == 0 --- OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index 56a308ad8a..9db16be894 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -59,7 +59,7 @@ namespace OpenRA.Mods.RA.Server var playerClients = server.LobbyInfo.Clients.Where(c => c.Bot == null && c.Slot != null); // Are all players ready? - if (playerClients.Count() == 0 || playerClients.Any(c => c.State != Session.ClientState.Ready)) + if (!playerClients.Any() || playerClients.Any(c => c.State != Session.ClientState.Ready)) return; // Are the map conditions satisfied? From 23f0e00bccdaee4bd8b845b87d0c8e95ce2abb08 Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sat, 14 Jun 2014 02:07:47 +1200 Subject: [PATCH 6/8] Now that we're on .NET 4 again, reintroduce optional parameter for RegisterNewSquad --- OpenRA.Mods.RA/AI/HackyAI.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index fb6ad7a4d4..bf7df6341c 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -505,16 +505,12 @@ namespace OpenRA.Mods.RA.AI return squads.FirstOrDefault(s => s.type == type); } - Squad RegisterNewSquad(SquadType type, Actor target) + Squad RegisterNewSquad(SquadType type, Actor target = null) { var ret = new Squad(this, type, target); squads.Add(ret); return ret; } - Squad RegisterNewSquad(SquadType type) - { - return RegisterNewSquad(type, null); - } int assignRolesTicks = 0; int rushTicks = 0; From dbffce81a6eb28464f8c6190cabc181efe661c84 Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sun, 15 Jun 2014 22:16:40 +1200 Subject: [PATCH 7/8] Remove unused usings --- OpenRA.CrashDialog/Program.cs | 1 - OpenRA.Editor/ActorPropertiesDialog.cs | 1 - OpenRA.Editor/ActorTool.cs | 2 -- OpenRA.Editor/BrushTool.cs | 2 -- OpenRA.Editor/Program.cs | 3 --- OpenRA.Editor/RenderUtils.cs | 2 -- OpenRA.Editor/ResourceTool.cs | 2 -- OpenRA.Editor/Surface.cs | 1 - OpenRA.Editor/TileSetRenderer.cs | 1 - OpenRA.Game/FileFormats/R8Reader.cs | 2 -- OpenRA.Game/FileFormats/ReplayMetadata.cs | 1 - OpenRA.Game/FileFormats/ShpD2Reader.cs | 2 -- OpenRA.Game/FileFormats/TmpRAReader.cs | 1 - OpenRA.Game/FileFormats/TmpTDReader.cs | 1 - OpenRA.Game/FileFormats/TmpTSReader.cs | 2 -- OpenRA.Game/Game.cs | 2 -- OpenRA.Game/GameRules/ActorInfo.cs | 1 - OpenRA.Game/GameRules/Ruleset.cs | 1 - OpenRA.Game/GameRules/RulesetCache.cs | 1 - OpenRA.Game/GameRules/SoundInfo.cs | 1 - OpenRA.Game/GameRules/WeaponInfo.cs | 1 - OpenRA.Game/Graphics/ChromeProvider.cs | 2 -- OpenRA.Game/Graphics/CursorSequence.cs | 2 -- OpenRA.Game/Graphics/HardwarePalette.cs | 1 - OpenRA.Game/Graphics/Minimap.cs | 1 - OpenRA.Game/Graphics/SequenceProvider.cs | 2 -- OpenRA.Game/Graphics/SheetBuilder.cs | 1 - OpenRA.Game/Graphics/SpriteFont.cs | 1 - OpenRA.Game/Graphics/SpriteLoader.cs | 2 -- OpenRA.Game/Graphics/SpriteSource.cs | 1 - OpenRA.Game/Graphics/Theater.cs | 1 - OpenRA.Game/Graphics/WorldRenderer.cs | 1 - OpenRA.Game/Map/MapCache.cs | 2 -- OpenRA.Game/Map/MapPreview.cs | 2 -- OpenRA.Game/Map/TileSet.cs | 2 -- OpenRA.Game/Network/GameServer.cs | 3 --- OpenRA.Game/Network/Handshake.cs | 1 - OpenRA.Game/Network/ReplayRecorderConnection.cs | 1 - OpenRA.Game/Network/UnitOrders.cs | 2 -- OpenRA.Game/Platform.cs | 1 - OpenRA.Game/Player.cs | 1 - OpenRA.Game/Scripting/ScriptActorInterface.cs | 7 ------- OpenRA.Game/Scripting/ScriptContext.cs | 2 -- OpenRA.Game/Scripting/ScriptMemberExts.cs | 5 ----- OpenRA.Game/Scripting/ScriptMemberWrapper.cs | 4 ---- OpenRA.Game/Scripting/ScriptObjectWrapper.cs | 6 ------ OpenRA.Game/Scripting/ScriptPlayerInterface.cs | 7 ------- OpenRA.Game/Scripting/ScriptTypes.cs | 10 ---------- OpenRA.Game/Selection.cs | 1 - OpenRA.Game/Server/Exts.cs | 1 - OpenRA.Game/Server/Server.cs | 3 --- OpenRA.Game/Settings.cs | 1 - OpenRA.Game/Support/Program.cs | 1 - OpenRA.Game/TraitDictionary.cs | 1 - OpenRA.Game/Traits/BodyOrientation.cs | 2 -- OpenRA.Game/Traits/Health.cs | 1 - OpenRA.Game/Traits/Player/FixedColorPalette.cs | 1 - OpenRA.Game/Traits/Player/PlayerColorPalette.cs | 1 - OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs | 1 - OpenRA.Game/Traits/Render/RenderSimple.cs | 1 - OpenRA.Game/Traits/Render/RenderSprites.cs | 1 - OpenRA.Game/Traits/TraitsInterfaces.cs | 1 - OpenRA.Game/Traits/World/ActorMap.cs | 1 - OpenRA.Game/Traits/World/ResourceLayer.cs | 1 - OpenRA.Game/Traits/World/ResourceType.cs | 1 - OpenRA.Game/Widgets/ButtonWidget.cs | 1 - OpenRA.Game/Widgets/CheckboxWidget.cs | 1 - OpenRA.Game/Widgets/ChromeMetrics.cs | 1 - OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs | 1 - OpenRA.Game/Widgets/DropDownButtonWidget.cs | 1 - OpenRA.Game/Widgets/LabelWidget.cs | 1 - OpenRA.Game/Widgets/MapPreviewWidget.cs | 2 -- OpenRA.Game/Widgets/RootWidget.cs | 1 - OpenRA.Game/Widgets/ScrollItemWidget.cs | 2 -- OpenRA.Game/Widgets/ViewportControllerWidget.cs | 2 -- OpenRA.Game/Widgets/WidgetLoader.cs | 1 - OpenRA.Game/Widgets/WidgetUtils.cs | 2 -- OpenRA.Game/WorldUtils.cs | 2 -- OpenRA.Irc/IrcClient.cs | 1 - OpenRA.Lint/YamlChecker.cs | 1 - OpenRA.Mods.Cnc/CncLoadScreen.cs | 2 -- OpenRA.Mods.Cnc/ProductionAirdrop.cs | 1 - OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs | 1 - OpenRA.Mods.Cnc/RenderGunboat.cs | 1 - OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs | 1 - OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs | 1 - OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs | 1 - OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs | 1 - OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs | 1 - OpenRA.Mods.Cnc/WithCargo.cs | 1 - OpenRA.Mods.Cnc/WithDeliveryAnimation.cs | 6 ------ OpenRA.Mods.D2k/D2kResourceLayer.cs | 2 -- OpenRA.Mods.D2k/DamagedWithoutFoundation.cs | 2 -- OpenRA.Mods.D2k/PaletteFromScaledPalette.cs | 3 --- .../Render/WithBuildingPlacedOverlayInfo.cs | 1 - OpenRA.Mods.D2k/Render/WithCrumbleOverlay.cs | 1 - OpenRA.Mods.D2k/Render/WithDeliveryOverlay.cs | 1 - OpenRA.Mods.D2k/Render/WithDockingOverlay.cs | 1 - OpenRA.Mods.D2k/Render/WithProductionOverlay.cs | 2 -- OpenRA.Mods.D2k/ThrowsShrapnel.cs | 4 ---- OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs | 1 - OpenRA.Mods.RA/AI/HackyAI.cs | 1 - OpenRA.Mods.RA/AcceptsSupplies.cs | 1 - OpenRA.Mods.RA/Activities/DeliverResources.cs | 1 - OpenRA.Mods.RA/Activities/Enter.cs | 1 - OpenRA.Mods.RA/Activities/FlyFollow.cs | 1 - OpenRA.Mods.RA/Activities/Follow.cs | 1 - OpenRA.Mods.RA/Activities/Hunt.cs | 2 -- OpenRA.Mods.RA/Activities/LayMines.cs | 1 - OpenRA.Mods.RA/Activities/Rearm.cs | 1 - OpenRA.Mods.RA/Activities/Repair.cs | 3 --- OpenRA.Mods.RA/Activities/UnloadCargo.cs | 1 - OpenRA.Mods.RA/Attack/AttackBase.cs | 1 - OpenRA.Mods.RA/Attack/AttackCharge.cs | 1 - OpenRA.Mods.RA/Attack/AttackFollow.cs | 3 --- OpenRA.Mods.RA/Attack/AttackFrontal.cs | 1 - OpenRA.Mods.RA/Attack/AttackGarrisoned.cs | 3 --- OpenRA.Mods.RA/Attack/AttackLeap.cs | 1 - OpenRA.Mods.RA/Attack/AttackMedic.cs | 2 -- OpenRA.Mods.RA/Attack/AttackOmni.cs | 1 - OpenRA.Mods.RA/Attack/AttackTurreted.cs | 4 ---- OpenRA.Mods.RA/AttackBomber.cs | 1 - OpenRA.Mods.RA/AttackMove.cs | 1 - OpenRA.Mods.RA/AutoHeal.cs | 1 - OpenRA.Mods.RA/AutoTarget.cs | 1 - OpenRA.Mods.RA/BaseBuilding.cs | 1 - OpenRA.Mods.RA/Buildings/Bib.cs | 2 -- OpenRA.Mods.RA/Buildings/CustomBuildTimeValue.cs | 1 - OpenRA.Mods.RA/Buildings/CustomSellValue.cs | 1 - OpenRA.Mods.RA/Buildings/Demolishable.cs | 3 +-- OpenRA.Mods.RA/Buildings/LaysTerrain.cs | 3 --- OpenRA.Mods.RA/Buildings/LineBuild.cs | 1 - OpenRA.Mods.RA/Buildings/LineBuildNode.cs | 1 - OpenRA.Mods.RA/Buildings/RepairableBuilding.cs | 1 - OpenRA.Mods.RA/Capturable.cs | 2 -- OpenRA.Mods.RA/Captures.cs | 1 - OpenRA.Mods.RA/CashTrickler.cs | 1 - OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs | 1 - OpenRA.Mods.RA/Chronoshiftable.cs | 1 - OpenRA.Mods.RA/CloakPaletteEffect.cs | 1 - OpenRA.Mods.RA/CombatDebugOverlay.cs | 2 -- OpenRA.Mods.RA/ConquestVictoryConditions.cs | 1 - OpenRA.Mods.RA/Console/DevCommands.cs | 2 -- OpenRA.Mods.RA/Console/HelpCommand.cs | 1 - OpenRA.Mods.RA/Crate.cs | 1 - OpenRA.Mods.RA/CrateAction.cs | 1 - OpenRA.Mods.RA/CrateSpawner.cs | 1 - OpenRA.Mods.RA/Crates/UnitUpgradeCrateAction.cs | 2 -- OpenRA.Mods.RA/CreateMPPlayers.cs | 1 - OpenRA.Mods.RA/DeathSounds.cs | 2 -- OpenRA.Mods.RA/DefaultLoadScreen.cs | 3 --- OpenRA.Mods.RA/Effects/Beacon.cs | 1 - OpenRA.Mods.RA/Effects/Bullet.cs | 1 - OpenRA.Mods.RA/Effects/Contrail.cs | 1 - OpenRA.Mods.RA/Effects/InvulnEffect.cs | 1 - OpenRA.Mods.RA/Effects/LaserZap.cs | 1 - OpenRA.Mods.RA/Effects/Missile.cs | 1 - OpenRA.Mods.RA/Effects/PowerdownIndicator.cs | 1 - OpenRA.Mods.RA/Effects/RallyPoint.cs | 1 - OpenRA.Mods.RA/Effects/Rank.cs | 1 - OpenRA.Mods.RA/Effects/RepairIndicator.cs | 1 - OpenRA.Mods.RA/ExternalCapturable.cs | 1 - OpenRA.Mods.RA/ExternalCapturableBar.cs | 1 - OpenRA.Mods.RA/ExternalCaptures.cs | 1 - OpenRA.Mods.RA/GainsExperience.cs | 1 - OpenRA.Mods.RA/GivesBounty.cs | 1 - OpenRA.Mods.RA/GivesExperience.cs | 1 - OpenRA.Mods.RA/Guard.cs | 2 -- OpenRA.Mods.RA/Harvester.cs | 1 - OpenRA.Mods.RA/Husk.cs | 1 - OpenRA.Mods.RA/LeavesHusk.cs | 1 - OpenRA.Mods.RA/LightPaletteRotator.cs | 1 - OpenRA.Mods.RA/LimitedAmmo.cs | 1 - OpenRA.Mods.RA/Lint/CheckActorReferences.cs | 2 -- OpenRA.Mods.RA/Lint/CheckSequences.cs | 1 - OpenRA.Mods.RA/MPStartUnits.cs | 1 - OpenRA.Mods.RA/MenuPaletteEffect.cs | 1 - OpenRA.Mods.RA/Mine.cs | 2 -- OpenRA.Mods.RA/ModChooserLoadScreen.cs | 4 ---- OpenRA.Mods.RA/Modifiers/DisabledOverlay.cs | 1 - OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs | 1 - OpenRA.Mods.RA/NullLoadScreen.cs | 1 - OpenRA.Mods.RA/PaletteFromRGBA.cs | 1 - OpenRA.Mods.RA/Player/ClassicProductionQueue.cs | 1 - OpenRA.Mods.RA/Player/ProductionQueue.cs | 1 - OpenRA.Mods.RA/Player/ProvidesTechPrerequisite.cs | 5 ----- OpenRA.Mods.RA/PortableChrono.cs | 1 - OpenRA.Mods.RA/PrimaryBuilding.cs | 1 - OpenRA.Mods.RA/ProductionBar.cs | 1 - OpenRA.Mods.RA/RallyPoint.cs | 1 - OpenRA.Mods.RA/Reloads.cs | 1 - OpenRA.Mods.RA/RemoveImmediately.cs | 1 - OpenRA.Mods.RA/Render/RenderBuilding.cs | 1 - OpenRA.Mods.RA/Render/RenderBuildingCharge.cs | 2 -- OpenRA.Mods.RA/Render/RenderInfantry.cs | 1 - OpenRA.Mods.RA/Render/RenderLandingCraft.cs | 1 - OpenRA.Mods.RA/Render/RenderUnitReload.cs | 1 - OpenRA.Mods.RA/Render/RenderVoxels.cs | 1 - OpenRA.Mods.RA/Render/WithBuildingPlacedAnimation.cs | 2 -- OpenRA.Mods.RA/Render/WithHarvestAnimation.cs | 1 - OpenRA.Mods.RA/Render/WithIdleOverlay.cs | 1 - OpenRA.Mods.RA/Render/WithMuzzleFlash.cs | 1 - OpenRA.Mods.RA/Render/WithRepairAnimation.cs | 4 ---- OpenRA.Mods.RA/Render/WithRepairOverlay.cs | 1 - OpenRA.Mods.RA/Render/WithResources.cs | 1 - OpenRA.Mods.RA/Render/WithRotor.cs | 1 - OpenRA.Mods.RA/Render/WithTurret.cs | 1 - OpenRA.Mods.RA/Render/WithVoxelBarrel.cs | 1 - OpenRA.Mods.RA/Render/WithVoxelTurret.cs | 1 - OpenRA.Mods.RA/Render/WithVoxelWalkerBody.cs | 1 - OpenRA.Mods.RA/RenderRangeCircle.cs | 1 - OpenRA.Mods.RA/Repairable.cs | 1 - OpenRA.Mods.RA/RepairableNear.cs | 1 - OpenRA.Mods.RA/Scripting/CallLuaFunc.cs | 1 - OpenRA.Mods.RA/Scripting/Global/ActorGlobal.cs | 7 +------ OpenRA.Mods.RA/Scripting/Global/CameraGlobal.cs | 5 ----- OpenRA.Mods.RA/Scripting/Global/MapGlobal.cs | 3 --- OpenRA.Mods.RA/Scripting/Global/PlayerGlobal.cs | 5 ----- OpenRA.Mods.RA/Scripting/Global/UtilsGlobal.cs | 2 -- .../Scripting/Properties/ChronosphereProperties.cs | 4 ---- .../Scripting/Properties/CombatProperties.cs | 4 ---- .../Scripting/Properties/GeneralProperties.cs | 4 ---- .../Scripting/Properties/HealthProperties.cs | 6 ------ .../Scripting/Properties/MobileProperties.cs | 3 --- .../Scripting/Properties/ProductionProperties.cs | 3 --- .../Scripting/Properties/ResourceProperties.cs | 1 - .../Scripting/Properties/TransportProperties.cs | 3 --- OpenRA.Mods.RA/Sellable.cs | 1 - OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs | 1 - OpenRA.Mods.RA/ShroudPalette.cs | 1 - OpenRA.Mods.RA/ShroudRenderer.cs | 2 -- OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs | 1 - OpenRA.Mods.RA/StoresOre.cs | 1 - OpenRA.Mods.RA/SupplyTruck.cs | 1 - OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs | 1 - OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs | 1 - OpenRA.Mods.RA/SupportPowers/SupportPower.cs | 1 - OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs | 2 -- OpenRA.Mods.RA/ThrowsParticle.cs | 1 - OpenRA.Mods.RA/Tooltip.cs | 1 - OpenRA.Mods.RA/Turreted.cs | 1 - OpenRA.Mods.RA/Valued.cs | 1 - OpenRA.Mods.RA/Widgets/ColorMixerWidget.cs | 1 - OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs | 1 - OpenRA.Mods.RA/Widgets/ConfirmationDialogs.cs | 1 - OpenRA.Mods.RA/Widgets/HueSliderWidget.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/ColorPickerLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/GameTimerLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs | 2 -- OpenRA.Mods.RA/Widgets/Logic/LobbyMapPreviewLogic.cs | 5 ----- OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/RAInstallFromCDLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs | 2 -- OpenRA.Mods.RA/Widgets/Logic/ReplayControlBarLogic.cs | 2 -- OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/ServerCreationLogic.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs | 1 - OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs | 1 - OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs | 1 - OpenRA.Mods.RA/World/BuildableTerrainLayer.cs | 4 ---- OpenRA.Mods.RA/World/DomainIndex.cs | 1 - OpenRA.Mods.RA/World/SmudgeLayer.cs | 2 -- OpenRA.Mods.TS/Widgets/Logic/TSInstallFromCDLogic.cs | 3 +-- OpenRA.Renderer.Sdl2/FrameBuffer.cs | 1 - OpenRA.Renderer.Sdl2/MultiTapDetection.cs | 1 - OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs | 1 - OpenRA.Renderer.Sdl2/Shader.cs | 2 -- OpenRA.Renderer.Sdl2/Texture.cs | 1 - OpenRA.Renderer.Sdl2/VertexBuffer.cs | 1 - OpenRA.Utility/Command.cs | 4 ---- OpenRA.Utility/Glob.cs | 1 - OpenRA.Utility/UpgradeRules.cs | 9 --------- 276 files changed, 3 insertions(+), 451 deletions(-) diff --git a/OpenRA.CrashDialog/Program.cs b/OpenRA.CrashDialog/Program.cs index b71388f8ee..4f966de0fd 100644 --- a/OpenRA.CrashDialog/Program.cs +++ b/OpenRA.CrashDialog/Program.cs @@ -15,7 +15,6 @@ using System.IO; using System.Media; using System.Reflection; using System.Windows.Forms; -using OpenRA; namespace OpenRA.CrashDialog { diff --git a/OpenRA.Editor/ActorPropertiesDialog.cs b/OpenRA.Editor/ActorPropertiesDialog.cs index b2667a940e..0e6b127b07 100644 --- a/OpenRA.Editor/ActorPropertiesDialog.cs +++ b/OpenRA.Editor/ActorPropertiesDialog.cs @@ -11,7 +11,6 @@ using System; using System.Drawing; using System.Windows.Forms; -using OpenRA.FileFormats; namespace OpenRA.Editor { diff --git a/OpenRA.Editor/ActorTool.cs b/OpenRA.Editor/ActorTool.cs index 7c08db049b..ac3c6947e6 100644 --- a/OpenRA.Editor/ActorTool.cs +++ b/OpenRA.Editor/ActorTool.cs @@ -9,8 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; - using SGraphics = System.Drawing.Graphics; namespace OpenRA.Editor diff --git a/OpenRA.Editor/BrushTool.cs b/OpenRA.Editor/BrushTool.cs index c12eed8acb..220fdacb56 100644 --- a/OpenRA.Editor/BrushTool.cs +++ b/OpenRA.Editor/BrushTool.cs @@ -11,8 +11,6 @@ using System; using System.Collections.Generic; using System.Windows.Forms; -using OpenRA.FileFormats; - using SGraphics = System.Drawing.Graphics; namespace OpenRA.Editor diff --git a/OpenRA.Editor/Program.cs b/OpenRA.Editor/Program.cs index ffcde48631..b666d6d7d1 100644 --- a/OpenRA.Editor/Program.cs +++ b/OpenRA.Editor/Program.cs @@ -10,10 +10,7 @@ using System; using System.Globalization; -using System.IO; -using System.Linq; using System.Windows.Forms; -using OpenRA.FileFormats; namespace OpenRA.Editor { diff --git a/OpenRA.Editor/RenderUtils.cs b/OpenRA.Editor/RenderUtils.cs index 56c223f003..8e4aa45bab 100644 --- a/OpenRA.Editor/RenderUtils.cs +++ b/OpenRA.Editor/RenderUtils.cs @@ -8,14 +8,12 @@ */ #endregion -using System.Collections; using System.Drawing; using System.Drawing.Imaging; using System.Linq; using OpenRA.FileFormats; using OpenRA.FileSystem; using OpenRA.Graphics; -using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Editor diff --git a/OpenRA.Editor/ResourceTool.cs b/OpenRA.Editor/ResourceTool.cs index ee09cac1a5..f8f6351e05 100644 --- a/OpenRA.Editor/ResourceTool.cs +++ b/OpenRA.Editor/ResourceTool.cs @@ -9,8 +9,6 @@ #endregion using System; -using OpenRA.FileFormats; - using SGraphics = System.Drawing.Graphics; namespace OpenRA.Editor diff --git a/OpenRA.Editor/Surface.cs b/OpenRA.Editor/Surface.cs index 8bbd565b4a..145f9a9f9d 100644 --- a/OpenRA.Editor/Surface.cs +++ b/OpenRA.Editor/Surface.cs @@ -14,7 +14,6 @@ using System.Drawing; using System.Drawing.Imaging; using System.Linq; using System.Windows.Forms; -using OpenRA.FileSystem; using OpenRA.Graphics; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Editor/TileSetRenderer.cs b/OpenRA.Editor/TileSetRenderer.cs index 16575782bf..06db47d678 100644 --- a/OpenRA.Editor/TileSetRenderer.cs +++ b/OpenRA.Editor/TileSetRenderer.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; -using System.IO; using System.Linq; using OpenRA.FileSystem; using OpenRA.Graphics; diff --git a/OpenRA.Game/FileFormats/R8Reader.cs b/OpenRA.Game/FileFormats/R8Reader.cs index ee5bb0a85d..a768c78f4b 100644 --- a/OpenRA.Game/FileFormats/R8Reader.cs +++ b/OpenRA.Game/FileFormats/R8Reader.cs @@ -8,11 +8,9 @@ */ #endregion -using System.Collections; using System.Collections.Generic; using System.Drawing; using System.IO; -using System.Linq; using OpenRA.Graphics; namespace OpenRA.FileFormats diff --git a/OpenRA.Game/FileFormats/ReplayMetadata.cs b/OpenRA.Game/FileFormats/ReplayMetadata.cs index 1d97ef5dfe..d575404806 100644 --- a/OpenRA.Game/FileFormats/ReplayMetadata.cs +++ b/OpenRA.Game/FileFormats/ReplayMetadata.cs @@ -11,7 +11,6 @@ using System; using System.IO; using System.Text; -using OpenRA.Network; namespace OpenRA.FileFormats { diff --git a/OpenRA.Game/FileFormats/ShpD2Reader.cs b/OpenRA.Game/FileFormats/ShpD2Reader.cs index 3a675f7132..979e11f98e 100644 --- a/OpenRA.Game/FileFormats/ShpD2Reader.cs +++ b/OpenRA.Game/FileFormats/ShpD2Reader.cs @@ -9,11 +9,9 @@ #endregion using System; -using System.Collections; using System.Collections.Generic; using System.Drawing; using System.IO; -using System.Linq; using OpenRA.Graphics; namespace OpenRA.FileFormats diff --git a/OpenRA.Game/FileFormats/TmpRAReader.cs b/OpenRA.Game/FileFormats/TmpRAReader.cs index e83b9b80d7..8f92fd4235 100644 --- a/OpenRA.Game/FileFormats/TmpRAReader.cs +++ b/OpenRA.Game/FileFormats/TmpRAReader.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using System.IO; -using System.Linq; using OpenRA.Graphics; namespace OpenRA.FileFormats diff --git a/OpenRA.Game/FileFormats/TmpTDReader.cs b/OpenRA.Game/FileFormats/TmpTDReader.cs index 14f79ea2b8..7650c39a0b 100644 --- a/OpenRA.Game/FileFormats/TmpTDReader.cs +++ b/OpenRA.Game/FileFormats/TmpTDReader.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Drawing; -using System.Linq; using System.IO; using OpenRA.Graphics; diff --git a/OpenRA.Game/FileFormats/TmpTSReader.cs b/OpenRA.Game/FileFormats/TmpTSReader.cs index 4c902874d9..7d1b07e962 100644 --- a/OpenRA.Game/FileFormats/TmpTSReader.cs +++ b/OpenRA.Game/FileFormats/TmpTSReader.cs @@ -8,11 +8,9 @@ */ #endregion -using System; using System.Collections.Generic; using System.Drawing; using System.IO; -using System.Linq; using OpenRA.Graphics; namespace OpenRA.FileFormats diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index e9fe241775..804939411b 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -9,7 +9,6 @@ #endregion using System; -using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.IO; @@ -17,7 +16,6 @@ using System.Linq; using System.Net; using OpenRA.FileSystem; using MaxMind.GeoIP2; -using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Network; using OpenRA.Primitives; diff --git a/OpenRA.Game/GameRules/ActorInfo.cs b/OpenRA.Game/GameRules/ActorInfo.cs index 117768a2a1..b7e70f3ce0 100644 --- a/OpenRA.Game/GameRules/ActorInfo.cs +++ b/OpenRA.Game/GameRules/ActorInfo.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Game/GameRules/Ruleset.cs b/OpenRA.Game/GameRules/Ruleset.cs index caac78e4a1..a9f1e86063 100644 --- a/OpenRA.Game/GameRules/Ruleset.cs +++ b/OpenRA.Game/GameRules/Ruleset.cs @@ -8,7 +8,6 @@ */ #endregion -using System; using System.Collections.Generic; using System.Linq; using OpenRA.GameRules; diff --git a/OpenRA.Game/GameRules/RulesetCache.cs b/OpenRA.Game/GameRules/RulesetCache.cs index 5c5d37d113..8dccd262b3 100755 --- a/OpenRA.Game/GameRules/RulesetCache.cs +++ b/OpenRA.Game/GameRules/RulesetCache.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Support; diff --git a/OpenRA.Game/GameRules/SoundInfo.cs b/OpenRA.Game/GameRules/SoundInfo.cs index 0eb8e66da7..7e6d04fbf9 100644 --- a/OpenRA.Game/GameRules/SoundInfo.cs +++ b/OpenRA.Game/GameRules/SoundInfo.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; namespace OpenRA.GameRules { diff --git a/OpenRA.Game/GameRules/WeaponInfo.cs b/OpenRA.Game/GameRules/WeaponInfo.cs index 39bde429a0..446c3b2615 100644 --- a/OpenRA.Game/GameRules/WeaponInfo.cs +++ b/OpenRA.Game/GameRules/WeaponInfo.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Effects; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.GameRules diff --git a/OpenRA.Game/Graphics/ChromeProvider.cs b/OpenRA.Game/Graphics/ChromeProvider.cs index da23ff8dcc..354de69984 100644 --- a/OpenRA.Game/Graphics/ChromeProvider.cs +++ b/OpenRA.Game/Graphics/ChromeProvider.cs @@ -8,10 +8,8 @@ */ #endregion -using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/CursorSequence.cs b/OpenRA.Game/Graphics/CursorSequence.cs index 0ee6a0a4d0..fb11c2823b 100644 --- a/OpenRA.Game/Graphics/CursorSequence.cs +++ b/OpenRA.Game/Graphics/CursorSequence.cs @@ -8,8 +8,6 @@ */ #endregion -using OpenRA.FileFormats; - namespace OpenRA.Graphics { public class CursorSequence diff --git a/OpenRA.Game/Graphics/HardwarePalette.cs b/OpenRA.Game/Graphics/HardwarePalette.cs index e004f3cd87..fa2bf91cea 100644 --- a/OpenRA.Game/Graphics/HardwarePalette.cs +++ b/OpenRA.Game/Graphics/HardwarePalette.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Graphics diff --git a/OpenRA.Game/Graphics/Minimap.cs b/OpenRA.Game/Graphics/Minimap.cs index d0ec1b86fd..739817715a 100644 --- a/OpenRA.Game/Graphics/Minimap.cs +++ b/OpenRA.Game/Graphics/Minimap.cs @@ -11,7 +11,6 @@ using System; using System.Drawing; using System.Drawing.Imaging; -using System.IO; using System.Linq; using OpenRA.Traits; diff --git a/OpenRA.Game/Graphics/SequenceProvider.cs b/OpenRA.Game/Graphics/SequenceProvider.cs index 6b9b71223a..085330b211 100644 --- a/OpenRA.Game/Graphics/SequenceProvider.cs +++ b/OpenRA.Game/Graphics/SequenceProvider.cs @@ -12,8 +12,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Primitives; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/SheetBuilder.cs b/OpenRA.Game/Graphics/SheetBuilder.cs index 55911f63d0..46e57b56f9 100644 --- a/OpenRA.Game/Graphics/SheetBuilder.cs +++ b/OpenRA.Game/Graphics/SheetBuilder.cs @@ -10,7 +10,6 @@ using System; using System.Drawing; -using OpenRA.FileFormats; namespace OpenRA.Graphics { diff --git a/OpenRA.Game/Graphics/SpriteFont.cs b/OpenRA.Game/Graphics/SpriteFont.cs index d8754e2ccf..62cc65a637 100644 --- a/OpenRA.Game/Graphics/SpriteFont.cs +++ b/OpenRA.Game/Graphics/SpriteFont.cs @@ -12,7 +12,6 @@ using System; using System.Drawing; using System.Linq; using SharpFont; -using OpenRA.FileFormats; using OpenRA.Primitives; namespace OpenRA.Graphics diff --git a/OpenRA.Game/Graphics/SpriteLoader.cs b/OpenRA.Game/Graphics/SpriteLoader.cs index 67d2571b99..fe7c8781b5 100644 --- a/OpenRA.Game/Graphics/SpriteLoader.cs +++ b/OpenRA.Game/Graphics/SpriteLoader.cs @@ -8,9 +8,7 @@ */ #endregion -using System.IO; using System.Linq; -using OpenRA.FileFormats; using OpenRA.FileSystem; using OpenRA.Primitives; diff --git a/OpenRA.Game/Graphics/SpriteSource.cs b/OpenRA.Game/Graphics/SpriteSource.cs index d5476302ef..086b7cdee1 100644 --- a/OpenRA.Game/Graphics/SpriteSource.cs +++ b/OpenRA.Game/Graphics/SpriteSource.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using System.IO; -using System.Linq; using OpenRA.FileFormats; namespace OpenRA.Graphics diff --git a/OpenRA.Game/Graphics/Theater.cs b/OpenRA.Game/Graphics/Theater.cs index 3bfe1bfa95..c7b136b5ed 100644 --- a/OpenRA.Game/Graphics/Theater.cs +++ b/OpenRA.Game/Graphics/Theater.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Drawing; -using System.IO; using System.Linq; using OpenRA.FileSystem; diff --git a/OpenRA.Game/Graphics/WorldRenderer.cs b/OpenRA.Game/Graphics/WorldRenderer.cs index c460bf8b30..38ca787d67 100644 --- a/OpenRA.Game/Graphics/WorldRenderer.cs +++ b/OpenRA.Game/Graphics/WorldRenderer.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Game/Map/MapCache.cs b/OpenRA.Game/Map/MapCache.cs index 20d9706508..416603d1f1 100644 --- a/OpenRA.Game/Map/MapCache.cs +++ b/OpenRA.Game/Map/MapCache.cs @@ -11,13 +11,11 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading; -using OpenRA.FileSystem; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Game/Map/MapPreview.cs b/OpenRA.Game/Map/MapPreview.cs index e0c686303a..44ffb4e2d9 100755 --- a/OpenRA.Game/Map/MapPreview.cs +++ b/OpenRA.Game/Map/MapPreview.cs @@ -9,7 +9,6 @@ #endregion using System; -using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; @@ -18,7 +17,6 @@ using System.Linq; using System.Net; using System.Threading; using OpenRA.Graphics; -using OpenRA.Widgets; namespace OpenRA { diff --git a/OpenRA.Game/Map/TileSet.cs b/OpenRA.Game/Map/TileSet.cs index ca82e15e3e..fee5dbce64 100644 --- a/OpenRA.Game/Map/TileSet.cs +++ b/OpenRA.Game/Map/TileSet.cs @@ -8,13 +8,11 @@ */ #endregion -using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; using System.Reflection; -using OpenRA.Graphics; namespace OpenRA { diff --git a/OpenRA.Game/Network/GameServer.cs b/OpenRA.Game/Network/GameServer.cs index e289325511..6c752668cc 100644 --- a/OpenRA.Game/Network/GameServer.cs +++ b/OpenRA.Game/Network/GameServer.cs @@ -8,9 +8,6 @@ */ #endregion -using System.Collections.Generic; -using System.Linq; - namespace OpenRA.Network { public class GameServer diff --git a/OpenRA.Game/Network/Handshake.cs b/OpenRA.Game/Network/Handshake.cs index c11fd5c8de..385dffaf58 100644 --- a/OpenRA.Game/Network/Handshake.cs +++ b/OpenRA.Game/Network/Handshake.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; namespace OpenRA.Network { diff --git a/OpenRA.Game/Network/ReplayRecorderConnection.cs b/OpenRA.Game/Network/ReplayRecorderConnection.cs index 57b907ef8b..8060369b63 100644 --- a/OpenRA.Game/Network/ReplayRecorderConnection.cs +++ b/OpenRA.Game/Network/ReplayRecorderConnection.cs @@ -13,7 +13,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; using OpenRA.FileFormats; -using OpenRA.Widgets; namespace OpenRA.Network { diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index 5631435b5b..843d153d5e 100644 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -12,8 +12,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.Traits; -using System; -using OpenRA.FileFormats; namespace OpenRA.Network { diff --git a/OpenRA.Game/Platform.cs b/OpenRA.Game/Platform.cs index 3a36a78b2f..be0f9ff1af 100644 --- a/OpenRA.Game/Platform.cs +++ b/OpenRA.Game/Platform.cs @@ -13,7 +13,6 @@ using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; -using OpenRA.FileFormats; namespace OpenRA { diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs index fcea4dc616..7fe0fccdd4 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -13,7 +13,6 @@ using System.Collections.Generic; using System.Linq; using Eluant; using Eluant.ObjectBinding; -using OpenRA.FileFormats; using OpenRA.Network; using OpenRA.Graphics; using OpenRA.Primitives; diff --git a/OpenRA.Game/Scripting/ScriptActorInterface.cs b/OpenRA.Game/Scripting/ScriptActorInterface.cs index 8d77995c54..047f903849 100644 --- a/OpenRA.Game/Scripting/ScriptActorInterface.cs +++ b/OpenRA.Game/Scripting/ScriptActorInterface.cs @@ -9,14 +9,7 @@ #endregion using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; -using System.Reflection; -using Eluant; -using Eluant.ObjectBinding; -using OpenRA.FileFormats; -using OpenRA.Traits; namespace OpenRA.Scripting { diff --git a/OpenRA.Game/Scripting/ScriptContext.cs b/OpenRA.Game/Scripting/ScriptContext.cs index 44dc9cb417..0711ab3396 100644 --- a/OpenRA.Game/Scripting/ScriptContext.cs +++ b/OpenRA.Game/Scripting/ScriptContext.cs @@ -9,7 +9,6 @@ #endregion using System; -using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; @@ -19,7 +18,6 @@ using OpenRA.FileSystem; using OpenRA.Graphics; using OpenRA.Primitives; using OpenRA.Support; -using OpenRA.Scripting; using OpenRA.Traits; namespace OpenRA.Scripting diff --git a/OpenRA.Game/Scripting/ScriptMemberExts.cs b/OpenRA.Game/Scripting/ScriptMemberExts.cs index 9f9f24fdf6..5dd61e429b 100644 --- a/OpenRA.Game/Scripting/ScriptMemberExts.cs +++ b/OpenRA.Game/Scripting/ScriptMemberExts.cs @@ -9,14 +9,9 @@ #endregion using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; -using Eluant; -using Eluant.ObjectBinding; -using OpenRA.FileFormats; -using OpenRA.Traits; namespace OpenRA.Scripting { diff --git a/OpenRA.Game/Scripting/ScriptMemberWrapper.cs b/OpenRA.Game/Scripting/ScriptMemberWrapper.cs index 9e6b0daf75..d3fd294b35 100644 --- a/OpenRA.Game/Scripting/ScriptMemberWrapper.cs +++ b/OpenRA.Game/Scripting/ScriptMemberWrapper.cs @@ -9,14 +9,10 @@ #endregion using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using Eluant; -using Eluant.ObjectBinding; -using OpenRA.FileFormats; -using OpenRA.Traits; namespace OpenRA.Scripting { diff --git a/OpenRA.Game/Scripting/ScriptObjectWrapper.cs b/OpenRA.Game/Scripting/ScriptObjectWrapper.cs index 67edd1c70e..5b40bcac41 100644 --- a/OpenRA.Game/Scripting/ScriptObjectWrapper.cs +++ b/OpenRA.Game/Scripting/ScriptObjectWrapper.cs @@ -8,15 +8,9 @@ */ #endregion -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; -using System.Reflection; using Eluant; using Eluant.ObjectBinding; -using OpenRA.FileFormats; -using OpenRA.Traits; namespace OpenRA.Scripting { diff --git a/OpenRA.Game/Scripting/ScriptPlayerInterface.cs b/OpenRA.Game/Scripting/ScriptPlayerInterface.cs index 0d78e043fc..4cc418ec12 100644 --- a/OpenRA.Game/Scripting/ScriptPlayerInterface.cs +++ b/OpenRA.Game/Scripting/ScriptPlayerInterface.cs @@ -9,14 +9,7 @@ #endregion using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; -using System.Reflection; -using Eluant; -using Eluant.ObjectBinding; -using OpenRA.FileFormats; -using OpenRA.Traits; namespace OpenRA.Scripting { diff --git a/OpenRA.Game/Scripting/ScriptTypes.cs b/OpenRA.Game/Scripting/ScriptTypes.cs index b892f3efd5..07a128ef95 100644 --- a/OpenRA.Game/Scripting/ScriptTypes.cs +++ b/OpenRA.Game/Scripting/ScriptTypes.cs @@ -10,17 +10,7 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; using Eluant; -using OpenRA.FileSystem; -using OpenRA.Graphics; -using OpenRA.Primitives; -using OpenRA.Support; -using OpenRA.Scripting; -using OpenRA.Traits; namespace OpenRA.Scripting { diff --git a/OpenRA.Game/Selection.cs b/OpenRA.Game/Selection.cs index 0fa4b91ce1..d72bb13245 100644 --- a/OpenRA.Game/Selection.cs +++ b/OpenRA.Game/Selection.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Game/Server/Exts.cs b/OpenRA.Game/Server/Exts.cs index 7ceb00e401..a27353e95f 100755 --- a/OpenRA.Game/Server/Exts.cs +++ b/OpenRA.Game/Server/Exts.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using System.IO; using System.Linq; namespace OpenRA.Server diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index 2fd0527a34..fffe85f83a 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -9,15 +9,12 @@ #endregion using System; -using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; -using System.Net.NetworkInformation; using System.Net.Sockets; using System.Threading; -using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Network; using OpenRA.Primitives; diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index 284b7cc6f5..890fee5511 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.IO; using OpenRA.Graphics; -using OpenRA.Primitives; namespace OpenRA { diff --git a/OpenRA.Game/Support/Program.cs b/OpenRA.Game/Support/Program.cs index 9204a19c79..4257d61c5a 100644 --- a/OpenRA.Game/Support/Program.cs +++ b/OpenRA.Game/Support/Program.cs @@ -10,7 +10,6 @@ using System; using System.Diagnostics; -using System.Globalization; using System.Linq; using System.Text; diff --git a/OpenRA.Game/TraitDictionary.cs b/OpenRA.Game/TraitDictionary.cs index 60b06ee82a..b683f8f922 100755 --- a/OpenRA.Game/TraitDictionary.cs +++ b/OpenRA.Game/TraitDictionary.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Primitives; namespace OpenRA diff --git a/OpenRA.Game/Traits/BodyOrientation.cs b/OpenRA.Game/Traits/BodyOrientation.cs index e81217f442..061112e2e3 100755 --- a/OpenRA.Game/Traits/BodyOrientation.cs +++ b/OpenRA.Game/Traits/BodyOrientation.cs @@ -8,8 +8,6 @@ */ #endregion -using OpenRA.FileFormats; - namespace OpenRA.Traits { public class BodyOrientationInfo : ITraitInfo, IBodyOrientationInfo diff --git a/OpenRA.Game/Traits/Health.cs b/OpenRA.Game/Traits/Health.cs index 7924cd5608..a8b7608999 100755 --- a/OpenRA.Game/Traits/Health.cs +++ b/OpenRA.Game/Traits/Health.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.GameRules; namespace OpenRA.Traits diff --git a/OpenRA.Game/Traits/Player/FixedColorPalette.cs b/OpenRA.Game/Traits/Player/FixedColorPalette.cs index dd2abc304d..8eb15423f5 100644 --- a/OpenRA.Game/Traits/Player/FixedColorPalette.cs +++ b/OpenRA.Game/Traits/Player/FixedColorPalette.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; namespace OpenRA.Traits diff --git a/OpenRA.Game/Traits/Player/PlayerColorPalette.cs b/OpenRA.Game/Traits/Player/PlayerColorPalette.cs index b443b08cc6..43e0f48bdb 100644 --- a/OpenRA.Game/Traits/Player/PlayerColorPalette.cs +++ b/OpenRA.Game/Traits/Player/PlayerColorPalette.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; namespace OpenRA.Traits diff --git a/OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs b/OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs index de516cc34a..c14de183dc 100644 --- a/OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs +++ b/OpenRA.Game/Traits/Player/PlayerHighlightPalette.cs @@ -9,7 +9,6 @@ #endregion using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Graphics; namespace OpenRA.Traits diff --git a/OpenRA.Game/Traits/Render/RenderSimple.cs b/OpenRA.Game/Traits/Render/RenderSimple.cs index e97f5ea310..a1dae7459f 100755 --- a/OpenRA.Game/Traits/Render/RenderSimple.cs +++ b/OpenRA.Game/Traits/Render/RenderSimple.cs @@ -10,7 +10,6 @@ using System; using System.Collections.Generic; -using System.Linq; using OpenRA.Graphics; namespace OpenRA.Traits diff --git a/OpenRA.Game/Traits/Render/RenderSprites.cs b/OpenRA.Game/Traits/Render/RenderSprites.cs index dc08b42200..3faad9748d 100755 --- a/OpenRA.Game/Traits/Render/RenderSprites.cs +++ b/OpenRA.Game/Traits/Render/RenderSprites.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Linq; using OpenRA.Graphics; -using OpenRA.FileFormats; using OpenRA.Primitives; namespace OpenRA.Traits diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index c35d05dc01..4c7554d89b 100755 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Network; diff --git a/OpenRA.Game/Traits/World/ActorMap.cs b/OpenRA.Game/Traits/World/ActorMap.cs index 8242e991fc..24b5dfbc8a 100644 --- a/OpenRA.Game/Traits/World/ActorMap.cs +++ b/OpenRA.Game/Traits/World/ActorMap.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; namespace OpenRA.Traits { diff --git a/OpenRA.Game/Traits/World/ResourceLayer.cs b/OpenRA.Game/Traits/World/ResourceLayer.cs index 6cb45b801e..e41391e672 100644 --- a/OpenRA.Game/Traits/World/ResourceLayer.cs +++ b/OpenRA.Game/Traits/World/ResourceLayer.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; namespace OpenRA.Traits diff --git a/OpenRA.Game/Traits/World/ResourceType.cs b/OpenRA.Game/Traits/World/ResourceType.cs index f3e8b98b20..6bdbb4f582 100644 --- a/OpenRA.Game/Traits/World/ResourceType.cs +++ b/OpenRA.Game/Traits/World/ResourceType.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using System.Linq; using OpenRA.Graphics; namespace OpenRA.Traits diff --git a/OpenRA.Game/Widgets/ButtonWidget.cs b/OpenRA.Game/Widgets/ButtonWidget.cs index 19a3a322cb..7480c5dbbf 100644 --- a/OpenRA.Game/Widgets/ButtonWidget.cs +++ b/OpenRA.Game/Widgets/ButtonWidget.cs @@ -10,7 +10,6 @@ using System; using System.Drawing; -using OpenRA.FileFormats; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/CheckboxWidget.cs b/OpenRA.Game/Widgets/CheckboxWidget.cs index bf19e76821..ad7e7c251b 100644 --- a/OpenRA.Game/Widgets/CheckboxWidget.cs +++ b/OpenRA.Game/Widgets/CheckboxWidget.cs @@ -11,7 +11,6 @@ using System; using System.Drawing; using OpenRA.Graphics; -using OpenRA.Network; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/ChromeMetrics.cs b/OpenRA.Game/Widgets/ChromeMetrics.cs index b0b5d526e8..59b09ff64d 100644 --- a/OpenRA.Game/Widgets/ChromeMetrics.cs +++ b/OpenRA.Game/Widgets/ChromeMetrics.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs b/OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs index 8531b6ab00..8414277553 100644 --- a/OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs +++ b/OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs @@ -9,7 +9,6 @@ #endregion using System; -using OpenRA.FileFormats; using OpenRA.Network; namespace OpenRA.Widgets diff --git a/OpenRA.Game/Widgets/DropDownButtonWidget.cs b/OpenRA.Game/Widgets/DropDownButtonWidget.cs index a3d5460d84..edf97a7ba3 100644 --- a/OpenRA.Game/Widgets/DropDownButtonWidget.cs +++ b/OpenRA.Game/Widgets/DropDownButtonWidget.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using OpenRA.Graphics; -using OpenRA.Network; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/LabelWidget.cs b/OpenRA.Game/Widgets/LabelWidget.cs index 42b913c166..8f06438f34 100644 --- a/OpenRA.Game/Widgets/LabelWidget.cs +++ b/OpenRA.Game/Widgets/LabelWidget.cs @@ -10,7 +10,6 @@ using System; using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Graphics; namespace OpenRA.Widgets diff --git a/OpenRA.Game/Widgets/MapPreviewWidget.cs b/OpenRA.Game/Widgets/MapPreviewWidget.cs index b16d892af6..ca06d01d32 100644 --- a/OpenRA.Game/Widgets/MapPreviewWidget.cs +++ b/OpenRA.Game/Widgets/MapPreviewWidget.cs @@ -12,8 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using System.Threading; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Network; diff --git a/OpenRA.Game/Widgets/RootWidget.cs b/OpenRA.Game/Widgets/RootWidget.cs index 3029bc0e28..92d970ac0d 100644 --- a/OpenRA.Game/Widgets/RootWidget.cs +++ b/OpenRA.Game/Widgets/RootWidget.cs @@ -8,7 +8,6 @@ */ #endregion -using System; using OpenRA.Graphics; namespace OpenRA.Widgets diff --git a/OpenRA.Game/Widgets/ScrollItemWidget.cs b/OpenRA.Game/Widgets/ScrollItemWidget.cs index b1528617d5..a35596e10a 100644 --- a/OpenRA.Game/Widgets/ScrollItemWidget.cs +++ b/OpenRA.Game/Widgets/ScrollItemWidget.cs @@ -9,8 +9,6 @@ #endregion using System; -using OpenRA.Graphics; -using OpenRA.Network; namespace OpenRA.Widgets { diff --git a/OpenRA.Game/Widgets/ViewportControllerWidget.cs b/OpenRA.Game/Widgets/ViewportControllerWidget.cs index dbd04865da..bdd1d213fd 100644 --- a/OpenRA.Game/Widgets/ViewportControllerWidget.cs +++ b/OpenRA.Game/Widgets/ViewportControllerWidget.cs @@ -11,8 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; -using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Orders; using OpenRA.Traits; diff --git a/OpenRA.Game/Widgets/WidgetLoader.cs b/OpenRA.Game/Widgets/WidgetLoader.cs index a3f9d65b0e..7b1eaba04e 100644 --- a/OpenRA.Game/Widgets/WidgetLoader.cs +++ b/OpenRA.Game/Widgets/WidgetLoader.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Widgets; namespace OpenRA diff --git a/OpenRA.Game/Widgets/WidgetUtils.cs b/OpenRA.Game/Widgets/WidgetUtils.cs index 7ff7aaaf7c..ce08b51187 100644 --- a/OpenRA.Game/Widgets/WidgetUtils.cs +++ b/OpenRA.Game/Widgets/WidgetUtils.cs @@ -9,10 +9,8 @@ #endregion using System; -using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; namespace OpenRA.Widgets diff --git a/OpenRA.Game/WorldUtils.cs b/OpenRA.Game/WorldUtils.cs index 478e18fe75..481b9a405e 100644 --- a/OpenRA.Game/WorldUtils.cs +++ b/OpenRA.Game/WorldUtils.cs @@ -11,9 +11,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.GameRules; using OpenRA.Support; using OpenRA.Traits; diff --git a/OpenRA.Irc/IrcClient.cs b/OpenRA.Irc/IrcClient.cs index 6f655566d3..9fc077a795 100644 --- a/OpenRA.Irc/IrcClient.cs +++ b/OpenRA.Irc/IrcClient.cs @@ -10,7 +10,6 @@ using System; using System.IO; -using System.Linq; using System.Net.Sockets; using System.Threading; using OpenRA.Primitives; diff --git a/OpenRA.Lint/YamlChecker.cs b/OpenRA.Lint/YamlChecker.cs index 0f2e1e1e01..943a316bbd 100644 --- a/OpenRA.Lint/YamlChecker.cs +++ b/OpenRA.Lint/YamlChecker.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.IO; using OpenRA.FileSystem; using OpenRA.Traits; diff --git a/OpenRA.Mods.Cnc/CncLoadScreen.cs b/OpenRA.Mods.Cnc/CncLoadScreen.cs index c83697ff56..c5fbb6517e 100644 --- a/OpenRA.Mods.Cnc/CncLoadScreen.cs +++ b/OpenRA.Mods.Cnc/CncLoadScreen.cs @@ -8,14 +8,12 @@ */ #endregion -using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Linq; using OpenRA.FileSystem; using OpenRA.Graphics; -using OpenRA.Support; using OpenRA.Widgets; namespace OpenRA.Mods.Cnc diff --git a/OpenRA.Mods.Cnc/ProductionAirdrop.cs b/OpenRA.Mods.Cnc/ProductionAirdrop.cs index 61db327831..509672c3f6 100644 --- a/OpenRA.Mods.Cnc/ProductionAirdrop.cs +++ b/OpenRA.Mods.Cnc/ProductionAirdrop.cs @@ -12,7 +12,6 @@ using System.Linq; using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Air; -using OpenRA.Mods.RA.Render; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs b/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs index 9ce8c24f35..0ecd483def 100644 --- a/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs +++ b/OpenRA.Mods.Cnc/ProductionQueueFromSelection.cs @@ -10,7 +10,6 @@ using System; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Mods.RA; using OpenRA.Traits; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Cnc/RenderGunboat.cs b/OpenRA.Mods.Cnc/RenderGunboat.cs index 3a75281cc1..2370fb6160 100644 --- a/OpenRA.Mods.Cnc/RenderGunboat.cs +++ b/OpenRA.Mods.Cnc/RenderGunboat.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs index a06607f830..001f198b68 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs @@ -12,7 +12,6 @@ using System.Drawing; using System.Linq; using OpenRA.Mods.RA; using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Orders; using OpenRA.Mods.RA.Widgets; using OpenRA.Traits; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs index c024894a8c..53ea45904d 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncInstallFromCDLogic.cs @@ -12,7 +12,6 @@ using System; using System.IO; using System.Linq; using System.Threading; -using OpenRA.FileFormats; using OpenRA.Widgets; namespace OpenRA.Mods.Cnc.Widgets.Logic diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs index 45bd51f551..30b0b8f625 100644 --- a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Network; using OpenRA.Mods.RA; diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs index b014bcd8a3..e2432a4446 100644 --- a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Mods.RA; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs b/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs index 3c506bed49..00d4c57b50 100644 --- a/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/SupportPowersWidget.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Mods.RA; using OpenRA.Widgets; diff --git a/OpenRA.Mods.Cnc/WithCargo.cs b/OpenRA.Mods.Cnc/WithCargo.cs index 7151f4a61f..dd88f52397 100644 --- a/OpenRA.Mods.Cnc/WithCargo.cs +++ b/OpenRA.Mods.Cnc/WithCargo.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Mods.RA; using OpenRA.Traits; diff --git a/OpenRA.Mods.Cnc/WithDeliveryAnimation.cs b/OpenRA.Mods.Cnc/WithDeliveryAnimation.cs index ce38bdd30b..4003f0449f 100644 --- a/OpenRA.Mods.Cnc/WithDeliveryAnimation.cs +++ b/OpenRA.Mods.Cnc/WithDeliveryAnimation.cs @@ -8,13 +8,7 @@ */ #endregion -using System.Collections.Generic; -using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Graphics; using OpenRA.Traits; -using OpenRA.Mods.RA.Buildings; -using OpenRA.Effects; namespace OpenRA.Mods.RA.Render { diff --git a/OpenRA.Mods.D2k/D2kResourceLayer.cs b/OpenRA.Mods.D2k/D2kResourceLayer.cs index fbf1f9c427..01cf32cb32 100644 --- a/OpenRA.Mods.D2k/D2kResourceLayer.cs +++ b/OpenRA.Mods.D2k/D2kResourceLayer.cs @@ -11,8 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Graphics; namespace OpenRA.Traits { diff --git a/OpenRA.Mods.D2k/DamagedWithoutFoundation.cs b/OpenRA.Mods.D2k/DamagedWithoutFoundation.cs index 28a6ee9754..2f177dc919 100644 --- a/OpenRA.Mods.D2k/DamagedWithoutFoundation.cs +++ b/OpenRA.Mods.D2k/DamagedWithoutFoundation.cs @@ -8,10 +8,8 @@ */ #endregion -using System; using System.Linq; using OpenRA.GameRules; -using OpenRA.Mods.RA.Buildings; using OpenRA.Traits; namespace OpenRA.Mods.Cnc diff --git a/OpenRA.Mods.D2k/PaletteFromScaledPalette.cs b/OpenRA.Mods.D2k/PaletteFromScaledPalette.cs index f5b68db30b..a5fe8f4af1 100644 --- a/OpenRA.Mods.D2k/PaletteFromScaledPalette.cs +++ b/OpenRA.Mods.D2k/PaletteFromScaledPalette.cs @@ -8,11 +8,8 @@ */ #endregion -using System; using System.Drawing; -using OpenRA.FileSystem; using OpenRA.Graphics; -using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.D2k diff --git a/OpenRA.Mods.D2k/Render/WithBuildingPlacedOverlayInfo.cs b/OpenRA.Mods.D2k/Render/WithBuildingPlacedOverlayInfo.cs index 13326c6477..9de5b44490 100644 --- a/OpenRA.Mods.D2k/Render/WithBuildingPlacedOverlayInfo.cs +++ b/OpenRA.Mods.D2k/Render/WithBuildingPlacedOverlayInfo.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; using OpenRA.Mods.RA.Buildings; diff --git a/OpenRA.Mods.D2k/Render/WithCrumbleOverlay.cs b/OpenRA.Mods.D2k/Render/WithCrumbleOverlay.cs index 947d1998e1..e1c4d882b1 100644 --- a/OpenRA.Mods.D2k/Render/WithCrumbleOverlay.cs +++ b/OpenRA.Mods.D2k/Render/WithCrumbleOverlay.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.D2k/Render/WithDeliveryOverlay.cs b/OpenRA.Mods.D2k/Render/WithDeliveryOverlay.cs index 840175d3d5..989ab6d93a 100644 --- a/OpenRA.Mods.D2k/Render/WithDeliveryOverlay.cs +++ b/OpenRA.Mods.D2k/Render/WithDeliveryOverlay.cs @@ -9,7 +9,6 @@ #endregion using OpenRA.Effects; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; using OpenRA.Mods.RA.Buildings; diff --git a/OpenRA.Mods.D2k/Render/WithDockingOverlay.cs b/OpenRA.Mods.D2k/Render/WithDockingOverlay.cs index 817aaa1599..e5d981b576 100644 --- a/OpenRA.Mods.D2k/Render/WithDockingOverlay.cs +++ b/OpenRA.Mods.D2k/Render/WithDockingOverlay.cs @@ -9,7 +9,6 @@ #endregion using OpenRA.Effects; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; using OpenRA.Mods.RA.Buildings; diff --git a/OpenRA.Mods.D2k/Render/WithProductionOverlay.cs b/OpenRA.Mods.D2k/Render/WithProductionOverlay.cs index ef8c870819..65e943b97c 100644 --- a/OpenRA.Mods.D2k/Render/WithProductionOverlay.cs +++ b/OpenRA.Mods.D2k/Render/WithProductionOverlay.cs @@ -9,9 +9,7 @@ #endregion using System; -using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Mods.RA.Buildings; using OpenRA.Traits; diff --git a/OpenRA.Mods.D2k/ThrowsShrapnel.cs b/OpenRA.Mods.D2k/ThrowsShrapnel.cs index 8dc74b03df..87da530b1f 100644 --- a/OpenRA.Mods.D2k/ThrowsShrapnel.cs +++ b/OpenRA.Mods.D2k/ThrowsShrapnel.cs @@ -9,11 +9,7 @@ #endregion using OpenRA.GameRules; -using OpenRA.FileFormats; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using OpenRA.Traits; namespace OpenRA.Mods.D2k diff --git a/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs b/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs index 13a16459d3..234afbd7fb 100644 --- a/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs +++ b/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs @@ -12,7 +12,6 @@ using System; using System.IO; using System.Linq; using System.Threading; -using OpenRA.FileFormats; using OpenRA.Widgets; namespace OpenRA.Mods.D2k.Widgets.Logic diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index bf7df6341c..f3a2b3768f 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Air; using OpenRA.Mods.RA.Buildings; diff --git a/OpenRA.Mods.RA/AcceptsSupplies.cs b/OpenRA.Mods.RA/AcceptsSupplies.cs index fea9571bd2..e76eb02a31 100644 --- a/OpenRA.Mods.RA/AcceptsSupplies.cs +++ b/OpenRA.Mods.RA/AcceptsSupplies.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Activities/DeliverResources.cs b/OpenRA.Mods.RA/Activities/DeliverResources.cs index 80faea03ff..2cc9c2b887 100755 --- a/OpenRA.Mods.RA/Activities/DeliverResources.cs +++ b/OpenRA.Mods.RA/Activities/DeliverResources.cs @@ -10,7 +10,6 @@ using System.Drawing; using OpenRA.Traits; -using OpenRA.Mods.RA.Move; namespace OpenRA.Mods.RA.Activities { diff --git a/OpenRA.Mods.RA/Activities/Enter.cs b/OpenRA.Mods.RA/Activities/Enter.cs index f9a1b1a64d..17d37773a2 100755 --- a/OpenRA.Mods.RA/Activities/Enter.cs +++ b/OpenRA.Mods.RA/Activities/Enter.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA.Activities diff --git a/OpenRA.Mods.RA/Activities/FlyFollow.cs b/OpenRA.Mods.RA/Activities/FlyFollow.cs index 18664cd1f7..2e62d3fdb1 100644 --- a/OpenRA.Mods.RA/Activities/FlyFollow.cs +++ b/OpenRA.Mods.RA/Activities/FlyFollow.cs @@ -9,7 +9,6 @@ #endregion using OpenRA.Mods.RA.Air; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA.Activities diff --git a/OpenRA.Mods.RA/Activities/Follow.cs b/OpenRA.Mods.RA/Activities/Follow.cs index ec82a8ca09..3f74bf8621 100644 --- a/OpenRA.Mods.RA/Activities/Follow.cs +++ b/OpenRA.Mods.RA/Activities/Follow.cs @@ -9,7 +9,6 @@ #endregion using OpenRA.Traits; -using OpenRA.Mods.RA.Move; namespace OpenRA.Mods.RA.Activities { diff --git a/OpenRA.Mods.RA/Activities/Hunt.cs b/OpenRA.Mods.RA/Activities/Hunt.cs index 863de0cd80..f0725c91bb 100644 --- a/OpenRA.Mods.RA/Activities/Hunt.cs +++ b/OpenRA.Mods.RA/Activities/Hunt.cs @@ -10,8 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA.Activities diff --git a/OpenRA.Mods.RA/Activities/LayMines.cs b/OpenRA.Mods.RA/Activities/LayMines.cs index 5de39b7531..b104548774 100644 --- a/OpenRA.Mods.RA/Activities/LayMines.cs +++ b/OpenRA.Mods.RA/Activities/LayMines.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; using OpenRA.Primitives; diff --git a/OpenRA.Mods.RA/Activities/Rearm.cs b/OpenRA.Mods.RA/Activities/Rearm.cs index 1084ff6cd2..3a2498b92e 100644 --- a/OpenRA.Mods.RA/Activities/Rearm.cs +++ b/OpenRA.Mods.RA/Activities/Rearm.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.Mods.RA.Air; using OpenRA.Mods.RA.Render; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Activities/Repair.cs b/OpenRA.Mods.RA/Activities/Repair.cs index 9b9385cc6c..0911e818cf 100644 --- a/OpenRA.Mods.RA/Activities/Repair.cs +++ b/OpenRA.Mods.RA/Activities/Repair.cs @@ -9,9 +9,6 @@ #endregion using System; -using System.Linq; -using OpenRA.Mods.RA.Air; -using OpenRA.Mods.RA.Render; using OpenRA.Traits; namespace OpenRA.Mods.RA.Activities diff --git a/OpenRA.Mods.RA/Activities/UnloadCargo.cs b/OpenRA.Mods.RA/Activities/UnloadCargo.cs index b248603c89..62c54e1b13 100644 --- a/OpenRA.Mods.RA/Activities/UnloadCargo.cs +++ b/OpenRA.Mods.RA/Activities/UnloadCargo.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA.Activities diff --git a/OpenRA.Mods.RA/Attack/AttackBase.cs b/OpenRA.Mods.RA/Attack/AttackBase.cs index fd80502e63..d5ab7465b1 100644 --- a/OpenRA.Mods.RA/Attack/AttackBase.cs +++ b/OpenRA.Mods.RA/Attack/AttackBase.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Buildings; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Attack/AttackCharge.cs b/OpenRA.Mods.RA/Attack/AttackCharge.cs index 35fa06a31d..89c5401dac 100644 --- a/OpenRA.Mods.RA/Attack/AttackCharge.cs +++ b/OpenRA.Mods.RA/Attack/AttackCharge.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Render; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Attack/AttackFollow.cs b/OpenRA.Mods.RA/Attack/AttackFollow.cs index 248fd77a79..2eb3bb3d10 100644 --- a/OpenRA.Mods.RA/Attack/AttackFollow.cs +++ b/OpenRA.Mods.RA/Attack/AttackFollow.cs @@ -9,9 +9,6 @@ #endregion using System; -using System.Collections.Generic; -using OpenRA.FileFormats; -using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Move; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Attack/AttackFrontal.cs b/OpenRA.Mods.RA/Attack/AttackFrontal.cs index 4008a5f6e2..c46a2c8fae 100644 --- a/OpenRA.Mods.RA/Attack/AttackFrontal.cs +++ b/OpenRA.Mods.RA/Attack/AttackFrontal.cs @@ -9,7 +9,6 @@ #endregion using System; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs b/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs index caf816463d..42f69a3eaf 100644 --- a/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs +++ b/OpenRA.Mods.RA/Attack/AttackGarrisoned.cs @@ -11,10 +11,7 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Render; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Attack/AttackLeap.cs b/OpenRA.Mods.RA/Attack/AttackLeap.cs index 0a657a74c3..a41409cc69 100644 --- a/OpenRA.Mods.RA/Attack/AttackLeap.cs +++ b/OpenRA.Mods.RA/Attack/AttackLeap.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Attack/AttackMedic.cs b/OpenRA.Mods.RA/Attack/AttackMedic.cs index 461047f6a1..4065582a42 100644 --- a/OpenRA.Mods.RA/Attack/AttackMedic.cs +++ b/OpenRA.Mods.RA/Attack/AttackMedic.cs @@ -8,8 +8,6 @@ */ #endregion -using System; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Attack/AttackOmni.cs b/OpenRA.Mods.RA/Attack/AttackOmni.cs index 517527e5a3..dac8f0df40 100644 --- a/OpenRA.Mods.RA/Attack/AttackOmni.cs +++ b/OpenRA.Mods.RA/Attack/AttackOmni.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Attack/AttackTurreted.cs b/OpenRA.Mods.RA/Attack/AttackTurreted.cs index dee42a5761..d8476439e4 100644 --- a/OpenRA.Mods.RA/Attack/AttackTurreted.cs +++ b/OpenRA.Mods.RA/Attack/AttackTurreted.cs @@ -8,11 +8,7 @@ */ #endregion -using System; using System.Collections.Generic; -using OpenRA.FileFormats; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/AttackBomber.cs b/OpenRA.Mods.RA/AttackBomber.cs index 48a219642b..4c25fb82e5 100644 --- a/OpenRA.Mods.RA/AttackBomber.cs +++ b/OpenRA.Mods.RA/AttackBomber.cs @@ -10,7 +10,6 @@ using System; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/AttackMove.cs b/OpenRA.Mods.RA/AttackMove.cs index 631c5ffa0d..9ffc6f42f7 100644 --- a/OpenRA.Mods.RA/AttackMove.cs +++ b/OpenRA.Mods.RA/AttackMove.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Drawing; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/AutoHeal.cs b/OpenRA.Mods.RA/AutoHeal.cs index 50fad4dacb..6726e55dc6 100644 --- a/OpenRA.Mods.RA/AutoHeal.cs +++ b/OpenRA.Mods.RA/AutoHeal.cs @@ -10,7 +10,6 @@ using System.Linq; using OpenRA.Traits; -using OpenRA.FileFormats; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.RA/AutoTarget.cs b/OpenRA.Mods.RA/AutoTarget.cs index 7e31612268..5a7aa65210 100644 --- a/OpenRA.Mods.RA/AutoTarget.cs +++ b/OpenRA.Mods.RA/AutoTarget.cs @@ -10,7 +10,6 @@ using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/BaseBuilding.cs b/OpenRA.Mods.RA/BaseBuilding.cs index e7298e4660..e32ba5d7d3 100644 --- a/OpenRA.Mods.RA/BaseBuilding.cs +++ b/OpenRA.Mods.RA/BaseBuilding.cs @@ -9,7 +9,6 @@ #endregion using OpenRA.Traits; -using OpenRA.FileFormats; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.RA/Buildings/Bib.cs b/OpenRA.Mods.RA/Buildings/Bib.cs index 894fd715ec..6d93fa3dff 100755 --- a/OpenRA.Mods.RA/Buildings/Bib.cs +++ b/OpenRA.Mods.RA/Buildings/Bib.cs @@ -8,8 +8,6 @@ */ #endregion -using System.Collections.Generic; -using System.Linq; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Buildings/CustomBuildTimeValue.cs b/OpenRA.Mods.RA/Buildings/CustomBuildTimeValue.cs index ca8ca39843..ac5f489602 100755 --- a/OpenRA.Mods.RA/Buildings/CustomBuildTimeValue.cs +++ b/OpenRA.Mods.RA/Buildings/CustomBuildTimeValue.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA.Buildings diff --git a/OpenRA.Mods.RA/Buildings/CustomSellValue.cs b/OpenRA.Mods.RA/Buildings/CustomSellValue.cs index 302aa016bd..d1fb595e9d 100755 --- a/OpenRA.Mods.RA/Buildings/CustomSellValue.cs +++ b/OpenRA.Mods.RA/Buildings/CustomSellValue.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA.Buildings diff --git a/OpenRA.Mods.RA/Buildings/Demolishable.cs b/OpenRA.Mods.RA/Buildings/Demolishable.cs index 2495ff493e..6afef8bd28 100644 --- a/OpenRA.Mods.RA/Buildings/Demolishable.cs +++ b/OpenRA.Mods.RA/Buildings/Demolishable.cs @@ -7,9 +7,8 @@ * see COPYING. */ #endregion -using System; + using OpenRA.Traits; -using OpenRA.FileFormats; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.RA/Buildings/LaysTerrain.cs b/OpenRA.Mods.RA/Buildings/LaysTerrain.cs index a44cdc2381..02e3391b4c 100755 --- a/OpenRA.Mods.RA/Buildings/LaysTerrain.cs +++ b/OpenRA.Mods.RA/Buildings/LaysTerrain.cs @@ -8,10 +8,7 @@ */ #endregion -using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Graphics; using OpenRA.Traits; namespace OpenRA.Mods.RA.Buildings diff --git a/OpenRA.Mods.RA/Buildings/LineBuild.cs b/OpenRA.Mods.RA/Buildings/LineBuild.cs index 9dbf1b3330..bce05a7e88 100755 --- a/OpenRA.Mods.RA/Buildings/LineBuild.cs +++ b/OpenRA.Mods.RA/Buildings/LineBuild.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA.Buildings diff --git a/OpenRA.Mods.RA/Buildings/LineBuildNode.cs b/OpenRA.Mods.RA/Buildings/LineBuildNode.cs index 762d39f54f..e03d1610bd 100644 --- a/OpenRA.Mods.RA/Buildings/LineBuildNode.cs +++ b/OpenRA.Mods.RA/Buildings/LineBuildNode.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA.Buildings diff --git a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs b/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs index d5394b9bad..0b2dd70e89 100755 --- a/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs +++ b/OpenRA.Mods.RA/Buildings/RepairableBuilding.cs @@ -11,7 +11,6 @@ using System; using OpenRA.Mods.RA.Effects; using OpenRA.Traits; -using OpenRA.FileFormats; namespace OpenRA.Mods.RA.Buildings { diff --git a/OpenRA.Mods.RA/Capturable.cs b/OpenRA.Mods.RA/Capturable.cs index 3d8844ad43..ed49670326 100644 --- a/OpenRA.Mods.RA/Capturable.cs +++ b/OpenRA.Mods.RA/Capturable.cs @@ -9,8 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Mods.RA.Activities; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Captures.cs b/OpenRA.Mods.RA/Captures.cs index 809ada7686..ac364f5be7 100644 --- a/OpenRA.Mods.RA/Captures.cs +++ b/OpenRA.Mods.RA/Captures.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Orders; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/CashTrickler.cs b/OpenRA.Mods.RA/CashTrickler.cs index 4f1583bef7..b27ad851fb 100644 --- a/OpenRA.Mods.RA/CashTrickler.cs +++ b/OpenRA.Mods.RA/CashTrickler.cs @@ -10,7 +10,6 @@ using OpenRA.Traits; using OpenRA.Mods.RA.Effects; -using OpenRA.FileFormats; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs b/OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs index ff7d6e609b..6dd2d35ef0 100644 --- a/OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs +++ b/OpenRA.Mods.RA/ChronoshiftPaletteEffect.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using OpenRA.Graphics; -using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Chronoshiftable.cs b/OpenRA.Mods.RA/Chronoshiftable.cs index 7de0496a14..b9d076b74b 100755 --- a/OpenRA.Mods.RA/Chronoshiftable.cs +++ b/OpenRA.Mods.RA/Chronoshiftable.cs @@ -9,7 +9,6 @@ #endregion using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/CloakPaletteEffect.cs b/OpenRA.Mods.RA/CloakPaletteEffect.cs index c44bcfe118..b8dfd61cd4 100644 --- a/OpenRA.Mods.RA/CloakPaletteEffect.cs +++ b/OpenRA.Mods.RA/CloakPaletteEffect.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using OpenRA.Graphics; -using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/CombatDebugOverlay.cs b/OpenRA.Mods.RA/CombatDebugOverlay.cs index 3b6c930805..e718f8871d 100644 --- a/OpenRA.Mods.RA/CombatDebugOverlay.cs +++ b/OpenRA.Mods.RA/CombatDebugOverlay.cs @@ -9,9 +9,7 @@ #endregion using System; -using System.Collections.Generic; using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/ConquestVictoryConditions.cs b/OpenRA.Mods.RA/ConquestVictoryConditions.cs index 170e1feeaf..e0f5c9048e 100644 --- a/OpenRA.Mods.RA/ConquestVictoryConditions.cs +++ b/OpenRA.Mods.RA/ConquestVictoryConditions.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Console/DevCommands.cs b/OpenRA.Mods.RA/Console/DevCommands.cs index 22a3b1b0a1..0840738410 100644 --- a/OpenRA.Mods.RA/Console/DevCommands.cs +++ b/OpenRA.Mods.RA/Console/DevCommands.cs @@ -9,8 +9,6 @@ #endregion using System; -using System.Collections.Generic; -using System.Linq; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Console/HelpCommand.cs b/OpenRA.Mods.RA/Console/HelpCommand.cs index 16a9b254c3..4296c6c05f 100644 --- a/OpenRA.Mods.RA/Console/HelpCommand.cs +++ b/OpenRA.Mods.RA/Console/HelpCommand.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using System.Linq; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Crate.cs b/OpenRA.Mods.RA/Crate.cs index 0c0bb85728..fa8cdd58a6 100644 --- a/OpenRA.Mods.RA/Crate.cs +++ b/OpenRA.Mods.RA/Crate.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Buildings; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/CrateAction.cs b/OpenRA.Mods.RA/CrateAction.cs index 20d4a59da3..c72221e039 100644 --- a/OpenRA.Mods.RA/CrateAction.cs +++ b/OpenRA.Mods.RA/CrateAction.cs @@ -10,7 +10,6 @@ using System.Linq; using OpenRA.Mods.RA.Effects; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/CrateSpawner.cs b/OpenRA.Mods.RA/CrateSpawner.cs index f4d218086a..fa7c73d260 100644 --- a/OpenRA.Mods.RA/CrateSpawner.cs +++ b/OpenRA.Mods.RA/CrateSpawner.cs @@ -9,7 +9,6 @@ #endregion using System; -using System.Collections.Generic; using System.Linq; using OpenRA.Mods.RA.Air; using OpenRA.Mods.RA.Buildings; diff --git a/OpenRA.Mods.RA/Crates/UnitUpgradeCrateAction.cs b/OpenRA.Mods.RA/Crates/UnitUpgradeCrateAction.cs index 0c1f4b158d..fdc8d00520 100644 --- a/OpenRA.Mods.RA/Crates/UnitUpgradeCrateAction.cs +++ b/OpenRA.Mods.RA/Crates/UnitUpgradeCrateAction.cs @@ -8,8 +8,6 @@ */ #endregion -using System.Linq; - namespace OpenRA.Mods.RA.Crates { public class UnitUpgradeCrateActionInfo : CrateActionInfo diff --git a/OpenRA.Mods.RA/CreateMPPlayers.cs b/OpenRA.Mods.RA/CreateMPPlayers.cs index 455133e2f9..9b80119368 100644 --- a/OpenRA.Mods.RA/CreateMPPlayers.cs +++ b/OpenRA.Mods.RA/CreateMPPlayers.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.Network; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/DeathSounds.cs b/OpenRA.Mods.RA/DeathSounds.cs index 291985c8b0..ce047f9806 100644 --- a/OpenRA.Mods.RA/DeathSounds.cs +++ b/OpenRA.Mods.RA/DeathSounds.cs @@ -9,8 +9,6 @@ #endregion using System.Linq; -using OpenRA.Mods.RA.Move; -using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/DefaultLoadScreen.cs b/OpenRA.Mods.RA/DefaultLoadScreen.cs index a6471abb45..ef6b5342d7 100644 --- a/OpenRA.Mods.RA/DefaultLoadScreen.cs +++ b/OpenRA.Mods.RA/DefaultLoadScreen.cs @@ -8,15 +8,12 @@ */ #endregion -using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Linq; using OpenRA.FileSystem; using OpenRA.Graphics; -using OpenRA.Primitives; -using OpenRA.Support; using OpenRA.Widgets; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Effects/Beacon.cs b/OpenRA.Mods.RA/Effects/Beacon.cs index a192cc8f00..48e7d2bdb9 100644 --- a/OpenRA.Mods.RA/Effects/Beacon.cs +++ b/OpenRA.Mods.RA/Effects/Beacon.cs @@ -10,7 +10,6 @@ using System; using System.Collections.Generic; -using System.Linq; using OpenRA.Effects; using OpenRA.Graphics; diff --git a/OpenRA.Mods.RA/Effects/Bullet.cs b/OpenRA.Mods.RA/Effects/Bullet.cs index 69f767ffa3..c528a98a53 100755 --- a/OpenRA.Mods.RA/Effects/Bullet.cs +++ b/OpenRA.Mods.RA/Effects/Bullet.cs @@ -13,7 +13,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.Effects; -using OpenRA.FileFormats; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Effects/Contrail.cs b/OpenRA.Mods.RA/Effects/Contrail.cs index 8f4ee7cc06..e947e02419 100755 --- a/OpenRA.Mods.RA/Effects/Contrail.cs +++ b/OpenRA.Mods.RA/Effects/Contrail.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Effects/InvulnEffect.cs b/OpenRA.Mods.RA/Effects/InvulnEffect.cs index e15c00b346..dc26ac5b76 100644 --- a/OpenRA.Mods.RA/Effects/InvulnEffect.cs +++ b/OpenRA.Mods.RA/Effects/InvulnEffect.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using OpenRA.Effects; using OpenRA.Graphics; -using OpenRA.Traits; namespace OpenRA.Mods.RA.Effects { diff --git a/OpenRA.Mods.RA/Effects/LaserZap.cs b/OpenRA.Mods.RA/Effects/LaserZap.cs index a9e23c9e81..e3da622a3d 100644 --- a/OpenRA.Mods.RA/Effects/LaserZap.cs +++ b/OpenRA.Mods.RA/Effects/LaserZap.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using OpenRA.Effects; -using OpenRA.FileFormats; using OpenRA.GameRules; using OpenRA.Graphics; diff --git a/OpenRA.Mods.RA/Effects/Missile.cs b/OpenRA.Mods.RA/Effects/Missile.cs index 17aa2e5c5d..424f006f6d 100755 --- a/OpenRA.Mods.RA/Effects/Missile.cs +++ b/OpenRA.Mods.RA/Effects/Missile.cs @@ -12,7 +12,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.Effects; -using OpenRA.FileFormats; using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Effects/PowerdownIndicator.cs b/OpenRA.Mods.RA/Effects/PowerdownIndicator.cs index d3b5eb5d9a..cd8c81b34f 100644 --- a/OpenRA.Mods.RA/Effects/PowerdownIndicator.cs +++ b/OpenRA.Mods.RA/Effects/PowerdownIndicator.cs @@ -12,7 +12,6 @@ using System.Collections.Generic; using OpenRA.Effects; using OpenRA.Graphics; using OpenRA.Mods.RA.Buildings; -using OpenRA.Traits; namespace OpenRA.Mods.RA.Effects { diff --git a/OpenRA.Mods.RA/Effects/RallyPoint.cs b/OpenRA.Mods.RA/Effects/RallyPoint.cs index 67e95de691..6a4731a5a7 100755 --- a/OpenRA.Mods.RA/Effects/RallyPoint.cs +++ b/OpenRA.Mods.RA/Effects/RallyPoint.cs @@ -12,7 +12,6 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Effects; using OpenRA.Graphics; -using OpenRA.Traits; namespace OpenRA.Mods.RA.Effects { diff --git a/OpenRA.Mods.RA/Effects/Rank.cs b/OpenRA.Mods.RA/Effects/Rank.cs index 3f2208332a..fa504ade10 100644 --- a/OpenRA.Mods.RA/Effects/Rank.cs +++ b/OpenRA.Mods.RA/Effects/Rank.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using OpenRA.Effects; using OpenRA.Graphics; -using OpenRA.Traits; namespace OpenRA.Mods.RA.Effects { diff --git a/OpenRA.Mods.RA/Effects/RepairIndicator.cs b/OpenRA.Mods.RA/Effects/RepairIndicator.cs index ea114e1b12..445fd4a8b2 100755 --- a/OpenRA.Mods.RA/Effects/RepairIndicator.cs +++ b/OpenRA.Mods.RA/Effects/RepairIndicator.cs @@ -12,7 +12,6 @@ using System.Collections.Generic; using OpenRA.Effects; using OpenRA.Graphics; using OpenRA.Mods.RA.Buildings; -using OpenRA.Traits; namespace OpenRA.Mods.RA.Effects { diff --git a/OpenRA.Mods.RA/ExternalCapturable.cs b/OpenRA.Mods.RA/ExternalCapturable.cs index 08b4d2e72e..3808938b68 100644 --- a/OpenRA.Mods.RA/ExternalCapturable.cs +++ b/OpenRA.Mods.RA/ExternalCapturable.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.Traits; using OpenRA.Mods.RA.Buildings; diff --git a/OpenRA.Mods.RA/ExternalCapturableBar.cs b/OpenRA.Mods.RA/ExternalCapturableBar.cs index 77e62ff1d5..5afc8144de 100644 --- a/OpenRA.Mods.RA/ExternalCapturableBar.cs +++ b/OpenRA.Mods.RA/ExternalCapturableBar.cs @@ -9,7 +9,6 @@ #endregion using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/ExternalCaptures.cs b/OpenRA.Mods.RA/ExternalCaptures.cs index bca5dec092..7ca93f7b7c 100644 --- a/OpenRA.Mods.RA/ExternalCaptures.cs +++ b/OpenRA.Mods.RA/ExternalCaptures.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Orders; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/GainsExperience.cs b/OpenRA.Mods.RA/GainsExperience.cs index 7bf084a3b9..7068735ef9 100644 --- a/OpenRA.Mods.RA/GainsExperience.cs +++ b/OpenRA.Mods.RA/GainsExperience.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.GameRules; using OpenRA.Mods.RA.Effects; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/GivesBounty.cs b/OpenRA.Mods.RA/GivesBounty.cs index 2004a702a0..561e271995 100644 --- a/OpenRA.Mods.RA/GivesBounty.cs +++ b/OpenRA.Mods.RA/GivesBounty.cs @@ -11,7 +11,6 @@ using System.Linq; using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Effects; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/GivesExperience.cs b/OpenRA.Mods.RA/GivesExperience.cs index ee8baa2287..b36f74d244 100644 --- a/OpenRA.Mods.RA/GivesExperience.cs +++ b/OpenRA.Mods.RA/GivesExperience.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Guard.cs b/OpenRA.Mods.RA/Guard.cs index 2a329ae6e7..0e9e1b62f2 100644 --- a/OpenRA.Mods.RA/Guard.cs +++ b/OpenRA.Mods.RA/Guard.cs @@ -12,8 +12,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.Graphics; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Harvester.cs b/OpenRA.Mods.RA/Harvester.cs index 7b521311ca..5fac26d754 100644 --- a/OpenRA.Mods.RA/Harvester.cs +++ b/OpenRA.Mods.RA/Harvester.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Orders; diff --git a/OpenRA.Mods.RA/Husk.cs b/OpenRA.Mods.RA/Husk.cs index 810ee851ae..1606c1c3f7 100644 --- a/OpenRA.Mods.RA/Husk.cs +++ b/OpenRA.Mods.RA/Husk.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.Graphics; using OpenRA.Mods.RA.Move; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/LeavesHusk.cs b/OpenRA.Mods.RA/LeavesHusk.cs index 39206ee694..b69777969d 100644 --- a/OpenRA.Mods.RA/LeavesHusk.cs +++ b/OpenRA.Mods.RA/LeavesHusk.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.Mods.RA.Air; using OpenRA.Mods.RA.Move; using OpenRA.Primitives; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/LightPaletteRotator.cs b/OpenRA.Mods.RA/LightPaletteRotator.cs index ba9be9e341..34cbba5828 100644 --- a/OpenRA.Mods.RA/LightPaletteRotator.cs +++ b/OpenRA.Mods.RA/LightPaletteRotator.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Graphics; -using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/LimitedAmmo.cs b/OpenRA.Mods.RA/LimitedAmmo.cs index 079063deb0..d195aae0b5 100644 --- a/OpenRA.Mods.RA/LimitedAmmo.cs +++ b/OpenRA.Mods.RA/LimitedAmmo.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Lint/CheckActorReferences.cs b/OpenRA.Mods.RA/Lint/CheckActorReferences.cs index 8ca7b05713..e7aa82cff2 100644 --- a/OpenRA.Mods.RA/Lint/CheckActorReferences.cs +++ b/OpenRA.Mods.RA/Lint/CheckActorReferences.cs @@ -9,9 +9,7 @@ #endregion using System; -using System.Collections.Generic; using System.Reflection; -using OpenRA; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Lint/CheckSequences.cs b/OpenRA.Mods.RA/Lint/CheckSequences.cs index e154d425bd..e9ca3538c3 100644 --- a/OpenRA.Mods.RA/Lint/CheckSequences.cs +++ b/OpenRA.Mods.RA/Lint/CheckSequences.cs @@ -10,7 +10,6 @@ using System; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/MPStartUnits.cs b/OpenRA.Mods.RA/MPStartUnits.cs index bab7fac798..00934a2665 100644 --- a/OpenRA.Mods.RA/MPStartUnits.cs +++ b/OpenRA.Mods.RA/MPStartUnits.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/MenuPaletteEffect.cs b/OpenRA.Mods.RA/MenuPaletteEffect.cs index 96a638f0c6..1a1060ad2e 100644 --- a/OpenRA.Mods.RA/MenuPaletteEffect.cs +++ b/OpenRA.Mods.RA/MenuPaletteEffect.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Mine.cs b/OpenRA.Mods.RA/Mine.cs index 04651e95db..2af8a6aa2d 100644 --- a/OpenRA.Mods.RA/Mine.cs +++ b/OpenRA.Mods.RA/Mine.cs @@ -8,11 +8,9 @@ */ #endregion -using System.Collections.Generic; using System.Linq; using OpenRA.Mods.RA.Move; using OpenRA.Traits; -using OpenRA.FileFormats; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.RA/ModChooserLoadScreen.cs b/OpenRA.Mods.RA/ModChooserLoadScreen.cs index 639042312d..bdfc3d2968 100644 --- a/OpenRA.Mods.RA/ModChooserLoadScreen.cs +++ b/OpenRA.Mods.RA/ModChooserLoadScreen.cs @@ -8,13 +8,9 @@ */ #endregion -using System; using System.Collections.Generic; using System.Drawing; -using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Support; using OpenRA.Widgets; namespace OpenRA.Mods.Cnc diff --git a/OpenRA.Mods.RA/Modifiers/DisabledOverlay.cs b/OpenRA.Mods.RA/Modifiers/DisabledOverlay.cs index 04a15fc5e7..bce5fbb368 100644 --- a/OpenRA.Mods.RA/Modifiers/DisabledOverlay.cs +++ b/OpenRA.Mods.RA/Modifiers/DisabledOverlay.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs b/OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs index 1ab614f67a..931e9dcd1e 100644 --- a/OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs +++ b/OpenRA.Mods.RA/Modifiers/FrozenUnderFog.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Mods.RA.Buildings; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/NullLoadScreen.cs b/OpenRA.Mods.RA/NullLoadScreen.cs index 32df610872..05217fe3f4 100644 --- a/OpenRA.Mods.RA/NullLoadScreen.cs +++ b/OpenRA.Mods.RA/NullLoadScreen.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using OpenRA.FileFormats; using OpenRA.Widgets; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/PaletteFromRGBA.cs b/OpenRA.Mods.RA/PaletteFromRGBA.cs index f3dec16cb9..cc90622323 100644 --- a/OpenRA.Mods.RA/PaletteFromRGBA.cs +++ b/OpenRA.Mods.RA/PaletteFromRGBA.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; using OpenRA.Graphics; diff --git a/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs b/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs index 22f45314d7..0b99aaca47 100644 --- a/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ClassicProductionQueue.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Buildings; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Player/ProductionQueue.cs b/OpenRA.Mods.RA/Player/ProductionQueue.cs index 4dd1f06882..79c7f0cd70 100644 --- a/OpenRA.Mods.RA/Player/ProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ProductionQueue.cs @@ -13,7 +13,6 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Mods.RA.Buildings; using OpenRA.Traits; -using OpenRA.FileFormats; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.RA/Player/ProvidesTechPrerequisite.cs b/OpenRA.Mods.RA/Player/ProvidesTechPrerequisite.cs index deb9251845..d38581b3dd 100644 --- a/OpenRA.Mods.RA/Player/ProvidesTechPrerequisite.cs +++ b/OpenRA.Mods.RA/Player/ProvidesTechPrerequisite.cs @@ -8,13 +8,8 @@ */ #endregion -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using OpenRA.Primitives; using OpenRA.Traits; -using OpenRA.FileSystem; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.RA/PortableChrono.cs b/OpenRA.Mods.RA/PortableChrono.cs index f766a018de..65370b6dbe 100644 --- a/OpenRA.Mods.RA/PortableChrono.cs +++ b/OpenRA.Mods.RA/PortableChrono.cs @@ -12,7 +12,6 @@ using System.Collections.Generic; using System.Drawing; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Orders; -using OpenRA.FileFormats; using OpenRA.Traits; using OpenRA.Graphics; diff --git a/OpenRA.Mods.RA/PrimaryBuilding.cs b/OpenRA.Mods.RA/PrimaryBuilding.cs index 790b9d15d7..6dc94fac21 100755 --- a/OpenRA.Mods.RA/PrimaryBuilding.cs +++ b/OpenRA.Mods.RA/PrimaryBuilding.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Orders; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/ProductionBar.cs b/OpenRA.Mods.RA/ProductionBar.cs index dcc83e8da8..d599b1a176 100644 --- a/OpenRA.Mods.RA/ProductionBar.cs +++ b/OpenRA.Mods.RA/ProductionBar.cs @@ -11,7 +11,6 @@ using System; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/RallyPoint.cs b/OpenRA.Mods.RA/RallyPoint.cs index 6d29981e99..1b65a58114 100755 --- a/OpenRA.Mods.RA/RallyPoint.cs +++ b/OpenRA.Mods.RA/RallyPoint.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Reloads.cs b/OpenRA.Mods.RA/Reloads.cs index 482fa6a6cc..67b6b2976b 100644 --- a/OpenRA.Mods.RA/Reloads.cs +++ b/OpenRA.Mods.RA/Reloads.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/RemoveImmediately.cs b/OpenRA.Mods.RA/RemoveImmediately.cs index e3181a4b14..d9bd1b6c33 100644 --- a/OpenRA.Mods.RA/RemoveImmediately.cs +++ b/OpenRA.Mods.RA/RemoveImmediately.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Render/RenderBuilding.cs b/OpenRA.Mods.RA/Render/RenderBuilding.cs index ddc36eb7d2..abf8800e7e 100755 --- a/OpenRA.Mods.RA/Render/RenderBuilding.cs +++ b/OpenRA.Mods.RA/Render/RenderBuilding.cs @@ -10,7 +10,6 @@ using System; using System.Linq; -using System.Collections.Generic; using OpenRA.Graphics; using OpenRA.Mods.RA.Buildings; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs b/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs index 91c5f34330..da4c4b0537 100755 --- a/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs +++ b/OpenRA.Mods.RA/Render/RenderBuildingCharge.cs @@ -8,8 +8,6 @@ */ #endregion -using OpenRA.FileFormats; - namespace OpenRA.Mods.RA.Render { public class RenderBuildingChargeInfo : RenderBuildingInfo diff --git a/OpenRA.Mods.RA/Render/RenderInfantry.cs b/OpenRA.Mods.RA/Render/RenderInfantry.cs index 5d688cc663..a3948dc3e5 100644 --- a/OpenRA.Mods.RA/Render/RenderInfantry.cs +++ b/OpenRA.Mods.RA/Render/RenderInfantry.cs @@ -9,7 +9,6 @@ #endregion using OpenRA.Mods.RA.Effects; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA.Render diff --git a/OpenRA.Mods.RA/Render/RenderLandingCraft.cs b/OpenRA.Mods.RA/Render/RenderLandingCraft.cs index e0b8fd96c7..4203ed44b1 100644 --- a/OpenRA.Mods.RA/Render/RenderLandingCraft.cs +++ b/OpenRA.Mods.RA/Render/RenderLandingCraft.cs @@ -10,7 +10,6 @@ using System.Linq; using OpenRA.Traits; -using OpenRA.Mods.RA.Move; namespace OpenRA.Mods.RA.Render { diff --git a/OpenRA.Mods.RA/Render/RenderUnitReload.cs b/OpenRA.Mods.RA/Render/RenderUnitReload.cs index bbb497a109..fefa5b0fe1 100755 --- a/OpenRA.Mods.RA/Render/RenderUnitReload.cs +++ b/OpenRA.Mods.RA/Render/RenderUnitReload.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA.Render diff --git a/OpenRA.Mods.RA/Render/RenderVoxels.cs b/OpenRA.Mods.RA/Render/RenderVoxels.cs index 9333096beb..7c91cba27b 100755 --- a/OpenRA.Mods.RA/Render/RenderVoxels.cs +++ b/OpenRA.Mods.RA/Render/RenderVoxels.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithBuildingPlacedAnimation.cs b/OpenRA.Mods.RA/Render/WithBuildingPlacedAnimation.cs index 71c997ab02..7ab1fab3e7 100644 --- a/OpenRA.Mods.RA/Render/WithBuildingPlacedAnimation.cs +++ b/OpenRA.Mods.RA/Render/WithBuildingPlacedAnimation.cs @@ -8,8 +8,6 @@ */ #endregion -using OpenRA.FileFormats; -using OpenRA.Graphics; using OpenRA.Traits; namespace OpenRA.Mods.RA.Render diff --git a/OpenRA.Mods.RA/Render/WithHarvestAnimation.cs b/OpenRA.Mods.RA/Render/WithHarvestAnimation.cs index a42797a2dd..522316d626 100644 --- a/OpenRA.Mods.RA/Render/WithHarvestAnimation.cs +++ b/OpenRA.Mods.RA/Render/WithHarvestAnimation.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithIdleOverlay.cs b/OpenRA.Mods.RA/Render/WithIdleOverlay.cs index e07f3392b3..206ed8bb46 100644 --- a/OpenRA.Mods.RA/Render/WithIdleOverlay.cs +++ b/OpenRA.Mods.RA/Render/WithIdleOverlay.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; using OpenRA.Mods.RA.Buildings; diff --git a/OpenRA.Mods.RA/Render/WithMuzzleFlash.cs b/OpenRA.Mods.RA/Render/WithMuzzleFlash.cs index 61f9252c00..c79f7eda92 100644 --- a/OpenRA.Mods.RA/Render/WithMuzzleFlash.cs +++ b/OpenRA.Mods.RA/Render/WithMuzzleFlash.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithRepairAnimation.cs b/OpenRA.Mods.RA/Render/WithRepairAnimation.cs index b5946f01e9..0cd5e593d5 100644 --- a/OpenRA.Mods.RA/Render/WithRepairAnimation.cs +++ b/OpenRA.Mods.RA/Render/WithRepairAnimation.cs @@ -10,11 +10,7 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; -using OpenRA.Graphics; using OpenRA.Traits; -using OpenRA.Mods.RA.Buildings; -using OpenRA.Effects; namespace OpenRA.Mods.RA.Render { diff --git a/OpenRA.Mods.RA/Render/WithRepairOverlay.cs b/OpenRA.Mods.RA/Render/WithRepairOverlay.cs index 3ed1a8cdcc..0365ebe016 100644 --- a/OpenRA.Mods.RA/Render/WithRepairOverlay.cs +++ b/OpenRA.Mods.RA/Render/WithRepairOverlay.cs @@ -9,7 +9,6 @@ #endregion using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; using OpenRA.Mods.RA.Buildings; diff --git a/OpenRA.Mods.RA/Render/WithResources.cs b/OpenRA.Mods.RA/Render/WithResources.cs index 9c3feeff3c..018cebe62d 100755 --- a/OpenRA.Mods.RA/Render/WithResources.cs +++ b/OpenRA.Mods.RA/Render/WithResources.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithRotor.cs b/OpenRA.Mods.RA/Render/WithRotor.cs index 5b0e14c732..c03b68ca60 100755 --- a/OpenRA.Mods.RA/Render/WithRotor.cs +++ b/OpenRA.Mods.RA/Render/WithRotor.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithTurret.cs b/OpenRA.Mods.RA/Render/WithTurret.cs index b3474ef3e8..0e13b17b67 100755 --- a/OpenRA.Mods.RA/Render/WithTurret.cs +++ b/OpenRA.Mods.RA/Render/WithTurret.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithVoxelBarrel.cs b/OpenRA.Mods.RA/Render/WithVoxelBarrel.cs index 5c37823324..adbe829e89 100755 --- a/OpenRA.Mods.RA/Render/WithVoxelBarrel.cs +++ b/OpenRA.Mods.RA/Render/WithVoxelBarrel.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithVoxelTurret.cs b/OpenRA.Mods.RA/Render/WithVoxelTurret.cs index 04b8393441..8adfd5c2ac 100755 --- a/OpenRA.Mods.RA/Render/WithVoxelTurret.cs +++ b/OpenRA.Mods.RA/Render/WithVoxelTurret.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithVoxelWalkerBody.cs b/OpenRA.Mods.RA/Render/WithVoxelWalkerBody.cs index b95786ccbf..92f4af0d20 100755 --- a/OpenRA.Mods.RA/Render/WithVoxelWalkerBody.cs +++ b/OpenRA.Mods.RA/Render/WithVoxelWalkerBody.cs @@ -11,7 +11,6 @@ using System; using System.Linq; using OpenRA.Graphics; -using OpenRA.Mods.RA.Move; using OpenRA.Traits; namespace OpenRA.Mods.RA.Render diff --git a/OpenRA.Mods.RA/RenderRangeCircle.cs b/OpenRA.Mods.RA/RenderRangeCircle.cs index 3087294da9..375bf09d10 100644 --- a/OpenRA.Mods.RA/RenderRangeCircle.cs +++ b/OpenRA.Mods.RA/RenderRangeCircle.cs @@ -10,7 +10,6 @@ using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Repairable.cs b/OpenRA.Mods.RA/Repairable.cs index 7c246ff359..6dde7d55c0 100644 --- a/OpenRA.Mods.RA/Repairable.cs +++ b/OpenRA.Mods.RA/Repairable.cs @@ -13,7 +13,6 @@ using System.Drawing; using System.Linq; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Orders; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/RepairableNear.cs b/OpenRA.Mods.RA/RepairableNear.cs index 14b49382be..11e0a0ed61 100644 --- a/OpenRA.Mods.RA/RepairableNear.cs +++ b/OpenRA.Mods.RA/RepairableNear.cs @@ -13,7 +13,6 @@ using System.Drawing; using System.Linq; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Orders; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Scripting/CallLuaFunc.cs b/OpenRA.Mods.RA/Scripting/CallLuaFunc.cs index 71dffe2827..6792fbb7df 100644 --- a/OpenRA.Mods.RA/Scripting/CallLuaFunc.cs +++ b/OpenRA.Mods.RA/Scripting/CallLuaFunc.cs @@ -10,7 +10,6 @@ using System; using Eluant; -using OpenRA.Scripting; using OpenRA.Traits; namespace OpenRA.Mods.RA.Activities diff --git a/OpenRA.Mods.RA/Scripting/Global/ActorGlobal.cs b/OpenRA.Mods.RA/Scripting/Global/ActorGlobal.cs index 145acde87d..d8a454c854 100644 --- a/OpenRA.Mods.RA/Scripting/Global/ActorGlobal.cs +++ b/OpenRA.Mods.RA/Scripting/Global/ActorGlobal.cs @@ -8,16 +8,11 @@ */ #endregion -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using Eluant; -using OpenRA.FileFormats; -using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Air; +using OpenRA.Mods.RA.Buildings; using OpenRA.Primitives; -using OpenRA.Traits; namespace OpenRA.Scripting { diff --git a/OpenRA.Mods.RA/Scripting/Global/CameraGlobal.cs b/OpenRA.Mods.RA/Scripting/Global/CameraGlobal.cs index 16b243c8de..2bc2899bca 100644 --- a/OpenRA.Mods.RA/Scripting/Global/CameraGlobal.cs +++ b/OpenRA.Mods.RA/Scripting/Global/CameraGlobal.cs @@ -8,11 +8,6 @@ */ #endregion -using System; -using System.Collections.Generic; -using System.Linq; -using Eluant; -using OpenRA.Effects; using OpenRA.Scripting; namespace OpenRA.Mods.RA.Scripting diff --git a/OpenRA.Mods.RA/Scripting/Global/MapGlobal.cs b/OpenRA.Mods.RA/Scripting/Global/MapGlobal.cs index 881c2d6310..cc9981e552 100644 --- a/OpenRA.Mods.RA/Scripting/Global/MapGlobal.cs +++ b/OpenRA.Mods.RA/Scripting/Global/MapGlobal.cs @@ -8,11 +8,8 @@ */ #endregion -using System; -using System.Collections.Generic; using System.Linq; using Eluant; -using OpenRA.Effects; using OpenRA.Scripting; namespace OpenRA.Mods.RA.Scripting diff --git a/OpenRA.Mods.RA/Scripting/Global/PlayerGlobal.cs b/OpenRA.Mods.RA/Scripting/Global/PlayerGlobal.cs index f55211e0d5..f834cfc355 100644 --- a/OpenRA.Mods.RA/Scripting/Global/PlayerGlobal.cs +++ b/OpenRA.Mods.RA/Scripting/Global/PlayerGlobal.cs @@ -8,13 +8,8 @@ */ #endregion -using System; -using System.Collections; -using System.Collections.Generic; using System.Linq; using Eluant; -using OpenRA.FileFormats; -using OpenRA.Traits; namespace OpenRA.Scripting { diff --git a/OpenRA.Mods.RA/Scripting/Global/UtilsGlobal.cs b/OpenRA.Mods.RA/Scripting/Global/UtilsGlobal.cs index 5f65effcc2..1e70d6a259 100644 --- a/OpenRA.Mods.RA/Scripting/Global/UtilsGlobal.cs +++ b/OpenRA.Mods.RA/Scripting/Global/UtilsGlobal.cs @@ -8,10 +8,8 @@ */ #endregion -using System; using System.Linq; using Eluant; -using OpenRA.Effects; using OpenRA.Scripting; namespace OpenRA.Mods.RA.Scripting diff --git a/OpenRA.Mods.RA/Scripting/Properties/ChronosphereProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/ChronosphereProperties.cs index 1e5aba5391..f0257dd320 100644 --- a/OpenRA.Mods.RA/Scripting/Properties/ChronosphereProperties.cs +++ b/OpenRA.Mods.RA/Scripting/Properties/ChronosphereProperties.cs @@ -8,11 +8,7 @@ */ #endregion -using System.Linq; using Eluant; -using OpenRA; -using OpenRA.Mods.RA; -using OpenRA.Mods.RA.Activities; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Scripting/Properties/CombatProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/CombatProperties.cs index 0167305f08..46a678bb88 100644 --- a/OpenRA.Mods.RA/Scripting/Properties/CombatProperties.cs +++ b/OpenRA.Mods.RA/Scripting/Properties/CombatProperties.cs @@ -8,11 +8,7 @@ */ #endregion -using OpenRA; -using OpenRA.FileFormats; -using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Move; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Scripting/Properties/GeneralProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/GeneralProperties.cs index cdc967f480..4a4025a73c 100644 --- a/OpenRA.Mods.RA/Scripting/Properties/GeneralProperties.cs +++ b/OpenRA.Mods.RA/Scripting/Properties/GeneralProperties.cs @@ -9,11 +9,7 @@ #endregion using Eluant; -using OpenRA; -using OpenRA.FileFormats; -using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Move; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Scripting/Properties/HealthProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/HealthProperties.cs index 46f9727f58..27620af598 100644 --- a/OpenRA.Mods.RA/Scripting/Properties/HealthProperties.cs +++ b/OpenRA.Mods.RA/Scripting/Properties/HealthProperties.cs @@ -8,12 +8,6 @@ */ #endregion -using Eluant; -using OpenRA; -using OpenRA.FileFormats; -using OpenRA.Mods.RA; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Move; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Scripting/Properties/MobileProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/MobileProperties.cs index e7fd4f9414..fd990dec55 100644 --- a/OpenRA.Mods.RA/Scripting/Properties/MobileProperties.cs +++ b/OpenRA.Mods.RA/Scripting/Properties/MobileProperties.cs @@ -8,9 +8,6 @@ */ #endregion -using OpenRA; -using OpenRA.FileFormats; -using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Move; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Scripting/Properties/ProductionProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/ProductionProperties.cs index 4e078d9125..cf8431829c 100644 --- a/OpenRA.Mods.RA/Scripting/Properties/ProductionProperties.cs +++ b/OpenRA.Mods.RA/Scripting/Properties/ProductionProperties.cs @@ -8,10 +8,7 @@ */ #endregion -using System.Linq; using Eluant; -using OpenRA; -using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Scripting/Properties/ResourceProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/ResourceProperties.cs index acaa6dae55..6bca7239ac 100644 --- a/OpenRA.Mods.RA/Scripting/Properties/ResourceProperties.cs +++ b/OpenRA.Mods.RA/Scripting/Properties/ResourceProperties.cs @@ -9,7 +9,6 @@ #endregion using System; -using OpenRA; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Scripting/Properties/TransportProperties.cs b/OpenRA.Mods.RA/Scripting/Properties/TransportProperties.cs index 6e5e58e1e1..6a7799b8a4 100644 --- a/OpenRA.Mods.RA/Scripting/Properties/TransportProperties.cs +++ b/OpenRA.Mods.RA/Scripting/Properties/TransportProperties.cs @@ -9,9 +9,6 @@ #endregion using System.Linq; -using Eluant; -using OpenRA; -using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Air; using OpenRA.Scripting; diff --git a/OpenRA.Mods.RA/Sellable.cs b/OpenRA.Mods.RA/Sellable.cs index 2e0dc184ac..738e1ce10c 100644 --- a/OpenRA.Mods.RA/Sellable.cs +++ b/OpenRA.Mods.RA/Sellable.cs @@ -12,7 +12,6 @@ using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Render; using OpenRA.Traits; -using OpenRA.FileFormats; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index 9db16be894..7044c34134 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -13,7 +13,6 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Graphics; using OpenRA.Network; -using OpenRA.Primitives; using OpenRA.Server; using S = OpenRA.Server.Server; diff --git a/OpenRA.Mods.RA/ShroudPalette.cs b/OpenRA.Mods.RA/ShroudPalette.cs index 9f1c8daf6f..3e1ec4e83f 100644 --- a/OpenRA.Mods.RA/ShroudPalette.cs +++ b/OpenRA.Mods.RA/ShroudPalette.cs @@ -9,7 +9,6 @@ #endregion using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/ShroudRenderer.cs b/OpenRA.Mods.RA/ShroudRenderer.cs index 41a75ef5fe..d7ac87c25f 100644 --- a/OpenRA.Mods.RA/ShroudRenderer.cs +++ b/OpenRA.Mods.RA/ShroudRenderer.cs @@ -8,8 +8,6 @@ */ #endregion -using System; -using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.Graphics; diff --git a/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs b/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs index 0cf4587222..696e4dc16b 100644 --- a/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs +++ b/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Mods.RA.Effects; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/StoresOre.cs b/OpenRA.Mods.RA/StoresOre.cs index ddbd45c059..d14ed31eb7 100644 --- a/OpenRA.Mods.RA/StoresOre.cs +++ b/OpenRA.Mods.RA/StoresOre.cs @@ -9,7 +9,6 @@ #endregion using System.Collections.Generic; -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/SupplyTruck.cs b/OpenRA.Mods.RA/SupplyTruck.cs index fec31710e7..e8944bd6ea 100644 --- a/OpenRA.Mods.RA/SupplyTruck.cs +++ b/OpenRA.Mods.RA/SupplyTruck.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Orders; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs b/OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs index ab91928434..f519513884 100644 --- a/OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs b/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs index e125242c7f..a5e93fde86 100644 --- a/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Mods.RA.Render; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPower.cs b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs index 27862436a1..86231f77c4 100755 --- a/OpenRA.Mods.RA/SupportPowers/SupportPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.Mods.RA.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs index ad3fe1c4aa..7d35647115 100644 --- a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs @@ -11,9 +11,7 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Mods.RA.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/ThrowsParticle.cs b/OpenRA.Mods.RA/ThrowsParticle.cs index dd0d065dc8..8b8f628d2c 100644 --- a/OpenRA.Mods.RA/ThrowsParticle.cs +++ b/OpenRA.Mods.RA/ThrowsParticle.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Tooltip.cs b/OpenRA.Mods.RA/Tooltip.cs index b7cd7d35b2..fc255c4dbb 100644 --- a/OpenRA.Mods.RA/Tooltip.cs +++ b/OpenRA.Mods.RA/Tooltip.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Turreted.cs b/OpenRA.Mods.RA/Turreted.cs index cb6b5b069e..38ab7c4d92 100755 --- a/OpenRA.Mods.RA/Turreted.cs +++ b/OpenRA.Mods.RA/Turreted.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Valued.cs b/OpenRA.Mods.RA/Valued.cs index 50fab488d9..44b5bffef5 100755 --- a/OpenRA.Mods.RA/Valued.cs +++ b/OpenRA.Mods.RA/Valued.cs @@ -8,7 +8,6 @@ */ #endregion -using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Widgets/ColorMixerWidget.cs b/OpenRA.Mods.RA/Widgets/ColorMixerWidget.cs index 5b10bc1aca..a3807a6ac1 100755 --- a/OpenRA.Mods.RA/Widgets/ColorMixerWidget.cs +++ b/OpenRA.Mods.RA/Widgets/ColorMixerWidget.cs @@ -11,7 +11,6 @@ using System; using System.Drawing; using System.Threading; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs b/OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs index cdcdfd3f74..76ee3a0f7a 100755 --- a/OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs +++ b/OpenRA.Mods.RA/Widgets/ColorPreviewManagerWidget.cs @@ -9,7 +9,6 @@ #endregion -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/ConfirmationDialogs.cs b/OpenRA.Mods.RA/Widgets/ConfirmationDialogs.cs index 4545697936..c7f693e4b6 100644 --- a/OpenRA.Mods.RA/Widgets/ConfirmationDialogs.cs +++ b/OpenRA.Mods.RA/Widgets/ConfirmationDialogs.cs @@ -9,7 +9,6 @@ #endregion using System; -using System.Drawing; using OpenRA.Widgets; namespace OpenRA.Mods.RA.Widgets diff --git a/OpenRA.Mods.RA/Widgets/HueSliderWidget.cs b/OpenRA.Mods.RA/Widgets/HueSliderWidget.cs index 657145f1ea..9ab486855c 100755 --- a/OpenRA.Mods.RA/Widgets/HueSliderWidget.cs +++ b/OpenRA.Mods.RA/Widgets/HueSliderWidget.cs @@ -10,7 +10,6 @@ using System.Drawing; using System.Drawing.Imaging; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs index 9c59c20421..145a007f45 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs @@ -15,7 +15,6 @@ using System.IO; using System.Linq; using OpenRA.FileSystem; using OpenRA.Graphics; -using OpenRA.Traits; using OpenRA.Widgets; namespace OpenRA.Mods.RA.Widgets.Logic diff --git a/OpenRA.Mods.RA/Widgets/Logic/ColorPickerLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ColorPickerLogic.cs index 56aa541566..7aae7fa02f 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ColorPickerLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ColorPickerLogic.cs @@ -9,7 +9,6 @@ #endregion using System; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs index 709734a151..5cd29af5ea 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs @@ -14,7 +14,6 @@ using System.ComponentModel; using System.IO; using System.Linq; using System.Net; -using OpenRA.FileFormats; using OpenRA.Support; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/Logic/GameTimerLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/GameTimerLogic.cs index ecc68f18fd..8233b9eda7 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/GameTimerLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/GameTimerLogic.cs @@ -8,7 +8,6 @@ */ #endregion -using System; using OpenRA.Network; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs index 70b855acff..9cdef7181c 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs @@ -13,8 +13,6 @@ using System.Drawing; using System.Linq; using OpenRA.Network; using OpenRA.Widgets; -using OpenRA.Traits; -using OpenRA.Graphics; namespace OpenRA.Mods.RA.Widgets.Logic { diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyMapPreviewLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyMapPreviewLogic.cs index 46e27c493c..2a27bb8ac9 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyMapPreviewLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyMapPreviewLogic.cs @@ -8,12 +8,7 @@ */ #endregion -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; using OpenRA.Network; -using OpenRA.Traits; using OpenRA.Widgets; namespace OpenRA.Mods.RA.Widgets.Logic diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs index afcf067684..59700a08af 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; -using MaxMind.GeoIP2; using OpenRA.Graphics; using OpenRA.Network; using OpenRA.Primitives; diff --git a/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs index 7c996f9df7..577cd7a20f 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs @@ -12,7 +12,6 @@ using System; using System.IO; using System.Linq; using System.Net; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Network; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs index c0395ff430..0d09193a9d 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ModBrowserLogic.cs @@ -13,7 +13,6 @@ using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/Logic/RAInstallFromCDLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/RAInstallFromCDLogic.cs index 71e27488c0..b0aa1846b8 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/RAInstallFromCDLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/RAInstallFromCDLogic.cs @@ -12,7 +12,6 @@ using System; using System.IO; using System.Linq; using System.Threading; -using OpenRA.FileFormats; using OpenRA.Widgets; namespace OpenRA.Mods.RA.Widgets.Logic diff --git a/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs index 6df12589ee..0723d236e5 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs @@ -10,11 +10,9 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using OpenRA.FileFormats; -using OpenRA.Network; using OpenRA.Primitives; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/Logic/ReplayControlBarLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ReplayControlBarLogic.cs index a2530d9302..f8b08ff32c 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ReplayControlBarLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ReplayControlBarLogic.cs @@ -8,8 +8,6 @@ */ #endregion -using System; -using System.Linq; using OpenRA.Widgets; namespace OpenRA.Mods.RA.Widgets.Logic diff --git a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs index 30acad4861..655ed60f61 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs @@ -14,7 +14,6 @@ using System.Linq; using System.Drawing; using System.Net; using System.Text; -using OpenRA.FileFormats; using OpenRA.Network; using OpenRA.Server; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/Logic/ServerCreationLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ServerCreationLogic.cs index 6d07aa304f..861eae6cbb 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ServerCreationLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ServerCreationLogic.cs @@ -10,7 +10,6 @@ using System; using System.Net; -using OpenRA.GameRules; using OpenRA.Widgets; namespace OpenRA.Mods.RA.Widgets.Logic diff --git a/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs index 61166c733d..0510e992eb 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/SettingsLogic.cs @@ -12,7 +12,6 @@ using System; using System.Collections.Generic; using System.Linq; -using OpenRA.GameRules; using OpenRA.Graphics; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs b/OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs index 2c9704c7a7..940f6731e0 100644 --- a/OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs +++ b/OpenRA.Mods.RA/Widgets/ResourceBarWidget.cs @@ -10,7 +10,6 @@ using System; using System.Drawing; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs b/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs index 8ee5149707..0eff36f21c 100644 --- a/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs +++ b/OpenRA.Mods.RA/Widgets/SupportPowerTimerWidget.cs @@ -11,7 +11,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using OpenRA.Traits; using OpenRA.Primitives; using OpenRA.Widgets; diff --git a/OpenRA.Mods.RA/World/BuildableTerrainLayer.cs b/OpenRA.Mods.RA/World/BuildableTerrainLayer.cs index a452102d8e..4a07267f9f 100644 --- a/OpenRA.Mods.RA/World/BuildableTerrainLayer.cs +++ b/OpenRA.Mods.RA/World/BuildableTerrainLayer.cs @@ -8,12 +8,8 @@ */ #endregion -using System; using System.Collections.Generic; -using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Mods.RA.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/World/DomainIndex.cs b/OpenRA.Mods.RA/World/DomainIndex.cs index 569d49620c..b46fcda0c1 100644 --- a/OpenRA.Mods.RA/World/DomainIndex.cs +++ b/OpenRA.Mods.RA/World/DomainIndex.cs @@ -14,7 +14,6 @@ using System.Drawing; using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.RA.Move; -using OpenRA.Support; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/World/SmudgeLayer.cs b/OpenRA.Mods.RA/World/SmudgeLayer.cs index 9a4e32845b..a632b44379 100644 --- a/OpenRA.Mods.RA/World/SmudgeLayer.cs +++ b/OpenRA.Mods.RA/World/SmudgeLayer.cs @@ -8,10 +8,8 @@ */ #endregion -using System; using System.Collections.Generic; using System.Linq; -using OpenRA.FileFormats; using OpenRA.Graphics; using OpenRA.Mods.RA.Effects; using OpenRA.Traits; diff --git a/OpenRA.Mods.TS/Widgets/Logic/TSInstallFromCDLogic.cs b/OpenRA.Mods.TS/Widgets/Logic/TSInstallFromCDLogic.cs index 4bff21fb75..5203eb8c9f 100755 --- a/OpenRA.Mods.TS/Widgets/Logic/TSInstallFromCDLogic.cs +++ b/OpenRA.Mods.TS/Widgets/Logic/TSInstallFromCDLogic.cs @@ -11,8 +11,7 @@ using System; using System.IO; using System.Linq; -using System.Threading; -using OpenRA.FileFormats; +using System.Threading; using OpenRA.Widgets; namespace OpenRA.Mods.TS.Widgets.Logic diff --git a/OpenRA.Renderer.Sdl2/FrameBuffer.cs b/OpenRA.Renderer.Sdl2/FrameBuffer.cs index 3bba809464..a640229fdf 100644 --- a/OpenRA.Renderer.Sdl2/FrameBuffer.cs +++ b/OpenRA.Renderer.Sdl2/FrameBuffer.cs @@ -12,7 +12,6 @@ using System; using System.Diagnostics; using System.Drawing; using System.IO; -using OpenRA.Graphics; using OpenTK.Graphics.OpenGL; namespace OpenRA.Renderer.Sdl2 diff --git a/OpenRA.Renderer.Sdl2/MultiTapDetection.cs b/OpenRA.Renderer.Sdl2/MultiTapDetection.cs index 20c072b241..50819b2ffa 100644 --- a/OpenRA.Renderer.Sdl2/MultiTapDetection.cs +++ b/OpenRA.Renderer.Sdl2/MultiTapDetection.cs @@ -9,7 +9,6 @@ #endregion using System; -using OpenRA; using OpenRA.Primitives; namespace OpenRA.Renderer.Sdl2 diff --git a/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs b/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs index 7ff7362bdd..69f6b6b6a2 100755 --- a/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs +++ b/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs @@ -10,7 +10,6 @@ using System; using System.Drawing; -using System.Linq; using OpenRA; using OpenRA.Graphics; using SDL2; diff --git a/OpenRA.Renderer.Sdl2/Shader.cs b/OpenRA.Renderer.Sdl2/Shader.cs index af0f2e55f9..69ae143694 100644 --- a/OpenRA.Renderer.Sdl2/Shader.cs +++ b/OpenRA.Renderer.Sdl2/Shader.cs @@ -13,8 +13,6 @@ using System.Collections.Generic; using System.IO; using System.Text; using OpenRA.FileSystem; -using OpenRA.Graphics; -using OpenTK; using OpenTK.Graphics.OpenGL; namespace OpenRA.Renderer.Sdl2 diff --git a/OpenRA.Renderer.Sdl2/Texture.cs b/OpenRA.Renderer.Sdl2/Texture.cs index 943576cfdf..40337a56fc 100644 --- a/OpenRA.Renderer.Sdl2/Texture.cs +++ b/OpenRA.Renderer.Sdl2/Texture.cs @@ -12,7 +12,6 @@ using System; using System.Drawing; using System.Drawing.Imaging; using System.IO; -using OpenRA.Graphics; using OpenTK.Graphics.OpenGL; namespace OpenRA.Renderer.Sdl2 diff --git a/OpenRA.Renderer.Sdl2/VertexBuffer.cs b/OpenRA.Renderer.Sdl2/VertexBuffer.cs index 841666b8b8..882aeabb4d 100644 --- a/OpenRA.Renderer.Sdl2/VertexBuffer.cs +++ b/OpenRA.Renderer.Sdl2/VertexBuffer.cs @@ -10,7 +10,6 @@ using System; using System.Runtime.InteropServices; -using OpenRA.Graphics; using OpenTK.Graphics.OpenGL; namespace OpenRA.Renderer.Sdl2 diff --git a/OpenRA.Utility/Command.cs b/OpenRA.Utility/Command.cs index 76631b3242..479b6f28c5 100644 --- a/OpenRA.Utility/Command.cs +++ b/OpenRA.Utility/Command.cs @@ -17,13 +17,9 @@ using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Text; -using Eluant; -using Eluant.ObjectBinding; using OpenRA.FileFormats; using OpenRA.FileSystem; -using OpenRA.GameRules; using OpenRA.Graphics; -using OpenRA.Primitives; using OpenRA.Scripting; using OpenRA.Traits; diff --git a/OpenRA.Utility/Glob.cs b/OpenRA.Utility/Glob.cs index 9fd112d269..82c67a3fcc 100644 --- a/OpenRA.Utility/Glob.cs +++ b/OpenRA.Utility/Glob.cs @@ -8,7 +8,6 @@ */ #endregion -using System; using System.Collections.Generic; using System.Linq; using System.IO; diff --git a/OpenRA.Utility/UpgradeRules.cs b/OpenRA.Utility/UpgradeRules.cs index bf16b91704..1e20f3b236 100644 --- a/OpenRA.Utility/UpgradeRules.cs +++ b/OpenRA.Utility/UpgradeRules.cs @@ -10,17 +10,8 @@ using System; using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Imaging; using System.IO; using System.Linq; -using System.Reflection; -using System.Runtime.InteropServices; -using OpenRA.FileFormats; -using OpenRA.GameRules; -using OpenRA.Graphics; -using OpenRA.Primitives; -using OpenRA.Traits; namespace OpenRA.Utility { From 90894aa03e94b261450d5ad7214005c08605b7d5 Mon Sep 17 00:00:00 2001 From: ScottNZ Date: Sun, 15 Jun 2014 22:17:34 +1200 Subject: [PATCH 8/8] Use var everywhere --- OpenRA.Editor/Form1.cs | 14 ++--- OpenRA.Editor/MapSelect.cs | 2 +- OpenRA.Editor/RenderUtils.cs | 4 +- OpenRA.Editor/Surface.cs | 32 +++++----- OpenRA.Game/Exts.cs | 12 ++-- OpenRA.Game/FieldLoader.cs | 2 +- OpenRA.Game/FileFormats/AudLoader.cs | 2 +- OpenRA.Game/FileFormats/Blast.cs | 14 ++--- OpenRA.Game/FileFormats/Blowfish.cs | 24 ++++---- .../FileFormats/BlowfishKeyProvider.cs | 60 +++++++++---------- OpenRA.Game/FileFormats/CRC32.cs | 8 +-- OpenRA.Game/FileFormats/Format40.cs | 20 +++---- OpenRA.Game/FileFormats/IniFile.cs | 8 +-- OpenRA.Game/FileFormats/PngLoader.cs | 2 +- OpenRA.Game/FileFormats/ReplayMetadata.cs | 4 +- OpenRA.Game/FileFormats/TmpRAReader.cs | 2 +- OpenRA.Game/FileFormats/TmpTDReader.cs | 2 +- OpenRA.Game/FileFormats/VqaReader.cs | 16 ++--- OpenRA.Game/FileFormats/VxlReader.cs | 4 +- .../FileSystem/InstallShieldPackage.cs | 6 +- OpenRA.Game/FileSystem/PackageEntry.cs | 14 ++--- OpenRA.Game/GameRules/ActorInfo.cs | 2 +- OpenRA.Game/Graphics/HSLColor.cs | 4 +- OpenRA.Game/Graphics/Minimap.cs | 14 ++--- OpenRA.Game/Graphics/Palette.cs | 16 ++--- OpenRA.Game/Graphics/Renderer.cs | 2 +- OpenRA.Game/Graphics/SpriteFont.cs | 2 +- OpenRA.Game/Graphics/TerrainRenderer.cs | 2 +- OpenRA.Game/Graphics/Util.cs | 2 +- OpenRA.Game/Graphics/VoxelLoader.cs | 2 +- OpenRA.Game/InstallUtils.cs | 4 +- OpenRA.Game/Map/Map.cs | 6 +- OpenRA.Game/Map/TileSet.cs | 2 +- OpenRA.Game/MiniYaml.cs | 2 +- OpenRA.Game/Network/OrderManager.cs | 2 +- OpenRA.Game/ObjectCreator.cs | 2 +- OpenRA.Game/Primitives/PriorityQueue.cs | 14 ++--- OpenRA.Game/Primitives/float2.cs | 2 +- OpenRA.Game/Scripting/ScriptMemberWrapper.cs | 2 +- OpenRA.Game/Server/Server.cs | 2 +- OpenRA.Game/Sound.cs | 6 +- OpenRA.Game/Support/Arguments.cs | 2 +- OpenRA.Game/Support/PerfHistory.cs | 8 +-- OpenRA.Game/Sync.cs | 2 +- OpenRA.Game/TraitDictionary.cs | 10 ++-- OpenRA.Game/WRange.cs | 4 +- OpenRA.Game/Widgets/LabelWidget.cs | 4 +- OpenRA.Game/Widgets/PerfGraphWidget.cs | 8 +-- OpenRA.Game/Widgets/ProgressBarWidget.cs | 2 +- OpenRA.Game/Widgets/SliderWidget.cs | 2 +- OpenRA.Game/Widgets/TextFieldWidget.cs | 6 +- OpenRA.Game/Widgets/VqaPlayerWidget.cs | 2 +- OpenRA.Game/Widgets/Widget.cs | 2 +- .../WorldInteractionControllerWidget.cs | 2 +- OpenRA.Game/World.cs | 4 +- .../Widgets/Logic/CncIngameMenuLogic.cs | 4 +- .../Widgets/ProductionTabsWidget.cs | 8 +-- OpenRA.Mods.Cnc/WithCargo.cs | 2 +- OpenRA.Mods.RA/AI/AttackOrFleeFuzzy.cs | 2 +- OpenRA.Mods.RA/AI/HackyAI.cs | 6 +- OpenRA.Mods.RA/AI/States/GroundStates.cs | 2 +- OpenRA.Mods.RA/Activities/FindResources.cs | 8 +-- OpenRA.Mods.RA/Activities/Teleport.cs | 2 +- OpenRA.Mods.RA/Air/Helicopter.cs | 2 +- OpenRA.Mods.RA/BridgeLayer.cs | 4 +- OpenRA.Mods.RA/Buildings/FootprintUtils.cs | 6 +- OpenRA.Mods.RA/Buildings/Util.cs | 6 +- OpenRA.Mods.RA/Cargo.cs | 2 +- OpenRA.Mods.RA/Harvester.cs | 6 +- OpenRA.Mods.RA/Move/Mobile.cs | 10 ++-- OpenRA.Mods.RA/Move/Move.cs | 4 +- OpenRA.Mods.RA/Move/PathFinder.cs | 4 +- OpenRA.Mods.RA/Move/PathSearch.cs | 24 ++++---- OpenRA.Mods.RA/Player/PlaceBuilding.cs | 2 +- OpenRA.Mods.RA/Player/ProductionQueue.cs | 2 +- OpenRA.Mods.RA/PortableChrono.cs | 2 +- .../Scripting/Global/TriggerGlobal.cs | 2 +- OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs | 2 +- .../SupportPowers/AirstrikePower.cs | 2 +- OpenRA.Mods.RA/SupportPowers/GpsPower.cs | 2 +- .../SupportPowers/IronCurtainPower.cs | 2 +- OpenRA.Mods.RA/VoxelNormalsPalette.cs | 2 +- OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs | 8 +-- OpenRA.Mods.RA/Widgets/HueSliderWidget.cs | 2 +- .../Widgets/Logic/IngameChatLogic.cs | 2 +- .../Widgets/Logic/IngameChromeLogic.cs | 6 +- OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs | 2 +- OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs | 2 +- .../Widgets/Logic/ServerBrowserLogic.cs | 2 +- .../Widgets/StrategicProgressWidget.cs | 2 +- OpenRA.Mods.RA/World/DomainIndex.cs | 2 +- OpenRA.Renderer.Sdl2/ErrorHandler.cs | 4 +- OpenRA.Renderer.Sdl2/Shader.cs | 2 +- OpenRA.Renderer.Sdl2/Texture.cs | 12 ++-- OpenRA.TilesetBuilder/FormBuilder.cs | 18 +++--- OpenRA.TilesetBuilder/Surface.cs | 2 +- OpenRA.Utility/Command.cs | 4 +- OpenRA.Utility/LegacyMapImporter.cs | 32 +++++----- OpenRA.Utility/UpgradeRules.cs | 2 +- 99 files changed, 312 insertions(+), 312 deletions(-) diff --git a/OpenRA.Editor/Form1.cs b/OpenRA.Editor/Form1.cs index f7dbd2ca27..51d7c68441 100644 --- a/OpenRA.Editor/Form1.cs +++ b/OpenRA.Editor/Form1.cs @@ -637,9 +637,9 @@ namespace OpenRA.Editor public int CalculateTotalResource() { - int totalResource = 0; - for (int i = 0; i < surface1.Map.MapSize.X; i++) - for (int j = 0; j < surface1.Map.MapSize.Y; j++) + var totalResource = 0; + for (var i = 0; i < surface1.Map.MapSize.X; i++) + for (var j = 0; j < surface1.Map.MapSize.Y; j++) { if (surface1.Map.MapResources.Value[i, j].Type != 0) totalResource += GetResourceValue(i, j); @@ -650,7 +650,7 @@ namespace OpenRA.Editor int GetAdjecentCellsWith(int resourceType, int x, int y) { - int sum = 0; + var sum = 0; for (var u = -1; u < 2; u++) for (var v = -1; v < 2; v++) { @@ -665,15 +665,15 @@ namespace OpenRA.Editor int GetResourceValue(int x, int y) { - int imageLength = 0; + var imageLength = 0; int type = surface1.Map.MapResources.Value[x, y].Type; var template = surface1.ResourceTemplates.FirstOrDefault(a => a.Value.Info.ResourceType == type).Value; if (type == 1) imageLength = 12; else if (type == 2) imageLength = 3; - int density = (GetAdjecentCellsWith(type, x, y) * imageLength - 1) / 9; - int value = template.Info.ValuePerUnit; + var density = (GetAdjecentCellsWith(type, x, y) * imageLength - 1) / 9; + var value = template.Info.ValuePerUnit; return density * value; } diff --git a/OpenRA.Editor/MapSelect.cs b/OpenRA.Editor/MapSelect.cs index 7be7a15d0c..7f0c4d95f2 100644 --- a/OpenRA.Editor/MapSelect.cs +++ b/OpenRA.Editor/MapSelect.cs @@ -47,7 +47,7 @@ namespace OpenRA.Editor foreach (var map in MapCache.FindMapsIn(MapFolderPath)) { - ListViewItem map1 = new ListViewItem(); + var map1 = new ListViewItem(); map1.Tag = map; map1.Text = Path.GetFileNameWithoutExtension(map); map1.ImageIndex = 0; diff --git a/OpenRA.Editor/RenderUtils.cs b/OpenRA.Editor/RenderUtils.cs index 8e4aa45bab..ca7c0ca71c 100644 --- a/OpenRA.Editor/RenderUtils.cs +++ b/OpenRA.Editor/RenderUtils.cs @@ -33,7 +33,7 @@ namespace OpenRA.Editor unsafe { - byte* q = (byte*)data.Scan0.ToPointer(); + var q = (byte*)data.Scan0.ToPointer(); var stride2 = data.Stride; for (var i = 0; i < frame.Size.Width; i++) @@ -92,7 +92,7 @@ namespace OpenRA.Editor unsafe { - byte* q = (byte*)data.Scan0.ToPointer(); + var q = (byte*)data.Scan0.ToPointer(); var stride = data.Stride; for (var i = 0; i < frame.Size.Width; i++) diff --git a/OpenRA.Editor/Surface.cs b/OpenRA.Editor/Surface.cs index 145f9a9f9d..4d4fb25892 100644 --- a/OpenRA.Editor/Surface.cs +++ b/OpenRA.Editor/Surface.cs @@ -265,7 +265,7 @@ namespace OpenRA.Editor unsafe { - int* p = (int*)data.Scan0.ToPointer(); + var p = (int*)data.Scan0.ToPointer(); var stride = data.Stride >> 2; for (var i = 0; i < ChunkSize; i++) @@ -285,7 +285,7 @@ namespace OpenRA.Editor var srcdata = resourceImage.LockBits(resourceImage.Bounds(), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); - int* q = (int*)srcdata.Scan0.ToPointer(); + var q = (int*)srcdata.Scan0.ToPointer(); var srcstride = srcdata.Stride >> 2; for (var x = 0; x < TileSetRenderer.TileSize; x++) @@ -344,10 +344,10 @@ namespace OpenRA.Editor float2 GetDrawPosition(CPos location, Bitmap bmp, bool centered) { float offsetX = centered ? bmp.Width / 2 - TileSetRenderer.TileSize / 2 : 0; - float drawX = TileSetRenderer.TileSize * location.X * Zoom + Offset.X - offsetX; + var drawX = TileSetRenderer.TileSize * location.X * Zoom + Offset.X - offsetX; float offsetY = centered ? bmp.Height / 2 - TileSetRenderer.TileSize / 2 : 0; - float drawY = TileSetRenderer.TileSize * location.Y * Zoom + Offset.Y - offsetY; + var drawY = TileSetRenderer.TileSize * location.Y * Zoom + Offset.Y - offsetY; return new float2(drawX, drawY); } @@ -417,8 +417,8 @@ namespace OpenRA.Editor var drawX = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.X * Zoom + Offset.X; var drawY = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y; - RectangleF sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height); - RectangleF destRect = new RectangleF(drawX, drawY, bmp.Width * Zoom, bmp.Height * Zoom); + var sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height); + var destRect = new RectangleF(drawX, drawY, bmp.Width * Zoom, bmp.Height * Zoom); e.Graphics.DrawImage(bmp, destRect, sourceRect, GraphicsUnit.Pixel); } @@ -467,20 +467,20 @@ namespace OpenRA.Editor if (ShowRuler && Zoom > 0.2) { - for (int i = Map.Bounds.Left; i <= Map.Bounds.Right; i += 8) + for (var i = Map.Bounds.Left; i <= Map.Bounds.Right; i += 8) { if (i % 8 == 0) { - PointF point = new PointF(i * TileSetRenderer.TileSize * Zoom + Offset.X, (Map.Bounds.Top - 8) * TileSetRenderer.TileSize * Zoom + Offset.Y); + var point = new PointF(i * TileSetRenderer.TileSize * Zoom + Offset.X, (Map.Bounds.Top - 8) * TileSetRenderer.TileSize * Zoom + Offset.Y); e.Graphics.DrawString((i - Map.Bounds.Left).ToString(), MarkerFont, TextBrush, point); } } - for (int i = Map.Bounds.Top; i <= Map.Bounds.Bottom; i += 8) + for (var i = Map.Bounds.Top; i <= Map.Bounds.Bottom; i += 8) { if (i % 8 == 0) { - PointF point = new PointF((Map.Bounds.Left - 8) * TileSetRenderer.TileSize * Zoom + Offset.X, i * TileSetRenderer.TileSize * Zoom + Offset.Y); + var point = new PointF((Map.Bounds.Left - 8) * TileSetRenderer.TileSize * Zoom + Offset.X, i * TileSetRenderer.TileSize * Zoom + Offset.Y); e.Graphics.DrawString((i - Map.Bounds.Left).ToString(), MarkerFont, TextBrush, point); } } @@ -505,15 +505,15 @@ namespace OpenRA.Editor if (start == end) return; - int width = Math.Abs((start - end).X); - int height = Math.Abs((start - end).Y); + var width = Math.Abs((start - end).X); + var height = Math.Abs((start - end).Y); TileSelection = new TileReference[width, height]; ResourceSelection = new TileReference[width, height]; - for (int x = 0; x < width; x++) + for (var x = 0; x < width; x++) { - for (int y = 0; y < height; y++) + for (var y = 0; y < height; y++) { // TODO: crash prevention TileSelection[x, y] = Map.MapTiles.Value[start.X + x, start.Y + y]; @@ -528,9 +528,9 @@ namespace OpenRA.Editor var width = Math.Abs((SelectionStart - SelectionEnd).X); var height = Math.Abs((SelectionStart - SelectionEnd).Y); - for (int x = 0; x < width; x++) + for (var x = 0; x < width; x++) { - for (int y = 0; y < height; y++) + for (var y = 0; y < height; y++) { var mapX = loc.X + x; var mapY = loc.Y + y; diff --git a/OpenRA.Game/Exts.cs b/OpenRA.Game/Exts.cs index 811fe192f2..242b75d7f0 100644 --- a/OpenRA.Game/Exts.cs +++ b/OpenRA.Game/Exts.cs @@ -172,8 +172,8 @@ namespace OpenRA u = selector(t); while (e.MoveNext()) { - T nextT = e.Current; - U nextU = selector(nextT); + var nextT = e.Current; + var nextU = selector(nextT); if (comparer.Compare(nextU, u) * modifier < 0) { t = nextT; @@ -228,8 +228,8 @@ namespace OpenRA var d = new Dictionary(); foreach (var item in source) { - TKey key = keySelector(item); - TElement element = elementSelector(item); + var key = keySelector(item); + var element = elementSelector(item); // Check for a key conflict: if (d.ContainsKey(key)) @@ -274,8 +274,8 @@ namespace OpenRA public static T[] MakeArray(int count, Func f) { - T[] result = new T[count]; - for (int i = 0; i < count; i++) + var result = new T[count]; + for (var i = 0; i < count; i++) result[i] = f(i); return result; diff --git a/OpenRA.Game/FieldLoader.cs b/OpenRA.Game/FieldLoader.cs index 424bfb4e51..ca3615d7c8 100644 --- a/OpenRA.Game/FieldLoader.cs +++ b/OpenRA.Game/FieldLoader.cs @@ -297,7 +297,7 @@ namespace OpenRA var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); var ret = Array.CreateInstance(fieldType.GetElementType(), parts.Length); - for (int i = 0; i < parts.Length; i++) + for (var i = 0; i < parts.Length; i++) ret.SetValue(GetValue(fieldName, fieldType.GetElementType(), parts[i].Trim(), field), i); return ret; } diff --git a/OpenRA.Game/FileFormats/AudLoader.cs b/OpenRA.Game/FileFormats/AudLoader.cs index 61026ea0d8..7376960647 100644 --- a/OpenRA.Game/FileFormats/AudLoader.cs +++ b/OpenRA.Game/FileFormats/AudLoader.cs @@ -131,7 +131,7 @@ namespace OpenRA.FileFormats while (dataSize > 0) { var chunk = Chunk.Read(s); - for (int n = 0; n < chunk.CompressedSize; n++) + for (var n = 0; n < chunk.CompressedSize; n++) { var b = s.ReadUInt8(); diff --git a/OpenRA.Game/FileFormats/Blast.cs b/OpenRA.Game/FileFormats/Blast.cs index c85d7cee3a..d41be6a057 100644 --- a/OpenRA.Game/FileFormats/Blast.cs +++ b/OpenRA.Game/FileFormats/Blast.cs @@ -92,7 +92,7 @@ namespace OpenRA.FileFormats // Magic number for "done" if (len == 519) { - for (int i = 0; i < next; i++) + for (var i = 0; i < next; i++) ms.WriteByte(outBuffer[i]); break; } @@ -135,7 +135,7 @@ namespace OpenRA.FileFormats // Flush window to outstream if (next == MAXWIN) { - for (int i = 0; i < next; i++) + for (var i = 0; i < next; i++) ms.WriteByte(outBuffer[i]); next = 0; first = false; @@ -149,7 +149,7 @@ namespace OpenRA.FileFormats outBuffer[next++] = (byte)symbol; if (next == MAXWIN) { - for (int i = 0; i < next; i++) + for (var i = 0; i < next; i++) ms.WriteByte(outBuffer[i]); next = 0; first = false; @@ -236,7 +236,7 @@ namespace OpenRA.FileFormats var s = 0; // current symbol // convert compact repeat counts into symbol bit length list - foreach (byte code in rep) + foreach (var code in rep) { var num = (code >> 4) + 1; // Number of codes (top four bits plus 1) var len = (byte)(code & 15); // Code length (low four bits) @@ -250,7 +250,7 @@ namespace OpenRA.FileFormats // count number of codes of each length Count = new short[Blast.MAXBITS + 1]; - for (int i = 0; i < n; i++) + for (var i = 0; i < n; i++) Count[length[i]]++; // no codes! @@ -259,7 +259,7 @@ namespace OpenRA.FileFormats // check for an over-subscribed or incomplete set of lengths var left = 1; // one possible code of zero length - for (int len = 1; len <= Blast.MAXBITS; len++) + for (var len = 1; len <= Blast.MAXBITS; len++) { left <<= 1; // one more bit, double codes left left -= Count[len]; // deduct count from possible codes @@ -269,7 +269,7 @@ namespace OpenRA.FileFormats // generate offsets into symbol table for each length for sorting var offs = new short[Blast.MAXBITS + 1]; - for (int len = 1; len < Blast.MAXBITS; len++) + for (var len = 1; len < Blast.MAXBITS; len++) offs[len + 1] = (short)(offs[len] + Count[len]); // put symbols in table sorted by length, by symbol order within each length diff --git a/OpenRA.Game/FileFormats/Blowfish.cs b/OpenRA.Game/FileFormats/Blowfish.cs index d139eab43e..e8dd554016 100644 --- a/OpenRA.Game/FileFormats/Blowfish.cs +++ b/OpenRA.Game/FileFormats/Blowfish.cs @@ -26,15 +26,15 @@ namespace OpenRA.FileFormats uint l = 0, r = 0; - for (int i = 0; i < 18; ) + for (var i = 0; i < 18; ) { Encrypt(ref l, ref r); m_p[i++] = l; m_p[i++] = r; } - for (int i = 0; i < 4; ++i) - for (int j = 0; j < 256; ) + for (var i = 0; i < 4; ++i) + for (var j = 0; j < 256; ) { Encrypt(ref l, ref r); m_s[i, j++] = l; @@ -49,14 +49,14 @@ namespace OpenRA.FileFormats static uint[] RunCipher(uint[] data, CipherFunc f) { - uint[] result = new uint[data.Length]; + var result = new uint[data.Length]; - int size = data.Length / 2; - int i = 0; + var size = data.Length / 2; + var i = 0; while (size-- > 0) { - uint a = SwapBytes(data[i]); - uint b = SwapBytes(data[i+1]); + var a = SwapBytes(data[i]); + var b = SwapBytes(data[i+1]); f(ref a, ref b); @@ -72,8 +72,8 @@ namespace OpenRA.FileFormats uint _a = a, _b = b; _a ^= m_p[0]; - bool x = false; - for( int i = 1; i <= 16; i++, x ^= true) + var x = false; + for( var i = 1; i <= 16; i++, x ^= true) { if (x) Round(ref _a, _b, i); @@ -91,8 +91,8 @@ namespace OpenRA.FileFormats uint _a = a, _b = b; _a ^= m_p[17]; - bool x = false; - for (int i = 16; i >= 1; i--, x ^= true) + var x = false; + for (var i = 16; i >= 1; i--, x ^= true) { if (x) Round(ref _a, _b, i); diff --git a/OpenRA.Game/FileFormats/BlowfishKeyProvider.cs b/OpenRA.Game/FileFormats/BlowfishKeyProvider.cs index 03cd454dcd..ba07daefbb 100644 --- a/OpenRA.Game/FileFormats/BlowfishKeyProvider.cs +++ b/OpenRA.Game/FileFormats/BlowfishKeyProvider.cs @@ -37,7 +37,7 @@ namespace OpenRA.FileFormats static void init_bignum(uint[] n, uint val, uint len) { - for (int i = 0; i < len; i++) n[i] = 0; + for (var i = 0; i < len; i++) n[i] = 0; n[0] = val; } @@ -52,8 +52,8 @@ namespace OpenRA.FileFormats { fixed (uint* _pn = &n[0]) { - byte* pn = (byte*)_pn; - uint i = blen * 4; + var pn = (byte*)_pn; + var i = blen * 4; for (; i > klen; i--) pn[i - 1] = (byte)sign; for (; i > 0; i--) pn[i - 1] = key[klen - i]; } @@ -65,7 +65,7 @@ namespace OpenRA.FileFormats uint keylen; int i; - int j = 0; + var j = 0; if (key[j] != 2) return; j++; @@ -118,7 +118,7 @@ namespace OpenRA.FileFormats uint len_predata() { - uint a = (pubkey.len - 1) / 8; + var a = (pubkey.len - 1) / 8; return (55 / a + 1) * (a + 1); } @@ -141,7 +141,7 @@ namespace OpenRA.FileFormats static void shr_bignum(uint[] n, int bits, int len) { - int i; int i2 = bits / 32; + int i; var i2 = bits / 32; if (i2 > 0) { @@ -183,9 +183,9 @@ namespace OpenRA.FileFormats fixed (uint* _ps2 = &src2[0]) fixed (uint* _pd = &dest[0]) { - ushort* ps1 = (ushort*)_ps1; - ushort* ps2 = (ushort*)_ps2; - ushort* pd = (ushort*)_pd; + var ps1 = (ushort*)_ps1; + var ps2 = (ushort*)_ps2; + var pd = (ushort*)_pd; while (--len != -1) { @@ -205,9 +205,9 @@ namespace OpenRA.FileFormats len += len; - ushort* ps1 = (ushort*)src1; - ushort* ps2 = (ushort*)src2; - ushort* pd = (ushort*)dest; + var ps1 = (ushort*)src1; + var ps2 = (ushort*)src2; + var pd = (ushort*)dest; while (--len != -1) { @@ -222,11 +222,11 @@ namespace OpenRA.FileFormats static void inv_bignum(uint[] n1, uint[] n2, uint len) { - uint[] n_tmp = new uint[64]; + var n_tmp = new uint[64]; uint n2_bytelen, bit; int n2_bitlen; - int j = 0; + var j = 0; init_bignum(n_tmp, 0, len); init_bignum(n1, 0, len); @@ -257,7 +257,7 @@ namespace OpenRA.FileFormats static void inc_bignum(uint[] n, uint len) { - int i = 0; + var i = 0; while ((++n[i] == 0) && (--len > 0)) i++; } @@ -289,7 +289,7 @@ namespace OpenRA.FileFormats { fixed (uint* _pn2 = &n2[0]) { - ushort* pn2 = (ushort*)_pn2; + var pn2 = (ushort*)_pn2; tmp = 0; for (i = 0; i < len; i++) @@ -314,8 +314,8 @@ namespace OpenRA.FileFormats fixed( uint * _psrc2 = &src2[0] ) fixed(uint* _pdest = &dest[0]) { - ushort* psrc2 = (ushort*)_psrc2; - ushort* pdest = (ushort*)_pdest; + var psrc2 = (ushort*)_psrc2; + var pdest = (ushort*)_pdest; init_bignum(dest, 0, len * 2); for (i = 0; i < len * 2; i++) @@ -338,8 +338,8 @@ namespace OpenRA.FileFormats unsafe uint get_mulword(uint* n) { - ushort* wn = (ushort*)n; - uint i = (uint)((((((((((*(wn - 1) ^ 0xffff) & 0xffff) * glob1_hi_inv_lo + 0x10000) >> 1) + var wn = (ushort*)n; + var i = (uint)((((((((((*(wn - 1) ^ 0xffff) & 0xffff) * glob1_hi_inv_lo + 0x10000) >> 1) + (((*(wn - 2) ^ 0xffff) * glob1_hi_inv_hi + glob1_hi_inv_hi) >> 1) + 1) >> 16) + ((((*(wn - 1) ^ 0xffff) & 0xffff) * glob1_hi_inv_hi) >> 1) + (((*wn ^ 0xffff) * glob1_hi_inv_lo) >> 1) + 1) >> 14) + glob1_hi_inv_hi @@ -350,7 +350,7 @@ namespace OpenRA.FileFormats static void dec_bignum(uint[] n, uint len) { - int i = 0; + var i = 0; while ((--n[i] == 0xffffffff) && (--len > 0)) i++; } @@ -371,12 +371,12 @@ namespace OpenRA.FileFormats inc_bignum(glob2, len * 2 + 1); neg_bignum(glob2, len * 2 + 1); len_diff = g2_len_x2 + 1 - glob1_len_x2; - ushort* esi = ((ushort*)g2) + (1 + g2_len_x2 - glob1_len_x2); - ushort* edi = ((ushort*)g2) + (g2_len_x2 + 1); + var esi = ((ushort*)g2) + (1 + g2_len_x2 - glob1_len_x2); + var edi = ((ushort*)g2) + (g2_len_x2 + 1); for (; len_diff != 0; len_diff--) { edi--; - uint tmp = get_mulword((uint*)edi); + var tmp = get_mulword((uint*)edi); esi--; if (tmp > 0) { @@ -410,7 +410,7 @@ namespace OpenRA.FileFormats void calc_a_key(uint[] n1, uint[] n2, uint[] n3, uint[] n4, uint len) { - uint[] n_tmp = new uint[64]; + var n_tmp = new uint[64]; uint n3_len, n4_len; int n3_bitlen; uint bit_mask; @@ -419,7 +419,7 @@ namespace OpenRA.FileFormats { fixed (uint* _pn3 = &n3[0]) { - uint* pn3 = _pn3; + var pn3 = _pn3; init_bignum(n1, 1, len); n4_len = len_bignum(n4, len); @@ -457,10 +457,10 @@ namespace OpenRA.FileFormats unsafe void process_predata(byte* pre, uint pre_len, byte *buf) { - uint[] n2 = new uint[64]; - uint[] n3 = new uint[64]; + var n2 = new uint[64]; + var n3 = new uint[64]; - uint a = (pubkey.len - 1) / 8; + var a = (pubkey.len - 1) / 8; while (a + 1 <= pre_len) { init_bignum(n2, 0, 64); @@ -480,7 +480,7 @@ namespace OpenRA.FileFormats public byte[] DecryptKey(byte[] src) { init_pubkey(); - byte[] dest = new byte[256]; + var dest = new byte[256]; unsafe { diff --git a/OpenRA.Game/FileFormats/CRC32.cs b/OpenRA.Game/FileFormats/CRC32.cs index 59cb9d5cc7..0ad5e4b778 100644 --- a/OpenRA.Game/FileFormats/CRC32.cs +++ b/OpenRA.Game/FileFormats/CRC32.cs @@ -98,8 +98,8 @@ namespace OpenRA.FileFormats /// public static uint Calculate(byte[] data, uint polynomial) { - uint crc = polynomial; - for (int i = 0; i < data.Length; i++) + var crc = polynomial; + for (var i = 0; i < data.Length; i++) crc = (crc >> 8) ^ lookUp[(crc & 0xFF) ^ data[i]]; crc ^= polynomial; return crc; @@ -119,8 +119,8 @@ namespace OpenRA.FileFormats /// The calculated checksum. public static unsafe uint Calculate(byte* data, uint len, uint polynomial) { - uint crc = polynomial; - for (int i = 0; i < len; i++) + var crc = polynomial; + for (var i = 0; i < len; i++) crc = (crc >> 8) ^ lookUp[(crc & 0xFF) ^ *data++]; crc ^= polynomial; return crc; diff --git a/OpenRA.Game/FileFormats/Format40.cs b/OpenRA.Game/FileFormats/Format40.cs index 8f4d3cfcda..9020beea77 100644 --- a/OpenRA.Game/FileFormats/Format40.cs +++ b/OpenRA.Game/FileFormats/Format40.cs @@ -15,32 +15,32 @@ namespace OpenRA.FileFormats public static int DecodeInto(byte[] src, byte[] dest, int srcOffset) { var ctx = new FastByteReader(src, srcOffset); - int destIndex = 0; + var destIndex = 0; while (true) { - byte i = ctx.ReadByte(); + var i = ctx.ReadByte(); if ((i & 0x80) == 0) { - int count = i & 0x7F; + var count = i & 0x7F; if (count == 0) { // case 6 count = ctx.ReadByte(); - byte value = ctx.ReadByte(); - for (int end = destIndex + count; destIndex < end; destIndex++) + var value = ctx.ReadByte(); + for (var end = destIndex + count; destIndex < end; destIndex++) dest[destIndex] ^= value; } else { // case 5 - for (int end = destIndex + count; destIndex < end; destIndex++) + for (var end = destIndex + count; destIndex < end; destIndex++) dest[destIndex] ^= ctx.ReadByte(); } } else { - int count = i & 0x7F; + var count = i & 0x7F; if (count == 0) { count = ctx.ReadWord(); @@ -55,14 +55,14 @@ namespace OpenRA.FileFormats else if ((count & 0x4000) == 0) { // case 3 - for (int end = destIndex + (count & 0x3FFF); destIndex < end; destIndex++) + for (var end = destIndex + (count & 0x3FFF); destIndex < end; destIndex++) dest[destIndex] ^= ctx.ReadByte(); } else { // case 4 - byte value = ctx.ReadByte(); - for (int end = destIndex + (count & 0x3FFF); destIndex < end; destIndex++) + var value = ctx.ReadByte(); + for (var end = destIndex + (count & 0x3FFF); destIndex < end; destIndex++) dest[destIndex] ^= value; } } diff --git a/OpenRA.Game/FileFormats/IniFile.cs b/OpenRA.Game/FileFormats/IniFile.cs index a7c091f30b..f5be3e9a5d 100644 --- a/OpenRA.Game/FileFormats/IniFile.cs +++ b/OpenRA.Game/FileFormats/IniFile.cs @@ -33,7 +33,7 @@ namespace OpenRA.FileFormats public void Load(Stream s) { - StreamReader reader = new StreamReader(s); + var reader = new StreamReader(s); IniSection currentSection = null; while (!reader.EndOfStream) @@ -55,10 +55,10 @@ namespace OpenRA.FileFormats IniSection ProcessSection(string line) { - Match m = sectionPattern.Match(line); + var m = sectionPattern.Match(line); if (!m.Success) return null; - string sectionName = m.Groups[1].Value.ToLowerInvariant(); + var sectionName = m.Groups[1].Value.ToLowerInvariant(); IniSection ret; if (!sections.TryGetValue(sectionName, out ret)) @@ -78,7 +78,7 @@ namespace OpenRA.FileFormats var key = line; var value = ""; - int eq = line.IndexOf('='); + var eq = line.IndexOf('='); if (eq >= 0) { key = line.Substring(0, eq); diff --git a/OpenRA.Game/FileFormats/PngLoader.cs b/OpenRA.Game/FileFormats/PngLoader.cs index 7f1b438438..ccc4b48186 100644 --- a/OpenRA.Game/FileFormats/PngLoader.cs +++ b/OpenRA.Game/FileFormats/PngLoader.cs @@ -39,7 +39,7 @@ namespace OpenRA.FileFormats Bitmap bitmap = null; Color[] palette = null; - List data = new List(); + var data = new List(); for (; ; ) { diff --git a/OpenRA.Game/FileFormats/ReplayMetadata.cs b/OpenRA.Game/FileFormats/ReplayMetadata.cs index d575404806..5ac96b7774 100644 --- a/OpenRA.Game/FileFormats/ReplayMetadata.cs +++ b/OpenRA.Game/FileFormats/ReplayMetadata.cs @@ -46,7 +46,7 @@ namespace OpenRA.FileFormats throw new NotSupportedException("Metadata version {0} is not supported".F(version)); // Read game info (max 100K limit as a safeguard against corrupted files) - string data = fs.ReadString(Encoding.UTF8, 1024 * 100); + var data = fs.ReadString(Encoding.UTF8, 1024 * 100); GameInfo = GameInformation.Deserialize(data); } @@ -57,7 +57,7 @@ namespace OpenRA.FileFormats writer.Write(MetaVersion); // Write data - int dataLength = 0; + var dataLength = 0; { // Write lobby info data writer.Flush(); diff --git a/OpenRA.Game/FileFormats/TmpRAReader.cs b/OpenRA.Game/FileFormats/TmpRAReader.cs index 8f92fd4235..6fc1776977 100644 --- a/OpenRA.Game/FileFormats/TmpRAReader.cs +++ b/OpenRA.Game/FileFormats/TmpRAReader.cs @@ -35,7 +35,7 @@ namespace OpenRA.FileFormats var indexStart = s.ReadInt32(); s.Position = indexStart; - foreach (byte b in s.ReadBytes(indexEnd - indexStart)) + foreach (var b in s.ReadBytes(indexEnd - indexStart)) { if (b != 255) { diff --git a/OpenRA.Game/FileFormats/TmpTDReader.cs b/OpenRA.Game/FileFormats/TmpTDReader.cs index 7650c39a0b..a461a14782 100644 --- a/OpenRA.Game/FileFormats/TmpTDReader.cs +++ b/OpenRA.Game/FileFormats/TmpTDReader.cs @@ -53,7 +53,7 @@ namespace OpenRA.FileFormats var indexStart = s.ReadInt32(); s.Position = indexStart; - foreach (byte b in s.ReadBytes(indexEnd - indexStart)) + foreach (var b in s.ReadBytes(indexEnd - indexStart)) { if (b != 255) { diff --git a/OpenRA.Game/FileFormats/VqaReader.cs b/OpenRA.Game/FileFormats/VqaReader.cs index 62b775b2f9..895d81ab51 100644 --- a/OpenRA.Game/FileFormats/VqaReader.cs +++ b/OpenRA.Game/FileFormats/VqaReader.cs @@ -101,7 +101,7 @@ namespace OpenRA.FileFormats // Frame offsets offsets = new UInt32[Frames]; - for (int i = 0; i < Frames; i++) + for (var i = 0; i < Frames; i++) { offsets[i] = stream.ReadUInt32(); if (offsets[i] > 0x40000000) @@ -125,7 +125,7 @@ namespace OpenRA.FileFormats var ms = new MemoryStream(); var adpcmIndex = 0; - bool compressed = false; + var compressed = false; for (var i = 0; i < Frames; i++) { stream.Seek(offsets[i], SeekOrigin.Begin); @@ -201,7 +201,7 @@ namespace OpenRA.FileFormats // Chunks are aligned on even bytes; may be padded with a single null if (s.Peek() == 0) s.ReadByte(); var type = s.ReadASCII(4); - int subchunkLength = (int)int2.Swap(s.ReadUInt32()); + var subchunkLength = (int)int2.Swap(s.ReadUInt32()); switch(type) { @@ -235,11 +235,11 @@ namespace OpenRA.FileFormats // Palette case "CPL0": - for (int i = 0; i < numColors; i++) + for (var i = 0; i < numColors; i++) { - byte r = (byte)(s.ReadUInt8() << 2); - byte g = (byte)(s.ReadUInt8() << 2); - byte b = (byte)(s.ReadUInt8() << 2); + var r = (byte)(s.ReadUInt8() << 2); + var g = (byte)(s.ReadUInt8() << 2); + var b = (byte)(s.ReadUInt8() << 2); palette[i] = (uint)((255 << 24) | (r << 16) | (g << 8) | b); } break; @@ -269,7 +269,7 @@ namespace OpenRA.FileFormats for (var i = 0; i < blockWidth; i++) { var cbfi = (mod*256 + px)*8 + j*blockWidth + i; - byte color = (mod == 0x0f) ? px : cbf[cbfi]; + var color = (mod == 0x0f) ? px : cbf[cbfi]; frameData[y*blockHeight + j, x*blockWidth + i] = palette[color]; } } diff --git a/OpenRA.Game/FileFormats/VxlReader.cs b/OpenRA.Game/FileFormats/VxlReader.cs index aba5c4038c..bba490a10d 100644 --- a/OpenRA.Game/FileFormats/VxlReader.cs +++ b/OpenRA.Game/FileFormats/VxlReader.cs @@ -79,8 +79,8 @@ namespace OpenRA.FileFormats s.Seek(dataStart + colStart[i], SeekOrigin.Begin); - byte x = (byte)(i % l.Size[0]); - byte y = (byte)(i / l.Size[0]); + var x = (byte)(i % l.Size[0]); + var y = (byte)(i / l.Size[0]); byte z = 0; l.VoxelMap[x,y] = new Dictionary(); do diff --git a/OpenRA.Game/FileSystem/InstallShieldPackage.cs b/OpenRA.Game/FileSystem/InstallShieldPackage.cs index fdb4fde287..d4c4ef9cc6 100644 --- a/OpenRA.Game/FileSystem/InstallShieldPackage.cs +++ b/OpenRA.Game/FileSystem/InstallShieldPackage.cs @@ -32,8 +32,8 @@ namespace OpenRA.FileSystem s = GlobalFileSystem.Open(filename); // Parse package header - BinaryReader reader = new BinaryReader(s); - uint signature = reader.ReadUInt32(); + var reader = new BinaryReader(s); + var signature = reader.ReadUInt32(); if (signature != 0x8C655D13) throw new InvalidDataException("Not an Installshield package"); @@ -48,7 +48,7 @@ namespace OpenRA.FileSystem // Parse the directory list s.Seek(TOCAddress, SeekOrigin.Begin); - BinaryReader TOCreader = new BinaryReader(s); + var TOCreader = new BinaryReader(s); var fileCountInDirs = new List(); // Parse directories diff --git a/OpenRA.Game/FileSystem/PackageEntry.cs b/OpenRA.Game/FileSystem/PackageEntry.cs index ca0ed77941..98777a8664 100644 --- a/OpenRA.Game/FileSystem/PackageEntry.cs +++ b/OpenRA.Game/FileSystem/PackageEntry.cs @@ -64,10 +64,10 @@ namespace OpenRA.FileSystem if (name.Length % 4 != 0) name = name.PadRight(name.Length + (4 - name.Length % 4), '\0'); - MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(name)); - BinaryReader reader = new BinaryReader(ms); + var ms = new MemoryStream(Encoding.ASCII.GetBytes(name)); + var reader = new BinaryReader(ms); - int len = name.Length >> 2; + var len = name.Length >> 2; uint result = 0; while (len-- != 0) @@ -80,11 +80,11 @@ namespace OpenRA.FileSystem { name = name.ToUpperInvariant(); var l = name.Length; - int a = l >> 2; + var a = l >> 2; if ((l & 3) != 0) { name += (char)(l - (a << 2)); - int i = 3 - (l & 3); + var i = 3 - (l & 3); while (i-- != 0) name += name[a << 2]; } @@ -99,9 +99,9 @@ namespace OpenRA.FileSystem public static void AddStandardName(string s) { - uint hash = HashFilename(s, PackageHashType.Classic); // RA1 and TD + var hash = HashFilename(s, PackageHashType.Classic); // RA1 and TD Names.Add(hash, s); - uint crcHash = HashFilename(s, PackageHashType.CRC32); // TS + var crcHash = HashFilename(s, PackageHashType.CRC32); // TS Names.Add(crcHash, s); } diff --git a/OpenRA.Game/GameRules/ActorInfo.cs b/OpenRA.Game/GameRules/ActorInfo.cs index b7e70f3ce0..b920f49948 100644 --- a/OpenRA.Game/GameRules/ActorInfo.cs +++ b/OpenRA.Game/GameRules/ActorInfo.cs @@ -89,7 +89,7 @@ namespace OpenRA { var ret = new List(); var t = Traits.WithInterface().ToList(); - int index = 0; + var index = 0; while (t.Count != 0) { var prereqs = PrerequisitesOf(t[index]); diff --git a/OpenRA.Game/Graphics/HSLColor.cs b/OpenRA.Game/Graphics/HSLColor.cs index 9c6d7559f3..5013888793 100644 --- a/OpenRA.Game/Graphics/HSLColor.cs +++ b/OpenRA.Game/Graphics/HSLColor.cs @@ -44,13 +44,13 @@ namespace OpenRA.Graphics float[] trgb = { h + 1 / 3.0f, h, h - 1 / 3.0f }; float[] rgb = { 0, 0, 0 }; - for (int k = 0; k < 3; k++) + for (var k = 0; k < 3; k++) { while (trgb[k] < 0) trgb[k] += 1.0f; while (trgb[k] > 1) trgb[k] -= 1.0f; } - for (int k = 0; k < 3; k++) + for (var k = 0; k < 3; k++) { if (trgb[k] < 1 / 6.0f) { rgb[k] = p + ((q - p) * 6 * trgb[k]); } else if (trgb[k] >= 1 / 6.0f && trgb[k] < 0.5) { rgb[k] = q; } diff --git a/OpenRA.Game/Graphics/Minimap.cs b/OpenRA.Game/Graphics/Minimap.cs index 739817715a..d99d02cdbc 100644 --- a/OpenRA.Game/Graphics/Minimap.cs +++ b/OpenRA.Game/Graphics/Minimap.cs @@ -35,7 +35,7 @@ namespace OpenRA.Graphics unsafe { - int* c = (int*)bitmapData.Scan0; + var c = (int*)bitmapData.Scan0; for (var x = 0; x < map.Bounds.Width; x++) for (var y = 0; y < map.Bounds.Height; y++) @@ -56,14 +56,14 @@ namespace OpenRA.Graphics // in a world use AddCustomTerrain instead static Bitmap AddStaticResources(TileSet tileset, Map map, Ruleset resourceRules, Bitmap terrainBitmap) { - Bitmap terrain = new Bitmap(terrainBitmap); + var terrain = new Bitmap(terrainBitmap); var bitmapData = terrain.LockBits(terrain.Bounds(), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); unsafe { - int* c = (int*)bitmapData.Scan0; + var c = (int*)bitmapData.Scan0; for (var x = 0; x < map.Bounds.Width; x++) for (var y = 0; y < map.Bounds.Height; y++) @@ -98,7 +98,7 @@ namespace OpenRA.Graphics unsafe { - int* c = (int*)bitmapData.Scan0; + var c = (int*)bitmapData.Scan0; for (var x = 0; x < map.Bounds.Width; x++) for (var y = 0; y < map.Bounds.Height; y++) @@ -126,7 +126,7 @@ namespace OpenRA.Graphics unsafe { - int* c = (int*)bitmapData.Scan0; + var c = (int*)bitmapData.Scan0; foreach (var t in world.ActorsWithTrait()) { @@ -160,7 +160,7 @@ namespace OpenRA.Graphics unsafe { - int* c = (int*)bitmapData.Scan0; + var c = (int*)bitmapData.Scan0; for (var x = 0; x < map.Bounds.Width; x++) for (var y = 0; y < map.Bounds.Height; y++) @@ -184,7 +184,7 @@ namespace OpenRA.Graphics public static Bitmap RenderMapPreview(TileSet tileset, Map map, Ruleset resourceRules, bool actualSize) { - Bitmap terrain = TerrainBitmap(tileset, map, actualSize); + var terrain = TerrainBitmap(tileset, map, actualSize); return AddStaticResources(tileset, map, resourceRules, terrain); } } diff --git a/OpenRA.Game/Graphics/Palette.cs b/OpenRA.Game/Graphics/Palette.cs index f2b8d4d56c..cd0eeec9ad 100644 --- a/OpenRA.Game/Graphics/Palette.cs +++ b/OpenRA.Game/Graphics/Palette.cs @@ -46,7 +46,7 @@ namespace OpenRA.Graphics public void ApplyRemap(IPaletteRemap r) { - for (int i = 0; i < 256; i++) + for (var i = 0; i < 256; i++) colors[i] = (uint)r.GetRemappedColor(Color.FromArgb((int)colors[i]), i).ToArgb(); } @@ -54,19 +54,19 @@ namespace OpenRA.Graphics { colors = new uint[256]; - using (BinaryReader reader = new BinaryReader(s)) + using (var reader = new BinaryReader(s)) { - for (int i = 0; i < 256; i++) + for (var i = 0; i < 256; i++) { - byte r = (byte)(reader.ReadByte() << 2); - byte g = (byte)(reader.ReadByte() << 2); - byte b = (byte)(reader.ReadByte() << 2); + var r = (byte)(reader.ReadByte() << 2); + var g = (byte)(reader.ReadByte() << 2); + var b = (byte)(reader.ReadByte() << 2); colors[i] = (uint)((255 << 24) | (r << 16) | (g << 8) | b); } } colors[0] = 0; // convert black background to transparency - foreach (int i in remapShadow) + foreach (var i in remapShadow) colors[i] = 140u << 24; } @@ -112,7 +112,7 @@ namespace OpenRA.Graphics ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); unsafe { - uint* c = (uint*)data.Scan0; + var c = (uint*)data.Scan0; for (var x = 0; x < 256; x++) *(c + x) = colors[x]; } diff --git a/OpenRA.Game/Graphics/Renderer.cs b/OpenRA.Game/Graphics/Renderer.cs index a37ddc6a06..d101bfc9b7 100644 --- a/OpenRA.Game/Graphics/Renderer.cs +++ b/OpenRA.Game/Graphics/Renderer.cs @@ -54,7 +54,7 @@ namespace OpenRA.Graphics RgbaSpriteRenderer = new SpriteRenderer(this, device.CreateShader("rgba")); SpriteRenderer = new SpriteRenderer(this, device.CreateShader("shp")); - for (int i = 0; i < TempBufferCount; i++) + for (var i = 0; i < TempBufferCount; i++) tempBuffers.Enqueue(device.CreateVertexBuffer(TempBufferSize)); } diff --git a/OpenRA.Game/Graphics/SpriteFont.cs b/OpenRA.Game/Graphics/SpriteFont.cs index 62cc65a637..ca937a6180 100644 --- a/OpenRA.Game/Graphics/SpriteFont.cs +++ b/OpenRA.Game/Graphics/SpriteFont.cs @@ -93,7 +93,7 @@ namespace OpenRA.Graphics GlyphInfo CreateGlyph(Pair c) { - uint index = face.GetCharIndex(c.First); + var index = face.GetCharIndex(c.First); face.LoadGlyph(index, LoadFlags.Default, LoadTarget.Normal); face.Glyph.RenderGlyph(RenderMode.Normal); diff --git a/OpenRA.Game/Graphics/TerrainRenderer.cs b/OpenRA.Game/Graphics/TerrainRenderer.cs index 72ae13c0c8..fe6cb84410 100644 --- a/OpenRA.Game/Graphics/TerrainRenderer.cs +++ b/OpenRA.Game/Graphics/TerrainRenderer.cs @@ -26,7 +26,7 @@ namespace OpenRA.Graphics var terrainPalette = wr.Palette("terrain").Index; var vertices = new Vertex[4 * map.Bounds.Height * map.Bounds.Width]; - int nv = 0; + var nv = 0; for (var j = map.Bounds.Top; j < map.Bounds.Bottom; j++) { diff --git a/OpenRA.Game/Graphics/Util.cs b/OpenRA.Game/Graphics/Util.cs index e8b7ee4aa9..2896924de0 100644 --- a/OpenRA.Game/Graphics/Util.cs +++ b/OpenRA.Game/Graphics/Util.cs @@ -52,7 +52,7 @@ namespace OpenRA.Graphics var srcOffset = 0; for (var j = 0; j < height; j++) { - for (int i = 0; i < srcStride; i++, srcOffset++) + for (var i = 0; i < srcStride; i++, srcOffset++) { data[destOffset] = src[srcOffset]; destOffset += 4; diff --git a/OpenRA.Game/Graphics/VoxelLoader.cs b/OpenRA.Game/Graphics/VoxelLoader.cs index 6bd96377f8..b4f7986a65 100644 --- a/OpenRA.Game/Graphics/VoxelLoader.cs +++ b/OpenRA.Game/Graphics/VoxelLoader.cs @@ -82,7 +82,7 @@ namespace OpenRA.Graphics c++; } - Sprite s = sheetBuilder.Allocate(new Size(su, sv)); + var s = sheetBuilder.Allocate(new Size(su, sv)); Util.FastCopyIntoChannel(s, 0, colors); Util.FastCopyIntoChannel(s, 1, normals); s.sheet.CommitData(); diff --git a/OpenRA.Game/InstallUtils.cs b/OpenRA.Game/InstallUtils.cs index 07e75afa10..477747e913 100644 --- a/OpenRA.Game/InstallUtils.cs +++ b/OpenRA.Game/InstallUtils.cs @@ -49,7 +49,7 @@ namespace OpenRA if (!GlobalFileSystem.Exists(package)) { onError("Cannot find " + package); return false; } GlobalFileSystem.Mount(package); - foreach (string s in files) + foreach (var s in files) { var destFile = Path.Combine(destPath, s); using (var sourceStream = GlobalFileSystem.Open(s)) @@ -90,7 +90,7 @@ namespace OpenRA return false; } - List extracted = new List(); + var extracted = new List(); try { using (var stream = File.OpenRead(zipFile)) diff --git a/OpenRA.Game/Map/Map.cs b/OpenRA.Game/Map/Map.cs index 2b0e6ec38a..e6fc7c5feb 100644 --- a/OpenRA.Game/Map/Map.cs +++ b/OpenRA.Game/Map/Map.cs @@ -123,7 +123,7 @@ namespace OpenRA var tile = tileset.Templates.First(); var tileRef = new TileReference { Type = tile.Key, Index = (byte)0 }; - Map map = new Map() + var map = new Map() { Title = "Name your map here", Description = "Describe your map here", @@ -364,8 +364,8 @@ namespace OpenRA // Load tile data var data = dataStream.ReadBytes(MapSize.X * MapSize.Y * 3); var d = 0; - for (int i = 0; i < MapSize.X; i++) - for (int j = 0; j < MapSize.Y; j++) + for (var i = 0; i < MapSize.X; i++) + for (var j = 0; j < MapSize.Y; j++) { var tile = BitConverter.ToUInt16(data, d); d += 2; diff --git a/OpenRA.Game/Map/TileSet.cs b/OpenRA.Game/Map/TileSet.cs index fee5dbce64..9e56657f31 100644 --- a/OpenRA.Game/Map/TileSet.cs +++ b/OpenRA.Game/Map/TileSet.cs @@ -119,7 +119,7 @@ namespace OpenRA var root = new List(); foreach (var field in Fields) { - FieldInfo f = this.GetType().GetField(field); + var f = this.GetType().GetField(field); if (f.GetValue(this) == null) continue; diff --git a/OpenRA.Game/MiniYaml.cs b/OpenRA.Game/MiniYaml.cs index 17335a6a7d..7ee942cb1a 100755 --- a/OpenRA.Game/MiniYaml.cs +++ b/OpenRA.Game/MiniYaml.cs @@ -189,7 +189,7 @@ namespace OpenRA public static List FromFileInPackage(string path) { - List lines = new List(); + var lines = new List(); using (var stream = GlobalFileSystem.Open(path)) using (var reader = new StreamReader(stream)) while (!reader.EndOfStream) diff --git a/OpenRA.Game/Network/OrderManager.cs b/OpenRA.Game/Network/OrderManager.cs index 5be8f59730..3a503166a3 100755 --- a/OpenRA.Game/Network/OrderManager.cs +++ b/OpenRA.Game/Network/OrderManager.cs @@ -116,7 +116,7 @@ namespace OpenRA.Network } else { - for (int i = 0; i < packet.Length; i++) + for (var i = 0; i < packet.Length; i++) { if (packet[i] != existingSync[i]) { diff --git a/OpenRA.Game/ObjectCreator.cs b/OpenRA.Game/ObjectCreator.cs index 5a575bbba1..9e3d57f491 100755 --- a/OpenRA.Game/ObjectCreator.cs +++ b/OpenRA.Game/ObjectCreator.cs @@ -98,7 +98,7 @@ namespace OpenRA { var p = ctor.GetParameters(); var a = new object[p.Length]; - for (int i = 0; i < p.Length; i++) + for (var i = 0; i < p.Length; i++) { var key = p[i].Name; if (!args.ContainsKey(key)) throw new InvalidOperationException("ObjectCreator: key `{0}' not found".F(key)); diff --git a/OpenRA.Game/Primitives/PriorityQueue.cs b/OpenRA.Game/Primitives/PriorityQueue.cs index ebcb7b60da..c11031be8a 100644 --- a/OpenRA.Game/Primitives/PriorityQueue.cs +++ b/OpenRA.Game/Primitives/PriorityQueue.cs @@ -26,8 +26,8 @@ namespace OpenRA.Primitives public void Add(T item) { - int addLevel = level; - int addIndex = index; + var addLevel = level; + var addIndex = index; while (addLevel >= 1 && Above(addLevel, addIndex).CompareTo(item) > 0) { @@ -53,8 +53,8 @@ namespace OpenRA.Primitives T Last() { - int lastLevel = level; - int lastIndex = index; + var lastLevel = level; + var lastIndex = index; if (--lastIndex < 0) lastIndex = (1 << --lastLevel) - 1; @@ -68,7 +68,7 @@ namespace OpenRA.Primitives if (level == 0 && index == 0) throw new InvalidOperationException("Attempting to pop empty PriorityQueue"); - T ret = At(0, 0); + var ret = At(0, 0); BubbleInto(0, 0, Last()); if (--index < 0) index = (1 << --level) - 1; @@ -78,8 +78,8 @@ namespace OpenRA.Primitives void BubbleInto(int intoLevel, int intoIndex, T val) { - int downLevel = intoLevel + 1; - int downIndex = intoIndex << 1; + var downLevel = intoLevel + 1; + var downIndex = intoIndex << 1; if (downLevel > level || (downLevel == level && downIndex >= index)) { diff --git a/OpenRA.Game/Primitives/float2.cs b/OpenRA.Game/Primitives/float2.cs index c8c10b5e76..eb8a3d4dd0 100644 --- a/OpenRA.Game/Primitives/float2.cs +++ b/OpenRA.Game/Primitives/float2.cs @@ -82,7 +82,7 @@ namespace OpenRA public static bool WithinEpsilon(float2 a, float2 b, float e) { - float2 d = a - b; + var d = a - b; return Math.Abs(d.X) < e && Math.Abs(d.Y) < e; } diff --git a/OpenRA.Game/Scripting/ScriptMemberWrapper.cs b/OpenRA.Game/Scripting/ScriptMemberWrapper.cs index d3fd294b35..09ca15a19f 100644 --- a/OpenRA.Game/Scripting/ScriptMemberWrapper.cs +++ b/OpenRA.Game/Scripting/ScriptMemberWrapper.cs @@ -50,7 +50,7 @@ namespace OpenRA.Scripting var mi = (MethodInfo)Member; var pi = mi.GetParameters(); - object[] clrArgs = new object[pi.Length]; + var clrArgs = new object[pi.Length]; var argCount = args.Count; for (var i = 0; i < pi.Length; i++) { diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index fffe85f83a..92fa9f31a2 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -444,7 +444,7 @@ namespace OpenRA.Server { case "Command": { - bool handled = false; + var handled = false; foreach (var t in serverTraits.WithInterface()) if (handled = t.InterpretCommand(this, conn, GetClient(conn), so.Data)) break; diff --git a/OpenRA.Game/Sound.cs b/OpenRA.Game/Sound.cs index cbf3e5f320..b48850b348 100644 --- a/OpenRA.Game/Sound.cs +++ b/OpenRA.Game/Sound.cs @@ -533,8 +533,8 @@ namespace OpenRA } } - List freeSources = new List(); - foreach (int key in sourcePool.Keys) + var freeSources = new List(); + foreach (var key in sourcePool.Keys) { int state; AL.GetSource(key, ALGetSourcei.SourceState, out state); @@ -545,7 +545,7 @@ namespace OpenRA if (freeSources.Count == 0) return -1; - foreach (int i in freeSources) + foreach (var i in freeSources) sourcePool[i].IsActive = false; sourcePool[freeSources[0]].IsActive = true; diff --git a/OpenRA.Game/Support/Arguments.cs b/OpenRA.Game/Support/Arguments.cs index aed2a634b3..5c34d9a267 100644 --- a/OpenRA.Game/Support/Arguments.cs +++ b/OpenRA.Game/Support/Arguments.cs @@ -24,7 +24,7 @@ namespace OpenRA var regex = new Regex("([^=]+)=(.*)"); foreach (var s in src) { - Match m = regex.Match(s); + var m = regex.Match(s); if (!m.Success) continue; diff --git a/OpenRA.Game/Support/PerfHistory.cs b/OpenRA.Game/Support/PerfHistory.cs index 3850d83932..fbdfb5d611 100644 --- a/OpenRA.Game/Support/PerfHistory.cs +++ b/OpenRA.Game/Support/PerfHistory.cs @@ -71,7 +71,7 @@ namespace OpenRA.Support public IEnumerable Samples() { - int n = head; + var n = head; while (n != tail) { --n; @@ -82,8 +82,8 @@ namespace OpenRA.Support public double Average(int count) { - int i = 0; - int n = head; + var i = 0; + var n = head; double sum = 0; while (i < count && n != tail) { @@ -98,7 +98,7 @@ namespace OpenRA.Support { get { - int n = head; + var n = head; if (--n < 0) n = samples.Length - 1; return samples[n]; } diff --git a/OpenRA.Game/Sync.cs b/OpenRA.Game/Sync.cs index 2425d02912..b877f97922 100755 --- a/OpenRA.Game/Sync.cs +++ b/OpenRA.Game/Sync.cs @@ -116,7 +116,7 @@ namespace OpenRA public static int hash_tdict(TypeDictionary d) { - int ret = 0; + var ret = 0; foreach (var o in d) ret += CalculateSyncHash(o); return ret; diff --git a/OpenRA.Game/TraitDictionary.cs b/OpenRA.Game/TraitDictionary.cs index b683f8f922..b6dace9b02 100755 --- a/OpenRA.Game/TraitDictionary.cs +++ b/OpenRA.Game/TraitDictionary.cs @@ -19,9 +19,9 @@ namespace OpenRA { public static int BinarySearchMany(this List list, uint searchFor) { - int start = 0; - int end = list.Count; - int mid = 0; + var start = 0; + var end = list.Count; + var mid = 0; while (start != end) { mid = (start + end) / 2; @@ -172,13 +172,13 @@ namespace OpenRA public IEnumerable> All() { ++queries; - for (int i = 0; i < actors.Count; i++) + for (var i = 0; i < actors.Count; i++) yield return new TraitPair { Actor = actors[i], Trait = traits[i] }; } public void RemoveActor(uint actor) { - for (int i = actors.Count - 1; i >= 0; i--) + for (var i = actors.Count - 1; i >= 0; i--) { if (actors[i].ActorID == actor) { diff --git a/OpenRA.Game/WRange.cs b/OpenRA.Game/WRange.cs index 331210b65d..ab272f825e 100644 --- a/OpenRA.Game/WRange.cs +++ b/OpenRA.Game/WRange.cs @@ -54,8 +54,8 @@ namespace OpenRA { s = s.ToLowerInvariant(); var components = s.Split('c'); - int cell = 0; - int subcell = 0; + var cell = 0; + var subcell = 0; result = WRange.Zero; switch (components.Length) diff --git a/OpenRA.Game/Widgets/LabelWidget.cs b/OpenRA.Game/Widgets/LabelWidget.cs index 8f06438f34..d0965a0704 100644 --- a/OpenRA.Game/Widgets/LabelWidget.cs +++ b/OpenRA.Game/Widgets/LabelWidget.cs @@ -63,8 +63,8 @@ namespace OpenRA.Widgets if (text == null) return; - int2 textSize = font.Measure(text); - int2 position = RenderOrigin; + var textSize = font.Measure(text); + var position = RenderOrigin; if (VAlign == TextVAlign.Middle) position += new int2(0, (Bounds.Height - textSize.Y)/2); diff --git a/OpenRA.Game/Widgets/PerfGraphWidget.cs b/OpenRA.Game/Widgets/PerfGraphWidget.cs index 47428ef8b8..3e0ee1009c 100644 --- a/OpenRA.Game/Widgets/PerfGraphWidget.cs +++ b/OpenRA.Game/Widgets/PerfGraphWidget.cs @@ -19,16 +19,16 @@ namespace OpenRA.Widgets public override void Draw() { var rect = RenderBounds; - float2 origin = new float2(rect.Right, rect.Bottom); - float2 basis = new float2(-rect.Width / 100, -rect.Height / 100); + var origin = new float2(rect.Right, rect.Bottom); + var basis = new float2(-rect.Width / 100, -rect.Height / 100); Game.Renderer.LineRenderer.DrawLine(origin, origin + new float2(100, 0) * basis, Color.White, Color.White); Game.Renderer.LineRenderer.DrawLine(origin + new float2(100, 0) * basis, origin + new float2(100, 100) * basis, Color.White, Color.White); - int k = 0; + var k = 0; foreach (var item in PerfHistory.items.Values.ToArray()) { - int n = 0; + var n = 0; item.Samples().Aggregate((a, b) => { Game.Renderer.LineRenderer.DrawLine( diff --git a/OpenRA.Game/Widgets/ProgressBarWidget.cs b/OpenRA.Game/Widgets/ProgressBarWidget.cs index ddb616649b..987a7563d3 100644 --- a/OpenRA.Game/Widgets/ProgressBarWidget.cs +++ b/OpenRA.Game/Widgets/ProgressBarWidget.cs @@ -45,7 +45,7 @@ namespace OpenRA.Widgets var percentage = GetPercentage(); WidgetUtils.DrawPanel("progressbar-bg", rb); - Rectangle barRect = wasIndeterminate ? + var barRect = wasIndeterminate ? new Rectangle(rb.X + 2 + (int)(0.75*offset*(rb.Width - 4)), rb.Y + 2, (rb.Width - 4) / 4, rb.Height - 4) : new Rectangle(rb.X + 2, rb.Y + 2, percentage * (rb.Width - 4) / 100, rb.Height - 4); diff --git a/OpenRA.Game/Widgets/SliderWidget.cs b/OpenRA.Game/Widgets/SliderWidget.cs index b080386c5a..a40cd372a0 100755 --- a/OpenRA.Game/Widgets/SliderWidget.cs +++ b/OpenRA.Game/Widgets/SliderWidget.cs @@ -114,7 +114,7 @@ namespace OpenRA.Widgets // Tickmarks var tick = ChromeProvider.GetImage("slider", "tick"); - for (int i = 0; i < Ticks; i++) + for (var i = 0; i < Ticks; i++) { var tickPos = new float2( trackOrigin + (i * (trackRect.Width - (int)tick.size.X) / (Ticks - 1)) - tick.size.X / 2, diff --git a/OpenRA.Game/Widgets/TextFieldWidget.cs b/OpenRA.Game/Widgets/TextFieldWidget.cs index c5cd7b0bde..2f955a2ef9 100644 --- a/OpenRA.Game/Widgets/TextFieldWidget.cs +++ b/OpenRA.Game/Widgets/TextFieldWidget.cs @@ -90,9 +90,9 @@ namespace OpenRA.Widgets if (textSize.X > Bounds.Width - LeftMargin - RightMargin && HasKeyboardFocus) start += Bounds.Width - LeftMargin - RightMargin - textSize.X; - int minIndex = -1; - int minValue = int.MaxValue; - for (int i = 0; i <= apparentText.Length; i++) + var minIndex = -1; + var minValue = int.MaxValue; + for (var i = 0; i <= apparentText.Length; i++) { var dist = Math.Abs(start + font.Measure(apparentText.Substring(0, i)).X - x); if (dist > minValue) diff --git a/OpenRA.Game/Widgets/VqaPlayerWidget.cs b/OpenRA.Game/Widgets/VqaPlayerWidget.cs index 978182c6f1..cdc8a37d0b 100644 --- a/OpenRA.Game/Widgets/VqaPlayerWidget.cs +++ b/OpenRA.Game/Widgets/VqaPlayerWidget.cs @@ -68,7 +68,7 @@ namespace OpenRA.Widgets return; overlay = new uint[2*textureSize, 2*textureSize]; - uint black = (uint)255 << 24; + var black = (uint)255 << 24; for (var y = 0; y < video.Height; y++) for (var x = 0; x < video.Width; x++) overlay[2*y,x] = black; diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index 6df3dfdb54..c7634fd4c8 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -76,7 +76,7 @@ namespace OpenRA.Widgets if (mi.Event == MouseInputEvent.Move) MouseOverWidget = null; - bool handled = false; + var handled = false; if (MouseFocusWidget != null && MouseFocusWidget.HandleMouseInputOuter(mi)) handled = true; diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs index d9e230dfaf..6c4c264262 100644 --- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs @@ -212,7 +212,7 @@ namespace OpenRA.Widgets var selectedTypes = World.Selection.Actors.Where( x => x.Owner == World.RenderPlayer).Select(a => a.Info); Func cond = a => a.Owner == World.RenderPlayer && selectedTypes.Contains(a.Info); - IEnumerable newSelection = SelectActorsInBox( + var newSelection = SelectActorsInBox( World, worldRenderer.Viewport.TopLeft, worldRenderer.Viewport.BottomRight, cond); if (newSelection.Count() > selectedTypes.Count()) Game.Debug("Selected across screen"); diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index d0ffe74202..5ada365b07 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -277,8 +277,8 @@ namespace OpenRA { //using (new PerfSample("synchash")) { - int n = 0; - int ret = 0; + var n = 0; + var ret = 0; // hash all the actors foreach (var a in Actors) diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs index fc687b188b..6d79dc1d2b 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameMenuLogic.cs @@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic menu.Get("VERSION_LABEL").Text = Game.modData.Manifest.Mod.Version; - bool hideButtons = false; + var hideButtons = false; menu.Get("MENU_BUTTONS").IsVisible = () => !hideButtons; // TODO: Create a mechanism to do things like this cleaner. Also needed for scripted missions @@ -94,7 +94,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic // Menu panels - ordered from lowest to highest priority var panelParent = Game.OpenWindow(world, "INGAME_MENU_PANEL"); - PanelType panelType = PanelType.Objectives; + var panelType = PanelType.Objectives; var visibleButtons = 0; // Debug / Cheats panel diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs index e2432a4446..63f2c4cfc3 100644 --- a/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionTabsWidget.cs @@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Widgets public void Update(IEnumerable allQueues) { var queues = allQueues.Where(q => q.Info.Group == Group).ToList(); - List tabs = new List(); + var tabs = new List(); // Remove stale queues foreach (var t in Tabs) @@ -165,7 +165,7 @@ namespace OpenRA.Mods.Cnc.Widgets // Draw tab buttons Game.Renderer.EnableScissor(new Rectangle(leftButtonRect.Right, rb.Y + 1, rightButtonRect.Left - leftButtonRect.Right - 1, rb.Height)); var origin = new int2(leftButtonRect.Right - 1 + (int)listOffset, leftButtonRect.Y); - SpriteFont font = Game.Renderer.Fonts["TinyBold"]; + var font = Game.Renderer.Fonts["TinyBold"]; contentWidth = 0; foreach (var tab in Groups[queueGroup].Tabs) @@ -176,8 +176,8 @@ namespace OpenRA.Mods.Cnc.Widgets ButtonWidget.DrawBackground(baseName, rect, false, false, hover, false); contentWidth += TabWidth - 1; - int2 textSize = font.Measure(tab.Name); - int2 position = new int2(rect.X + (rect.Width - textSize.X) / 2, rect.Y + (rect.Height - textSize.Y) / 2); + var textSize = font.Measure(tab.Name); + var position = new int2(rect.X + (rect.Width - textSize.X) / 2, rect.Y + (rect.Height - textSize.Y) / 2); font.DrawTextWithContrast(tab.Name, position, tab.Queue.CurrentDone ? Color.Gold : Color.White, Color.Black, 1); } diff --git a/OpenRA.Mods.Cnc/WithCargo.cs b/OpenRA.Mods.Cnc/WithCargo.cs index dd88f52397..d3ac02eae9 100644 --- a/OpenRA.Mods.Cnc/WithCargo.cs +++ b/OpenRA.Mods.Cnc/WithCargo.cs @@ -57,7 +57,7 @@ namespace OpenRA.Mods.Cnc var bodyOrientation = body.QuantizeOrientation(self, self.Orientation); var pos = self.CenterPosition; - int i = 0; + var i = 0; foreach (var c in cargo.Passengers) { var cargoFacing = c.TraitOrDefault(); diff --git a/OpenRA.Mods.RA/AI/AttackOrFleeFuzzy.cs b/OpenRA.Mods.RA/AI/AttackOrFleeFuzzy.cs index 7b84fd9ef4..b8cbb12de8 100644 --- a/OpenRA.Mods.RA/AI/AttackOrFleeFuzzy.cs +++ b/OpenRA.Mods.RA/AI/AttackOrFleeFuzzy.cs @@ -192,7 +192,7 @@ namespace OpenRA.Mods.RA.AI { return RelativeValue(own, enemy, 100, SumOfValues, (Actor a) => { - int sumOfDamage = 0; + var sumOfDamage = 0; var arms = a.TraitsImplementing(); foreach (var arm in arms) if (arm.Weapon.Warheads[0] != null) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index f3a2b3768f..6c9ab973c2 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -360,7 +360,7 @@ namespace OpenRA.Mods.RA.AI switch (type) { case BuildingType.Defense: - Actor enemyBase = FindEnemyBuildingClosestToPos(baseCenter.CenterPosition); + var enemyBase = FindEnemyBuildingClosestToPos(baseCenter.CenterPosition); return enemyBase != null ? findPos(enemyBase.CenterPosition, defenseCenter) : null; case BuildingType.Refinery: @@ -783,9 +783,9 @@ namespace OpenRA.Mods.RA.AI var x = (world.Map.MapSize.X % radiusOfPower) == 0 ? world.Map.MapSize.X : world.Map.MapSize.X + radiusOfPower; var y = (world.Map.MapSize.Y % radiusOfPower) == 0 ? world.Map.MapSize.Y : world.Map.MapSize.Y + radiusOfPower; - for (int i = 0; i < x; i += radiusOfPower * 2) + for (var i = 0; i < x; i += radiusOfPower * 2) { - for (int j = 0; j < y; j += radiusOfPower * 2) + for (var j = 0; j < y; j += radiusOfPower * 2) { var pos = new CPos(i, j); var targets = world.FindActorsInCircle(pos.CenterPosition, WRange.FromCells(radiusOfPower)).ToList(); diff --git a/OpenRA.Mods.RA/AI/States/GroundStates.cs b/OpenRA.Mods.RA/AI/States/GroundStates.cs index b74640ba8d..8cd3da9f68 100644 --- a/OpenRA.Mods.RA/AI/States/GroundStates.cs +++ b/OpenRA.Mods.RA/AI/States/GroundStates.cs @@ -80,7 +80,7 @@ namespace OpenRA.Mods.RA.AI } } - Actor leader = owner.units.ClosestTo(owner.Target.CenterPosition); + var leader = owner.units.ClosestTo(owner.Target.CenterPosition); if (leader == null) return; var ownUnits = owner.world.FindActorsInCircle(leader.CenterPosition, WRange.FromCells(owner.units.Count) / 3) diff --git a/OpenRA.Mods.RA/Activities/FindResources.cs b/OpenRA.Mods.RA/Activities/FindResources.cs index 7d71cb5864..853c970201 100755 --- a/OpenRA.Mods.RA/Activities/FindResources.cs +++ b/OpenRA.Mods.RA/Activities/FindResources.cs @@ -47,8 +47,8 @@ namespace OpenRA.Mods.RA.Activities // Determine where to search from and how far to search: var searchFromLoc = harv.LastOrderLocation ?? (harv.LastLinkedProc ?? harv.LinkedProc ?? self).Location; - int searchRadius = harv.LastOrderLocation.HasValue ? harvInfo.SearchFromOrderRadius : harvInfo.SearchFromProcRadius; - int searchRadiusSquared = searchRadius * searchRadius; + var searchRadius = harv.LastOrderLocation.HasValue ? harvInfo.SearchFromOrderRadius : harvInfo.SearchFromProcRadius; + var searchRadiusSquared = searchRadius * searchRadius; // Find harvestable resources nearby: // Avoid enemy territory: @@ -64,7 +64,7 @@ namespace OpenRA.Mods.RA.Activities if (avoidCell.HasValue && loc == avoidCell.Value) return 1; // Don't harvest out of range: - int distSquared = (loc - searchFromLoc).LengthSquared; + var distSquared = (loc - searchFromLoc).LengthSquared; if (distSquared > searchRadiusSquared) return int.MaxValue; @@ -95,7 +95,7 @@ namespace OpenRA.Mods.RA.Activities { // Get out of the way if we are: harv.UnblockRefinery(self); - int randFrames = 125 + self.World.SharedRandom.Next(-35, 35); + var randFrames = 125 + self.World.SharedRandom.Next(-35, 35); if (NextActivity != null) return Util.SequenceActivities(NextActivity, new Wait(randFrames), new FindResources()); else diff --git a/OpenRA.Mods.RA/Activities/Teleport.cs b/OpenRA.Mods.RA/Activities/Teleport.cs index df12dc74fc..c5a81108b1 100755 --- a/OpenRA.Mods.RA/Activities/Teleport.cs +++ b/OpenRA.Mods.RA/Activities/Teleport.cs @@ -100,7 +100,7 @@ namespace OpenRA.Mods.RA.Activities return destination; var searched = new List(); - for (int r = 1; r <= maxCellSearchRange || (maximumDistance != null && r <= maximumDistance); r++) + for (var r = 1; r <= maxCellSearchRange || (maximumDistance != null && r <= maximumDistance); r++) { foreach (var tile in self.World.Map.FindTilesInCircle(destination, r).Except(searched)) { diff --git a/OpenRA.Mods.RA/Air/Helicopter.cs b/OpenRA.Mods.RA/Air/Helicopter.cs index 55e5eb04d0..4d0a446b27 100755 --- a/OpenRA.Mods.RA/Air/Helicopter.cs +++ b/OpenRA.Mods.RA/Air/Helicopter.cs @@ -136,7 +136,7 @@ namespace OpenRA.Mods.RA.Air .Select(h => GetRepulseForce(self, h)) .Aggregate(WVec.Zero, (a, b) => a + b); - int repulsionFacing = Util.GetFacing(f, -1); + var repulsionFacing = Util.GetFacing(f, -1); if (repulsionFacing != -1) SetPosition(self, CenterPosition + FlyStep(repulsionFacing)); } diff --git a/OpenRA.Mods.RA/BridgeLayer.cs b/OpenRA.Mods.RA/BridgeLayer.cs index d631aa092f..365b47459c 100644 --- a/OpenRA.Mods.RA/BridgeLayer.cs +++ b/OpenRA.Mods.RA/BridgeLayer.cs @@ -50,8 +50,8 @@ namespace OpenRA.Mods.RA } // Loop through the map looking for templates to overlay - for (int i = w.Map.Bounds.Left; i < w.Map.Bounds.Right; i++) - for (int j = w.Map.Bounds.Top; j < w.Map.Bounds.Bottom; j++) + for (var i = w.Map.Bounds.Left; i < w.Map.Bounds.Right; i++) + for (var j = w.Map.Bounds.Top; j < w.Map.Bounds.Bottom; j++) if (BridgeTypes.Keys.Contains(w.Map.MapTiles.Value[i, j].Type)) ConvertBridgeToActor(w, i, j); diff --git a/OpenRA.Mods.RA/Buildings/FootprintUtils.cs b/OpenRA.Mods.RA/Buildings/FootprintUtils.cs index aa9fb076df..f6c20667c6 100644 --- a/OpenRA.Mods.RA/Buildings/FootprintUtils.cs +++ b/OpenRA.Mods.RA/Buildings/FootprintUtils.cs @@ -48,10 +48,10 @@ namespace OpenRA.Mods.RA.Buildings { if( footprint.Length != dim.X * dim.Y ) throw new InvalidOperationException( "Invalid footprint for " + name ); - int index = 0; + var index = 0; - for( int y = 0 ; y < dim.Y ; y++ ) - for( int x = 0 ; x < dim.X ; x++ ) + for( var y = 0 ; y < dim.Y ; y++ ) + for( var x = 0 ; x < dim.X ; x++ ) if( cond( footprint[ index++ ] ) ) yield return new CVec(x, y); } diff --git a/OpenRA.Mods.RA/Buildings/Util.cs b/OpenRA.Mods.RA/Buildings/Util.cs index a3264c4dba..aca297f34d 100644 --- a/OpenRA.Mods.RA/Buildings/Util.cs +++ b/OpenRA.Mods.RA/Buildings/Util.cs @@ -52,9 +52,9 @@ namespace OpenRA.Mods.RA.Buildings // TODO: First make it work, then make it nice var vecs = new[] { new CVec(1, 0), new CVec(0, 1), new CVec(-1, 0), new CVec(0, -1) }; int[] dirs = { 0, 0, 0, 0 }; - for (int d = 0; d < 4; d++) + for (var d = 0; d < 4; d++) { - for (int i = 1; i < lbi.Range; i++) + for (var i = 1; i < lbi.Range; i++) { if (dirs[d] != 0) continue; @@ -76,7 +76,7 @@ namespace OpenRA.Mods.RA.Buildings // Place intermediate-line sections if (dirs[d] > 0) - for (int i = 1; i < dirs[d]; i++) + for (var i = 1; i < dirs[d]; i++) yield return topLeft + i * vecs[d]; } } diff --git a/OpenRA.Mods.RA/Cargo.cs b/OpenRA.Mods.RA/Cargo.cs index 37db6af460..d8dd2fd1f4 100644 --- a/OpenRA.Mods.RA/Cargo.cs +++ b/OpenRA.Mods.RA/Cargo.cs @@ -152,7 +152,7 @@ namespace OpenRA.Mods.RA { var numPips = Info.PipCount; - for (int i = 0; i < numPips; i++) + for (var i = 0; i < numPips; i++) yield return GetPipAt(i); } diff --git a/OpenRA.Mods.RA/Harvester.cs b/OpenRA.Mods.RA/Harvester.cs index 5fac26d754..254f7debb9 100644 --- a/OpenRA.Mods.RA/Harvester.cs +++ b/OpenRA.Mods.RA/Harvester.cs @@ -127,7 +127,7 @@ namespace OpenRA.Mods.RA { if (!refs.ContainsKey(loc)) return 0; - int occupancy = refs[loc].Occupancy; + var occupancy = refs[loc].Occupancy; // 4 harvesters clogs up the refinery's delivery location: if (occupancy >= 3) return int.MaxValue; @@ -410,9 +410,9 @@ namespace OpenRA.Mods.RA public IEnumerable GetPips(Actor self) { - int numPips = Info.PipCount; + var numPips = Info.PipCount; - for (int i = 0; i < numPips; i++) + for (var i = 0; i < numPips; i++) yield return GetPipAt(i); } diff --git a/OpenRA.Mods.RA/Move/Mobile.cs b/OpenRA.Mods.RA/Move/Mobile.cs index 931855b75a..b698758ec0 100755 --- a/OpenRA.Mods.RA/Move/Mobile.cs +++ b/OpenRA.Mods.RA/Move/Mobile.cs @@ -40,7 +40,7 @@ namespace OpenRA.Mods.RA.Move static object LoadSpeeds(MiniYaml y) { - Dictionary ret = new Dictionary(); + var ret = new Dictionary(); foreach (var t in y.ToDictionary()["TerrainSpeeds"].Nodes) { var speed = FieldLoader.GetValue("speed", t.Value.Value); @@ -165,8 +165,8 @@ namespace OpenRA.Mods.RA.Move if (checkTransientActors) { - bool canIgnoreMovingAllies = self != null && !blockedByMovers; - bool needsCellExclusively = self == null || Crushes == null; + var canIgnoreMovingAllies = self != null && !blockedByMovers; + var needsCellExclusively = self == null || Crushes == null; foreach(var a in world.ActorMap.GetUnitsAt(cell)) { if (a == ignoreActor) continue; @@ -323,7 +323,7 @@ namespace OpenRA.Mods.RA.Move var searched = new List(); // Limit search to a radius of 10 tiles - for (int r = minRange; r < maxRange; r++) + for (var r = minRange; r < maxRange; r++) { foreach (var tile in self.World.Map.FindTilesInCircle(target, r).Except(searched)) { @@ -344,7 +344,7 @@ namespace OpenRA.Mods.RA.Move return target; var searched = new List(); - for (int r = minRange; r < maxRange; r++) + for (var r = minRange; r < maxRange; r++) { foreach (var tile in self.World.Map.FindTilesInCircle(target, r).Except(searched)) { diff --git a/OpenRA.Mods.RA/Move/Move.cs b/OpenRA.Mods.RA/Move/Move.cs index 260bb47fa5..cd0e716037 100755 --- a/OpenRA.Mods.RA/Move/Move.cs +++ b/OpenRA.Mods.RA/Move/Move.cs @@ -93,8 +93,8 @@ namespace OpenRA.Mods.RA.Move static int HashList(List xs) { - int hash = 0; - int n = 0; + var hash = 0; + var n = 0; foreach (var x in xs) hash += n++ * x.GetHashCode(); diff --git a/OpenRA.Mods.RA/Move/PathFinder.cs b/OpenRA.Mods.RA/Move/PathFinder.cs index 52e3ebfa80..bbf4a3ad39 100755 --- a/OpenRA.Mods.RA/Move/PathFinder.cs +++ b/OpenRA.Mods.RA/Move/PathFinder.cs @@ -152,7 +152,7 @@ namespace OpenRA.Mods.RA.Move static List MakePath(CellInfo[,] cellInfo, CPos destination) { var ret = new List(); - CPos pathNode = destination; + var pathNode = destination; while (cellInfo[pathNode.X, pathNode.Y].Path != pathNode) { @@ -248,7 +248,7 @@ namespace OpenRA.Mods.RA.Move if (path.Count == 0) return; var prev = path[0]; - for (int i = 0; i < path.Count; i++) + for (var i = 0; i < path.Count; i++) { var d = path[i] - prev; if (Math.Abs(d.X) > 1 || Math.Abs(d.Y) > 1) diff --git a/OpenRA.Mods.RA/Move/PathSearch.cs b/OpenRA.Mods.RA/Move/PathSearch.cs index 9036463986..b453a00a26 100755 --- a/OpenRA.Mods.RA/Move/PathSearch.cs +++ b/OpenRA.Mods.RA/Move/PathSearch.cs @@ -108,7 +108,7 @@ namespace OpenRA.Mods.RA.Move if (customCost != null) { - int c = customCost(p.Location); + var c = customCost(p.Location); if (c == int.MaxValue) return p.Location; } @@ -116,12 +116,12 @@ namespace OpenRA.Mods.RA.Move // This current cell is ok; check all immediate directions: considered.Add(p.Location); - for (int i = 0; i < nextDirections.Length; ++i) + for (var i = 0; i < nextDirections.Length; ++i) { - CVec d = nextDirections[i].First; + var d = nextDirections[i].First; nextDirections[i].Second = int.MaxValue; - CPos newHere = p.Location + d; + var newHere = p.Location + d; // Is this direction flat-out unusable or already seen? if (!world.Map.IsInMap(newHere.X, newHere.Y)) @@ -145,10 +145,10 @@ namespace OpenRA.Mods.RA.Move if (est == int.MaxValue) continue; - int cellCost = costHere; + var cellCost = costHere; if (d.X * d.Y != 0) cellCost = (cellCost * 34) / 24; - int userCost = 0; + var userCost = 0; if (customCost != null) { userCost = customCost(newHere); @@ -167,7 +167,7 @@ namespace OpenRA.Mods.RA.Move else if (uy == 1 && d.X > 0) cellCost += LaneBias; } - int newCost = cellInfo[p.Location.X, p.Location.Y].MinCost + cellCost; + var newCost = cellInfo[p.Location.X, p.Location.Y].MinCost + cellCost; // Cost is even higher; next direction: if (newCost > cellInfo[newHere.X, newHere.Y].MinCost) @@ -267,8 +267,8 @@ namespace OpenRA.Mods.RA.Move if (result == null) result = new CellInfo[world.Map.MapSize.X, world.Map.MapSize.Y]; - for (int x = 0; x < world.Map.MapSize.X; x++) - for (int y = 0; y < world.Map.MapSize.Y; y++) + for (var x = 0; x < world.Map.MapSize.X; x++) + for (var y = 0; y < world.Map.MapSize.Y; y++) result[ x, y ] = new CellInfo( int.MaxValue, new CPos( x, y ), false ); return result; @@ -278,9 +278,9 @@ namespace OpenRA.Mods.RA.Move { return here => { - int diag = Math.Min(Math.Abs(here.X - destination.X), Math.Abs(here.Y - destination.Y)); - int straight = (Math.Abs(here.X - destination.X) + Math.Abs(here.Y - destination.Y)); - int h = (3400 * diag / 24) + 100 * (straight - (2 * diag)); + var diag = Math.Min(Math.Abs(here.X - destination.X), Math.Abs(here.Y - destination.Y)); + var straight = (Math.Abs(here.X - destination.X) + Math.Abs(here.Y - destination.Y)); + var h = (3400 * diag / 24) + 100 * (straight - (2 * diag)); h = (int)(h * 1.001); return h; }; diff --git a/OpenRA.Mods.RA/Player/PlaceBuilding.cs b/OpenRA.Mods.RA/Player/PlaceBuilding.cs index 8624a5bbd4..abd3b176fe 100644 --- a/OpenRA.Mods.RA/Player/PlaceBuilding.cs +++ b/OpenRA.Mods.RA/Player/PlaceBuilding.cs @@ -45,7 +45,7 @@ namespace OpenRA.Mods.RA if (order.OrderString == "LineBuild") { - bool playSounds = true; + var playSounds = true; foreach (var t in BuildingUtils.GetLineBuildCells(w, order.TargetLocation, order.TargetString, buildingInfo)) { var building = w.CreateActor(order.TargetString, new TypeDictionary diff --git a/OpenRA.Mods.RA/Player/ProductionQueue.cs b/OpenRA.Mods.RA/Player/ProductionQueue.cs index 79c7f0cd70..46fb2eb5d4 100644 --- a/OpenRA.Mods.RA/Player/ProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ProductionQueue.cs @@ -246,7 +246,7 @@ namespace OpenRA.Mods.RA for (var n = 0; n < amountToBuild; n++) // repeat count { - bool hasPlayedSound = false; + var hasPlayedSound = false; BeginProduction(new ProductionItem(this, order.TargetString, cost, PlayerPower, () => self.World.AddFrameEndTask(_ => { diff --git a/OpenRA.Mods.RA/PortableChrono.cs b/OpenRA.Mods.RA/PortableChrono.cs index 65370b6dbe..6f8f9d6489 100644 --- a/OpenRA.Mods.RA/PortableChrono.cs +++ b/OpenRA.Mods.RA/PortableChrono.cs @@ -96,7 +96,7 @@ namespace OpenRA.Mods.RA public IEnumerable GetPips(Actor self) { const int numPips = 2; - for (int i = 0; i < numPips; i++) + for (var i = 0; i < numPips; i++) { if ((1 - chargeTick * 1.0f / (25 * Info.ChargeTime)) * numPips < i + 1) { diff --git a/OpenRA.Mods.RA/Scripting/Global/TriggerGlobal.cs b/OpenRA.Mods.RA/Scripting/Global/TriggerGlobal.cs index 39db102b9b..9ed2f74738 100644 --- a/OpenRA.Mods.RA/Scripting/Global/TriggerGlobal.cs +++ b/OpenRA.Mods.RA/Scripting/Global/TriggerGlobal.cs @@ -77,7 +77,7 @@ namespace OpenRA.Mods.RA.Scripting "function will be called as func().")] public void OnAllKilled(LuaTable actors, LuaFunction func) { - List group = new List(); + var group = new List(); foreach (var kv in actors) { Actor actor; diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index 7044c34134..c1e1666ab7 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -314,7 +314,7 @@ namespace OpenRA.Mods.RA.Server // - Players who now lack a slot are made observers // - Bots who now lack a slot are dropped var slots = server.LobbyInfo.Slots.Keys.ToArray(); - int i = 0; + var i = 0; foreach (var os in oldSlots) { var c = server.LobbyInfo.ClientInSlot(os); diff --git a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs index d6394aa99d..39fddf7d71 100644 --- a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs +++ b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs @@ -71,7 +71,7 @@ namespace OpenRA.Mods.RA Actor flare = null; Actor camera = null; Beacon beacon = null; - Dictionary aircraftInRange = new Dictionary(); + var aircraftInRange = new Dictionary(); Action onEnterRange = a => { diff --git a/OpenRA.Mods.RA/SupportPowers/GpsPower.cs b/OpenRA.Mods.RA/SupportPowers/GpsPower.cs index 9fbc2f3ea3..ded8887883 100755 --- a/OpenRA.Mods.RA/SupportPowers/GpsPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/GpsPower.cs @@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA { RefreshGranted(); - foreach (TraitPair i in atek.World.ActorsWithTrait()) + foreach (var i in atek.World.ActorsWithTrait()) i.Trait.RefreshGranted(); if ((Granted || GrantedAllies) && atek.Owner.IsAlliedWith(atek.World.RenderPlayer)) diff --git a/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs b/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs index a5e93fde86..4f7fbe5057 100644 --- a/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs @@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA public IEnumerable UnitsInRange(CPos xy) { - int range = ((IronCurtainPowerInfo)Info).Range; + var range = ((IronCurtainPowerInfo)Info).Range; var tiles = self.World.Map.FindTilesInCircle(xy, range); var units = new List(); foreach (var t in tiles) diff --git a/OpenRA.Mods.RA/VoxelNormalsPalette.cs b/OpenRA.Mods.RA/VoxelNormalsPalette.cs index ea102f67ab..fdf9287932 100644 --- a/OpenRA.Mods.RA/VoxelNormalsPalette.cs +++ b/OpenRA.Mods.RA/VoxelNormalsPalette.cs @@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA for (var i = 0; i < n.Length / 3; i++) { data[i] = 0xFF000000; - for (int j = 0; j < 3; j++) + for (var j = 0; j < 3; j++) { var t = (n[3*i + j] + 1) / 2; data[i] |= (uint)((byte)(t*0xFF + 0.5) << (8*channel[j])); diff --git a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs index bfa5c1a9a5..c980046e64 100644 --- a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs +++ b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs @@ -203,8 +203,8 @@ namespace OpenRA.Mods.RA.Widgets { buttons.Clear(); - string paletteCollection = "palette-" + world.LocalPlayer.Country.Race; - float2 origin = new float2(paletteOrigin.X + 9, paletteOrigin.Y + 9); + var paletteCollection = "palette-" + world.LocalPlayer.Country.Race; + var origin = new float2(paletteOrigin.X + 9, paletteOrigin.Y + 9); var iconOffset = 0.5f * new float2(IconWidth, IconHeight); var x = 0; var y = 0; @@ -296,7 +296,7 @@ namespace OpenRA.Mods.RA.Widgets WidgetUtils.DrawRGBA(ChromeProvider.GetImage(paletteCollection, "dock-top"), new float2(Game.Renderer.Resolution.Width - 14, origin.Y - 23)); - for (int i = 0; i < numActualRows; i++) + for (var i = 0; i < numActualRows; i++) WidgetUtils.DrawRGBA(ChromeProvider.GetImage(paletteCollection, "dock-" + (i % 4)), new float2(Game.Renderer.Resolution.Width - 14, origin.Y + IconHeight * i)); @@ -401,7 +401,7 @@ namespace OpenRA.Mods.RA.Widgets if (producing.Paused || producing.Done || producing.TotalCost == producing.RemainingCost) { Sound.PlayNotification(world.Map.Rules, world.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, world.LocalPlayer.Country.Race); - int numberToCancel = Game.GetModifierKeys().HasModifier(Modifiers.Shift) ? 5 : 1; + var numberToCancel = Game.GetModifierKeys().HasModifier(Modifiers.Shift) ? 5 : 1; world.IssueOrder(Order.CancelProduction(CurrentQueue.self, item, numberToCancel)); } diff --git a/OpenRA.Mods.RA/Widgets/HueSliderWidget.cs b/OpenRA.Mods.RA/Widgets/HueSliderWidget.cs index 9ab486855c..bd50749b66 100755 --- a/OpenRA.Mods.RA/Widgets/HueSliderWidget.cs +++ b/OpenRA.Mods.RA/Widgets/HueSliderWidget.cs @@ -34,7 +34,7 @@ namespace OpenRA.Mods.RA.Widgets ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); unsafe { - int* c = (int*)bitmapData.Scan0; + var c = (int*)bitmapData.Scan0; for (var h = 0; h < 256; h++) *(c + h) = HSLColor.FromHSV(h / 255f, 1, 1).RGB.ToArgb(); } diff --git a/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs index 9cdef7181c..2348c86bd6 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs @@ -158,7 +158,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic template.Bounds.Height += dh; } - bool scrolledToBottom = chatScrollPanel.ScrolledToBottom; + var scrolledToBottom = chatScrollPanel.ScrolledToBottom; chatScrollPanel.AddChild(template); if (scrolledToBottom) chatScrollPanel.ScrollToBottom(); diff --git a/OpenRA.Mods.RA/Widgets/Logic/IngameChromeLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IngameChromeLogic.cs index ffeb748105..5bae5362b1 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/IngameChromeLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/IngameChromeLogic.cs @@ -89,7 +89,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic }); var diplomacyButton = playerWidgets.Get("INGAME_DIPLOMACY_BUTTON"); diplomacyButton.OnClick = () => diplomacy.Visible ^= true; - int validPlayers = 0; + var validPlayers = 0; validPlayers = world.Players.Where(a => a != world.LocalPlayer && !a.NonCombatant).Count(); diplomacyButton.IsVisible = () => validPlayers > 0; @@ -111,8 +111,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic objectivesButton.OnClick += () => objectivesWidget.Visible ^= true; } - bool radarActive = false; - RadarBinState binState = RadarBinState.Closed; + var radarActive = false; + var binState = RadarBinState.Closed; var radarBin = playerWidgets.Get("INGAME_RADAR_BIN"); radarBin.IsOpen = () => radarActive || binState > RadarBinState.BinAnimating; radarBin.AfterOpen = () => binState = RadarBinState.RadarAnimating; diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs index 430ed5d044..bf47bd7eed 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs @@ -479,7 +479,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic if (skirmishMode) disconnectButton.Text = "Cancel"; - bool teamChat = false; + var teamChat = false; var chatLabel = lobby.Get("LABEL_CHATTYPE"); var chatTextField = lobby.Get("CHAT_TEXTFIELD"); diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs index 59700a08af..bb52a6dc28 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs @@ -354,7 +354,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic { before(); - int spectatorCount = orderManager.LobbyInfo.Clients.Count(c => c.IsObserver); + var spectatorCount = orderManager.LobbyInfo.Clients.Count(c => c.IsObserver); if (spectatorCount > 0) { Game.LoadWidget(null, "KICK_SPECTATORS_DIALOG", lobby, new WidgetArgs diff --git a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs index 655ed60f61..5a5c8066c8 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs @@ -147,7 +147,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic if (games == null) return; - List rows = new List(); + var rows = new List(); foreach (var loop in games.OrderByDescending(g => g.CanJoin()).ThenByDescending(g => g.Players)) { diff --git a/OpenRA.Mods.RA/Widgets/StrategicProgressWidget.cs b/OpenRA.Mods.RA/Widgets/StrategicProgressWidget.cs index f39732ca47..b7eb6ea977 100644 --- a/OpenRA.Mods.RA/Widgets/StrategicProgressWidget.cs +++ b/OpenRA.Mods.RA/Widgets/StrategicProgressWidget.cs @@ -76,7 +76,7 @@ namespace OpenRA.Mods.RA.Widgets public Player FindFirstWinningPlayer(World world) { // loop through all players, see who is 'winning' and get the one with the shortest 'time to win' - int shortest = int.MaxValue; + var shortest = int.MaxValue; Player shortestPlayer = null; foreach (var p in world.Players.Where(p => !p.NonCombatant)) diff --git a/OpenRA.Mods.RA/World/DomainIndex.cs b/OpenRA.Mods.RA/World/DomainIndex.cs index b46fcda0c1..2c7def6793 100644 --- a/OpenRA.Mods.RA/World/DomainIndex.cs +++ b/OpenRA.Mods.RA/World/DomainIndex.cs @@ -141,7 +141,7 @@ namespace OpenRA.Mods.RA if (!transientConnections.ContainsKey(current)) continue; - foreach (int neighbor in transientConnections[current]) + foreach (var neighbor in transientConnections[current]) { if (neighbor == d2) return true; diff --git a/OpenRA.Renderer.Sdl2/ErrorHandler.cs b/OpenRA.Renderer.Sdl2/ErrorHandler.cs index a34774103d..e3c1b49f7e 100644 --- a/OpenRA.Renderer.Sdl2/ErrorHandler.cs +++ b/OpenRA.Renderer.Sdl2/ErrorHandler.cs @@ -21,11 +21,11 @@ namespace OpenRA.Renderer.Sdl2 var versionString = GL.GetString(StringName.Version); var version = versionString.Contains(" ") ? versionString.Split(' ')[0].Split('.') : versionString.Split('.'); - int major = 0; + var major = 0; if (version.Length > 0) int.TryParse(version[0], out major); - int minor = 0; + var minor = 0; if (version.Length > 1) int.TryParse(version[1], out minor); diff --git a/OpenRA.Renderer.Sdl2/Shader.cs b/OpenRA.Renderer.Sdl2/Shader.cs index 69ae143694..b1ea92beb2 100644 --- a/OpenRA.Renderer.Sdl2/Shader.cs +++ b/OpenRA.Renderer.Sdl2/Shader.cs @@ -80,7 +80,7 @@ namespace OpenRA.Renderer.Sdl2 GL.GetProgram(program, ProgramParameter.ActiveUniforms, out numUniforms); ErrorHandler.CheckGlError(); - int nextTexUnit = 0; + var nextTexUnit = 0; for (var i = 0; i < numUniforms; i++) { int length, size; diff --git a/OpenRA.Renderer.Sdl2/Texture.cs b/OpenRA.Renderer.Sdl2/Texture.cs index 40337a56fc..8590a6242e 100644 --- a/OpenRA.Renderer.Sdl2/Texture.cs +++ b/OpenRA.Renderer.Sdl2/Texture.cs @@ -71,7 +71,7 @@ namespace OpenRA.Renderer.Sdl2 { fixed (byte* ptr = &colors[0]) { - IntPtr intPtr = new IntPtr((void*)ptr); + var intPtr = new IntPtr((void*)ptr); PrepareTexture(); GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba8, width, height, 0, OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, intPtr); @@ -83,8 +83,8 @@ namespace OpenRA.Renderer.Sdl2 // An array of RGBA public void SetData(uint[,] colors) { - int width = colors.GetUpperBound(1) + 1; - int height = colors.GetUpperBound(0) + 1; + var width = colors.GetUpperBound(1) + 1; + var height = colors.GetUpperBound(0) + 1; if (!Exts.IsPowerOf2(width) || !Exts.IsPowerOf2(height)) throw new InvalidDataException("Non-power-of-two array {0}x{1}".F(width, height)); @@ -94,7 +94,7 @@ namespace OpenRA.Renderer.Sdl2 { fixed (uint* ptr = &colors[0, 0]) { - IntPtr intPtr = new IntPtr((void*)ptr); + var intPtr = new IntPtr((void*)ptr); PrepareTexture(); GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba8, width, height, 0, OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, intPtr); @@ -105,7 +105,7 @@ namespace OpenRA.Renderer.Sdl2 public void SetData(Bitmap bitmap) { - bool allocatedBitmap = false; + var allocatedBitmap = false; if (!Exts.IsPowerOf2(bitmap.Width) || !Exts.IsPowerOf2(bitmap.Height)) { bitmap = new Bitmap(bitmap, bitmap.Size.NextPowerOf2()); @@ -140,7 +140,7 @@ namespace OpenRA.Renderer.Sdl2 { fixed (byte* ptr = &data[0]) { - IntPtr intPtr = new IntPtr((void*)ptr); + var intPtr = new IntPtr((void*)ptr); GL.GetTexImage(TextureTarget.Texture2D, 0, OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, intPtr); } } diff --git a/OpenRA.TilesetBuilder/FormBuilder.cs b/OpenRA.TilesetBuilder/FormBuilder.cs index 299c04b02f..99c2410197 100644 --- a/OpenRA.TilesetBuilder/FormBuilder.cs +++ b/OpenRA.TilesetBuilder/FormBuilder.cs @@ -78,13 +78,13 @@ namespace OpenRA.TilesetBuilder public FormBuilder(string src, string tsize, bool autoExport, string outputDir) { InitializeComponent(); - Dictionary terrainDefinition = new Dictionary(); + var terrainDefinition = new Dictionary(); - int size = int.Parse(tsize); + var size = int.Parse(tsize); var yaml = MiniYaml.DictFromFile("OpenRA.TilesetBuilder/defaults.yaml"); terrainDefinition = yaml["Terrain"].ToDictionary().Values.Select(y => new TerrainTypeInfo(y)).ToDictionary(t => t.Type); - int i = 0; + var i = 0; surface1.Icon = new Bitmap[terrainDefinition.Keys.Count]; TerrainType = new TerrainTypeInfo[terrainDefinition.Keys.Count]; @@ -104,7 +104,7 @@ namespace OpenRA.TilesetBuilder { for (var y = 0; y < icon.Height; y++) { - Color newColor = deftype.Value.Color; + var newColor = deftype.Value.Color; icon.SetPixel(x, y, newColor); } } @@ -277,7 +277,7 @@ namespace OpenRA.TilesetBuilder bw.Write((uint)0); // walk start bw.Write((uint)0); // index start - Bitmap src = surface1.Image.Clone(new Rectangle(0, 0, surface1.Image.Width, surface1.Image.Height), + var src = surface1.Image.Clone(new Rectangle(0, 0, surface1.Image.Width, surface1.Image.Height), surface1.Image.PixelFormat); var data = src.LockBits(new Rectangle(0, 0, src.Width, src.Height), @@ -285,14 +285,14 @@ namespace OpenRA.TilesetBuilder unsafe { - byte* p = (byte*)data.Scan0; + var p = (byte*)data.Scan0; for (var v = 0; v < t.Height; v++) for (var u = 0; u < t.Width; u++) { if (t.Cells.ContainsKey(new int2(u + t.Left, v + t.Top))) { - byte* q = p + data.Stride * tileSize * (v + t.Top) + tileSize * (u + t.Left); + var q = p + data.Stride * tileSize * (v + t.Top) + tileSize * (u + t.Left); for (var j = 0; j < tileSize; j++) for (var i = 0; i < tileSize; i++) { @@ -372,7 +372,7 @@ namespace OpenRA.TilesetBuilder ); // List of files to add to the mix file - List fileList = new List(); + var fileList = new List(); // Export palette (use the embedded palette) var p = surface1.Image.Palette.Entries.ToList(); @@ -389,7 +389,7 @@ namespace OpenRA.TilesetBuilder var tiles = new int[tp.Width * tp.Height]; foreach (var t in tp.Cells) { - string ttype = TerrainType[surface1.TerrainTypes[t.Key.X, t.Key.Y]].Type; + var ttype = TerrainType[surface1.TerrainTypes[t.Key.X, t.Key.Y]].Type; var idx = (t.Key.X - tp.Left) + tp.Width * (t.Key.Y - tp.Top); tiles[idx] = tileset.GetTerrainIndex(ttype); } diff --git a/OpenRA.TilesetBuilder/Surface.cs b/OpenRA.TilesetBuilder/Surface.cs index 00f06f38ec..df254baf73 100644 --- a/OpenRA.TilesetBuilder/Surface.cs +++ b/OpenRA.TilesetBuilder/Surface.cs @@ -70,7 +70,7 @@ namespace OpenRA.TilesetBuilder /* draw template outlines */ foreach (var t in Templates) { - System.Drawing.Pen pen = Pens.White; + var pen = Pens.White; foreach (var c in t.Cells.Keys) { diff --git a/OpenRA.Utility/Command.cs b/OpenRA.Utility/Command.cs index 479b6f28c5..96fb4e16ee 100644 --- a/OpenRA.Utility/Command.cs +++ b/OpenRA.Utility/Command.cs @@ -193,7 +193,7 @@ namespace OpenRA.Utility GlobalFileSystem.LoadFromManifest(Game.modData.Manifest); var srcRules = Game.modData.RulesetCache.LoadDefaultRules(); var srcPaletteInfo = srcRules.Actors["player"].Traits.Get(); - int[] srcRemapIndex = srcPaletteInfo.RemapIndex; + var srcRemapIndex = srcPaletteInfo.RemapIndex; var destMod = args[2].Split(':')[0]; Game.modData = new ModData(destMod); @@ -400,7 +400,7 @@ namespace OpenRA.Utility Console.WriteLine("", name); foreach (var m in members.OrderBy(m => m.Name)) { - string desc = m.HasAttribute() ? m.GetCustomAttributes(true).First().Lines.JoinWith("\n") : ""; + var desc = m.HasAttribute() ? m.GetCustomAttributes(true).First().Lines.JoinWith("\n") : ""; Console.WriteLine("".F(m.LuaDocString(), desc)); } Console.WriteLine("
{0}
{0}{1}
"); diff --git a/OpenRA.Utility/LegacyMapImporter.cs b/OpenRA.Utility/LegacyMapImporter.cs index c17c862e9d..e1a5aa359e 100644 --- a/OpenRA.Utility/LegacyMapImporter.cs +++ b/OpenRA.Utility/LegacyMapImporter.cs @@ -210,7 +210,7 @@ namespace OpenRA.Utility static MemoryStream ReadPackedSection(IniSection mapPackSection) { var sb = new StringBuilder(); - for (int i = 1;; i++) + for (var i = 1;; i++) { var line = mapPackSection.GetValue(i.ToString(), null); if (line == null) @@ -250,27 +250,27 @@ namespace OpenRA.Utility void UnpackRATileData(MemoryStream ms) { - for (int i = 0; i < mapSize; i++) - for (int j = 0; j < mapSize; j++) + for (var i = 0; i < mapSize; i++) + for (var j = 0; j < mapSize; j++) map.MapTiles.Value[i, j] = new TileReference(); - for (int j = 0; j < mapSize; j++) - for (int i = 0; i < mapSize; i++) + for (var j = 0; j < mapSize; j++) + for (var i = 0; i < mapSize; i++) { var tileID = ms.ReadUInt16(); map.MapTiles.Value[i, j].Type = tileID == (ushort)0 ? (ushort)255 : tileID; // RAED weirdness } - for (int j = 0; j < mapSize; j++) - for (int i = 0; i < mapSize; i++) + for (var j = 0; j < mapSize; j++) + for (var i = 0; i < mapSize; i++) map.MapTiles.Value[i, j].Index = ms.ReadUInt8(); } void UnpackRAOverlayData(MemoryStream ms) { - for (int j = 0; j < mapSize; j++) + for (var j = 0; j < mapSize; j++) { - for (int i = 0; i < mapSize; i++) + for (var i = 0; i < mapSize; i++) { var o = ms.ReadUInt8(); var res = Pair.New((byte)0, (byte)0); @@ -299,7 +299,7 @@ namespace OpenRA.Utility if (terrain == null) return; - foreach (KeyValuePair kv in terrain) + foreach (var kv in terrain) { var loc = Exts.ParseIntegerInvariant(kv.Key); map.Actors.Value.Add("Actor" + actorCount++, @@ -313,13 +313,13 @@ namespace OpenRA.Utility void UnpackCncTileData(Stream ms) { - for (int i = 0; i < mapSize; i++) - for (int j = 0; j < mapSize; j++) + for (var i = 0; i < mapSize; i++) + for (var j = 0; j < mapSize; j++) map.MapTiles.Value[i, j] = new TileReference(); - for (int j = 0; j < mapSize; j++) + for (var j = 0; j < mapSize; j++) { - for (int i = 0; i < mapSize; i++) + for (var i = 0; i < mapSize; i++) { map.MapTiles.Value[i, j].Type = ms.ReadUInt8(); map.MapTiles.Value[i, j].Index = ms.ReadUInt8(); @@ -333,7 +333,7 @@ namespace OpenRA.Utility if (overlay == null) return; - foreach (KeyValuePair kv in overlay) + foreach (var kv in overlay) { var loc = Exts.ParseIntegerInvariant(kv.Key); var cell = new CPos(loc % mapSize, loc / mapSize); @@ -360,7 +360,7 @@ namespace OpenRA.Utility if (terrain == null) return; - foreach (KeyValuePair kv in terrain) + foreach (var kv in terrain) { var loc = Exts.ParseIntegerInvariant(kv.Key); map.Actors.Value.Add("Actor" + actorCount++, diff --git a/OpenRA.Utility/UpgradeRules.cs b/OpenRA.Utility/UpgradeRules.cs index 1e20f3b236..4819f2489b 100644 --- a/OpenRA.Utility/UpgradeRules.cs +++ b/OpenRA.Utility/UpgradeRules.cs @@ -315,7 +315,7 @@ namespace OpenRA.Utility static void UpgradeTileset(int engineVersion, ref List nodes, MiniYamlNode parent, int depth) { var parentKey = parent != null ? parent.Key.Split('@').First() : null; - List addNodes = new List(); + var addNodes = new List(); foreach (var node in nodes) {