Extracted BuildingCannotPlaceAudio to PlaceBuilding.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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); }
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Player:
|
||||
Inherits: ^BasePlayer
|
||||
PlaceBuilding:
|
||||
NewOptionsNotification: NewOptions
|
||||
CannotPlaceNotification: BuildingCannotPlaceAudio
|
||||
TechTree:
|
||||
SupportPowerManager:
|
||||
ScriptTriggers:
|
||||
|
||||
@@ -59,6 +59,7 @@ Player:
|
||||
BlockedAudio: NoRoom
|
||||
PlaceBuilding:
|
||||
NewOptionsNotification: NewOptions
|
||||
CannotPlaceNotification: BuildingCannotPlaceAudio
|
||||
SupportPowerManager:
|
||||
ScriptTriggers:
|
||||
MissionObjectives:
|
||||
|
||||
@@ -48,6 +48,7 @@ Player:
|
||||
SpeedUp: True
|
||||
PlaceBuilding:
|
||||
NewOptionsNotification: NewOptions
|
||||
CannotPlaceNotification: BuildingCannotPlaceAudio
|
||||
SupportPowerManager:
|
||||
ScriptTriggers:
|
||||
MissionObjectives:
|
||||
|
||||
@@ -50,6 +50,7 @@ Player:
|
||||
SpeedUp: True
|
||||
PlaceBuilding:
|
||||
NewOptionsNotification: NewOptions
|
||||
CannotPlaceNotification: BuildingCannotPlaceAudio
|
||||
Palette: placebuilding
|
||||
LineBuildSegmentPalette: placelinesegment
|
||||
SupportPowerManager:
|
||||
|
||||
Reference in New Issue
Block a user