From cc09dad593346e9e0d12ed2e57f3554c542161ec Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Mon, 29 Jul 2024 00:22:46 +0200 Subject: [PATCH] Fixups --- browser.lua | 17 +++++++++++------ cspell.json | 23 ++++++++++++++++++++++- cvars.lua | 11 +++-------- gui/CombatConfigPanel.lua | 2 +- 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/browser.lua b/browser.lua index 1193d98..c54875f 100644 --- a/browser.lua +++ b/browser.lua @@ -71,11 +71,16 @@ local function TraceCVar(cvar, value, ...) end end -- Ignore C_CVar.SetCVar hook if it originated from ourselves or CvarUtil.lua or ClassicCvarUtil.lua - if source and not (source:lower():find("[\\/]advancedinterfaceoptions[\\/]") or - source:lower():find("[_\\/]sharedxmlbase[\\/]cvarutil%.lua") or - source:lower():find("[_\\/]sharedxml[\\/]cvarutil%.lua") or - source:lower():find("[_\\/]sharedxml[\\/]classiccvarutil%.lua") or - source:lower():find("[_\\/]sharedxml[\\/]classic[\\/]classiccvarutil%.lua")) then + if + source + and not ( + source:lower():find("[\\/]advancedinterfaceoptions[\\/]") + or source:lower():find("[_\\/]sharedxmlbase[\\/]cvarutil%.lua") + or source:lower():find("[_\\/]sharedxml[\\/]cvarutil%.lua") + or source:lower():find("[_\\/]sharedxml[\\/]classiccvarutil%.lua") + or source:lower():find("[_\\/]sharedxml[\\/]classic[\\/]classiccvarutil%.lua") + ) + then local realValue = GetCVar(cvar) -- the client does some conversions to the original value if SVLoaded then AdvancedInterfaceOptionsSaved.ModifiedCVars[cvar:lower()] = source .. ":" .. lineNum @@ -139,7 +144,7 @@ function addon:PopulateCVarPanel(OptionsPanel) self:ClearFocus() end) FilterBox:SetScript("OnEnterPressed", function(self) - self:SetAutoFocus(false) -- Clear focus when enter is pressed because ketho said so + self:SetAutoFocus(false) -- Clear focus when enter is pressed because Ketho said so self:ClearFocus() end) FilterBox:SetScript("OnEditFocusGained", function(self) diff --git a/cspell.json b/cspell.json index 1e840fc..eab0507 100644 --- a/cspell.json +++ b/cspell.json @@ -8,7 +8,9 @@ "words": [ "ADDONCATEGORIES", "Ambiguate", + "BGDL", "BGSOUND", + "bspcache", "Cata", "cffaaaaff", "cffaaffaa", @@ -16,31 +18,50 @@ "cffffffff", "cvar", "cvars", + "daltonize", "Debuff", "Debuffs", "DISPELLABLE", "Dont", + "Dwmo", + "EROR", + "gpromote", "GXAPI", + "hbao", + "Hostle", + "HRTF", + "Infov", + "Ketho", "Lerp", "Luacheck", "MAXFPSBK", + "mmhhh", "MSAA", + "Mult", "Nagle", "nebularg", "NUMDIALOGS", "PERC", "PHONG", "PPAA", + "RAIDSSAO", + "REGEN", + "simd", "SOUNDFX", "SSAO", "TARGETOFTARGET", "TIPOFTHEDAY", "UBERTOOLTIPS", "UISCALE", + "Unshift", "upvalue", + "USEIPV", "UVARINFO", "uvars", + "vsync", "WAGO", - "WOWI" + "WGOB", + "WOWI", + "WQST" ] } diff --git a/cvars.lua b/cvars.lua index e230cff..55a85ab 100644 --- a/cvars.lua +++ b/cvars.lua @@ -1,6 +1,5 @@ ---@diagnostic disable: undefined-global -local addonName, addon = ... -local _G = _G +local _, addon = ... addon.combatProtected = { -- List of cvars that can't be modified in combat @@ -235,13 +234,10 @@ addon.hiddenOptions = { ["advancedWatchFrame"] = { prettyName = ADVANCED_OBJECTIVES_TEXT, description = OPTION_TOOLTIP_ADVANCED_OBJECTIVES_TEXT, type = "" }, ["watchFrameIgnoreCursor"] = { prettyName = OBJECTIVES_IGNORE_CURSOR_TEXT, description = OPTION_TOOLTIP_OBJECTIVES_IGNORE_CURSOR, type = "boolean" }, ["guildMemberNotify"] = { prettyName = GUILDMEMBER_ALERT, description = OPTION_TOOLTIP_GUILDMEMBER_ALERT, type = "boolean" }, - ["showArenaEnemyFrames"] = { prettyName = SHOW_ARENA_ENEMY_FRAMES_TEXT, description = OPTION_TOOLTIP_SHOW_ARENA_ENEMY_FRAMES, type = "boolean" }, ["autoClearAFK"] = { prettyName = nil, description = OPTION_TOOLTIP_CLEAR_AFK, type = "boolean" }, ["colorblindWeaknessFactor"] = { prettyName = nil, description = OPTION_TOOLTIP_ADJUST_COLORBLIND_STRENGTH, type = "boolean" }, - ["autoLootDefault"] = { prettyName = nil, description = OPTION_TOOLTIP_AUTO_LOOT_DEFAULT, type = "boolean" }, ["autoLootRate"] = { prettyName = "Auto Loot Rate", description = "Rate in milliseconds to tick auto loot", type = "number" }, ["ChatAmbienceVolume"] = { prettyName = nil, description = "", type = "boolean" }, - ["threatShowNumeric"] = { prettyName = nil, description = OPTION_TOOLTIP_SHOW_NUMERIC_THREAT, type = "boolean" }, ["rightActionBar"] = { prettyName = nil, description = OPTION_TOOLTIP_SHOW_MULTIBAR3, type = "boolean" }, ["emphasizeMySpellEffects"] = { prettyName = nil, description = OPTION_TOOLTIP_EMPHASIZE_MY_SPELLS, type = "boolean" }, ["chatBubblesParty"] = { prettyName = nil, description = OPTION_TOOLTIP_PARTY_CHAT_BUBBLES, type = "boolean" }, @@ -376,7 +372,6 @@ addon.hiddenOptions = { ["Sound_EnablePositionalLowPassFilter"] = { prettyName = ENABLE_SOFTWARE_HRTF, description = OPTION_TOOLTIP_ENABLE_SOFTWARE_HRTF, type = "boolean" }, ["showTargetOfTarget"] = { prettyName = nil, description = OPTION_TOOLTIP_SHOW_TARGET_OF_TARGET, type = "boolean" }, - ["guildMemberNotify"] = { prettyName = nil, description = OPTION_TOOLTIP_GUILDMEMBER_ALERT, type = "boolean" }, ["showTutorials"] = { prettyName = SHOW_TUTORIALS, description = OPTION_TOOLTIP_SHOW_TUTORIALS, type = "boolean" }, ["lossOfControl"] = { prettyName = nil, description = OPTION_TOOLTIP_LOSS_OF_CONTROL, type = "boolean" }, ["blockChannelInvites"] = { prettyName = nil, description = OPTION_TOOLTIP_BLOCK_CHAT_CHANNEL_INVITE, type = "boolean" }, @@ -685,7 +680,7 @@ addon.hiddenOptions = { -- ["bloatTest"] = {}, -- ["bloatnameplates"] = {}, -- ["bloatthreat"] = {}, - ["bodyQuota"] = { description = "Maximum number of componented bodies seen at once" }, + ["bodyQuota"] = { description = "Maximum number of component bodies seen at once" }, ["breakUpLargeNumbers"] = { description = "Toggles using commas in large numbers" }, ["bspcache"] = { description = "BSP node caching" }, ["calendarShowBattlegrounds"] = { description = "Whether Battleground holidays should appear in the calendar" }, @@ -1171,7 +1166,7 @@ function addon:GetCVars() if info.commandType == 0 -- cvar, rather than script and info.category ~= 0 -- ignore debug category - and not strfind(info.command:lower(), "debug") -- a number of commands with "debug" in their name are inexplicibly not in the "debug" category + and not strfind(info.command:lower(), "debug") -- a number of commands with "debug" in their name are inexplicably not in the "debug" category and info.category ~= 8 -- ignore GM category and addon:CVarExists(info.command) -- real cvar? then diff --git a/gui/CombatConfigPanel.lua b/gui/CombatConfigPanel.lua index 82977c1..883df69 100644 --- a/gui/CombatConfigPanel.lua +++ b/gui/CombatConfigPanel.lua @@ -66,7 +66,7 @@ function addon:CreateCombatOptions() SpellQueueWindow = { type = "range", name = LAG_TOLERANCE, - desc = "Determines how far ahead of the 'end of a spell' start-recovery spell system can be, before allowing spell request to be sent to the server. Ie this controls the built-in lag for the ability queuing system. Ideally, you'll want to set this to your in-game latency.", + desc = "Determines how far ahead of the 'end of a spell' start-recovery spell system can be, before allowing spell request to be sent to the server. Ie this controls the built-in lag for the ability queuing system.", min = 0, max = 400, step = 1,