Move everything Capture-related + Transform activity to Mods.Common
This commit is contained in:
@@ -8,14 +8,12 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
class CaptureActor : Enter
|
||||
public class CaptureActor : Enter
|
||||
{
|
||||
readonly Actor actor;
|
||||
readonly Capturable capturable;
|
||||
@@ -14,9 +14,9 @@ using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
class Transform : Activity
|
||||
public class Transform : Activity
|
||||
{
|
||||
public readonly string ToActor;
|
||||
public CVec Offset = CVec.Zero;
|
||||
@@ -72,6 +72,7 @@
|
||||
<Compile Include="Activities\Air\ReturnToBase.cs" />
|
||||
<Compile Include="Activities\Air\TakeOff.cs" />
|
||||
<Compile Include="Activities\Attack.cs" />
|
||||
<Compile Include="Activities\CaptureActor.cs" />
|
||||
<Compile Include="Activities\Enter.cs" />
|
||||
<Compile Include="Activities\EnterTransport.cs" />
|
||||
<Compile Include="Activities\ExternalCaptureActor.cs" />
|
||||
@@ -90,6 +91,7 @@
|
||||
<Compile Include="Activities\RepairBuilding.cs" />
|
||||
<Compile Include="Activities\Sell.cs" />
|
||||
<Compile Include="Activities\SimpleTeleport.cs" />
|
||||
<Compile Include="Activities\Transform.cs" />
|
||||
<Compile Include="Activities\Turn.cs" />
|
||||
<Compile Include="Activities\UnloadCargo.cs" />
|
||||
<Compile Include="Activities\Wait.cs" />
|
||||
@@ -198,6 +200,9 @@
|
||||
<Compile Include="Traits\Buildings\Reservable.cs" />
|
||||
<Compile Include="Traits\Buildings\TargetableBuilding.cs" />
|
||||
<Compile Include="Traits\Burns.cs" />
|
||||
<Compile Include="Traits\Capturable.cs" />
|
||||
<Compile Include="Traits\CaptureNotification.cs" />
|
||||
<Compile Include="Traits\Captures.cs" />
|
||||
<Compile Include="Traits\Cargo.cs" />
|
||||
<Compile Include="Traits\CashTrickler.cs" />
|
||||
<Compile Include="Traits\Cloak.cs" />
|
||||
@@ -256,6 +261,8 @@
|
||||
<Compile Include="Traits\Power\RequiresPower.cs" />
|
||||
<Compile Include="Traits\Power\ScalePowerWithHealth.cs" />
|
||||
<Compile Include="Traits\ProvidesRadar.cs" />
|
||||
<Compile Include="Traits\ProximityCaptor.cs" />
|
||||
<Compile Include="Traits\ProximityCapturable.cs" />
|
||||
<Compile Include="Traits\RadarColorFromTerrain.cs" />
|
||||
<Compile Include="Traits\Reloads.cs" />
|
||||
<Compile Include="Traits\Render\Hovers.cs" />
|
||||
@@ -307,6 +314,7 @@
|
||||
<Compile Include="Traits\TargetableUnit.cs" />
|
||||
<Compile Include="Traits\ThrowsParticle.cs" />
|
||||
<Compile Include="Traits\Tooltip.cs" />
|
||||
<Compile Include="Traits\TransformOnCapture.cs" />
|
||||
<Compile Include="Traits\Turreted.cs" />
|
||||
<Compile Include="Traits\Upgrades\UpgradableTrait.cs" />
|
||||
<Compile Include="Traits\Upgrades\UpgradeManager.cs" />
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("This actor can be captured by a unit with Captures: trait.")]
|
||||
class CapturableInfo : ITraitInfo
|
||||
public class CapturableInfo : ITraitInfo
|
||||
{
|
||||
[Desc("Type listed under Types in Captures: trait of actors that can capture this).")]
|
||||
public readonly string Type = "building";
|
||||
@@ -50,7 +50,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
}
|
||||
}
|
||||
|
||||
class Capturable : INotifyCapture
|
||||
public class Capturable : INotifyCapture
|
||||
{
|
||||
public readonly CapturableInfo Info;
|
||||
public bool BeingCaptured { get; private set; }
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
class CaptureNotificationInfo : ITraitInfo
|
||||
public class CaptureNotificationInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Notification = "BuildingCaptured";
|
||||
public readonly bool NewOwnerVoice = true;
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
public object Create(ActorInitializer init) { return new CaptureNotification(this); }
|
||||
}
|
||||
|
||||
class CaptureNotification : INotifyCapture
|
||||
public class CaptureNotification : INotifyCapture
|
||||
{
|
||||
CaptureNotificationInfo info;
|
||||
public CaptureNotification(CaptureNotificationInfo info)
|
||||
@@ -10,15 +10,14 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using OpenRA.Mods.Common;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Orders;
|
||||
using OpenRA.Mods.RA.Activities;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("This actor can capture other actors which have the Capturable: trait.")]
|
||||
class CapturesInfo : ITraitInfo
|
||||
public class CapturesInfo : ITraitInfo
|
||||
{
|
||||
[Desc("Types of actors that it can capture, as long as the type also exists in the Capturable Type: trait.")]
|
||||
public readonly string[] CaptureTypes = { "building" };
|
||||
@@ -30,7 +29,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
public object Create(ActorInitializer init) { return new Captures(init.Self, this); }
|
||||
}
|
||||
|
||||
class Captures : IIssueOrder, IResolveOrder, IOrderVoice
|
||||
public class Captures : IIssueOrder, IResolveOrder, IOrderVoice
|
||||
{
|
||||
public readonly CapturesInfo Info;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Actor can capture ProximityCapturable actors.")]
|
||||
public class ProximityCaptorInfo : ITraitInfo
|
||||
@@ -13,7 +13,7 @@ using System.Linq;
|
||||
using OpenRA.Effects;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Actor can be captured by units in a specified proximity.")]
|
||||
public class ProximityCapturableInfo : ITraitInfo
|
||||
@@ -8,12 +8,12 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Mods.RA.Activities;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
class TransformOnCaptureInfo : ITraitInfo
|
||||
public class TransformOnCaptureInfo : ITraitInfo
|
||||
{
|
||||
[ActorReference] public readonly string IntoActor = null;
|
||||
public readonly int ForceHealthPercentage = 0;
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.RA
|
||||
public virtual object Create(ActorInitializer init) { return new TransformOnCapture(this); }
|
||||
}
|
||||
|
||||
class TransformOnCapture : INotifyCapture
|
||||
public class TransformOnCapture : INotifyCapture
|
||||
{
|
||||
readonly TransformOnCaptureInfo info;
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Activities\CaptureActor.cs" />
|
||||
<Compile Include="AI\AttackOrFleeFuzzy.cs" />
|
||||
<Compile Include="AI\BaseBuilder.cs" />
|
||||
<Compile Include="AI\HackyAI.cs" />
|
||||
@@ -93,7 +92,6 @@
|
||||
<Compile Include="Activities\Leap.cs" />
|
||||
<Compile Include="Activities\RAHarvesterDockSequence.cs" />
|
||||
<Compile Include="Activities\Teleport.cs" />
|
||||
<Compile Include="Activities\Transform.cs" />
|
||||
<Compile Include="AI\SupportPowerDecision.cs" />
|
||||
<Compile Include="Effects\GpsSatellite.cs" />
|
||||
<Compile Include="Effects\SatelliteLaunch.cs" />
|
||||
@@ -104,10 +102,8 @@
|
||||
<Compile Include="AI\RushFuzzy.cs" />
|
||||
<Compile Include="AI\StateMachine.cs" />
|
||||
<Compile Include="Traits\Attack\AttackLeap.cs" />
|
||||
<Compile Include="CaptureNotification.cs" />
|
||||
<Compile Include="Scripting\Properties\RepairableBuildingProperties.cs" />
|
||||
<Compile Include="C4Demolition.cs" />
|
||||
<Compile Include="Capturable.cs" />
|
||||
<Compile Include="Traits\PaletteEffects\ChronoshiftPaletteEffect.cs" />
|
||||
<Compile Include="Traits\Chronoshiftable.cs" />
|
||||
<Compile Include="CrateSpawner.cs" />
|
||||
@@ -129,7 +125,6 @@
|
||||
<Compile Include="Effects\Parachute.cs" />
|
||||
<Compile Include="EmitInfantryOnSell.cs" />
|
||||
<Compile Include="Invulnerable.cs" />
|
||||
<Compile Include="Captures.cs" />
|
||||
<Compile Include="Lint\CheckActorReferences.cs" />
|
||||
<Compile Include="Lint\CheckSyncAnnotations.cs" />
|
||||
<Compile Include="Lint\CheckTraitPrerequisites.cs" />
|
||||
@@ -148,8 +143,6 @@
|
||||
<Compile Include="Widgets\Logic\TabCompletionLogic.cs" />
|
||||
<Compile Include="Production.cs" />
|
||||
<Compile Include="ProductionBar.cs" />
|
||||
<Compile Include="ProximityCaptor.cs" />
|
||||
<Compile Include="ProximityCapturable.cs" />
|
||||
<Compile Include="Traits\Render\RenderJammerCircle.cs" />
|
||||
<Compile Include="Render\RenderBuildingWarFactory.cs" />
|
||||
<Compile Include="Render\RenderHarvester.cs" />
|
||||
@@ -173,7 +166,6 @@
|
||||
<Compile Include="Traits\HarvesterHuskModifier.cs" />
|
||||
<Compile Include="Traits\LeavesHusk.cs" />
|
||||
<Compile Include="Traits\TargetableSubmarine.cs" />
|
||||
<Compile Include="TransformOnCapture.cs" />
|
||||
<Compile Include="TransformOnPassenger.cs" />
|
||||
<Compile Include="Transforms.cs" />
|
||||
<Compile Include="Widgets\Logic\KickSpectatorsLogic.cs" />
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#endregion
|
||||
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Activities;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
|
||||
Reference in New Issue
Block a user