forked from minetest-mods/unifiedbricks
Fix stack duplication
This commit is contained in:
parent
4e596096fa
commit
9d1ad53d75
22
init.lua
22
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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user