multicolor bricks
106
init.lua
@ -18,12 +18,14 @@ SETTING_allow_default_coloring = 1
|
|||||||
--red, orange, yellow, lime, green, aqua, cyan, skyblue, blue, violet, magenta,
|
--red, orange, yellow, lime, green, aqua, cyan, skyblue, blue, violet, magenta,
|
||||||
--redviolet, black, darkgrey, mediumgrey, lightgrey, white, respectively (by default)
|
--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}
|
SETTING_allow_hues = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
|
||||||
--clayblock, clay, brick, brickblock, respectively (by default)
|
--clayblock, clay, brick, singlecolor brickblock, multicolor brickblock, respectively (by default)
|
||||||
SETTING_allow_types = {1,1,1,1}
|
SETTING_allow_types = {1,1,1,1,1}
|
||||||
--half saturation, full saturation, respectively (by default)
|
--half saturation, full saturation, respectively (by default)
|
||||||
SETTING_allow_saturation = {1,1}
|
SETTING_allow_saturation = {1,1}
|
||||||
--dark, medium, bright, light, respectively (by default)
|
--dark, medium, bright, light, respectively (by default)
|
||||||
SETTING_allow_darkness = {1,1,1,1}
|
SETTING_allow_darkness = {1,1,1,1}
|
||||||
|
--dark, medium, bright, respectively (by default)
|
||||||
|
SETTING_allow_multicolor = {1,1,1}
|
||||||
|
|
||||||
HUES = {
|
HUES = {
|
||||||
"red",
|
"red",
|
||||||
@ -48,7 +50,8 @@ TYPES = {
|
|||||||
"clayblock_",
|
"clayblock_",
|
||||||
"clay_",
|
"clay_",
|
||||||
"brick_",
|
"brick_",
|
||||||
"brickblock_"
|
"brickblock_",
|
||||||
|
"multicolor_"
|
||||||
}
|
}
|
||||||
SATURATION = {
|
SATURATION = {
|
||||||
"_s50",
|
"_s50",
|
||||||
@ -84,7 +87,8 @@ FORMALTYPES = {
|
|||||||
" clay",
|
" clay",
|
||||||
" clay lump",
|
" clay lump",
|
||||||
" brick",
|
" brick",
|
||||||
" bricks"
|
" bricks",
|
||||||
|
" multicolor bricks"
|
||||||
}
|
}
|
||||||
FORMALSATURATION = {
|
FORMALSATURATION = {
|
||||||
" (low saturation)",
|
" (low saturation)",
|
||||||
@ -131,6 +135,21 @@ register_brick_block = function(name,formalname)
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
register_multicolor = function(name,formalname,drop_one,drop_two,drop_three)
|
||||||
|
minetest.register_node("unifiedbricks:" .. TYPES[5] .. name, {
|
||||||
|
description = formalname .. FORMALTYPES[5],
|
||||||
|
tile_images = {"unifiedbricks_" .. TYPES[5] .. name .. ".png"},
|
||||||
|
is_ground_content = true,
|
||||||
|
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}}
|
||||||
|
}},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
register_clay_craft_default = function(color)
|
register_clay_craft_default = function(color)
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
@ -643,8 +662,20 @@ register_brick_block_craft = function(color)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
register_multicolor_craft = function(name,drop_one,drop_two,drop_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,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
--REGISTERS ALL NODES AND CRAFTITEMS
|
--REGISTERS ALL NODES AND CRAFTITEMS EXCEPT MULTICOLOR BRICK BLOCKS
|
||||||
for i = 1,17 do
|
for i = 1,17 do
|
||||||
if SETTING_allow_hues[i] == 1 then
|
if SETTING_allow_hues[i] == 1 then
|
||||||
for j = 1,4 do
|
for j = 1,4 do
|
||||||
@ -814,4 +845,69 @@ if SETTING_allow_types[3] + SETTING_allow_types[4] == 2 then
|
|||||||
end
|
end
|
||||||
end
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
print("[UnifiedBricks] Loaded!")
|
print("[UnifiedBricks] Loaded!")
|
||||||
|
BIN
textures/unifiedbricks_multicolor_dark_aqua.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_blue.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_cyan.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_green.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_lime.png
Normal file
After Width: | Height: | Size: 495 B |
BIN
textures/unifiedbricks_multicolor_dark_magenta.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_orange.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_red.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_redviolet.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_skyblue.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_violet.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_dark_yellow.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
textures/unifiedbricks_multicolor_darkgrey.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
textures/unifiedbricks_multicolor_grey.png
Normal file
After Width: | Height: | Size: 439 B |
BIN
textures/unifiedbricks_multicolor_light_aqua.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_blue.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_cyan.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_green.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_lime.png
Normal file
After Width: | Height: | Size: 475 B |
BIN
textures/unifiedbricks_multicolor_light_magenta.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_orange.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_red.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_redviolet.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_skyblue.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_violet.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_light_yellow.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
textures/unifiedbricks_multicolor_lightgrey.png
Normal file
After Width: | Height: | Size: 432 B |
BIN
textures/unifiedbricks_multicolor_medium_aqua.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_blue.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_cyan.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_green.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_lime.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
textures/unifiedbricks_multicolor_medium_magenta.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_orange.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_red.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_redviolet.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_skyblue.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_violet.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
textures/unifiedbricks_multicolor_medium_yellow.png
Normal file
After Width: | Height: | Size: 503 B |