Move PlayerExperience from Infiltrates to InfiltrateFor
This commit is contained in:
committed by
Matthias Mailänder
parent
3207d01cf2
commit
4cd4e1f8ea
@@ -22,6 +22,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
||||
public readonly BitSet<TargetableType> Types = default;
|
||||
|
||||
[Desc("Experience to grant to the infiltrating player.")]
|
||||
public readonly int PlayerExperience = 0;
|
||||
|
||||
[NotificationReference("Speech")]
|
||||
[Desc("Sound the victim will hear when they get sabotaged.")]
|
||||
public readonly string InfiltratedNotification = null;
|
||||
@@ -62,6 +65,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);
|
||||
|
||||
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
|
||||
var preventReset = self.Owner.PlayerActor.TraitsImplementing<IPreventsShroudReset>()
|
||||
.Any(p => p.PreventShroudReset(self));
|
||||
|
||||
Reference in New Issue
Block a user