diff options
author | Pierre-Yves Rollo <dev@pyrollo.com> | 2018-09-20 15:27:42 +0200 |
---|---|---|
committer | Pierre-Yves Rollo <dev@pyrollo.com> | 2018-09-20 15:27:42 +0200 |
commit | 2793e0ab8f67b28120bc19086efe126c96cd79dd (patch) | |
tree | a3fdd05125c8abebf2a55da1b0dbd36463cc5228 /signs | |
parent | a0d596bab9ad7f1001e2e2bdf8aa36d5f4e432ef (diff) | |
download | display_modpack-2793e0ab8f67b28120bc19086efe126c96cd79dd.tar.gz display_modpack-2793e0ab8f67b28120bc19086efe126c96cd79dd.tar.bz2 display_modpack-2793e0ab8f67b28120bc19086efe126c96cd79dd.zip |
Added simple wooden sign
Diffstat (limited to 'signs')
-rw-r--r-- | signs/nodes.lua | 24 | ||||
-rw-r--r-- | signs/textures/signs_wooden_inventory.png | bin | 606 -> 581 bytes |
2 files changed, 19 insertions, 5 deletions
diff --git a/signs/nodes.lua b/signs/nodes.lua index 7e2dbe8..7500297 100644 --- a/signs/nodes.lua +++ b/signs/nodes.lua @@ -27,7 +27,7 @@ local function display_poster(pos, node, player) local meta = minetest.get_meta(pos) local def = minetest.registered_nodes[node.name].display_entities["signs:display_text"] local font = font_api.get_font(meta:get_string("font") or def.font_name) - + -- Title texture local titletexture = font:make_text_texture( meta:get_string("display_text"), font:get_height()*8.4, font:get_height(), 1, "center") @@ -77,7 +77,7 @@ local function on_receive_fields_poster(pos, formname, fields, player) local node = minetest.get_node(pos) if not minetest.is_protected(pos, player:get_player_name()) and fields then - if formname == node.name.."@"..minetest.pos_to_string(pos)..":display" and + if formname == node.name.."@"..minetest.pos_to_string(pos)..":display" and fields.edit then edit_poster(pos, node, player) end @@ -98,6 +98,21 @@ display_api.register_display_entity("signs:display_text") -- Sign models and registration local models = { + wooden_sign = { + depth = 1/16, + width = 14/16, + height = 12/16, + entity_fields = { + size = { x = 12/16, y = 10/16 }, + maxlines = 3, + color = "#000", + }, + node_fields = { + description = S("Wooden sign"), + tiles = { "signs_wooden.png" }, + inventory_image = "signs_wooden_inventory.png", + }, + }, wooden_right_sign = { depth = 1/16, width = 14/16, @@ -111,7 +126,7 @@ local models = { node_fields = { description = S("Wooden direction sign"), tiles = { "signs_wooden_direction.png" }, - inventory_image = "signs_wooden_inventory.png", + inventory_image = "signs_wooden_direction_inventory.png", signs_other_dir = 'signs:wooden_left_sign', on_place = signs_api.on_place_direction, drawtype = "mesh", @@ -133,7 +148,7 @@ local models = { node_fields = { description = S("Wooden direction sign"), tiles = { "signs_wooden_direction.png" }, - inventory_image = "signs_wooden_inventory.png", + inventory_image = "signs_wooden_direction_inventory.png", signs_other_dir = 'signs:wooden_right_sign', drawtype = "mesh", mesh = "signs_dir_left.obj", @@ -171,4 +186,3 @@ for name, model in pairs(models) do signs_api.register_sign("signs", name, model) end - diff --git a/signs/textures/signs_wooden_inventory.png b/signs/textures/signs_wooden_inventory.png Binary files differindex d997480..bb7e949 100644 --- a/signs/textures/signs_wooden_inventory.png +++ b/signs/textures/signs_wooden_inventory.png |