Skip to content

Commit

Permalink
GUI: allow GTFOs to be handled separately in voice pack options
Browse files Browse the repository at this point in the history
Meant for those who want to enable default sounds on just GTFO sounds while using a voice pack
  • Loading branch information
Zidras committed Dec 27, 2023
1 parent 0695624 commit e2e6507
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 6 deletions.
7 changes: 5 additions & 2 deletions DBM-Core/DBM-Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ local function currentFullDate()
end

DBM = {
Revision = parseCurseDate("20231227192103"),
Revision = parseCurseDate("20231227194407"),
DisplayVersion = "10.1.10 alpha", -- the string that is shown as version
ReleaseRevision = releaseDate(2023, 12, 26) -- the date of the latest stable version that is available, optionally pass hours, minutes, and seconds for multiple releases in one day
}
Expand Down Expand Up @@ -155,6 +155,7 @@ DBM.DefaultOptions = {
VPReplacesSA2 = true,
VPReplacesSA3 = true,
VPReplacesSA4 = true,
VPReplacesGTFO = true,
VPReplacesCustom = false,
AlwaysPlayVoice = false,
VPDontMuteSounds = false,
Expand Down Expand Up @@ -9089,7 +9090,9 @@ do
local function canVoiceReplace(self, soundId)
soundId = soundId or self.option and self.mod.Options[self.option .. "SWSound"] or self.flash
local isVoicePackUsed
if type(soundId) == "number" then
if self.announceType == "gtfo" then
isVoicePackUsed = DBM.Options.VPReplacesGTFO
elseif type(soundId) == "number" then
isVoicePackUsed = DBM.Options["VPReplacesSA"..soundId]
else
isVoicePackUsed = DBM.Options.VPReplacesCustom
Expand Down
1 change: 1 addition & 0 deletions DBM-GUI/localization.cn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ L.ReplacesSA1 = "替换特殊警报提示声音 1 (个人的 'pvp拔旗') "
L.ReplacesSA2 = "替换特殊警报提示声音 2 (每个人 '当心')"
L.ReplacesSA3 = "替换特殊警报提示声音 3 (高优先级的 '汽笛')"
L.ReplacesSA4 = "替换特殊警报提示声音 4 (高优先级的 '快跑')"
L.ReplacesGTFO = "替换特殊警告的行为提示声音"
L.ReplacesCustom = "替换特殊警报提示声音 自定义使用设置(每个警报) 声音 (不建议)"
L.Area_VoicePackAdvOptions = "语音包选项(第三方语音包)"
L.SpecWarn_AlwaysVoice = "总是播放所有语音警报(即使已禁用特殊警报,对团队领队是有用的,除此以外不建议使用)"
Expand Down
3 changes: 2 additions & 1 deletion DBM-GUI/localization.en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,11 @@ L.Area_CountdownOptions = "Countdown Options"
L.Area_VoicePackReplace = "Voice Pack Replacement Options (which sounds voice packs, when enabled, mute and replace)"
L.VPReplaceNote = "Note: Voice packs never change or remove your warning sounds.\nThey are simply muted when voice pack replaces them."
L.ReplacesAnnounce = "Replace Announce sounds (Note: Very few use voice packs except for phase changes and adds"
L.ReplacesSA1 = "Replace Special Announce 1 (personal aka 'pvpflag') sounds"
L.ReplacesSA1 = "Replace Special Announce 1 (personal aka 'pvpflag' that aren't GTFOs) sounds"
L.ReplacesSA2 = "Replace Special Announce 2 (everyone aka 'beware') sounds"
L.ReplacesSA3 = "Replace Special Announce 3 (high priority aka 'airhorn') sounds"
L.ReplacesSA4 = "Replace Special Announce 4 (high priority run away) sounds"
L.ReplacesGTFO = "Replace Special Announce GTFO sounds"
L.ReplacesCustom = "Replace Special Announce Custom user set (per warning) sounds (not recommended)"
L.Area_VoicePackAdvOptions = "Voice Pack Advanced Options"
L.SpecWarn_AlwaysVoice = "Always play all spoken alerts (Even if Special Announce disabled. Useful for some Raid Leaders in niche situations, not recommended otherwise)"
Expand Down
2 changes: 2 additions & 0 deletions DBM-GUI/localization.es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ L.VoicePackChoice = "Paquete de voz para alertas de voz"
L.Area_CountdownOptions = "Opciones de cuenta atrás"
L.SWFNever = "Nunca"
L.SpecWarn_AlwaysVoice = "Reproducir siempre todas las alertas de voz (ignora las opciones de jefe; útil para líderes de banda)"
L.ReplacesSA1 = "Reemplazar los sonidos del anuncio especial 1 (personal también conocido como 'pvpflag' que no son GTFO)"
L.ReplacesGTFO = "Reemplazar los sonidos GTFO del anuncio especial"
--TODO, maybe add URLS right to GUI panel on where to acquire 3rd party voice packs?
L.Area_BrowseOtherVP = "Explorar otros paquetes de voz en Curse"
L.BrowseOtherVPs = "|cFF73C2FBhttps://www.curseforge.com/wow/addons/search?search=dbm+voice|r"
Expand Down
3 changes: 2 additions & 1 deletion DBM-GUI/localization.kr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,11 @@ L.Area_VoicePackReplace = "기본 효과음 음성팩 대체 설정 (음성팩
L.SWFNever = "하지 않음"
L.VPReplaceNote = "알림: 음성팩은 절대 경고음을 변경하거나 삭제하지 않습니다.\n음성팩이 대체하는 효과음만 재생되지 않을 뿐입니다."
L.ReplacesAnnounce = "알림 효과음 대체 (알림: 페이즈 변경과 쫄 등장 이외에는 음성팩에서 사용되는 효과음이 극히 적습니다)"
L.ReplacesSA1 = "특수 알림 1 효과음 대체 (나에 대한 알림 'pvpflag' 효과음)"
L.ReplacesSA1 = "특수 알림 1 효과음 대체 (나에 대한 알림 'pvpflag' 효과음, 바닥 피하기는 제외)"
L.ReplacesSA2 = "특수 알림 2 효과음 대체 (공대 전원 알림 'beware' 효과음)"
L.ReplacesSA3 = "특수 알림 3 효과음 대체 (우선 순위 높은 알림 'airhorn' 효과음)"
L.ReplacesSA4 = "특수 알림 4 효과음 대체 (도망 알림 최우선)"
L.ReplacesGTFO = "바닥 피하기 특수 알림 효과음 대체"
L.ReplacesCustom = "특수 알림 사용자 정의 (알림별로 설정된) 효과음 대체 (권장하지 않음)"
L.Area_VoicePackAdvOptions = "음성팩 고급 설정"
L.SpecWarn_AlwaysVoice = "모든 음성 경고 재생 (특수 알림을 꺼놔도 재생됩니다. 일부 특수한 상황에 처한 공대장에게 유용하며 그 외에는 권장하지 않습니다)"
Expand Down
3 changes: 2 additions & 1 deletion DBM-GUI/localization.ru.lua
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,11 @@ L.Area_CountdownOptions = "Настройки обратного отсчета
L.Area_VoicePackReplace = "Варианты замены голосового пакета (которые озвучивают голосовые пакеты, при включении отключает звук и заменяет)"
L.VPReplaceNote = "Примечание: голосовые пакеты не изменяют и не удаляют звуки предупреждения. Они просто отключаются, когда голосовой пакет заменяет их."
L.ReplacesAnnounce = "Заменить звуки объявления (примечание: очень немногие используют голосовые пакеты, за исключением смены фаз и аддов)"
L.ReplacesSA1 = "Заменить звуки специального объявления 1 (персональный, он же 'pvpflag')"
L.ReplacesSA1 = "Заменить звуки специального объявления 1 (персональный, он же 'pvpflag', которые не являются GTFO)"
L.ReplacesSA2 = "Заменить звуки специального объявления 2 (все, он же 'beware' -> 'берегись')"
L.ReplacesSA3 = "Заменить звуки специального объявления 3 (высокоприоритетный звук, он же 'airhorn' -> 'воздушный горн')"
L.ReplacesSA4 = "Заменить звуки специального объявления 4 (высокий приоритет - бежать)"
L.ReplacesGTFO = "Заменить звуки специального объявления GTFO"
L.ReplacesCustom = "Заменить специальный пользовательский набор звуков оповещения (для каждого предупреждения), (не рекомендуется)"
L.Area_VoicePackAdvOptions = "Дополнительные параметры голосового пакета"
L.SWFNever = "Никогда"
Expand Down
3 changes: 2 additions & 1 deletion DBM-GUI/localization.tw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,11 @@ L.Area_CountdownOptions = "倒數選項"
L.Area_VoicePackReplace = "語音包替換選項 (選擇那些語音包要啟用、靜音以及替換)"
L.VPReplaceNote = "注意: 語音包永遠不會更改或刪除警告聲音。\n當替換語音包時,只是被簡單地靜音。"
L.ReplacesAnnounce = "替換提示聲音 (注意: 語音包除了階段轉換以及小怪外很少使用)"
L.ReplacesSA1 = "替換特別提示 1 聲音 (個人的 'pvp拔旗')"
L.ReplacesSA1 = "替換特別提示 1 聲音 (個人的 'pvp拔旗' 非地板技能警告)"
L.ReplacesSA2 = "替換特別提示 2 聲音 (每個人 '當心')"
L.ReplacesSA3 = "替換特別提示 3 聲音 (高優先級的 'airhorn')"
L.ReplacesSA4 = "替換特別提示 4 聲音 (高優先級的 '快跑')"
L.ReplacesGTFO = "替換特別提示 地板技能警告 聲音"
L.ReplacesCustom = "替換特別提示 自定義使用者設置 (每個警告)(不建議)"
L.Area_VoicePackAdvOptions = "語音包進階選項"
L.SpecWarn_AlwaysVoice = "總是播放所有語音警告 (即使已禁用特別警告,對團隊領隊是有用的,除此之外不建議使用)"
Expand Down
3 changes: 3 additions & 0 deletions DBM-GUI/modules/options/alerts/SpokenAlerts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ local VPReplaceSA1 = voiceReplaceArea:CreateCheckButton(L.ReplacesSA1, true, n
local VPReplaceSA2 = voiceReplaceArea:CreateCheckButton(L.ReplacesSA2, true, nil, "VPReplacesSA2")
local VPReplaceSA3 = voiceReplaceArea:CreateCheckButton(L.ReplacesSA3, true, nil, "VPReplacesSA3")
local VPReplaceSA4 = voiceReplaceArea:CreateCheckButton(L.ReplacesSA4, true, nil, "VPReplacesSA4")
local VPReplacesGTFO = voiceReplaceArea:CreateCheckButton(L.ReplacesGTFO, true, nil, "VPReplacesGTFO")
local VPReplaceCustom = voiceReplaceArea:CreateCheckButton(L.ReplacesCustom, true, nil, "VPReplacesCustom")

local resetbutton = voiceReplaceArea:CreateButton(L.SpecWarn_ResetMe, 120, 16)
Expand All @@ -64,13 +65,15 @@ resetbutton:SetScript("OnClick", function()
DBM.Options.VPReplacesSA2 = DBM.DefaultOptions.VPReplacesSA2
DBM.Options.VPReplacesSA3 = DBM.DefaultOptions.VPReplacesSA3
DBM.Options.VPReplacesSA4 = DBM.DefaultOptions.VPReplacesSA4
DBM.Options.VPReplacesGTFO = DBM.DefaultOptions.VPReplacesGTFO
DBM.Options.VPReplacesCustom = DBM.DefaultOptions.VPReplacesCustom
-- Set UI visuals
VPReplaceAnnounce:SetChecked(DBM.Options.VPReplacesAnnounce)
VPReplaceSA1:SetChecked(DBM.Options.VPReplacesSA1)
VPReplaceSA2:SetChecked(DBM.Options.VPReplacesSA2)
VPReplaceSA3:SetChecked(DBM.Options.VPReplacesSA3)
VPReplaceSA4:SetChecked(DBM.Options.VPReplacesSA4)
VPReplacesGTFO:SetChecked(DBM.Options.VPReplacesGTFO)
VPReplaceCustom:SetChecked(DBM.Options.VPReplacesCustom)
end)

Expand Down

0 comments on commit e2e6507

Please sign in to comment.