From e1901631823d9ab5ec3562c35dbc1a2f2b337de5 Mon Sep 17 00:00:00 2001 From: superfloh247 Date: Sun, 30 May 2021 17:40:26 +0200 Subject: [PATCH 1/3] enable underch cobble nodes --- tubelib_addons1/grinder.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tubelib_addons1/grinder.lua b/tubelib_addons1/grinder.lua index 466a4a1..3ea7c22 100644 --- a/tubelib_addons1/grinder.lua +++ b/tubelib_addons1/grinder.lua @@ -29,6 +29,19 @@ local CYCLE_TIME = 2 -- Grinder recipes local Recipes = {} +function dump(o) + if type(o) == 'table' then + local s = '{ ' + for k,v in pairs(o) do + if type(k) ~= 'number' then k = '"'..k..'"' end + s = s .. '['..k..'] = ' .. dump(v) .. ',' + end + return s .. '} ' + else + return tostring(o) + end + end + local function formspec(self, pos, meta) return "size[8,8]".. default.gui_bg.. @@ -337,6 +350,17 @@ else tubelib.add_grinder_recipe({input="default:sand", output="default:clay"}) end +if minetest.get_modpath("underch") then + for regnodename,v in pairs(minetest.registered_nodes) do + if string.find(regnodename, "underch:") then + if string.find(regnodename, "_cobble") and not string.find(regnodename, "_wall") then + print("tubelib.add_grinder_recipe: " .. regnodename) + tubelib.add_grinder_recipe({input=regnodename, output="default:gravel"}) + end + end + end +end + tubelib.add_grinder_recipe({input="default:sandstone", output="default:sand 4"}) tubelib.add_grinder_recipe({input="default:desert_sandstone", output="default:desert_sand 4"}) tubelib.add_grinder_recipe({input="default:silver_sandstone", output="default:silver_sand 4"}) From 58c5c7326a27b6a093d90966bc22c4f0d9ad1db4 Mon Sep 17 00:00:00 2001 From: superfloh247 Date: Mon, 31 May 2021 11:33:16 +0200 Subject: [PATCH 2/3] Update grinder.lua --- tubelib_addons1/grinder.lua | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tubelib_addons1/grinder.lua b/tubelib_addons1/grinder.lua index 3ea7c22..2de9eea 100644 --- a/tubelib_addons1/grinder.lua +++ b/tubelib_addons1/grinder.lua @@ -29,19 +29,6 @@ local CYCLE_TIME = 2 -- Grinder recipes local Recipes = {} -function dump(o) - if type(o) == 'table' then - local s = '{ ' - for k,v in pairs(o) do - if type(k) ~= 'number' then k = '"'..k..'"' end - s = s .. '['..k..'] = ' .. dump(v) .. ',' - end - return s .. '} ' - else - return tostring(o) - end - end - local function formspec(self, pos, meta) return "size[8,8]".. default.gui_bg.. From 75fe5d3fa6bf54fecb2c4344572640590d18a265 Mon Sep 17 00:00:00 2001 From: superfloh247 Date: Mon, 31 May 2021 11:55:48 +0200 Subject: [PATCH 3/3] Update nodes.lua --- tubelib_addons1/nodes.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tubelib_addons1/nodes.lua b/tubelib_addons1/nodes.lua index c54e402..87c892a 100644 --- a/tubelib_addons1/nodes.lua +++ b/tubelib_addons1/nodes.lua @@ -254,6 +254,21 @@ gn("ethereal:illumishroom") gn("ethereal:illumishroom2") gn("ethereal:illumishroom3") +------------------------------------------------------------------------------- +-- underch Ground +------------------------------------------------------------------------------- + +if minetest.get_modpath("underch") then + for regnodename,v in pairs(minetest.registered_nodes) do + if string.find(regnodename, "underch:") then + if string.find(regnodename, "_cobble") and not string.find(regnodename, "_wall") then + gnname = string.gsub(regnodename, "_cobble", "") + print("tubelib_addons1.register_ground_node: " .. gnname) + gn(gnname, regnodename) + end + end + end +end ------------------------------------------------------------------------------- -- Registered flowers