2020-04-12 18:20:07 -07:00
|
|
|
minetest.register_node('furniture:stool_short', {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = 'Short stool',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_stool_short.obj',
|
|
|
|
tiles = {'furniture_stool_short.png'},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, 0, .375},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, 0, .375},
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + 0
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, false)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('furniture:stool_tall', {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = 'Tall stool',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_stool_tall.obj',
|
|
|
|
tiles = {'furniture_stool_tall.png'},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, .5, .375},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, .5, .375},
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + .5
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, false)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('furniture:chair', {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = 'Chair',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_chair.obj',
|
|
|
|
tiles = {'furniture_chair.png'},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, 0, .375},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, 0, .375},
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + 0
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, true)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('furniture:bench', {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = 'Bench',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_bench.obj',
|
|
|
|
tiles = {'furniture_bench.png'},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, 1.375, 0, .375},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, 1.375, 0, .375},
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + 0
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, false)
|
|
|
|
return itemstack
|
|
|
|
end,
|
|
|
|
after_place_node = function(pos, placer, itemstack)
|
|
|
|
if not epic.space_to_side(pos) then
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|
|
|
epic.remove_side_node(pos, oldnode)
|
|
|
|
end,
|
|
|
|
on_rotate = function(pos, node)
|
|
|
|
return false
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('furniture:bench_with_back', {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = 'Bench with Back',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_bench_with_back.obj',
|
|
|
|
tiles = {'furniture_bench.png'},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {{-.375, -.5, -.375, 1.375, 0, .45},
|
|
|
|
{-.375, 0, .275, 1.375, .5, .375}}
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {{-.375, -.5, -.375, 1.375, 0, .45},
|
|
|
|
{-.375, 0, .275, 1.375, .5, .375}}
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + 0
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, true)
|
|
|
|
return itemstack
|
|
|
|
end,
|
|
|
|
after_place_node = function(pos, placer, itemstack)
|
|
|
|
if not epic.space_to_side(pos) then
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|
|
|
epic.remove_side_node(pos, oldnode)
|
|
|
|
end,
|
|
|
|
on_rotate = function(pos, node)
|
|
|
|
return false
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
2020-05-02 16:10:32 -07:00
|
|
|
minetest.register_node('furniture:bench_picnic', {
|
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
|
|
|
description = 'Picnic Table',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_bench_picnic.obj',
|
|
|
|
tiles = {'furniture_bench_picnic.png'},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {{-.375, -.5, -.375, 1.375, 0, .45},
|
|
|
|
{-.375, 0, .275, 1.375, .5, .375}}
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {{-.375, -.5, -.375, 1.375, 0, .45},
|
|
|
|
{-.375, 0, .275, 1.375, .5, .375}}
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + 0
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, true)
|
|
|
|
return itemstack
|
|
|
|
end,
|
|
|
|
after_place_node = function(pos, placer, itemstack)
|
|
|
|
if not epic.space_to_side(pos) then
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|
|
|
epic.remove_side_node(pos, oldnode)
|
|
|
|
end,
|
|
|
|
on_rotate = function(pos, node)
|
|
|
|
return false
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
2020-04-12 18:20:07 -07:00
|
|
|
---Cushioned items. Yay. :P
|
|
|
|
local dye_table = dye.dyes
|
|
|
|
|
|
|
|
for i in ipairs(dye_table) do
|
|
|
|
local name = dye_table[i][1]
|
|
|
|
local desc = dye_table[i][2]
|
|
|
|
local hex = dye_table[i][3]
|
|
|
|
|
|
|
|
minetest.register_node('furniture:stool_short_'..name, {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = 'Short Stool with '..desc..' Cushion',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_stool_short_cushion.obj',
|
|
|
|
tiles = {'furniture_stool_short.png', 'furniture_cushion_pad.png'},
|
|
|
|
overlay_tiles = {'', {name = 'furniture_cushion_pad.png', color = hex}},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, 0, .375},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, 0, .375},
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + 0
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, false)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('furniture:stool_tall_'..name, {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = 'Tall Stool with '..desc..' Cushion',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_stool_tall_cushion.obj',
|
|
|
|
tiles = {'furniture_stool_tall.png', 'furniture_cushion_pad.png'},
|
|
|
|
overlay_tiles = {'', {name = 'furniture_cushion_pad.png', color = hex}},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, .5, .375},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, .5, .375},
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + .5
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, false)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('furniture:chair_'..name, {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Woodworking Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = 'Chair with '..desc..' Cushion',
|
|
|
|
drawtype = 'mesh',
|
|
|
|
mesh = 'furniture_chair_cushion.obj',
|
|
|
|
tiles = {'furniture_chair.png', 'furniture_cushion_pad.png'},
|
|
|
|
overlay_tiles = {'', {name = 'furniture_cushion_pad.png', color = hex}},
|
|
|
|
paramtype = 'light',
|
|
|
|
paramtype2 = 'colorfacedir',
|
|
|
|
palette = 'furniture_stain_palette.png',
|
|
|
|
selection_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, 0, .375},
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.375, -.5, -.375, .375, 0, .375},
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + 0
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, true)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('furniture:cushion_half_'..name, {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Sewing Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = desc..' Half Cushion',
|
|
|
|
drawtype = 'nodebox',
|
|
|
|
tiles = {'furniture_cushion.png^[multiply:'..hex},
|
|
|
|
paramtype = 'light',
|
|
|
|
node_box = {
|
|
|
|
type = 'fixed',
|
|
|
|
fixed = {-.5, -.5, -.5, .5, 0, .5},
|
|
|
|
},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, snappy=3, bouncy=50},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + 0
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, false)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node('furniture:cushion_full_'..name, {
|
2020-05-02 16:10:32 -07:00
|
|
|
_doc_items_crafting = 'This is crafted in the Sewing Station.',
|
2020-04-12 18:20:07 -07:00
|
|
|
description = desc..' Full Cushion',
|
|
|
|
tiles = {'furniture_cushion.png^[multiply:'..hex},
|
|
|
|
groups = {oddly_breakable_by_hand = 2, snappy=3, bouncy=50},
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
|
|
pos.y = pos.y + .5
|
|
|
|
furniture.sit(pos, node, clicker, pointed_thing, false)
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
end
|