From a7d3ff973e428542565a411f18d7c48124da591b Mon Sep 17 00:00:00 2001 From: reaperrr Date: Thu, 2 Oct 2014 22:57:17 +0200 Subject: [PATCH 1/3] Move Explosion effect to Mods.Common --- {OpenRA.Mods.RA => OpenRA.Mods.Common}/Effects/Explosion.cs | 2 +- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 1 + OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 1 - OpenRA.Mods.RA/Parachutable.cs | 2 +- OpenRA.Mods.RA/Render/WithBuildingExplosion.cs | 2 +- OpenRA.Mods.RA/Warheads/CreateEffectWarhead.cs | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Effects/Explosion.cs (96%) diff --git a/OpenRA.Mods.RA/Effects/Explosion.cs b/OpenRA.Mods.Common/Effects/Explosion.cs similarity index 96% rename from OpenRA.Mods.RA/Effects/Explosion.cs rename to OpenRA.Mods.Common/Effects/Explosion.cs index 40e837f7a6..073b685835 100644 --- a/OpenRA.Mods.RA/Effects/Explosion.cs +++ b/OpenRA.Mods.Common/Effects/Explosion.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 Explosion : IEffect { diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 6e06486e91..40f1fd7c60 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -41,6 +41,7 @@ + diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 7b40c1c6fb..ec3dda8204 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -215,7 +215,6 @@ - diff --git a/OpenRA.Mods.RA/Parachutable.cs b/OpenRA.Mods.RA/Parachutable.cs index c6670d4442..b59d89dbe9 100644 --- a/OpenRA.Mods.RA/Parachutable.cs +++ b/OpenRA.Mods.RA/Parachutable.cs @@ -8,7 +8,7 @@ */ #endregion -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Mods.RA.Render; using OpenRA.Traits; diff --git a/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs b/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs index 7223f47c52..ae839c0d11 100755 --- a/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs +++ b/OpenRA.Mods.RA/Render/WithBuildingExplosion.cs @@ -9,7 +9,7 @@ #endregion using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA.Render diff --git a/OpenRA.Mods.RA/Warheads/CreateEffectWarhead.cs b/OpenRA.Mods.RA/Warheads/CreateEffectWarhead.cs index 43de068c80..54e8dba1ca 100644 --- a/OpenRA.Mods.RA/Warheads/CreateEffectWarhead.cs +++ b/OpenRA.Mods.RA/Warheads/CreateEffectWarhead.cs @@ -13,7 +13,7 @@ using System.Linq; using OpenRA.Effects; using OpenRA.GameRules; using OpenRA.Traits; -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; namespace OpenRA.Mods.RA { From ab30e8a99324a2a6212c8cde63a888efab9923d2 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Thu, 2 Oct 2014 22:58:22 +0200 Subject: [PATCH 2/3] Move FloatingText effect to Mods.Common --- {OpenRA.Mods.RA => OpenRA.Mods.Common}/Effects/FloatingText.cs | 2 +- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 1 + OpenRA.Mods.RA/Activities/DonateSupplies.cs | 2 +- OpenRA.Mods.RA/Activities/Sell.cs | 2 +- OpenRA.Mods.RA/CashTrickler.cs | 2 +- OpenRA.Mods.RA/CombatDebugOverlay.cs | 1 + OpenRA.Mods.RA/Crates/GiveCashCrateAction.cs | 2 +- OpenRA.Mods.RA/GivesBounty.cs | 2 +- OpenRA.Mods.RA/Infiltration/InfiltrateForCash.cs | 2 +- OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 1 - OpenRA.Mods.RA/OreRefinery.cs | 2 +- 11 files changed, 10 insertions(+), 9 deletions(-) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Effects/FloatingText.cs (97%) diff --git a/OpenRA.Mods.RA/Effects/FloatingText.cs b/OpenRA.Mods.Common/Effects/FloatingText.cs similarity index 97% rename from OpenRA.Mods.RA/Effects/FloatingText.cs rename to OpenRA.Mods.Common/Effects/FloatingText.cs index ac55ad6391..cf60829954 100644 --- a/OpenRA.Mods.RA/Effects/FloatingText.cs +++ b/OpenRA.Mods.Common/Effects/FloatingText.cs @@ -15,7 +15,7 @@ using OpenRA.Effects; using OpenRA.Graphics; using OpenRA.Mods.Common.Graphics; -namespace OpenRA.Mods.RA.Effects +namespace OpenRA.Mods.Common.Effects { public class FloatingText : IEffect { diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 40f1fd7c60..41165e5a8d 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -42,6 +42,7 @@ + diff --git a/OpenRA.Mods.RA/Activities/DonateSupplies.cs b/OpenRA.Mods.RA/Activities/DonateSupplies.cs index 7d19a8724b..b6407e5823 100644 --- a/OpenRA.Mods.RA/Activities/DonateSupplies.cs +++ b/OpenRA.Mods.RA/Activities/DonateSupplies.cs @@ -8,7 +8,7 @@ */ #endregion -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA.Activities diff --git a/OpenRA.Mods.RA/Activities/Sell.cs b/OpenRA.Mods.RA/Activities/Sell.cs index d342b9db2c..7f8e784d85 100755 --- a/OpenRA.Mods.RA/Activities/Sell.cs +++ b/OpenRA.Mods.RA/Activities/Sell.cs @@ -9,7 +9,7 @@ #endregion using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA.Activities diff --git a/OpenRA.Mods.RA/CashTrickler.cs b/OpenRA.Mods.RA/CashTrickler.cs index 2339b4e187..16d84d2ce1 100644 --- a/OpenRA.Mods.RA/CashTrickler.cs +++ b/OpenRA.Mods.RA/CashTrickler.cs @@ -8,7 +8,7 @@ */ #endregion -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/CombatDebugOverlay.cs b/OpenRA.Mods.RA/CombatDebugOverlay.cs index b78566dcce..9c4624f0f6 100644 --- a/OpenRA.Mods.RA/CombatDebugOverlay.cs +++ b/OpenRA.Mods.RA/CombatDebugOverlay.cs @@ -12,6 +12,7 @@ using System; using System.Drawing; using OpenRA.Graphics; using OpenRA.Traits; +using OpenRA.Mods.Common.Effects; using OpenRA.Mods.RA.Effects; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Crates/GiveCashCrateAction.cs b/OpenRA.Mods.RA/Crates/GiveCashCrateAction.cs index 6356660f4c..b28a3f293f 100644 --- a/OpenRA.Mods.RA/Crates/GiveCashCrateAction.cs +++ b/OpenRA.Mods.RA/Crates/GiveCashCrateAction.cs @@ -8,7 +8,7 @@ */ #endregion -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/GivesBounty.cs b/OpenRA.Mods.RA/GivesBounty.cs index 84dad89443..ee7f11489a 100644 --- a/OpenRA.Mods.RA/GivesBounty.cs +++ b/OpenRA.Mods.RA/GivesBounty.cs @@ -10,7 +10,7 @@ using System.Linq; using OpenRA.Mods.RA.Buildings; -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA diff --git a/OpenRA.Mods.RA/Infiltration/InfiltrateForCash.cs b/OpenRA.Mods.RA/Infiltration/InfiltrateForCash.cs index 20361e60dc..9e7d4d4c63 100644 --- a/OpenRA.Mods.RA/Infiltration/InfiltrateForCash.cs +++ b/OpenRA.Mods.RA/Infiltration/InfiltrateForCash.cs @@ -9,7 +9,7 @@ #endregion using System; -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Traits; namespace OpenRA.Mods.RA.Infiltration diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index ec3dda8204..2a069ce852 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -120,7 +120,6 @@ - diff --git a/OpenRA.Mods.RA/OreRefinery.cs b/OpenRA.Mods.RA/OreRefinery.cs index 315120d71e..378c0e68d0 100644 --- a/OpenRA.Mods.RA/OreRefinery.cs +++ b/OpenRA.Mods.RA/OreRefinery.cs @@ -11,7 +11,7 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.Common.Effects; using OpenRA.Mods.RA.Render; using OpenRA.Traits; From f03617bbe502a54abb6861f06b2231fa3d1c472d Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 3 Oct 2014 00:11:11 +0200 Subject: [PATCH 3/3] Move Console commands to Mods.Common --- OpenRA.Mods.Common/CommonTraitsInterfaces.cs | 17 +++++++++++++++++ .../Console/ChatCommands.cs | 2 +- .../Console/DevCommands.cs | 2 +- .../Console/HelpCommand.cs | 2 +- .../Console/PlayerCommands.cs | 2 +- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 5 +++++ OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 4 ---- OpenRA.Mods.RA/TraitsInterfaces.cs | 1 - OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs | 1 + 9 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 OpenRA.Mods.Common/CommonTraitsInterfaces.cs rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Console/ChatCommands.cs (98%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Console/DevCommands.cs (99%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Console/HelpCommand.cs (98%) rename {OpenRA.Mods.RA => OpenRA.Mods.Common}/Console/PlayerCommands.cs (98%) diff --git a/OpenRA.Mods.Common/CommonTraitsInterfaces.cs b/OpenRA.Mods.Common/CommonTraitsInterfaces.cs new file mode 100644 index 0000000000..59d5b7c6e8 --- /dev/null +++ b/OpenRA.Mods.Common/CommonTraitsInterfaces.cs @@ -0,0 +1,17 @@ +#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.Traits; + +namespace OpenRA.Mods.Common +{ + public interface INotifyChat { bool OnChat(string from, string message); } +} diff --git a/OpenRA.Mods.RA/Console/ChatCommands.cs b/OpenRA.Mods.Common/Console/ChatCommands.cs similarity index 98% rename from OpenRA.Mods.RA/Console/ChatCommands.cs rename to OpenRA.Mods.Common/Console/ChatCommands.cs index c3b65a1958..fbea1f8e44 100644 --- a/OpenRA.Mods.RA/Console/ChatCommands.cs +++ b/OpenRA.Mods.Common/Console/ChatCommands.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Traits; -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { [Desc("Enables commands triggered by typing them into the chatbox. Attach this to the world actor.")] public class ChatCommandsInfo : TraitInfo { } diff --git a/OpenRA.Mods.RA/Console/DevCommands.cs b/OpenRA.Mods.Common/Console/DevCommands.cs similarity index 99% rename from OpenRA.Mods.RA/Console/DevCommands.cs rename to OpenRA.Mods.Common/Console/DevCommands.cs index 7d0cf5ec52..def62aaed3 100644 --- a/OpenRA.Mods.RA/Console/DevCommands.cs +++ b/OpenRA.Mods.Common/Console/DevCommands.cs @@ -12,7 +12,7 @@ using System; using OpenRA.Graphics; using OpenRA.Traits; -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { [Desc("Enables developer cheats via the chatbox. Attach this to the world actor.")] public class DevCommandsInfo : TraitInfo { } diff --git a/OpenRA.Mods.RA/Console/HelpCommand.cs b/OpenRA.Mods.Common/Console/HelpCommand.cs similarity index 98% rename from OpenRA.Mods.RA/Console/HelpCommand.cs rename to OpenRA.Mods.Common/Console/HelpCommand.cs index cd38f68b9f..32384e5c08 100644 --- a/OpenRA.Mods.RA/Console/HelpCommand.cs +++ b/OpenRA.Mods.Common/Console/HelpCommand.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using OpenRA.Graphics; using OpenRA.Traits; -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { [Desc("Shows a list of available commands in the chatbox. Attach this to the world actor.")] public class HelpCommandInfo : TraitInfo { } diff --git a/OpenRA.Mods.RA/Console/PlayerCommands.cs b/OpenRA.Mods.Common/Console/PlayerCommands.cs similarity index 98% rename from OpenRA.Mods.RA/Console/PlayerCommands.cs rename to OpenRA.Mods.Common/Console/PlayerCommands.cs index 43ec351e73..3051f2b73f 100644 --- a/OpenRA.Mods.RA/Console/PlayerCommands.cs +++ b/OpenRA.Mods.Common/Console/PlayerCommands.cs @@ -11,7 +11,7 @@ using OpenRA.Graphics; using OpenRA.Traits; -namespace OpenRA.Mods.RA +namespace OpenRA.Mods.Common { [Desc("Allows the player to pause or surrender the game via the chatbox. Attach this to the world actor.")] public class PlayerCommandsInfo : TraitInfo { } diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 41165e5a8d..97a5eca20c 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -41,8 +41,13 @@ + + + + + diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 2a069ce852..9de3cbe00b 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -486,10 +486,6 @@ - - - - diff --git a/OpenRA.Mods.RA/TraitsInterfaces.cs b/OpenRA.Mods.RA/TraitsInterfaces.cs index 1239468277..a03d3885cc 100755 --- a/OpenRA.Mods.RA/TraitsInterfaces.cs +++ b/OpenRA.Mods.RA/TraitsInterfaces.cs @@ -50,6 +50,5 @@ namespace OpenRA.Mods.RA 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); } - public interface INotifyChat { bool OnChat(string from, string message); } public interface IRenderActorPreviewInfo { IEnumerable RenderPreview(ActorPreviewInitializer init); } } diff --git a/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs index fda765494a..c7adba0af3 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/IngameChatLogic.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; +using OpenRA.Mods.Common; using OpenRA.Network; using OpenRA.Widgets;