Preserve collectible help text in Nenyoo information panel

This commit is contained in:
Debugger
2026-09-14 19:21:42 -04:00
parent 624c607185
commit c45c7f03fc
2 changed files with 34 additions and 2 deletions
+26
View File
@@ -240,6 +240,32 @@ for _, row in ipairs(kortz_info.rows) do
end
assert(colored_status, "Colored YimMenu status text lost its color")
assert(expanded_help, "YimMenu help marker was not expanded in the panel")
local tooltip_explanations = {
"Enables the Trick or Treat event",
"Enables the Snowmen Collectibles event",
"Enables the Yeti Hunt event",
"Enables the special liveries for Knife",
}
local found_explanations = {}
for id in pairs(compat.info_pages) do
local page = compat.info_for_page(id)
for _, row in ipairs(page.rows) do
assert(row.text ~= "[?]", "Unexpanded help marker on " .. tostring(page.title))
for i, explanation in ipairs(tooltip_explanations) do
if row.text:find(explanation, 1, true) then found_explanations[i] = true end
end
end
end
for i, explanation in ipairs(tooltip_explanations) do
assert(found_explanations[i], "Help text did not reach the panel: " .. explanation)
end
for _, action in ipairs(actions) do
assert(action.label ~= "[?]", "Help marker became an action label")
end
for _, input in ipairs(inputs) do
assert(input.label ~= "[?]", "Help marker became an input label")
end
assert(not list_names["[?]"], "Help marker became a submenu label")
current_page_id = apartment_id
panel_draw()
local found_instruction = false
+8 -2
View File
@@ -496,7 +496,11 @@ local function record_text(value, color)
if value == nil or value == "" then return end
local label = tostring(value)
if current_section.tooltip then
if current_section.last_ref then
if current_section.last_info_row then
local row = current_section.last_info_row
if row.text == "[?]" then row.text = label
else row.tooltip = label end
elseif current_section.last_ref then
menu.set_help_text(current_section.last_ref, label)
end
return
@@ -509,7 +513,9 @@ local function record_text(value, color)
rows[#rows + 1] = row
current_section.last_info_row = row
current_section.last_ref = nil
if #compact <= 60 then current_section.last_text = compact:gsub(":$", "") end
if compact ~= "[?]" and #compact <= 60 then
current_section.last_text = compact:gsub(":$", "")
end
end
ImGui.Text = record_text
ImGui.TextUnformatted = ImGui.Text