0.1.179: Diagnose /fwtips fuer die Tooltip-Optionen

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
Lacustat
2026-10-29 16:41:59 +01:00
co-authored by Claude Sonnet 5.5
parent f18c6d2e57
commit 311261cab0
2 changed files with 19 additions and 3 deletions
+18 -2
View File
@@ -200,14 +200,17 @@ if UI and UI.RegisterSettingsSection then
Box("tipSkin", L.TIPSET_SKIN)
Box("tipCursor", L.TIPSET_CURSOR)
function f.Refresh()
T.lastError = nil
for _, o in ipairs(options) do
if not made[o.key] and (not o.available or o.available()) then
made[o.key] = true
local okb, err
if o.max then
Slider(o)
okb, err = pcall(Slider, o)
else
Box(o.key, FW.L[o.label] or o.label)
okb, err = pcall(Box, o.key, FW.L[o.label] or o.label)
end
if not okb then T.lastError = tostring(err) end
end
end
for _, cb in ipairs(boxes) do cb:Refresh() end
@@ -226,3 +229,16 @@ if UI and UI.RegisterSettingsSection then
if f and f.Refresh then f.Refresh() end
end
end
-- Diagnose: /fwtips zeigt, welche Module Optionen angemeldet haben
_G.SLASH_FWTIPS1 = "/fwtips"
_G.SlashCmdList = _G.SlashCmdList or {}
_G.SlashCmdList["FWTIPS"] = function()
local function say(t) if _G.DEFAULT_CHAT_FRAME then _G.DEFAULT_CHAT_FRAME:AddMessage("|cff9d7826Freewood Tooltips:|r " .. t) end end
say("Optionen angemeldet: " .. #options .. ", Abschnitt gebaut: " .. tostring(T.settingsFrame ~= nil) .. ", Quest-Modul: " .. tostring(FW.Quest ~= nil or (_G.FreewoodQuestDB ~= nil)))
for _, o in ipairs(options) do
local av = (not o.available) or o.available()
say(" " .. o.key .. " verfuegbar=" .. tostring(av and true or false) .. " Wert=" .. tostring(T.Get(o.key)))
end
if T.lastError then say("Fehler: " .. T.lastError) end
end