From 8d276ff9def15b05549152b5a9c771408e7f56bf Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Tue, 22 Jan 2019 23:13:55 +0000 Subject: [PATCH] Replace broken (Disabled)TabClick and with (Disabled)ClickSound. --- .../Widgets/ProductionPaletteWidget.cs | 16 ++++++++-------- mods/cnc/audio/notifications.yaml | 1 - mods/d2k/chrome/ingame-player.yaml | 1 + mods/modcontent/notifications.yaml | 1 - mods/ts/audio/sounds-generic.yaml | 1 - 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs index 6c2731e0f4..a6cccf9428 100644 --- a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs @@ -47,8 +47,8 @@ namespace OpenRA.Mods.Common.Widgets public readonly int2 IconMargin = int2.Zero; public readonly int2 IconSpriteOffset = int2.Zero; - public readonly string TabClick = null; - public readonly string DisabledTabClick = null; + public readonly string ClickSound = ChromeMetrics.Get("ClickSound"); + public readonly string ClickDisabledSound = ChromeMetrics.Get("ClickDisabledSound"); public readonly string TooltipContainer; public readonly string TooltipTemplate = "PRODUCTION_TOOLTIP"; @@ -267,14 +267,14 @@ namespace OpenRA.Mods.Common.Widgets { if (PickUpCompletedBuildingIcon(icon, item)) { - Game.Sound.Play(SoundType.UI, TabClick); + Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Sounds", ClickSound, null); return true; } if (item != null && item.Paused) { // Resume a paused item - Game.Sound.Play(SoundType.UI, TabClick); + Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Sounds", ClickSound, null); World.IssueOrder(Order.PauseProduction(CurrentQueue.Actor, icon.Name, false)); return true; } @@ -284,7 +284,7 @@ namespace OpenRA.Mods.Common.Widgets if (buildable != null) { // Queue a new item - Game.Sound.Play(SoundType.UI, TabClick); + Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Sounds", ClickSound, null); string notification; var canQueue = CurrentQueue.CanQueue(buildable, out notification); @@ -307,7 +307,7 @@ namespace OpenRA.Mods.Common.Widgets if (item == null) return false; - Game.Sound.Play(SoundType.UI, TabClick); + Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Sounds", ClickSound, null); if (CurrentQueue.Info.DisallowPaused || item.Paused || item.Done || item.TotalCost == item.RemainingCost) { @@ -331,7 +331,7 @@ namespace OpenRA.Mods.Common.Widgets return false; // Directly cancel, skipping "on-hold" - Game.Sound.Play(SoundType.UI, TabClick); + Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Sounds", ClickSound, null); Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, World.LocalPlayer.Faction.InternalName); World.IssueOrder(Order.CancelProduction(CurrentQueue.Actor, icon.Name, handleCount)); @@ -351,7 +351,7 @@ namespace OpenRA.Mods.Common.Widgets : false; if (!handled) - Game.Sound.Play(SoundType.UI, DisabledTabClick); + Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Sounds", ClickDisabledSound, null); return true; } diff --git a/mods/cnc/audio/notifications.yaml b/mods/cnc/audio/notifications.yaml index 73f69aa0fa..1f26cb3285 100644 --- a/mods/cnc/audio/notifications.yaml +++ b/mods/cnc/audio/notifications.yaml @@ -82,7 +82,6 @@ Sounds: SignalFlareNorth: flaren1 SignalFlareSouth: flares1 SignalFlareWest: flarew1 - TabClick: button Target1: target1 Target2: target2 Target3: target3 diff --git a/mods/d2k/chrome/ingame-player.yaml b/mods/d2k/chrome/ingame-player.yaml index fdd017317d..6edce04d10 100644 --- a/mods/d2k/chrome/ingame-player.yaml +++ b/mods/d2k/chrome/ingame-player.yaml @@ -488,6 +488,7 @@ Container@PLAYER_WIDGETS: MaximumRows: 6 HotkeyPrefix: Production HotkeyCount: 24 + ClickSound: TabClick Container@PRODUCTION_TYPES: X: 6 Y: 2 diff --git a/mods/modcontent/notifications.yaml b/mods/modcontent/notifications.yaml index a7974a5a40..58ed044af6 100644 --- a/mods/modcontent/notifications.yaml +++ b/mods/modcontent/notifications.yaml @@ -1,5 +1,4 @@ Sounds: Notifications: - TabClick: ClickSound: ClickDisabledSound: diff --git a/mods/ts/audio/sounds-generic.yaml b/mods/ts/audio/sounds-generic.yaml index 2fe2c32857..f4b6412970 100644 --- a/mods/ts/audio/sounds-generic.yaml +++ b/mods/ts/audio/sounds-generic.yaml @@ -28,7 +28,6 @@ Sounds: Scoldsfx: scoldsfx SellSound: cashturn StubSoundForTriggers: boop - TabClick: Text1: text1 Text2: text2 Text3: text3