diff --git a/fences.lua b/fences.lua index c979a5d7..593ad111 100644 --- a/fences.lua +++ b/fences.lua @@ -35,9 +35,16 @@ minetest.register_node("homedecor:fence_wrought_iron", { }) minetest.register_node("homedecor:fence_picket", { - drawtype = "signlike", + drawtype = "nodebox", description = "Unpainted Picket Fence", - tiles = {"homedecor_fence_picket.png"}, + tiles = { + "homedecor_fence_picket.png", + "homedecor_fence_picket.png", + "homedecor_fence_picket.png", + "homedecor_fence_picket.png", + "homedecor_fence_picket_backside.png", + "homedecor_fence_picket.png" + }, inventory_image = "homedecor_fence_picket.png", wield_image = "homedecor_fence_picket.png", paramtype = "light", @@ -45,16 +52,28 @@ minetest.register_node("homedecor:fence_picket", { groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), walkable = true, - paramtype2 = 'wallmounted', - selection_box = { - type = "wallmounted", - }, + 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.495, 0.5, 0.5, 0.495 } + }, }) minetest.register_node("homedecor:fence_picket_white", { - drawtype = "signlike", + drawtype = "nodebox", description = "White Picket Fence", - tiles = {"homedecor_fence_picket_white.png"}, + tiles = { + "homedecor_fence_picket_white.png", + "homedecor_fence_picket_white.png", + "homedecor_fence_picket_white.png", + "homedecor_fence_picket_white.png", + "homedecor_fence_picket_white_backside.png", + "homedecor_fence_picket_white.png" + }, inventory_image = "homedecor_fence_picket_white.png", wield_image = "homedecor_fence_picket_white.png", paramtype = "light", @@ -62,43 +81,70 @@ minetest.register_node("homedecor:fence_picket_white", { groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), walkable = true, - paramtype2 = 'wallmounted', - selection_box = { - type = "wallmounted", - }, + 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.495, 0.5, 0.5, 0.495 } + }, }) minetest.register_node("homedecor:fence_privacy", { - drawtype = "signlike", + drawtype = "nodebox", description = "Wooden Privacy Fence", - tiles = {"homedecor_fence_privacy.png"}, - inventory_image = "homedecor_fence_privacy.png", - wield_image = "homedecor_fence_privacy.png", + tiles = { + "homedecor_fence_privacy_tb.png", + "homedecor_fence_privacy_tb.png", + "homedecor_fence_privacy_sides.png", + "homedecor_fence_privacy_sides.png", + "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(), walkable = true, - paramtype2 = 'wallmounted', - selection_box = { - type = "wallmounted", - }, + paramtype2 = "facedir", + 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_barbed_wire", { - drawtype = "signlike", + drawtype = "nodebox", description = "Barbed Wire Fence", tiles = {"homedecor_fence_barbed_wire.png"}, - inventory_image = "homedecor_fence_barbed_wire.png", - wield_image = "homedecor_fence_barbed_wire.png", paramtype = "light", is_ground_content = true, groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), walkable = true, - paramtype2 = 'wallmounted', - selection_box = { - type = "wallmounted", - }, + paramtype2 = "facedir", + 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 + } + }, }) diff --git a/textures/homedecor_fence_barbed_wire.png b/textures/homedecor_fence_barbed_wire.png index be1ff1b5..ae649533 100644 Binary files a/textures/homedecor_fence_barbed_wire.png and b/textures/homedecor_fence_barbed_wire.png differ diff --git a/textures/homedecor_fence_picket.png b/textures/homedecor_fence_picket.png index b87ce73d..52c94dc6 100644 Binary files a/textures/homedecor_fence_picket.png and b/textures/homedecor_fence_picket.png differ diff --git a/textures/homedecor_fence_picket_backside.png b/textures/homedecor_fence_picket_backside.png new file mode 100644 index 00000000..9dc83994 Binary files /dev/null and b/textures/homedecor_fence_picket_backside.png differ diff --git a/textures/homedecor_fence_picket_white.png b/textures/homedecor_fence_picket_white.png index 97a40816..0752ed96 100644 Binary files a/textures/homedecor_fence_picket_white.png and b/textures/homedecor_fence_picket_white.png differ diff --git a/textures/homedecor_fence_picket_white_backside.png b/textures/homedecor_fence_picket_white_backside.png new file mode 100644 index 00000000..fe0cf7d7 Binary files /dev/null and b/textures/homedecor_fence_picket_white_backside.png differ diff --git a/textures/homedecor_fence_privacy_backside.png b/textures/homedecor_fence_privacy_backside.png new file mode 100644 index 00000000..12b9574a Binary files /dev/null and b/textures/homedecor_fence_privacy_backside.png differ diff --git a/textures/homedecor_fence_privacy_front.png b/textures/homedecor_fence_privacy_front.png new file mode 100644 index 00000000..08040950 Binary files /dev/null and b/textures/homedecor_fence_privacy_front.png differ diff --git a/textures/homedecor_fence_privacy_sides.png b/textures/homedecor_fence_privacy_sides.png new file mode 100644 index 00000000..f6b2ff81 Binary files /dev/null and b/textures/homedecor_fence_privacy_sides.png differ diff --git a/textures/homedecor_fence_privacy_tb.png b/textures/homedecor_fence_privacy_tb.png new file mode 100644 index 00000000..73812fac Binary files /dev/null and b/textures/homedecor_fence_privacy_tb.png differ