Make INotifyInfiltrated require explicit implementation
This commit is contained in:
@@ -302,7 +302,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
OnCapturedInternal(self);
|
||||
}
|
||||
|
||||
public void Infiltrated(Actor self, Actor infiltrator)
|
||||
void INotifyInfiltrated.Infiltrated(Actor self, Actor infiltrator)
|
||||
{
|
||||
if (world.Disposing)
|
||||
return;
|
||||
|
||||
@@ -82,11 +82,13 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public interface INotifyDocking { void Docked(Actor self, Actor harvester); void Undocked(Actor self, Actor harvester); }
|
||||
public interface INotifyParachuteLanded { void OnLanded(Actor ignore); }
|
||||
public interface INotifyCapture { void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner); }
|
||||
public interface INotifyInfiltrated { void Infiltrated(Actor self, Actor infiltrator); }
|
||||
public interface INotifyDiscovered { void OnDiscovered(Actor self, Player discoverer, bool playNotification); }
|
||||
public interface IRenderActorPreviewInfo : ITraitInfo { IEnumerable<IActorPreview> RenderPreview(ActorPreviewInitializer init); }
|
||||
public interface ICruiseAltitudeInfo : ITraitInfo { WDist GetCruiseAltitude(); }
|
||||
|
||||
[RequireExplicitImplementation]
|
||||
public interface INotifyInfiltrated { void Infiltrated(Actor self, Actor infiltrator); }
|
||||
|
||||
[RequireExplicitImplementation]
|
||||
public interface INotifyBlockingMove { void OnNotifyBlockingMove(Actor self, Actor blocking); }
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
public InfiltrateForCash(InfiltrateForCashInfo info) { this.info = info; }
|
||||
|
||||
public void Infiltrated(Actor self, Actor infiltrator)
|
||||
void INotifyInfiltrated.Infiltrated(Actor self, Actor infiltrator)
|
||||
{
|
||||
var targetResources = self.Owner.PlayerActor.Trait<PlayerResources>();
|
||||
var spyResources = infiltrator.Owner.PlayerActor.Trait<PlayerResources>();
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
public InfiltrateForDecoration(Actor self, InfiltrateForDecorationInfo info)
|
||||
: base(self, info) { }
|
||||
|
||||
public void Infiltrated(Actor self, Actor infiltrator)
|
||||
void INotifyInfiltrated.Infiltrated(Actor self, Actor infiltrator)
|
||||
{
|
||||
infiltrators.Add(infiltrator.Owner);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
class InfiltrateForExploration : INotifyInfiltrated
|
||||
{
|
||||
public void Infiltrated(Actor self, Actor infiltrator)
|
||||
void INotifyInfiltrated.Infiltrated(Actor self, Actor infiltrator)
|
||||
{
|
||||
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
|
||||
if (!self.Owner.HasFogVisibility)
|
||||
|
||||
@@ -32,12 +32,12 @@ namespace OpenRA.Mods.RA.Traits
|
||||
playerPower = self.Owner.PlayerActor.Trait<PowerManager>();
|
||||
}
|
||||
|
||||
public void Infiltrated(Actor self, Actor infiltrator)
|
||||
void INotifyInfiltrated.Infiltrated(Actor self, Actor infiltrator)
|
||||
{
|
||||
playerPower.TriggerPowerOutage(info.Duration);
|
||||
}
|
||||
|
||||
public void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
|
||||
void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
|
||||
{
|
||||
playerPower = self.Owner.PlayerActor.Trait<PowerManager>();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void Infiltrated(Actor self, Actor infiltrator)
|
||||
void INotifyInfiltrated.Infiltrated(Actor self, Actor infiltrator)
|
||||
{
|
||||
infiltrator.World.AddFrameEndTask(w => w.CreateActor(info.Proxy, new TypeDictionary
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user