abstract common nodebox forms, fixing some ignored ones in the process

This commit is contained in:
Tim 2015-01-23 17:40:57 +01:00 committed by Vanessa Ezekowitz
parent 6245956ba4
commit b5188493cc
17 changed files with 114 additions and 259 deletions

View File

@ -24,13 +24,13 @@ minetest.register_node('homedecor:air_conditioner', {
{-0.5, 0.125, -0.5, 0.5, 0.5, 0.5 },
}
},
selection_box = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
selection_box = { type="regular" },
})
-- fans
minetest.register_entity("homedecor:mesh_desk_fan", {
collisionbox = { 0, 0, 0, 0, 0, 0 },
collisionbox = homedecor.nodebox.null,
visual = "mesh",
mesh = "homedecor_desk_fan.b3d",
textures = {"homedecor_desk_fan_uv.png"},
@ -53,12 +53,7 @@ minetest.register_node("homedecor:desk_fan", {
tiles = {"homedecor_desk_fan_body.png"},
inventory_image = "homedecor_desk_fan_inv.png",
wield_image = "homedecor_desk_fan_inv.png",
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}
},
selection_box = { type = "regular" },
on_construct = function(pos)
local entity_remove = minetest.get_objects_inside_radius(pos, 0.1)
local meta = minetest.get_meta(pos)

View File

@ -14,10 +14,7 @@ minetest.register_node("homedecor:cobweb_corner", {
liquid_renewable = false,
liquid_range = 0,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
},
selection_box = { type = "regular" },
visual_scale = 1.4,
groups = { snappy = 3, liquid=3 },
after_place_node = function(pos, placer, itemstack, pointed_thing)
@ -94,10 +91,7 @@ minetest.register_node("homedecor:cobweb_plantlike", {
liquid_renewable = false,
liquid_range = 0,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
},
selection_box = { type = "regular" },
visual_scale = 1.189,
groups = { snappy = 3, liquid=3, not_in_creative_inventory = 1 },
drop = "homedecor:cobweb_corner"

View File

@ -688,10 +688,7 @@ minetest.register_node("homedecor:jpn_door_top", {
{0.1565, -0.5, 0, 0.2185, 0.5, 0.0625}, -- NodeBox9
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 },
},
selection_box = homedecor.nodebox.null,
})
minetest.register_node("homedecor:jpn_door_bottom_open", {
@ -764,10 +761,7 @@ minetest.register_node("homedecor:jpn_door_top_open", {
{-0.84375, -0.5, -0.0625, -0.7815, 0.5, 0}, -- NodeBox9
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 },
},
selection_box = homedecor.nodebox.null,
})

View File

@ -22,10 +22,7 @@ minetest.register_node("homedecor:fence_brass", {
tiles = {"homedecor_tile_brass.png"},
inventory_image = "homedecor_fence_brass.png",
paramtype = "light",
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
selection_box = homedecor.nodebox.bar_y(1/7),
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
walkable = true,
@ -37,10 +34,7 @@ minetest.register_node("homedecor:fence_wrought_iron", {
tiles = {"homedecor_tile_wrought_iron.png"},
inventory_image = "homedecor_fence_wrought_iron.png",
paramtype = "light",
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
selection_box = homedecor.nodebox.bar_y(1/7),
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
walkable = true,

View File

@ -221,10 +221,7 @@ for _, color in ipairs(bedcolors) do
{-0.3125, -0.125, 0.0625, 0.3125, 0.0625, 0.4375}, -- NodeBox8
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
}
selection_box = homedecor.nodebox.null
})
homedecor.register("bed_"..color.."_foot", {
@ -313,10 +310,7 @@ homedecor.register("wardrobe_top", {
{-0.4375, -0.4375, -0.5, -0.0625, 0.4375, -0.4375}, -- NodeBox3
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
})
homedecor.register("wardrobe_bottom", {
@ -425,10 +419,7 @@ homedecor.register("bench_large_1_right", {
{0.25, -0.5, -0.0625, 0.3125, -0.25, 0}, -- NodeBox7
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
})
@ -503,10 +494,7 @@ homedecor.register("bench_large_2_right", {
{-0.5, -0.25, -0.0290173, 0.5, -0.125, 0.0125346}, -- NodeBox16
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
})
homedecor.register("deckchair_head", {
@ -538,10 +526,7 @@ homedecor.register("deckchair_head", {
{-0.375, -0.5, 0, -0.3125, -0.25, 0.0625}, -- NodeBox14
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
}
selection_box = homedecor.nodebox.null
})
homedecor.register("deckchair_foot", {
@ -642,10 +627,7 @@ homedecor.register("grandfather_clock_top", {
{-0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.4}, -- NodeBox4
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
})
-- Aliases for 3dforniture mod.

View File

@ -105,6 +105,9 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
return isceiling, pos
end
-- nodebox arithmetics and helpers
-- (please keep non-generic nodeboxes with their node definition)
dofile(homedecor.modpath.."/nodeboxes.lua")
-- expand and unexpand decor
dofile(homedecor.modpath.."/expansion.lua")
-- glue it all together into a registration function

View File

@ -33,6 +33,7 @@ for _, mat in ipairs(counter_materials) do
})
end
local kitchen_cabinet_half_box = homedecor.nodebox.slab_y(0.5, 0.5)
homedecor.register("kitchen_cabinet_half", {
description = S('Half-height Kitchen Cabinet (on ceiling)'),
tiles = { 'homedecor_kitchen_cabinet_sides.png',
@ -43,14 +44,8 @@ homedecor.register("kitchen_cabinet_half", {
'homedecor_kitchen_cabinet_front_half.png'},
sunlight_propagates = false,
walkable = true,
selection_box = {
type = "fixed",
fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }
},
node_box = {
type = "fixed",
fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = kitchen_cabinet_half_box,
node_box = kitchen_cabinet_half_box,
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
infotext=S("Kitchen Cabinet"),

View File

@ -20,10 +20,7 @@ minetest.register_node("homedecor:washing_machine", {
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = { type = "regular" },
groups = { snappy = 3 },
})
@ -47,10 +44,7 @@ minetest.register_node("homedecor:dryer", {
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = { type = "regular" },
groups = { snappy = 3 },
})

View File

@ -61,6 +61,15 @@ for i in ipairs(colors) do
})
end
local glowlight_nodebox = {
half = homedecor.nodebox.slab_y(1/2),
quarter = homedecor.nodebox.slab_y(1/4),
small_cube = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
}
-- Yellow
minetest.register_node('homedecor:glowlight_half_yellow', {
@ -74,15 +83,8 @@ minetest.register_node('homedecor:glowlight_half_yellow', {
'homedecor_glowlight_thick_yellow_sides.png',
'homedecor_glowlight_thick_yellow_sides.png'
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
},
selection_box = glowlight_nodebox.half,
node_box = glowlight_nodebox.half,
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
@ -104,15 +106,8 @@ minetest.register_node('homedecor:glowlight_quarter_yellow', {
'homedecor_glowlight_thin_yellow_sides.png',
'homedecor_glowlight_thin_yellow_sides.png'
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
},
selection_box = glowlight_nodebox.quarter,
node_box = glowlight_nodebox.quarter,
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
@ -136,15 +131,8 @@ minetest.register_node('homedecor:glowlight_half_white', {
'homedecor_glowlight_thick_white_sides.png',
'homedecor_glowlight_thick_white_sides.png'
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
},
selection_box = glowlight_nodebox.half,
node_box = glowlight_nodebox.half,
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
@ -166,15 +154,8 @@ minetest.register_node('homedecor:glowlight_quarter_white', {
'homedecor_glowlight_thin_white_sides.png',
'homedecor_glowlight_thin_white_sides.png'
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
},
selection_box = glowlight_nodebox.quarter,
node_box = glowlight_nodebox.quarter,
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
@ -198,15 +179,8 @@ minetest.register_node('homedecor:glowlight_small_cube_yellow', {
'homedecor_glowlight_cube_yellow_sides.png',
'homedecor_glowlight_cube_yellow_sides.png'
},
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
node_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
selection_box = glowlight_nodebox.small_cube,
node_box = glowlight_nodebox.small_cube,
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",
@ -228,15 +202,8 @@ minetest.register_node('homedecor:glowlight_small_cube_white', {
'homedecor_glowlight_cube_white_sides.png',
'homedecor_glowlight_cube_white_sides.png'
},
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
node_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
selection_box = glowlight_nodebox.small_cube,
node_box = glowlight_nodebox.small_cube,
sunlight_propagates = false,
paramtype = "light",
paramtype2 = "facedir",

View File

@ -208,10 +208,7 @@ minetest.register_node("homedecor:chimney", {
{0.1875, -0.5, -0.25, 0.25, 0.5, 0.25},
}
},
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0.5, 0.25 }
},
selection_box = homedecor.nodebox.bar_y(0.25),
groups = {cracky=3},
sounds = default.node_sound_stone_defaults()
})
@ -305,10 +302,7 @@ homedecor.register("cardboard_box", {
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
},
selection_box = homedecor.nodebox.slab_y(0.5),
node_box = {
type = "fixed",
fixed = {
@ -357,10 +351,7 @@ minetest.register_node("homedecor:dvd_cd_cabinet", {
{0.125, -0.5, 0.01217, 0.375, 0.5, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
},
selection_box = homedecor.nodebox.slab_z(0.5),
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3},
sounds = default.node_sound_wood_defaults(),
})
@ -377,10 +368,7 @@ homedecor.register("filing_cabinet", {
},
sunlight_propagates = false,
walkable = true,
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = { type = "regular" },
node_box = {
type = "fixed",
fixed = {
@ -418,10 +406,7 @@ minetest.register_node("homedecor:dishwasher", {
{-0.4375, -0.5, -0.5, 0.4375, 0.4375, 0.4375},
}
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = { type = "regular" },
groups = { snappy = 3 },
})
@ -512,10 +497,7 @@ homedecor.register("doghouse_base", {
{-0.4375, -0.3125, 0.375, 0.4375, 0.5, 0.4375}, -- NodeBox11
}
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 1.0, 0.5 }
},
selection_box = homedecor.nodebox.slab_y(1.5),
groups = {snappy=3},
expand = { top="homedecor:doghouse_roof" },
})
@ -556,10 +538,7 @@ homedecor.register("doghouse_roof", {
{0.0625, -0.125, -0.375, -0.0625, -0.0625, 0.4375}, -- NodeBox38
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
groups = {snappy=3, not_in_creative_inventory=1},
})
@ -648,10 +627,7 @@ homedecor.register("pool_table_2", {
{0.375, 0.25, -0.4375, 0.4375, 0.3125, 0.3125}, -- NodeBox25
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
})
minetest.register_node("homedecor:trash_can", {
@ -719,10 +695,7 @@ homedecor.register("well_base", {
{-0.3125, -0.5, -0.3125, 0.3125, 0, 0.3125}, -- NodeBox17
}
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
},
selection_box = homedecor.nodebox.slab_y(2),
expand = { top="homedecor:well_top" },
})
@ -784,10 +757,7 @@ homedecor.register("well_top", {
{-0.0165975, -0.51, -0.125, 0.0165974, -0.46, -0.112033}, -- NodeBox43
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
})
minetest.register_node("homedecor:coatrack_wallmount", {
@ -1173,10 +1143,7 @@ homedecor.register("piano_right", {
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
}
selection_box = homedecor.nodebox.null
})
minetest.register_node("homedecor:toaster", {
@ -1488,10 +1455,7 @@ homedecor.register("barbecue_meat", {
{0.125, -0.5, -0.125, 0.3125, -0.4375, 0.125}, -- NodeBox2
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
}
selection_box = homedecor.nodebox.null
})
minetest.register_node("homedecor:beer_tap", {
@ -1599,10 +1563,7 @@ homedecor.register("tool_cabinet_bottom", {
{-0.5, -0.375, -0.5, 0.5, 0.5, 0.5}, -- NodeBox5
}
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
},
selection_box = homedecor.nodebox.slab_y(2),
expand = { top="homedecor:tool_cabinet_top" },
})
@ -1636,10 +1597,7 @@ homedecor.register("tool_cabinet_top", {
{0.375, -0.155, 0.42, 0.405, -0.093, 0.4375}, -- NodeBox15
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
}
selection_box = homedecor.nodebox.null
})
minetest.register_node("homedecor:swing", {
@ -1732,10 +1690,7 @@ minetest.register_node("homedecor:swing_rope", {
{0.3, -0.5, 0.025, 0.3125, 0.5, 0.0375}, -- NodeBox2
}
},
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
}
selection_box = homedecor.nodebox.null
})
local bookcolors = {
@ -1930,11 +1885,7 @@ minetest.register_node("homedecor:desk_globe", {
sounds = default.node_sound_defaults(),
})
local wine_cbox = {
type = "fixed",
fixed = { -0.5, -0.5, -0.25, 0.5, 0.5, 0.5 }
}
local wine_cbox = homedecor.nodebox.slab_z(0.25)
minetest.register_node("homedecor:wine_rack", {
description = "Wine Rack",
drawtype = "mesh",

View File

@ -12,10 +12,7 @@ homedecor.register("nightstand_oak_one_drawer", {
'homedecor_nightstand_oak_1_drawer_front.png'},
sunlight_propagates = false,
walkable = true,
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = { type = "regular" },
node_box = {
type = "fixed",
fixed = {
@ -48,10 +45,7 @@ homedecor.register("nightstand_oak_two_drawers", {
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = { type = "regular" },
node_box = {
type = "fixed",
fixed = {
@ -79,10 +73,7 @@ homedecor.register("nightstand_mahogany_one_drawer", {
'homedecor_nightstand_mahogany_1_drawer_front.png'},
sunlight_propagates = false,
walkable = true,
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = { type = "regular" },
node_box = {
type = "fixed",
fixed = {
@ -112,10 +103,7 @@ homedecor.register("nightstand_mahogany_two_drawers", {
'homedecor_nightstand_mahogany_2_drawer_front.png'},
sunlight_propagates = false,
walkable = true,
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
},
selection_box = { type = "regular" },
node_box = {
type = "fixed",
fixed = {

36
homedecor/nodeboxes.lua Normal file
View File

@ -0,0 +1,36 @@
-- please keep any non-generic nodeboxe with its node definition
-- this file should not accumulate any left over nodeboxes
-- but is meant to host any abstractions or calculations based on nodeboxes
-- a box is defined as {x1, y1, z1, x2, y2, z2}
homedecor.box = {
slab_y = function(height, shift) return { -0.5, -0.5+(shift or 0), -0.5, 0.5, -0.5+height+(shift or 0), 0.5 } end,
slab_z = function(depth) return { -0.5, -0.5, -0.5+depth, 0.5, 0.5, 0.5 } end,
bar_y = function(radius) return {-radius, -0.5, -radius, radius, 0.5, radius} end,
cuboid = function(radius_x, radius_y, radius_z) return {-radius_x, -radius_y, -radius_z, radius_x, radius_y, radius_z} end,
}
homedecor.nodebox = {
-- { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
-- can be used in-place as:
-- { type="regular" },
regular = { type="regular" },
null = { type = "fixed", fixed = { 0, 0, 0, 0, 0, 0 } },
}
local mt = {}
mt.__index = function(table, key)
local ref = homedecor.box[key]
if type(ref) == "function" then
return function(...)
return { type = "fixed", fixed = ref(unpack(arg)) }
end
elseif type(ref) == "table" then
return { type = "fixed", fixed = ref }
end
error("unexpected datatype " .. tostring(type(ref)))
end
setmetatable(homedecor.nodebox, mt)

View File

@ -49,10 +49,7 @@ homedecor.register("refrigerator_steel_bottom", {
description = S("Refrigerator (stainless steel)"),
groups = {snappy=3},
node_box = fridge_model_bottom,
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
},
selection_box = homedecor.nodebox.slab_y(2),
expand = {
top="homedecor:refrigerator_steel_top"
},
@ -74,10 +71,7 @@ homedecor.register("refrigerator_steel_top", {
},
groups = {snappy=3},
node_box = fridge_model_top,
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
})
-- white, enameled fridge
@ -95,10 +89,7 @@ homedecor.register("refrigerator_white_bottom", {
description = S("Refrigerator"),
groups = {snappy=3},
node_box = fridge_model_bottom,
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
},
selection_box = homedecor.nodebox.slab_y(2),
expand = {
top="homedecor:refrigerator_white_top"
},
@ -120,10 +111,7 @@ homedecor.register("refrigerator_white_top", {
},
groups = {snappy=3},
node_box = fridge_model_top,
selection_box = {
type = "fixed",
fixed = { 0, 0, 0, 0, 0, 0 }
},
selection_box = homedecor.nodebox.null,
})
-- convert the old single-node fridges to the new two-node models

View File

@ -13,10 +13,7 @@ minetest.register_node("homedecor:skylight", {
walkable = true,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
}
selection_box = homedecor.nodebox.slab_y(0.1),
})
minetest.register_node("homedecor:skylight_frosted", {
@ -31,10 +28,7 @@ minetest.register_node("homedecor:skylight_frosted", {
walkable = true,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
}
selection_box = homedecor.nodebox.slab_y(0.1),
})
minetest.register_node("homedecor:shingles_wood", {
@ -48,10 +42,7 @@ minetest.register_node("homedecor:shingles_wood", {
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
}
selection_box = homedecor.nodebox.slab_y(0.1),
})
minetest.register_node("homedecor:shingles_asphalt", {
@ -65,10 +56,7 @@ minetest.register_node("homedecor:shingles_asphalt", {
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
}
selection_box = homedecor.nodebox.slab_y(0.1),
})
minetest.register_node("homedecor:shingles_terracotta", {
@ -82,9 +70,6 @@ minetest.register_node("homedecor:shingles_terracotta", {
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }
}
selection_box = homedecor.nodebox.slab_y(0.1),
})

View File

@ -60,10 +60,7 @@ homedecor.register_inner_corner = function(modname, subname, groups, slope_image
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
},
selection_box = { type = "regular" },
collision_box = icorner_cbox,
groups = groups,
on_place = minetest.rotate_node

View File

@ -274,10 +274,7 @@ homedecor.register("desk_r", {
{-0.5, -0.375, 0.4375, 0.4375, 0.25, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = { 0,0,0,0,0,0 }
},
selection_box = homedecor.nodebox.null,
groups = { snappy = 3, not_in_creative_inventory=1 }
})

View File

@ -43,12 +43,7 @@ for i in ipairs(armchairs_list) do
{0.3125, 0, -0.5, 0.5, 0.25, 0.3125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}
},
selection_box = { type = "regular" },
on_rightclick = function(pos, node, clicker)
if not clicker:is_player() then