From 21b7647731fce4a11ce99dd47e3fdbd3d43fd56a Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 23 May 2021 14:23:37 +0200 Subject: [PATCH] [doc] fix warnings --- .luacheckrc | 2 +- mods/HELP/doc/doc/init.lua | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 2497a10ff7..910d73a11f 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -48,5 +48,5 @@ read_globals = { "default", --HUD - "sfinv", "unified_inventory", + "sfinv", "sfinv_buttons", "unified_inventory", "cmsg", "inventory_plus", } \ No newline at end of file diff --git a/mods/HELP/doc/doc/init.lua b/mods/HELP/doc/doc/init.lua index 029914a532..a04d83bdab 100644 --- a/mods/HELP/doc/doc/init.lua +++ b/mods/HELP/doc/doc/init.lua @@ -233,7 +233,7 @@ end -- Returns true if the specified entry has been viewed by the player function doc.entry_viewed(playername, category_id, entry_id) - local entry, category_id, entry_id = get_entry(category_id, entry_id) + local _, category_id, entry_id = get_entry(category_id, entry_id) if doc.data.players[playername].stored_data.viewed[category_id] == nil then return false else @@ -243,7 +243,7 @@ end -- Returns true if the specified entry is hidden from the player function doc.entry_revealed(playername, category_id, entry_id) - local entry, category_id, entry_id = get_entry(category_id, entry_id) + local _, category_id, entry_id = get_entry(category_id, entry_id) local hidden = doc.data.categories[category_id].entries[entry_id].hidden if doc.data.players[playername].stored_data.revealed[category_id] == nil then return not hidden @@ -302,7 +302,7 @@ function doc.show_entry(playername, category_id, entry_id, ignore_hidden) minetest.show_formspec(playername, "doc:error_no_categories", doc.formspec_error_no_categories()) return end - local entry, category_id, entry_id = get_entry(category_id, entry_id) + local _, category_id, entry_id = get_entry(category_id, entry_id) if ignore_hidden or doc.entry_revealed(playername, category_id, entry_id) then local playerdata = doc.data.players[playername] playerdata.category = category_id @@ -587,8 +587,6 @@ doc.widgets.gallery = function(imagedata, playername, x, y, aspect_ratio, width, formstring = formstring .. "label["..nx..","..ny..";"..i.."]" pos = pos + 1 end - local bw, bh - return formstring, ih end