Move Console commands to Mods.Common

This commit is contained in:
reaperrr
2014-10-03 00:11:11 +02:00
parent ab30e8a993
commit f03617bbe5
9 changed files with 27 additions and 9 deletions

View File

@@ -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); }
}

View File

@@ -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<ChatCommands> { }

View File

@@ -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<DevCommands> { }

View File

@@ -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<HelpCommand> { }

View File

@@ -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<PlayerCommands> { }

View File

@@ -41,8 +41,13 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="CommonTraitsInterfaces.cs" />
<Compile Include="Effects\Explosion.cs" />
<Compile Include="Effects\FloatingText.cs" />
<Compile Include="Console\ChatCommands.cs" />
<Compile Include="Console\DevCommands.cs" />
<Compile Include="Console\HelpCommand.cs" />
<Compile Include="Console\PlayerCommands.cs" />
<Compile Include="Graphics\ActorPreview.cs" />
<Compile Include="Graphics\BeamRenderable.cs" />
<Compile Include="Graphics\ContrailRenderable.cs" />

View File

@@ -486,10 +486,6 @@
<Compile Include="Scripting\Properties\TransportProperties.cs" />
<Compile Include="Scripting\Global\CameraGlobal.cs" />
<Compile Include="Scripting\Properties\ChronosphereProperties.cs" />
<Compile Include="Console\ChatCommands.cs" />
<Compile Include="Console\DevCommands.cs" />
<Compile Include="Console\HelpCommand.cs" />
<Compile Include="Console\PlayerCommands.cs" />
<Compile Include="Render\WithRepairAnimation.cs" />
<Compile Include="Render\WithRepairOverlay.cs" />
<Compile Include="Activities\MoveWithinRange.cs" />

View File

@@ -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<IActorPreview> RenderPreview(ActorPreviewInitializer init); }
}

View File

@@ -11,6 +11,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Mods.Common;
using OpenRA.Network;
using OpenRA.Widgets;