diff --git a/homedecor_furniture/.luacheckrc b/homedecor_furniture/.luacheckrc deleted file mode 100644 index 760672e2..00000000 --- a/homedecor_furniture/.luacheckrc +++ /dev/null @@ -1,21 +0,0 @@ -unused_args = false -allow_defined_top = true -max_comment_line_length = 999 - -read_globals = { - "DIR_DELIM", - "minetest", "core", - "unpack", - "dump", - table = { fields = { "copy", "getn" } }, - "vector", "nodeupdate", - "VoxelManip", "VoxelArea", - "PseudoRandom", "ItemStack", - "default", - "unifieddyes", - "homedecor", -} - -globals = { -} - diff --git a/homedecor_furniture/init.lua b/homedecor_furniture/init.lua index bcb9dea4..13d3971a 100644 --- a/homedecor_furniture/init.lua +++ b/homedecor_furniture/init.lua @@ -5,16 +5,21 @@ local ob_cbox = { fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 } } -minetest.register_node(":homedecor:openframe_bookshelf", { +local wood_tex = "default_wood.png" +if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end + +homedecor.register("openframe_bookshelf", { description = S("Bookshelf (open-frame)"), drawtype = "mesh", mesh = "homedecor_openframe_bookshelf.obj", tiles = { "homedecor_openframe_bookshelf_books.png", - "default_wood.png" + wood_tex }, groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), + _sound_def = { + key = "node_sound_wood_defaults", + }, paramtype = "light", paramtype2 = "facedir", selection_box = ob_cbox, @@ -24,10 +29,12 @@ minetest.register_node(":homedecor:openframe_bookshelf", { homedecor.register("wall_shelf", { description = S("Wall Shelf"), tiles = { - "default_wood.png", + wood_tex, + }, + groups = { snappy = 3, dig_tree = 2 }, + _sound_def = { + key = "node_sound_wood_defaults", }, - groups = { snappy = 3 }, - sounds = default.node_sound_wood_defaults(), node_box = { type = "fixed", fixed = { diff --git a/homedecor_furniture/mod.conf b/homedecor_furniture/mod.conf index 1425e755..a0ac325d 100644 --- a/homedecor_furniture/mod.conf +++ b/homedecor_furniture/mod.conf @@ -1,4 +1,4 @@ name = homedecor_furniture description = Homedecor mod: furniture -depends = homedecor_common, default, unifieddyes, wool -optional_depends = moreblocks, technic, bucket +depends = homedecor_common +optional_depends = moreblocks, technic, bucket, default, unifieddyes, wool