diff options
-rw-r--r-- | init.lua | 25 |
1 files changed, 7 insertions, 18 deletions
@@ -22,6 +22,13 @@ local item_name_overrides = { } -- Helper functions +local yesno = function(bool) + if bool==true then return "Yes" + elseif bool==false then return "No" + else return "N/A" end +end + + local groups_to_string = function(grouptable, filter) local gstring = "" local groups_count = 0 @@ -204,12 +211,6 @@ doc.new_category("nodes", { formstring = formstring .. "\n" - local yesno = function(bool) - if bool==true then return "Yes" - elseif bool==false then return "No" - else return "N/A" end - end - formstring = formstring .. "Collidable: "..yesno(data.def.walkable).. "\n" local liquid if data.def.liquidtype ~= "none" then liquid = true else liquid = false end @@ -536,12 +537,6 @@ doc.new_category("tools", { formstring = formstring .. "Maximum stack size: "..data.def.stack_max.. "\n" end - local yesno = function(bool) - if bool==true then return "Yes" - elseif bool==false then return "No" - else return "N/A" end - end - formstring = formstring .. range_factoid(data.itemstring, data.def) .. "\n" formstring = formstring .. "\n" @@ -595,12 +590,6 @@ doc.new_category("craftitems", { end formstring = formstring .. "Maximum stack size: "..data.def.stack_max.. "\n" - local yesno = function(bool) - if bool==true then return "Yes" - elseif bool==false then return "No" - else return "N/A" end - end - formstring = formstring .. range_factoid(data.itemstring, data.def) .. "\n" formstring = formstring .. "\n" |