forked from VoxeLibre/VoxeLibre
[doc] fix warnings
This commit is contained in:
parent
4fd0bf2c3f
commit
21b7647731
|
@ -48,5 +48,5 @@ read_globals = {
|
||||||
"default",
|
"default",
|
||||||
|
|
||||||
--HUD
|
--HUD
|
||||||
"sfinv", "unified_inventory",
|
"sfinv", "sfinv_buttons", "unified_inventory", "cmsg", "inventory_plus",
|
||||||
}
|
}
|
|
@ -233,7 +233,7 @@ end
|
||||||
|
|
||||||
-- Returns true if the specified entry has been viewed by the player
|
-- Returns true if the specified entry has been viewed by the player
|
||||||
function doc.entry_viewed(playername, category_id, entry_id)
|
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
|
if doc.data.players[playername].stored_data.viewed[category_id] == nil then
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
|
@ -243,7 +243,7 @@ end
|
||||||
|
|
||||||
-- Returns true if the specified entry is hidden from the player
|
-- Returns true if the specified entry is hidden from the player
|
||||||
function doc.entry_revealed(playername, category_id, entry_id)
|
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
|
local hidden = doc.data.categories[category_id].entries[entry_id].hidden
|
||||||
if doc.data.players[playername].stored_data.revealed[category_id] == nil then
|
if doc.data.players[playername].stored_data.revealed[category_id] == nil then
|
||||||
return not hidden
|
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())
|
minetest.show_formspec(playername, "doc:error_no_categories", doc.formspec_error_no_categories())
|
||||||
return
|
return
|
||||||
end
|
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
|
if ignore_hidden or doc.entry_revealed(playername, category_id, entry_id) then
|
||||||
local playerdata = doc.data.players[playername]
|
local playerdata = doc.data.players[playername]
|
||||||
playerdata.category = category_id
|
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.."]"
|
formstring = formstring .. "label["..nx..","..ny..";"..i.."]"
|
||||||
pos = pos + 1
|
pos = pos + 1
|
||||||
end
|
end
|
||||||
local bw, bh
|
|
||||||
|
|
||||||
return formstring, ih
|
return formstring, ih
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue