diff --git a/homedecor/climate-control.lua b/homedecor/climate-control.lua index ff80eae6..c6b2e318 100644 --- a/homedecor/climate-control.lua +++ b/homedecor/climate-control.lua @@ -176,8 +176,8 @@ minetest.register_node("homedecor:radiator", { description = "Radiator heater", drawtype = "nodebox", paramtype = "light", - paramtype2 = "facedir", - groups = {snappy=3}, + paramtype2 = "facedir", + groups = {snappy=3}, node_box = { type = "fixed", fixed = { diff --git a/homedecor/cobweb.lua b/homedecor/cobweb.lua index 4d928c4b..dacdeba6 100644 --- a/homedecor/cobweb.lua +++ b/homedecor/cobweb.lua @@ -8,16 +8,16 @@ minetest.register_node("homedecor:cobweb_corner", { paramtype2 = "wallmounted", sunlight_propagates = true, liquid_viscosity = 8, - liquidtype = "source", - liquid_alternative_flowing = "homedecor:cobweb_corner", - liquid_alternative_source = "homedecor:cobweb_corner", - liquid_renewable = false, - liquid_range = 0, + liquidtype = "source", + liquid_alternative_flowing = "homedecor:cobweb_corner", + liquid_alternative_source = "homedecor:cobweb_corner", + liquid_renewable = false, + liquid_range = 0, walkable = false, selection_box = { type = "regular" }, visual_scale = 1.4, groups = { snappy = 3, liquid=3 }, - after_place_node = function(pos, placer, itemstack, pointed_thing) + after_place_node = function(pos, placer, itemstack, pointed_thing) homedecor.rotate_cobweb(pos) end }) @@ -31,11 +31,11 @@ minetest.register_node("homedecor:cobweb_centered", { paramtype2 = "facedir", sunlight_propagates = true, liquid_viscosity = 8, - liquidtype = "source", - liquid_alternative_flowing = "homedecor:cobweb_centered", - liquid_alternative_source = "homedecor:cobweb_centered", - liquid_renewable = false, - liquid_range = 0, + liquidtype = "source", + liquid_alternative_flowing = "homedecor:cobweb_centered", + liquid_alternative_source = "homedecor:cobweb_centered", + liquid_renewable = false, + liquid_range = 0, walkable = false, selection_box = { type = "fixed", @@ -58,11 +58,11 @@ minetest.register_node("homedecor:cobweb_flat", { paramtype2 = "facedir", sunlight_propagates = true, liquid_viscosity = 8, - liquidtype = "source", - liquid_alternative_flowing = "homedecor:cobweb_flat", - liquid_alternative_source = "homedecor:cobweb_flat", - liquid_renewable = false, - liquid_range = 0, + liquidtype = "source", + liquid_alternative_flowing = "homedecor:cobweb_flat", + liquid_alternative_source = "homedecor:cobweb_flat", + liquid_renewable = false, + liquid_range = 0, walkable = false, selection_box = { type = "fixed", @@ -85,11 +85,11 @@ minetest.register_node("homedecor:cobweb_plantlike", { paramtype2 = "facedir", sunlight_propagates = true, liquid_viscosity = 8, - liquidtype = "source", - liquid_alternative_flowing = "homedecor:cobweb_plantlike", - liquid_alternative_source = "homedecor:cobweb_plantlike", - liquid_renewable = false, - liquid_range = 0, + liquidtype = "source", + liquid_alternative_flowing = "homedecor:cobweb_plantlike", + liquid_alternative_source = "homedecor:cobweb_plantlike", + liquid_renewable = false, + liquid_range = 0, walkable = false, selection_box = { type = "regular" }, visual_scale = 1.189, diff --git a/homedecor/electronics.lua b/homedecor/electronics.lua index cbd62665..3b447e96 100644 --- a/homedecor/electronics.lua +++ b/homedecor/electronics.lua @@ -29,14 +29,14 @@ minetest.register_node('homedecor:speaker_small', { 'homedecor_speaker_back.png', 'homedecor_speaker_front.png' }, - selection_box = { - type = "fixed", - fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } - }, - node_box = { - type = "fixed", - fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } - }, + selection_box = { + type = "fixed", + fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } + }, + node_box = { + type = "fixed", + fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } + }, sunlight_propagates = false, paramtype = "light", @@ -93,7 +93,7 @@ minetest.register_node('homedecor:television', { aspect_w=16, aspect_h=16, length=80.0 - } + } } }, sunlight_propagates = false, @@ -143,15 +143,15 @@ minetest.register_node("homedecor:telephone", { description = "Telephone", drawtype = "nodebox", paramtype = "light", - paramtype2 = "facedir", - groups = {snappy=3}, + paramtype2 = "facedir", + groups = {snappy=3}, node_box = { type = "fixed", fixed = { {-0.1875, -0.5, -0.1875, 0.1875, -0.4375, 0.15}, -- NodeBox1 {-0.125, -0.5, -0.130, 0.125, -0.3675, 0.15}, -- NodeBox2 {-0.175, -0.4375, -0.175, 0.175, -0.42, 0.15}, -- NodeBox3 - {-0.16, -0.42, -0.16, 0.16, -0.4025, 0.15}, -- NodeBox4 + {-0.16, -0.42, -0.16, 0.16, -0.4025, 0.15}, -- NodeBox4 {-0.145, -0.4025, -0.145, 0.145, -0.385, 0.15}, -- NodeBox5 {-0.11, -0.385, -0.115, 0.11, -0.35, 0.15}, -- NodeBox6 {-0.095, -0.5, -0.1, 0.095, -0.3325, 0.15}, -- NodeBox7 @@ -168,6 +168,6 @@ minetest.register_node("homedecor:telephone", { selection_box = { type = "fixed", fixed = { -0.25, -0.5, -0.1875, 0.25, -0.21, 0.15 } - } + } }) diff --git a/homedecor/fences.lua b/homedecor/fences.lua index 0fd7bcd0..3e503525 100644 --- a/homedecor/fences.lua +++ b/homedecor/fences.lua @@ -102,8 +102,8 @@ minetest.register_node("homedecor:fence_wrought_iron_with_sign", { minetest.register_node("homedecor:fence_picket", { drawtype = "nodebox", - description = S("Unpainted Picket Fence"), - tiles = { + description = S("Unpainted Picket Fence"), + tiles = { "homedecor_blanktile.png", "homedecor_blanktile.png", "homedecor_fence_picket.png", @@ -111,20 +111,20 @@ minetest.register_node("homedecor:fence_picket", { "homedecor_fence_picket_backside.png", "homedecor_fence_picket.png" }, - paramtype = "light", - is_ground_content = true, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + paramtype = "light", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), walkable = true, paramtype2 = "facedir", - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 } - }, - node_box = { - type = "fixed", - fixed = { -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 } - }, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", + fixed = { -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 } + }, }) minetest.register_node("homedecor:fence_picket_corner", { @@ -162,8 +162,8 @@ minetest.register_node("homedecor:fence_picket_corner", { minetest.register_node("homedecor:fence_picket_white", { drawtype = "nodebox", - description = S("White Picket Fence"), - tiles = { + description = S("White Picket Fence"), + tiles = { "homedecor_blanktile.png", "homedecor_blanktile.png", "homedecor_fence_picket_white.png", @@ -171,20 +171,20 @@ minetest.register_node("homedecor:fence_picket_white", { "homedecor_fence_picket_white_backside.png", "homedecor_fence_picket_white.png" }, - paramtype = "light", - is_ground_content = true, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + paramtype = "light", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), walkable = true, paramtype2 = "facedir", - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 } - }, - node_box = { - type = "fixed", - fixed = { -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 } - }, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", + fixed = { -0.5, -0.5, 0.498, 0.5, 0.5, 0.498 } + }, }) minetest.register_node("homedecor:fence_picket_corner_white", { @@ -222,8 +222,8 @@ minetest.register_node("homedecor:fence_picket_corner_white", { minetest.register_node("homedecor:fence_privacy", { drawtype = "nodebox", - description = S("Wooden Privacy Fence"), - tiles = { + description = S("Wooden Privacy Fence"), + tiles = { "homedecor_fence_privacy_tb.png", "homedecor_fence_privacy_tb.png", "homedecor_fence_privacy_sides.png", @@ -231,31 +231,31 @@ minetest.register_node("homedecor:fence_privacy", { "homedecor_fence_privacy_backside.png", "homedecor_fence_privacy_front.png" }, - paramtype = "light", - is_ground_content = true, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + paramtype = "light", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), walkable = true, paramtype2 = "facedir", - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, 5/16, 0.5, 0.5, 8/16 } - }, - node_box = { - type = "fixed", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 5/16, 0.5, 0.5, 8/16 } + }, + node_box = { + type = "fixed", fixed = { { -8/16, -8/16, 5/16, -5/16, 8/16, 7/16 }, -- left part { -4/16, -8/16, 5/16, 3/16, 8/16, 7/16 }, -- middle part { 4/16, -8/16, 5/16, 8/16, 8/16, 7/16 }, -- right part { -8/16, -2/16, 7/16, 8/16, 2/16, 8/16 }, -- connecting rung } - }, + }, }) minetest.register_node("homedecor:fence_privacy_corner", { drawtype = "nodebox", - description = S("Wooden Privacy Fence Corner"), - tiles = { + description = S("Wooden Privacy Fence Corner"), + tiles = { "homedecor_fence_privacy_corner_top.png", "homedecor_fence_privacy_corner_bottom.png", "homedecor_fence_privacy_corner_right.png", @@ -263,21 +263,21 @@ minetest.register_node("homedecor:fence_privacy_corner", { "homedecor_fence_privacy_backside.png", "homedecor_fence_privacy_corner_front.png" }, - paramtype = "light", - is_ground_content = true, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + paramtype = "light", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), walkable = true, paramtype2 = "facedir", - selection_box = { - type = "fixed", - fixed = { + selection_box = { + type = "fixed", + fixed = { { -0.5, -0.5, 5/16, 0.5, 0.5, 0.5 }, { -0.5, -0.5, -0.5, -5/16, 0.5, 5/16 }, } - }, - node_box = { - type = "fixed", + }, + node_box = { + type = "fixed", fixed = { { -7/16, -8/16, 5/16, -5/16, 8/16, 7/16 }, -- left part { -4/16, -8/16, 5/16, 3/16, 8/16, 7/16 }, -- middle part @@ -289,54 +289,54 @@ minetest.register_node("homedecor:fence_privacy_corner", { { -7/16, -8/16, -8/16, -5/16, 8/16, -5/16 }, -- front-most part { -8/16, -2/16, -8/16, -7/16, 2/16, 7/16 }, -- left-side connecting rung } - }, + }, }) minetest.register_node("homedecor:fence_barbed_wire", { drawtype = "nodebox", - description = S("Barbed Wire Fence"), - tiles = {"homedecor_fence_barbed_wire.png"}, - paramtype = "light", - is_ground_content = true, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + description = S("Barbed Wire Fence"), + tiles = {"homedecor_fence_barbed_wire.png"}, + paramtype = "light", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), walkable = true, paramtype2 = "facedir", - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 } - }, - node_box = { - type = "fixed", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", fixed = { { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post { -6/16, -8/16, 7/16, 6/16, 8/16, 7/16 } -- the wire } - }, + }, }) minetest.register_node("homedecor:fence_barbed_wire_corner", { drawtype = "nodebox", - description = S("Barbed Wire Fence Corner"), - tiles = { + description = S("Barbed Wire Fence Corner"), + tiles = { "homedecor_fence_barbed_wire.png" }, - paramtype = "light", - is_ground_content = true, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + paramtype = "light", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), walkable = true, paramtype2 = "facedir", - selection_box = { - type = "fixed", - fixed = { + selection_box = { + type = "fixed", + fixed = { { -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 }, - { -0.5, -0.5, -0.5, -0.375, 0.5, 0.375 } + { -0.5, -0.5, -0.5, -0.375, 0.5, 0.375 } } - }, - node_box = { - type = "fixed", + }, + node_box = { + type = "fixed", fixed = { { -8/16, -8/16, 6/16, -6/16, 8/16, 8/16 }, -- left post { 6/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post @@ -345,13 +345,13 @@ minetest.register_node("homedecor:fence_barbed_wire_corner", { { -8/16, -8/16, -8/16, -6/16, 8/16, -6/16 }, -- front post { -7/16, -8/16, -6/16, -7/16, 8/16, 6/16 } -- more wire } - }, + }, }) minetest.register_node("homedecor:fence_chainlink", { drawtype = "nodebox", - description = S("Chainlink Fence"), - tiles = { + description = S("Chainlink Fence"), + tiles = { "homedecor_fence_chainlink_tb.png", "homedecor_fence_chainlink_tb.png", "homedecor_fence_chainlink_sides.png", @@ -359,18 +359,18 @@ minetest.register_node("homedecor:fence_chainlink", { "homedecor_fence_chainlink_fb.png", "homedecor_fence_chainlink_fb.png", }, - paramtype = "light", - is_ground_content = true, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + paramtype = "light", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), walkable = true, paramtype2 = "facedir", - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 } - }, - node_box = { - type = "fixed", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 0.375, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", fixed = { { -8/16, -8/16, 6/16, -7/16, 8/16, 8/16 }, -- left post { 7/16, -8/16, 6/16, 8/16, 8/16, 8/16 }, -- right post @@ -378,7 +378,7 @@ minetest.register_node("homedecor:fence_chainlink", { { -8/16, -8/16, 13/32, 8/16, -7/16, 15/32 }, -- bottom piece { -8/16, -8/16, 7/16, 8/16, 8/16, 7/16 } -- the chainlink itself } - }, + }, }) minetest.register_node("homedecor:fence_chainlink_corner", { @@ -423,8 +423,8 @@ minetest.register_node("homedecor:fence_chainlink_corner", { minetest.register_node("homedecor:fence_wrought_iron_2", { drawtype = "nodebox", - description = S("Wrought Iron fence (type 2)"), - tiles = { + description = S("Wrought Iron fence (type 2)"), + tiles = { "homedecor_fence_wrought_iron_2_tb.png", "homedecor_fence_wrought_iron_2_tb.png", "homedecor_fence_wrought_iron_2_sides.png", @@ -432,18 +432,18 @@ minetest.register_node("homedecor:fence_wrought_iron_2", { "homedecor_fence_wrought_iron_2_fb.png", "homedecor_fence_wrought_iron_2_fb.png" }, - paramtype = "light", - is_ground_content = true, - groups = {snappy=3}, - sounds = default.node_sound_wood_defaults(), + paramtype = "light", + is_ground_content = true, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), walkable = true, paramtype2 = "facedir", - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, 0.42, 0.5, 0.5, 0.5 } - }, - node_box = { - type = "fixed", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, 0.42, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", fixed = { { -8/16, -8/16, 14/32, -7.75/16, 8/16, 16/32 }, -- left post { 7.75/16, -8/16, 14/32, 8/16, 8/16, 16/32 }, -- right post @@ -453,7 +453,7 @@ minetest.register_node("homedecor:fence_wrought_iron_2", { { -8/16, -8/16, 14/32, 8/16, -7.75/16, 16/32 }, -- bottom piece { -8/16, -8/16, 15/32, 8/16, 8/16, 15/32 } -- the grid itself } - }, + }, }) minetest.register_node("homedecor:fence_wrought_iron_2_corner", { diff --git a/homedecor/furniture.lua b/homedecor/furniture.lua index 42829d8e..521d944c 100644 --- a/homedecor/furniture.lua +++ b/homedecor/furniture.lua @@ -20,18 +20,18 @@ for _, i in ipairs(table_colors) do 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 }, - }, + 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}, }) @@ -66,25 +66,25 @@ for i in ipairs(chaircolors) do end minetest.register_node("homedecor:chair"..color, { - description = S("Kitchen chair (%s)"):format(name), + description = S("Kitchen chair (%s)"):format(name), tiles = chairtiles, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", node_box = { - type = "fixed", - fixed = { + type = "fixed", + fixed = { {-0.3125, -0.5, 0.1875, -0.1875, 0.5, 0.3125}, {0.1875, -0.5, 0.1875, 0.3125, 0.5, 0.3125}, {-0.3125, -0.5, -0.3125, -0.1875, 0, -0.1875}, {0.1875, -0.5, -0.3125, 0.3125, 0, -0.1875}, {-0.3125, -0.125, -0.3125, 0.3125, 0, 0.3125}, {-0.25, 0.0625, 0.25, 0.25, 0.4375, 0.25}, - }, + }, }, selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}, + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}, }, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, }) @@ -179,12 +179,12 @@ local function bed_extension(pos, color) end end - if string.find(bottomnode.name, "homedecor:bed_.*_foot$") then + if string.find(bottomnode.name, "homedecor:bed_.*_foot$") then if fdir == bottomnode.param2 then local newnode = string.gsub(bottomnode.name, "_foot", "_footext") - minetest.set_node({x=pos.x, y=pos.y-1.0, z=pos.z}, { name = newnode, param2 = fdir}) + minetest.set_node({x=pos.x, y=pos.y-1.0, z=pos.z}, { name = newnode, param2 = fdir}) end - end + end end local function unextend_bed(pos, color) @@ -324,7 +324,7 @@ homedecor.register("wardrobe_bottom", { }, inventory_image = "homedecor_wardrobe_inv.png", description = "Wardrobe", - groups = {snappy=3}, + groups = {snappy=3}, node_box = { type = "fixed", fixed = { @@ -355,13 +355,13 @@ homedecor.register("simple_bench", { "homedecor_bench_large_2_left_back.png^[transformFX" }, description = "Simple Bench", - groups = {snappy=3}, + groups = {snappy=3}, node_box = { type = "fixed", fixed = { - {-0.5, -0.15, 0, 0.5, -0.05, 0.4}, - {-0.4, -0.5, 0.1, -0.3, -0.15, 0.3}, - { 0.3, -0.5, 0.1, 0.4, -0.15, 0.3}, + {-0.5, -0.15, 0, 0.5, -0.05, 0.4}, + {-0.4, -0.5, 0.1, -0.3, -0.15, 0.3}, + { 0.3, -0.5, 0.1, 0.4, -0.15, 0.3}, } }, }) @@ -506,7 +506,7 @@ homedecor.register("deckchair_head", { "homedecor_deckchair_sides.png", "homedecor_deckchair_front.png" }, - groups = { snappy = 3, not_in_creative_inventory = 1 }, + groups = { snappy = 3, not_in_creative_inventory = 1 }, node_box = { type = "fixed", fixed = { @@ -542,7 +542,7 @@ homedecor.register("deckchair_foot", { drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", - groups = { snappy = 3 }, + groups = { snappy = 3 }, node_box = { type = "fixed", fixed = { diff --git a/homedecor/furniture_bathroom.lua b/homedecor/furniture_bathroom.lua index 02de3c73..f3f0e785 100644 --- a/homedecor/furniture_bathroom.lua +++ b/homedecor/furniture_bathroom.lua @@ -1,190 +1,190 @@ local S = homedecor.gettext minetest.register_node("homedecor:toilet", { - description = S("Toilet"), - tiles = { "forniture_marble.png" }, - drawtype = "nodebox", - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.20, -0.50, -0.20, 0.20, -0.45, 0.50, }, - { -0.10, -0.45, -0.10, 0.10, 0.00, 0.50, }, - { -0.30, -0.20, -0.30, 0.30, 0.00, 0.35, }, - { -0.25, 0.00, -0.25, 0.25, 0.05, 0.25, }, - { -0.30, 0.00, 0.30, 0.30, 0.40, 0.50, }, - { -0.05, 0.40, 0.35, 0.05, 0.45, 0.45, }, - }, - }, - groups = {cracky=3,}, - sounds = default.node_sound_stone_defaults(), - on_punch = function (pos, node, puncher) - node.name = "homedecor:toilet_open" - minetest.set_node(pos, node) - end, + description = S("Toilet"), + tiles = { "forniture_marble.png" }, + drawtype = "nodebox", + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.20, -0.50, -0.20, 0.20, -0.45, 0.50, }, + { -0.10, -0.45, -0.10, 0.10, 0.00, 0.50, }, + { -0.30, -0.20, -0.30, 0.30, 0.00, 0.35, }, + { -0.25, 0.00, -0.25, 0.25, 0.05, 0.25, }, + { -0.30, 0.00, 0.30, 0.30, 0.40, 0.50, }, + { -0.05, 0.40, 0.35, 0.05, 0.45, 0.45, }, + }, + }, + groups = {cracky=3,}, + sounds = default.node_sound_stone_defaults(), + on_punch = function (pos, node, puncher) + node.name = "homedecor:toilet_open" + minetest.set_node(pos, node) + end, }) minetest.register_node("homedecor:toilet_open", { - tiles = { - "forniture_marble_top_toilet.png", + tiles = { + "forniture_marble_top_toilet.png", "forniture_marble.png" - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.20, -0.50, -0.20, 0.20, -0.45, 0.50, }, - { -0.10, -0.45, -0.10, 0.10, -0.20, 0.50, }, - { -0.10, -0.20, 0.30, 0.10, 0.00, 0.50, }, - { -0.30, -0.20, 0.10, 0.30, 0.00, 0.35, }, - { -0.30, -0.20, -0.30, -0.10, -0.15, 0.10, }, - { -0.10, -0.20, -0.30, 0.10, -0.15, -0.10, }, - { 0.10, -0.20, -0.30, 0.30, -0.15, 0.10, }, - { -0.30, -0.15, -0.30, -0.20, 0.00, 0.10, }, - { -0.20, -0.15, -0.30, 0.20, 0.00, -0.20, }, - { 0.20, -0.15, -0.30, 0.30, 0.00, 0.10, }, - { -0.25, 0.00, 0.20, 0.25, 0.50, 0.25, }, - { -0.30, 0.00, 0.30, 0.30, 0.40, 0.50, }, - }, - }, - drop = "homedecor:toilet", - groups = {cracky = 3,}, - --sounds = {dig = "3dforniture_dig_toilet", gain=0.5}, - sounds = default.node_sound_stone_defaults(), - on_punch = function (pos, node, puncher) - node.name = "homedecor:toilet" - minetest.set_node(pos, node) + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.20, -0.50, -0.20, 0.20, -0.45, 0.50, }, + { -0.10, -0.45, -0.10, 0.10, -0.20, 0.50, }, + { -0.10, -0.20, 0.30, 0.10, 0.00, 0.50, }, + { -0.30, -0.20, 0.10, 0.30, 0.00, 0.35, }, + { -0.30, -0.20, -0.30, -0.10, -0.15, 0.10, }, + { -0.10, -0.20, -0.30, 0.10, -0.15, -0.10, }, + { 0.10, -0.20, -0.30, 0.30, -0.15, 0.10, }, + { -0.30, -0.15, -0.30, -0.20, 0.00, 0.10, }, + { -0.20, -0.15, -0.30, 0.20, 0.00, -0.20, }, + { 0.20, -0.15, -0.30, 0.30, 0.00, 0.10, }, + { -0.25, 0.00, 0.20, 0.25, 0.50, 0.25, }, + { -0.30, 0.00, 0.30, 0.30, 0.40, 0.50, }, + }, + }, + drop = "homedecor:toilet", + groups = {cracky = 3,}, + --sounds = {dig = "3dforniture_dig_toilet", gain=0.5}, + sounds = default.node_sound_stone_defaults(), + on_punch = function (pos, node, puncher) + node.name = "homedecor:toilet" + minetest.set_node(pos, node) minetest.sound_play("homedecor_toilet_flush", { pos=pos, max_hear_distance = 5, gain = 1, }) - end, + end, }) --Sink minetest.register_node("homedecor:sink", { - description = S("Sink"), - tiles = { - "forniture_marble_top_sink.png", + description = S("Sink"), + tiles = { + "forniture_marble_top_sink.png", "forniture_marble.png" - }, - inventory_image="3dforniture_inv_sink.png", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.15, 0.35, 0.20, 0.15, 0.40, 0.50, }, - { -0.25, 0.40, 0.40, 0.25, 0.45, 0.50, }, - { -0.25, 0.40, 0.15, -0.15, 0.45, 0.40, }, - { 0.15, 0.40, 0.15, 0.25, 0.45, 0.40, }, - { -0.15, 0.40, 0.15, 0.15, 0.45, 0.20, }, - { -0.30, 0.45, 0.40, 0.30, 0.50, 0.50, }, - { -0.30, 0.45, 0.10, -0.25, 0.50, 0.40, }, - { 0.25, 0.45, 0.10, 0.30, 0.50, 0.40, }, - { -0.25, 0.45, 0.10, 0.25, 0.50, 0.15, }, - {-0.1, -0.5, 0.3, 0.1, 0.4, 0.5}, - }, - }, - selection_box = { - type = "fixed", - fixed = {-0.3,-0.5,0.1, 0.3,0.5,0.5}, - }, - groups = {cracky=2,}, - sounds = default.node_sound_stone_defaults(), + }, + inventory_image="3dforniture_inv_sink.png", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.15, 0.35, 0.20, 0.15, 0.40, 0.50, }, + { -0.25, 0.40, 0.40, 0.25, 0.45, 0.50, }, + { -0.25, 0.40, 0.15, -0.15, 0.45, 0.40, }, + { 0.15, 0.40, 0.15, 0.25, 0.45, 0.40, }, + { -0.15, 0.40, 0.15, 0.15, 0.45, 0.20, }, + { -0.30, 0.45, 0.40, 0.30, 0.50, 0.50, }, + { -0.30, 0.45, 0.10, -0.25, 0.50, 0.40, }, + { 0.25, 0.45, 0.10, 0.30, 0.50, 0.40, }, + { -0.25, 0.45, 0.10, 0.25, 0.50, 0.15, }, + {-0.1, -0.5, 0.3, 0.1, 0.4, 0.5}, + }, + }, + selection_box = { + type = "fixed", + fixed = {-0.3,-0.5,0.1, 0.3,0.5,0.5}, + }, + groups = {cracky=2,}, + sounds = default.node_sound_stone_defaults(), }) --Taps minetest.register_node("homedecor:taps", { - description = S("Taps"), - tiles = { "forniture_metal.png" }, - inventory_image="3dforniture_inv_taps.png", - drawtype = "nodebox", - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.25, -0.450, 0.49, 0.25, -0.30, 0.50, }, - { -0.05, -0.400, 0.25, 0.05, -0.35, 0.50, }, - { -0.05, -0.425, 0.25, 0.05, -0.40, 0.30, }, - { -0.20, -0.400, 0.45, -0.15, -0.35, 0.50, }, - { -0.20, -0.450, 0.40, -0.15, -0.30, 0.45, }, - { -0.25, -0.400, 0.40, -0.10, -0.35, 0.45, }, - { 0.15, -0.400, 0.45, 0.20, -0.35, 0.50, }, - { 0.15, -0.450, 0.40, 0.20, -0.30, 0.45, }, - { 0.10, -0.400, 0.40, 0.25, -0.35, 0.45, }, - }, - }, - selection_box = { - type = "fixed", - fixed = { -0.25, -0.45, 0.25, 0.25, -0.3, 0.5 }, - }, - groups = {cracky=2,}, - sounds = default.node_sound_stone_defaults(), + description = S("Taps"), + tiles = { "forniture_metal.png" }, + inventory_image="3dforniture_inv_taps.png", + drawtype = "nodebox", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.25, -0.450, 0.49, 0.25, -0.30, 0.50, }, + { -0.05, -0.400, 0.25, 0.05, -0.35, 0.50, }, + { -0.05, -0.425, 0.25, 0.05, -0.40, 0.30, }, + { -0.20, -0.400, 0.45, -0.15, -0.35, 0.50, }, + { -0.20, -0.450, 0.40, -0.15, -0.30, 0.45, }, + { -0.25, -0.400, 0.40, -0.10, -0.35, 0.45, }, + { 0.15, -0.400, 0.45, 0.20, -0.35, 0.50, }, + { 0.15, -0.450, 0.40, 0.20, -0.30, 0.45, }, + { 0.10, -0.400, 0.40, 0.25, -0.35, 0.45, }, + }, + }, + selection_box = { + type = "fixed", + fixed = { -0.25, -0.45, 0.25, 0.25, -0.3, 0.5 }, + }, + groups = {cracky=2,}, + sounds = default.node_sound_stone_defaults(), }) --Shower Tray minetest.register_node("homedecor:shower_tray", { - description = S("Shower Tray"), - tiles = { + description = S("Shower Tray"), + tiles = { "forniture_marble_base_ducha_top.png", "forniture_marble.png" - }, - drawtype = "nodebox", - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - legacy_facedir_simple = true, - node_box = { - type = "fixed", - fixed = { - { -0.50, -0.50, -0.50, 0.50, -0.45, 0.50, }, - { -0.50, -0.45, -0.50, 0.50, -0.40, -0.45, }, - { -0.50, -0.45, 0.45, 0.50, -0.40, 0.50, }, - { -0.50, -0.45, -0.45, -0.45, -0.40, 0.45, }, - { 0.45, -0.45, -0.45, 0.50, -0.40, 0.45, }, - }, - }, - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }, - }, - groups = {cracky=2,}, - sounds = default.node_sound_stone_defaults(), + }, + drawtype = "nodebox", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + legacy_facedir_simple = true, + node_box = { + type = "fixed", + fixed = { + { -0.50, -0.50, -0.50, 0.50, -0.45, 0.50, }, + { -0.50, -0.45, -0.50, 0.50, -0.40, -0.45, }, + { -0.50, -0.45, 0.45, 0.50, -0.40, 0.50, }, + { -0.50, -0.45, -0.45, -0.45, -0.40, 0.45, }, + { 0.45, -0.45, -0.45, 0.50, -0.40, 0.45, }, + }, + }, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 }, + }, + groups = {cracky=2,}, + sounds = default.node_sound_stone_defaults(), }) --Shower Head minetest.register_node("homedecor:shower_head", { - description = S("Shower Head"), - tiles = { "forniture_metal.png" }, - inventory_image="3dforniture_inv_shower_head.png", - drawtype = "nodebox", - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.10, -0.50, 0.10, 0.10, -0.40, 0.30, }, - { -0.05, -0.40, 0.15, 0.05, -0.30, 0.25, }, - { -0.05, -0.35, 0.25, 0.05, -0.30, 0.50, }, - { -0.10, -0.40, 0.49, 0.10, -0.25, 0.50, }, - }, - }, - selection_box = { - type = "fixed", - fixed = { -0.1, -0.5, 0.1, 0.1, -0.25, 0.5 }, - }, - groups = {cracky=2,}, - sounds = default.node_sound_stone_defaults(), + description = S("Shower Head"), + tiles = { "forniture_metal.png" }, + inventory_image="3dforniture_inv_shower_head.png", + drawtype = "nodebox", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.10, -0.50, 0.10, 0.10, -0.40, 0.30, }, + { -0.05, -0.40, 0.15, 0.05, -0.30, 0.25, }, + { -0.05, -0.35, 0.25, 0.05, -0.30, 0.50, }, + { -0.10, -0.40, 0.49, 0.10, -0.25, 0.50, }, + }, + }, + selection_box = { + type = "fixed", + fixed = { -0.1, -0.5, 0.1, 0.1, -0.25, 0.5 }, + }, + groups = {cracky=2,}, + sounds = default.node_sound_stone_defaults(), }) minetest.register_alias("3dforniture:toilet", "homedecor:toilet") diff --git a/homedecor/furniture_medieval.lua b/homedecor/furniture_medieval.lua index 4040871d..eae09e3d 100644 --- a/homedecor/furniture_medieval.lua +++ b/homedecor/furniture_medieval.lua @@ -2,161 +2,161 @@ local S = homedecor.gettext minetest.register_node("homedecor:bars", { - description = S("Bars"), - tiles = { "forniture_black_metal.png" }, - drawtype = "nodebox", - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.5, -0.50, -0.10, -0.4, 0.50, 0.10 }, - { -0.1, -0.50, -0.10, 0.1, 0.50, 0.10 }, - { 0.4, -0.50, -0.10, 0.5, 0.50, 0.10 }, - { -0.5, -0.50, -0.05, 0.5, -0.45, 0.05 }, - { -0.5, 0.45, -0.05, 0.5, 0.50, 0.05 }, - }, - }, - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, -0.1, 0.5, 0.5, 0.1 }, - }, - groups = {cracky=1}, + description = S("Bars"), + tiles = { "forniture_black_metal.png" }, + drawtype = "nodebox", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.5, -0.50, -0.10, -0.4, 0.50, 0.10 }, + { -0.1, -0.50, -0.10, 0.1, 0.50, 0.10 }, + { 0.4, -0.50, -0.10, 0.5, 0.50, 0.10 }, + { -0.5, -0.50, -0.05, 0.5, -0.45, 0.05 }, + { -0.5, 0.45, -0.05, 0.5, 0.50, 0.05 }, + }, + }, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.1, 0.5, 0.5, 0.1 }, + }, + groups = {cracky=1}, }) --L Binding Bars minetest.register_node("homedecor:L_binding_bars", { - description = S("Binding Bars"), - tiles = { "forniture_black_metal.png" }, - drawtype = "nodebox", - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.10, -0.50, -0.50, 0.10, 0.50, -0.40 }, - { -0.15, -0.50, -0.15, 0.15, 0.50, 0.15 }, - { 0.40, -0.50, -0.10, 0.50, 0.50, 0.10 }, - { 0.00, -0.50, -0.05, 0.50, -0.45, 0.05 }, - { -0.05, -0.50, -0.50, 0.05, -0.45, 0.00 }, - { 0.00, 0.45, -0.05, 0.50, 0.50, 0.05 }, - { -0.05, 0.45, -0.50, 0.05, 0.50, 0.00 }, - }, - }, - groups = {cracky=1,} + description = S("Binding Bars"), + tiles = { "forniture_black_metal.png" }, + drawtype = "nodebox", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.10, -0.50, -0.50, 0.10, 0.50, -0.40 }, + { -0.15, -0.50, -0.15, 0.15, 0.50, 0.15 }, + { 0.40, -0.50, -0.10, 0.50, 0.50, 0.10 }, + { 0.00, -0.50, -0.05, 0.50, -0.45, 0.05 }, + { -0.05, -0.50, -0.50, 0.05, -0.45, 0.00 }, + { 0.00, 0.45, -0.05, 0.50, 0.50, 0.05 }, + { -0.05, 0.45, -0.50, 0.05, 0.50, 0.00 }, + }, + }, + groups = {cracky=1,} }) minetest.register_node("homedecor:chains", { - description = S("Chains"), - tiles = { "forniture_black_metal.png" }, - inventory_image="3dforniture_inv_chains.png", - drawtype = "nodebox", - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.45, 0.25, 0.45, -0.20, 0.50, 0.50, }, - { -0.35, 0.40, 0.35, -0.30, 0.45, 0.45, }, - { -0.35, 0.30, 0.35, -0.30, 0.35, 0.45, }, - { -0.35, 0.35, 0.30, -0.30, 0.40, 0.35, }, - { -0.40, 0.35, 0.35, -0.25, 0.40, 0.40, }, - { -0.40, 0.15, 0.35, -0.25, 0.20, 0.40, }, - { -0.45, 0.20, 0.35, -0.40, 0.35, 0.40, }, - { -0.25, 0.20, 0.35, -0.20, 0.35, 0.40, }, - { -0.35, 0.20, 0.30, -0.30, 0.25, 0.45, }, - { -0.35, 0.00, 0.30, -0.30, 0.05, 0.45, }, - { -0.35, 0.05, 0.25, -0.30, 0.20, 0.30, }, - { -0.35, 0.05, 0.45, -0.30, 0.20, 0.50, }, - { -0.40, 0.05, 0.35, -0.25, 0.10, 0.40, }, - { -0.40, -0.15, 0.35, -0.25, -0.10, 0.40, }, - { -0.45, -0.10, 0.35, -0.40, 0.05, 0.40, }, - { -0.25, -0.10, 0.35, -0.20, 0.05, 0.40, }, - { -0.35, -0.10, 0.30, -0.30, -0.05, 0.45, }, - { -0.35, -0.30, 0.30, -0.30, -0.25, 0.45, }, - { -0.35, -0.25, 0.25, -0.30, -0.10, 0.30, }, - { -0.35, -0.25, 0.45, -0.30, -0.10, 0.50, }, - { -0.40, -0.25, 0.35, -0.25, -0.20, 0.40, }, - { -0.40, -0.45, 0.35, -0.25, -0.40, 0.40, }, - { -0.45, -0.40, 0.35, -0.40, -0.25, 0.40, }, - { -0.25, -0.40, 0.35, -0.20, -0.25, 0.40, }, - { 0.20, 0.25, 0.45, 0.45, 0.50, 0.50, }, - { 0.30, 0.40, 0.35, 0.35, 0.45, 0.45, }, - { 0.30, 0.30, 0.35, 0.35, 0.35, 0.45, }, - { 0.30, 0.35, 0.30, 0.35, 0.40, 0.35, }, - { 0.25, 0.35, 0.35, 0.40, 0.40, 0.40, }, - { 0.25, 0.15, 0.35, 0.40, 0.20, 0.40, }, - { 0.20, 0.20, 0.35, 0.25, 0.35, 0.40, }, - { 0.40, 0.20, 0.35, 0.45, 0.35, 0.40, }, - { 0.30, 0.20, 0.30, 0.35, 0.25, 0.45, }, - { 0.30, 0.00, 0.30, 0.35, 0.05, 0.45, }, - { 0.30, 0.05, 0.25, 0.35, 0.20, 0.30, }, - { 0.30, 0.05, 0.45, 0.35, 0.20, 0.50, }, - { 0.25, 0.05, 0.35, 0.40, 0.10, 0.40, }, - { 0.25, -0.15, 0.35, 0.40, -0.10, 0.40, }, - { 0.20, -0.10, 0.35, 0.25, 0.05, 0.40, }, - { 0.40, -0.10, 0.35, 0.45, 0.05, 0.40, }, - { 0.30, -0.10, 0.30, 0.35, -0.05, 0.45, }, - { 0.30, -0.30, 0.30, 0.35, -0.25, 0.45, }, - { 0.30, -0.25, 0.25, 0.35, -0.10, 0.30, }, - { 0.30, -0.25, 0.45, 0.35, -0.10, 0.50, }, - { 0.25, -0.25, 0.35, 0.40, -0.20, 0.40, }, - { 0.25, -0.45, 0.35, 0.40, -0.40, 0.40, }, - { 0.20, -0.40, 0.35, 0.25, -0.25, 0.40, }, - { 0.40, -0.40, 0.35, 0.45, -0.25, 0.40, }, - }, - }, - selection_box = { - type = "fixed", - fixed = {-1/2, -1/2, 1/4, 1/2, 1/2, 1/2}, - }, - groups = {cracky=1}, + description = S("Chains"), + tiles = { "forniture_black_metal.png" }, + inventory_image="3dforniture_inv_chains.png", + drawtype = "nodebox", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.45, 0.25, 0.45, -0.20, 0.50, 0.50, }, + { -0.35, 0.40, 0.35, -0.30, 0.45, 0.45, }, + { -0.35, 0.30, 0.35, -0.30, 0.35, 0.45, }, + { -0.35, 0.35, 0.30, -0.30, 0.40, 0.35, }, + { -0.40, 0.35, 0.35, -0.25, 0.40, 0.40, }, + { -0.40, 0.15, 0.35, -0.25, 0.20, 0.40, }, + { -0.45, 0.20, 0.35, -0.40, 0.35, 0.40, }, + { -0.25, 0.20, 0.35, -0.20, 0.35, 0.40, }, + { -0.35, 0.20, 0.30, -0.30, 0.25, 0.45, }, + { -0.35, 0.00, 0.30, -0.30, 0.05, 0.45, }, + { -0.35, 0.05, 0.25, -0.30, 0.20, 0.30, }, + { -0.35, 0.05, 0.45, -0.30, 0.20, 0.50, }, + { -0.40, 0.05, 0.35, -0.25, 0.10, 0.40, }, + { -0.40, -0.15, 0.35, -0.25, -0.10, 0.40, }, + { -0.45, -0.10, 0.35, -0.40, 0.05, 0.40, }, + { -0.25, -0.10, 0.35, -0.20, 0.05, 0.40, }, + { -0.35, -0.10, 0.30, -0.30, -0.05, 0.45, }, + { -0.35, -0.30, 0.30, -0.30, -0.25, 0.45, }, + { -0.35, -0.25, 0.25, -0.30, -0.10, 0.30, }, + { -0.35, -0.25, 0.45, -0.30, -0.10, 0.50, }, + { -0.40, -0.25, 0.35, -0.25, -0.20, 0.40, }, + { -0.40, -0.45, 0.35, -0.25, -0.40, 0.40, }, + { -0.45, -0.40, 0.35, -0.40, -0.25, 0.40, }, + { -0.25, -0.40, 0.35, -0.20, -0.25, 0.40, }, + { 0.20, 0.25, 0.45, 0.45, 0.50, 0.50, }, + { 0.30, 0.40, 0.35, 0.35, 0.45, 0.45, }, + { 0.30, 0.30, 0.35, 0.35, 0.35, 0.45, }, + { 0.30, 0.35, 0.30, 0.35, 0.40, 0.35, }, + { 0.25, 0.35, 0.35, 0.40, 0.40, 0.40, }, + { 0.25, 0.15, 0.35, 0.40, 0.20, 0.40, }, + { 0.20, 0.20, 0.35, 0.25, 0.35, 0.40, }, + { 0.40, 0.20, 0.35, 0.45, 0.35, 0.40, }, + { 0.30, 0.20, 0.30, 0.35, 0.25, 0.45, }, + { 0.30, 0.00, 0.30, 0.35, 0.05, 0.45, }, + { 0.30, 0.05, 0.25, 0.35, 0.20, 0.30, }, + { 0.30, 0.05, 0.45, 0.35, 0.20, 0.50, }, + { 0.25, 0.05, 0.35, 0.40, 0.10, 0.40, }, + { 0.25, -0.15, 0.35, 0.40, -0.10, 0.40, }, + { 0.20, -0.10, 0.35, 0.25, 0.05, 0.40, }, + { 0.40, -0.10, 0.35, 0.45, 0.05, 0.40, }, + { 0.30, -0.10, 0.30, 0.35, -0.05, 0.45, }, + { 0.30, -0.30, 0.30, 0.35, -0.25, 0.45, }, + { 0.30, -0.25, 0.25, 0.35, -0.10, 0.30, }, + { 0.30, -0.25, 0.45, 0.35, -0.10, 0.50, }, + { 0.25, -0.25, 0.35, 0.40, -0.20, 0.40, }, + { 0.25, -0.45, 0.35, 0.40, -0.40, 0.40, }, + { 0.20, -0.40, 0.35, 0.25, -0.25, 0.40, }, + { 0.40, -0.40, 0.35, 0.45, -0.25, 0.40, }, + }, + }, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, 1/4, 1/2, 1/2, 1/2}, + }, + groups = {cracky=1}, }) minetest.register_node("homedecor:torch_wall", { - description = S("Wall Torch"), - drawtype = "nodebox", - tiles = { - "forniture_torch_wall_s.png", - "forniture_torch_wall_i.png", - { - name="forniture_torch_wall_anim.png", - animation={ - type="vertical_frames", - aspect_w=40, - aspect_h=40, - length=1.0, - }, - }, - }, - inventory_image="3dforniture_inv_torch_wall.png", - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.05, -0.45, 0.45, 0.05, -0.35, 0.50, }, - { -0.05, -0.35, 0.40, 0.05, -0.25, 0.50, }, - { -0.05, -0.25, 0.35, 0.05, -0.15, 0.45, }, - { -0.05, -0.15, 0.30, 0.05, -0.05, 0.40, }, - { -0.05, -0.05, 0.25, 0.05, 0.00, 0.35, }, - { -0.10, 0.00, 0.20, 0.10, 0.05, 0.40, }, - { -0.15, 0.05, 0.15, 0.15, 0.15, 0.45, }, - { -0.10, 0.15, 0.20, 0.10, 0.25, 0.40, }, - { -0.05, 0.25, 0.25, 0.05, 0.35, 0.35, }, - }, - }, - sunlight_propagates = true, - walkable = false, - light_source = 14, - selection_box = { - type = "fixed", - fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 }, - }, - groups = {cracky=2}, + description = S("Wall Torch"), + drawtype = "nodebox", + tiles = { + "forniture_torch_wall_s.png", + "forniture_torch_wall_i.png", + { + name="forniture_torch_wall_anim.png", + animation={ + type="vertical_frames", + aspect_w=40, + aspect_h=40, + length=1.0, + }, + }, + }, + inventory_image="3dforniture_inv_torch_wall.png", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + { -0.05, -0.45, 0.45, 0.05, -0.35, 0.50, }, + { -0.05, -0.35, 0.40, 0.05, -0.25, 0.50, }, + { -0.05, -0.25, 0.35, 0.05, -0.15, 0.45, }, + { -0.05, -0.15, 0.30, 0.05, -0.05, 0.40, }, + { -0.05, -0.05, 0.25, 0.05, 0.00, 0.35, }, + { -0.10, 0.00, 0.20, 0.10, 0.05, 0.40, }, + { -0.15, 0.05, 0.15, 0.15, 0.15, 0.45, }, + { -0.10, 0.15, 0.20, 0.10, 0.25, 0.40, }, + { -0.05, 0.25, 0.25, 0.05, 0.35, 0.35, }, + }, + }, + sunlight_propagates = true, + walkable = false, + light_source = 14, + selection_box = { + type = "fixed", + fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 }, + }, + groups = {cracky=2}, }) minetest.register_alias("3dforniture:bars", "homedecor:bars") diff --git a/homedecor/furniture_recipes.lua b/homedecor/furniture_recipes.lua index a01c6cda..dcaff59c 100644 --- a/homedecor/furniture_recipes.lua +++ b/homedecor/furniture_recipes.lua @@ -1,63 +1,63 @@ minetest.register_craft({ - output = "homedecor:table", "homedecor:chair 2", - recipe = { - { "group:wood","group:wood", "group:wood" }, - { "group:stick", "", "group:stick" }, - }, + output = "homedecor:table", "homedecor:chair 2", + recipe = { + { "group:wood","group:wood", "group:wood" }, + { "group:stick", "", "group:stick" }, + }, }) minetest.register_craft({ type = "shapeless", - output = "homedecor:table_mahogany", - recipe = { + output = "homedecor:table_mahogany", + recipe = { "homedecor:table", "dye:brown", - }, + }, }) minetest.register_craft({ type = "shapeless", - output = "homedecor:table_mahogany", - recipe = { + output = "homedecor:table_mahogany", + recipe = { "homedecor:table", "unifieddyes:dark_orange", - }, + }, }) minetest.register_craft({ type = "shapeless", - output = "homedecor:table_white", - recipe = { + output = "homedecor:table_white", + recipe = { "homedecor:table", "dye:white", - }, + }, }) minetest.register_craft({ - type = "fuel", - recipe = "homedecor:table", - burntime = 30, + type = "fuel", + recipe = "homedecor:table", + burntime = 30, }) minetest.register_craft({ - type = "fuel", - recipe = "homedecor:table_mahogany", - burntime = 30, + type = "fuel", + recipe = "homedecor:table_mahogany", + burntime = 30, }) minetest.register_craft({ - type = "fuel", - recipe = "homedecor:table_white", - burntime = 30, + type = "fuel", + recipe = "homedecor:table_white", + burntime = 30, }) minetest.register_craft({ output = "homedecor:chair 2", recipe = { - { "group:stick",""}, - { "group:wood","group:wood" }, - { "group:stick","group:stick" }, + { "group:stick",""}, + { "group:wood","group:wood" }, + { "group:stick","group:stick" }, }, }) @@ -98,26 +98,26 @@ for _, color in ipairs(chaircolors) do end minetest.register_craft({ - type = "fuel", - recipe = "homedecor:armchair", - burntime = 30, + type = "fuel", + recipe = "homedecor:armchair", + burntime = 30, }) minetest.register_craft({ output = "homedecor:table_lamp_off", recipe = { - {"default:paper","default:torch" ,"default:paper"}, - {"","group:stick",""}, - {"","stairs:slab_wood",""}, + {"default:paper","default:torch" ,"default:paper"}, + {"","group:stick",""}, + {"","stairs:slab_wood",""}, }, }) minetest.register_craft({ output = "homedecor:table_lamp_off", recipe = { - {"default:paper","default:torch" ,"default:paper"}, - {"","group:stick",""}, - {"","moreblocks:slab_wood",""}, + {"default:paper","default:torch" ,"default:paper"}, + {"","group:stick",""}, + {"","moreblocks:slab_wood",""}, }, }) @@ -131,9 +131,9 @@ minetest.register_craft({ }) minetest.register_craft({ - type = "fuel", - recipe = "homedecor:table_lamp_off", - burntime = 10, + type = "fuel", + recipe = "homedecor:table_lamp_off", + burntime = 10, }) local lamp_colors = { "blue", "green", "pink", "red", "violet" } @@ -143,18 +143,18 @@ for _, color in ipairs(lamp_colors) do minetest.register_craft({ output = "homedecor:table_lamp_"..color.."_off", recipe = { - {"wool:"..color,"default:torch" ,"wool:"..color}, - {"","group:stick",""}, - {"","stairs:slab_wood",""}, + {"wool:"..color,"default:torch" ,"wool:"..color}, + {"","group:stick",""}, + {"","stairs:slab_wood",""}, }, }) minetest.register_craft({ output = "homedecor:table_lamp_"..color.."_off", recipe = { - {"wool:"..color,"default:torch" ,"wool:"..color}, - {"","group:stick",""}, - {"","moreblocks:slab_wood",""}, + {"wool:"..color,"default:torch" ,"wool:"..color}, + {"","group:stick",""}, + {"","moreblocks:slab_wood",""}, }, }) @@ -176,9 +176,9 @@ for _, color in ipairs(lamp_colors) do minetest.register_craft({ output = "homedecor:standing_lamp_bottom_"..color.."_off", recipe = { - {"homedecor:table_lamp_"..color.."_off"}, - {"group:stick"}, - {"group:stick"}, + {"homedecor:table_lamp_"..color.."_off"}, + {"group:stick"}, + {"group:stick"}, }, }) @@ -194,62 +194,62 @@ for _, color in ipairs(lamp_colors) do end minetest.register_craft({ - output = "homedecor:toilet", - recipe = { - {"","","bucket:bucket_water"}, - { "building_blocks:Marble","building_blocks:Marble", "building_blocks:Marble" }, - { "", "bucket:bucket_empty", "" }, - }, + output = "homedecor:toilet", + recipe = { + {"","","bucket:bucket_water"}, + { "building_blocks:Marble","building_blocks:Marble", "building_blocks:Marble" }, + { "", "bucket:bucket_empty", "" }, + }, }) minetest.register_craft({ - output = "homedecor:sink", - recipe = { - { "building_blocks:Marble","bucket:bucket_empty", "building_blocks:Marble" }, - }, + output = "homedecor:sink", + recipe = { + { "building_blocks:Marble","bucket:bucket_empty", "building_blocks:Marble" }, + }, }) minetest.register_craft({ - output = "homedecor:taps", - recipe = { - { "default:steel_ingot","bucket:bucket_water", "default:steel_ingot" }, - }, + output = "homedecor:taps", + recipe = { + { "default:steel_ingot","bucket:bucket_water", "default:steel_ingot" }, + }, }) minetest.register_craft({ - output = "homedecor:shower_tray", - recipe = { - { "building_blocks:Marble","bucket:bucket_water", "building_blocks:Marble" }, - }, + output = "homedecor:shower_tray", + recipe = { + { "building_blocks:Marble","bucket:bucket_water", "building_blocks:Marble" }, + }, }) minetest.register_craft({ - output = "homedecor:shower_head", - recipe = { - {"default:steel_ingot", "bucket:bucket_water"}, - }, + output = "homedecor:shower_head", + recipe = { + {"default:steel_ingot", "bucket:bucket_water"}, + }, }) minetest.register_craft({ - output = "homedecor:bars 6", - recipe = { - { "default:steel_ingot","default:steel_ingot","default:steel_ingot" }, - { "homedecor:pole_wrought_iron","homedecor:pole_wrought_iron","homedecor:pole_wrought_iron" }, - }, + output = "homedecor:bars 6", + recipe = { + { "default:steel_ingot","default:steel_ingot","default:steel_ingot" }, + { "homedecor:pole_wrought_iron","homedecor:pole_wrought_iron","homedecor:pole_wrought_iron" }, + }, }) minetest.register_craft({ - output = "homedecor:L_binding_bars 3", - recipe = { - { "homedecor:bars","" }, - { "homedecor:bars","homedecor:bars" }, - }, + output = "homedecor:L_binding_bars 3", + recipe = { + { "homedecor:bars","" }, + { "homedecor:bars","homedecor:bars" }, + }, }) minetest.register_craft({ - output = "homedecor:torch_wall 10", - recipe = { - { "default:coal_lump" }, - { "default:steel_ingot" }, - }, + output = "homedecor:torch_wall 10", + recipe = { + { "default:coal_lump" }, + { "default:steel_ingot" }, + }, }) diff --git a/homedecor/init.lua b/homedecor/init.lua index f4bbd0d6..8a37595b 100644 --- a/homedecor/init.lua +++ b/homedecor/init.lua @@ -46,15 +46,15 @@ end --table copy function homedecor.table_copy(t) - local nt = { }; - for k, v in pairs(t) do - if type(v) == "table" then - nt[k] = homedecor.table_copy(v) - else - nt[k] = v - end - end - return nt + local nt = { }; + for k, v in pairs(t) do + if type(v) == "table" then + nt[k] = homedecor.table_copy(v) + else + nt[k] = v + end + end + return nt end -- Determine if the item being pointed at is the underside of a node (e.g a ceiling) @@ -154,6 +154,4 @@ dofile(homedecor.modpath.."/cobweb.lua") dofile(homedecor.modpath.."/locked.lua") - - print("[HomeDecor] "..S("Loaded!")) diff --git a/homedecor/kitchen_cabinet.lua b/homedecor/kitchen_cabinet.lua index 5b1b7c88..dc00b060 100644 --- a/homedecor/kitchen_cabinet.lua +++ b/homedecor/kitchen_cabinet.lua @@ -44,8 +44,8 @@ homedecor.register("kitchen_cabinet_half", { 'homedecor_kitchen_cabinet_front_half.png'}, sunlight_propagates = false, walkable = true, - selection_box = kitchen_cabinet_half_box, - node_box = kitchen_cabinet_half_box, + selection_box = kitchen_cabinet_half_box, + node_box = kitchen_cabinet_half_box, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), infotext=S("Kitchen Cabinet"), diff --git a/homedecor/lighting.lua b/homedecor/lighting.lua index 38cb0770..bd4ce63d 100644 --- a/homedecor/lighting.lua +++ b/homedecor/lighting.lua @@ -65,9 +65,9 @@ local glowlight_nodebox = { half = homedecor.nodebox.slab_y(1/2), quarter = homedecor.nodebox.slab_y(1/4), small_cube = { - type = "fixed", - fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } - }, + type = "fixed", + fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } + }, } -- Yellow @@ -83,8 +83,8 @@ minetest.register_node('homedecor:glowlight_half_yellow', { 'homedecor_glowlight_thick_yellow_sides.png', 'homedecor_glowlight_thick_yellow_sides.png' }, - selection_box = glowlight_nodebox.half, - node_box = glowlight_nodebox.half, + selection_box = glowlight_nodebox.half, + node_box = glowlight_nodebox.half, sunlight_propagates = false, paramtype = "light", paramtype2 = "facedir", @@ -106,8 +106,8 @@ minetest.register_node('homedecor:glowlight_quarter_yellow', { 'homedecor_glowlight_thin_yellow_sides.png', 'homedecor_glowlight_thin_yellow_sides.png' }, - selection_box = glowlight_nodebox.quarter, - node_box = glowlight_nodebox.quarter, + selection_box = glowlight_nodebox.quarter, + node_box = glowlight_nodebox.quarter, sunlight_propagates = false, paramtype = "light", paramtype2 = "facedir", @@ -131,8 +131,8 @@ minetest.register_node('homedecor:glowlight_half_white', { 'homedecor_glowlight_thick_white_sides.png', 'homedecor_glowlight_thick_white_sides.png' }, - selection_box = glowlight_nodebox.half, - node_box = glowlight_nodebox.half, + selection_box = glowlight_nodebox.half, + node_box = glowlight_nodebox.half, sunlight_propagates = false, paramtype = "light", paramtype2 = "facedir", @@ -154,8 +154,8 @@ minetest.register_node('homedecor:glowlight_quarter_white', { 'homedecor_glowlight_thin_white_sides.png', 'homedecor_glowlight_thin_white_sides.png' }, - selection_box = glowlight_nodebox.quarter, - node_box = glowlight_nodebox.quarter, + selection_box = glowlight_nodebox.quarter, + node_box = glowlight_nodebox.quarter, sunlight_propagates = false, paramtype = "light", paramtype2 = "facedir", @@ -179,8 +179,8 @@ minetest.register_node('homedecor:glowlight_small_cube_yellow', { 'homedecor_glowlight_cube_yellow_sides.png', 'homedecor_glowlight_cube_yellow_sides.png' }, - selection_box = glowlight_nodebox.small_cube, - node_box = glowlight_nodebox.small_cube, + selection_box = glowlight_nodebox.small_cube, + node_box = glowlight_nodebox.small_cube, sunlight_propagates = false, paramtype = "light", paramtype2 = "facedir", @@ -202,8 +202,8 @@ minetest.register_node('homedecor:glowlight_small_cube_white', { 'homedecor_glowlight_cube_white_sides.png', 'homedecor_glowlight_cube_white_sides.png' }, - selection_box = glowlight_nodebox.small_cube, - node_box = glowlight_nodebox.small_cube, + selection_box = glowlight_nodebox.small_cube, + node_box = glowlight_nodebox.small_cube, sunlight_propagates = false, paramtype = "light", paramtype2 = "facedir", @@ -243,20 +243,20 @@ minetest.register_node('homedecor:candle', { 'homedecor_candle_top.png', {name="homedecor_candle_sides.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}, }, - node_box = { - type = "fixed", - fixed = { - { -0.125, -0.5, -0.125, 0.125, 0, 0.125 }, - { -0.125, 0, 0, 0.125, 0.5, 0 }, - { 0, 0, -0.125, 0, 0.5, 0.125 } - } - }, - selection_box = { - type = "fixed", - fixed = { - { -0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875 }, - } - }, + node_box = { + type = "fixed", + fixed = { + { -0.125, -0.5, -0.125, 0.125, 0, 0.125 }, + { -0.125, 0, 0, 0.125, 0.5, 0 }, + { 0, 0, -0.125, 0, 0.5, 0.125 } + } + }, + selection_box = { + type = "fixed", + fixed = { + { -0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875 }, + } + }, sunlight_propagates = true, paramtype = "light", paramtype2 = "facedir", @@ -273,12 +273,12 @@ minetest.register_node('homedecor:candle_thin', { tiles = { {name="homedecor_candle.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.0}}, }, - selection_box = { - type = "fixed", - fixed = { - { -0.1, -0.5, -0.1, 0.125, 0.05, 0.125 }, - } - }, + selection_box = { + type = "fixed", + fixed = { + { -0.1, -0.5, -0.1, 0.125, 0.05, 0.125 }, + } + }, sunlight_propagates = true, paramtype = "light", paramtype2 = "facedir", @@ -296,12 +296,12 @@ minetest.register_node('homedecor:oil_lamp', { paramtype = "light", paramtype2 = "facedir", walkable = true, - selection_box = { - type = "fixed", - fixed = { - { -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 }, - } - }, + selection_box = { + type = "fixed", + fixed = { + { -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 }, + } + }, groups = { snappy = 3 }, light_source = LIGHT_MAX-4, sounds = default.node_sound_wood_defaults(), @@ -316,12 +316,12 @@ minetest.register_node('homedecor:wall_lantern', { paramtype = "light", paramtype2 = "facedir", walkable = true, - selection_box = { - type = "fixed", - fixed = { - { -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 }, - } - }, + selection_box = { + type = "fixed", + fixed = { + { -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 }, + } + }, groups = { snappy = 3 }, light_source = LIGHT_MAX-4, sounds = default.node_sound_wood_defaults(), @@ -346,14 +346,14 @@ minetest.register_node('homedecor:lattice_lantern_small', { 'homedecor_lattice_lantern_small_tb.png', 'homedecor_lattice_lantern_small_sides.png' }, - selection_box = { - type = "fixed", - fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } - }, - node_box = { - type = "fixed", - fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } - }, + selection_box = { + type = "fixed", + fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } + }, + node_box = { + type = "fixed", + fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } + }, sunlight_propagates = false, paramtype = "light", paramtype2 = "facedir", diff --git a/homedecor/locked.lua b/homedecor/locked.lua index 7476c01a..738d3be4 100644 --- a/homedecor/locked.lua +++ b/homedecor/locked.lua @@ -33,129 +33,129 @@ local S = homedecor.gettext | The ABM for the locked oven is defined in oven.lua. ]] local function create_locked ( name, infotext ) - local def = { } - for k, v in pairs(minetest.registered_nodes[name]) do - def[k] = v - end - def.type = nil - def.name = nil - def.description = S("%s (Locked)"):format(def.description) - local after_place_node = def.after_place_node - def.after_place_node = function(pos, placer) - local meta = minetest.get_meta(pos) - meta:set_string("owner", placer:get_player_name() or "") - meta:set_string("infotext", S("%s (owned by %s)"):format(infotext,meta:get_string("owner"))) - if (after_place_node) then - return after_place_node(pos, placer) - end - end - local allow_metadata_inventory_move = def.allow_metadata_inventory_move; + local def = { } + for k, v in pairs(minetest.registered_nodes[name]) do + def[k] = v + end + def.type = nil + def.name = nil + def.description = S("%s (Locked)"):format(def.description) + local after_place_node = def.after_place_node + def.after_place_node = function(pos, placer) + local meta = minetest.get_meta(pos) + meta:set_string("owner", placer:get_player_name() or "") + meta:set_string("infotext", S("%s (owned by %s)"):format(infotext,meta:get_string("owner"))) + if (after_place_node) then + return after_place_node(pos, placer) + end + end + local allow_metadata_inventory_move = def.allow_metadata_inventory_move; def.allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) local meta = minetest.get_meta(pos) - if (player:get_player_name() ~= meta:get_string("owner")) then - minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format( - player:get_player_name(), - infotext, - meta:get_string("owner"), - minetest.pos_to_string(pos) - )) + if (player:get_player_name() ~= meta:get_string("owner")) then + minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format( + player:get_player_name(), + infotext, + meta:get_string("owner"), + minetest.pos_to_string(pos) + )) return 0 end if (allow_metadata_inventory_move) then - return allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) + return allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) else - return count - end + return count + end end local allow_metadata_inventory_put = def.allow_metadata_inventory_put; - def.allow_metadata_inventory_put = function(pos, listname, index, stack, player) - local meta = minetest.get_meta(pos) - if (player:get_player_name() ~= meta:get_string("owner")) then - minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format( - player:get_player_name(), - infotext, - meta:get_string("owner"), - minetest.pos_to_string(pos) - )) - return 0 - end - if (allow_metadata_inventory_put) then - return allow_metadata_inventory_put(pos, listname, index, stack, player) - else - return stack:get_count() - end - end - local allow_metadata_inventory_take = def.allow_metadata_inventory_take; - def.allow_metadata_inventory_take = function(pos, listname, index, stack, player) - local meta = minetest.get_meta(pos) - if (player:get_player_name() ~= meta:get_string("owner")) then - minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format( - player:get_player_name(), - infotext, - meta:get_string("owner"), - minetest.pos_to_string(pos) - )) - return 0 - end - if (allow_metadata_inventory_take) then - return allow_metadata_inventory_take(pos, listname, index, stack, player) - else - return stack:get_count() - end - end - minetest.register_node(name.."_locked", def) - minetest.register_craft({ - output = name.."_locked", - type = "shapeless", - recipe = { - name, - "default:steel_ingot", - } - }) + def.allow_metadata_inventory_put = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if (player:get_player_name() ~= meta:get_string("owner")) then + minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format( + player:get_player_name(), + infotext, + meta:get_string("owner"), + minetest.pos_to_string(pos) + )) + return 0 + end + if (allow_metadata_inventory_put) then + return allow_metadata_inventory_put(pos, listname, index, stack, player) + else + return stack:get_count() + end + end + local allow_metadata_inventory_take = def.allow_metadata_inventory_take; + def.allow_metadata_inventory_take = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if (player:get_player_name() ~= meta:get_string("owner")) then + minetest.log("action", S("%s tried to access a %s belonging to %s at %s"):format( + player:get_player_name(), + infotext, + meta:get_string("owner"), + minetest.pos_to_string(pos) + )) + return 0 + end + if (allow_metadata_inventory_take) then + return allow_metadata_inventory_take(pos, listname, index, stack, player) + else + return stack:get_count() + end + end + minetest.register_node(name.."_locked", def) + minetest.register_craft({ + output = name.."_locked", + type = "shapeless", + recipe = { + name, + "default:steel_ingot", + } + }) end local items = { - { "refrigerator_white_bottom", - "Refrigerator" }, - { "refrigerator_steel_bottom", - "Refrigerator (stainless steel)" }, - { "kitchen_cabinet", - "Cabinet" }, - { "kitchen_cabinet_steel", - "Cabinet (stainless steel top)" }, - { "kitchen_cabinet_granite", - "Cabinet (granite top)" }, - { "kitchen_cabinet_marble", - "Cabinet (marble top)" }, - { "kitchen_cabinet_half", - "Cabinet" }, - { "kitchen_cabinet_with_sink", - "Cabinet" }, - { "nightstand_oak_one_drawer", - "Nightstand" }, - { "nightstand_oak_two_drawers", - "Nightstand" }, - { "nightstand_mahogany_one_drawer", - "Nightstand" }, - { "nightstand_mahogany_two_drawers", - "Nightstand" }, - { "filing_cabinet", - "Filing cabinet" }, - { "oven", - "Oven" }, - { "oven_active", - "Oven (active)" }, - { "oven_steel", - "Oven (stainless steel)" }, - { "oven_steel_active", - "Oven (stainless steel, active)" }, - { "microwave_oven", - "Microwave Oven" }, - { "microwave_oven_active", - "Microwave Oven (active)" }, + { "refrigerator_white_bottom", + "Refrigerator" }, + { "refrigerator_steel_bottom", + "Refrigerator (stainless steel)" }, + { "kitchen_cabinet", + "Cabinet" }, + { "kitchen_cabinet_steel", + "Cabinet (stainless steel top)" }, + { "kitchen_cabinet_granite", + "Cabinet (granite top)" }, + { "kitchen_cabinet_marble", + "Cabinet (marble top)" }, + { "kitchen_cabinet_half", + "Cabinet" }, + { "kitchen_cabinet_with_sink", + "Cabinet" }, + { "nightstand_oak_one_drawer", + "Nightstand" }, + { "nightstand_oak_two_drawers", + "Nightstand" }, + { "nightstand_mahogany_one_drawer", + "Nightstand" }, + { "nightstand_mahogany_two_drawers", + "Nightstand" }, + { "filing_cabinet", + "Filing cabinet" }, + { "oven", + "Oven" }, + { "oven_active", + "Oven (active)" }, + { "oven_steel", + "Oven (stainless steel)" }, + { "oven_steel_active", + "Oven (stainless steel, active)" }, + { "microwave_oven", + "Microwave Oven" }, + { "microwave_oven_active", + "Microwave Oven (active)" }, } for _,item in ipairs(items) do - local name, info = item[1], item[2]; - create_locked("homedecor:"..name, S("Locked "..info)); + local name, info = item[1], item[2]; + create_locked("homedecor:"..name, S("Locked "..info)); end diff --git a/homedecor/nightstands.lua b/homedecor/nightstands.lua index 4d41bbab..e5a2acd6 100644 --- a/homedecor/nightstands.lua +++ b/homedecor/nightstands.lua @@ -12,9 +12,9 @@ homedecor.register("nightstand_oak_one_drawer", { 'homedecor_nightstand_oak_1_drawer_front.png'}, sunlight_propagates = false, walkable = true, - selection_box = { type = "regular" }, - node_box = { - type = "fixed", + selection_box = { type = "regular" }, + 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 @@ -23,7 +23,7 @@ homedecor.register("nightstand_oak_one_drawer", { { -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(), infotext=S("One-drawer Nightstand"), @@ -45,16 +45,16 @@ homedecor.register("nightstand_oak_two_drawers", { paramtype = "light", paramtype2 = "facedir", walkable = true, - selection_box = { type = "regular" }, - node_box = { - type = "fixed", + selection_box = { type = "regular" }, + 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(), infotext=S("Two-drawer Nightstand"), @@ -73,9 +73,9 @@ homedecor.register("nightstand_mahogany_one_drawer", { 'homedecor_nightstand_mahogany_1_drawer_front.png'}, sunlight_propagates = false, walkable = true, - selection_box = { type = "regular" }, - node_box = { - type = "fixed", + selection_box = { type = "regular" }, + 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 @@ -84,7 +84,7 @@ homedecor.register("nightstand_mahogany_one_drawer", { { -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(), infotext=S("One-drawer Nightstand"), @@ -103,16 +103,16 @@ homedecor.register("nightstand_mahogany_two_drawers", { 'homedecor_nightstand_mahogany_2_drawer_front.png'}, sunlight_propagates = false, walkable = true, - selection_box = { type = "regular" }, - node_box = { - type = "fixed", + selection_box = { type = "regular" }, + 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(), infotext=S("Two-drawer Nightstand"), diff --git a/homedecor/slopes.lua b/homedecor/slopes.lua index fdb62659..ec13a550 100644 --- a/homedecor/slopes.lua +++ b/homedecor/slopes.lua @@ -177,20 +177,20 @@ minetest.register_craft( { }) minetest.register_craft({ - type = "fuel", - recipe = "homedecor:shingle_inner_corner_wood", - burntime = 30, + type = "fuel", + recipe = "homedecor:shingle_inner_corner_wood", + burntime = 30, }) minetest.register_craft({ - type = "fuel", - recipe = "homedecor:shingle_outer_corner_wood", - burntime = 30, + type = "fuel", + recipe = "homedecor:shingle_outer_corner_wood", + burntime = 30, }) minetest.register_craft({ - type = "fuel", - recipe = "homedecor:shingle_side_wood", + type = "fuel", + recipe = "homedecor:shingle_side_wood", burntime = 30, }) diff --git a/homedecor/tables.lua b/homedecor/tables.lua index cb4297b4..b17944a3 100644 --- a/homedecor/tables.lua +++ b/homedecor/tables.lua @@ -163,7 +163,7 @@ minetest.register_node('homedecor:utility_table_top', { wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 }, wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 }, }, - selection_box = { + selection_box = { type = "wallmounted", wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 }, wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 }, @@ -174,34 +174,34 @@ minetest.register_node('homedecor:utility_table_top', { -- Various kinds of table legs minetest.register_node("homedecor:table_legs_brass", { - description = S("Brass Table Legs"), - drawtype = "plantlike", - tiles = {"homedecor_table_legs_brass.png"}, - inventory_image = "homedecor_table_legs_brass.png", - wield_image = "homedecor_table_legs_brass.png", - paramtype = "light", - walkable = false, - groups = {snappy=3}, - sounds = default.node_sound_leaves_defaults(), + description = S("Brass Table Legs"), + drawtype = "plantlike", + tiles = {"homedecor_table_legs_brass.png"}, + inventory_image = "homedecor_table_legs_brass.png", + wield_image = "homedecor_table_legs_brass.png", + paramtype = "light", + walkable = false, + groups = {snappy=3}, + sounds = default.node_sound_leaves_defaults(), walkable = true, - selection_box = { + selection_box = { type = "fixed", fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 } }, }) minetest.register_node("homedecor:table_legs_wrought_iron", { - description = S("Wrought Iron Table Legs"), - drawtype = "plantlike", - tiles = {"homedecor_table_legs_wrought_iron.png"}, - inventory_image = "homedecor_table_legs_wrought_iron.png", - wield_image = "homedecor_table_legs_wrought_iron.png", - paramtype = "light", - walkable = false, - groups = {snappy=3}, - sounds = default.node_sound_leaves_defaults(), + description = S("Wrought Iron Table Legs"), + drawtype = "plantlike", + tiles = {"homedecor_table_legs_wrought_iron.png"}, + inventory_image = "homedecor_table_legs_wrought_iron.png", + wield_image = "homedecor_table_legs_wrought_iron.png", + paramtype = "light", + walkable = false, + groups = {snappy=3}, + sounds = default.node_sound_leaves_defaults(), walkable = true, - selection_box = { + selection_box = { type = "fixed", fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 } }, @@ -218,7 +218,7 @@ minetest.register_node('homedecor:utility_table_legs', { walkable = false, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), - selection_box = { + selection_box = { type = "fixed", fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 } }, diff --git a/homedecor/window_treatments.lua b/homedecor/window_treatments.lua index 49bbd8cf..4c16f7fd 100644 --- a/homedecor/window_treatments.lua +++ b/homedecor/window_treatments.lua @@ -265,7 +265,7 @@ minetest.register_node("homedecor:window_flowerbox", { node_box = { type = "fixed", fixed = { - {-0.375, 0.25, -0.125, 0.375, 0.5, 0.375}, -- NodeBox1 + {-0.375, 0.25, -0.125, 0.375, 0.5, 0.375}, -- NodeBox1 {-0.3125, 0.4375, 0.375, -0.25, 0.4875, 0.5}, -- NodeBox2 {0.25, 0.4375, 0.375, 0.3125, 0.4875, 0.5}, -- NodeBox3 }