1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-23 08:20:21 +01:00
homedecor_modpack/homedecor/nightstands.lua

61 lines
1.9 KiB
Lua
Raw Normal View History

local S = homedecor.gettext
2015-02-28 10:14:46 +01:00
local woods = {"mahogany", "oak"}
2013-03-05 08:18:56 +01:00
2015-02-28 10:14:46 +01:00
for _, w in ipairs(woods) do
2015-02-28 10:14:46 +01:00
homedecor.register("nightstand_"..w.."_one_drawer", {
description = S("Nightstand with One Drawer ("..w..")"),
tiles = { 'homedecor_nightstand_'..w..'_top.png',
'homedecor_nightstand_'..w..'_bottom.png',
'homedecor_nightstand_'..w..'_right.png',
'homedecor_nightstand_'..w..'_left.png',
'homedecor_nightstand_'..w..'_back.png',
'homedecor_nightstand_'..w..'_1_drawer_front.png'},
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 },
2013-03-17 00:46:30 +01:00
sounds = default.node_sound_wood_defaults(),
2015-04-30 00:24:47 +02:00
selection_box = { type = "regular" },
infotext=S("One-drawer Nightstand"),
inventory = {
size=8,
},
})
2015-02-28 10:14:46 +01:00
homedecor.register("nightstand_"..w.."_two_drawers", {
description = S("Nightstand with Two Drawers ("..w..")"),
tiles = { 'homedecor_nightstand_'..w..'_top.png',
'homedecor_nightstand_'..w..'_bottom.png',
'homedecor_nightstand_'..w..'_right.png',
'homedecor_nightstand_'..w..'_left.png',
'homedecor_nightstand_'..w..'_back.png',
'homedecor_nightstand_'..w..'_2_drawer_front.png'},
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 },
2013-03-17 00:46:30 +01:00
sounds = default.node_sound_wood_defaults(),
2015-04-30 00:24:47 +02:00
selection_box = { type = "regular" },
infotext=S("Two-drawer Nightstand"),
inventory = {
size=16,
},
})
2015-02-28 10:14:46 +01:00
end