From 9d1ad53d753ab07649733e921e13a327e5b7144f Mon Sep 17 00:00:00 2001 From: sys4 Date: Sat, 24 Jul 2021 12:55:27 +0200 Subject: [PATCH] Fix stack duplication --- init.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 37b9beb..b15f0bd 100644 --- a/init.lua +++ b/init.lua @@ -101,11 +101,11 @@ local function get_class_shape(brick_type, name) c = 11 elseif brick_type == "brick" then c = 6 - elseif brick_type == "brick_multi_dark" then + elseif brick_type == "brick_multicolor_dark" then c = 22 - elseif brick_type == "brick_multi_medium" then + elseif brick_type == "brick_multicolor_medium" then c = 24 - elseif brick_type == "brick_multi_light" then + elseif brick_type == "brick_multicolor_light" then c = 23 end local class = string.sub(name, a+1, b-1) @@ -412,7 +412,7 @@ if minetest.get_modpath("moreblocks") then substring_short = "bric", substring_long = "brick", }, - brick_multi_dark = { + brick_multicolor_dark = { name = "brickblock_multicolor_dark", base_node = "unifiedbricks:brick_multicolor_dark", base_name = "brick_multicolor_dark", @@ -423,7 +423,7 @@ if minetest.get_modpath("moreblocks") then substring_short = "brick_multicolor_da", substring_long = "brick_multicolor_dar", }, - brick_multi_medium = { + brick_multicolor_medium = { name = "brickblock_multicolor_medium", base_node = "unifiedbricks:brick_multicolor_medium", base_name = "brick_multicolor_medium", @@ -434,7 +434,7 @@ if minetest.get_modpath("moreblocks") then substring_short = "brick_multicolor_me", substring_long = "brick_multicolor_med", }, - brick_multi_light = { + brick_multicolor_light = { name = "brickblock_multicolor_light", base_node = "unifiedbricks:brick_multicolor_light", base_name = "brick_multicolor_light", @@ -452,8 +452,8 @@ if minetest.get_modpath("moreblocks") then groups2.ud_param2_colorable = 1 groups2.not_in_creative_inventory=1 - if brick_type == "brick_multi_dark" or brick_type == "brick_multi_medium" or - brick_type == "brick_multi_light" then + if brick_type == "brick_multicolor_dark" or brick_type == "brick_multicolor_medium" or + brick_type == "brick_multicolor_light" then stairsplus:register_all( "unifiedbricks", @@ -493,11 +493,9 @@ if minetest.get_modpath("moreblocks") then for brick_type, def in pairs(brick_types) do local chk = string.sub(i.name, 1, def.substring_count) - local sub_type = "" + local sub_type = "unifiedbricks:" if brick_type == "stonebrick" or brick_type == "brick" then sub_type = "moreblocks:" - else - sub_type = "unifiedbricks:" end if chk == sub_type.."stair_"..def.substring_short @@ -511,11 +509,13 @@ if minetest.get_modpath("moreblocks") then groups2.not_in_creative_inventory=1 local class, shape = get_class_shape(brick_type, i.name) + minetest.override_item(i.name, { groups = groups2, paramtype2 = "colorfacedir", palette = "unifieddyes_palette_greys.png", airbrush_replacement_node = "unifiedbricks:"..class.."_"..def.name.."_grey"..shape, + drop = sub_type..class.."_"..brick_type..shape, -- Fix drop }) unifieddyes.register_color_craft({