nodes.lua: Re-indent and simplify code
This commit is contained in:
parent
918405b967
commit
198120ec33
795
nodes.lua
795
nodes.lua
@ -1,643 +1,236 @@
|
|||||||
|
-- TODO: Combine with the table in chisel.lua
|
||||||
local vert1 = {
|
local chisel_node_defs = {
|
||||||
type = "fixed",
|
["mychisel:chiseled_%s"] = {
|
||||||
fixed = {
|
desc = "",
|
||||||
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
{ -- 1
|
||||||
{0.1875, -0.5, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local vert2 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
|
||||||
{0.1875, -0.5, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local vert3 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
|
||||||
{0.1875, -0.5, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local vert4 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
|
||||||
{0.1875, -0.5, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local hori1 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local hori2 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local hori3 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local hori4 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local cross1 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
|
||||||
{0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5},
|
|
||||||
{-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5},
|
|
||||||
{0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local cross2 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
|
||||||
{0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5},
|
|
||||||
{-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5},
|
|
||||||
{0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local cross3 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
|
||||||
{0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5},
|
|
||||||
{-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5},
|
|
||||||
{0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local cross4 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
|
||||||
{0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5},
|
|
||||||
{-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5},
|
|
||||||
{0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local chis1 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
||||||
{-0.4375, -0.4375, -0.5, 0.4375, 0.4375, 0.5},
|
{-0.4375, -0.4375, -0.5, 0.4375, 0.4375, 0.5},
|
||||||
}
|
},
|
||||||
}
|
{ -- 2
|
||||||
|
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
||||||
local chis2 = {
|
{-0.375, -0.375, -0.5, 0.375, 0.375, 0.5},
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
|
||||||
{-0.375, -0.375, -0.5, 0.375, 0.375, 0.5},
|
|
||||||
{-0.4375, -0.4375, -0.4375, 0.4375, 0.4375, 0.5},
|
{-0.4375, -0.4375, -0.4375, 0.4375, 0.4375, 0.5},
|
||||||
}
|
},
|
||||||
}
|
{ -- 3
|
||||||
|
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
||||||
local chis3 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
|
||||||
{-0.375, -0.375, -0.4375, 0.375, 0.375, 0.5},
|
{-0.375, -0.375, -0.4375, 0.375, 0.375, 0.5},
|
||||||
{-0.4375, -0.4375, -0.375, 0.4375, 0.4375, 0.5},
|
{-0.4375, -0.4375, -0.375, 0.4375, 0.4375, 0.5},
|
||||||
{-0.3125, -0.3125, -0.5, 0.3125, 0.3125, 0.5},
|
{-0.3125, -0.3125, -0.5, 0.3125, 0.3125, 0.5},
|
||||||
}
|
},
|
||||||
}
|
{ -- 4
|
||||||
|
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
||||||
local chis4 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
|
||||||
{-0.375, -0.375, -0.375, 0.375, 0.375, 0.5},
|
{-0.375, -0.375, -0.375, 0.375, 0.375, 0.5},
|
||||||
{-0.4375, -0.4375, -0.3125, 0.4375, 0.4375, 0.5},
|
{-0.4375, -0.4375, -0.3125, 0.4375, 0.4375, 0.5},
|
||||||
{-0.3125, -0.3125, -0.4375, 0.3125, 0.3125, 0.5},
|
{-0.3125, -0.3125, -0.4375, 0.3125, 0.3125, 0.5},
|
||||||
{-0.25, -0.25, -0.5, 0.25, 0.25, 0.5},
|
{-0.25, -0.25, -0.5, 0.25, 0.25, 0.5},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
["mychisel:horizontal_%s"] = {
|
||||||
local squar1 = {
|
desc = "",
|
||||||
type = "fixed",
|
{ -- 1
|
||||||
fixed = {
|
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 2
|
||||||
|
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 3
|
||||||
|
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 4
|
||||||
|
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["mychisel:vertical_%s"] = {
|
||||||
|
desc = "Vertical",
|
||||||
|
{ -- 1
|
||||||
|
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
||||||
|
{0.1875, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 2
|
||||||
|
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
||||||
|
{0.1875, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 3
|
||||||
|
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
||||||
|
{0.1875, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 4
|
||||||
|
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
||||||
|
{0.1875, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["mychisel:cross_%s"] = {
|
||||||
|
desc = "",
|
||||||
|
{ -- 1
|
||||||
|
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
||||||
|
{0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5},
|
||||||
|
{-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5},
|
||||||
|
{0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 2
|
||||||
|
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
||||||
|
{0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5},
|
||||||
|
{-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5},
|
||||||
|
{0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 3
|
||||||
|
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
||||||
|
{0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5},
|
||||||
|
{-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5},
|
||||||
|
{0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
{ -- 4
|
||||||
|
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
||||||
|
{0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5},
|
||||||
|
{-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5},
|
||||||
|
{0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["mychisel:square_%s"] = {
|
||||||
|
desc = "",
|
||||||
|
{ -- 1
|
||||||
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
{-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5},
|
||||||
{-0.5, -0.5, -0.5, -0.3125, 0.5, -0.4375},
|
{-0.5, -0.5, -0.5, -0.3125, 0.5, -0.4375},
|
||||||
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.4375},
|
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.4375},
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.3125, -0.4375},
|
{-0.5, -0.5, -0.5, 0.5, -0.3125, -0.4375},
|
||||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, -0.4375},
|
{-0.5, 0.3125, -0.5, 0.5, 0.5, -0.4375},
|
||||||
}
|
},
|
||||||
}
|
{ -- 2
|
||||||
|
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
||||||
local squar2 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.375, 0.5, 0.5, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -0.3125, 0.5, -0.375},
|
{-0.5, -0.5, -0.5, -0.3125, 0.5, -0.375},
|
||||||
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.375},
|
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.375},
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.3125, -0.375},
|
{-0.5, -0.5, -0.5, 0.5, -0.3125, -0.375},
|
||||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, -0.375},
|
{-0.5, 0.3125, -0.5, 0.5, 0.5, -0.375},
|
||||||
}
|
},
|
||||||
}
|
{ -- 3
|
||||||
|
|
||||||
local squar3 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
{-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5},
|
||||||
{-0.5, -0.5, -0.5, -0.3125, 0.5, -0.3125},
|
{-0.5, -0.5, -0.5, -0.3125, 0.5, -0.3125},
|
||||||
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.3125},
|
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.3125},
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.3125, -0.3125},
|
{-0.5, -0.5, -0.5, 0.5, -0.3125, -0.3125},
|
||||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, -0.3125},
|
{-0.5, 0.3125, -0.5, 0.5, 0.5, -0.3125},
|
||||||
}
|
},
|
||||||
}
|
{ -- 4
|
||||||
|
|
||||||
local squar4 = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
{-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
|
||||||
{-0.5, -0.5, -0.5, -0.3125, 0.5, -0.25},
|
{-0.5, -0.5, -0.5, -0.3125, 0.5, -0.25},
|
||||||
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.25},
|
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.25},
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.3125, -0.25},
|
{-0.5, -0.5, -0.5, 0.5, -0.3125, -0.25},
|
||||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, -0.25},
|
{-0.5, 0.3125, -0.5, 0.5, 0.5, -0.25},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
local default_material = {
|
local default_material = {
|
||||||
{"default:cobble", "default_cobble", "Cobble", {cracky = 3, not_in_creative_inventory=1}},
|
{"default:cobble", "default_cobble", "Cobble", {cracky = 3}},
|
||||||
{"default:sandstone","default_sandstone", "Sandstone", {crumbly=2, not_in_creative_inventory=1}},
|
{"default:sandstone","default_sandstone", "Sandstone", {crumbly=2}},
|
||||||
{"default:clay","default_clay", "Clay", {crumbly=3, not_in_creative_inventory=1}},
|
{"default:clay","default_clay", "Clay", {crumbly=3}},
|
||||||
{"default:coalblock","default_coal_block", "Coal Block", {cracky = 3, not_in_creative_inventory=1}},
|
{"default:coalblock","default_coal_block", "Coal Block", {cracky = 3}},
|
||||||
{"default:stone","default_stone", "Stone", {cracky = 3, not_in_creative_inventory=1}},
|
{"default:stone","default_stone", "Stone", {cracky = 3}},
|
||||||
{"default:desert_stone","default_desert_stone", "Desert Stone", {cracky = 3, not_in_creative_inventory=1}},
|
{"default:desert_stone","default_desert_stone", "Desert Stone", {cracky = 3}},
|
||||||
{"default:wood","default_wood", "Wood", {choppy=2, not_in_creative_inventory=1}},
|
{"default:wood","default_wood", "Wood", {choppy=2}},
|
||||||
{"default:acacia_wood","default_acacia_wood", "Acacia Wood", {choppy=2, not_in_creative_inventory=1}},
|
{"default:acacia_wood","default_acacia_wood", "Acacia Wood", {choppy=2}},
|
||||||
{"default:aspen_wood","default_aspen_wood", "Aspen Wood", {choppy=2, not_in_creative_inventory=1}},
|
{"default:aspen_wood","default_aspen_wood", "Aspen Wood", {choppy=2}},
|
||||||
{"default:pine_wood","default_pine_wood", "Pine Wood", {choppy=2, not_in_creative_inventory=1}},
|
{"default:pine_wood","default_pine_wood", "Pine Wood", {choppy=2}},
|
||||||
{"default:desert_cobble","default_desert_cobble", "Desert Cobble", {cracky = 3, not_in_creative_inventory=1}},
|
{"default:desert_cobble","default_desert_cobble", "Desert Cobble", {cracky = 3}},
|
||||||
{"default:junglewood","default_junglewood", "Jungle Wood", {choppy=2, not_in_creative_inventory=1}},
|
{"default:junglewood","default_junglewood", "Jungle Wood", {choppy=2}},
|
||||||
{"default:sandstonebrick","default_sandstone_brick", "Sandstone Brick", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:sandstonebrick","default_sandstone_brick", "Sandstone Brick", {cracky = 2}},
|
||||||
{"default:stonebrick","default_stone_brick", "Stone Brick", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:stonebrick","default_stone_brick", "Stone Brick", {cracky = 2}},
|
||||||
{"default:desert_stonebrick","default_desert_stone_brick", "Desert Stone Brick", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:desert_stonebrick","default_desert_stone_brick", "Desert Stone Brick", {cracky = 2}},
|
||||||
{"default:steelblock", "default_steel_block", "Steel Block", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:steelblock", "default_steel_block", "Steel Block", {cracky = 2}},
|
||||||
{"default:copperblock", "default_copper_block", "Copper Block", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:copperblock", "default_copper_block", "Copper Block", {cracky = 2}},
|
||||||
{"default:bronzeblock", "default_bronze_block", "Bronze Block", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:bronzeblock", "default_bronze_block", "Bronze Block", {cracky = 2}},
|
||||||
{"default:goldblock", "default_gold_block", "Gold Block", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:goldblock", "default_gold_block", "Gold Block", {cracky = 2}},
|
||||||
{"default:tinblock", "default_tin_block", "Tin Block", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:tinblock", "default_tin_block", "Tin Block", {cracky = 2}},
|
||||||
{"moreblocks:copperpatina", "moreblocks_copperpatina", "Copperpatina", {cracky = 2, not_in_creative_inventory=1}},
|
{"moreblocks:copperpatina", "moreblocks_copperpatina", "Copperpatina", {cracky = 2}},
|
||||||
{"default:desert_sandstone","default_desert_sandstone", "Desert Sandstone", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:desert_sandstone","default_desert_sandstone", "Desert Sandstone", {cracky = 2}},
|
||||||
{"default:desert_sandstone_brick","default_desert_sandstone_brick", "Desert Sandstonebrick", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:desert_sandstone_brick","default_desert_sandstone_brick", "Desert Sandstonebrick", {cracky = 2}},
|
||||||
{"default:silver_sandstone","default_silver_sandstone", "Silver Sandstone", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:silver_sandstone","default_silver_sandstone", "Silver Sandstone", {cracky = 2}},
|
||||||
{"default:silver_sandstone_brick","default_silver_sandstone_brick", "Silver Sandstonebrick", {cracky = 2, not_in_creative_inventory=1}},
|
{"default:silver_sandstone_brick","default_silver_sandstone_brick", "Silver Sandstonebrick", {cracky = 2}},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if minetest.get_modpath( "bakedclay") then
|
if minetest.get_modpath( "bakedclay") then
|
||||||
local clay = {
|
local clay = {
|
||||||
{"white", "White"},
|
{"white", "White"},
|
||||||
{"grey", "Grey"},
|
{"grey", "Grey"},
|
||||||
{"black", "Black"},
|
{"black", "Black"},
|
||||||
{"red", "Red"},
|
{"red", "Red"},
|
||||||
{"yellow", "Yellow"},
|
{"yellow", "Yellow"},
|
||||||
{"green", "Green"},
|
{"green", "Green"},
|
||||||
{"cyan", "Cyan"},
|
{"cyan", "Cyan"},
|
||||||
{"blue", "Blue"},
|
{"blue", "Blue"},
|
||||||
{"magenta", "Magenta"},
|
{"magenta", "Magenta"},
|
||||||
{"orange", "Orange"},
|
{"orange", "Orange"},
|
||||||
{"violet", "Violet"},
|
{"violet", "Violet"},
|
||||||
{"brown", "Brown"},
|
{"brown", "Brown"},
|
||||||
{"pink", "Pink"},
|
{"pink", "Pink"},
|
||||||
{"dark_grey", "Dark Grey"},
|
{"dark_grey", "Dark Grey"},
|
||||||
{"dark_green", "Dark Green"},
|
{"dark_green", "Dark Green"},
|
||||||
{"natural", "Natural"}
|
{"natural", "Natural"}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, clay in pairs(clay) do
|
for _, clay in pairs(clay) do
|
||||||
table.insert(default_material,{"bakedclay:"..clay[1] , "baked_clay_" .. clay[1], clay[2] .. " Baked Clay",{cracky = 2, not_in_creative_inventory=1}})
|
table.insert(default_material,{"bakedclay:"..clay[1] , "baked_clay_" .. clay[1], clay[2] .. " Baked Clay",{cracky = 2}})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
for i in ipairs (default_material) do
|
for _, material in ipairs(default_material) do
|
||||||
local item = default_material [i][1]
|
local item = material[1]
|
||||||
local mat = default_material [i][2]
|
local mat = material[2]
|
||||||
local desc = default_material [i][3]
|
local desc = material[3]
|
||||||
local gro = default_material [i][4]
|
local groups = material[4]
|
||||||
|
groups.not_in_creative_inventory = 1
|
||||||
|
|
||||||
minetest.register_node("mychisel:vertical_"..mat.."1", {
|
for name, def in pairs(chisel_node_defs) do
|
||||||
description = "Vertical "..desc.."1",
|
if not minetest.registered_nodes[item] then
|
||||||
drawtype = "nodebox",
|
minetest.log("warning", "[mychisel] Tried to register node '" .. item ..
|
||||||
tiles = {
|
"' but it does not exist.")
|
||||||
mat..".png",
|
break
|
||||||
mat..".png",
|
end
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_vtint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = vert1,
|
|
||||||
selection_box = vert1,
|
|
||||||
on_place = minetest.rotate_node,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:vertical_"..mat.."2", {
|
|
||||||
description = "Vertical "..desc.."2",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_vtint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = vert2,
|
|
||||||
selection_box = vert2
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:vertical_"..mat.."3", {
|
|
||||||
description = "Vertical "..desc.."3",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_vtint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = vert3,
|
|
||||||
selection_box = vert3
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:vertical_"..mat.."4", {
|
|
||||||
description = "Vertical "..desc.."4",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_vtint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = vert4,
|
|
||||||
selection_box = vert4
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:chiseled_"..mat.."1", {
|
|
||||||
description = "Chiseled"..desc.."1",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_ctint1.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = chis1,
|
|
||||||
selection_box = chis1,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:chiseled_"..mat.."2", {
|
|
||||||
description = "Chiseled"..desc.."2",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_ctint2.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = chis2,
|
|
||||||
selection_box = chis2
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:chiseled_"..mat.."3", {
|
|
||||||
description = "Chiseled"..desc.."3",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_ctint3.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = chis3,
|
|
||||||
selection_box = chis3
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:chiseled_"..mat.."4", {
|
|
||||||
description = "Chiseled"..desc.."4",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_ctint4.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = chis4,
|
|
||||||
selection_box = chis4
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:horizontal_"..mat.."1", {
|
|
||||||
description = "Horizontal "..desc.."1",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_htint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = hori1,
|
|
||||||
selection_box = hori1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:horizontal_"..mat.."2", {
|
|
||||||
description = "Horizontal"..desc.."2",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_htint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = hori2,
|
|
||||||
selection_box = hori2
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:horizontal_"..mat.."3", {
|
|
||||||
description = "Horizontal"..desc.."3",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_htint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = hori3,
|
|
||||||
selection_box = hori3
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:horizontal_"..mat.."4", {
|
|
||||||
description = "Horizontal"..desc.."4",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_htint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = hori4,
|
|
||||||
selection_box = hori4
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:cross_"..mat.."1", {
|
|
||||||
description = "cross "..desc.."1",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_ctint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = cross1,
|
|
||||||
selection_box = cross1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:cross_"..mat.."2", {
|
|
||||||
description = "cross"..desc.."2",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_ctint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = cross2,
|
|
||||||
selection_box = cross2
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:cross_"..mat.."3", {
|
|
||||||
description = "cross"..desc.."3",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_ctint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = cross3,
|
|
||||||
selection_box = cross3
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:cross_"..mat.."4", {
|
|
||||||
description = "cross"..desc.."4",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_ctint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = cross4,
|
|
||||||
selection_box = cross4
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:square_"..mat.."1", {
|
|
||||||
description = "cross "..desc.."1",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_stint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = squar1,
|
|
||||||
selection_box = squar1
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:square_"..mat.."2", {
|
|
||||||
description = "cross"..desc.."2",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_stint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = squar2,
|
|
||||||
selection_box = squar2
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:square_"..mat.."3", {
|
|
||||||
description = "cross"..desc.."3",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_stint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = squar3,
|
|
||||||
selection_box = squar3
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mychisel:square_"..mat.."4", {
|
|
||||||
description = "cross"..desc.."4",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png",
|
|
||||||
mat..".png^mychisel_stint.png",
|
|
||||||
},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = item,
|
|
||||||
groups = gro,
|
|
||||||
node_box = squar4,
|
|
||||||
selection_box = squar4
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
local n = 1
|
||||||
|
while def[n] do
|
||||||
|
local box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = def[n]
|
||||||
|
}
|
||||||
|
minetest.register_node(name:format(mat .. n), {
|
||||||
|
description = def.desc .. " " .. desc .. n,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = {
|
||||||
|
mat..".png",
|
||||||
|
mat..".png",
|
||||||
|
mat..".png",
|
||||||
|
mat..".png",
|
||||||
|
mat..".png",
|
||||||
|
mat..".png^mychisel_vtint.png",
|
||||||
|
},
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drop = item,
|
||||||
|
groups = groups,
|
||||||
|
node_box = box,
|
||||||
|
selection_box = box,
|
||||||
|
on_place = minetest.rotate_node,
|
||||||
|
})
|
||||||
|
n = n + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user