Simplify some selectionboxes significantly.
This commit is contained in:
parent
c83e3288d7
commit
85f87d1c17
@ -84,7 +84,12 @@ function nodecore.extend_item(name, func)
|
||||
minetest.register_item(":" .. name, copy)
|
||||
end
|
||||
|
||||
function nodecore.fixedbox(...) return {type = "fixed", fixed = {...}} end
|
||||
function nodecore.fixedbox(x, ...)
|
||||
return {type = "fixed", fixed = {
|
||||
x or {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
...
|
||||
}}
|
||||
end
|
||||
|
||||
function nodecore.interact(player)
|
||||
if type(player) ~= "string" then
|
||||
|
@ -43,6 +43,9 @@ local basedef = {
|
||||
{0.25, -0.5, -3/8, 0.5, 0.25, 1/8},
|
||||
{-0.25, -0.25, -1/8, 0.25, 0.25, 0.25}
|
||||
),
|
||||
selection_box = nodecore.fixedbox(
|
||||
{-0.5, -0.5, -3/8, 0.5, 0.5, 1/8}
|
||||
),
|
||||
tiles = {
|
||||
txr,
|
||||
txr,
|
||||
|
@ -31,6 +31,9 @@ local basedef = {
|
||||
{-0.25, -0.25, 3/8, 0.25, 0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, -3/8, 0.25, 0.25}
|
||||
),
|
||||
selection_box = nodecore.fixedbox(
|
||||
{-3/8, -0.5, -0.5, 0.5, 0.5, 3/8}
|
||||
),
|
||||
tiles = {
|
||||
txr,
|
||||
txr,
|
||||
|
@ -99,9 +99,7 @@ minetest.register_node(modname .. ":handle", {
|
||||
{3/8, 1/4, -0.5, 0.5, 3/8, 0.5},
|
||||
{-0.5, 3/8, -1/8, 0.5, 0.5, 1/8}
|
||||
),
|
||||
selection_box = nodecore.fixedbox(
|
||||
{-0.5, -0.5, -0.5, 0.5, 3/8, 0.5}
|
||||
),
|
||||
selection_box = nodecore.fixedbox(),
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
"nc_lode_annealed.png",
|
||||
|
@ -20,12 +20,8 @@ minetest.register_node(modname .. ":shelf", {
|
||||
{7/16, -7/16, -0.5, 0.5, 7/16, -7/16},
|
||||
{7/16, -7/16, 7/16, 0.5, 7/16, 0.5}
|
||||
),
|
||||
selection_box = nodecore.fixedbox(
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
),
|
||||
collision_box = nodecore.fixedbox(
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
|
||||
),
|
||||
selection_box = nodecore.fixedbox(),
|
||||
collision_box = nodecore.fixedbox(),
|
||||
tiles = { top, top, side },
|
||||
groups = {
|
||||
choppy = 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user