rewrite/convert mod over to param2 colorization
New dependency: Unified Dyes Neutral-to-positive side effects: Crafting has changed: only white dye is used to create a patterned node. Once created, this node can be placed and then painted normally with right-click. Now all of Unified Dyes' colors can be applied A few colors were re-mapped in the conversion LBM to keep the colors as similar as possible to Unified Dyes' palette.master
|
@ -1 +1,2 @@
|
|||
default
|
||||
unifieddyes
|
||||
|
|
662
init.lua
|
@ -10,6 +10,8 @@ by blert2112
|
|||
|
||||
-- Remove Blox from creative inventory if colormachine mod is installed
|
||||
|
||||
blox = {}
|
||||
|
||||
local creative = 0
|
||||
|
||||
if (minetest.get_modpath("colormachine")) then
|
||||
|
@ -22,11 +24,7 @@ end
|
|||
|
||||
-- Uncomment the line above and change value to 0 to keep nodes in creative inventory when colormachine is installed.
|
||||
|
||||
local version = "0.7.2112"
|
||||
|
||||
local DyeSub = ""
|
||||
|
||||
local Material = ""
|
||||
local version = "0.8"
|
||||
|
||||
local BloxColours = {
|
||||
"pink",
|
||||
|
@ -41,42 +39,6 @@ local BloxColours = {
|
|||
"black",
|
||||
}
|
||||
|
||||
local UNIFIED = {
|
||||
"magenta",
|
||||
"yellow",
|
||||
"white",
|
||||
"orange",
|
||||
"violet",
|
||||
"blue",
|
||||
"cyan",
|
||||
"red",
|
||||
"green",
|
||||
"black",
|
||||
}
|
||||
|
||||
local BuiltInDyes = {
|
||||
"pink",
|
||||
"yellow",
|
||||
"white",
|
||||
"orange",
|
||||
"violet",
|
||||
"blue",
|
||||
"cyan",
|
||||
"red",
|
||||
"green",
|
||||
"black",
|
||||
}
|
||||
|
||||
local FuelBlox = {
|
||||
"wood",
|
||||
"diamond_wood",
|
||||
"corner_wood",
|
||||
"checker_wood",
|
||||
"cross_wood",
|
||||
"quarter_wood",
|
||||
"loop_wood",
|
||||
}
|
||||
|
||||
local NodeClass = {
|
||||
"diamond",
|
||||
"quarter",
|
||||
|
@ -87,9 +49,9 @@ local NodeClass = {
|
|||
}
|
||||
|
||||
local NodeMaterial = {
|
||||
"",
|
||||
"_wood",
|
||||
"_cobble",
|
||||
"stone",
|
||||
"wood",
|
||||
"cobble",
|
||||
}
|
||||
|
||||
-- Nodes
|
||||
|
@ -145,393 +107,274 @@ minetest.register_node("blox:glowdust", {
|
|||
groups = {cracky=3, snappy=3},
|
||||
})
|
||||
|
||||
-- param2-colored nodes: standard patterns
|
||||
|
||||
for _, NClass in ipairs(NodeClass) do
|
||||
for _, nodeclass in ipairs(NodeClass) do
|
||||
|
||||
for _, colour in ipairs(BloxColours) do
|
||||
local cname = colour .. NClass
|
||||
|
||||
minetest.register_node('blox:' .. cname, {
|
||||
description = colour .. " " .. NClass .. " stone block",
|
||||
tiles = { 'blox_' .. cname .. '.png' },
|
||||
--inventory_image = 'blox_' .. cname .. '.png',
|
||||
minetest.register_node("blox:stone_"..nodeclass, {
|
||||
description = "Blox stone "..nodeclass,
|
||||
drawtype = "mesh",
|
||||
tiles = {
|
||||
{ name = "default_stone.png", color = 0xffffffff },
|
||||
"blox_stone_"..nodeclass..".png"
|
||||
},
|
||||
mesh = "blox_block_with_overlay.obj",
|
||||
palette = "unifieddyes_palette.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "blox:stone_"..nodeclass)
|
||||
end,
|
||||
})
|
||||
|
||||
local sname = colour .. NClass .. '_cobble'
|
||||
|
||||
minetest.register_node('blox:' .. sname, {
|
||||
description = colour .. " " .. NClass .. " cobble block",
|
||||
tiles = { 'blox_' .. sname .. '.png' },
|
||||
--inventory_image = 'blox_' .. sname .. '.png',
|
||||
minetest.register_node("blox:cobble_"..nodeclass, {
|
||||
description = "Blox cobble "..nodeclass,
|
||||
drawtype = "mesh",
|
||||
tiles = {
|
||||
{ name = "default_cobble.png", color = 0xffffffff },
|
||||
"blox_cobble_"..nodeclass..".png"
|
||||
},
|
||||
mesh = "blox_block_with_overlay.obj",
|
||||
palette = "unifieddyes_palette.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "blox:cobble_"..nodeclass)
|
||||
end,
|
||||
})
|
||||
|
||||
local sname = colour .. NClass .. '_wood'
|
||||
|
||||
minetest.register_node('blox:' .. sname, {
|
||||
description = colour .. " " .. NClass .. " wooden block",
|
||||
tiles = { 'blox_' .. sname .. '.png' },
|
||||
--inventory_image = 'blox_' .. sname .. '.png',
|
||||
minetest.register_node("blox:wood_"..nodeclass, {
|
||||
description = "Blox wood "..nodeclass,
|
||||
drawtype = "mesh",
|
||||
tiles = {
|
||||
{ name = "default_wood.png", color = 0xffffffff },
|
||||
"blox_wood_"..nodeclass..".png"
|
||||
},
|
||||
mesh = "blox_block_with_overlay.obj",
|
||||
palette = "unifieddyes_palette.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "blox:wood_"..nodeclass)
|
||||
end,
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
for _, colour in ipairs(BloxColours) do
|
||||
local sname = colour .. 'square'
|
||||
-- param2-colored nodes: tinted wood, cobble, stone, stone square
|
||||
|
||||
minetest.register_node('blox:' .. sname, {
|
||||
description = colour .. " stone square",
|
||||
tiles = { 'blox_' .. sname .. '.png' },
|
||||
--inventory_image = 'blox_' .. sname .. '.png',
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
local sname = colour .. 'stone'
|
||||
|
||||
minetest.register_node('blox:' .. sname, {
|
||||
description = colour .. " stone",
|
||||
tiles = { 'blox_' .. sname .. '.png' },
|
||||
--inventory_image = 'blox_' .. sname .. '.png',
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
local sname = colour .. 'wood'
|
||||
|
||||
minetest.register_node('blox:' .. sname, {
|
||||
description = colour .. " wood",
|
||||
tiles = { 'blox_' .. sname .. '.png' },
|
||||
--inventory_image = 'blox_' .. sname .. '.png',
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
local sname = colour .. 'cobble'
|
||||
|
||||
minetest.register_node('blox:' .. sname, {
|
||||
description = colour .. " cobble",
|
||||
tiles = { 'blox_' .. sname .. '.png' },
|
||||
--inventory_image = 'blox_' .. sname .. '.png',
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_node("blox:wood_tinted", {
|
||||
description = "Blox tinted wood",
|
||||
tiles = { "blox_wood_tinted.png" },
|
||||
palette = "unifieddyes_palette.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "blox:wood_tinted")
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
end
|
||||
minetest.register_node("blox:cobble_tinted", {
|
||||
description = "Blox tinted cobble",
|
||||
tiles = { "blox_cobble_tinted.png" },
|
||||
palette = "unifieddyes_palette.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "blox:cobble_tinted")
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("blox:stone_tinted", {
|
||||
description = "Blox tinted stone",
|
||||
tiles = { "blox_stone_tinted.png" },
|
||||
palette = "unifieddyes_palette.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "blox:stone_tinted")
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("blox:stone_square", {
|
||||
description = "Blox stone square",
|
||||
tiles = { "blox_stone_square.png" },
|
||||
palette = "unifieddyes_palette.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
unifieddyes.on_rightclick(pos, node, clicker,
|
||||
itemstack, pointed_thing, "blox:stone_square")
|
||||
end,
|
||||
})
|
||||
|
||||
-- Crafting
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:glowstone 2',
|
||||
recipe = {
|
||||
{'', 'blox:glowdust', ''},
|
||||
{"", 'blox:glowdust', ""},
|
||||
{'blox:glowdust', 'default:stone', 'blox:glowdust'},
|
||||
{'', 'blox:glowdust', ''},
|
||||
{"", 'blox:glowdust', ""},
|
||||
}
|
||||
})
|
||||
|
||||
local dye_color = "unifieddyes:white"
|
||||
|
||||
for _, colour in ipairs(UNIFIED) do
|
||||
for _, material in ipairs(NodeMaterial) do
|
||||
|
||||
if colour == "magenta" then
|
||||
DyeSub = "pink" else if colour == "violet" then
|
||||
DyeSub = "purple" else
|
||||
DyeSub = colour
|
||||
end
|
||||
end
|
||||
local def_mat = "default:"..material
|
||||
|
||||
for _, NMaterial in ipairs(NodeMaterial) do
|
||||
minetest.register_craft({
|
||||
output = "blox:"..material.."_diamond 4",
|
||||
recipe = {
|
||||
{ def_mat, dye_color, def_mat },
|
||||
{ dye_color, "", dye_color },
|
||||
{ def_mat, dye_color, def_mat },
|
||||
}
|
||||
})
|
||||
|
||||
if NMaterial == "_cobble" then
|
||||
Material = "default:cobble" else if NMaterial == "_wood" then
|
||||
Material = "default:wood" else
|
||||
Material = "default:stone"
|
||||
end
|
||||
end
|
||||
--print(Material, 'unifieddyes:' .. colour)
|
||||
--print('unifieddyes:' .. colour, Material)
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'quarter' .. NMaterial .. ' 4',
|
||||
recipe = {
|
||||
{Material, 'unifieddyes:' .. colour},
|
||||
{'unifieddyes:' .. colour, Material},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "blox:"..material.."_quarter 4",
|
||||
recipe = {
|
||||
{ dye_color, def_mat },
|
||||
{ def_mat, dye_color },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'quarter' .. NMaterial .. ' 4',
|
||||
recipe = {
|
||||
{'unifieddyes:' .. colour, Material},
|
||||
{Material, 'unifieddyes:' .. colour},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "blox:"..material.."_cross 4",
|
||||
recipe = {
|
||||
{ def_mat, "", def_mat },
|
||||
{ "", dye_color, "" },
|
||||
{ def_mat, "", def_mat },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'cross' .. NMaterial .. ' 4',
|
||||
recipe = {
|
||||
{Material, '', Material},
|
||||
{'', 'unifieddyes:' .. colour, ''},
|
||||
{Material, '', Material},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "blox:"..material.."_checker 6",
|
||||
recipe = {
|
||||
{ def_mat, dye_color, def_mat },
|
||||
{ dye_color, def_mat, dye_color },
|
||||
{ def_mat, dye_color, def_mat },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'checker' .. NMaterial .. ' 6',
|
||||
recipe = {
|
||||
{Material, 'unifieddyes:' .. colour,Material},
|
||||
{'unifieddyes:' .. colour, Material, 'unifieddyes:' .. colour},
|
||||
{Material, 'unifieddyes:' .. colour,Material},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "blox:"..material.."_checker 8",
|
||||
recipe = {
|
||||
{ dye_color, def_mat, dye_color },
|
||||
{ def_mat, dye_color, def_mat },
|
||||
{ dye_color, def_mat, dye_color },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'checker' .. NMaterial .. ' 8',
|
||||
recipe = {
|
||||
{'unifieddyes:' .. colour, Material, 'unifieddyes:' .. colour},
|
||||
{Material, 'unifieddyes:' .. colour,Material},
|
||||
{'unifieddyes:' .. colour, Material, 'unifieddyes:' .. colour},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "blox:"..material.."_corner 4",
|
||||
recipe = {
|
||||
{ dye_color, "", dye_color },
|
||||
{ "", def_mat, "" },
|
||||
{ dye_color, "", dye_color },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'loop' .. NMaterial .. ' 6',
|
||||
recipe = {
|
||||
{Material, Material, Material},
|
||||
{Material, 'unifieddyes:' .. colour, Material},
|
||||
{Material, Material, Material},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'corner' .. NMaterial .. ' 4',
|
||||
recipe = {
|
||||
{'unifieddyes:' .. colour, '', 'unifieddyes:' .. colour},
|
||||
{'', Material, ''},
|
||||
{'unifieddyes:' .. colour, '', 'unifieddyes:' .. colour},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'diamond' .. NMaterial .. ' 6',
|
||||
recipe = {
|
||||
{Material, 'unifieddyes:' .. colour, Material},
|
||||
{'unifieddyes:' .. colour, '', 'unifieddyes:' .. colour},
|
||||
{Material, 'unifieddyes:' .. colour, Material},
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
for _, colour in ipairs(UNIFIED) do
|
||||
|
||||
if colour == "magenta" then
|
||||
DyeSub = "pink" else if colour == "violet" then
|
||||
DyeSub = "purple" else
|
||||
DyeSub = colour
|
||||
end
|
||||
minetest.register_craft({
|
||||
output = "blox:"..material.."_loop 6",
|
||||
recipe = {
|
||||
{ def_mat, def_mat, def_mat },
|
||||
{ def_mat, dye_color, def_mat },
|
||||
{ def_mat, def_mat, def_mat },
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'square 6',
|
||||
output = "blox:stone_square 6",
|
||||
recipe = {
|
||||
{'unifieddyes:' .. colour, 'default:stone', 'default:stone'},
|
||||
{'default:stone', 'unifieddyes:' .. colour, 'default:stone'},
|
||||
{'default:stone', 'default:stone', 'unifieddyes:' .. colour},
|
||||
{ dye_color, "default:stone", "default:stone" },
|
||||
{ "default:stone", dye_color, "default:stone" },
|
||||
{ "default:stone", "default:stone", dye_color },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'stone 4',
|
||||
output = "blox:stone_tinted 6",
|
||||
recipe = {
|
||||
{'', 'default:stone', ''},
|
||||
{'default:stone', 'unifieddyes:' .. colour, 'default:stone'},
|
||||
{'', 'default:stone', ''},
|
||||
{ "", "default:stone", "" },
|
||||
{ "default:stone", dye_color, "default:stone" },
|
||||
{ "", "default:stone", "" },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'wood 4',
|
||||
output = "blox:wood_tinted 6",
|
||||
recipe = {
|
||||
{'', 'default:wood', ''},
|
||||
{'default:wood', 'unifieddyes:' .. colour, 'default:wood'},
|
||||
{'', 'default:wood', ''},
|
||||
{ "", "default:wood", "" },
|
||||
{ "default:wood", dye_color, "default:wood" },
|
||||
{ "", "default:wood", "" },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'cobble 4',
|
||||
output = "blox:cobble_tinted 6",
|
||||
recipe = {
|
||||
{'', 'default:cobble', ''},
|
||||
{'default:cobble', 'unifieddyes:' .. colour, 'default:cobble'},
|
||||
{'', 'default:cobble', ''},
|
||||
{ "", "default:cobble", "" },
|
||||
{ "default:cobble", dye_color, "default:cobble" },
|
||||
{ "", "default:cobble", "" },
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
for _, colour in ipairs(BuiltInDyes) do
|
||||
|
||||
if colour == "violet" then
|
||||
DyeSub = "purple" else
|
||||
DyeSub = colour
|
||||
end
|
||||
|
||||
for _, NMaterial in ipairs(NodeMaterial) do
|
||||
|
||||
if NMaterial == "_cobble" then
|
||||
Material = "default:cobble" else if NMaterial == "_wood" then
|
||||
Material = "default:wood" else
|
||||
Material = "default:stone"
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'quarter' .. NMaterial .. ' 4',
|
||||
recipe = {
|
||||
{Material, 'dye:' .. colour},
|
||||
{'dye:' .. colour, Material},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'quarter' .. NMaterial .. ' 4',
|
||||
recipe = {
|
||||
{'dye:' .. colour, Material},
|
||||
{Material, 'dye:' .. colour},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'cross' .. NMaterial .. ' 4',
|
||||
recipe = {
|
||||
{Material, '', Material},
|
||||
{'', 'dye:' .. colour, ''},
|
||||
{Material, '', Material},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'checker' .. NMaterial .. ' 6',
|
||||
recipe = {
|
||||
{Material, 'dye:' .. colour,Material},
|
||||
{'dye:' .. colour, Material, 'dye:' .. colour},
|
||||
{Material, 'dye:' .. colour,Material},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'checker' .. NMaterial .. ' 8',
|
||||
recipe = {
|
||||
{'dye:' .. colour, Material, 'dye:' .. colour},
|
||||
{Material, 'dye:' .. colour,Material},
|
||||
{'dye:' .. colour, Material, 'dye:' .. colour},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'loop' .. NMaterial .. ' 6',
|
||||
recipe = {
|
||||
{Material, Material, Material},
|
||||
{Material, 'dye:' .. colour, Material},
|
||||
{Material, Material, Material},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'corner' .. NMaterial .. ' 4',
|
||||
recipe = {
|
||||
{'dye:' .. colour, '', 'dye:' .. colour},
|
||||
{'', Material, ''},
|
||||
{'dye:' .. colour, '', 'dye:' .. colour},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'diamond' .. NMaterial .. ' 6',
|
||||
recipe = {
|
||||
{Material, 'dye:' .. colour, Material},
|
||||
{'dye:' .. colour, '', 'dye:' .. colour},
|
||||
{Material, 'dye:' .. colour, Material},
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
for _, colour in ipairs(UNIFIED) do
|
||||
|
||||
if colour == "magenta" then
|
||||
DyeSub = "pink" else if colour == "violet" then
|
||||
DyeSub = "purple" else
|
||||
DyeSub = colour
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'square 6',
|
||||
recipe = {
|
||||
{'dye:' .. colour, 'default:stone', 'default:stone'},
|
||||
{'default:stone', 'dye:' .. colour, 'default:stone'},
|
||||
{'default:stone', 'default:stone', 'dye:' .. colour},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'stone 4',
|
||||
recipe = {
|
||||
{'', 'default:stone', ''},
|
||||
{'default:stone', 'dye:' .. colour, 'default:stone'},
|
||||
{'', 'default:stone', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'wood 4',
|
||||
recipe = {
|
||||
{'', 'default:wood', ''},
|
||||
{'default:wood', 'dye:' .. colour, 'default:wood'},
|
||||
{'', 'default:wood', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'blox:' .. DyeSub ..'cobble 4',
|
||||
recipe = {
|
||||
{'', 'default:cobble', ''},
|
||||
{'default:cobble', 'dye:' .. colour, 'default:cobble'},
|
||||
{'', 'default:cobble', ''},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
--Fuel
|
||||
for _, colour in ipairs(BloxColours) do
|
||||
|
||||
for _, blox in ipairs(FuelBlox) do
|
||||
for _, nodeclass in ipairs(NodeClass) do
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "blox:wood_"..nodeclass,
|
||||
burntime = 7,
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "blox:" .. colour .. blox,
|
||||
recipe = "blox:wood_tinted",
|
||||
burntime = 7,
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
-- Tools
|
||||
|
||||
minetest.register_tool("blox:bloodbane", {
|
||||
description = "Blood Bane",
|
||||
|
@ -550,6 +393,8 @@ minetest.register_tool("blox:bloodbane", {
|
|||
}
|
||||
})
|
||||
|
||||
-- Ores
|
||||
|
||||
local sea_level = 1
|
||||
|
||||
minetest.register_on_mapgen_init(function(mapgen_params)
|
||||
|
@ -589,4 +434,99 @@ minetest.register_ore({
|
|||
y_max = sea_level - 1,
|
||||
})
|
||||
|
||||
-- Convert old static nodes to param2 color
|
||||
|
||||
blox.old_static_list = {}
|
||||
|
||||
for _, nodeclass in ipairs(NodeClass) do
|
||||
if nodeclass ~= "colored" then
|
||||
for _, color in ipairs(BloxColours) do
|
||||
table.insert(blox.old_static_list, "blox:"..color..nodeclass)
|
||||
table.insert(blox.old_static_list, "blox:"..color..nodeclass.."_cobble")
|
||||
table.insert(blox.old_static_list, "blox:"..color..nodeclass.."_wood")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, color in ipairs(BloxColours) do
|
||||
table.insert(blox.old_static_list, "blox:"..color.."square")
|
||||
table.insert(blox.old_static_list, "blox:"..color.."stone")
|
||||
table.insert(blox.old_static_list, "blox:"..color.."wood")
|
||||
table.insert(blox.old_static_list, "blox:"..color.."cobble")
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "blox:convert",
|
||||
label = "Convert blox blocks to use param2 color",
|
||||
run_at_every_load = true,
|
||||
nodenames = blox.old_static_list,
|
||||
action = function(pos, node)
|
||||
local basename = string.sub(node.name, 6)
|
||||
local color = basename
|
||||
local material = "stone"
|
||||
local pattern = "tinted"
|
||||
|
||||
if string.find(basename, "_cobble") then
|
||||
basename = string.sub(basename, 1, -8)
|
||||
material = "cobble"
|
||||
elseif string.find(basename, "cobble") then
|
||||
basename = string.sub(basename, 1, -7)
|
||||
material = "cobble"
|
||||
elseif string.find(basename, "_wood") then
|
||||
basename = string.sub(basename, 1, -6)
|
||||
material = "wood"
|
||||
elseif string.find(basename, "wood") then
|
||||
basename = string.sub(basename, 1, -5)
|
||||
material = "wood"
|
||||
elseif string.find(basename, "square") then
|
||||
basename = string.sub(basename, 1, -7)
|
||||
pattern = "square"
|
||||
elseif string.find(basename, "stone") then
|
||||
basename = string.sub(basename, 1, -6)
|
||||
end
|
||||
|
||||
-- at this point, the material type has been deleted from `basename`.
|
||||
|
||||
if string.find(basename, "quarter") then
|
||||
basename = string.sub(basename, 1, -8)
|
||||
pattern = "quarter"
|
||||
elseif string.find(basename, "cross") then
|
||||
basename = string.sub(basename, 1, -6)
|
||||
pattern = "cross"
|
||||
elseif string.find(basename, "corner") then
|
||||
basename = string.sub(basename, 1, -7)
|
||||
pattern = "corner"
|
||||
elseif string.find(basename, "diamond") then
|
||||
basename = string.sub(basename, 1, -8)
|
||||
pattern = "diamond"
|
||||
elseif string.find(basename, "loop") then
|
||||
basename = string.sub(basename, 1, -5)
|
||||
pattern = "loop"
|
||||
elseif string.find(basename, "checker") then
|
||||
basename = string.sub(basename, 1, -8)
|
||||
pattern = "checker"
|
||||
end
|
||||
|
||||
-- all that's left in `basename` now is the color.
|
||||
|
||||
color = basename
|
||||
if color == "purple" then
|
||||
color = "violet"
|
||||
elseif color == "blue" then
|
||||
color = "skyblue"
|
||||
elseif color == "pink" then
|
||||
color = "magenta"
|
||||
elseif color == "black" and
|
||||
( pattern == "square" or
|
||||
pattern == "tinted" ) then
|
||||
color = "dark_grey"
|
||||
end
|
||||
|
||||
local paletteidx, _ = unifieddyes.getpaletteidx("unifieddyes:"..color)
|
||||
minetest.set_node(pos, { name = "blox:"..material.."_"..pattern, param2 = paletteidx })
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
end
|
||||
})
|
||||
|
||||
print("Blox Mod [" ..version.. "] Loaded!")
|
||||
|
|
|
@ -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
|
Before Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 492 B |
Before Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 533 B |
Before Width: | Height: | Size: 584 B |
Before Width: | Height: | Size: 488 B |
Before Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 608 B |
Before Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 597 B |
Before Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 607 B |
Before Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 468 B |
Before Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 731 B |
Before Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 676 B |
Before Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 674 B |
Before Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 731 B |
Before Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 663 B |
Before Width: | Height: | Size: 653 B |
Before Width: | Height: | Size: 867 B |
Before Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 852 B |
After Width: | Height: | Size: 384 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 380 B |
After Width: | Height: | Size: 354 B |
After Width: | Height: | Size: 342 B |
After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 779 B |
Before Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 690 B |
Before Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 644 B |
Before Width: | Height: | Size: 726 B |
Before Width: | Height: | Size: 705 B |
Before Width: | Height: | Size: 669 B |
Before Width: | Height: | Size: 659 B |
Before Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 713 B |
Before Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 659 B |
Before Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 869 B |
Before Width: | Height: | Size: 819 B |
Before Width: | Height: | Size: 891 B |
Before Width: | Height: | Size: 825 B |
Before Width: | Height: | Size: 679 B |
Before Width: | Height: | Size: 657 B |
Before Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 669 B |
Before Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 675 B |
Before Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 717 B |
Before Width: | Height: | Size: 669 B |
Before Width: | Height: | Size: 688 B |
Before Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 692 B |
Before Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 652 B |
Before Width: | Height: | Size: 815 B |
Before Width: | Height: | Size: 757 B |
Before Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 695 B |