From afda1647fdf7b81654a4650a7e1bd0638a3adc17 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 20 Sep 2010 21:17:50 +1200 Subject: [PATCH] moved more traits from engine into mods --- OpenRA.Game/OpenRA.Game.csproj | 11 +++----- OpenRA.Game/Traits/SharesCell.cs | 0 OpenRA.Game/Traits/Valued.cs | 23 +++++++++++++++++ OpenRA.Game/Traits/World/BibLayer.cs | 0 OpenRA.Mods.Cnc/IonCannonPower.cs | 1 + OpenRA.Mods.RA/BridgeLayer.cs | 2 +- .../Traits => OpenRA.Mods.RA}/Buildable.cs | 25 ++++--------------- .../MPStartLocations.cs | 15 +++++------ OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 6 +++++ .../ProvidesRadar.cs | 3 ++- .../SupportPowers}/SupportPower.cs | 3 ++- .../Traits => OpenRA.Mods.RA}/Turreted.cs | 4 ++- .../World/SmudgeLayer.cs | 5 ++-- 13 files changed, 57 insertions(+), 41 deletions(-) mode change 100644 => 100755 OpenRA.Game/Traits/SharesCell.cs create mode 100755 OpenRA.Game/Traits/Valued.cs mode change 100644 => 100755 OpenRA.Game/Traits/World/BibLayer.cs rename {OpenRA.Game/Traits => OpenRA.Mods.RA}/Buildable.cs (62%) rename {OpenRA.Game/Traits => OpenRA.Mods.RA}/MPStartLocations.cs (97%) mode change 100644 => 100755 rename {OpenRA.Game/Traits => OpenRA.Mods.RA}/ProvidesRadar.cs (92%) mode change 100644 => 100755 rename {OpenRA.Game/Traits => OpenRA.Mods.RA/SupportPowers}/SupportPower.cs (95%) mode change 100644 => 100755 rename {OpenRA.Game/Traits => OpenRA.Mods.RA}/Turreted.cs (92%) mode change 100644 => 100755 rename {OpenRA.Game/Traits => OpenRA.Mods.RA}/World/SmudgeLayer.cs (96%) mode change 100644 => 100755 diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index 55dd4ebe72..46e8e670aa 100755 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -153,19 +153,15 @@ - - - - @@ -185,8 +181,6 @@ - - @@ -194,7 +188,6 @@ - @@ -212,7 +205,6 @@ - @@ -234,6 +226,9 @@ + + + diff --git a/OpenRA.Game/Traits/SharesCell.cs b/OpenRA.Game/Traits/SharesCell.cs old mode 100644 new mode 100755 diff --git a/OpenRA.Game/Traits/Valued.cs b/OpenRA.Game/Traits/Valued.cs new file mode 100755 index 0000000000..ecde8885ea --- /dev/null +++ b/OpenRA.Game/Traits/Valued.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OpenRA.Traits +{ + public class ValuedInfo : TraitInfo + { + public readonly int Cost = 0; + } + + public class TooltipInfo : TraitInfo + { + public readonly string Description = ""; + public readonly string Name = ""; + public readonly string Icon = null; + public readonly string[] AlternateName = { }; + } + + public class Valued { } + public class Tooltip { } +} diff --git a/OpenRA.Game/Traits/World/BibLayer.cs b/OpenRA.Game/Traits/World/BibLayer.cs old mode 100644 new mode 100755 diff --git a/OpenRA.Mods.Cnc/IonCannonPower.cs b/OpenRA.Mods.Cnc/IonCannonPower.cs index 7da305e20d..ccd8f97230 100644 --- a/OpenRA.Mods.Cnc/IonCannonPower.cs +++ b/OpenRA.Mods.Cnc/IonCannonPower.cs @@ -9,6 +9,7 @@ #endregion using OpenRA.Mods.Cnc.Effects; +using OpenRA.Mods.RA; using OpenRA.Orders; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/BridgeLayer.cs b/OpenRA.Mods.RA/BridgeLayer.cs index b44f220fff..7dea62f778 100644 --- a/OpenRA.Mods.RA/BridgeLayer.cs +++ b/OpenRA.Mods.RA/BridgeLayer.cs @@ -10,8 +10,8 @@ using System.Collections.Generic; using System.Linq; -using OpenRA.Traits; using OpenRA.FileFormats; +using OpenRA.Traits; namespace OpenRA.Mods.RA { diff --git a/OpenRA.Game/Traits/Buildable.cs b/OpenRA.Mods.RA/Buildable.cs similarity index 62% rename from OpenRA.Game/Traits/Buildable.cs rename to OpenRA.Mods.RA/Buildable.cs index 35fd571c4c..f862384815 100755 --- a/OpenRA.Game/Traits/Buildable.cs +++ b/OpenRA.Mods.RA/Buildable.cs @@ -6,25 +6,12 @@ * as published by the Free Software Foundation. For more information, * see LICENSE. */ -#endregion - -namespace OpenRA.Traits -{ - public class ValuedInfo : ITraitInfo - { - public readonly int Cost = 0; - public object Create(ActorInitializer init) { return new Valued(); } - } +#endregion - public class TooltipInfo : ITraitInfo - { - public readonly string Description = ""; - public readonly string Name = ""; - public readonly string Icon = null; - public readonly string[] AlternateName = { }; - public object Create(ActorInitializer init) { return new Tooltip(); } - } - +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ public class BuildableInfo : ITraitInfo { [ActorReference] @@ -43,7 +30,5 @@ namespace OpenRA.Traits public object Create(ActorInitializer init) { return new Buildable(); } } - class Valued { } class Buildable { } - class Tooltip { } } diff --git a/OpenRA.Game/Traits/MPStartLocations.cs b/OpenRA.Mods.RA/MPStartLocations.cs old mode 100644 new mode 100755 similarity index 97% rename from OpenRA.Game/Traits/MPStartLocations.cs rename to OpenRA.Mods.RA/MPStartLocations.cs index 18ff52179b..3308eee92b --- a/OpenRA.Game/Traits/MPStartLocations.cs +++ b/OpenRA.Mods.RA/MPStartLocations.cs @@ -6,15 +6,16 @@ * as published by the Free Software Foundation. For more information, * see LICENSE. */ -#endregion - -using System.Collections.Generic; -using System.Linq; -using System; +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; using OpenRA.FileFormats; -using OpenRA.Network; +using OpenRA.Network; +using OpenRA.Traits; -namespace OpenRA.Traits +namespace OpenRA.Mods.RA { public class MPStartLocationsInfo : TraitInfo { diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 1d4132a672..7ddb3b55fe 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -77,6 +77,7 @@ + @@ -91,6 +92,7 @@ + @@ -99,6 +101,7 @@ + @@ -198,12 +201,14 @@ + + @@ -250,6 +255,7 @@ + diff --git a/OpenRA.Game/Traits/ProvidesRadar.cs b/OpenRA.Mods.RA/ProvidesRadar.cs old mode 100644 new mode 100755 similarity index 92% rename from OpenRA.Game/Traits/ProvidesRadar.cs rename to OpenRA.Mods.RA/ProvidesRadar.cs index 20b428f8fd..ba5f838607 --- a/OpenRA.Game/Traits/ProvidesRadar.cs +++ b/OpenRA.Mods.RA/ProvidesRadar.cs @@ -9,8 +9,9 @@ #endregion using System.Linq; +using OpenRA.Traits; -namespace OpenRA.Traits +namespace OpenRA.Mods.RA { public class ProvidesRadarInfo : TraitInfo { } diff --git a/OpenRA.Game/Traits/SupportPower.cs b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs old mode 100644 new mode 100755 similarity index 95% rename from OpenRA.Game/Traits/SupportPower.cs rename to OpenRA.Mods.RA/SupportPowers/SupportPower.cs index f99dc1a6d4..ca0fe097fb --- a/OpenRA.Game/Traits/SupportPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs @@ -9,8 +9,9 @@ #endregion using System.Linq; +using OpenRA.Traits; -namespace OpenRA.Traits +namespace OpenRA.Mods.RA { public abstract class SupportPowerInfo : ITraitInfo, ITraitPrerequisite, ITraitPrerequisite { diff --git a/OpenRA.Game/Traits/Turreted.cs b/OpenRA.Mods.RA/Turreted.cs old mode 100644 new mode 100755 similarity index 92% rename from OpenRA.Game/Traits/Turreted.cs rename to OpenRA.Mods.RA/Turreted.cs index abb52b7ead..1b5a698ca2 --- a/OpenRA.Game/Traits/Turreted.cs +++ b/OpenRA.Mods.RA/Turreted.cs @@ -8,7 +8,9 @@ */ #endregion -namespace OpenRA.Traits +using OpenRA.Traits; + +namespace OpenRA.Mods.RA { public class TurretedInfo : ITraitInfo { diff --git a/OpenRA.Game/Traits/World/SmudgeLayer.cs b/OpenRA.Mods.RA/World/SmudgeLayer.cs old mode 100644 new mode 100755 similarity index 96% rename from OpenRA.Game/Traits/World/SmudgeLayer.cs rename to OpenRA.Mods.RA/World/SmudgeLayer.cs index fecdfdc6b4..d13771f1f7 --- a/OpenRA.Game/Traits/World/SmudgeLayer.cs +++ b/OpenRA.Mods.RA/World/SmudgeLayer.cs @@ -9,13 +9,14 @@ #endregion using System; +using System.Collections.Generic; using System.Drawing; using System.Linq; using OpenRA.FileFormats; using OpenRA.Graphics; -using System.Collections.Generic; +using OpenRA.Traits; -namespace OpenRA.Traits +namespace OpenRA.Mods.RA { public class SmudgeLayerInfo : ITraitInfo {