Merge pull request #6663 from reaperrr/common-stuff4

Moved more stuff to Mods.Common
This commit is contained in:
Matthias Mailänder
2014-10-05 10:10:14 +02:00
19 changed files with 49 additions and 28 deletions

View File

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

View File

@@ -88,6 +88,11 @@
<Name>OpenRA.Game</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj">
<Project>{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}</Project>
<Name>OpenRA.Mods.Common</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Mods.RA\OpenRA.Mods.RA.csproj">
<Project>{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}</Project>
<Name>OpenRA.Mods.RA</Name>

View File

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

View File

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

View File

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

View File

@@ -42,8 +42,10 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CommonTraitsInterfaces.cs" />
<Compile Include="Effects\ContrailFader.cs" />
<Compile Include="Effects\Explosion.cs" />
<Compile Include="Effects\FloatingText.cs" />
<Compile Include="Effects\Smoke.cs" />
<Compile Include="Console\ChatCommands.cs" />
<Compile Include="Console\DevCommands.cs" />
<Compile Include="Console\HelpCommand.cs" />
@@ -52,12 +54,16 @@
<Compile Include="Graphics\BeamRenderable.cs" />
<Compile Include="Graphics\ContrailRenderable.cs" />
<Compile Include="Graphics\RangeCircleRenderable.cs" />
<Compile Include="Graphics\SpriteActorPreview.cs" />
<Compile Include="Graphics\TextRenderable.cs" />
<Compile Include="Graphics\VoxelActorPreview.cs" />
<Compile Include="Graphics\VoxelRenderable.cs" />
<Compile Include="ModChooserLoadScreen.cs" />
<Compile Include="PaletteFromFile.cs" />
<Compile Include="Traits\ProvidesRadar.cs" />
<Compile Include="ServerTraits\ColorValidator.cs" />
<Compile Include="ServerTraits\MasterServerPinger.cs" />
<Compile Include="ServerTraits\PlayerPinger.cs" />
<Compile Include="Traits\ProvidesRadar.cs" />
<Compile Include="UtilityCommands\ConvertPngToShpCommand.cs" />
<Compile Include="UtilityCommands\ConvertSpriteToPngCommand.cs" />
<Compile Include="UtilityCommands\ExtractFilesCommand.cs" />
@@ -74,10 +80,7 @@
<Compile Include="UtilityCommands\UpgradeMapCommand.cs" />
<Compile Include="UtilityCommands\UpgradeModCommand.cs" />
<Compile Include="UtilityCommands\UpgradeRules.cs" />
<Compile Include="Graphics\SpriteActorPreview.cs" />
<Compile Include="Graphics\TextRenderable.cs" />
<Compile Include="Graphics\VoxelActorPreview.cs" />
<Compile Include="Graphics\VoxelRenderable.cs" />
<Compile Include="Warheads\LeaveSmudgeWarhead.cs" />
<Compile Include="Widgets\ConfirmationDialogs.cs" />
<Compile Include="Widgets\HueSliderWidget.cs" />
<Compile Include="Widgets\LabelWithTooltipWidget.cs" />
@@ -95,7 +98,11 @@
<Compile Include="Widgets\MenuButtonWidget.cs" />
<Compile Include="Widgets\RadarWidget.cs" />
<Compile Include="Widgets\ResourceBarWidget.cs" />
<Compile Include="World\PlayMusicOnMapLoad.cs" />
<Compile Include="World\RadarPings.cs" />
<Compile Include="World\ResourceClaim.cs" />
<Compile Include="World\ResourceClaimLayer.cs" />
<Compile Include="World\SmudgeLayer.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>

View File

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

View File

@@ -12,7 +12,7 @@ using System;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
namespace OpenRA.Mods.Common
{
class PlayMusicOnMapLoadInfo : ITraitInfo
{

View File

@@ -8,7 +8,7 @@
*/
#endregion
namespace OpenRA.Mods.RA
namespace OpenRA.Mods.Common
{
public sealed class ResourceClaim
{

View File

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

View File

@@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -225,7 +225,6 @@
<Compile Include="Effects\RallyPoint.cs" />
<Compile Include="Effects\RepairIndicator.cs" />
<Compile Include="Effects\SatelliteLaunch.cs" />
<Compile Include="Effects\Smoke.cs" />
<Compile Include="Effects\TeslaZap.cs" />
<Compile Include="EmitInfantryOnSell.cs" />
<Compile Include="EngineerRepair.cs" />
@@ -290,7 +289,6 @@
<Compile Include="Warheads\DestroyResourceWarhead.cs" />
<Compile Include="Warheads\CreateEffectWarhead.cs" />
<Compile Include="Warheads\CreateResourceWarhead.cs" />
<Compile Include="Warheads\LeaveSmudgeWarhead.cs" />
<Compile Include="Widgets\Logic\TabCompletionLogic.cs" />
<Compile Include="Player\TechTree.cs" />
<Compile Include="PrimaryBuilding.cs" />
@@ -398,10 +396,6 @@
<Compile Include="Widgets\StrategicProgressWidget.cs" />
<Compile Include="Widgets\SupportPowerTimerWidget.cs" />
<Compile Include="Widgets\WorldCommandWidget.cs" />
<Compile Include="World\ResourceClaim.cs" />
<Compile Include="World\ResourceClaimLayer.cs" />
<Compile Include="World\PlayMusicOnMapLoad.cs" />
<Compile Include="World\SmudgeLayer.cs" />
<Compile Include="Player\BaseAttackNotifier.cs" />
<Compile Include="Player\HarvesterAttackNotifier.cs" />
<Compile Include="Infiltration\InfiltrateForExploration.cs" />
@@ -445,7 +439,6 @@
<Compile Include="Widgets\Logic\InstallLogic.cs" />
<Compile Include="CombatDebugOverlay.cs" />
<Compile Include="World\PathfinderDebugOverlay.cs" />
<Compile Include="Effects\ContrailFader.cs" />
<Compile Include="Widgets\Logic\SettingsLogic.cs" />
<Compile Include="AttackBomber.cs" />
<Compile Include="Effects\Rank.cs" />

View File

@@ -8,7 +8,7 @@
*/
#endregion
using OpenRA.Mods.RA.Effects;
using OpenRA.Mods.Common.Effects;
using OpenRA.Traits;
namespace OpenRA.Mods.RA

View File

@@ -42,11 +42,6 @@ namespace OpenRA.Mods.RA
IEnumerable<string> 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); }