Merge pull request #7570 from Mailaender/mods-common
Moved more traits to Mods.Common
This commit is contained in:
@@ -75,7 +75,6 @@
|
||||
<Compile Include="Traits\Render\RenderGunboat.cs" />
|
||||
<Compile Include="Traits\Render\WithCargo.cs" />
|
||||
<Compile Include="Traits\Render\WithDeliveryAnimation.cs" />
|
||||
<Compile Include="Traits\Render\WithFire.cs" />
|
||||
<Compile Include="Traits\Render\WithRoof.cs" />
|
||||
<Compile Include="Traits\SpawnViceroid.cs" />
|
||||
<Compile Include="Traits\SupportPowers\IonCannonPower.cs" />
|
||||
|
||||
@@ -8,11 +8,10 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Effects;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
class DonateSupplies : Enter
|
||||
{
|
||||
@@ -95,6 +95,7 @@
|
||||
<Compile Include="Activities\CaptureActor.cs" />
|
||||
<Compile Include="Activities\DeliverResources.cs" />
|
||||
<Compile Include="Activities\Demolish.cs" />
|
||||
<Compile Include="Activities\DonateSupplies.cs" />
|
||||
<Compile Include="Activities\Enter.cs" />
|
||||
<Compile Include="Activities\EnterTransport.cs" />
|
||||
<Compile Include="Activities\ExternalCaptureActor.cs" />
|
||||
@@ -200,24 +201,27 @@
|
||||
<Compile Include="Scripting\Global\ReinforcementsGlobal.cs" />
|
||||
<Compile Include="Scripting\Global\TriggerGlobal.cs" />
|
||||
<Compile Include="Scripting\Global\UtilsGlobal.cs" />
|
||||
<Compile Include="Scripting\Properties\DiplomacyProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\HealthProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\PowerProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\ResourceProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\UpgradeProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\AirstrikeProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\ProductionProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\CombatProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\DiplomacyProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\HarvesterProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\HealthProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\HelicopterProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\GeneralProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\GuardProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\MissionObjectiveProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\MobileProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\GeneralProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\CombatProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\PlayerProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\HelicopterProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\PlaneProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\TransformProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\PlayerProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\PowerProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\ProductionProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\RepairableBuildingProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\GuardProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\ResourceProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\TransformProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\TransportProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\UpgradeProperties.cs" />
|
||||
<Compile Include="TraitsInterfaces.cs" />
|
||||
<Compile Include="Traits\AcceptsSupplies.cs" />
|
||||
<Compile Include="Traits\Air\Aircraft.cs" />
|
||||
<Compile Include="Traits\Air\AttackBomber.cs" />
|
||||
<Compile Include="Traits\Air\AttackHeli.cs" />
|
||||
@@ -235,6 +239,7 @@
|
||||
<Compile Include="Traits\Attack\AttackCharge.cs" />
|
||||
<Compile Include="Traits\Attack\AttackFollow.cs" />
|
||||
<Compile Include="Traits\Attack\AttackFrontal.cs" />
|
||||
<Compile Include="Traits\Attack\AttackGarrisoned.cs" />
|
||||
<Compile Include="Traits\Attack\AttackMedic.cs" />
|
||||
<Compile Include="Traits\Attack\AttackOmni.cs" />
|
||||
<Compile Include="Traits\Attack\AttackTurreted.cs" />
|
||||
@@ -271,6 +276,7 @@
|
||||
<Compile Include="Traits\Cargo.cs" />
|
||||
<Compile Include="Traits\CashTrickler.cs" />
|
||||
<Compile Include="Traits\Cloak.cs" />
|
||||
<Compile Include="Traits\CombatDebugOverlay.cs" />
|
||||
<Compile Include="Traits\Crates\Crate.cs" />
|
||||
<Compile Include="Traits\Crates\CrateAction.cs" />
|
||||
<Compile Include="Traits\Crates\DuplicateUnitCrateAction.cs" />
|
||||
@@ -285,32 +291,33 @@
|
||||
<Compile Include="Traits\Crates\RevealMapCrateAction.cs" />
|
||||
<Compile Include="Traits\Crates\SupportPowerCrateAction.cs" />
|
||||
<Compile Include="Traits\Crushable.cs" />
|
||||
<Compile Include="Traits\EmitInfantryOnSell.cs" />
|
||||
<Compile Include="Traits\ExternalCapturable.cs" />
|
||||
<Compile Include="Traits\ExternalCapturableBar.cs" />
|
||||
<Compile Include="Traits\ExternalCaptures.cs" />
|
||||
<Compile Include="Traits\Harvester.cs" />
|
||||
<Compile Include="Traits\IgnoresCloak.cs" />
|
||||
<Compile Include="Traits\IgnoresDisguise.cs" />
|
||||
<Compile Include="Traits\DetectCloaked.cs" />
|
||||
<Compile Include="Traits\EngineerRepair.cs" />
|
||||
<Compile Include="Traits\Explodes.cs" />
|
||||
<Compile Include="Traits\Guard.cs" />
|
||||
<Compile Include="Traits\Guardable.cs" />
|
||||
<Compile Include="Traits\GainsExperience.cs" />
|
||||
<Compile Include="Traits\GivesBounty.cs" />
|
||||
<Compile Include="Traits\GivesExperience.cs" />
|
||||
<Compile Include="Traits\Huntable.cs" />
|
||||
<Compile Include="Traits\CustomBuildTimeValue.cs" />
|
||||
<Compile Include="Traits\CustomSellValue.cs" />
|
||||
<Compile Include="Traits\Demolishable.cs" />
|
||||
<Compile Include="Traits\DetectCloaked.cs" />
|
||||
<Compile Include="Traits\EjectOnDeath.cs" />
|
||||
<Compile Include="Traits\EmitInfantryOnSell.cs" />
|
||||
<Compile Include="Traits\EngineerRepair.cs" />
|
||||
<Compile Include="Traits\Explodes.cs" />
|
||||
<Compile Include="Traits\ExternalCapturable.cs" />
|
||||
<Compile Include="Traits\ExternalCapturableBar.cs" />
|
||||
<Compile Include="Traits\ExternalCaptures.cs" />
|
||||
<Compile Include="Traits\GainsExperience.cs" />
|
||||
<Compile Include="Traits\GivesBounty.cs" />
|
||||
<Compile Include="Traits\GivesExperience.cs" />
|
||||
<Compile Include="Traits\GlobalUpgradable.cs" />
|
||||
<Compile Include="Traits\Guard.cs" />
|
||||
<Compile Include="Traits\Guardable.cs" />
|
||||
<Compile Include="Traits\Harvester.cs" />
|
||||
<Compile Include="Traits\Husk.cs" />
|
||||
<Compile Include="Traits\Huntable.cs" />
|
||||
<Compile Include="Traits\IgnoresCloak.cs" />
|
||||
<Compile Include="Traits\IgnoresDisguise.cs" />
|
||||
<Compile Include="Traits\Immobile.cs" />
|
||||
<Compile Include="Traits\Infantry\ScaredyCat.cs" />
|
||||
<Compile Include="Traits\Infantry\TakeCover.cs" />
|
||||
<Compile Include="Traits\Invulnerable.cs" />
|
||||
<Compile Include="Traits\Infantry\TerrainModifiesDamage.cs" />
|
||||
<Compile Include="Traits\Invulnerable.cs" />
|
||||
<Compile Include="Traits\JamsMissiles.cs" />
|
||||
<Compile Include="Traits\KillsSelf.cs" />
|
||||
<Compile Include="Traits\LimitedAmmo.cs" />
|
||||
@@ -368,18 +375,18 @@
|
||||
<Compile Include="Traits\Render\RenderHarvester.cs" />
|
||||
<Compile Include="Traits\Render\RenderInfantry.cs" />
|
||||
<Compile Include="Traits\Render\RenderNameTag.cs" />
|
||||
<Compile Include="Traits\Render\ProductionBar.cs" />
|
||||
<Compile Include="Traits\Render\RenderSimple.cs" />
|
||||
<Compile Include="Traits\Render\RenderSprites.cs" />
|
||||
<Compile Include="Traits\Render\RenderUnit.cs" />
|
||||
<Compile Include="Traits\Render\SupportPowerChargeBar.cs" />
|
||||
<Compile Include="Traits\Render\TimedUpgradeBar.cs" />
|
||||
<Compile Include="Traits\Render\WithBarrel.cs" />
|
||||
<Compile Include="Traits\Render\WithBuildingExplosion.cs" />
|
||||
<Compile Include="Traits\Render\RenderBuildingSilo.cs" />
|
||||
<Compile Include="Traits\Render\RenderBuildingWall.cs" />
|
||||
<Compile Include="Traits\Render\RenderDetectionCircle.cs" />
|
||||
<Compile Include="Traits\Render\RenderRangeCircle.cs" />
|
||||
<Compile Include="Traits\Render\ProductionBar.cs" />
|
||||
<Compile Include="Traits\Render\SupportPowerChargeBar.cs" />
|
||||
<Compile Include="Traits\Render\TimedUpgradeBar.cs" />
|
||||
<Compile Include="Traits\Render\WithBarrel.cs" />
|
||||
<Compile Include="Traits\Render\WithBuildingExplosion.cs" />
|
||||
<Compile Include="Traits\Render\WithActiveAnimation.cs" />
|
||||
<Compile Include="Traits\Render\WithBuildingPlacedAnimation.cs" />
|
||||
<Compile Include="Traits\Render\WithMakeAnimation.cs" />
|
||||
@@ -396,6 +403,9 @@
|
||||
<Compile Include="Traits\Render\WithShadow.cs" />
|
||||
<Compile Include="Traits\Render\WithSmoke.cs" />
|
||||
<Compile Include="Traits\Render\WithTurret.cs" />
|
||||
<Compile Include="Traits\Render\WithFire.cs" />
|
||||
<Compile Include="Traits\Render\WithBuildingPlacedOverlay.cs" />
|
||||
<Compile Include="Traits\Render\WithProductionOverlay.cs" />
|
||||
<Compile Include="Traits\Repairable.cs" />
|
||||
<Compile Include="Traits\RepairableNear.cs" />
|
||||
<Compile Include="Traits\RepairsBridges.cs" />
|
||||
@@ -411,6 +421,7 @@
|
||||
<Compile Include="Traits\Sound\AnnounceOnSeen.cs" />
|
||||
<Compile Include="Traits\Sound\DeathSounds.cs" />
|
||||
<Compile Include="Traits\Sound\SoundOnDamageTransition.cs" />
|
||||
<Compile Include="Traits\SupplyTruck.cs" />
|
||||
<Compile Include="Traits\SupportPowers\AirstrikePower.cs" />
|
||||
<Compile Include="Traits\SupportPowers\GrantUpgradePower.cs" />
|
||||
<Compile Include="Traits\SupportPowers\NukePower.cs" />
|
||||
@@ -421,6 +432,7 @@
|
||||
<Compile Include="Traits\ThrowsParticle.cs" />
|
||||
<Compile Include="Traits\Tooltip.cs" />
|
||||
<Compile Include="Traits\TransformOnCapture.cs" />
|
||||
<Compile Include="Traits\TransformOnPassenger.cs" />
|
||||
<Compile Include="Traits\Transforms.cs" />
|
||||
<Compile Include="Traits\Turreted.cs" />
|
||||
<Compile Include="Traits\Upgrades\DisableUpgrade.cs" />
|
||||
@@ -462,6 +474,8 @@
|
||||
<Compile Include="Traits\World\StartGameNotification.cs" />
|
||||
<Compile Include="Traits\World\TerrainGeometryOverlay.cs" />
|
||||
<Compile Include="UtilityCommands\ActorStatsExport.cs" />
|
||||
<Compile Include="UtilityCommands\CheckYaml.cs" />
|
||||
<Compile Include="UtilityCommands\CheckCodeStyle.cs" />
|
||||
<Compile Include="UtilityCommands\ConvertPngToShpCommand.cs" />
|
||||
<Compile Include="UtilityCommands\ConvertSpriteToPngCommand.cs" />
|
||||
<Compile Include="UtilityCommands\ExportCharacterSeparatedRules.cs" />
|
||||
@@ -476,6 +490,7 @@
|
||||
<Compile Include="UtilityCommands\ImportLegacyMapCommand.cs" />
|
||||
<Compile Include="UtilityCommands\LegacyMapImporter.cs" />
|
||||
<Compile Include="UtilityCommands\RemapShpCommand.cs" />
|
||||
<Compile Include="UtilityCommands\ReplayMetadataCommand.cs" />
|
||||
<Compile Include="UtilityCommands\UpgradeMapCommand.cs" />
|
||||
<Compile Include="UtilityCommands\UpgradeModCommand.cs" />
|
||||
<Compile Include="UtilityCommands\UpgradeRules.cs" />
|
||||
@@ -572,9 +587,6 @@
|
||||
<Compile Include="SpriteLoaders\ShpD2Loader.cs" />
|
||||
<Compile Include="LoadScreens\LogoStripeLoadScreen.cs" />
|
||||
<Compile Include="LoadScreens\BlankLoadScreen.cs" />
|
||||
<Compile Include="UtilityCommands\CheckYaml.cs" />
|
||||
<Compile Include="UtilityCommands\CheckCodeStyle.cs" />
|
||||
<Compile Include="UtilityCommands\ReplayMetadataCommand.cs" />
|
||||
<Compile Include="Widgets\Logic\ReplayUtils.cs" />
|
||||
<Compile Include="InstallUtils.cs" />
|
||||
<Compile Include="Graphics\DefaultSpriteSequence.cs" />
|
||||
|
||||
@@ -12,7 +12,7 @@ using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Scripting;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Scripting
|
||||
namespace OpenRA.Mods.Common.Scripting
|
||||
{
|
||||
[ScriptPropertyGroup("Harvester")]
|
||||
public class HarvesterProperties : ScriptActorProperties, Requires<HarvesterInfo>
|
||||
@@ -11,11 +11,10 @@
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Scripting;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Scripting
|
||||
namespace OpenRA.Mods.Common.Scripting
|
||||
{
|
||||
[ScriptPropertyGroup("Transports")]
|
||||
public class TransportProperties : ScriptActorProperties, Requires<CargoInfo>
|
||||
@@ -44,44 +43,4 @@ namespace OpenRA.Mods.RA.Scripting
|
||||
Self.QueueActivity(new UnloadCargo(Self, true));
|
||||
}
|
||||
}
|
||||
|
||||
[ScriptPropertyGroup("Transports")]
|
||||
public class ParadropPowers : ScriptActorProperties, Requires<CargoInfo>, Requires<ParaDropInfo>
|
||||
{
|
||||
readonly ParaDrop paradrop;
|
||||
|
||||
public ParadropPowers(ScriptContext context, Actor self)
|
||||
: base(context, self)
|
||||
{
|
||||
paradrop = self.Trait<ParaDrop>();
|
||||
}
|
||||
|
||||
[ScriptActorPropertyActivity]
|
||||
[Desc("Command transport to paradrop passengers near the target cell.")]
|
||||
public void Paradrop(CPos cell)
|
||||
{
|
||||
paradrop.SetLZ(cell, true);
|
||||
Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell)));
|
||||
Self.QueueActivity(new FlyOffMap());
|
||||
Self.QueueActivity(new RemoveSelf());
|
||||
}
|
||||
}
|
||||
|
||||
[ScriptGlobal("Air Support Powers")]
|
||||
public class ParatroopersProperties : ScriptActorProperties, Requires<ParatroopersPowerInfo>
|
||||
{
|
||||
readonly ParatroopersPower pp;
|
||||
|
||||
public ParatroopersProperties(ScriptContext context, Actor self)
|
||||
: base(context, self)
|
||||
{
|
||||
pp = self.TraitsImplementing<ParatroopersPower>().First();
|
||||
}
|
||||
|
||||
[Desc("Activate the actor's Paratroopers Power. Returns the dropped units.")]
|
||||
public Actor[] SendParatroopers(WPos target, bool randomize = true, int facing = 0)
|
||||
{
|
||||
return pp.SendParatroopers(Self, target, randomize, facing);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Tag trait for SupplyTruck: actors.")]
|
||||
[Desc("Tag trait for `SupplyTruck` actors.")]
|
||||
class AcceptsSuppliesInfo : TraitInfo<AcceptsSupplies> { }
|
||||
|
||||
class AcceptsSupplies { }
|
||||
@@ -13,10 +13,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Activities;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class FirePort
|
||||
{
|
||||
@@ -12,12 +12,9 @@ using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Effects;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Displays fireports, muzzle offsets, and hit areas in developer mode.")]
|
||||
public class CombatDebugOverlayInfo : ITraitInfo
|
||||
@@ -27,10 +24,11 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public class CombatDebugOverlay : IPostRender, INotifyDamage
|
||||
{
|
||||
readonly DeveloperMode devMode;
|
||||
|
||||
Lazy<AttackBase> attack;
|
||||
Lazy<IBodyOrientation> coords;
|
||||
Lazy<Health> health;
|
||||
DeveloperMode devMode;
|
||||
|
||||
public CombatDebugOverlay(Actor self)
|
||||
{
|
||||
@@ -9,12 +9,10 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.Mods.Common.Effects;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Eject a ground soldier or a paratrooper while in the air.")]
|
||||
public class EjectOnDeathInfo : TraitInfo<EjectOnDeath>
|
||||
@@ -9,11 +9,9 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.D2k.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Rendered when the actor constructed a building.")]
|
||||
public class WithBuildingPlacedOverlayInfo : ITraitInfo, Requires<RenderSpritesInfo>, Requires<IBodyOrientationInfo>
|
||||
@@ -9,10 +9,9 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Renders a flame sprite on top of the actor.")]
|
||||
class WithFireInfo : ITraitInfo, Requires<RenderSpritesInfo>
|
||||
@@ -11,12 +11,9 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.D2k.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Renders an animation when the Production trait of the actor is activated.",
|
||||
"Works both with per player ClassicProductionQueue and per building ProductionQueue, but needs any of these.")]
|
||||
@@ -10,24 +10,23 @@
|
||||
|
||||
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("Donate money to building if it has the AcceptSupplies: trait.")]
|
||||
[Desc("Donate money to actors with the `AcceptSupplies` trait.")]
|
||||
class SupplyTruckInfo : ITraitInfo
|
||||
{
|
||||
[Desc("The amount of cash the owner of the building recieves.")]
|
||||
[Desc("The amount of cash the owner recieves.")]
|
||||
public readonly int Payload = 500;
|
||||
public object Create(ActorInitializer init) { return new SupplyTruck(this); }
|
||||
}
|
||||
|
||||
class SupplyTruck : IIssueOrder, IResolveOrder, IOrderVoice
|
||||
{
|
||||
SupplyTruckInfo info;
|
||||
readonly SupplyTruckInfo info;
|
||||
|
||||
public SupplyTruck(SupplyTruckInfo info)
|
||||
{
|
||||
@@ -10,10 +10,9 @@
|
||||
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Traits
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class TransformOnPassengerInfo : ITraitInfo
|
||||
{
|
||||
@@ -28,7 +27,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
public class TransformOnPassenger : INotifyPassengerEntered, INotifyPassengerExited
|
||||
{
|
||||
TransformOnPassengerInfo info;
|
||||
readonly TransformOnPassengerInfo info;
|
||||
|
||||
public TransformOnPassenger(TransformOnPassengerInfo info) { this.info = info; }
|
||||
|
||||
@@ -76,11 +76,9 @@
|
||||
<Compile Include="Traits\Buildings\DamagedWithoutFoundation.cs" />
|
||||
<Compile Include="Traits\Buildings\LaysTerrain.cs" />
|
||||
<Compile Include="Traits\Carryable.cs" />
|
||||
<Compile Include="Traits\Render\WithBuildingPlacedOverlay.cs" />
|
||||
<Compile Include="Traits\Render\WithCrumbleOverlay.cs" />
|
||||
<Compile Include="Traits\Render\WithDockingOverlay.cs" />
|
||||
<Compile Include="Traits\Render\WithDeliveryOverlay.cs" />
|
||||
<Compile Include="Traits\Render\WithProductionOverlay.cs" />
|
||||
<Compile Include="Traits\Sandworm.cs" />
|
||||
<Compile Include="Traits\TemporaryOwnerManager.cs" />
|
||||
<Compile Include="Traits\ThrowsShrapnel.cs" />
|
||||
|
||||
@@ -65,54 +65,47 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Traits\AcceptsSupplies.cs" />
|
||||
<Compile Include="Activities\DonateSupplies.cs" />
|
||||
<Compile Include="Activities\Infiltrate.cs" />
|
||||
<Compile Include="Activities\LayMines.cs" />
|
||||
<Compile Include="Activities\Leap.cs" />
|
||||
<Compile Include="Activities\Teleport.cs" />
|
||||
<Compile Include="Effects\GpsDot.cs" />
|
||||
<Compile Include="Effects\GpsSatellite.cs" />
|
||||
<Compile Include="Effects\SatelliteLaunch.cs" />
|
||||
<Compile Include="Effects\TeslaZap.cs" />
|
||||
<Compile Include="Traits\Render\RenderUnitReload.cs" />
|
||||
<Compile Include="Graphics\TeslaZapRenderable.cs" />
|
||||
<Compile Include="Traits\EjectOnDeath.cs" />
|
||||
<Compile Include="Traits\Attack\AttackLeap.cs" />
|
||||
<Compile Include="Traits\PaletteEffects\ChronoshiftPaletteEffect.cs" />
|
||||
<Compile Include="Traits\Chronoshiftable.cs" />
|
||||
<Compile Include="Traits\DemoTruck.cs" />
|
||||
<Compile Include="Effects\GpsDot.cs" />
|
||||
<Compile Include="Traits\MadTank.cs" />
|
||||
<Compile Include="Traits\Mine.cs" />
|
||||
<Compile Include="Traits\Minelayer.cs" />
|
||||
<Compile Include="Traits\PortableChrono.cs" />
|
||||
<Compile Include="Traits\Render\RenderJammerCircle.cs" />
|
||||
<Compile Include="Traits\Render\RenderDisguise.cs" />
|
||||
<Compile Include="Traits\Render\RenderLandingCraft.cs" />
|
||||
<Compile Include="Traits\Disguise.cs" />
|
||||
<Compile Include="Traits\SupplyTruck.cs" />
|
||||
<Compile Include="Traits\SupportPowers\ChronoshiftPower.cs" />
|
||||
<Compile Include="Traits\SupportPowers\GpsPower.cs" />
|
||||
<Compile Include="Traits\SupportPowers\ParatroopersPower.cs" />
|
||||
<Compile Include="Traits\Buildings\Fake.cs" />
|
||||
<Compile Include="Traits\Buildings\ClonesProducedUnits.cs" />
|
||||
<Compile Include="Traits\Chronoshiftable.cs" />
|
||||
<Compile Include="Traits\Cloneable.cs" />
|
||||
<Compile Include="Traits\DemoTruck.cs" />
|
||||
<Compile Include="Traits\Disguise.cs" />
|
||||
<Compile Include="Traits\HarvesterHuskModifier.cs" />
|
||||
<Compile Include="Traits\LeavesHusk.cs" />
|
||||
<Compile Include="Traits\TargetableSubmarine.cs" />
|
||||
<Compile Include="Traits\TransformOnPassenger.cs" />
|
||||
<Compile Include="Traits\Render\RenderShroudCircle.cs" />
|
||||
<Compile Include="Traits\Infiltration\InfiltrateForCash.cs" />
|
||||
<Compile Include="Traits\Infiltration\InfiltrateForExploration.cs" />
|
||||
<Compile Include="Traits\Infiltration\InfiltrateForPowerOutage.cs" />
|
||||
<Compile Include="Traits\Infiltration\InfiltrateForSupportPower.cs" />
|
||||
<Compile Include="Traits\Infiltration\Infiltrates.cs" />
|
||||
<Compile Include="CombatDebugOverlay.cs" />
|
||||
<Compile Include="Traits\Attack\AttackGarrisoned.cs" />
|
||||
<Compile Include="Scripting\Properties\ChronosphereProperties.cs" />
|
||||
<Compile Include="Traits\Buildings\ClonesProducedUnits.cs" />
|
||||
<Compile Include="Traits\Cloneable.cs" />
|
||||
<Compile Include="Scripting\Properties\HarvesterProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\TransportProperties.cs" />
|
||||
<Compile Include="Traits\InvulnerabilityUpgrade.cs" />
|
||||
<Compile Include="Traits\MadTank.cs" />
|
||||
<Compile Include="Traits\Mine.cs" />
|
||||
<Compile Include="Traits\Minelayer.cs" />
|
||||
<Compile Include="Traits\PaletteEffects\ChronoshiftPaletteEffect.cs" />
|
||||
<Compile Include="Traits\PortableChrono.cs" />
|
||||
<Compile Include="Traits\Render\RenderJammerCircle.cs" />
|
||||
<Compile Include="Traits\Render\RenderDisguise.cs" />
|
||||
<Compile Include="Traits\Render\RenderLandingCraft.cs" />
|
||||
<Compile Include="Traits\Render\RenderShroudCircle.cs" />
|
||||
<Compile Include="Traits\Render\RenderUnitReload.cs" />
|
||||
<Compile Include="Traits\SupportPowers\ChronoshiftPower.cs" />
|
||||
<Compile Include="Traits\SupportPowers\GpsPower.cs" />
|
||||
<Compile Include="Traits\SupportPowers\ParatroopersPower.cs" />
|
||||
<Compile Include="Traits\LeavesHusk.cs" />
|
||||
<Compile Include="Traits\TargetableSubmarine.cs" />
|
||||
<Compile Include="Scripting\Properties\ChronosphereProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\ParadropProperties.cs" />
|
||||
<Compile Include="Scripting\Properties\ParatroopersProperties.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||
|
||||
41
OpenRA.Mods.RA/Scripting/Properties/ParadropProperties.cs
Normal file
41
OpenRA.Mods.RA/Scripting/Properties/ParadropProperties.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2015 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.Linq;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Scripting;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Scripting
|
||||
{
|
||||
[ScriptPropertyGroup("Paradrop")]
|
||||
public class ParadropProperties : ScriptActorProperties, Requires<CargoInfo>, Requires<ParaDropInfo>
|
||||
{
|
||||
readonly ParaDrop paradrop;
|
||||
|
||||
public ParadropProperties(ScriptContext context, Actor self)
|
||||
: base(context, self)
|
||||
{
|
||||
paradrop = self.Trait<ParaDrop>();
|
||||
}
|
||||
|
||||
[ScriptActorPropertyActivity]
|
||||
[Desc("Command transport to paradrop passengers near the target cell.")]
|
||||
public void Paradrop(CPos cell)
|
||||
{
|
||||
paradrop.SetLZ(cell, true);
|
||||
Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell)));
|
||||
Self.QueueActivity(new FlyOffMap());
|
||||
Self.QueueActivity(new RemoveSelf());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2015 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.Linq;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Scripting;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Scripting
|
||||
{
|
||||
[ScriptPropertyGroup("Paratroopers")]
|
||||
public class ParatroopersProperties : ScriptActorProperties, Requires<ParatroopersPowerInfo>
|
||||
{
|
||||
readonly ParatroopersPower pp;
|
||||
|
||||
public ParatroopersProperties(ScriptContext context, Actor self)
|
||||
: base(context, self)
|
||||
{
|
||||
pp = self.TraitsImplementing<ParatroopersPower>().First();
|
||||
}
|
||||
|
||||
[Desc("Activate the actor's Paratroopers Power. Returns the dropped units.")]
|
||||
public Actor[] SendParatroopers(WPos target, bool randomize = true, int facing = 0)
|
||||
{
|
||||
return pp.SendParatroopers(Self, target, randomize, facing);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
if (turreted != null)
|
||||
td.Add(new TurretFacingInit(turreted.TurretFacing));
|
||||
|
||||
var chronoshiftable = self.TraitOrDefault<Chronoshiftable>();
|
||||
var chronoshiftable = self.TraitOrDefault<Chronoshiftable>(); // TODO: untie this and move to Mods.Common
|
||||
if (chronoshiftable != null && chronoshiftable.ReturnTicks > 0)
|
||||
{
|
||||
td.Add(new ChronoshiftOriginInit(chronoshiftable.Origin));
|
||||
|
||||
@@ -86,7 +86,6 @@ Assemblies:
|
||||
./mods/common/OpenRA.Mods.Common.dll
|
||||
./mods/ra/OpenRA.Mods.RA.dll
|
||||
./mods/cnc/OpenRA.Mods.Cnc.dll
|
||||
./mods/d2k/OpenRA.Mods.D2k.dll
|
||||
|
||||
ChromeLayout:
|
||||
./mods/cnc/chrome/install.yaml
|
||||
|
||||
@@ -74,7 +74,6 @@ Assemblies:
|
||||
./mods/common/OpenRA.Mods.Common.dll
|
||||
./mods/ra/OpenRA.Mods.RA.dll
|
||||
./mods/cnc/OpenRA.Mods.Cnc.dll
|
||||
./mods/d2k/OpenRA.Mods.D2k.dll
|
||||
|
||||
ChromeLayout:
|
||||
./mods/ra/chrome/install.yaml
|
||||
|
||||
@@ -103,7 +103,6 @@ Chrome:
|
||||
Assemblies:
|
||||
./mods/common/OpenRA.Mods.Common.dll
|
||||
./mods/ra/OpenRA.Mods.RA.dll
|
||||
./mods/d2k/OpenRA.Mods.D2k.dll
|
||||
./mods/cnc/OpenRA.Mods.Cnc.dll
|
||||
./mods/ts/OpenRA.Mods.TS.dll
|
||||
|
||||
|
||||
Reference in New Issue
Block a user