Move PlayerExperience from Infiltrates to InfiltrateFor
This commit is contained in:
committed by
Matthias Mailänder
parent
3207d01cf2
commit
4cd4e1f8ea
@@ -28,6 +28,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public readonly bool SkipMakeAnims = true;
|
||||
|
||||
[Desc("Experience to grant to the infiltrating player.")]
|
||||
public readonly int PlayerExperience = 0;
|
||||
|
||||
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
||||
public readonly BitSet<TargetableType> Types = default;
|
||||
|
||||
@@ -61,6 +64,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
if (facing != null)
|
||||
transform.Facing = facing.Facing;
|
||||
|
||||
infiltrator.Owner.PlayerActor.TraitOrDefault<PlayerExperience>()?.GiveExperience(info.PlayerExperience);
|
||||
|
||||
self.QueueActivity(false, transform);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user