homedecor_modpack/homedecor_furniture/init.lua
wsor4035 546cd7110f
make homedecor game agnostic (#28)
* make materials.lua with hades, minetest game, farlands items

* make textures file for central handling

* make mods game agnostic

* take out the trash

* handle multiple seats in sofas

* add github luacheck workflow and various luacheck fixes

* add fluxionary scope creep

* fix devtest breaking right to a name policy

Co-authored-by: wsor4035 <24964441+wsor4035@users.noreply.github.com>
Co-authored-by: SFENCE <sfence.software@gmail.com>
2022-05-03 15:21:14 -04:00

54 lines
1.1 KiB
Lua

local S = minetest.get_translator("homedecor_furniture")
local ob_cbox = {
type = "fixed",
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
}
local wood_tex = homedecor.textures.default_wood
homedecor.register("openframe_bookshelf", {
description = S("Bookshelf (open-frame)"),
drawtype = "mesh",
mesh = "homedecor_openframe_bookshelf.obj",
tiles = {
"homedecor_openframe_bookshelf_books.png",
wood_tex
},
groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
_sound_def = {
key = "node_sound_wood_defaults",
},
paramtype = "light",
paramtype2 = "facedir",
selection_box = ob_cbox,
collision_box = ob_cbox,
crafts = {
{
recipe = {
{"group:wood", "", "group:wood"},
{"book", "book", "book"},
{"group:wood", "", "group:wood"},
},
}
}
})
homedecor.register("wall_shelf", {
description = S("Wall Shelf"),
tiles = {
wood_tex,
},
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0.4, 0.47, 0.5, 0.47, 0.5},
{-0.5, 0.47, -0.1875, 0.5, 0.5, 0.5}
}
}
})