From 8e08e4be26543c34c10a57b4e5db94e9c7406571 Mon Sep 17 00:00:00 2001 From: Evgeniy Date: Tue, 4 Feb 2025 05:51:13 +0300 Subject: [PATCH] homedecor errors, aliasing error suppress, block sound error --- nodes.lua | 59 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/nodes.lua b/nodes.lua index ec1a650..88f9da4 100644 --- a/nodes.lua +++ b/nodes.lua @@ -12,7 +12,8 @@ local sound_wood = moreblocks.node_sound_wood_defaults() local sound_stone = moreblocks.node_sound_stone_defaults() local sound_glass = moreblocks.node_sound_glass_defaults() local sound_leaves = moreblocks.node_sound_leaves_defaults() - +local sound_gravel = default.node_sound_gravel_defaults() +local sound_sand = default.node_sound_sand_defaults() -- Don't break on 0.4.14 and earlier. local sound_metal = (moreblocks.node_sound_metal_defaults and moreblocks.node_sound_metal_defaults() or sound_stone) @@ -39,7 +40,6 @@ end local deprecated = (" ("..S('Deprecated')..")") -- start gravel add part 1 -local sound_gravel = default.node_sound_gravel_defaults() local box_slope = { type = "fixed", @@ -939,36 +939,39 @@ local nodes = { } for name, def in pairs(nodes) do - def.is_ground_content = def.is_ground_content == true - def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"} - minetest.register_node("moreblocks:" ..name, def) - minetest.register_alias(name, "moreblocks:" ..name) + if name ~= "tar" and core.get_modpath("building_blocks") then + --homedecor errors, aliasing error suppress + def.is_ground_content = def.is_ground_content == true + def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"} + minetest.register_node("moreblocks:" ..name, def) + minetest.register_alias(name, "moreblocks:" ..name) - def_copy = table.copy(def) + def_copy = table.copy(def) - -- Use the primary tile for all sides of cut glasslike nodes. - -- This makes them easier to see - if - #def_copy.tiles > 1 and - def_copy.drawtype and - def_copy.drawtype == "glasslike_framed" or - def_copy.drawtype == "glasslike_framed_optional" - then - def.tiles = {def_copy.tiles[1]} - end + -- Use the primary tile for all sides of cut glasslike nodes. + -- This makes them easier to see + if + #def_copy.tiles > 1 and + def_copy.drawtype and + def_copy.drawtype == "glasslike_framed" or + def_copy.drawtype == "glasslike_framed_optional" + then + def.tiles = {def_copy.tiles[1]} + end - if not def.no_stairs then - local groups = {} - for k, v in pairs(def.groups) do groups[k] = v end - stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, { - description = def.description, - groups = groups, - tiles = def.tiles, - sunlight_propagates = def.sunlight_propagates, - light_source = def.light_source, - sounds = def.sounds, - }) + if not def.no_stairs then + local groups = {} + for k, v in pairs(def.groups) do groups[k] = v end + stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, { + description = def.description, + groups = groups, + tiles = def.tiles, + sunlight_propagates = def.sunlight_propagates, + light_source = def.light_source, + sounds = def.sounds, + }) + end end end