Make DonateSupplies grant player experience

This commit is contained in:
Oliver Brakmann
2016-07-10 13:13:46 +02:00
parent 25c640679c
commit c1729a3b70
2 changed files with 12 additions and 2 deletions

View File

@@ -23,6 +23,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("The amount of cash the owner receives.")]
public readonly int Payload = 500;
[Desc("The amount of experience the donating player receives.")]
public readonly int PlayerExperience = 0;
[VoiceReference] public readonly string Voice = "Action";
public object Create(ActorInitializer init) { return new SupplyTruck(this); }
@@ -71,7 +74,7 @@ namespace OpenRA.Mods.Common.Traits
self.CancelActivity();
self.SetTargetLine(target, Color.Yellow);
self.QueueActivity(new DonateSupplies(self, target.Actor, info.Payload));
self.QueueActivity(new DonateSupplies(self, target.Actor, info.Payload, info.PlayerExperience));
}
class SupplyTruckOrderTargeter : UnitOrderTargeter