Require explicit implementation of INotifyObjectivesUpdated

This commit is contained in:
Oliver Brakmann
2018-11-01 21:48:35 +01:00
committed by Paul Chote
parent d10d48c25f
commit e71a31925f
5 changed files with 21 additions and 20 deletions

View File

@@ -68,7 +68,7 @@ namespace OpenRA.Mods.Common.Traits
mo.MarkCompleted(self.Owner, objectiveID);
}
public void OnPlayerLost(Player player)
void INotifyObjectivesUpdated.OnPlayerLost(Player player)
{
foreach (var a in player.World.ActorsWithTrait<INotifyOwnerLost>().Where(a => a.Actor.Owner == player))
a.Trait.OnOwnerLost(a.Actor);
@@ -84,7 +84,7 @@ namespace OpenRA.Mods.Common.Traits
});
}
public void OnPlayerWon(Player player)
void INotifyObjectivesUpdated.OnPlayerWon(Player player)
{
if (info.SuppressNotifications)
return;
@@ -97,8 +97,8 @@ namespace OpenRA.Mods.Common.Traits
});
}
public void OnObjectiveAdded(Player player, int id) { }
public void OnObjectiveCompleted(Player player, int id) { }
public void OnObjectiveFailed(Player player, int id) { }
void INotifyObjectivesUpdated.OnObjectiveAdded(Player player, int id) { }
void INotifyObjectivesUpdated.OnObjectiveCompleted(Player player, int id) { }
void INotifyObjectivesUpdated.OnObjectiveFailed(Player player, int id) { }
}
}