Skip to content

Commit

Permalink
Core: Default filter timers when using nameplate CD icon auras
Browse files Browse the repository at this point in the history
Add additional filter control for regular global timer disables for those not using plater who still want to shut off specifically boss or trash timers only.
  • Loading branch information
Zidras committed Dec 28, 2023
1 parent b7853a3 commit aade562
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 20 deletions.
24 changes: 16 additions & 8 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("20231227223523"),
Revision = parseCurseDate("20231228003505"),
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 @@ -351,6 +351,8 @@ DBM.DefaultOptions = {
SpamSpecRoleswitch = false,
SpamSpecRolegtfo = false,
DontShowBossTimers = false,
DontShowTrashTimers = false,
DontShowEventTimers = false,
DontShowUserTimers = false,
DontShowFarWarnings = true,
DontSetIcons = false,
Expand All @@ -361,7 +363,7 @@ DBM.DefaultOptions = {
DontShowHudMap2 = false,
DontShowNameplateIcons = false,
DontSendBossGUIDs = false,
-- DontShowTimersWithNameplates = false,
DontShowTimersWithNameplates = true,
UseNameplateHandoff = true,
NPAuraSize = 40,
DontPlayCountdowns = false,
Expand Down Expand Up @@ -2884,7 +2886,7 @@ do
end

function DBM:LFG_PROPOSAL_SHOW()
if self.Options.ShowQueuePop and not self.Options.DontShowBossTimers then
if self.Options.ShowQueuePop and not self.Options.DontShowEventTimers then
DBT:CreateBar(40, L.LFG_INVITE, "Interface\\Icons\\Spell_Holy_BorrowedTime")
fireEvent("DBM_TimerStart", "DBMLFGTimer", L.LFG_INVITE, 40, "Interface\\Icons\\Spell_Holy_BorrowedTime", "extratimer", nil, 0)
end
Expand Down Expand Up @@ -3003,7 +3005,7 @@ end
function DBM:UPDATE_BATTLEFIELD_STATUS(queueID)
for i = 1, 2 do
if GetBattlefieldStatus(i) == "confirm" then
if self.Options.ShowQueuePop and not self.Options.DontShowBossTimers then
if self.Options.ShowQueuePop and not self.Options.DontShowEventTimers then
queuedBattlefield[i] = select(2, GetBattlefieldStatus(i))
local expiration = GetBattlefieldPortExpiration(queueID)
local timerIcon = GetBattlefieldFaction("player") == "Alliance" and "Interface\\Icons\\INV_BannerPVP_02" or "Interface\\Icons\\INV_BannerPVP_01"
Expand Down Expand Up @@ -9870,7 +9872,10 @@ do
end

function timerPrototype:Start(timer, ...)
if DBM.Options.DontShowBossTimers then return end
if not self.mod.isDummyMod then--Don't apply following rulesets to pull timers and such
if DBM.Options.DontShowBossTimers and not self.mod.isTrashMod then return end
if DBM.Options.DontShowTrashTimers and self.mod.isTrashMod then return end
end
if timer and type(timer) ~= "number" then
return self:Start(nil, timer, ...) -- first argument is optional!
end
Expand Down Expand Up @@ -10233,7 +10238,8 @@ do
end

function timerPrototype:Update(elapsed, totalTime, ...)
if DBM.Options.DontShowBossTimers then return end
if DBM.Options.DontShowBossTimers and not self.mod.isTrashMod then return end
if DBM.Options.DontShowTrashTimers and self.mod.isTrashMod then return end
if self:GetTime(...) == 0 then
self:Start(totalTime, ...)
end
Expand Down Expand Up @@ -10264,7 +10270,8 @@ do
end

function timerPrototype:AddTime(extendAmount, ...)
if DBM.Options.DontShowBossTimers then return end
if DBM.Options.DontShowBossTimers and not self.mod.isTrashMod then return end
if DBM.Options.DontShowTrashTimers and self.mod.isTrashMod then return end
if self:GetTime(...) == 0 then
return self:Start(extendAmount, ...)
else
Expand Down Expand Up @@ -10297,7 +10304,8 @@ do
end

function timerPrototype:RemoveTime(reduceAmount, ...)
if DBM.Options.DontShowBossTimers then return end
if DBM.Options.DontShowBossTimers and not self.mod.isTrashMod then return end
if DBM.Options.DontShowTrashTimers and self.mod.isTrashMod then return end
if self:GetTime(...) == 0 then
return--Do nothing
else
Expand Down
10 changes: 6 additions & 4 deletions DBM-GUI/localization.cn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,12 @@ L.SpamBlockRaidWarning = "过滤其他首领预警插件警报"
L.SpamBlockBossWhispers = "战斗中过滤DBM密语警报"


L.Area_SpamFilter_Timers = "计时器过滤选项"
L.SpamBlockNoShowTimers = "不显示 DBM 原装计时条"
L.SpamBlockNoShowUTimers = "不显示用户自定义生成的计时条(Custom/Pull/Break)"
L.SpamBlockNoCountdowns = "不要播放倒计时语音"
L.Area_SpamFilter_Timers = "计时器过滤选项"
L.SpamBlockNoShowBossTimers = "不为Boss显示计时条"
L.SpamBlockNoShowTrashTimers = "不为小怪显示计时条(同时关闭姓名版CD)"
L.SpamBlockNoShowEventTimers = "不显示事件计时条(角色扮演,Boss刷新)"
L.SpamBlockNoShowUTimers = "不显示用户自定义生成的计时条(Custom/Pull/Break)"
L.SpamBlockNoCountdowns = "不要播放倒计时语音"

L.Area_SpamFilter_Misc = "全局过滤设置"
L.SpamBlockNoSetIcon = "不在目标上设定标记"
Expand Down
4 changes: 3 additions & 1 deletion DBM-GUI/localization.en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ L.SpamBlockNoSpecWarnVibrate = "Do not vibrate controller on special announce"
L.SpamBlockNoSpecWarnSound = "Do not play special announce sounds (still permits voice packs, if one is enabled in Spoken Alerts panel)"

L.Area_SpamFilter_Timers = "Timer Global Disable & Filter Options"
L.SpamBlockNoShowTimers = "Do not show mod timers (Boss Mod/CM/LFG/Respawn)"
L.SpamBlockNoShowBossTimers = "Do not show timers for dungeon/raid bosses"
L.SpamBlockNoShowTrashTimers = "Do not show timers for dungeon/raid trash (Note: this also disables nameplate CDs)"
L.SpamBlockNoShowEventTimers = "Do not show timers for events or prompts (Queue pop, boss respawn, etc)"
L.SpamBlockNoShowUTimers = "Do not show user sent timers (Custom/Pull/Break)"
L.SpamBlockNoCountdowns = "Do not play countdown sounds"

Expand Down
3 changes: 3 additions & 0 deletions DBM-GUI/localization.es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ L.SpamBlockRaidWarning = "Filtrar anuncios de otros Boss Mods"
L.SpamBlockBossWhispers = "Filtrar los avisos de DBM mientras estas en combate"

L.Area_SpamFilter_Timers = "Opciones de filtros globales de temporizadores"
L.SpamBlockNoShowBossTimers = "No mostrar temporizadores para jefes de mazmorras/bandas"
L.SpamBlockNoShowTrashTimers = "No mostrar temporizadores para bichos (Nota: esto también desactiva los TdR con placa de nombre.)"
L.SpamBlockNoShowEventTimers = "No mostrar temporizadores para eventos o avisos (cola, campo de batalla, etc.)"
L.SpamBlockNoShowTimers = "Ocultar temporizadores de módulos"
L.SpamBlockNoShowUTimers = "Ocultar temporizadores de usuario"
L.SpamBlockNoCountdowns = "Desactivar sonidos de cuenta atrás"
Expand Down
6 changes: 4 additions & 2 deletions DBM-GUI/localization.kr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,10 @@ L.SpamBlockNoSpecWarnSound = "특수 알림 효과음 재생 안함 (음성 경
L.SpamBlockRaidWarning = "다른 보스 모드가 알리는 경보 감추기"
L.SpamBlockBossWhispers = "전투 중 사용되는 DBM 경보 귓속말 감추기"

L.Area_SpamFilter_Timers = "타이머 관련 기능 끄기 및 필터 설정"
L.SpamBlockNoShowTimers = "모드 타이머 표시 안함 (보스 모드/도전모드/파티찾기/재생성)"
L.Area_SpamFilter_Timers = "타이머"
L.SpamBlockNoShowBossTimers = "던전/레이드 보스 타이머 표시 안함"
L.SpamBlockNoShowTrashTimers = "던전/레이드 일반몹 타이머 표시 안함 (알림: 이름표의 쿨타임도 표시되지 않습니다)"
L.SpamBlockNoShowEventTimers = "이벤트나 알림 타이머 표시 안함 (대기열, 보스 재생성 등)"
L.SpamBlockNoShowUTimers = "사용자 전송 타이머 표시 안함 (사용자 지정/풀링/휴식)"
L.SpamBlockNoCountdowns = "초읽기 음성 재생 안함"

Expand Down
6 changes: 4 additions & 2 deletions DBM-GUI/localization.ru.lua
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ L.SpamBlockNoShowAnnounce = "Не показывать текст или про
L.SpamBlockNoShowTgtAnnounce= "Не показывать текст или проигрывать звук для общих объявлений ЦЕЛИ (фильтр выше переопределяет этот)"
L.SpamBlockNoSpecWarnText = "Не показывать текст спецпредупреждений, но разрешить голосовые пакеты (фильтр выше переопределяет этот)"

L.Area_SpamFilter_Timers = "Глобальное отключение таймера и параметры фильтра"
L.SpamBlockNoShowTimers = "Не показывать таймеры (отсчет времени)"
L.Area_SpamFilter_Timers = "Функции таймера"
L.SpamBlockNoShowBossTimers = "Не показывать таймеры для боссов в подземельях/рейдах"
L.SpamBlockNoShowTrashTimers = "Не показывать таймеры для трэша в подземельях/рейдах (Примечание: это также отключает восстановление способностей на индикаторах)"
L.SpamBlockNoShowEventTimers = "Не показывать таймеры для событий или подсказок (появление очереди, возрождение босса и т.д.)"
L.SpamBlockNoShowUTimers = "Не показывать таймеры, отправленные пользователями (пользов./пулл/отдых)"
L.SpamBlockNoCountdowns = "Не воспроизводить звуки обратного отсчета"

Expand Down
6 changes: 4 additions & 2 deletions DBM-GUI/localization.tw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,10 @@ L.SpamBlockNoSpecWarnSound = "不播放特別提示音效 (如果在“語音
L.SpamBlockRaidWarning = "過濾其他首領模組的警告"
L.SpamBlockBossWhispers = "當戰鬥時過濾 DBM 密語警告"

L.Area_SpamFilter_Timers = "全局計時禁用及過濾選項"
L.SpamBlockNoShowTimers = "不顯示計時器(首領模組/挑戰模式/尋求組隊/重生)"
L.Area_SpamFilter_Timers = "全局計時禁用及過濾選項"
L.SpamBlockNoShowBossTimers = "不顯示地城/團隊首領的計時器"
L.SpamBlockNoShowTrashTimers = "不顯示地城/團隊小怪的計時器(注意: 這也會停用名條的技能冷卻)"
L.SpamBlockNoShowEventTimers = "不顯示事件與提示計時器(佇列提示/首領重生..等)"
L.SpamBlockNoShowUTimers = "不顯示玩家送出的計時器(自訂/拉怪/休息)"
L.SpamBlockNoCountdowns = "不播放倒數音效"

Expand Down
4 changes: 3 additions & 1 deletion DBM-GUI/modules/options/filters/GlobalDisables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ spamSpecAnnounceFeat:CreateCheckButton(L.SpamBlockNoSpecWarnFlash, true, nil, "D
spamSpecAnnounceFeat:CreateCheckButton(L.SpamBlockNoSpecWarnSound, true, nil, "DontPlaySpecialWarningSound")

local spamTimers = spamPanel:CreateArea(L.Area_SpamFilter_Timers)
spamTimers:CreateCheckButton(L.SpamBlockNoShowTimers, true, nil, "DontShowBossTimers")
spamTimers:CreateCheckButton(L.SpamBlockNoShowBossTimers, true, nil, "DontShowBossTimers")
spamTimers:CreateCheckButton(L.SpamBlockNoShowTrashTimers, true, nil, "DontShowTrashTimers")
spamTimers:CreateCheckButton(L.SpamBlockNoShowEventTimers, true, nil, "DontShowEventTimers")
spamTimers:CreateCheckButton(L.SpamBlockNoShowUTimers, true, nil, "DontShowUserTimers")
spamTimers:CreateCheckButton(L.SpamBlockNoCountdowns, true, nil, "DontPlayCountdowns")

Expand Down

0 comments on commit aade562

Please sign in to comment.