Make IPowerModifier require explicit implementation

Plus some 'collateral' explicit implementations on the affected traits.
This commit is contained in:
reaperrr
2016-10-22 22:13:08 +02:00
parent 2d0560dcb7
commit ad6ea52bff
5 changed files with 15 additions and 10 deletions

View File

@@ -26,9 +26,11 @@ namespace OpenRA.Mods.Common.Traits
public PowerMultiplier(Actor self, PowerMultiplierInfo info)
: base(info, "PowerMultiplier", self.Info.Name) { power = self.Owner.PlayerActor.Trait<PowerManager>(); }
public int GetPowerModifier() { return GetModifier(); }
int IPowerModifier.GetPowerModifier() { return GetModifier(); }
protected override void Update(Actor self) { power.UpdateActor(self); }
public void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
{
power = newOwner.PlayerActor.Trait<PowerManager>();
}