Extracted BuildingCannotPlaceAudio to PlaceBuilding.

This commit is contained in:
Andre Mohren
2018-07-22 14:02:08 +02:00
committed by abcdefg30
parent 8834cee13c
commit c2b1a5f4e0
6 changed files with 8 additions and 2 deletions

View File

@@ -115,7 +115,7 @@ namespace OpenRA.Mods.Common.Orders
orderType = "PlacePlug";
if (!AcceptsPlug(topLeft, plugInfo))
{
Game.Sound.PlayNotification(world.Map.Rules, owner, "Speech", "BuildingCannotPlaceAudio", owner.Faction.InternalName);
Game.Sound.PlayNotification(world.Map.Rules, owner, "Speech", placeBuildingInfo.CannotPlaceNotification, owner.Faction.InternalName);
yield break;
}
}
@@ -127,7 +127,7 @@ namespace OpenRA.Mods.Common.Orders
foreach (var order in ClearBlockersOrders(world, topLeft))
yield return order;
Game.Sound.PlayNotification(world.Map.Rules, owner, "Speech", "BuildingCannotPlaceAudio", owner.Faction.InternalName);
Game.Sound.PlayNotification(world.Map.Rules, owner, "Speech", placeBuildingInfo.CannotPlaceNotification, owner.Faction.InternalName);
yield break;
}

View File

@@ -34,6 +34,8 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Notification to play after building placement if new construction options are available.")]
public readonly string NewOptionsNotification = null;
public readonly string CannotPlaceNotification = null;
public object Create(ActorInitializer init) { return new PlaceBuilding(this); }
}