Skip to content

Commit

Permalink
Core: fix minor voicepack selection issues
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
Zidras committed Dec 26, 2023
1 parent 6d8519a commit ecdfb56
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 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("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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ecdfb56

Please sign in to comment.