From 8b5bd490953923d5151c00d74ae0fe28a8f58d59 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sat, 4 Oct 2014 18:52:48 +0200 Subject: [PATCH] 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); }