Make repairing buildings and units grant experience
Using the repair button and repair pad, not using engineers and mechanics.
This commit is contained in:
@@ -49,6 +49,13 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
if (health.DamageState == DamageState.Undamaged)
|
||||
{
|
||||
if (host.Owner != self.Owner)
|
||||
{
|
||||
var exp = host.Owner.PlayerActor.TraitOrDefault<PlayerExperience>();
|
||||
if (exp != null)
|
||||
exp.GiveExperience(repairsUnits.PlayerExperience);
|
||||
}
|
||||
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", repairsUnits.FinishRepairingNotification, self.Owner.Faction.InternalName);
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user