diff options
18 files changed, 97 insertions, 1 deletions
@@ -67,6 +67,19 @@ signs_lib.metal_wall_sign_model = { } } +signs_lib.subway_wall_sign_model = { + nodebox = { + type = "fixed", + fixed = {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5} + }, + textpos = { + {delta = {x = 0, y = 0.07, z = 0.43 }, yaw = 0}, + {delta = {x = 0.43, y = 0.07, z = 0 }, yaw = math.pi / -2}, + {delta = {x = 0, y = 0.07, z = -0.43 }, yaw = math.pi}, + {delta = {x = -0.43, y = 0.07, z = 0 }, yaw = math.pi / 2}, + } +} + signs_lib.yard_sign_model = { nodebox = { type = "fixed", @@ -529,7 +542,7 @@ signs_lib.update_sign = function(pos, fields, owner) sign_info = signs_lib.yard_sign_model.textpos[minetest.get_node(pos).param2 + 1] elseif signnode.name == "signs:sign_hanging" then sign_info = signs_lib.hanging_sign_model.textpos[minetest.get_node(pos).param2 + 1] - elseif string.find(signnode.name, "sign_wall") then + elseif string.find(signnode.name, "sign_wall") or string.find(signnode.name, "sign_subway") then if signnode.name == default_sign or signnode.name == default_sign_metal or signnode.name == "locked_sign:sign_wall_locked" then @@ -817,8 +830,16 @@ minetest.register_node(":locked_sign:sign_wall_locked", { on_rotate = signs_lib.wallmounted_rotate }) + +-- metal, colored signs + +local sign_colors = { "green", "yellow", "red", "white_red", +"white_black", "orange", "blue", "brown" , "blue_ahead", "blue_left", +"blue_right", "blue_bidi"} + -- default metal sign, if defined + if minetest.registered_nodes["default:sign_wall_steel"] then minetest.register_node(":"..default_sign_metal, { description = S("Sign"), @@ -851,6 +872,44 @@ if minetest.registered_nodes["default:sign_wall_steel"] then on_rotate = signs_lib.wallmounted_rotate }) end +local line_cols = {"red","cyan","blue","green","violet","orange","yellow","gray"} +for _, color in ipairs(line_cols) do + minetest.register_node(":signs:sign_subway_"..color, { + description = S("Sign ("..color..", Subway)"), + inventory_image = "signs_subway_"..color.."_front.png", + wield_image = "signs_subway_"..color.."_front.png", + node_placement_prediction = "", + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = signs_lib.subway_wall_sign_model.nodebox, + tiles = { + "signs_metal_tb.png", + "signs_metal_tb.png", + "signs_metal_sides.png", + "signs_metal_sides.png", + "signs_metal_back.png", + "signs_subway_"..color.."_front.png" + }, + groups = sign_groups, + on_place = function(itemstack, placer, pointed_thing) + return signs_lib.determine_sign_type(itemstack, placer, pointed_thing) + end, + on_construct = function(pos) + signs_lib.construct_sign(pos) + end, + on_destruct = function(pos) + signs_lib.destruct_sign(pos) + end, + on_receive_fields = function(pos, formname, fields, sender) + signs_lib.receive_fields(pos, formname, fields, sender) + end, + on_punch = function(pos, node, puncher) + signs_lib.update_sign(pos) + end, + }) +end -- metal, colored signs if enable_colored_metal_signs then @@ -863,6 +922,10 @@ if enable_colored_metal_signs then {"white_black", S("white_black"), "0"}, {"orange", S("orange"), "0"}, {"blue", S("blue"), "f"}, + {"blue_ahead", S("blue, ahead"), "f"}, + {"blue_bidi", S("blue, both directions"), "f"}, + {"blue_left", S("blue, left"), "f"}, + {"blue_right", S("blue, right"), "f"}, {"brown", S("brown"), "f"}, } @@ -1022,6 +1085,39 @@ minetest.register_lbm({ -- locked sign minetest.register_craft({ + output = "locked_sign:sign_wall_locked", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "group:wood", "default:steel_ingot"}, + {"", "group:stick", ""}, + } +}) + +minetest.register_craft({ + output = "signs:sign_wall_blue_ahead", + recipe = { + {"group:stick"}, + {"signs:sign_wall_blue"}, + }, +}) + +minetest.register_craft({ + output = "signs:sign_wall_blue_left", + recipe = { + {"group:stick", "signs:sign_wall_blue" }, + }, +}) + +minetest.register_craft({ + output = "signs:sign_wall_blue_right", + recipe = { + {"signs:sign_wall_blue", "group:stick" }, + }, +}) + +--Alternate recipe. + +minetest.register_craft({ output = "locked_sign:sign_wall_locked", recipe = { {default_sign}, Binary files differdiff --git a/textures/signs_blue_ahead_front.png b/textures/signs_blue_ahead_front.png Binary files differnew file mode 100644 index 0000000..eaba516 --- /dev/null +++ b/textures/signs_blue_ahead_front.png diff --git a/textures/signs_blue_ahead_inv.png b/textures/signs_blue_ahead_inv.png Binary files differnew file mode 100644 index 0000000..eaba516 --- /dev/null +++ b/textures/signs_blue_ahead_inv.png diff --git a/textures/signs_blue_bidi_front.png b/textures/signs_blue_bidi_front.png Binary files differnew file mode 100644 index 0000000..8b7da05 --- /dev/null +++ b/textures/signs_blue_bidi_front.png diff --git a/textures/signs_blue_bidi_inv.png b/textures/signs_blue_bidi_inv.png Binary files differnew file mode 100644 index 0000000..8b7da05 --- /dev/null +++ b/textures/signs_blue_bidi_inv.png diff --git a/textures/signs_blue_left_front.png b/textures/signs_blue_left_front.png Binary files differnew file mode 100644 index 0000000..599985e --- /dev/null +++ b/textures/signs_blue_left_front.png diff --git a/textures/signs_blue_left_inv.png b/textures/signs_blue_left_inv.png Binary files differnew file mode 100644 index 0000000..599985e --- /dev/null +++ b/textures/signs_blue_left_inv.png diff --git a/textures/signs_blue_right_front.png b/textures/signs_blue_right_front.png Binary files differnew file mode 100644 index 0000000..f7c0c56 --- /dev/null +++ b/textures/signs_blue_right_front.png diff --git a/textures/signs_blue_right_inv.png b/textures/signs_blue_right_inv.png Binary files differnew file mode 100644 index 0000000..f7c0c56 --- /dev/null +++ b/textures/signs_blue_right_inv.png diff --git a/textures/signs_subway_blue_front.png b/textures/signs_subway_blue_front.png Binary files differnew file mode 100644 index 0000000..46813e4 --- /dev/null +++ b/textures/signs_subway_blue_front.png diff --git a/textures/signs_subway_cyan_front.png b/textures/signs_subway_cyan_front.png Binary files differnew file mode 100644 index 0000000..0b7ed16 --- /dev/null +++ b/textures/signs_subway_cyan_front.png diff --git a/textures/signs_subway_gray_front.png b/textures/signs_subway_gray_front.png Binary files differnew file mode 100644 index 0000000..4423c18 --- /dev/null +++ b/textures/signs_subway_gray_front.png diff --git a/textures/signs_subway_green_front.png b/textures/signs_subway_green_front.png Binary files differnew file mode 100644 index 0000000..4fe5196 --- /dev/null +++ b/textures/signs_subway_green_front.png diff --git a/textures/signs_subway_orange_front.png b/textures/signs_subway_orange_front.png Binary files differnew file mode 100644 index 0000000..7c335b8 --- /dev/null +++ b/textures/signs_subway_orange_front.png diff --git a/textures/signs_subway_red_front.png b/textures/signs_subway_red_front.png Binary files differnew file mode 100644 index 0000000..65c21c1 --- /dev/null +++ b/textures/signs_subway_red_front.png diff --git a/textures/signs_subway_violet_front.png b/textures/signs_subway_violet_front.png Binary files differnew file mode 100644 index 0000000..c1f2025 --- /dev/null +++ b/textures/signs_subway_violet_front.png diff --git a/textures/signs_subway_yellow_front.png b/textures/signs_subway_yellow_front.png Binary files differnew file mode 100644 index 0000000..31153e5 --- /dev/null +++ b/textures/signs_subway_yellow_front.png |