Make INotifyInfiltrated require explicit implementation

This commit is contained in:
reaperrr
2016-10-20 20:52:53 +02:00
parent 0f02a6ba7c
commit d9ecba7b60
7 changed files with 10 additions and 8 deletions

View File

@@ -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>();

View File

@@ -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);
}

View File

@@ -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)

View File

@@ -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>();
}

View File

@@ -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
{