2013-03-18 00:09:42 +01:00
|
|
|
-- Various kinds of tables
|
|
|
|
|
|
|
|
-- Boilerplate to support localized strings if intllib mod is installed.
|
|
|
|
local S
|
2013-10-09 18:27:49 +02:00
|
|
|
if intllib_modpath then
|
|
|
|
dofile(intllib_modpath.."/intllib.lua")
|
2013-03-18 00:09:42 +01:00
|
|
|
S = intllib.Getter(minetest.get_current_modname())
|
|
|
|
else
|
|
|
|
S = function ( s ) return s end
|
|
|
|
end
|
|
|
|
|
2013-04-04 09:55:34 +02:00
|
|
|
materials = {
|
|
|
|
{"glass","Glass"},
|
|
|
|
{"wood","Wood"}
|
|
|
|
}
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2013-04-04 09:55:34 +02:00
|
|
|
for i in ipairs(materials) do
|
|
|
|
local m = materials[i][1]
|
|
|
|
local d = materials[i][2]
|
|
|
|
local s = nil
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2013-04-04 09:55:34 +02:00
|
|
|
if m == "glass" then
|
|
|
|
s = default.node_sound_glass_defaults()
|
|
|
|
else
|
|
|
|
s = default.node_sound_wood_defaults()
|
|
|
|
end
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2013-04-04 09:55:34 +02:00
|
|
|
-- small square tables
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2013-04-04 09:55:34 +02:00
|
|
|
minetest.register_node("homedecor:"..m.."_table_small_square_b", {
|
|
|
|
description = S(d.." Table (Small, Square)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_small_square_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png'
|
|
|
|
},
|
|
|
|
wield_image = 'homedecor_'..m..'_table_small_square_tb.png',
|
|
|
|
inventory_image = 'homedecor_'..m..'_table_small_square_tb.png',
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2013-04-04 09:55:34 +02:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.4375, -0.5, -0.5, 0.4375, -0.4375, 0.5 },
|
|
|
|
{ -0.5, -0.5, -0.4375, 0.5, -0.4375, 0.4375 }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2013-04-04 09:55:34 +02:00
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
|
|
|
|
2013-07-01 05:55:07 +02:00
|
|
|
local node = minetest.get_node(pointed_thing.under)
|
2013-04-05 04:14:07 +02:00
|
|
|
if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then
|
2013-04-04 09:55:34 +02:00
|
|
|
|
2013-04-05 04:14:07 +02:00
|
|
|
local above = pointed_thing.above
|
|
|
|
local under = pointed_thing.under
|
|
|
|
local pitch = placer:get_look_pitch()
|
2013-07-01 05:55:07 +02:00
|
|
|
local node = minetest.get_node(above)
|
2013-04-05 04:14:07 +02:00
|
|
|
|
|
|
|
if node.name ~= "air" then return end
|
|
|
|
|
|
|
|
if above.x ~= under.x or above.z ~= under.z then
|
|
|
|
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_small_square_s', param2 = fdir})
|
2013-04-05 04:14:07 +02:00
|
|
|
elseif pitch > 0 then
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_small_square_t'})
|
2013-04-05 04:14:07 +02:00
|
|
|
else
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_small_square_b'})
|
2013-04-05 04:14:07 +02:00
|
|
|
end
|
2013-04-17 09:14:09 +02:00
|
|
|
if not homedecor_expect_infinite_stacks then
|
2013-04-05 04:14:07 +02:00
|
|
|
itemstack:take_item()
|
2013-04-17 08:47:49 +02:00
|
|
|
return itemstack
|
2013-04-05 04:14:07 +02:00
|
|
|
end
|
2013-04-04 09:55:34 +02:00
|
|
|
else
|
2013-04-05 04:14:07 +02:00
|
|
|
minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer)
|
2013-04-04 09:55:34 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:'..m..'_table_small_square_t', {
|
|
|
|
description = S(d.."Glass Table (Small, Square)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_small_square_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png'
|
|
|
|
},
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3, not_in_creative_inventory=1 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.4375, 0.4375, -0.5, 0.4375, 0.5, 0.5 },
|
|
|
|
{ -0.5, 0.4375, -0.4375, 0.5, 0.5, 0.4375 }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
|
|
|
},
|
|
|
|
drop = 'homedecor:'..m..'_table_small_square_b'
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:'..m..'_table_small_square_s', {
|
|
|
|
description = S(d.." Table (Small, Square)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
2013-04-17 09:14:09 +02:00
|
|
|
'homedecor_'..m..'_table_small_square_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_square_tb.png',
|
2013-04-04 09:55:34 +02:00
|
|
|
},
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3, not_in_creative_inventory=1 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.4375, -0.5, 0.4375, 0.4375, 0.5, 0.5 },
|
|
|
|
{ -0.5, -0.4375, 0.4375, 0.5, 0.4375, 0.5 }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 },
|
|
|
|
},
|
|
|
|
drop = 'homedecor:'..m..'_table_small_square_b'
|
|
|
|
})
|
|
|
|
|
|
|
|
-- small round tables
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:'..m..'_table_small_round_b', {
|
|
|
|
description = S(d.." Table (Small, Round)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_small_round_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png'
|
|
|
|
},
|
|
|
|
wield_image = 'homedecor_'..m..'_table_small_round_tb.png',
|
|
|
|
inventory_image = 'homedecor_'..m..'_table_small_round_tb.png',
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.25, -0.5, -0.5, 0.25, -0.4375, 0.5 },
|
|
|
|
{ -0.375, -0.5, -0.4375, 0.375, -0.4375, 0.4375 },
|
|
|
|
{ -0.5, -0.5, -0.25, 0.5, -0.4375, 0.25 },
|
|
|
|
{ -0.4375, -0.5, -0.375, 0.4375, -0.4375, 0.375 },
|
|
|
|
{ -0.25, -0.5, -0.5, 0.25, -0.4375, 0.5 },
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
|
|
|
},
|
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
2013-07-01 05:55:07 +02:00
|
|
|
local node = minetest.get_node(pointed_thing.under)
|
2013-04-05 04:14:07 +02:00
|
|
|
if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then
|
2013-04-04 09:55:34 +02:00
|
|
|
|
2013-04-05 04:14:07 +02:00
|
|
|
local above = pointed_thing.above
|
|
|
|
local under = pointed_thing.under
|
|
|
|
local pitch = placer:get_look_pitch()
|
2013-07-01 05:55:07 +02:00
|
|
|
local node = minetest.get_node(above)
|
2013-04-04 09:55:34 +02:00
|
|
|
|
2013-04-05 04:14:07 +02:00
|
|
|
if node.name ~= "air" then return end
|
2013-04-04 09:55:34 +02:00
|
|
|
|
2013-04-05 04:14:07 +02:00
|
|
|
if above.x ~= under.x or above.z ~= under.z then
|
|
|
|
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_small_round_s', param2 = fdir})
|
2013-04-05 04:14:07 +02:00
|
|
|
elseif pitch > 0 then
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_small_round_t'})
|
2013-04-05 04:14:07 +02:00
|
|
|
else
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_small_round_b'})
|
2013-04-05 04:14:07 +02:00
|
|
|
end
|
2013-04-17 09:14:09 +02:00
|
|
|
if not homedecor_expect_infinite_stacks then
|
2013-04-05 04:14:07 +02:00
|
|
|
itemstack:take_item()
|
2013-04-17 08:47:49 +02:00
|
|
|
return itemstack
|
2013-04-05 04:14:07 +02:00
|
|
|
end
|
2013-04-04 09:55:34 +02:00
|
|
|
else
|
2013-04-05 04:14:07 +02:00
|
|
|
minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer)
|
2013-04-04 09:55:34 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:'..m..'_table_small_round_t', {
|
|
|
|
description = S(d.." Table (Small, Round)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_small_round_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png'
|
|
|
|
},
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3, not_in_creative_inventory=1 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.25, 0.4375, -0.5, 0.25, 0.5, 0.5 },
|
|
|
|
{ -0.375, 0.4375, -0.4375, 0.375, 0.5, 0.4375 },
|
|
|
|
{ -0.5, 0.4375, -0.25, 0.5, 0.5, 0.25 },
|
|
|
|
{ -0.4375, 0.4375, -0.375, 0.4375, 0.5, 0.375 },
|
|
|
|
{ -0.25, 0.4375, -0.5, 0.25, 0.5, 0.5 },
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
|
|
|
},
|
|
|
|
drop = 'homedecor:'..m..'_table_small_round_b'
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:'..m..'_table_small_round_s', {
|
|
|
|
description = S(d.." Table (Small, Round)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_edges.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_tb.png',
|
|
|
|
'homedecor_'..m..'_table_small_round_tb.png',
|
|
|
|
},
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3, not_in_creative_inventory=1 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.25, -0.5, 0.4375, 0.25, 0.5, 0.5 },
|
|
|
|
{ -0.375, -0.4375, 0.4375, 0.375, 0.4375, 0.5 },
|
|
|
|
{ -0.5, -0.25, 0.4375, 0.5, 0.25, 0.5 },
|
|
|
|
{ -0.4375, -0.375, 0.4375, 0.4375, 0.375, 0.5 },
|
|
|
|
{ -0.25, -0.5, 0.4375, 0.25, 0.5, 0.5 },
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 },
|
|
|
|
},
|
|
|
|
drop = 'homedecor:'..m..'_table_small_round_b'
|
|
|
|
})
|
2013-03-18 00:09:42 +01:00
|
|
|
|
2013-04-04 09:55:34 +02:00
|
|
|
-- Large square table pieces
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:'..m..'_table_large_b', {
|
|
|
|
description = S(d.."Table Piece (large)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png'
|
|
|
|
},
|
|
|
|
wield_image = 'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
inventory_image = 'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
|
|
|
},
|
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
|
|
|
|
2013-07-01 05:55:07 +02:00
|
|
|
local node = minetest.get_node(pointed_thing.under)
|
2013-04-05 04:14:07 +02:00
|
|
|
if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then
|
|
|
|
|
|
|
|
local above = pointed_thing.above
|
|
|
|
local under = pointed_thing.under
|
|
|
|
local pitch = placer:get_look_pitch()
|
2013-07-01 05:55:07 +02:00
|
|
|
local node = minetest.get_node(above)
|
2013-04-04 09:55:34 +02:00
|
|
|
|
2013-04-05 04:14:07 +02:00
|
|
|
if node.name ~= "air" then return end
|
2013-04-04 09:55:34 +02:00
|
|
|
|
2013-04-05 04:14:07 +02:00
|
|
|
if above.x ~= under.x or above.z ~= under.z then
|
|
|
|
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_large_s', param2 = fdir})
|
2013-04-05 04:14:07 +02:00
|
|
|
elseif pitch > 0 then
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_large_t'})
|
2013-04-05 04:14:07 +02:00
|
|
|
else
|
2013-07-01 05:55:07 +02:00
|
|
|
minetest.add_node(above, {name = 'homedecor:'..m..'_table_large_b'})
|
2013-04-05 04:14:07 +02:00
|
|
|
end
|
2013-04-17 09:14:09 +02:00
|
|
|
if not homedecor_expect_infinite_stacks then
|
2013-04-05 04:14:07 +02:00
|
|
|
itemstack:take_item()
|
2013-04-17 08:47:49 +02:00
|
|
|
return itemstack
|
2013-04-05 04:14:07 +02:00
|
|
|
end
|
2013-04-04 09:55:34 +02:00
|
|
|
else
|
2013-04-05 04:14:07 +02:00
|
|
|
minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer)
|
2013-04-04 09:55:34 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:'..m..'_table_large_t', {
|
|
|
|
description = S(d.."Table Piece (large)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png'
|
|
|
|
},
|
|
|
|
wield_image = 'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
inventory_image = 'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3, not_in_creative_inventory=1 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
|
|
|
},
|
2013-04-17 09:14:09 +02:00
|
|
|
drop = 'homedecor:'..m..'_table_large_b'
|
2013-04-04 09:55:34 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:'..m..'_table_large_s', {
|
|
|
|
description = S(d.."Table Piece (large)"),
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_edges.png',
|
|
|
|
'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
},
|
|
|
|
wield_image = 'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
inventory_image = 'homedecor_'..m..'_table_large_tb.png',
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = 'light',
|
|
|
|
walkable = true,
|
|
|
|
groups = { snappy = 3, not_in_creative_inventory=1 },
|
|
|
|
sounds = s,
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 },
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 },
|
|
|
|
},
|
2013-04-17 09:14:09 +02:00
|
|
|
drop = 'homedecor:'..m..'_table_large_b'
|
2013-04-04 09:55:34 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_alias('homedecor:'..m..'_table_large', 'homedecor:'..m..'_table_large_b')
|
|
|
|
minetest.register_alias('homedecor:'..m..'_table_small_square', 'homedecor:'..m..'_table_small_square_b')
|
|
|
|
minetest.register_alias('homedecor:'..m..'_table_small_round', 'homedecor:'..m..'_table_small_round_b')
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:utility_table_top', {
|
|
|
|
description = S("Utility Table"),
|
|
|
|
tiles = {
|
|
|
|
'homedecor_utility_table_tb.png',
|
|
|
|
'homedecor_utility_table_tb.png',
|
|
|
|
'homedecor_utility_table_edges.png',
|
|
|
|
'homedecor_utility_table_edges.png',
|
|
|
|
'homedecor_utility_table_edges.png',
|
|
|
|
'homedecor_utility_table_edges.png'
|
|
|
|
},
|
|
|
|
wield_image = 'homedecor_utility_table_tb.png',
|
|
|
|
inventory_image = 'homedecor_utility_table_tb.png',
|
|
|
|
drawtype = "nodebox",
|
2013-03-18 00:09:42 +01:00
|
|
|
sunlight_propagates = false,
|
|
|
|
paramtype = "light",
|
2013-04-04 09:55:34 +02:00
|
|
|
walkable = true,
|
2013-03-18 00:09:42 +01:00
|
|
|
groups = { snappy = 3 },
|
2013-04-04 09:55:34 +02:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
2013-03-18 00:09:42 +01:00
|
|
|
paramtype2 = "wallmounted",
|
2013-04-04 09:55:34 +02:00
|
|
|
node_box = {
|
|
|
|
type = "wallmounted",
|
|
|
|
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
|
|
|
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
|
|
|
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 },
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
selection_box = {
|
2013-04-04 09:55:34 +02:00
|
|
|
type = "wallmounted",
|
|
|
|
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
|
|
|
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
|
|
|
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 },
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Various kinds of table legs
|
|
|
|
|
|
|
|
minetest.register_node("homedecor:table_legs_brass", {
|
|
|
|
description = S("Brass Table Legs"),
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = {"homedecor_table_legs_brass.png"},
|
|
|
|
inventory_image = "homedecor_table_legs_brass.png",
|
|
|
|
wield_image = "homedecor_table_legs_brass.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
groups = {snappy=3},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
walkable = true,
|
2013-04-04 09:55:34 +02:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 }
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("homedecor:table_legs_wrought_iron", {
|
|
|
|
description = S("Brass Table Legs"),
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = {"homedecor_table_legs_wrought_iron.png"},
|
|
|
|
inventory_image = "homedecor_table_legs_wrought_iron.png",
|
|
|
|
wield_image = "homedecor_table_legs_wrought_iron.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
groups = {snappy=3},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
walkable = true,
|
2013-04-04 09:55:34 +02:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 }
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('homedecor:utility_table_legs', {
|
|
|
|
description = S("Legs for Utility Table"),
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { 'homedecor_utility_table_legs.png' },
|
|
|
|
inventory_image = 'homedecor_utility_table_legs_inv.png',
|
|
|
|
wield_image = 'homedecor_utility_table_legs.png',
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
groups = { snappy = 3 },
|
2013-04-04 09:55:34 +02:00
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 }
|
|
|
|
},
|
2013-03-18 00:09:42 +01:00
|
|
|
})
|
|
|
|
|