From ecdfb5611258727fcc3814e38eee81e1e280b10f Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Tue, 26 Dec 2023 23:31:27 +0000 Subject: [PATCH] Core: fix minor voicepack selection issues - If the chosen voice pack is deleted/disabled, GUI shows it as a special missing entry. Selecting it caused an error comparing nil to number. - If the chosen voice pack is deleted/disabled, voice was disabled (voiceSessionDisabled = true) until reload. Restore/re-disable when updating voice pack choice. --- DBM-Core/DBM-Core.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/DBM-Core/DBM-Core.lua b/DBM-Core/DBM-Core.lua index 7b2f333b..cdb95a9f 100644 --- a/DBM-Core/DBM-Core.lua +++ b/DBM-Core/DBM-Core.lua @@ -82,7 +82,7 @@ local function currentFullDate() end DBM = { - Revision = parseCurseDate("20231226231655"), + Revision = parseCurseDate("20231226233100"), 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 } @@ -9726,13 +9726,19 @@ do local activeVP = self.Options.ChosenVoicePack2 --Check if voice pack out of date if activeVP ~= "None" and activeVP == value then - if self.VoiceVersions[value] < minVoicePackVersion then--Version will be bumped when new voice packs released that contain new voices. - if self.Options.ShowReminders then - self:AddMsg(L.VOICE_PACK_OUTDATED) + -- User might reselect "missing" entry shown in GUI if previously selected voice pack is uninstalled or disabled + if self.VoiceVersions[value] then + voiceSessionDisabled = false + if self.VoiceVersions[value] < minVoicePackVersion then--Version will be bumped when new voice packs released that contain new voices. + if self.Options.ShowReminders then + self:AddMsg(L.VOICE_PACK_OUTDATED) + end + SWFilterDisabled = self.VoiceVersions[value]--Set disable to version on current voice pack + else + SWFilterDisabled = minVoicePackVersion end - SWFilterDisabled = self.VoiceVersions[value]--Set disable to version on current voice pack else - SWFilterDisabled = minVoicePackVersion + voiceSessionDisabled = true end end end