From a8bc9b83adf5bd2971c12da26605c5dc38af8385 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 30 Oct 2016 20:51:30 +0100 Subject: Log warning if entry without name is added --- init.lua | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3