diff --git a/homedecor/fences.lua b/homedecor/fences.lua index 3a129edb..8e548132 100644 --- a/homedecor/fences.lua +++ b/homedecor/fences.lua @@ -50,23 +50,11 @@ minetest.register_node("homedecor:fence_brass_with_sign", { wield_image = "homedecor_sign_brass_post.png", paramtype = "light", paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }, - { -0.45, -0.1875, -0.225, 0.45, 0.4375, -0.125 }, - } - }, - selection_box = { - type = "fixed", - fixed = { - { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }, - { -0.45, -0.1875, -0.225, 0.45, 0.4375, -0.125 }, - } - }, + node_box = signs_lib.sign_post_model, groups = {snappy=3,not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), walkable = true, + sunlight_propagates = true, drop = { max_items = 2, items = { @@ -90,23 +78,11 @@ minetest.register_node("homedecor:fence_wrought_iron_with_sign", { wield_image = "homedecor_sign_wrought_iron_post.png", paramtype = "light", paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }, - { -0.45, -0.1875, -0.225, 0.45, 0.4375, -0.125 }, - } - }, - selection_box = { - type = "fixed", - fixed = { - { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }, - { -0.45, -0.1875, -0.225, 0.45, 0.4375, -0.125 }, - } - }, + node_box = signs_lib.sign_post_model, groups = {snappy=3,not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), walkable = true, + sunlight_propagates = true, drop = { max_items = 2, items = { diff --git a/homedecor/textures/homedecor_sign_brass_post_back.png b/homedecor/textures/homedecor_sign_brass_post_back.png index 76d72040..836fa6f3 100644 Binary files a/homedecor/textures/homedecor_sign_brass_post_back.png and b/homedecor/textures/homedecor_sign_brass_post_back.png differ diff --git a/homedecor/textures/homedecor_sign_brass_post_bottom.png b/homedecor/textures/homedecor_sign_brass_post_bottom.png index 4384e527..9f3060a4 100644 Binary files a/homedecor/textures/homedecor_sign_brass_post_bottom.png and b/homedecor/textures/homedecor_sign_brass_post_bottom.png differ diff --git a/homedecor/textures/homedecor_sign_brass_post_front.png b/homedecor/textures/homedecor_sign_brass_post_front.png index 8054d31b..bbceb03e 100644 Binary files a/homedecor/textures/homedecor_sign_brass_post_front.png and b/homedecor/textures/homedecor_sign_brass_post_front.png differ diff --git a/homedecor/textures/homedecor_sign_brass_post_side.png b/homedecor/textures/homedecor_sign_brass_post_side.png index cc5f477f..88bb78bb 100644 Binary files a/homedecor/textures/homedecor_sign_brass_post_side.png and b/homedecor/textures/homedecor_sign_brass_post_side.png differ diff --git a/homedecor/textures/homedecor_sign_brass_post_top.png b/homedecor/textures/homedecor_sign_brass_post_top.png index 4384e527..70079f21 100644 Binary files a/homedecor/textures/homedecor_sign_brass_post_top.png and b/homedecor/textures/homedecor_sign_brass_post_top.png differ diff --git a/homedecor/textures/homedecor_sign_wrought_iron_post_back.png b/homedecor/textures/homedecor_sign_wrought_iron_post_back.png index 4efb4693..737b1746 100644 Binary files a/homedecor/textures/homedecor_sign_wrought_iron_post_back.png and b/homedecor/textures/homedecor_sign_wrought_iron_post_back.png differ diff --git a/homedecor/textures/homedecor_sign_wrought_iron_post_bottom.png b/homedecor/textures/homedecor_sign_wrought_iron_post_bottom.png index 3b40182f..6e377224 100644 Binary files a/homedecor/textures/homedecor_sign_wrought_iron_post_bottom.png and b/homedecor/textures/homedecor_sign_wrought_iron_post_bottom.png differ diff --git a/homedecor/textures/homedecor_sign_wrought_iron_post_front.png b/homedecor/textures/homedecor_sign_wrought_iron_post_front.png index 021e7d5f..a1575a0c 100644 Binary files a/homedecor/textures/homedecor_sign_wrought_iron_post_front.png and b/homedecor/textures/homedecor_sign_wrought_iron_post_front.png differ diff --git a/homedecor/textures/homedecor_sign_wrought_iron_post_side.png b/homedecor/textures/homedecor_sign_wrought_iron_post_side.png index 44940797..3e99b568 100644 Binary files a/homedecor/textures/homedecor_sign_wrought_iron_post_side.png and b/homedecor/textures/homedecor_sign_wrought_iron_post_side.png differ diff --git a/homedecor/textures/homedecor_sign_wrought_iron_post_top.png b/homedecor/textures/homedecor_sign_wrought_iron_post_top.png index 3b40182f..95536f04 100644 Binary files a/homedecor/textures/homedecor_sign_wrought_iron_post_top.png and b/homedecor/textures/homedecor_sign_wrought_iron_post_top.png differ diff --git a/signs_lib/init.lua b/signs_lib/init.lua index f5ba9501..a5838b98 100644 --- a/signs_lib/init.lua +++ b/signs_lib/init.lua @@ -5,36 +5,65 @@ signs_lib = {} +signs_lib.modpath = minetest.get_modpath("signs_lib") +signs_lib.intllib_modpath = minetest.get_modpath("intllib") + signs_lib.wall_sign_text_pos = { - {delta = {x = 0, y = 0.15, z = 0.399}, yaw = 0}, - {delta = {x = 0.399, y = 0.15, z = 0 }, yaw = math.pi / -2}, - {delta = {x = 0, y = 0.15, z = -0.399}, yaw = math.pi}, - {delta = {x = -0.399, y = 0.15, z = 0 }, yaw = math.pi / 2}, + {delta = {x = 0, y = 0.07, z = 0.436}, yaw = 0}, + {delta = {x = 0.436, y = 0.07, z = 0 }, yaw = math.pi / -2}, + {delta = {x = 0, y = 0.07, z = -0.436}, yaw = math.pi}, + {delta = {x = -0.436, y = 0.07, z = 0 }, yaw = math.pi / 2}, } signs_lib.hanging_sign_text_pos = { - {delta = {x = 0, y = 0.032, z = -0.05}, yaw = 0}, - {delta = {x = -0.05, y = 0.032, z = 0 }, yaw = math.pi / -2}, - {delta = {x = 0, y = 0.032, z = 0.05}, yaw = math.pi}, - {delta = {x = 0.05, y = 0.032, z = 0 }, yaw = math.pi / 2}, + {delta = {x = 0, y = -0.02, z = -0.063}, yaw = 0}, + {delta = {x = -0.063, y = -0.02, z = 0 }, yaw = math.pi / -2}, + {delta = {x = 0, y = -0.02, z = 0.063}, yaw = math.pi}, + {delta = {x = 0.063, y = -0.02, z = 0 }, yaw = math.pi / 2}, } signs_lib.yard_sign_text_pos = { - {delta = {x = 0, y = 0.15, z = -0.05}, yaw = 0}, - {delta = {x = -0.05, y = 0.15, z = 0 }, yaw = math.pi / -2}, - {delta = {x = 0, y = 0.15, z = 0.05}, yaw = math.pi}, - {delta = {x = 0.05, y = 0.15, z = 0 }, yaw = math.pi / 2}, + {delta = {x = 0, y = 0.07, z = -0.063}, yaw = 0}, + {delta = {x = -0.063, y = 0.07, z = 0 }, yaw = math.pi / -2}, + {delta = {x = 0, y = 0.07, z = 0.063}, yaw = math.pi}, + {delta = {x = 0.063, y = 0.07, z = 0 }, yaw = math.pi / 2}, } signs_lib.sign_post_text_pos = { - {delta = {x = 0, y = 0.15, z = -0.226}, yaw = 0}, - {delta = {x = -0.226, y = 0.15, z = 0 }, yaw = math.pi / -2}, - {delta = {x = 0, y = 0.15, z = 0.226 }, yaw = math.pi}, - {delta = {x = 0.226, y = 0.15, z = 0 }, yaw = math.pi / 2}, + {delta = {x = 0, y = 0.07, z = -0.188}, yaw = 0}, + {delta = {x = -0.188, y = 0.07, z = 0 }, yaw = math.pi / -2}, + {delta = {x = 0, y = 0.07, z = 0.188 }, yaw = math.pi}, + {delta = {x = 0.188, y = 0.07, z = 0 }, yaw = math.pi / 2}, } -signs_lib.modpath = minetest.get_modpath("signs_lib") -signs_lib.intllib_modpath = minetest.get_modpath("intllib") +signs_lib.wall_sign_model = { + type = "fixed", + fixed = {-0.4375, -0.25, 0.4375, 0.4375, 0.375, 0.5} +} + +signs_lib.yard_sign_model = { + type = "fixed", + fixed = { + {-0.4375, -0.25, -0.0625, 0.4375, 0.375, 0}, + {-0.0625, -0.5, -0.0625, 0.0625, -0.1875, 0}, + } +} + +signs_lib.hanging_sign_model = { + type = "fixed", + fixed = { + {-0.4375, -0.3125, -0.0625, 0.4375, 0.3125, 0}, + {-0.4375, 0.25, -0.03125, 0.4375, 0.5, -0.03125}, + } +} + +signs_lib.sign_post_model = { + type = "fixed", + fixed = { + {-0.4375, -0.25, -0.1875, 0.4375, 0.375, -0.125}, + {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, + } +} local S if signs_lib.intllib_modpath then @@ -573,8 +602,7 @@ minetest.register_node(":default:sign_wall", { sunlight_propagates = true, paramtype2 = "facedir", drawtype = "nodebox", - node_box = {type = "fixed", fixed = {-0.45, -0.15, 0.4, 0.45, 0.45, 0.498}}, - selection_box = {type = "fixed", fixed = {-0.45, -0.15, 0.4, 0.45, 0.45, 0.498}}, + node_box = signs_lib.wall_sign_model, tiles = {"signs_top.png", "signs_bottom.png", "signs_side.png", "signs_side.png", "signs_back.png", "signs_front.png"}, groups = sign_groups, @@ -600,11 +628,11 @@ minetest.register_node(":signs:sign_yard", { sunlight_propagates = true, paramtype2 = "facedir", drawtype = "nodebox", - node_box = {type = "fixed", fixed = { - {-0.45, -0.15, -0.049, 0.45, 0.45, 0.049}, - {-0.05, -0.5, -0.049, 0.05, -0.15, 0.049} - }}, - selection_box = {type = "fixed", fixed = {-0.45, -0.15, -0.049, 0.45, 0.45, 0.049}}, + node_box = signs_lib.yard_sign_model, + selection_box = { + type = "fixed", + fixed = {-0.4375, -0.5, -0.0625, 0.4375, 0.375, 0} + }, tiles = {"signs_top.png", "signs_bottom.png", "signs_side.png", "signs_side.png", "signs_back.png", "signs_front.png"}, groups = {choppy=2, dig_immediate=2}, drop = "default:sign_wall", @@ -628,10 +656,7 @@ minetest.register_node(":signs:sign_hanging", { sunlight_propagates = true, paramtype2 = "facedir", drawtype = "nodebox", - node_box = {type = "fixed", fixed = { - {-0.45, 0.3124, 0, 0.45, 0.5, 0}, - {-0.45, -0.2875, -0.049, 0.45, 0.3125, 0.049} - }}, + node_box = signs_lib.hanging_sign_model, selection_box = { type = "fixed", fixed = {-0.45, -0.275, -0.049, 0.45, 0.5, 0.049} @@ -666,20 +691,7 @@ minetest.register_node(":signs:sign_post", { sunlight_propagates = true, paramtype2 = "facedir", drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }, - { -0.45, -0.15, -0.225, 0.45, 0.45, -0.125 }, - } - }, - selection_box = { - type = "fixed", - fixed = { - { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }, - { -0.45, -0.15, -0.225, 0.45, 0.45, -0.125 }, - } - }, + node_box = signs_lib.sign_post_model, tiles = { "signs_post_top.png", "signs_post_bottom.png", diff --git a/signs_lib/textures/default_sign_wall_green.png b/signs_lib/textures/default_sign_wall_green.png index cfe02919..dc95a918 100644 Binary files a/signs_lib/textures/default_sign_wall_green.png and b/signs_lib/textures/default_sign_wall_green.png differ diff --git a/signs_lib/textures/default_sign_wall_yellow.png b/signs_lib/textures/default_sign_wall_yellow.png index 3f05bb24..1b00c97d 100644 Binary files a/signs_lib/textures/default_sign_wall_yellow.png and b/signs_lib/textures/default_sign_wall_yellow.png differ diff --git a/signs_lib/textures/signs_back.png b/signs_lib/textures/signs_back.png index 8605da1c..88c810fc 100644 Binary files a/signs_lib/textures/signs_back.png and b/signs_lib/textures/signs_back.png differ diff --git a/signs_lib/textures/signs_back_metal.png b/signs_lib/textures/signs_back_metal.png index 3c86f32d..e11736e2 100644 Binary files a/signs_lib/textures/signs_back_metal.png and b/signs_lib/textures/signs_back_metal.png differ diff --git a/signs_lib/textures/signs_bottom.png b/signs_lib/textures/signs_bottom.png index a17f3932..edc6475a 100644 Binary files a/signs_lib/textures/signs_bottom.png and b/signs_lib/textures/signs_bottom.png differ diff --git a/signs_lib/textures/signs_bottom_green.png b/signs_lib/textures/signs_bottom_green.png index 8a6df9b1..3b7ea555 100644 Binary files a/signs_lib/textures/signs_bottom_green.png and b/signs_lib/textures/signs_bottom_green.png differ diff --git a/signs_lib/textures/signs_bottom_yellow.png b/signs_lib/textures/signs_bottom_yellow.png index e4432a4b..c2688d9a 100644 Binary files a/signs_lib/textures/signs_bottom_yellow.png and b/signs_lib/textures/signs_bottom_yellow.png differ diff --git a/signs_lib/textures/signs_front.png b/signs_lib/textures/signs_front.png index fe0d0cbd..e8c3b35c 100644 Binary files a/signs_lib/textures/signs_front.png and b/signs_lib/textures/signs_front.png differ diff --git a/signs_lib/textures/signs_front_green.png b/signs_lib/textures/signs_front_green.png index e70a04f8..c35d813a 100644 Binary files a/signs_lib/textures/signs_front_green.png and b/signs_lib/textures/signs_front_green.png differ diff --git a/signs_lib/textures/signs_front_yellow.png b/signs_lib/textures/signs_front_yellow.png index 68c98bcc..c2f7e104 100644 Binary files a/signs_lib/textures/signs_front_yellow.png and b/signs_lib/textures/signs_front_yellow.png differ diff --git a/signs_lib/textures/signs_hanging_back.png b/signs_lib/textures/signs_hanging_back.png index 9f52ff87..5e4ae064 100644 Binary files a/signs_lib/textures/signs_hanging_back.png and b/signs_lib/textures/signs_hanging_back.png differ diff --git a/signs_lib/textures/signs_hanging_bottom.png b/signs_lib/textures/signs_hanging_bottom.png index af5923ee..19732e4f 100644 Binary files a/signs_lib/textures/signs_hanging_bottom.png and b/signs_lib/textures/signs_hanging_bottom.png differ diff --git a/signs_lib/textures/signs_hanging_front.png b/signs_lib/textures/signs_hanging_front.png index 1d98fc64..836146c3 100644 Binary files a/signs_lib/textures/signs_hanging_front.png and b/signs_lib/textures/signs_hanging_front.png differ diff --git a/signs_lib/textures/signs_hanging_side.png b/signs_lib/textures/signs_hanging_side.png index a5098fbc..3f1f5393 100644 Binary files a/signs_lib/textures/signs_hanging_side.png and b/signs_lib/textures/signs_hanging_side.png differ diff --git a/signs_lib/textures/signs_hanging_top.png b/signs_lib/textures/signs_hanging_top.png index 29428825..8b0d423e 100644 Binary files a/signs_lib/textures/signs_hanging_top.png and b/signs_lib/textures/signs_hanging_top.png differ diff --git a/signs_lib/textures/signs_post_back.png b/signs_lib/textures/signs_post_back.png index 1e8a598f..8d409f5b 100644 Binary files a/signs_lib/textures/signs_post_back.png and b/signs_lib/textures/signs_post_back.png differ diff --git a/signs_lib/textures/signs_post_bottom.png b/signs_lib/textures/signs_post_bottom.png index 9c3b381d..507555ae 100644 Binary files a/signs_lib/textures/signs_post_bottom.png and b/signs_lib/textures/signs_post_bottom.png differ diff --git a/signs_lib/textures/signs_post_front.png b/signs_lib/textures/signs_post_front.png index caf43098..4bb95484 100644 Binary files a/signs_lib/textures/signs_post_front.png and b/signs_lib/textures/signs_post_front.png differ diff --git a/signs_lib/textures/signs_post_side.png b/signs_lib/textures/signs_post_side.png index 1f58673e..997bf7b8 100644 Binary files a/signs_lib/textures/signs_post_side.png and b/signs_lib/textures/signs_post_side.png differ diff --git a/signs_lib/textures/signs_post_top.png b/signs_lib/textures/signs_post_top.png index 0b26d62a..5d934fd7 100644 Binary files a/signs_lib/textures/signs_post_top.png and b/signs_lib/textures/signs_post_top.png differ diff --git a/signs_lib/textures/signs_side.png b/signs_lib/textures/signs_side.png index f3047e94..50fc15f9 100644 Binary files a/signs_lib/textures/signs_side.png and b/signs_lib/textures/signs_side.png differ diff --git a/signs_lib/textures/signs_side_green.png b/signs_lib/textures/signs_side_green.png index 789430f4..5ee632cb 100644 Binary files a/signs_lib/textures/signs_side_green.png and b/signs_lib/textures/signs_side_green.png differ diff --git a/signs_lib/textures/signs_side_yellow.png b/signs_lib/textures/signs_side_yellow.png index 0ec7387c..738afdc0 100644 Binary files a/signs_lib/textures/signs_side_yellow.png and b/signs_lib/textures/signs_side_yellow.png differ diff --git a/signs_lib/textures/signs_sign.png b/signs_lib/textures/signs_sign.png deleted file mode 100644 index cccbbfa7..00000000 Binary files a/signs_lib/textures/signs_sign.png and /dev/null differ diff --git a/signs_lib/textures/signs_top.png b/signs_lib/textures/signs_top.png index b090e70e..35b1d9bd 100644 Binary files a/signs_lib/textures/signs_top.png and b/signs_lib/textures/signs_top.png differ diff --git a/signs_lib/textures/signs_top_green.png b/signs_lib/textures/signs_top_green.png index 1a3f804d..7df77f91 100644 Binary files a/signs_lib/textures/signs_top_green.png and b/signs_lib/textures/signs_top_green.png differ diff --git a/signs_lib/textures/signs_top_yellow.png b/signs_lib/textures/signs_top_yellow.png index b01966f8..bbd6e8f0 100644 Binary files a/signs_lib/textures/signs_top_yellow.png and b/signs_lib/textures/signs_top_yellow.png differ