More misc explicit interface implementations

By-product from making ITick explicit in various places.
This commit is contained in:
reaperrr
2017-09-07 18:18:04 +02:00
committed by Matthias Mailänder
parent 03c3a5f310
commit 85e60ef77f
7 changed files with 10 additions and 10 deletions

View File

@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Cnc.Traits
} }
} }
public void Created(Actor self) void INotifyCreated.Created(Actor self)
{ {
iPositionable = self.TraitOrDefault<IPositionable>(); iPositionable = self.TraitOrDefault<IPositionable>();
} }

View File

@@ -105,7 +105,7 @@ namespace OpenRA.Mods.Cnc.Traits
} }
} }
public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued) Order IIssueOrder.IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)
{ {
if (order.OrderID != "DetonateAttack" && order.OrderID != "Detonate") if (order.OrderID != "DetonateAttack" && order.OrderID != "Detonate")
return null; return null;
@@ -121,7 +121,7 @@ namespace OpenRA.Mods.Cnc.Traits
return new Order("Detonate", self, false); return new Order("Detonate", self, false);
} }
public string VoicePhraseForOrder(Actor self, Order order) string IOrderVoice.VoicePhraseForOrder(Actor self, Order order)
{ {
return info.Voice; return info.Voice;
} }
@@ -170,7 +170,7 @@ namespace OpenRA.Mods.Cnc.Traits
self.QueueActivity(new CallFunc(Detonate)); self.QueueActivity(new CallFunc(Detonate));
} }
public void ResolveOrder(Actor self, Order order) void IResolveOrder.ResolveOrder(Actor self, Order order)
{ {
if (order.OrderString == "DetonateAttack") if (order.OrderString == "DetonateAttack")
{ {

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Cnc.Traits
remainingFrames--; remainingFrames--;
} }
public void AdjustPalette(IReadOnlyDictionary<string, MutablePalette> palettes) void IPaletteModifier.AdjustPalette(IReadOnlyDictionary<string, MutablePalette> palettes)
{ {
if (remainingFrames == 0) if (remainingFrames == 0)
return; return;

View File

@@ -103,7 +103,7 @@ namespace OpenRA.Mods.Cnc.Traits
} }
} }
public string VoicePhraseForOrder(Actor self, Order order) string IOrderVoice.VoicePhraseForOrder(Actor self, Order order)
{ {
return order.OrderString == "PortableChronoTeleport" && CanTeleport ? Info.Voice : null; return order.OrderString == "PortableChronoTeleport" && CanTeleport ? Info.Voice : null;
} }

View File

@@ -77,7 +77,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
size = new int2(s, s); size = new int2(s, s);
} }
public int2 SelectionSize(Actor self) { return size; } int2 IAutoSelectionSize.SelectionSize(Actor self) { return size; }
void ITick.Tick(Actor self) void ITick.Tick(Actor self)
{ {

View File

@@ -46,6 +46,7 @@ namespace OpenRA.Mods.D2k.Traits
public bool IsAttacking; public bool IsAttacking;
int targetCountdown; int targetCountdown;
bool disposed;
public Sandworm(Actor self, SandwormInfo info) public Sandworm(Actor self, SandwormInfo info)
: base(self, info) : base(self, info)
@@ -134,8 +135,7 @@ namespace OpenRA.Mods.D2k.Traits
IsMovingTowardTarget = true; IsMovingTowardTarget = true;
} }
bool disposed; void INotifyActorDisposing.Disposing(Actor self)
public void Disposing(Actor self)
{ {
if (disposed) if (disposed)
return; return;

View File

@@ -59,7 +59,7 @@ namespace OpenRA.Mods.D2k.Traits
} }
} }
public void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner) void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
{ {
if (changingOwner == null || changingOwner != newOwner) if (changingOwner == null || changingOwner != newOwner)
originalOwner = newOwner; // It wasn't a temporary change, so we need to update here originalOwner = newOwner; // It wasn't a temporary change, so we need to update here