mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 00:20:17 +01:00
150b50a487
Recipe changes: Brass and wrought iron poles, table legs, and fences/railings were too expensive in practice. Increased recipe outputs. Small square glass table now comes from one small round table (instead of three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern. All glass tables can be recycled back into glass blocks via the Vessels mod's recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks), so there's no glass wasted. All wooden tables can be crafted into sticks by putting three of a given item onto the crafting grid. Any such craft yields 4 sticks, so there's no waste. Other changes: 3d-ified nightstands, improved their textures somewhat. New nodes: * Added working oven (really just a furnace with new textures) * Added mini-fridge that stores 24 slots * Added kitchen cabinet that stores 24 slots * Added half-size kitchen cabinet that stores 12 slots (6x2) * Added kitchen sink with under-sink cabinet that stores 16 slots. * Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures) * Added curtains in 6 colors: red, green, blue, purple, pink, white Notes: This mod now requires Moreblocks for some recipes - namely fridge and oven.
236 lines
8.6 KiB
Lua
236 lines
8.6 KiB
Lua
-- This file supplies nightstands
|
|
|
|
minetest.register_node('homedecor:nightstand_oak_one_drawer', {
|
|
drawtype = "nodebox",
|
|
description = "Oak Nightstand with One Drawer",
|
|
tiles = { 'homedecor_nightstand_oak_top.png',
|
|
'homedecor_nightstand_oak_bottom.png',
|
|
'homedecor_nightstand_oak_right.png',
|
|
'homedecor_nightstand_oak_left.png',
|
|
'homedecor_nightstand_oak_back.png',
|
|
'homedecor_nightstand_oak_1_drawer_front.png'},
|
|
sunlight_propagates = false,
|
|
paramtype = "light",
|
|
paramtype2 = "facedir",
|
|
walkable = true,
|
|
selection_box = {
|
|
type = "fixed",
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
},
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -8/16, 0, -30/64, 8/16, 8/16, 8/16 }, -- top half
|
|
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64}, -- drawer face
|
|
{ -8/16, -8/16, -30/64, -7/16, 0, 8/16 }, -- left
|
|
{ 7/16, -8/16, -30/64, 8/16, 0, 8/16 }, -- right
|
|
{ -8/16, -8/16, 7/16, 8/16, 0, 8/16 }, -- back
|
|
{ -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
|
|
}
|
|
},
|
|
groups = { snappy = 3 },
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
on_construct = function(pos)
|
|
local meta = minetest.env:get_meta(pos)
|
|
meta:set_string("formspec",
|
|
"size[8,6]"..
|
|
"list[current_name;main;0,0;8,1;]"..
|
|
"list[current_player;main;0,2;8,4;]")
|
|
meta:set_string("infotext", "One-drawer Nightstand")
|
|
local inv = meta:get_inventory()
|
|
inv:set_size("main", 8)
|
|
end,
|
|
can_dig = function(pos,player)
|
|
local meta = minetest.env:get_meta(pos);
|
|
local inv = meta:get_inventory()
|
|
return inv:is_empty("main")
|
|
end,
|
|
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
})
|
|
|
|
minetest.register_node('homedecor:nightstand_oak_two_drawers', {
|
|
drawtype = "nodebox",
|
|
description = "Oak Nightstand with One Drawer",
|
|
tiles = { 'homedecor_nightstand_oak_top.png',
|
|
'homedecor_nightstand_oak_bottom.png',
|
|
'homedecor_nightstand_oak_right.png',
|
|
'homedecor_nightstand_oak_left.png',
|
|
'homedecor_nightstand_oak_back.png',
|
|
'homedecor_nightstand_oak_2_drawer_front.png'},
|
|
sunlight_propagates = false,
|
|
paramtype = "light",
|
|
paramtype2 = "facedir",
|
|
walkable = true,
|
|
selection_box = {
|
|
type = "fixed",
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
},
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -8/16, -8/16, -30/64, 8/16, 8/16, 8/16 }, -- main body
|
|
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64 }, -- top drawer face
|
|
{ -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
|
|
|
|
}
|
|
},
|
|
groups = { snappy = 3 },
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
on_construct = function(pos)
|
|
local meta = minetest.env:get_meta(pos)
|
|
meta:set_string("formspec",
|
|
"size[8,7]"..
|
|
"list[current_name;main;0,0;8,2;]"..
|
|
"list[current_player;main;0,3;8,4;]")
|
|
meta:set_string("infotext", "Two-drawer Nightstand")
|
|
local inv = meta:get_inventory()
|
|
inv:set_size("main", 16)
|
|
end,
|
|
can_dig = function(pos,player)
|
|
local meta = minetest.env:get_meta(pos);
|
|
local inv = meta:get_inventory()
|
|
return inv:is_empty("main")
|
|
end,
|
|
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
})
|
|
|
|
minetest.register_node('homedecor:nightstand_mahogany_one_drawer', {
|
|
drawtype = "nodebox",
|
|
description = "Mahogany Nightstand with One Drawer",
|
|
tiles = { 'homedecor_nightstand_mahogany_top.png',
|
|
'homedecor_nightstand_mahogany_bottom.png',
|
|
'homedecor_nightstand_mahogany_right.png',
|
|
'homedecor_nightstand_mahogany_left.png',
|
|
'homedecor_nightstand_mahogany_back.png',
|
|
'homedecor_nightstand_mahogany_1_drawer_front.png'},
|
|
sunlight_propagates = false,
|
|
paramtype = "light",
|
|
paramtype2 = "facedir",
|
|
walkable = true,
|
|
selection_box = {
|
|
type = "fixed",
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
},
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -8/16, 0, -30/64, 8/16, 8/16, 8/16 }, -- top half
|
|
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64}, -- drawer face
|
|
{ -8/16, -8/16, -30/64, -7/16, 0, 8/16 }, -- left
|
|
{ 7/16, -8/16, -30/64, 8/16, 0, 8/16 }, -- right
|
|
{ -8/16, -8/16, 7/16, 8/16, 0, 8/16 }, -- back
|
|
{ -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
|
|
}
|
|
},
|
|
groups = { snappy = 3 },
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
on_construct = function(pos)
|
|
local meta = minetest.env:get_meta(pos)
|
|
meta:set_string("formspec",
|
|
"size[8,6]"..
|
|
"list[current_name;main;0,0;8,1;]"..
|
|
"list[current_player;main;0,2;8,4;]")
|
|
meta:set_string("infotext", "One-drawer Nightstand")
|
|
local inv = meta:get_inventory()
|
|
inv:set_size("main", 8)
|
|
end,
|
|
can_dig = function(pos,player)
|
|
local meta = minetest.env:get_meta(pos);
|
|
local inv = meta:get_inventory()
|
|
return inv:is_empty("main")
|
|
end,
|
|
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
})
|
|
|
|
minetest.register_node('homedecor:nightstand_mahogany_two_drawers', {
|
|
drawtype = "nodebox",
|
|
description = "Mahogany Nightstand with Two Drawers",
|
|
tiles = { 'homedecor_nightstand_mahogany_top.png',
|
|
'homedecor_nightstand_mahogany_bottom.png',
|
|
'homedecor_nightstand_mahogany_right.png',
|
|
'homedecor_nightstand_mahogany_left.png',
|
|
'homedecor_nightstand_mahogany_back.png',
|
|
'homedecor_nightstand_mahogany_2_drawer_front.png'},
|
|
sunlight_propagates = false,
|
|
paramtype = "light",
|
|
paramtype2 = "facedir",
|
|
walkable = true,
|
|
selection_box = {
|
|
type = "fixed",
|
|
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
},
|
|
node_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -8/16, -8/16, -30/64, 8/16, 8/16, 8/16 }, -- main body
|
|
{ -7/16, 1/16, -32/64, 7/16, 7/16, -29/64 }, -- top drawer face
|
|
{ -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
|
|
|
|
}
|
|
},
|
|
groups = { snappy = 3 },
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
on_construct = function(pos)
|
|
local meta = minetest.env:get_meta(pos)
|
|
meta:set_string("formspec",
|
|
"size[8,7]"..
|
|
"list[current_name;main;0,0;8,2;]"..
|
|
"list[current_player;main;0,3;8,4;]")
|
|
meta:set_string("infotext", "Two-drawer Nightstand")
|
|
local inv = meta:get_inventory()
|
|
inv:set_size("main", 16)
|
|
end,
|
|
can_dig = function(pos,player)
|
|
local meta = minetest.env:get_meta(pos);
|
|
local inv = meta:get_inventory()
|
|
return inv:is_empty("main")
|
|
end,
|
|
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" moves stuff in nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" moves stuff to nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
minetest.log("action", player:get_player_name()..
|
|
" takes stuff from nightstand at "..minetest.pos_to_string(pos))
|
|
end,
|
|
})
|