Add RepairSound to EngineerRepair.

This commit is contained in:
Mustafa Alperen Seki
2019-04-13 20:30:25 +03:00
committed by reaperrr
parent 0f9a157943
commit e63f52c43f
2 changed files with 5 additions and 0 deletions

View File

@@ -63,6 +63,8 @@ namespace OpenRA.Mods.Common.Activities
return; return;
enterActor.InflictDamage(self, new Damage(-enterHealth.MaxHP)); enterActor.InflictDamage(self, new Damage(-enterHealth.MaxHP));
if (!string.IsNullOrEmpty(info.RepairSound))
Game.Sound.Play(SoundType.World, info.RepairSound, enterActor.CenterPosition);
if (info.EnterBehaviour == EnterBehaviour.Dispose) if (info.EnterBehaviour == EnterBehaviour.Dispose)
self.Dispose(); self.Dispose();

View File

@@ -29,6 +29,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("What diplomatic stances allow target to be repaired by this actor.")] [Desc("What diplomatic stances allow target to be repaired by this actor.")]
public readonly Stance ValidStances = Stance.Ally; public readonly Stance ValidStances = Stance.Ally;
[Desc("Sound to play when repairing is done.")]
public readonly string RepairSound = null;
[Desc("Cursor to show when hovering over a valid actor to repair.")] [Desc("Cursor to show when hovering over a valid actor to repair.")]
public readonly string Cursor = "goldwrench"; public readonly string Cursor = "goldwrench";