InfiltrateForSupportPower / Sonar pulse.
This commit is contained in:
@@ -10,30 +10,31 @@
|
||||
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class InfiltrateForSupportPowerInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Power = null;
|
||||
[ActorReference]
|
||||
public readonly string Proxy = null;
|
||||
public object Create(ActorInitializer init) { return new InfiltrateForSupportPower(this); }
|
||||
}
|
||||
|
||||
class InfiltrateForSupportPower : IAcceptSpy
|
||||
{
|
||||
InfiltrateForSupportPowerInfo info;
|
||||
InfiltrateForSupportPowerInfo Info;
|
||||
public InfiltrateForSupportPower(InfiltrateForSupportPowerInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
Info = info;
|
||||
}
|
||||
|
||||
public void OnInfiltrate(Actor self, Actor spy)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
//var p = spy.Owner.PlayerActor.TraitsImplementing<SupportPower>()
|
||||
// .FirstOrDefault(sp => sp.GetType().Name == info.Power);
|
||||
//
|
||||
//if (p != null) p.Give(1);
|
||||
spy.World.AddFrameEndTask(w => w.CreateActor(Info.Proxy, new TypeDictionary
|
||||
{
|
||||
new OwnerInit( spy.Owner )
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user