diff --git a/homedecor/furniture.lua b/homedecor/furniture.lua index f51cfa48..deb9a72b 100644 --- a/homedecor/furniture.lua +++ b/homedecor/furniture.lua @@ -1,28 +1,41 @@ local S = homedecor.gettext --- Test -minetest.register_node("homedecor:table", { - description = S("Table"), - tiles = { "forniture_wood.png" }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.4, -0.5, -0.4, -0.3, 0.4, -0.3 }, - { 0.3, -0.5, -0.4, 0.4, 0.4, -0.3 }, - { -0.4, -0.5, 0.3, -0.3, 0.4, 0.4 }, - { 0.3, -0.5, 0.3, 0.4, 0.4, 0.4 }, - { -0.5, 0.4, -0.5, 0.5, 0.5, 0.5 }, - { -0.4, -0.2, -0.3, -0.3, -0.1, 0.3 }, - { 0.3, -0.2, -0.4, 0.4, -0.1, 0.3 }, - { -0.3, -0.2, -0.4, 0.4, -0.1, -0.3 }, - { -0.3, -0.2, 0.3, 0.3, -0.1, 0.4 }, - }, - }, - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, -}) +-- 3dforniture tables ... well, they used to be :P + +local table_colors = { "", "mahogany", "white" } + +for _, i in ipairs(table_colors) do + local color = "_"..i + local desc = S("Table ("..i..")") + + if i == "" then + color = "" + desc = S("Table") + end + + minetest.register_node("homedecor:table"..color, { + description = desc, + tiles = { "forniture_wood"..color..".png" }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.4, -0.5, -0.4, -0.3, 0.4, -0.3 }, + { 0.3, -0.5, -0.4, 0.4, 0.4, -0.3 }, + { -0.4, -0.5, 0.3, -0.3, 0.4, 0.4 }, + { 0.3, -0.5, 0.3, 0.4, 0.4, 0.4 }, + { -0.5, 0.4, -0.5, 0.5, 0.5, 0.5 }, + { -0.4, -0.2, -0.3, -0.3, -0.1, 0.3 }, + { 0.3, -0.2, -0.4, 0.4, -0.1, 0.3 }, + { -0.3, -0.2, -0.4, 0.4, -0.1, -0.3 }, + { -0.3, -0.2, 0.3, 0.3, -0.1, 0.4 }, + }, + }, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, + }) +end minetest.register_node("homedecor:chair", { description = S("Chair"), diff --git a/homedecor/textures/forniture_wood.png b/homedecor/textures/forniture_wood.png index 5ae119b8..7e44cea5 100644 Binary files a/homedecor/textures/forniture_wood.png and b/homedecor/textures/forniture_wood.png differ diff --git a/homedecor/textures/forniture_wood_mahogany.png b/homedecor/textures/forniture_wood_mahogany.png new file mode 100644 index 00000000..25ab29fb Binary files /dev/null and b/homedecor/textures/forniture_wood_mahogany.png differ diff --git a/homedecor/textures/forniture_wood_white.png b/homedecor/textures/forniture_wood_white.png new file mode 100644 index 00000000..02053db6 Binary files /dev/null and b/homedecor/textures/forniture_wood_white.png differ