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