forked from mtcontrib/homedecor_modpack
combine beds and nighstands into a bedroom category
This commit is contained in:
parent
2ff235d5f1
commit
382eba6860
@ -19,7 +19,7 @@ local bed_sbox = {
|
|||||||
|
|
||||||
local bed_cbox = {
|
local bed_cbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -0.5, -0.5, -0.5, 0.5, -0.05, 1.5 },
|
{ -0.5, -0.5, -0.5, 0.5, -0.05, 1.5 },
|
||||||
{ -0.5, -0.5, 1.44, 0.5, 0.5, 1.5 },
|
{ -0.5, -0.5, 1.44, 0.5, 0.5, 1.5 },
|
||||||
{ -0.5, -0.5, -0.5, 0.5, 0.18, -0.44 },
|
{ -0.5, -0.5, -0.5, 0.5, 0.18, -0.44 },
|
||||||
@ -33,7 +33,7 @@ local kbed_sbox = {
|
|||||||
|
|
||||||
local kbed_cbox = {
|
local kbed_cbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -0.5, -0.5, -0.5, 1.5, -0.05, 1.5 },
|
{ -0.5, -0.5, -0.5, 1.5, -0.05, 1.5 },
|
||||||
{ -0.5, -0.5, 1.44, 1.5, 0.5, 1.5 },
|
{ -0.5, -0.5, 1.44, 1.5, 0.5, 1.5 },
|
||||||
{ -0.5, -0.5, -0.5, 1.5, 0.18, -0.44 },
|
{ -0.5, -0.5, -0.5, 1.5, 0.18, -0.44 },
|
||||||
@ -143,3 +143,59 @@ for i in ipairs(bedcolors) do
|
|||||||
minetest.register_alias("homedecor:bed_"..color.."_head", "air")
|
minetest.register_alias("homedecor:bed_"..color.."_head", "air")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
for _, w in pairs({"mahogany", "oak"}) do
|
||||||
|
homedecor.register("nightstand_"..w.."_one_drawer", {
|
||||||
|
description = S("Nightstand with One Drawer ("..w..")"),
|
||||||
|
tiles = { 'homedecor_nightstand_'..w..'_tb.png',
|
||||||
|
'homedecor_nightstand_'..w..'_tb.png^[transformFY',
|
||||||
|
'homedecor_nightstand_'..w..'_lr.png^[transformFX',
|
||||||
|
'homedecor_nightstand_'..w..'_lr.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 },
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
selection_box = { type = "regular" },
|
||||||
|
infotext=S("One-drawer Nightstand"),
|
||||||
|
inventory = {
|
||||||
|
size=8,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
homedecor.register("nightstand_"..w.."_two_drawers", {
|
||||||
|
description = S("Nightstand with Two Drawers ("..w..")"),
|
||||||
|
tiles = { 'homedecor_nightstand_'..w..'_tb.png',
|
||||||
|
'homedecor_nightstand_'..w..'_tb.png^[transformFY',
|
||||||
|
'homedecor_nightstand_'..w..'_lr.png^[transformFX',
|
||||||
|
'homedecor_nightstand_'..w..'_lr.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 },
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
selection_box = { type = "regular" },
|
||||||
|
infotext=S("Two-drawer Nightstand"),
|
||||||
|
inventory = {
|
||||||
|
size=16,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
@ -116,11 +116,12 @@ dofile(modpath.."/gastronomy.lua")
|
|||||||
dofile(modpath.."/bathroom_furniture.lua")
|
dofile(modpath.."/bathroom_furniture.lua")
|
||||||
dofile(modpath.."/bathroom_sanitation.lua")
|
dofile(modpath.."/bathroom_sanitation.lua")
|
||||||
|
|
||||||
|
dofile(modpath.."/bedroom.lua")
|
||||||
|
|
||||||
dofile(modpath.."/laundry.lua")
|
dofile(modpath.."/laundry.lua")
|
||||||
|
|
||||||
dofile(modpath.."/office.lua")
|
dofile(modpath.."/office.lua")
|
||||||
|
|
||||||
dofile(modpath.."/nightstands.lua")
|
|
||||||
dofile(modpath.."/clocks.lua")
|
dofile(modpath.."/clocks.lua")
|
||||||
dofile(modpath.."/electrics.lua")
|
dofile(modpath.."/electrics.lua")
|
||||||
|
|
||||||
@ -132,7 +133,6 @@ dofile(modpath.."/furniture_recipes.lua")
|
|||||||
dofile(modpath.."/climate-control.lua")
|
dofile(modpath.."/climate-control.lua")
|
||||||
|
|
||||||
dofile(modpath.."/cobweb.lua")
|
dofile(modpath.."/cobweb.lua")
|
||||||
dofile(modpath.."/beds.lua")
|
|
||||||
dofile(modpath.."/books.lua")
|
dofile(modpath.."/books.lua")
|
||||||
dofile(modpath.."/exterior.lua")
|
dofile(modpath.."/exterior.lua")
|
||||||
dofile(modpath.."/trash_cans.lua")
|
dofile(modpath.."/trash_cans.lua")
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
local S = homedecor.gettext
|
|
||||||
local woods = {"mahogany", "oak"}
|
|
||||||
|
|
||||||
for _, w in ipairs(woods) do
|
|
||||||
|
|
||||||
homedecor.register("nightstand_"..w.."_one_drawer", {
|
|
||||||
description = S("Nightstand with One Drawer ("..w..")"),
|
|
||||||
tiles = { 'homedecor_nightstand_'..w..'_tb.png',
|
|
||||||
'homedecor_nightstand_'..w..'_tb.png^[transformFY',
|
|
||||||
'homedecor_nightstand_'..w..'_lr.png^[transformFX',
|
|
||||||
'homedecor_nightstand_'..w..'_lr.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 },
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
selection_box = { type = "regular" },
|
|
||||||
infotext=S("One-drawer Nightstand"),
|
|
||||||
inventory = {
|
|
||||||
size=8,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
homedecor.register("nightstand_"..w.."_two_drawers", {
|
|
||||||
description = S("Nightstand with Two Drawers ("..w..")"),
|
|
||||||
tiles = { 'homedecor_nightstand_'..w..'_tb.png',
|
|
||||||
'homedecor_nightstand_'..w..'_tb.png^[transformFY',
|
|
||||||
'homedecor_nightstand_'..w..'_lr.png^[transformFX',
|
|
||||||
'homedecor_nightstand_'..w..'_lr.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 },
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
selection_box = { type = "regular" },
|
|
||||||
infotext=S("Two-drawer Nightstand"),
|
|
||||||
inventory = {
|
|
||||||
size=16,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user