Extracted BuildingCannotPlaceAudio to PlaceBuilding.
This commit is contained in:
@@ -115,7 +115,7 @@ namespace OpenRA.Mods.Common.Orders
|
|||||||
orderType = "PlacePlug";
|
orderType = "PlacePlug";
|
||||||
if (!AcceptsPlug(topLeft, plugInfo))
|
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;
|
yield break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ namespace OpenRA.Mods.Common.Orders
|
|||||||
foreach (var order in ClearBlockersOrders(world, topLeft))
|
foreach (var order in ClearBlockersOrders(world, topLeft))
|
||||||
yield return order;
|
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;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Notification to play after building placement if new construction options are available.")]
|
[Desc("Notification to play after building placement if new construction options are available.")]
|
||||||
public readonly string NewOptionsNotification = null;
|
public readonly string NewOptionsNotification = null;
|
||||||
|
|
||||||
|
public readonly string CannotPlaceNotification = null;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new PlaceBuilding(this); }
|
public object Create(ActorInitializer init) { return new PlaceBuilding(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Player:
|
|||||||
Inherits: ^BasePlayer
|
Inherits: ^BasePlayer
|
||||||
PlaceBuilding:
|
PlaceBuilding:
|
||||||
NewOptionsNotification: NewOptions
|
NewOptionsNotification: NewOptions
|
||||||
|
CannotPlaceNotification: BuildingCannotPlaceAudio
|
||||||
TechTree:
|
TechTree:
|
||||||
SupportPowerManager:
|
SupportPowerManager:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ Player:
|
|||||||
BlockedAudio: NoRoom
|
BlockedAudio: NoRoom
|
||||||
PlaceBuilding:
|
PlaceBuilding:
|
||||||
NewOptionsNotification: NewOptions
|
NewOptionsNotification: NewOptions
|
||||||
|
CannotPlaceNotification: BuildingCannotPlaceAudio
|
||||||
SupportPowerManager:
|
SupportPowerManager:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
MissionObjectives:
|
MissionObjectives:
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ Player:
|
|||||||
SpeedUp: True
|
SpeedUp: True
|
||||||
PlaceBuilding:
|
PlaceBuilding:
|
||||||
NewOptionsNotification: NewOptions
|
NewOptionsNotification: NewOptions
|
||||||
|
CannotPlaceNotification: BuildingCannotPlaceAudio
|
||||||
SupportPowerManager:
|
SupportPowerManager:
|
||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
MissionObjectives:
|
MissionObjectives:
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ Player:
|
|||||||
SpeedUp: True
|
SpeedUp: True
|
||||||
PlaceBuilding:
|
PlaceBuilding:
|
||||||
NewOptionsNotification: NewOptions
|
NewOptionsNotification: NewOptions
|
||||||
|
CannotPlaceNotification: BuildingCannotPlaceAudio
|
||||||
Palette: placebuilding
|
Palette: placebuilding
|
||||||
LineBuildSegmentPalette: placelinesegment
|
LineBuildSegmentPalette: placelinesegment
|
||||||
SupportPowerManager:
|
SupportPowerManager:
|
||||||
|
|||||||
Reference in New Issue
Block a user