InfiltrateForSupportPower / Sonar pulse.
This commit is contained in:
@@ -16,6 +16,7 @@ namespace OpenRA.Mods.RA.Crates
|
|||||||
{
|
{
|
||||||
class SupportPowerCrateActionInfo : CrateActionInfo
|
class SupportPowerCrateActionInfo : CrateActionInfo
|
||||||
{
|
{
|
||||||
|
[ActorReference]
|
||||||
public readonly string Proxy = null;
|
public readonly string Proxy = null;
|
||||||
public override object Create(ActorInitializer init) { return new SupportPowerCrateAction(init.self, this); }
|
public override object Create(ActorInitializer init) { return new SupportPowerCrateAction(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,30 +10,31 @@
|
|||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
using OpenRA.FileFormats;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class InfiltrateForSupportPowerInfo : ITraitInfo
|
class InfiltrateForSupportPowerInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly string Power = null;
|
[ActorReference]
|
||||||
|
public readonly string Proxy = null;
|
||||||
public object Create(ActorInitializer init) { return new InfiltrateForSupportPower(this); }
|
public object Create(ActorInitializer init) { return new InfiltrateForSupportPower(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrateForSupportPower : IAcceptSpy
|
class InfiltrateForSupportPower : IAcceptSpy
|
||||||
{
|
{
|
||||||
InfiltrateForSupportPowerInfo info;
|
InfiltrateForSupportPowerInfo Info;
|
||||||
public InfiltrateForSupportPower(InfiltrateForSupportPowerInfo info)
|
public InfiltrateForSupportPower(InfiltrateForSupportPowerInfo info)
|
||||||
{
|
{
|
||||||
this.info = info;
|
Info = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnInfiltrate(Actor self, Actor spy)
|
public void OnInfiltrate(Actor self, Actor spy)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
spy.World.AddFrameEndTask(w => w.CreateActor(Info.Proxy, new TypeDictionary
|
||||||
//var p = spy.Owner.PlayerActor.TraitsImplementing<SupportPower>()
|
{
|
||||||
// .FirstOrDefault(sp => sp.GetType().Name == info.Power);
|
new OwnerInit( spy.Owner )
|
||||||
//
|
}));
|
||||||
//if (p != null) p.Give(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ GAP:
|
|||||||
|
|
||||||
SPEN:
|
SPEN:
|
||||||
InfiltrateForSupportPower:
|
InfiltrateForSupportPower:
|
||||||
Power: SonarPulsePower
|
Proxy: powerproxy.sonarpulse
|
||||||
Inherits: ^Building
|
Inherits: ^Building
|
||||||
Valued:
|
Valued:
|
||||||
Cost: 650
|
Cost: 650
|
||||||
@@ -120,7 +120,7 @@ SPEN:
|
|||||||
|
|
||||||
SYRD:
|
SYRD:
|
||||||
InfiltrateForSupportPower:
|
InfiltrateForSupportPower:
|
||||||
Power: SonarPulsePower
|
Proxy: powerproxy.sonarpulse
|
||||||
Inherits: ^Building
|
Inherits: ^Building
|
||||||
Buildable:
|
Buildable:
|
||||||
Queue: Building
|
Queue: Building
|
||||||
|
|||||||
@@ -25,14 +25,6 @@ Player:
|
|||||||
BuildSpeed: .4
|
BuildSpeed: .4
|
||||||
LowPowerSlowdown: 3
|
LowPowerSlowdown: 3
|
||||||
PlaceBuilding:
|
PlaceBuilding:
|
||||||
# SonarPulsePower:
|
|
||||||
# Image: sonricon
|
|
||||||
# ChargeTime: 10
|
|
||||||
# Description: Sonar Pulse (Single Use)
|
|
||||||
# LongDesc: Reveals all submarines on the map for a \nshort time.
|
|
||||||
# OneShot: yes
|
|
||||||
# EndChargeSound: pulse1.aud
|
|
||||||
# SelectTargetSound: slcttgt1.aud
|
|
||||||
SupportPowerManager:
|
SupportPowerManager:
|
||||||
ConquestVictoryConditions:
|
ConquestVictoryConditions:
|
||||||
PowerManager:
|
PowerManager:
|
||||||
@@ -225,8 +217,7 @@ CRATE:
|
|||||||
Effect: reveal-map
|
Effect: reveal-map
|
||||||
SupportPowerCrateAction@parabombs:
|
SupportPowerCrateAction@parabombs:
|
||||||
SelectionShares: 50000
|
SelectionShares: 50000
|
||||||
Proxy: crateproxy.parabombs
|
Proxy: powerproxy.parabombs
|
||||||
RequiresRace: no
|
|
||||||
GiveMcvCrateAction:
|
GiveMcvCrateAction:
|
||||||
SelectionShares: 2
|
SelectionShares: 2
|
||||||
NoBaseSelectionShares: 9001
|
NoBaseSelectionShares: 9001
|
||||||
@@ -274,7 +265,7 @@ FLARE:
|
|||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Flare
|
Name: Flare
|
||||||
|
|
||||||
crateproxy.parabombs:
|
powerproxy.parabombs:
|
||||||
AirstrikePower:
|
AirstrikePower:
|
||||||
Image: pbmbicon
|
Image: pbmbicon
|
||||||
Description: Parabombs (Single Use)
|
Description: Parabombs (Single Use)
|
||||||
@@ -283,4 +274,14 @@ crateproxy.parabombs:
|
|||||||
AllowMultiple: yes
|
AllowMultiple: yes
|
||||||
UnitType: badr.bomber
|
UnitType: badr.bomber
|
||||||
SelectTargetSound: slcttgt1.aud
|
SelectTargetSound: slcttgt1.aud
|
||||||
FlareType: flare
|
FlareType: flare
|
||||||
|
|
||||||
|
powerproxy.sonarpulse:
|
||||||
|
SonarPulsePower:
|
||||||
|
Image: sonricon
|
||||||
|
Description: Sonar Pulse (Single Use)
|
||||||
|
LongDesc: Reveals all submarines on the map for a \nshort time.
|
||||||
|
AllowMultiple: yes
|
||||||
|
OneShot: yes
|
||||||
|
EndChargeSound: pulse1.aud
|
||||||
|
SelectTargetSound: slcttgt1.aud
|
||||||
Reference in New Issue
Block a user