Move PlayerExperience from Infiltrates to InfiltrateFor

This commit is contained in:
Gustas
2023-05-30 20:15:07 +03:00
committed by Matthias Mailänder
parent 3207d01cf2
commit 4cd4e1f8ea
17 changed files with 167 additions and 19 deletions

View File

@@ -64,9 +64,6 @@ namespace OpenRA.Mods.Cnc.Activities
foreach (var t in targetActor.TraitsImplementing<INotifyInfiltrated>())
t.Infiltrated(targetActor, self, infiltrates.Info.Types);
var exp = self.Owner.PlayerActor.TraitOrDefault<PlayerExperience>();
exp?.GiveExperience(infiltrates.Info.PlayerExperience);
if (!string.IsNullOrEmpty(infiltrates.Info.Notification))
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
infiltrates.Info.Notification, self.Owner.Faction.InternalName);