Move PlayerExperience from Infiltrates to InfiltrateFor
This commit is contained in:
committed by
Matthias Mailänder
parent
3207d01cf2
commit
4cd4e1f8ea
@@ -25,6 +25,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Sound the victim will hear when they get sabotaged.")]
|
||||
public readonly string InfiltratedNotification = null;
|
||||
|
||||
[Desc("Experience to grant to the infiltrating player.")]
|
||||
public readonly int PlayerExperience = 0;
|
||||
|
||||
[Desc("Text notification the victim will see when they get sabotaged.")]
|
||||
public readonly string InfiltratedTextNotification = null;
|
||||
|
||||
@@ -61,6 +64,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
TextNotificationsManager.AddTransientLine(info.InfiltratedTextNotification, self.Owner);
|
||||
TextNotificationsManager.AddTransientLine(info.InfiltrationTextNotification, infiltrator.Owner);
|
||||
|
||||
infiltrator.Owner.PlayerActor.TraitOrDefault<PlayerExperience>()?.GiveExperience(info.PlayerExperience);
|
||||
|
||||
var manager = self.Owner.PlayerActor.Trait<SupportPowerManager>();
|
||||
var powers = manager.GetPowersForActor(self).Where(sp => !sp.Disabled);
|
||||
foreach (var power in powers)
|
||||
|
||||
Reference in New Issue
Block a user