Rename IAcceptInfiltrator to INotifyInfiltrated

This commit is contained in:
ScottNZ
2014-08-01 22:47:18 +12:00
parent 058185754e
commit ca4b947037
5 changed files with 10 additions and 10 deletions

View File

@@ -81,9 +81,9 @@ namespace OpenRA.Traits
public interface INotifyEffectiveOwnerChanged { void OnEffectiveOwnerChanged(Actor self, Player oldEffectiveOwner, Player newEffectiveOwner); }
public interface INotifyCapture { void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner); }
public interface INotifyHarvest { void Harvested(Actor self, ResourceType resource); }
public interface ISeedableResource { void Seed(Actor self); }
public interface INotifyInfiltrated { void Infiltrated(Actor self, Actor infiltrator); }
public interface IAcceptInfiltrator { void OnInfiltrate(Actor self, Actor infiltrator); }
public interface ISeedableResource { void Seed(Actor self); }
public interface IDemolishableInfo { bool IsValidTarget(ActorInfo actorInfo, Actor saboteur); }
public interface IDemolishable

View File

@@ -23,8 +23,8 @@ namespace OpenRA.Mods.RA.Activities
if (IsCanceled || target.Type != TargetType.Actor || target.Actor.Owner == self.Owner)
return NextActivity;
foreach (var t in target.Actor.TraitsImplementing<IAcceptInfiltrator>())
t.OnInfiltrate(target.Actor, self);
foreach (var t in target.Actor.TraitsImplementing<INotifyInfiltrated>())
t.Infiltrated(target.Actor, self);
self.Destroy();

View File

@@ -24,13 +24,13 @@ namespace OpenRA.Mods.RA
public object Create(ActorInitializer init) { return new InfiltrateForCash(this); }
}
class InfiltrateForCash : IAcceptInfiltrator
class InfiltrateForCash : INotifyInfiltrated
{
readonly InfiltrateForCashInfo info;
public InfiltrateForCash(InfiltrateForCashInfo info) { this.info = info; }
public void OnInfiltrate(Actor self, Actor infiltrator)
public void Infiltrated(Actor self, Actor infiltrator)
{
var targetResources = self.Owner.PlayerActor.Trait<PlayerResources>();
var spyResources = infiltrator.Owner.PlayerActor.Trait<PlayerResources>();

View File

@@ -14,9 +14,9 @@ namespace OpenRA.Mods.RA
{
class InfiltrateForExplorationInfo : TraitInfo<InfiltrateForExploration> { }
class InfiltrateForExploration : IAcceptInfiltrator
class InfiltrateForExploration : INotifyInfiltrated
{
public void OnInfiltrate(Actor self, Actor infiltrator)
public void Infiltrated(Actor self, Actor infiltrator)
{
// Steal and reset the owners exploration
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA
public object Create(ActorInitializer init) { return new InfiltrateForSupportPower(this); }
}
class InfiltrateForSupportPower : IAcceptInfiltrator
class InfiltrateForSupportPower : INotifyInfiltrated
{
readonly InfiltrateForSupportPowerInfo info;
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA
this.info = info;
}
public void OnInfiltrate(Actor self, Actor infiltrator)
public void Infiltrated(Actor self, Actor infiltrator)
{
infiltrator.World.AddFrameEndTask(w => w.CreateActor(info.Proxy, new TypeDictionary
{