diff --git a/init.lua b/init.lua index ba500ed..c791028 100644 --- a/init.lua +++ b/init.lua @@ -5,14 +5,110 @@ arrow_signs={} + arrow_signs.formspec = "field[text;Sign text:;${text}]"; + +arrow_signs_on_place = function(itemstack, placer, pointed_thing) + + local posabove = pointed_thing.above + local posunder = pointed_thing.under + local vector = placer:get_look_dir() + local place = true + + if posabove.y>posunder.y then + if(vector.z>0.5 and vector.z<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 10}) + elseif (vector.x>0.5 and vector.x<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 19}) + elseif(-0.5>vector.z and -1<=vector.z) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 4}) + elseif (-0.5>vector.x and -1<=vector.x) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 13}) + else + place = false + end + elseif posabove.y0.5 and vector.z<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 8}) + elseif (vector.x>0.5 and vector.x<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 17}) + elseif(-0.5>vector.z and -1<=vector.z) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 6}) + elseif (-0.5>vector.x and -1<=vector.x) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 15}) + else + place = false + end + elseif posabove.z>posunder.z then + if(vector.y>0.75 and vector.y<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 22}) + elseif (vector.y>=-1 and vector.y<-0.75) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 2}) + elseif (vector.x>=0 and vector.x<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 18}) + elseif (vector.x<0 and vector.x>=-1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 14}) + else + place = false + end + elseif posabove.z0.75 and vector.y<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 20}) + elseif (vector.y>=-1 and vector.y<-0.75) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 0}) + elseif (vector.x>=0 and vector.x<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 16}) + elseif (vector.x<0 and vector.x>=-1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 12}) + else + place = false + end + elseif posabove.x>posunder.x then + if(vector.y>0.75 and vector.y<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 21}) + elseif (vector.y>=-1 and vector.y<-0.75) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 3}) + elseif (vector.z>=0 and vector.z<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 11}) + elseif (vector.z<0 and vector.z>=-1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 7}) + else + place = false + end + elseif posabove.x0.75 and vector.y<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 23}) + elseif (vector.y>=-1 and vector.y<-0.75) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 1}) + elseif (vector.z>=0 and vector.z<=1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 9}) + elseif (vector.z<0 and vector.z>=-1) then + minetest.add_node(posabove,{name = itemstack:get_name(), param2 = 5}) + else + place = false + end + else + place = false + end + + if not(place) then + minetest.rotate_node(itemstack, placer, pointed_thing) + else + itemstack:take_item() + end + + return itemstack + + +end + function arrow_signs:savetext(pos, formname, fields, sender) if not minetest.get_player_privs(sender:get_player_name())["interact"] then minetest.chat_send_player(sender:get_player_name(), "error: you don't have permission to edit the sign. you need the interact priv") return end - local meta = minetest.get_meta(pos) + local meta = minetest.get_meta(pos) fields.text = fields.text or "" print((sender:get_player_name() or "").." wrote \""..fields.text.. "\" to sign at "..minetest.pos_to_string(pos)) @@ -39,66 +135,40 @@ minetest.override_item("default:sign_wall", { groups = {choppy=2,dig_immediate=2,attached_node=1,sign=1}, }) - - - - - - ---Sign right -minetest.register_node("arrow_signs:wall_right", { - description = "Sign right", - drawtype = "signlike", - tiles = {"arrow_sign_right.png"}, - inventory_image = "arrow_sign_right.png", +--Sign arrow +minetest.register_node("arrow_signs:wall", { + description = "Arrow signs", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { 0.25, -0.25, 0.5, -0.25, 0.5, 0.47}, + { 0.1875, -0.3125, 0.5, -0.1875, -0.25, 0.47}, + { 0.125, -0.3125, 0.5, -0.125, -0.375, 0.47}, + { 0.0625, -0.375, 0.5, -0.0625, -0.437, 0.47} + } + }, + selection_box = { + type = "fixed", + fixed = { + { 0.25, -0.25, 0.5, -0.25, 0.5, 0.47}, + { 0.1875, -0.3125, 0.5, -0.1875, -0.25, 0.47}, + { 0.125, -0.3125, 0.5, -0.125, -0.375, 0.47}, + { 0.0625, -0.375, 0.5, -0.0625, -0.437, 0.47} + } + }, + tiles = {"arrow_sign_border_left.png","arrow_sign_border_right.png","arrow_sign_border_up.png","arrow_sign_border_down.png","arrow_sign.png","arrow_sign.png"}, + inventory_image = "arrow_sign.png", paramtype = "light", - paramtype2 = "wallmounted", + paramtype2 = "facedir", sunlight_propagates = true, walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = - --wall_bottom = - --wall_side = - }, - groups = {choppy=2,dig_immediate=2,attached_node=1,sign=1}, - legacy_wallmounted = true, + groups = {choppy=2,dig_immediate=2,sign=1}, sounds = default.node_sound_defaults(), + on_place = arrow_signs_on_place, on_construct = function(pos) - --local n = minetest.get_node(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", arrow_signs.formspec) - meta:set_string("infotext", "\"\"") - end, - on_receive_fields = function(pos, formname, fields, sender) - arrow_signs:savetext(pos, formname, fields, sender) - end, - -}) - - --- sign left -minetest.register_node("arrow_signs:wall_left", { - description = "Sign left", - drawtype = "signlike", - tiles = {"arrow_sign_left.png"}, - inventory_image = "arrow_sign_left.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = - --wall_bottom = - --wall_side = - }, - groups = {choppy=2,dig_immediate=2,attached_node=1,sign=1}, - legacy_wallmounted = true, - sounds = default.node_sound_defaults(), - on_construct = function(pos) - --local n = minetest.get_node(pos) - local meta = minetest.get_meta(pos) + --local n = minetest.get_node(pos) + local meta = minetest.get_meta(pos) meta:set_string("formspec", arrow_signs.formspec) meta:set_string("infotext", "\"\"") end, @@ -107,129 +177,45 @@ minetest.register_node("arrow_signs:wall_left", { end, }) - ---Sign up -minetest.register_node("arrow_signs:wall_up", { - description = "Sign up", - drawtype = "signlike", - tiles = {"arrow_sign_up.png"}, - inventory_image = "arrow_sign_up.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = - --wall_bottom = - --wall_side = - }, - groups = {choppy=2,dig_immediate=2,attached_node=1,sign=1}, - legacy_wallmounted = true, - sounds = default.node_sound_defaults(), - on_construct = function(pos) - --local n = minetest.get_node(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", arrow_signs.formspec) - meta:set_string("infotext", "\"\"") - end, - on_receive_fields = function(pos, formname, fields, sender) - arrow_signs:savetext(pos, formname, fields, sender) - end, -}) - - ---Sign down -minetest.register_node("arrow_signs:wall_down", { - description = "Sign down", - drawtype = "signlike", - tiles = {"arrow_sign_down.png"}, - inventory_image = "arrow_sign_down.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = - --wall_bottom = - --wall_side = - }, - groups = {choppy=2,dig_immediate=2,attached_node=1,sign=1}, - legacy_wallmounted = true, - sounds = default.node_sound_defaults(), - on_construct = function(pos) - --local n = minetest.get_node(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", arrow_signs.formspec) - meta:set_string("infotext", "\"\"") - end, - on_receive_fields = function(pos, formname, fields, sender) - arrow_signs:savetext(pos, formname, fields, sender) - end, -}) - - - - - - ---recipes +--Recipes minetest.register_craft({ - output = 'arrow_signs:wall_right 1', - recipe = { - {'', '', ''}, - {'', 'group:sign', 'default:stick'}, - {'', '', ''}, - } -}) -minetest.register_craft({ - output = 'arrow_signs:wall_left 1', - recipe = { - {'', '', ''}, - {'default:stick', 'group:sign', ''}, - {'', '', ''}, - } -}) -minetest.register_craft({ - output = 'arrow_signs:wall_up 1', - recipe = { - {'', 'default:stick', ''}, - {'', 'group:sign', ''}, - {'', '', ''}, - } -}) -minetest.register_craft({ - output = 'arrow_signs:wall_down 1', - recipe = { - {'', '', ''}, - {'', 'group:sign', ''}, - {'', 'default:stick', ''}, - } + type = 'shapeless', + output = 'arrow_signs:wall', + recipe = {'group:sign', 'default:stick'}, }) minetest.register_craft({ output = 'default:sign_wall', recipe = { - {'group:sign'}, - } }) -minetest.register_alias("more_signs:wall_right", "arrow_signs:wall_right") -minetest.register_alias("sign_right", "arrow_signs:wall_right") - -minetest.register_alias("more_signs:wall_left", "arrow_signs:wall_left") -minetest.register_alias("sign_left", "arrow_signs:wall_left") - -minetest.register_alias("more_signs:wall_up", "arrow_signs:wall_up") -minetest.register_alias("sign_up", "arrow_signs:wall_up") - -minetest.register_alias("more_signs:wall_down", "arrow_signs:wall_down") -minetest.register_alias("sign_down", "arrow_signs:wall_down") +--Redefinition +minetest.register_abm({ + nodenames = {"arrow_signs:wall_right", "arrow_signs:wall_left", "arrow_signs:wall_up", "arrow_signs:wall_down", + "more_signs:wall_right","more_signs:wall_left","more_signs:wall_up" ,"more_signs:wall_down" + }, + interval = 1, + chance = 1, + action = function(pos, node) + local convert_facedir={ + ["arrow_signs:wall_right"] = {6,4,5,11,16,14}, + ["arrow_signs:wall_left"] = {8,10,9,7,12,18}, + ["arrow_signs:wall_up"] = {15,19,23,21,20,22}, + ["arrow_signs:wall_down"] = {17,13,1,3,0,2}, + -- For old mod + ["more_signs:wall_right"] = {6,4,5,11,16,14}, + ["more_signs:wall_left"] = {8,10,9,7,12,18}, + ["more_signs:wall_up"] = {15,19,23,21,20,22}, + ["more_signs:wall_down"] = {17,13,1,3,0,2}, + } + minetest.swap_node(pos, {name="arrow_signs:wall",param2=convert_facedir[node.name][node.param2+1]}) + end, +}) +--Locked sign if locks then -local MODPATH = minetest.get_modpath("arrow_signs"); -dofile(MODPATH.."/shared_locked.lua") + local MODPATH = minetest.get_modpath("arrow_signs"); + dofile(MODPATH.."/shared_locked.lua") end \ No newline at end of file diff --git a/shared_locked.lua b/shared_locked.lua index a655d5b..fa21aa4 100644 --- a/shared_locked.lua +++ b/shared_locked.lua @@ -1,284 +1,97 @@ -- a sign -minetest.register_node("arrow_signs:shared_locked_right", { - description = "Shared locked sign right", - drawtype = "signlike", - tiles = {"arrow_sign_right.png"}, - inventory_image = "arrow_sign_right.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = - --wall_bottom = - --wall_side = - }, - groups = {choppy=2,dig_immediate=2,sign_locked=1}, - legacy_wallmounted = true, +minetest.register_node("arrow_signs:shared_locked", { + description = "Shared locked sign", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + { 0.25, -0.25, 0.5, -0.25, 0.5, 0.47}, + { 0.1875, -0.3125, 0.5, -0.1875, -0.25, 0.47}, + { 0.125, -0.3125, 0.5, -0.125, -0.375, 0.47}, + { 0.0625, -0.375, 0.5, -0.0625, -0.437, 0.47} + } + }, + selection_box = { + type = "fixed", + fixed = { + { 0.25, -0.25, 0.5, -0.25, 0.5, 0.47}, + { 0.1875, -0.3125, 0.5, -0.1875, -0.25, 0.47}, + { 0.125, -0.3125, 0.5, -0.125, -0.375, 0.47}, + { 0.0625, -0.375, 0.5, -0.0625, -0.437, 0.47} + } + }, + tiles = {"arrow_sign_border_left.png","arrow_sign_border_right.png","arrow_sign_border_up.png","arrow_sign_border_down.png","arrow_sign.png","arrow_sign.png"}, + inventory_image = "arrow_sign.png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + groups = {choppy=2,dig_immediate=2,sign_locked=1}, + legacy_wallmounted = true, + + on_place = arrow_signs_on_place, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + -- prepare the lock of the sign + locks:lock_init( pos, + "size[8,4]".. + "field[0.3,0.6;6,0.7;text;Text:;]".. + "field[0.3,3.6;6,0.7;locks_sent_lock_command;Locked sign. Type /help for help:;]".. + "button_exit[6.3,3.2;1.7,0.7;locks_sent_input;Proceed]" ); + end, + + after_place_node = function(pos, placer) + locks:lock_set_owner( pos, placer, "Shared locked sign" ); + end, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - -- prepare the lock of the sign - locks:lock_init( pos, - "size[8,4]".. - "field[0.3,0.6;6,0.7;text;Text:;]".. - "field[0.3,3.6;6,0.7;locks_sent_lock_command;Locked sign. Type /help for help:;]".. - "button_exit[6.3,3.2;1.7,0.7;locks_sent_input;Proceed]" ); - end, + can_dig = function(pos,player) + return locks:lock_allow_dig( pos, player ); + end, - after_place_node = function(pos, placer) - locks:lock_set_owner( pos, placer, "Shared locked sign" ); - end, + on_receive_fields = function(pos, formname, fields, sender) + -- if the user already has the right to use this and did input text + if( fields.text + and ( not(fields.locks_sent_lock_command) + or fields.locks_sent_lock_command=="") + and locks:lock_allow_use( pos, sender )) then - can_dig = function(pos,player) - return locks:lock_allow_dig( pos, player ); - end, + --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) + local meta = minetest.get_meta(pos) + fields.text = fields.text or ""; + print((sender:get_player_name() or "").." wrote \""..fields.text.. + "\" to sign at "..minetest.pos_to_string(pos)); + meta:set_string("text", fields.text.." ["..sender:get_player_name().."]"); + meta:set_string("infotext", '"'..fields.text..'"'.." ["..sender:get_player_name().."]"); - on_receive_fields = function(pos, formname, fields, sender) + -- a command for the lock? + else + arrow_signs:savetext( pos, formname, fields, sender ); + end - -- if the user already has the right to use this and did input text - if( fields.text - and ( not(fields.locks_sent_lock_command) - or fields.locks_sent_lock_command=="") - and locks:lock_allow_use( pos, sender )) then - - --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) - local meta = minetest.get_meta(pos) - fields.text = fields.text or ""; - print((sender:get_player_name() or "").." wrote \""..fields.text.. - "\" to sign at "..minetest.pos_to_string(pos)); - meta:set_string("text", fields.text.." ["..sender:get_player_name().."]"); - meta:set_string("infotext", '"'..fields.text..'"'.." ["..sender:get_player_name().."]"); - - -- a command for the lock? - else - arrow_signs:savetext( pos, formname, fields, sender ); - end - - end, - }); ---left - minetest.register_node("arrow_signs:shared_locked_left", { - description = "Shared locked sign left", - drawtype = "signlike", - tiles = {"arrow_sign_left.png"}, - inventory_image = "arrow_sign_left.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = - --wall_bottom = - --wall_side = - }, - groups = {choppy=2,dig_immediate=2,sign_locked=1}, - legacy_wallmounted = true, - - - on_construct = function(pos) - local meta = minetest.get_meta(pos) - -- prepare the lock of the sign - locks:lock_init( pos, - "size[8,4]".. - "field[0.3,0.6;6,0.7;text;Text:;]".. - "field[0.3,3.6;6,0.7;locks_sent_lock_command;Locked sign. Type /help for help:;]".. - "button_exit[6.3,3.2;1.7,0.7;locks_sent_input;Proceed]" ); - end, - - after_place_node = function(pos, placer) - locks:lock_set_owner( pos, placer, "Shared locked sign" ); - end, - - - can_dig = function(pos,player) - return locks:lock_allow_dig( pos, player ); - end, - - on_receive_fields = function(pos, formname, fields, sender) - - -- if the user already has the right to use this and did input text - if( fields.text - and ( not(fields.locks_sent_lock_command) - or fields.locks_sent_lock_command=="") - and locks:lock_allow_use( pos, sender )) then - - --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) - local meta = minetest.get_meta(pos) - fields.text = fields.text or ""; - print((sender:get_player_name() or "").." wrote \""..fields.text.. - "\" to sign at "..minetest.pos_to_string(pos)); - meta:set_string("text", fields.text.." ["..sender:get_player_name().."]"); - meta:set_string("infotext", '"'..fields.text..'"'.." ["..sender:get_player_name().."]"); - - -- a command for the lock? - else - arrow_signs:savetext( pos, formname, fields, sender ); - end - - end, - }); - --up - minetest.register_node("arrow_signs:shared_locked_up", { - description = "Shared locked sign up", - drawtype = "signlike", - tiles = {"arrow_sign_up.png"}, - inventory_image = "arrow_sign_up.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = - --wall_bottom = - --wall_side = - }, - groups = {choppy=2,dig_immediate=2,sign_locked=1}, - legacy_wallmounted = true, - - - on_construct = function(pos) - local meta = minetest.get_meta(pos) - -- prepare the lock of the sign - locks:lock_init( pos, - "size[8,4]".. - "field[0.3,0.6;6,0.7;text;Text:;]".. - "field[0.3,3.6;6,0.7;locks_sent_lock_command;Locked sign. Type /help for help:;]".. - "button_exit[6.3,3.2;1.7,0.7;locks_sent_input;Proceed]" ); - end, - - after_place_node = function(pos, placer) - locks:lock_set_owner( pos, placer, "Shared locked sign" ); - end, - - - can_dig = function(pos,player) - return locks:lock_allow_dig( pos, player ); - end, - - on_receive_fields = function(pos, formname, fields, sender) - - -- if the user already has the right to use this and did input text - if( fields.text - and ( not(fields.locks_sent_lock_command) - or fields.locks_sent_lock_command=="") - and locks:lock_allow_use( pos, sender )) then - - --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) - local meta = minetest.get_meta(pos) - fields.text = fields.text or ""; - print((sender:get_player_name() or "").." wrote \""..fields.text.. - "\" to sign at "..minetest.pos_to_string(pos)); - meta:set_string("text", fields.text.." ["..sender:get_player_name().."]"); - meta:set_string("infotext", '"'..fields.text..'"'.." ["..sender:get_player_name().."]"); - - -- a command for the lock? - else - arrow_signs:savetext( pos, formname, fields, sender ); - end - - end, - }); - --down - minetest.register_node("arrow_signs:shared_locked_down", { - description = "Shared locked sign down", - drawtype = "signlike", - tiles = {"arrow_sign_down.png"}, - inventory_image = "arrow_sign_down.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = - --wall_bottom = - --wall_side = - }, - groups = {choppy=2,dig_immediate=2,sign_locked=1}, - legacy_wallmounted = true, - - - on_construct = function(pos) - local meta = minetest.get_meta(pos) - -- prepare the lock of the sign - locks:lock_init( pos, - "size[8,4]".. - "field[0.3,0.6;6,0.7;text;Text:;]".. - "field[0.3,3.6;6,0.7;locks_sent_lock_command;Locked sign. Type /help for help:;]".. - "button_exit[6.3,3.2;1.7,0.7;locks_sent_input;Proceed]" ); - end, - - after_place_node = function(pos, placer) - locks:lock_set_owner( pos, placer, "Shared locked sign" ); - end, - - - can_dig = function(pos,player) - return locks:lock_allow_dig( pos, player ); - end, - - on_receive_fields = function(pos, formname, fields, sender) - - -- if the user already has the right to use this and did input text - if( fields.text - and ( not(fields.locks_sent_lock_command) - or fields.locks_sent_lock_command=="") - and locks:lock_allow_use( pos, sender )) then - - --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) - local meta = minetest.get_meta(pos) - fields.text = fields.text or ""; - print((sender:get_player_name() or "").." wrote \""..fields.text.. - "\" to sign at "..minetest.pos_to_string(pos)); - meta:set_string("text", fields.text.." ["..sender:get_player_name().."]"); - meta:set_string("infotext", '"'..fields.text..'"'.." ["..sender:get_player_name().."]"); - - -- a command for the lock? - else - arrow_signs:savetext( pos, formname, fields, sender ); - end - - end, + end, }); minetest.register_craft({ - output = 'arrow_signs:shared_locked_right', - recipe = { - { 'arrow_signs:wall_right', 'locks:lock', '' }, - }, + type = 'shapeless', + output = 'arrow_signs:shared_locked', + recipe = {'arrow_signs:wall', 'locks:lock'}, }) -minetest.register_craft({ - output = 'arrow_signs:shared_locked_left', - recipe = { - { 'arrow_signs:wall_left', 'locks:lock', '' }, - }, +--Redefinition +minetest.register_abm({ + nodenames = {"arrow_signs:shared_locked_right", "'arrow_signs:shared_locked_left", "arrow_signs:shared_locked_up", "arrow_signs:shared_locked_down"}, + interval = 1, + chance = 1, + action = function(pos, node) + local convert_facedir={ + ["arrow_signs:shared_locked_right"]={6,4,5,11,16,14}, + ["arrow_signs:shared_locked_left"]={8,10,9,7,12,18}, + ["arrow_signs:shared_locked_up"]={15,19,23,21,20,22}, + ["arrow_signs:shared_locked_down"]={17,13,1,3,0,2} + } + minetest.swap_node(pos, {name="arrow_signs:shared_locked",param2=convert_facedir[node.name][node.param2-1]}) + end, }) - -minetest.register_craft({ - output = 'arrow_signs:shared_locked_up', - recipe = { - { 'arrow_signs:wall_up', 'locks:lock', '' }, - }, -}) - -minetest.register_craft({ - output = 'arrow_signs:shared_locked_down', - recipe = { - { 'arrow_signs:wall_down', 'locks:lock', '' }, - }, -}) - - -minetest.register_craft({ - output = 'arrow_signs:shared_locked_right', - recipe = { - { 'group:', 'locks:lock', '' }, - }, -}) \ No newline at end of file diff --git a/textures/arrow_sign_down.png b/textures/arrow_sign.png similarity index 100% rename from textures/arrow_sign_down.png rename to textures/arrow_sign.png diff --git a/textures/arrow_sign_border_down.png b/textures/arrow_sign_border_down.png new file mode 100644 index 0000000..1e457a8 Binary files /dev/null and b/textures/arrow_sign_border_down.png differ diff --git a/textures/arrow_sign_border_left.png b/textures/arrow_sign_border_left.png new file mode 100644 index 0000000..e6568e8 Binary files /dev/null and b/textures/arrow_sign_border_left.png differ diff --git a/textures/arrow_sign_border_right.png b/textures/arrow_sign_border_right.png new file mode 100644 index 0000000..87b64d0 Binary files /dev/null and b/textures/arrow_sign_border_right.png differ diff --git a/textures/arrow_sign_border_up.png b/textures/arrow_sign_border_up.png new file mode 100644 index 0000000..564efff Binary files /dev/null and b/textures/arrow_sign_border_up.png differ diff --git a/textures/arrow_sign_left.png b/textures/arrow_sign_left.png deleted file mode 100644 index 92bbf35..0000000 Binary files a/textures/arrow_sign_left.png and /dev/null differ diff --git a/textures/arrow_sign_right.png b/textures/arrow_sign_right.png deleted file mode 100644 index 6d2f47f..0000000 Binary files a/textures/arrow_sign_right.png and /dev/null differ diff --git a/textures/arrow_sign_up.png b/textures/arrow_sign_up.png deleted file mode 100644 index 4285f89..0000000 Binary files a/textures/arrow_sign_up.png and /dev/null differ diff --git a/textures/rightandleft.xcf b/textures/rightandleft.xcf new file mode 100644 index 0000000..5c02a75 Binary files /dev/null and b/textures/rightandleft.xcf differ diff --git a/textures/sign_down.xcf b/textures/sign.xcf similarity index 100% rename from textures/sign_down.xcf rename to textures/sign.xcf diff --git a/textures/sign_left.xcf b/textures/sign_left.xcf deleted file mode 100644 index 4e1f519..0000000 Binary files a/textures/sign_left.xcf and /dev/null differ diff --git a/textures/sign_right.xcf b/textures/sign_right.xcf deleted file mode 100644 index 0be9ca0..0000000 Binary files a/textures/sign_right.xcf and /dev/null differ diff --git a/textures/sign_up.xcf b/textures/sign_up.xcf deleted file mode 100644 index 85e72c7..0000000 Binary files a/textures/sign_up.xcf and /dev/null differ diff --git a/textures/upanddown.xcf b/textures/upanddown.xcf new file mode 100644 index 0000000..3f3c511 Binary files /dev/null and b/textures/upanddown.xcf differ