Add support for playing a BridgeRepaired notification

This commit is contained in:
abcdefg30
2016-01-23 18:48:16 +01:00
parent 085367ced6
commit db1d83fc4e
2 changed files with 9 additions and 2 deletions

View File

@@ -31,6 +31,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Cursor to use when repairing is denied.")]
public readonly string TargetBlockedCursor = "goldwrench-blocked";
[Desc("Speech notification to play when a bridge is repaired.")]
public readonly string RepairNotification = null;
public object Create(ActorInitializer init) { return new RepairsBridges(this); }
}
@@ -82,7 +85,7 @@ namespace OpenRA.Mods.Common.Traits
self.SetTargetLine(Target.FromOrder(self.World, order), Color.Yellow);
self.CancelActivity();
self.QueueActivity(new RepairBridge(self, order.TargetActor, info.EnterBehaviour));
self.QueueActivity(new RepairBridge(self, order.TargetActor, info.EnterBehaviour, info.RepairNotification));
}
}