summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-10-30 20:51:30 +0100
committerWuzzy <almikes@aol.com>2016-10-30 20:51:30 +0100
commita8bc9b83adf5bd2971c12da26605c5dc38af8385 (patch)
tree94baabc57781adacbc980801922cbd1bd04a9c4c
parent19c272bce505b394413a4ee0396ca028324fc48f (diff)
Log warning if entry without name is added
-rw-r--r--init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index b4f4660..a048df3 100644
--- a/init.lua
+++ b/init.lua
@@ -55,6 +55,9 @@ function doc.new_entry(category_id, entry_id, def)
def.hidden = hidden
end
cat.entry_count = doc.data.categories[category_id].entry_count + 1
+ if def.name == nil or def.name == "" then
+ minetest.log("warning", "[doc] Nameless entry added. Entry ID: "..entry_id)
+ end
cat.entries[entry_id] = def
return true
else