From b987ab15be8ab3023dde4d88d141081fd7c07be3 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sat, 4 Oct 2014 18:34:42 +0200 Subject: [PATCH 1/5] Add Mods.Common reference to Mods.Cnc --- OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj index 774af5fedc..e9de49078d 100644 --- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj +++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj @@ -88,6 +88,11 @@ OpenRA.Game False + + {FE6C8CC0-2F07-442A-B29F-17617B3B7FC6} + OpenRA.Mods.Common + False + {4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E} OpenRA.Mods.RA From c741fcedec71b2294c2bd770fa4b8d18ef5ab139 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sat, 4 Oct 2014 18:48:07 +0200 Subject: [PATCH 2/5] Move Smoke effect, ContrailFader effect, SmudgeLayer and LeaveSmudgeWarhead to Mods.Common --- .../Effects/ContrailFader.cs | 4 ++-- {OpenRA.Mods.RA => OpenRA.Mods.Common}/Effects/Smoke.cs | 2 +- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 4 ++++ .../Warheads/LeaveSmudgeWarhead.cs | 2 +- {OpenRA.Mods.RA => OpenRA.Mods.Common}/World/SmudgeLayer.cs | 4 ++-- OpenRA.Mods.RA/Effects/Bullet.cs | 1 + OpenRA.Mods.RA/Effects/Contrail.cs | 1 + OpenRA.Mods.RA/Effects/Missile.cs | 1 + OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 4 ---- OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs | 2 +- 10 files changed, 14 insertions(+), 11 deletions(-) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Effects/ContrailFader.cs (92%) mode change 100755 => 100644 rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Effects/Smoke.cs (96%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Warheads/LeaveSmudgeWarhead.cs (98%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/World/SmudgeLayer.cs (98%) diff --git a/OpenRA.Mods.RA/Effects/ContrailFader.cs b/OpenRA.Mods.Common/Effects/ContrailFader.cs old mode 100755 new mode 100644 similarity index 92% rename from OpenRA.Mods.RA/Effects/ContrailFader.cs rename to OpenRA.Mods.Common/Effects/ContrailFader.cs index e2091b667e..1ea7c168dc --- a/OpenRA.Mods.RA/Effects/ContrailFader.cs +++ b/OpenRA.Mods.Common/Effects/ContrailFader.cs @@ -13,9 +13,9 @@ using OpenRA.Effects; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; -namespace OpenRA.Mods.RA.Effects +namespace OpenRA.Mods.Common.Effects { - class ContrailFader : IEffect + public class ContrailFader : IEffect { WPos pos; ContrailRenderable trail; diff --git a/OpenRA.Mods.RA/Effects/Smoke.cs b/OpenRA.Mods.Common/Effects/Smoke.cs similarity index 96% rename from OpenRA.Mods.RA/Effects/Smoke.cs rename to OpenRA.Mods.Common/Effects/Smoke.cs index 0568f8b80a..a5823d1a17 100644 --- a/OpenRA.Mods.RA/Effects/Smoke.cs +++ b/OpenRA.Mods.Common/Effects/Smoke.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using OpenRA.Effects; using OpenRA.Graphics; -namespace OpenRA.Mods.RA.Effects +namespace OpenRA.Mods.Common.Effects { public class Smoke : IEffect { diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 97a5eca20c..062343981a 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -42,8 +42,10 @@ + + @@ -78,6 +80,7 @@ + @@ -96,6 +99,7 @@ + diff --git a/OpenRA.Mods.RA/Warheads/LeaveSmudgeWarhead.cs b/OpenRA.Mods.Common/Warheads/LeaveSmudgeWarhead.cs similarity index 98% rename from OpenRA.Mods.RA/Warheads/LeaveSmudgeWarhead.cs rename to OpenRA.Mods.Common/Warheads/LeaveSmudgeWarhead.cs index a8f944fc4b..63330d0184 100644 --- a/OpenRA.Mods.RA/Warheads/LeaveSmudgeWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/LeaveSmudgeWarhead.cs @@ -15,7 +15,7 @@ using OpenRA.Effects; using OpenRA.GameRules; using OpenRA.Traits; -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { public class LeaveSmudgeWarhead : Warhead { diff --git a/OpenRA.Mods.RA/World/SmudgeLayer.cs b/OpenRA.Mods.Common/World/SmudgeLayer.cs similarity index 98% rename from OpenRA.Mods.RA/World/SmudgeLayer.cs rename to OpenRA.Mods.Common/World/SmudgeLayer.cs index e05108f08b..1eac416834 100644 --- a/OpenRA.Mods.RA/World/SmudgeLayer.cs +++ b/OpenRA.Mods.Common/World/SmudgeLayer.cs @@ -11,10 +11,10 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Graphics; -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { [Desc("Attach this to the world actor.", "Order of the layers defines the Z sorting.")] public class SmudgeLayerInfo : ITraitInfo diff --git a/OpenRA.Mods.RA/Effects/Bullet.cs b/OpenRA.Mods.RA/Effects/Bullet.cs index 3c1bd32d92..1fc0b0ad50 100755 --- a/OpenRA.Mods.RA/Effects/Bullet.cs +++ b/OpenRA.Mods.RA/Effects/Bullet.cs @@ -15,6 +15,7 @@ using System.Linq; using OpenRA.Effects; using OpenRA.GameRules; using OpenRA.Graphics; +using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Effects/Contrail.cs b/OpenRA.Mods.RA/Effects/Contrail.cs index 78c13f620e..0564097747 100755 --- a/OpenRA.Mods.RA/Effects/Contrail.cs +++ b/OpenRA.Mods.RA/Effects/Contrail.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Drawing; using OpenRA.Graphics; +using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Effects/Missile.cs b/OpenRA.Mods.RA/Effects/Missile.cs index 0a21ad3ac4..d1865b336d 100755 --- a/OpenRA.Mods.RA/Effects/Missile.cs +++ b/OpenRA.Mods.RA/Effects/Missile.cs @@ -14,6 +14,7 @@ using System.Linq; using OpenRA.Effects; using OpenRA.GameRules; using OpenRA.Graphics; +using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Graphics; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 9de3cbe00b..c6a7465518 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -225,7 +225,6 @@ - @@ -290,7 +289,6 @@ - @@ -401,7 +399,6 @@ - @@ -445,7 +442,6 @@ - diff --git a/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs b/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs index 3f298fbdf6..98a0946092 100644 --- a/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs +++ b/OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs @@ -8,7 +8,7 @@ */ #endregion -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA From 9381386b7c62040dd4a5f181d03d0da51bcaabe4 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sat, 4 Oct 2014 18:50:14 +0200 Subject: [PATCH 3/5] Move PlayMusicOnMapLoad to Mods.Common --- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 1 + .../World/PlayMusicOnMapLoad.cs | 2 +- OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/World/PlayMusicOnMapLoad.cs (97%) diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 062343981a..30635f3c79 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -98,6 +98,7 @@ + diff --git a/OpenRA.Mods.RA/World/PlayMusicOnMapLoad.cs b/OpenRA.Mods.Common/World/PlayMusicOnMapLoad.cs similarity index 97% rename from OpenRA.Mods.RA/World/PlayMusicOnMapLoad.cs rename to OpenRA.Mods.Common/World/PlayMusicOnMapLoad.cs index fc7775324b..cd9ac50202 100644 --- a/OpenRA.Mods.RA/World/PlayMusicOnMapLoad.cs +++ b/OpenRA.Mods.Common/World/PlayMusicOnMapLoad.cs @@ -12,7 +12,7 @@ using System; using OpenRA.Graphics; using OpenRA.Traits; -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { class PlayMusicOnMapLoadInfo : ITraitInfo { diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index c6a7465518..6c2c4cb40e 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -398,7 +398,6 @@ - From 8b5bd490953923d5151c00d74ae0fe28a8f58d59 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sat, 4 Oct 2014 18:52:48 +0200 Subject: [PATCH 4/5] Move ResourceClaim and ResourceClaimLayer to Mods.Common --- .../Activities/HarvesterDockSequence.cs | 1 + OpenRA.Mods.Common/CommonTraitsInterfaces.cs | 5 +++++ OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 2 ++ .../World/ResourceClaim.cs | 2 +- .../World/ResourceClaimLayer.cs | 14 ++++++++++++-- OpenRA.Mods.RA/Activities/FindResources.cs | 1 + OpenRA.Mods.RA/Harvester.cs | 1 + OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 2 -- OpenRA.Mods.RA/TraitsInterfaces.cs | 5 ----- 9 files changed, 23 insertions(+), 10 deletions(-) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/World/ResourceClaim.cs (94%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/World/ResourceClaimLayer.cs (89%) diff --git a/OpenRA.Mods.Cnc/Activities/HarvesterDockSequence.cs b/OpenRA.Mods.Cnc/Activities/HarvesterDockSequence.cs index c6c491e430..75f70e4bcd 100644 --- a/OpenRA.Mods.Cnc/Activities/HarvesterDockSequence.cs +++ b/OpenRA.Mods.Cnc/Activities/HarvesterDockSequence.cs @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; +using OpenRA.Mods.Common; using OpenRA.Mods.RA; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Move; diff --git a/OpenRA.Mods.Common/CommonTraitsInterfaces.cs b/OpenRA.Mods.Common/CommonTraitsInterfaces.cs index 59d5b7c6e8..d3718bc8a3 100644 --- a/OpenRA.Mods.Common/CommonTraitsInterfaces.cs +++ b/OpenRA.Mods.Common/CommonTraitsInterfaces.cs @@ -13,5 +13,10 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common { + public interface INotifyResourceClaimLost + { + void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer); + } + public interface INotifyChat { bool OnChat(string from, string message); } } diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 30635f3c79..eb10c86f75 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -100,6 +100,8 @@ + + diff --git a/OpenRA.Mods.RA/World/ResourceClaim.cs b/OpenRA.Mods.Common/World/ResourceClaim.cs similarity index 94% rename from OpenRA.Mods.RA/World/ResourceClaim.cs rename to OpenRA.Mods.Common/World/ResourceClaim.cs index aa02fca627..d3623fdac4 100644 --- a/OpenRA.Mods.RA/World/ResourceClaim.cs +++ b/OpenRA.Mods.Common/World/ResourceClaim.cs @@ -8,7 +8,7 @@ */ #endregion -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { public sealed class ResourceClaim { diff --git a/OpenRA.Mods.RA/World/ResourceClaimLayer.cs b/OpenRA.Mods.Common/World/ResourceClaimLayer.cs similarity index 89% rename from OpenRA.Mods.RA/World/ResourceClaimLayer.cs rename to OpenRA.Mods.Common/World/ResourceClaimLayer.cs index baa49c36b7..4ab3b3aa47 100644 --- a/OpenRA.Mods.RA/World/ResourceClaimLayer.cs +++ b/OpenRA.Mods.Common/World/ResourceClaimLayer.cs @@ -1,8 +1,18 @@ -using System.Collections.Generic; +#region Copyright & License Information +/* + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +using System.Collections.Generic; using OpenRA.Graphics; using OpenRA.Traits; -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { [Desc("Allows harvesters to coordinate their operations. Attach this to the world actor.")] public sealed class ResourceClaimLayerInfo : TraitInfo { } diff --git a/OpenRA.Mods.RA/Activities/FindResources.cs b/OpenRA.Mods.RA/Activities/FindResources.cs index 1b119efb52..e044143931 100755 --- a/OpenRA.Mods.RA/Activities/FindResources.cs +++ b/OpenRA.Mods.RA/Activities/FindResources.cs @@ -12,6 +12,7 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; +using OpenRA.Mods.Common; using OpenRA.Mods.RA.Move; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Harvester.cs b/OpenRA.Mods.RA/Harvester.cs index b47e1f168e..f962db46dc 100644 --- a/OpenRA.Mods.RA/Harvester.cs +++ b/OpenRA.Mods.RA/Harvester.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; +using OpenRA.Mods.Common; using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Orders; diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 6c2c4cb40e..8959fc4190 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -396,8 +396,6 @@ - - diff --git a/OpenRA.Mods.RA/TraitsInterfaces.cs b/OpenRA.Mods.RA/TraitsInterfaces.cs index a03d3885cc..4ed5d32619 100755 --- a/OpenRA.Mods.RA/TraitsInterfaces.cs +++ b/OpenRA.Mods.RA/TraitsInterfaces.cs @@ -42,11 +42,6 @@ namespace OpenRA.Mods.RA IEnumerable ProvidesPrerequisites {get;} } - public interface INotifyResourceClaimLost - { - void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer); - } - public interface INotifyParachuteLanded { void OnLanded(); } public interface INotifyTransform { void BeforeTransform(Actor self); void OnTransform(Actor self); void AfterTransform(Actor toActor); } public interface INotifyAttack { void Attacking(Actor self, Target target, Armament a, Barrel barrel); } From 6e1f1b9cc8628015ed21714f09739a5638786610 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sat, 4 Oct 2014 18:53:56 +0200 Subject: [PATCH 5/5] Bring Mods.Common includes in alphabetical order --- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index eb10c86f75..59df02b9ee 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -54,12 +54,16 @@ + + + + - + @@ -76,10 +80,6 @@ - - - -