Use param2-based colorization wherever possible
for brick blocks and clay blocks. Also, this gets rid of the tons and tons of single bricks and lumps of clay, and gets rid of the related crafts, replacing them with a simple place-and-paint scheme for the clay blocks and single-color brick block. Place a default brick block or default clay block, then right-click on it with a dye color to paint it. Digging one of these will return a default brick or clay block and the dye you painted it with. For the multi-color brick blocks, craft them using a single default brick block and three portions of dye. Digging one returns a default brick block and three portions of dye. Multi-color brick blocks are now in the creative inventory.
887
init.lua
@ -7,26 +7,15 @@
|
||||
--Obviously, offers the same colors in unifieddyes.
|
||||
--Thanks go to VanessaE for making unifieddyes, gentextures.sh, etc.
|
||||
|
||||
unifiedbricks = {}
|
||||
unifiedbricks.old_static_list = {}
|
||||
unifiedbricks.old_static_list_formals = {}
|
||||
|
||||
minetest.register_alias("unifieddyes:white","unifieddyes:white_paint")
|
||||
minetest.register_alias("unifieddyes:lightgrey","unifieddyes:lightgrey_paint")
|
||||
minetest.register_alias("unifieddyes:grey","unifieddyes:grey_paint")
|
||||
minetest.register_alias("unifieddyes:darkgrey","unifieddyes:darkgrey_paint")
|
||||
|
||||
--1 indicates yes, 0 indicates no
|
||||
--default:clay_lump + unifieddyes:color = unifiedbricks:color
|
||||
SETTING_allow_default_coloring = 1
|
||||
--red, orange, yellow, lime, green, aqua, cyan, skyblue, blue, violet, magenta,
|
||||
--redviolet, black, darkgrey, mediumgrey, lightgrey, white, respectively (by default)
|
||||
SETTING_allow_hues = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
|
||||
--clayblock, clay, brick, singlecolor brickblock, multicolor brickblock, respectively (by default)
|
||||
SETTING_allow_types = {1,1,1,1,1}
|
||||
--half saturation, full saturation, respectively (by default)
|
||||
SETTING_allow_saturation = {1,1}
|
||||
--dark, medium, bright, light, respectively (by default)
|
||||
SETTING_allow_darkness = {1,1,1,1}
|
||||
--dark, medium, bright, respectively (by default)
|
||||
SETTING_allow_multicolor = {1,1,1}
|
||||
|
||||
HUES = {
|
||||
"red",
|
||||
"orange",
|
||||
@ -101,744 +90,139 @@ FORMALDARKNESS = {
|
||||
"Light "
|
||||
}
|
||||
|
||||
register_clay_block = function(name,formalname)
|
||||
minetest.register_node("unifiedbricks:" .. TYPES[1] .. name, {
|
||||
description = formalname .. FORMALTYPES[1],
|
||||
tiles = {"unifiedbricks_" .. TYPES[1] .. name .. ".png"},
|
||||
-- param2-coloring-enabled nodes
|
||||
|
||||
minetest.register_node("unifiedbricks:brickblock", {
|
||||
description = "Brick Block",
|
||||
tiles = {
|
||||
"unifiedbricks_brickblock.png",
|
||||
{ name = "unifiedbricks_mortar.png", color = 0xffffffff },
|
||||
},
|
||||
drawtype = "mesh",
|
||||
mesh = "unifiedbricks_brick_block.obj",
|
||||
paramtype2 = "color",
|
||||
palette = "unifiedbricks_ud_palette.png",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_destruct = function(pos)
|
||||
unifieddyes.on_destruct(pos)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "unifiedbricks:brickblock")
|
||||
end,
|
||||
drop = "default:brick"
|
||||
})
|
||||
|
||||
minetest.override_item("default:brick", {
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "unifiedbricks:brickblock")
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("unifiedbricks:clayblock", {
|
||||
description = "Clay Block",
|
||||
tiles = {
|
||||
"unifiedbricks_clayblock.png",
|
||||
},
|
||||
paramtype2 = "color",
|
||||
palette = "unifiedbricks_ud_palette.png",
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3, not_in_creative_inventory=1},
|
||||
drop = "unifiedbricks:" .. TYPES[2] .. name .. " 4",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = "",
|
||||
}),
|
||||
on_destruct = function(pos)
|
||||
unifieddyes.on_destruct(pos)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "unifiedbricks:clayblock")
|
||||
end,
|
||||
drop = "default:clay"
|
||||
})
|
||||
|
||||
minetest.override_item("default:clay", {
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "unifiedbricks:clayblock")
|
||||
end
|
||||
register_clay_lump = function(name,formalname)
|
||||
minetest.register_craftitem("unifiedbricks:" .. TYPES[2] .. name, {
|
||||
description = formalname .. FORMALTYPES[2],
|
||||
inventory_image = "unifiedbricks_" .. TYPES[2] .. name .. ".png",
|
||||
groups = {not_in_creative_inventory=1}
|
||||
})
|
||||
|
||||
|
||||
-- static nodes
|
||||
|
||||
unifiedbricks.register_old_static_block = function(name, formalname, blocktype)
|
||||
table.insert(unifiedbricks.old_static_list, "unifiedbricks:"..blocktype.."_"..name)
|
||||
table.insert(unifiedbricks.old_static_list_formals, formalname)
|
||||
end
|
||||
register_brick = function(name,formalname)
|
||||
minetest.register_craftitem("unifiedbricks:" .. TYPES[3] .. name, {
|
||||
description = formalname .. FORMALTYPES[3],
|
||||
inventory_image = "unifiedbricks_" .. TYPES[3] .. name .. ".png",
|
||||
groups = {not_in_creative_inventory=1}
|
||||
})
|
||||
end
|
||||
register_brick_block = function(name,formalname)
|
||||
minetest.register_node("unifiedbricks:" .. TYPES[4] .. name, {
|
||||
description = formalname .. FORMALTYPES[4],
|
||||
tiles = {"unifiedbricks_" .. TYPES[4] .. name .. ".png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory=1},
|
||||
drop = "unifiedbricks:" .. TYPES[3] .. name .." 4",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
register_multicolor = function(name,formalname,drop_one,drop_two,drop_three)
|
||||
|
||||
unifiedbricks.register_multicolor = function(name, formalname, drop_one, drop_two, drop_three)
|
||||
minetest.register_node("unifiedbricks:" .. TYPES[5] .. name, {
|
||||
description = formalname .. FORMALTYPES[5],
|
||||
tiles = {"unifiedbricks_" .. TYPES[5] .. name .. ".png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory=1},
|
||||
drop = {max_items = 4,
|
||||
groups = {cracky=3},
|
||||
drop = {
|
||||
max_items = 4,
|
||||
items = {
|
||||
{items={"unifiedbricks:" .. TYPES[3] .. drop_one .." 2"}},
|
||||
{items={"unifiedbricks:" .. TYPES[3] .. drop_two}},
|
||||
{items={"unifiedbricks:" .. TYPES[3] .. drop_three}}
|
||||
}},
|
||||
items = {
|
||||
{ "default:brick",
|
||||
"unifieddyes:"..drop_one,
|
||||
"unifieddyes:"..drop_two,
|
||||
"unifieddyes:"..drop_three,
|
||||
rarity = 1 }
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
register_clay_craft_default = function(color)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color,
|
||||
recipe = {
|
||||
"default:clay_lump",
|
||||
"unifieddyes:" .. color,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color, "vessels:glass_bottle"} }
|
||||
})
|
||||
end
|
||||
|
||||
register_clay_craft_bucketlast = function(color_combo,color_one,color_two)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
},
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
},
|
||||
replacements = { { "unifieddyes:" .. color_one, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_two, "bucket:bucket_empty"} }
|
||||
})
|
||||
end
|
||||
register_clay_craft_vessellast = function(color_combo,color_one,color_two)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
},
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
},
|
||||
replacements = { { "unifieddyes:" .. color_one, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_two, "vessels:glass_bottle"} }
|
||||
})
|
||||
end
|
||||
register_clay_craft_three = function(color_combo,color_one,color_two,color_three)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
end
|
||||
register_clay_craft_three_reducedfat_blackfirst = function(color_combo,color_one,color_two,color_three)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"} }
|
||||
})
|
||||
end
|
||||
register_clay_craft_three_reducedfat_whitefirst = function(color_combo,color_one,color_two,color_three)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"} }
|
||||
})
|
||||
end
|
||||
register_clay_craft_four_reducedfat_blackfirst = function(color_combo,color_one,color_two,color_three,color_four)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 4",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "vessels:glass_bottle"},{ "unifieddyes:"..color_two, "vessels:glass_bottle"},{ "unifieddyes:"..color_three, "bucket:bucket_empty"},{ "unifieddyes:"..color_four, "vessels:glass_bottle"} }
|
||||
})
|
||||
end
|
||||
register_clay_craft_four_reducedfat_whitefirst = function(color_combo,color_one,color_two,color_three,color_four)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 4",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 3",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 2",
|
||||
recipe = {
|
||||
"unifiedbricks:clay_" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifiedbricks:clay_" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifiedbricks:clay_" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifieddyes:" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:clay_" .. color_combo .. " 1",
|
||||
recipe = {
|
||||
"unifieddyes:" .. color_one,
|
||||
"unifieddyes:" .. color_two,
|
||||
"unifieddyes:" .. color_three,
|
||||
"unifiedbricks:clay_" .. color_four,
|
||||
},
|
||||
replacements = { { "unifieddyes:"..color_one, "bucket:bucket_empty"},{ "unifieddyes:"..color_two, "bucket:bucket_empty"},{ "unifieddyes:"..color_three, "vessels:glass_bottle"},{ "unifieddyes:"..color_four, "bucket:bucket_empty"} }
|
||||
})
|
||||
end
|
||||
|
||||
register_clay_block_craft = function(color)
|
||||
minetest.register_craft({
|
||||
output = "unifiedbricks:" .. TYPES[1] .. color,
|
||||
recipe = {
|
||||
{"unifiedbricks:" .. TYPES[2] .. color, "unifiedbricks:" .. TYPES[2] .. color},
|
||||
{"unifiedbricks:" .. TYPES[2] .. color, "unifiedbricks:" .. TYPES[2] .. color},
|
||||
}
|
||||
})
|
||||
end
|
||||
register_brick_cooking = function(color)
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "unifiedbricks:" .. TYPES[3] .. color,
|
||||
recipe = "unifiedbricks:" .. TYPES[2] .. color,
|
||||
})
|
||||
end
|
||||
register_brick_block_craft = function(color)
|
||||
minetest.register_craft({
|
||||
output = "unifiedbricks:" .. TYPES[4] .. color,
|
||||
recipe = {
|
||||
{"unifiedbricks:" .. TYPES[3] .. color, "unifiedbricks:" .. TYPES[3] .. color},
|
||||
{"unifiedbricks:" .. TYPES[3] .. color, "unifiedbricks:" .. TYPES[3] .. color},
|
||||
}
|
||||
})
|
||||
end
|
||||
register_multicolor_craft = function(name,drop_one,drop_two,drop_three)
|
||||
unifiedbricks.register_multicolor_craft = function(name, dye_one, dye_two, dye_three)
|
||||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "unifiedbricks:multicolor_" .. name,
|
||||
recipe = {
|
||||
"unifiedbricks:".. TYPES[3] .. drop_one,
|
||||
"unifiedbricks:".. TYPES[3] .. drop_one,
|
||||
"unifiedbricks:".. TYPES[3] .. drop_two,
|
||||
"unifiedbricks:".. TYPES[3] .. drop_three,
|
||||
"default:brick",
|
||||
"unifieddyes:"..dye_one,
|
||||
"unifieddyes:"..dye_two,
|
||||
"unifieddyes:"..dye_three
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
--REGISTERS ALL NODES AND CRAFTITEMS EXCEPT MULTICOLOR BRICK BLOCKS
|
||||
--REGISTERS ALL STATIC NODES EXCEPT MULTICOLOR BRICK BLOCKS
|
||||
for i = 1,17 do
|
||||
if SETTING_allow_hues[i] == 1 then
|
||||
for j = 1,4 do
|
||||
if SETTING_allow_types[j] == 1 then
|
||||
if i > 12 then
|
||||
formalname = FORMALHUES[i]
|
||||
name = HUES[i]
|
||||
if j == 1 then register_clay_block(name,formalname)
|
||||
elseif j == 2 then register_clay_lump(name,formalname)
|
||||
elseif j == 3 then register_brick(name,formalname)
|
||||
else register_brick_block(name,formalname) end
|
||||
if j == 1 then
|
||||
unifiedbricks.register_old_static_block(name, formalname, "clayblock")
|
||||
elseif j == 4 then
|
||||
unifiedbricks.register_old_static_block(name, formalname, "brickblock")
|
||||
end
|
||||
else
|
||||
for k = 1,4 do
|
||||
if SETTING_allow_darkness[k] == 1 then
|
||||
if k == 4 then
|
||||
formalname = FORMALDARKNESS[k] .. FORMALHUES[i]
|
||||
name = DARKNESS[k] .. HUES[i]
|
||||
if j == 1 then register_clay_block(name,formalname)
|
||||
elseif j == 2 then register_clay_lump(name,formalname)
|
||||
elseif j == 3 then register_brick(name,formalname)
|
||||
else register_brick_block(name,formalname) end
|
||||
if j == 1 then
|
||||
unifiedbricks.register_old_static_block(name, formalname, "clayblock")
|
||||
elseif j == 4 then
|
||||
unifiedbricks.register_old_static_block(name, formalname, "brickblock")
|
||||
end
|
||||
else
|
||||
for l = 1,2 do
|
||||
if SETTING_allow_saturation[l] == 1 then
|
||||
formalname = FORMALDARKNESS[k] .. FORMALHUES[i] .. FORMALSATURATION[l]
|
||||
name = DARKNESS[k] .. HUES[i] .. SATURATION[l]
|
||||
if j == 1 then register_clay_block(name,formalname)
|
||||
elseif j == 2 then register_clay_lump(name,formalname)
|
||||
elseif j == 3 then register_brick(name,formalname)
|
||||
else register_brick_block(name,formalname) end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--REGISTERS ALL CLAY BLOCK CRAFTING RECIPES
|
||||
if SETTING_allow_types[1] + SETTING_allow_types[2] == 2 then
|
||||
for i = 1,17 do
|
||||
if SETTING_allow_hues[i] == 1 then
|
||||
if i > 12 then
|
||||
register_clay_block_craft(HUES[i])
|
||||
else
|
||||
for k = 1,4 do
|
||||
if SETTING_allow_darkness[k] == 1 then
|
||||
if k == 4 then
|
||||
register_clay_block_craft(DARKNESS[k] .. HUES[i])
|
||||
else
|
||||
for l = 1,2 do
|
||||
if SETTING_allow_saturation[l] == 1 then
|
||||
register_clay_block_craft(DARKNESS[k] .. HUES[i] .. SATURATION[l])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--REGISTERS ALL CLAY LUMP CRAFTING RECIPES
|
||||
if SETTING_allow_types[2] == 1 then
|
||||
if SETTING_allow_saturation[2] + SETTING_allow_darkness[3] == 2 then
|
||||
if SETTING_allow_hues[2] == 1 then register_clay_craft_vessellast("orange","yellow","red") end
|
||||
if SETTING_allow_hues[4] == 1 then register_clay_craft_vessellast("lime","green","yellow") end
|
||||
if SETTING_allow_hues[5] == 1 then register_clay_craft_vessellast("green","blue","yellow") end
|
||||
if SETTING_allow_hues[6] == 1 then register_clay_craft_vessellast("aqua","green","cyan") end
|
||||
if SETTING_allow_hues[7] == 1 then register_clay_craft_vessellast("cyan","blue","green") end
|
||||
if SETTING_allow_hues[8] == 1 then register_clay_craft_vessellast("skyblue","cyan","blue") end
|
||||
if SETTING_allow_hues[10] == 1 then register_clay_craft_vessellast("violet","magenta","blue") end
|
||||
if SETTING_allow_hues[11] == 1 then register_clay_craft_vessellast("magenta","blue","red") end
|
||||
if SETTING_allow_hues[12] == 1 then register_clay_craft_vessellast("redviolet","magenta","red") end
|
||||
|
||||
if SETTING_allow_hues[14] == 1 then register_clay_craft_three_reducedfat_blackfirst("darkgrey","black","black","white") end
|
||||
if SETTING_allow_hues[15] == 1 then register_clay_craft_bucketlast("grey","black","white") end
|
||||
if SETTING_allow_hues[16] == 1 then register_clay_craft_three_reducedfat_whitefirst("lightgrey","white","white","black") end
|
||||
|
||||
if SETTING_allow_default_coloring == 1 then
|
||||
for i = 13,17 do
|
||||
if SETTING_allow_hues[i] == 1 then register_clay_craft_default(HUES[i]) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1,12 do
|
||||
if SETTING_allow_hues[i] == 1 then
|
||||
if SETTING_allow_darkness[1] + SETTING_allow_saturation[1] == 2 then --dark s50
|
||||
register_clay_craft_bucketlast(DARKNESS[1] .. HUES[i] .. SATURATION[1],HUES[i],"darkgrey")
|
||||
register_clay_craft_four_reducedfat_blackfirst(DARKNESS[1] .. HUES[i] .. SATURATION[1],"black","black","white",HUES[i])
|
||||
if SETTING_allow_default_coloring == 1 then register_clay_craft_default(DARKNESS[1] .. HUES[i] .. SATURATION[1]) end end
|
||||
if SETTING_allow_darkness[1] + SETTING_allow_saturation[2] == 2 then --dark
|
||||
register_clay_craft_three_reducedfat_blackfirst(DARKNESS[1] .. HUES[i] .. SATURATION[2],"black","black",HUES[i])
|
||||
if SETTING_allow_default_coloring == 1 then register_clay_craft_default(DARKNESS[1] .. HUES[i] .. SATURATION[2]) end end
|
||||
if SETTING_allow_darkness[2] + SETTING_allow_saturation[1] == 2 then --medium s50
|
||||
register_clay_craft_bucketlast(DARKNESS[2] .. HUES[i] .. SATURATION[1],HUES[i],"grey")
|
||||
register_clay_craft_three(DARKNESS[2] .. HUES[i] .. SATURATION[1],HUES[i],"black","white")
|
||||
if SETTING_allow_default_coloring == 1 then register_clay_craft_default(DARKNESS[2] .. HUES[i] .. SATURATION[1]) end end
|
||||
if SETTING_allow_darkness[2] + SETTING_allow_saturation[2] == 2 then --medium
|
||||
register_clay_craft_vessellast(DARKNESS[2] .. HUES[i] .. SATURATION[2],HUES[i],"black")
|
||||
if SETTING_allow_default_coloring == 1 then register_clay_craft_default(DARKNESS[2] .. HUES[i] .. SATURATION[2]) end end
|
||||
if SETTING_allow_darkness[3] + SETTING_allow_saturation[1] == 2 then --bright s50
|
||||
register_clay_craft_bucketlast(DARKNESS[3] .. HUES[i] .. SATURATION[1],HUES[i],"lightgrey")
|
||||
register_clay_craft_four_reducedfat_whitefirst(DARKNESS[3] .. HUES[i] .. SATURATION[1],"white","white","black",HUES[i])
|
||||
if SETTING_allow_default_coloring == 1 then register_clay_craft_default(DARKNESS[3] .. HUES[i] .. SATURATION[1]) end end
|
||||
if SETTING_allow_darkness[3] + SETTING_allow_saturation[2] == 2 then --bright
|
||||
if SETTING_allow_default_coloring == 1 then register_clay_craft_default(DARKNESS[3] .. HUES[i] .. SATURATION[2]) end end
|
||||
if SETTING_allow_darkness[4] + SETTING_allow_saturation[2] == 2 then --light
|
||||
register_clay_craft_bucketlast(DARKNESS[4] .. HUES[i] .. SATURATION[2],HUES[i],"white")
|
||||
if SETTING_allow_default_coloring == 1 then register_clay_craft_default(DARKNESS[4] .. HUES[i] .. SATURATION[2]) end end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--REGISTERS ALL BRICK COOKING RECIPES
|
||||
if SETTING_allow_types[2] + SETTING_allow_types[3] == 2 then
|
||||
for i = 1,17 do
|
||||
if SETTING_allow_hues[i] == 1 then
|
||||
if i > 12 then
|
||||
register_brick_cooking(HUES[i])
|
||||
else
|
||||
for k = 1,4 do
|
||||
if SETTING_allow_darkness[k] == 1 then
|
||||
if k == 4 then
|
||||
register_brick_cooking(DARKNESS[k] .. HUES[i])
|
||||
else
|
||||
for l = 1,2 do
|
||||
if SETTING_allow_saturation[l] == 1 then
|
||||
register_brick_cooking(DARKNESS[k] .. HUES[i] .. SATURATION[l])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--REGISTERS ALL BRICK BLOCK CRAFTING RECIPES
|
||||
if SETTING_allow_types[3] + SETTING_allow_types[4] == 2 then
|
||||
for i = 1,17 do
|
||||
if SETTING_allow_hues[i] == 1 then
|
||||
if i > 12 then
|
||||
register_brick_block_craft(HUES[i])
|
||||
else
|
||||
for k = 1,4 do
|
||||
if SETTING_allow_darkness[k] == 1 then
|
||||
if k == 4 then
|
||||
register_brick_block_craft(DARKNESS[k] .. HUES[i])
|
||||
else
|
||||
for l = 1,2 do
|
||||
if SETTING_allow_saturation[l] == 1 then
|
||||
register_brick_block_craft(DARKNESS[k] .. HUES[i] .. SATURATION[l])
|
||||
end
|
||||
end
|
||||
if j == 1 then
|
||||
unifiedbricks.register_old_static_block(name, formalname, "clayblock")
|
||||
elseif j == 4 then
|
||||
unifiedbricks.register_old_static_block(name, formalname, "brickblock")
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -848,68 +232,89 @@ if SETTING_allow_types[3] + SETTING_allow_types[4] == 2 then
|
||||
end
|
||||
|
||||
--REGISTERS ALL MULTICOLOR EVERYTHING
|
||||
if SETTING_allow_types[5] == 1 then
|
||||
for i = 1,13 do
|
||||
if SETTING_allow_hues[i] == 1 then
|
||||
if i == 13 then
|
||||
if SETTING_allow_multicolor[1] == 1 then
|
||||
name = HUES[14]
|
||||
formalname = FORMALHUES[14]
|
||||
brick_one = HUES[14]
|
||||
brick_two = HUES[15]
|
||||
brick_three = HUES[16]
|
||||
register_multicolor(name,formalname,brick_one,brick_two,brick_three)
|
||||
register_multicolor_craft(name,brick_one,brick_two,brick_three)
|
||||
end
|
||||
if SETTING_allow_multicolor[2] == 1 then
|
||||
unifiedbricks.register_multicolor(name, formalname, brick_one, brick_two, brick_three)
|
||||
unifiedbricks.register_multicolor_craft(name, brick_one, brick_two, brick_three)
|
||||
|
||||
name = HUES[15]
|
||||
formalname = FORMALHUES[15]
|
||||
brick_one = HUES[15]
|
||||
brick_two = HUES[14]
|
||||
brick_three = HUES[16]
|
||||
register_multicolor(name,formalname,brick_one,brick_two,brick_three)
|
||||
register_multicolor_craft(name,brick_one,brick_two,brick_three)
|
||||
end
|
||||
if SETTING_allow_multicolor[3] == 1 then
|
||||
unifiedbricks.register_multicolor(name, formalname, brick_one, brick_two, brick_three)
|
||||
unifiedbricks.register_multicolor_craft(name, brick_one, brick_two, brick_three)
|
||||
|
||||
name = HUES[16]
|
||||
formalname = FORMALHUES[16]
|
||||
brick_one = HUES[16]
|
||||
brick_two = HUES[14]
|
||||
brick_three = HUES[15]
|
||||
register_multicolor(name,formalname,brick_one,brick_two,brick_three)
|
||||
register_multicolor_craft(name,brick_one,brick_two,brick_three)
|
||||
end
|
||||
unifiedbricks.register_multicolor(name, formalname, brick_one, brick_two, brick_three)
|
||||
unifiedbricks.register_multicolor_craft(name, brick_one, brick_two, brick_three)
|
||||
else
|
||||
if SETTING_allow_multicolor[1] == 1 then
|
||||
name = DARKNESS[1] .. HUES[i]
|
||||
formalname = FORMALDARKNESS[1] .. FORMALHUES[i]
|
||||
brick_one = DARKNESS[1] .. HUES[i]
|
||||
brick_two = DARKNESS[2] .. HUES[i]
|
||||
brick_three = DARKNESS[2] .. HUES[i] .. SATURATION[1]
|
||||
register_multicolor(name,formalname,brick_one,brick_two,brick_three)
|
||||
register_multicolor_craft(name,brick_one,brick_two,brick_three)
|
||||
end
|
||||
if SETTING_allow_multicolor[2] == 1 then
|
||||
unifiedbricks.register_multicolor(name, formalname, brick_one, brick_two, brick_three)
|
||||
unifiedbricks.register_multicolor_craft(name, brick_one, brick_two, brick_three)
|
||||
|
||||
name = DARKNESS[2] .. HUES[i]
|
||||
formalname = FORMALDARKNESS[2] .. FORMALHUES[i]
|
||||
brick_one = DARKNESS[2] .. HUES[i]
|
||||
brick_two = DARKNESS[1] .. HUES[i]
|
||||
brick_three = DARKNESS[3] .. HUES[i] .. SATURATION[1]
|
||||
register_multicolor(name,formalname,brick_one,brick_two,brick_three)
|
||||
register_multicolor_craft(name,brick_one,brick_two,brick_three)
|
||||
end
|
||||
if SETTING_allow_multicolor[3] == 1 then
|
||||
unifiedbricks.register_multicolor(name, formalname, brick_one, brick_two, brick_three)
|
||||
unifiedbricks.register_multicolor_craft(name, brick_one, brick_two, brick_three)
|
||||
|
||||
name = DARKNESS[4] .. HUES[i]
|
||||
formalname = FORMALDARKNESS[4] .. FORMALHUES[i]
|
||||
brick_one = DARKNESS[3] .. HUES[i]
|
||||
brick_two = DARKNESS[4] .. HUES[i]
|
||||
brick_three = DARKNESS[2] .. HUES[i] .. SATURATION[1]
|
||||
register_multicolor(name,formalname,brick_one,brick_two,brick_three)
|
||||
register_multicolor_craft(name,brick_one,brick_two,brick_three)
|
||||
end
|
||||
end
|
||||
end
|
||||
unifiedbricks.register_multicolor(name, formalname, brick_one, brick_two, brick_three)
|
||||
unifiedbricks.register_multicolor_craft(name, brick_one, brick_two, brick_three)
|
||||
end
|
||||
end
|
||||
|
||||
-- convert in-map static nodes to use param2 coloring
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "unifiedbricks:convert_brickblocks",
|
||||
label = "Convert clay blocks and single-color brick blocks to use param2 color",
|
||||
run_at_every_load = true,
|
||||
nodenames = unifiedbricks.old_static_list,
|
||||
action = function(pos, node)
|
||||
|
||||
local name = node.name
|
||||
local t = string.find(name, "_")
|
||||
local type = string.sub(name, 1, t - 1)
|
||||
local color1 = string.sub(name, t + 1)
|
||||
|
||||
local color2 = string.gsub(color1, "grey", "_grey")
|
||||
if color2 == "_grey" then color2 = "grey" end
|
||||
|
||||
local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color2)
|
||||
|
||||
if string.find(type, "brickblock") then
|
||||
minetest.set_node(pos, { name = "unifiedbricks:brickblock", param2 = paletteidx })
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("dye", "unifieddyes:"..color1)
|
||||
print(dump(color))
|
||||
elseif string.find(type, "clayblock") then
|
||||
minetest.set_node(pos, { name = "unifiedbricks:clayblock", param2 = paletteidx })
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("dye", "unifieddyes:"..color1)
|
||||
print(dump(color))
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
print("[UnifiedBricks] Loaded!")
|
||||
|
44
models/unifiedbricks_brick_block.obj
Normal file
@ -0,0 +1,44 @@
|
||||
# Blender v2.72 (sub 0) OBJ File: 'unifiedbricks_brick_block.blend'
|
||||
# www.blender.org
|
||||
o Cube
|
||||
v 0.496092 0.496092 0.496092
|
||||
v 0.496092 0.496092 -0.496092
|
||||
v -0.496092 0.496092 -0.496092
|
||||
v -0.496092 0.496092 0.496092
|
||||
v 0.496092 -0.496092 0.496092
|
||||
v 0.496092 -0.496092 -0.496092
|
||||
v -0.496092 -0.496092 -0.496092
|
||||
v -0.496092 -0.496092 0.496092
|
||||
v 0.499750 0.499750 0.499750
|
||||
v 0.499750 0.499750 -0.499750
|
||||
v -0.499750 0.499750 -0.499750
|
||||
v -0.499750 0.499750 0.499750
|
||||
v 0.499750 -0.499750 0.499750
|
||||
v 0.499750 -0.499750 -0.499750
|
||||
v -0.499750 -0.499750 -0.499750
|
||||
v -0.499750 -0.499750 0.499750
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
g Cube_Cube_base
|
||||
s off
|
||||
f 8/1/1 7/2/1 6/3/1 5/4/1
|
||||
f 4/2/2 3/3/2 7/4/2 8/1/2
|
||||
f 1/3/3 2/4/3 3/1/3 4/2/3
|
||||
f 2/2/4 1/3/4 5/4/4 6/1/4
|
||||
f 3/2/5 2/3/5 6/4/5 7/1/5
|
||||
f 1/2/6 4/3/6 8/4/6 5/1/6
|
||||
g Cube_Cube_overlay
|
||||
f 16/1/1 15/2/1 14/3/1 13/4/1
|
||||
f 12/2/2 11/3/2 15/4/2 16/1/2
|
||||
f 9/3/3 10/4/3 11/1/3 12/2/3
|
||||
f 10/2/4 9/3/4 13/4/4 14/1/4
|
||||
f 11/2/5 10/3/5 14/4/5 15/1/5
|
||||
f 9/2/6 12/3/6 16/4/6 13/1/6
|
BIN
textures/unifiedbricks_brickblock.png
Normal file
After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 405 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 423 B |
BIN
textures/unifiedbricks_clayblock.png
Normal file
After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 405 B |
Before Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 609 B |