From c179f44ba481c73158fa72d658cbd9fed046dcdd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 26 Aug 2017 14:12:38 +0200 Subject: [PATCH] Release 2017-08-26 --- README.md | 22 + display_lib/README.md | 5 +- display_lib/copyright.txt | 2 + display_lib/init.lua | 29 +- font_lib/README.md | 4 +- font_lib/copyright.txt | 4 +- font_lib/init.lua | 7 +- ontime_clocks/README.md | 2 + ontime_clocks/copyright.txt | 4 + ontime_clocks/init.lua | 6 +- ontime_clocks/locale/template.pot | 2 +- signs/README.md | 12 +- signs/common.lua | 118 ++--- signs/compatibility.lua | 55 +++ signs/copyright.txt | 6 +- signs/depends.txt | 3 +- signs/init.lua | 11 +- signs/locale/fr.po | 17 +- signs/locale/template.pot | 10 +- signs/models/signs_dir_left.obj | 45 +- signs/models/signs_dir_right.obj | 38 +- signs/nodes.lua | 136 +++--- signs/svg/black_direction.svg | 128 ++++++ signs/svg/blue_street.svg | 139 ++++++ signs/svg/green_street.svg | 104 +++++ signs/svg/poster.svg | 435 ++++++++++++++++++ signs/textures/signs_default.png | Bin 554 -> 0 bytes signs/textures/signs_default_inventory.png | Bin 617 -> 0 bytes signs/textures/signs_dir_texture.png | Bin 203 -> 0 bytes signs/textures/signs_poster_sides.png | Bin 0 -> 1106 bytes signs/textures/signs_wooden_direction.png | Bin 619 -> 816 bytes signs/textures/signs_wooden_inventory.png | Bin 1289 -> 606 bytes signs_road/README.md | 42 +- signs_road/compatibility.lua | 58 +++ signs_road/copyright.txt | 5 +- signs_road/crafts.lua | 65 ++- signs_road/depends.txt | 2 +- signs_road/init.lua | 12 +- signs_road/locale/fr.po | 29 +- signs_road/locale/template.pot | 22 +- signs_road/nodes.lua | 288 +++++++++--- signs_road/svg/green_street.svg | 108 +++++ signs_road/svg/signs_black.svg | 128 ++++++ signs_road/svg/signs_blue_street.svg | 139 ++++++ signs_road/svg/signs_green_direction.svg | 168 +++++++ signs_road/svg/signs_road_black_direction.svg | 172 +++++++ signs_road/svg/signs_road_red.svg | 123 +++++ signs_road/svg/signs_yellow_direction.svg | 168 +++++++ signs_road/svg/white_street.svg | 110 +++++ signs_road/svg/yellow_street.svg | 108 +++++ .../textures/signs_blue_street_inventory.png | Bin 472 -> 0 bytes .../textures/signs_green_dir_inventory.png | Bin 313 -> 0 bytes signs_road/textures/signs_green_direction.png | Bin 270 -> 0 bytes signs_road/textures/signs_green_street.png | Bin 274 -> 0 bytes .../textures/signs_green_street_inventory.png | Bin 279 -> 0 bytes ...png => signs_road_black_dir_inventory.png} | Bin ...left.png => signs_road_black_dir_left.png} | Bin ...ght.png => signs_road_black_dir_right.png} | Bin ...ns_blue_street.png => signs_road_blue.png} | Bin signs_road/textures/signs_road_green.png | Bin 0 -> 305 bytes .../signs_road_green_dir_inventory.png | Bin 0 -> 379 bytes .../textures/signs_road_green_direction.png | Bin 0 -> 1083 bytes signs_road/textures/signs_road_red_white.png | Bin 0 -> 302 bytes signs_road/textures/signs_road_sides.png | Bin 0 -> 374 bytes signs_road/textures/signs_road_white.png | Bin 0 -> 267 bytes .../signs_road_white_dir_inventory.png | Bin 0 -> 289 bytes .../textures/signs_road_white_direction.png | Bin 0 -> 1096 bytes signs_road/textures/signs_road_yellow.png | Bin 0 -> 287 bytes .../signs_road_yellow_dir_inventory.png | Bin 0 -> 342 bytes .../textures/signs_road_yellow_direction.png | Bin 0 -> 1095 bytes steles/README.md | 2 + steles/init.lua | 6 +- steles/locale/template.pot | 2 +- steles/nodes.lua | 1 + 74 files changed, 2778 insertions(+), 324 deletions(-) create mode 100644 display_lib/copyright.txt create mode 100644 ontime_clocks/copyright.txt create mode 100644 signs/compatibility.lua create mode 100644 signs/svg/black_direction.svg create mode 100644 signs/svg/blue_street.svg create mode 100644 signs/svg/green_street.svg create mode 100644 signs/svg/poster.svg delete mode 100644 signs/textures/signs_default.png delete mode 100644 signs/textures/signs_default_inventory.png delete mode 100644 signs/textures/signs_dir_texture.png create mode 100644 signs/textures/signs_poster_sides.png create mode 100644 signs_road/compatibility.lua create mode 100644 signs_road/svg/green_street.svg create mode 100644 signs_road/svg/signs_black.svg create mode 100644 signs_road/svg/signs_blue_street.svg create mode 100644 signs_road/svg/signs_green_direction.svg create mode 100644 signs_road/svg/signs_road_black_direction.svg create mode 100644 signs_road/svg/signs_road_red.svg create mode 100644 signs_road/svg/signs_yellow_direction.svg create mode 100644 signs_road/svg/white_street.svg create mode 100644 signs_road/svg/yellow_street.svg delete mode 100644 signs_road/textures/signs_blue_street_inventory.png delete mode 100644 signs_road/textures/signs_green_dir_inventory.png delete mode 100644 signs_road/textures/signs_green_direction.png delete mode 100644 signs_road/textures/signs_green_street.png delete mode 100644 signs_road/textures/signs_green_street_inventory.png rename signs_road/textures/{signs_black_inventory.png => signs_road_black_dir_inventory.png} (100%) rename signs_road/textures/{signs_black_left.png => signs_road_black_dir_left.png} (100%) rename signs_road/textures/{signs_black_right.png => signs_road_black_dir_right.png} (100%) rename signs_road/textures/{signs_blue_street.png => signs_road_blue.png} (100%) create mode 100644 signs_road/textures/signs_road_green.png create mode 100644 signs_road/textures/signs_road_green_dir_inventory.png create mode 100644 signs_road/textures/signs_road_green_direction.png create mode 100644 signs_road/textures/signs_road_red_white.png create mode 100644 signs_road/textures/signs_road_sides.png create mode 100644 signs_road/textures/signs_road_white.png create mode 100644 signs_road/textures/signs_road_white_dir_inventory.png create mode 100644 signs_road/textures/signs_road_white_direction.png create mode 100644 signs_road/textures/signs_road_yellow.png create mode 100644 signs_road/textures/signs_road_yellow_dir_inventory.png create mode 100644 signs_road/textures/signs_road_yellow_direction.png diff --git a/README.md b/README.md index ae67ab3..2a190f1 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,25 @@ This modpack provides mods with dynamic display. Mods are : - **signs**: A mod providing signs and direction signs displaying text; - **signs_road**: A mod providing road signs displaying text; - **steles**: A mod providing stone steles with text; + +For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=13563) at the Minetest forums. + +## Changelog + +###2017-08-26 + +- Changed signs from wallmounted to facedir to improve textures and make it possible to use screwdriver. +**IMPORTANT** : Map will be updated to change to new nodes but inventory items will turn into "Unknown items" and have to be re-crafted. + +- Intllib support added with french translation (whole modpack, thanks to fat115) ; + +- Punch on nodes to update entity (signs, signs_road and steles). Usefull in case of /clearobjects ; + +- Changed wooden direction sign textures (signs) ; + +- Added back and side textures to all signs (road_signs) ; + +- Added more sign types : White/yellow/green signs and direction signs (signs_road) ; + + + diff --git a/display_lib/README.md b/display_lib/README.md index d7372d7..3f8571a 100644 --- a/display_lib/README.md +++ b/display_lib/README.md @@ -8,4 +8,7 @@ This library's purpose is to ease creation of nodes with one or more displays on **License**: LPGL -**API**: See API.md document please. +**API**: See [API.md](https://github.com/pyrollo/display_modpack/blob/master/display_lib/API.md) document please. + +For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=13563) at the Minetest forums. + diff --git a/display_lib/copyright.txt b/display_lib/copyright.txt new file mode 100644 index 0000000..5d4adad --- /dev/null +++ b/display_lib/copyright.txt @@ -0,0 +1,2 @@ +Code by Pierre-Yves Rollo (pyrollo) + diff --git a/display_lib/init.lua b/display_lib/init.lua index 63ce99c..4416928 100644 --- a/display_lib/init.lua +++ b/display_lib/init.lua @@ -114,7 +114,6 @@ local function place_entities(pos) local depth = clip_pos_prop(props.depth) local height = clip_pos_prop(props.height) local right = clip_pos_prop(props.right) - if not objrefs[entity_name] then objrefs[entity_name] = minetest.add_entity(pos, entity_name) end @@ -158,26 +157,30 @@ end --- On_place callback for display_lib items. Does nothing more than preventing item --- from being placed on ceiling or ground function display_lib.on_place(itemstack, placer, pointed_thing) - local ndef = minetest.registered_nodes[itemstack.name] + local ndef = itemstack:get_definition() local above = pointed_thing.above local under = pointed_thing.under local dir = {x = under.x - above.x, y = under.y - above.y, z = under.z - above.z} - if ndef and ndef.paramtype2 == "wallmounted" then - local wdir = minetest.dir_to_wallmounted(dir) + if ndef then + if ndef.paramtype2 == "wallmounted" then - if wdir == 0 or wdir == 1 then - dir = placer:get_look_dir() - dir.y = 0 - wdir = minetest.dir_to_wallmounted(dir) + local wdir = minetest.dir_to_wallmounted(dir) + + if wdir == 0 or wdir == 1 then + dir = placer:get_look_dir() + dir.y = 0 + wdir = minetest.dir_to_wallmounted(dir) + end + + return minetest.item_place(itemstack, placer, pointed_thing, wdir) + else + return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(dir)) end - - return minetest.item_place(itemstack, placer, pointed_thing, wdir) - else - return minetest.item_place(itemstack, placer, pointed_thing) end + end --- On_construct callback for display_lib items. Creates entities and update them. @@ -196,7 +199,7 @@ end -- On_rotate (screwdriver) callback for display_lib items. Prevents axis rotation and reorients entities. function display_lib.on_rotate(pos, node, user, mode, new_param2) - if mode ~= screwdriver.ROTATE_FACE then return false end + if mode ~= 1 then return false end local values = get_values(node) diff --git a/font_lib/README.md b/font_lib/README.md index 75ea12e..67903a9 100644 --- a/font_lib/README.md +++ b/font_lib/README.md @@ -8,7 +8,7 @@ This library for font display on entities (to be used with display_lib for sign (Font taken from VanessaE's homedecor/signs_lib, originally under WTFPL) -**API**: See API.md document please. - +**API**: See [API.md](https://github.com/pyrollo/display_modpack/blob/master/font_lib/API.md) document please. +For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=13563) at the Minetest forums. diff --git a/font_lib/copyright.txt b/font_lib/copyright.txt index 83b4af0..eb0ec6a 100644 --- a/font_lib/copyright.txt +++ b/font_lib/copyright.txt @@ -1,2 +1,2 @@ -Code by Pierre-Yves Rollo -Textures by Vanessa Ezekowitz +Code by Pierre-Yves Rollo (pyrollo) +Textures by Vanessa Ezekowitz (VanessaE) diff --git a/font_lib/init.lua b/font_lib/init.lua index b3b3222..9dd6908 100644 --- a/font_lib/init.lua +++ b/font_lib/init.lua @@ -62,8 +62,7 @@ end function font_lib.get_line_width(text) local char local width = 0 - - p=0 + local p=0 while p < #text do char, p = get_next_char(text, p) @@ -82,10 +81,8 @@ end function font_lib.make_line_texture(text, texturew, x, y) local char - local texture = "" - - p=0 + local p=0 while p < #text do char, p = get_next_char(text, p) diff --git a/ontime_clocks/README.md b/ontime_clocks/README.md index 082e59b..72c94db 100644 --- a/ontime_clocks/README.md +++ b/ontime_clocks/README.md @@ -2,6 +2,8 @@ This mod provides clocks that display real ingame time. +For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=13563) at the Minetest forums. + **Dependancies**: display_lib, default **License**: Code under LGPL, textures under CC-BY-SA diff --git a/ontime_clocks/copyright.txt b/ontime_clocks/copyright.txt new file mode 100644 index 0000000..b752dff --- /dev/null +++ b/ontime_clocks/copyright.txt @@ -0,0 +1,4 @@ +Code, Textures and Models by Pierre-Yves Rollo (pyrollo) +intllib support (i18n) by fat115 +intllib fallback code and tools by Diego Martínez (kaeza) + diff --git a/ontime_clocks/init.lua b/ontime_clocks/init.lua index d6d2da4..d0ac334 100644 --- a/ontime_clocks/init.lua +++ b/ontime_clocks/init.lua @@ -19,11 +19,11 @@ --]] ontime_clocks = {} -ontime_clocks.path = minetest.get_modpath("ontime_clocks") +ontime_clocks.name = minetest.get_current_modname() +ontime_clocks.path = minetest.get_modpath(ontime_clocks.name) -- Load support for intllib. -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S, NS = dofile(ontime_clocks.path.."/intllib.lua") ontime_clocks.intllib = S dofile(ontime_clocks.path.."/common.lua") diff --git a/ontime_clocks/locale/template.pot b/ontime_clocks/locale/template.pot index 0367f5c..dca736f 100644 --- a/ontime_clocks/locale/template.pot +++ b/ontime_clocks/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-05 09:50+0200\n" +"POT-Creation-Date: 2017-08-26 11:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/signs/README.md b/signs/README.md index 472d157..9e678de 100644 --- a/signs/README.md +++ b/signs/README.md @@ -2,20 +2,14 @@ This mod provides various signs with text display. Text is locked if area is protected. +For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=13563) at the Minetest forums. + **Dependancies**: default, display\_lib, font\_lib **License**: Code under LGPL, Textures and models under CC-BY-SA ## Recipes -**Sign** (overrides default sign) - - W W W - W W W - - S - - -W = Wooden Plank, S = Stick - **Poster** P P - @@ -26,7 +20,7 @@ P = Paper Poster displays only title, much more text can be read by right-clicking on it. -**Wooden direction sigh** +**Wooden direction sign** W W W W W - diff --git a/signs/common.lua b/signs/common.lua index 7771d49..63f21dc 100644 --- a/signs/common.lua +++ b/signs/common.lua @@ -30,7 +30,7 @@ function signs.set_formspec(pos) if maxlines == 1 then formspec = "size[6,3]".. - "field[0.5,0.7;5.5,1;display_text;"..F("Displayed text")..";${display_text}]".. + "field[0.5,0.7;5.5,1;display_text;"..F("Text")..";${display_text}]".. "button_exit[2,2;2,1;ok;"..F("Write").."]" else local extralabel = "" @@ -39,7 +39,7 @@ function signs.set_formspec(pos) end formspec = "size[6,4]".. - "textarea[0.5,0.7;5.5,2;display_text;"..F("Displayed text")..""..extralabel..";${display_text}]".. + "textarea[0.5,0.7;5.5,2;display_text;"..F("Text")..""..extralabel..";${display_text}]".. "button_exit[2,3;2,1;ok;"..F("Write").."]" end @@ -50,7 +50,7 @@ end function signs.on_receive_fields(pos, formname, fields, player) if not minetest.is_protected(pos, player:get_player_name()) then local meta = minetest.get_meta(pos) - if fields and fields.ok then + if fields and (fields.ok or fields.key_enter) then meta:set_string("display_text", fields.display_text) meta:set_string("infotext", "\""..fields.display_text.."\"") display_lib.update_entities(pos) @@ -61,63 +61,71 @@ end -- On place callback for direction signs -- (chooses which sign according to look direction) function signs.on_place_direction(itemstack, placer, pointed_thing) - local above = pointed_thing.above - local under = pointed_thing.under - local wdir = minetest.dir_to_wallmounted( - {x = under.x - above.x, - y = under.y - above.y, - z = under.z - above.z}) - - local dir = placer:get_look_dir() + local name = itemstack:get_name() + local ndef = minetest.registered_nodes[name] - if wdir == 0 or wdir == 1 then - wdir = minetest.dir_to_wallmounted({x=dir.x, y=0, z=dir.z}) + local bdir = {x = pointed_thing.under.x - pointed_thing.above.x, + y = pointed_thing.under.y - pointed_thing.above.y, + z = pointed_thing.under.z - pointed_thing.above.z} + local pdir = placer:get_look_dir() + + local ndir, test + + if ndef.paramtype2 == "facedir" then + if bdir.x == 0 and bdir.z == 0 then + -- Ceiling or floor pointed (facedir chosen from player dir) + ndir = minetest.dir_to_facedir({x=pdir.x, y=0, z=pdir.z}) + else + -- Wall pointed + ndir = minetest.dir_to_facedir(bdir) + end + + test = {[0]=-pdir.x, pdir.z, pdir.x, -pdir.z} + end + + if ndef.paramtype2 == "wallmounted" then + ndir = minetest.dir_to_wallmounted(bdir) + if ndir == 0 or ndir == 1 then + -- Ceiling or floor + ndir = minetest.dir_to_wallmounted({x=pdir.x, y=0, z=pdir.z}) + end + + test = {0, pdir.z, -pdir.z, -pdir.x, pdir.x} end - local name = itemstack:get_name() - - -- Only for direction signs (ending with _right) - if name:sub(-string.len("_right")) == "_right" then - name = name:sub(1, -string.len("_right")) - - local test = {0, dir.z, -dir.z, -dir.x, dir.x} - if test[wdir] > 0 then - itemstack:set_name(name.."left") + -- Only for direction signs + if ndef.signs_other_dir then + if test[ndir] > 0 then + itemstack:set_name(ndef.signs_other_dir) end - itemstack = minetest.item_place(itemstack, placer, pointed_thing, wdir) - itemstack:set_name(name.."right") + itemstack = minetest.item_place(itemstack, placer, pointed_thing, ndir) + itemstack:set_name(name) return itemstack else - return minetest.item_place(itemstack, placer, pointed_thing, wdir) + return minetest.item_place(itemstack, placer, pointed_thing, ndir) end end --- Screwdriver is no more usable for switching direction as on_rotate --- callback is not called anymore for wallmounted nodes since --- minetest_game commit of 24 dec 2015. Now we use right click. -function signs.on_right_click_direction(pos, node, player, itemstack, pointed_thing) - if not minetest.is_protected(pos, player:get_player_name()) then - local name - if node.name:sub(-string.len("_right")) == "_right" then - name = node.name:sub(1, -string.len("_right")).."left" +-- Handles screwdriver rotation. Direction is affected for direction signs +function signs.on_rotate(pos, node, player, mode, new_param2) + if mode == 2 then + local ndef = minetest.registered_nodes[node.name] + if ndef.signs_other_dir then + minetest.swap_node(pos, {name = ndef.signs_other_dir, + param1 = node.param1, param2 = node.param2}) + display_lib.update_entities(pos) end - if node.name:sub(-string.len("_left")) == "_left" then - name = node.name:sub(1, -string.len("_left")).."right" - end - - if name then - minetest.swap_node(pos, {name = name, param1 = node.param1, param2 = node.param2}) - end - end - - return itemstack + else + display_lib.on_rotate(pos, node, user, mode, new_param2) + end + return false; end --- Generic callback for show_formspec displayed formspecs +-- Generic callback for show_formspec displayed formspecs of "sign" mod + minetest.register_on_player_receive_fields(function(player, formname, fields) local found, _, mod, node_name, pos = formname:find("([%w_]+):([%w_]+)@(.+)") - if found then if mod ~= 'signs' then return end @@ -134,24 +142,20 @@ function signs.register_sign(mod, name, model) local fields = { sunlight_propagates = true, paramtype = "light", - paramtype2 = "wallmounted", + paramtype2 = "facedir", drawtype = "nodebox", node_box = { - type = "wallmounted", - wall_side = {-0.5, -model.height/2, -model.width/2, - -0.5 + model.depth, model.height/2, model.width/2}, - wall_bottom = {-model.width/2, -0.5, -model.height/2, - model.width/2, -0.5 + model.depth, model.height/2}, - wall_top = {-model.width/2, 0.5, -model.height/2, - model.width/2, 0.5 - model.depth, model.height/2}, + type = "fixed", + fixed = {-model.width/2, -model.height/2, 0.5, + model.width/2, model.height/2, 0.5 - model.depth}, }, - groups = {choppy=2, dig_immediate=2, attached_node=1}, + groups = {choppy=2, dig_immediate=2}, sounds = default.node_sound_defaults(), display_entities = { ["signs:text"] = { on_display_update = font_lib.on_display_update, depth = 0.499 - model.depth, - size = { x = 1, y = 1 }, + size = { x = model.width, y = model.height }, resolution = { x = 64, y = 64 }, maxlines = 1, }, @@ -163,7 +167,9 @@ function signs.register_sign(mod, name, model) display_lib.on_construct(pos) end, on_destruct = display_lib.on_destruct, - on_receive_fields = signs.on_receive_fields, + on_rotate = signs.on_rotate, + on_receive_fields = signs.on_receive_fields, + on_punch = function(pos, node, player, pointed_thing) display_lib.update_entities(pos) end, } -- Node fields override diff --git a/signs/compatibility.lua b/signs/compatibility.lua new file mode 100644 index 0000000..76bca89 --- /dev/null +++ b/signs/compatibility.lua @@ -0,0 +1,55 @@ +--[[ + signs mod for Minetest - Various signs with text displayed on + (c) Pierre-Yves Rollo + + This file is part of signs. + + signs is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + signs is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with signs. If not, see . +--]] + + +-- Wallmounted to facedir conversion +local wallmounted_to_facedir = { + [0]=1, -- Should not happend with signs + [1]=1, -- Should not happend with signs + [2]=1, + [3]=3, + [4]=0, + [5]=2 +} + +-- Nodes conversions +local convert_nodes = { + ['signs:wooden_right'] = 'signs:wooden_right_sign', + ['signs:wooden_left'] = 'signs:wooden_left_sign', + ['signs:poster'] = 'signs:paper_poster' +} + +local function compatibility_check(pos, node) + -- Old wallmounted modes to new facedir nodes conversion + node.name = convert_nodes[node.name] + if node.name then + node.param2 = wallmounted_to_facedir[node.param2] + display_lib.on_destruct(pos) + minetest.swap_node(pos, node) + display_lib.on_construct(pos) + end +end + +minetest.register_lbm({ name = "signs:conpatibility_1", + nodenames = {"signs:wooden_right", "signs:wooden_left", "signs:poster"}, + action = compatibility_check, +}) + + diff --git a/signs/copyright.txt b/signs/copyright.txt index 22f9aae..b752dff 100644 --- a/signs/copyright.txt +++ b/signs/copyright.txt @@ -1,2 +1,4 @@ -Code and Models by Pierre-Yves Rollo -Textures by Pierre-Yves Rollo, except signs_default.png and signs_default_inventory.png by Kilbith +Code, Textures and Models by Pierre-Yves Rollo (pyrollo) +intllib support (i18n) by fat115 +intllib fallback code and tools by Diego Martínez (kaeza) + diff --git a/signs/depends.txt b/signs/depends.txt index 0c5fcba..3feca07 100644 --- a/signs/depends.txt +++ b/signs/depends.txt @@ -1,5 +1,4 @@ default +intllib? display_lib font_lib -homedecor? -intllib? diff --git a/signs/init.lua b/signs/init.lua index efa1b26..4f9239f 100644 --- a/signs/init.lua +++ b/signs/init.lua @@ -19,13 +19,18 @@ --]] signs = {} -signs.path = minetest.get_modpath("signs") +signs.name = minetest.get_current_modname() +signs.path = minetest.get_modpath(signs.name) -- Load support for intllib. -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S, NS = dofile(signs.path.."/intllib.lua") signs.intllib = S dofile(signs.path.."/common.lua") dofile(signs.path.."/nodes.lua") dofile(signs.path.."/crafts.lua") +dofile(signs.path.."/compatibility.lua") + + + + diff --git a/signs/locale/fr.po b/signs/locale/fr.po index ebfc543..7a00544 100644 --- a/signs/locale/fr.po +++ b/signs/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-05 10:06+0200\n" +"POT-Creation-Date: 2017-08-26 13:20+0200\n" "PO-Revision-Date: 2017-05-08 07:08+0200\n" "Last-Translator: Peppy \n" "Language-Team: \n" @@ -17,9 +17,9 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.12\n" -#: common.lua -msgid "Displayed text" -msgstr "Texte affiché" +#: common.lua nodes.lua +msgid "Text" +msgstr "Texte" #: common.lua nodes.lua msgid "Write" @@ -34,10 +34,6 @@ msgstr " (uniquement les %s premières lignes)" msgid "Title" msgstr "Titre" -#: nodes.lua -msgid "Text" -msgstr "Texte" - #: nodes.lua msgid "Close" msgstr "Fermer" @@ -48,8 +44,11 @@ msgstr "(Clic-droit pour afficher le texte entier)" #: nodes.lua msgid "Wooden direction sign" -msgstr "Panneau indicateur en bois" +msgstr "Panneau de direction en bois" #: nodes.lua msgid "Poster" msgstr "Affiche" + +#~ msgid "Textd" +#~ msgstr "Texte" diff --git a/signs/locale/template.pot b/signs/locale/template.pot index fc374aa..a1fc065 100644 --- a/signs/locale/template.pot +++ b/signs/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-05 10:06+0200\n" +"POT-Creation-Date: 2017-08-26 13:20+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,8 +17,8 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: common.lua -msgid "Displayed text" +#: common.lua nodes.lua +msgid "Text" msgstr "" #: common.lua nodes.lua @@ -34,10 +34,6 @@ msgstr "" msgid "Title" msgstr "" -#: nodes.lua -msgid "Text" -msgstr "" - #: nodes.lua msgid "Close" msgstr "" diff --git a/signs/models/signs_dir_left.obj b/signs/models/signs_dir_left.obj index 0ed1d8f..91ead2d 100644 --- a/signs/models/signs_dir_left.obj +++ b/signs/models/signs_dir_left.obj @@ -1,17 +1,17 @@ -# Blender v2.69 (sub 0) OBJ File: 'signs_dir_left.blend' +# Blender v2.76 (sub 0) OBJ File: 'signs_dir_right.blend' # www.blender.org -mtllib signs_dir_left.mtl +mtllib signs_dir_right.mtl o Plane -v -0.437500 -0.500000 -0.218750 -v -0.437500 -0.500000 0.218750 -v 0.312500 -0.500000 -0.218750 -v 0.312500 -0.500000 0.218750 -v 0.500000 -0.500000 0.000000 -v -0.437500 -0.437500 -0.218750 -v -0.437500 -0.437500 0.218750 -v 0.312500 -0.437500 -0.218750 -v 0.312500 -0.437500 0.218750 -v 0.500000 -0.437500 0.000000 +v -0.500000 0.218750 0.437500 +v -0.500000 -0.218750 0.437500 +v 0.250000 0.218750 0.437500 +v 0.250000 -0.218750 0.437500 +v 0.437500 -0.000000 0.437500 +v -0.500000 0.218750 0.500000 +v -0.500000 -0.218750 0.500000 +v 0.250000 0.218750 0.500000 +v 0.250000 -0.218750 0.500000 +v 0.437500 -0.000000 0.500000 vt 0.062500 0.500000 vt 0.062500 0.937500 vt 0.812500 0.937500 @@ -33,12 +33,19 @@ vt 0.062500 0.312500 vt 0.000000 0.000000 vt 0.000000 0.500000 vt 0.000000 0.937500 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 0.000000 1.000000 +vn 0.759300 0.650800 0.000000 +vn 0.000000 1.000000 0.000000 +vn -0.000000 -1.000000 0.000000 +vn 0.759300 -0.650800 -0.000000 +vn -1.000000 0.000000 0.000000 usemtl None s off -f 2/1 1/2 3/3 5/4 4/5 -f 7/6 9/7 10/8 8/9 6/10 -f 3/11 8/12 10/13 5/14 -f 1/2 6/15 8/16 3/3 -f 4/5 9/7 7/6 2/1 -f 5/17 10/18 9/10 4/19 -f 2/1 7/20 6/21 1/2 +f 2/1/1 1/2/1 3/3/1 5/4/1 4/5/1 +f 7/6/2 9/7/2 10/8/2 8/9/2 6/10/2 +f 3/11/3 8/12/3 10/13/3 5/14/3 +f 1/2/4 6/15/4 8/16/4 3/3/4 +f 4/5/5 9/7/5 7/6/5 2/1/5 +f 5/17/6 10/18/6 9/10/6 4/19/6 +f 2/1/7 7/20/7 6/21/7 1/2/7 diff --git a/signs/models/signs_dir_right.obj b/signs/models/signs_dir_right.obj index d980e38..6597bfd 100644 --- a/signs/models/signs_dir_right.obj +++ b/signs/models/signs_dir_right.obj @@ -1,17 +1,17 @@ -# Blender v2.76 (sub 0) OBJ File: 'signs_dir_right2.blend' +# Blender v2.76 (sub 0) OBJ File: 'signs_dir_left.blend' # www.blender.org -mtllib signs_dir_right.mtl +mtllib signs_dir_left.mtl o Plane -v 0.437500 -0.437500 -0.218750 -v 0.437500 -0.437500 0.218750 -v -0.312500 -0.437500 -0.218750 -v -0.312500 -0.437500 0.218750 -v -0.500000 -0.437500 0.000000 -v 0.437500 -0.500000 -0.218750 -v 0.437500 -0.500000 0.218750 -v -0.312500 -0.500000 -0.218750 -v -0.312500 -0.500000 0.218750 -v -0.500000 -0.500000 0.000000 +v 0.500000 -0.218750 0.437500 +v 0.500000 0.218750 0.437500 +v -0.250000 -0.218750 0.437500 +v -0.250000 0.218750 0.437500 +v -0.437500 -0.000000 0.437500 +v 0.500000 -0.218750 0.500000 +v 0.500000 0.218750 0.500000 +v -0.250000 -0.218750 0.500000 +v -0.250000 0.218750 0.500000 +v -0.437500 -0.000000 0.500000 vt 0.062500 0.500000 vt 0.062500 0.937500 vt 0.812500 0.937500 @@ -33,13 +33,13 @@ vt 0.062500 0.312500 vt 0.000000 0.000000 vt 0.000000 0.500000 vt 0.000000 0.937500 -vn 0.000000 1.000000 0.000000 -vn -0.000000 -1.000000 -0.000000 -vn -0.759300 0.000000 -0.650800 -vn -0.000000 -0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn -0.759300 0.000000 0.650800 -vn 1.000000 0.000000 -0.000000 +vn -0.000000 0.000000 -1.000000 +vn 0.000000 -0.000000 1.000000 +vn -0.759300 -0.650800 -0.000000 +vn 0.000000 -1.000000 -0.000000 +vn -0.000000 1.000000 0.000000 +vn -0.759300 0.650800 0.000000 +vn 1.000000 0.000000 0.000000 usemtl None s off f 2/1/1 1/2/1 3/3/1 5/4/1 4/5/1 diff --git a/signs/nodes.lua b/signs/nodes.lua index abd63a0..6146d50 100644 --- a/signs/nodes.lua +++ b/signs/nodes.lua @@ -22,17 +22,20 @@ local S = signs.intllib local F = function(...) return minetest.formspec_escape(S(...)) end -- Poster specific formspec -local function on_rightclick_poster(pos, node, player) +local function on_rightclick_poster(pos, node, player, itemstack, pointed_thing) local formspec local meta = minetest.get_meta(pos) + if not minetest.is_protected(pos, player:get_player_name()) then formspec = "size[6.5,7.5]".. - "field[0.5,0.7;6,1;display_text;"..F("Title")..";"..minetest.formspec_escape(meta:get_string("display_text")).."]".. - "textarea[0.5,1.7;6,6;text;"..F("Text")..";"..minetest.formspec_escape(meta:get_string("text")).."]".. + "field[0.5,0.7;6,1;display_text;"..F("Title")..";".. + minetest.formspec_escape(meta:get_string("display_text")).."]".. + "textarea[0.5,1.7;6,6;text;"..F("Text")..";".. + minetest.formspec_escape(meta:get_string("text")).."]".. "button_exit[2,7;2,1;ok;"..F("Write").."]" minetest.show_formspec(player:get_player_name(), - "signs:poster@"..minetest.pos_to_string(pos), + node.name.."@"..minetest.pos_to_string(pos), formspec) else formspec = "size[8,9]".. @@ -45,14 +48,14 @@ local function on_rightclick_poster(pos, node, player) "", formspec) end - + return itemstack end -- Poster specific on_receive_fields callback local function on_receive_fields_poster(pos, formname, fields, player) local meta = minetest.get_meta(pos) if not minetest.is_protected(pos, player:get_player_name()) then - if fields and fields.ok then + if fields and (fields.ok or fields.key_enter) then meta:set_string("display_text", fields.display_text) meta:set_string("text", fields.text) meta:set_string("infotext", "\""..fields.display_text @@ -67,66 +70,55 @@ display_lib.register_display_entity("signs:text") -- Sign models and registration local models = { - wooden_right={ - depth=1/16, - width = 14/16, - height = 7/16, - entity_fields = { - size = { x = 12/16, y = 5/16 }, - resolution = { x = 112, y = 64 }, - maxlines = 2, - color="#000", - }, - node_fields = { - description=S("Wooden direction sign"), - tiles={"signs_wooden_direction.png"}, - inventory_image="signs_wooden_inventory.png", - on_place=signs.on_place_direction, - on_rightclick = signs.on_right_click_direction, - drawtype = "mesh", - mesh = "signs_dir_right.obj", - selection_box = { type="wallmounted", - wall_side = {-0.5, -7/32, -7/16, -7/16, 7/32, 0.5}, - wall_bottom = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, - wall_top = {-0.5, 0.5, -0.5, 0.5, 7/16, 0.5}}, - collision_box = { type="wallmounted", - wall_side = {-0.5, -7/32, -7/16, -7/16, 7/32, 0.5}, - wall_bottom = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, - wall_top = {-0.5, 0.5, -0.5, 0.5, 7/16, 0.5}}, - }, - }, - wooden_left={ + wooden_right_sign = { depth = 1/16, width = 14/16, height = 7/16, entity_fields = { - size = { x = 12/16, y = 5/16 }, + right = -3/32, + size = { x = 12/16, y = 6/16 }, resolution = { x = 112, y = 64 }, maxlines = 2, color="#000", }, node_fields = { - description=S("Wooden direction sign"), - tiles={"signs_wooden_direction.png"}, - inventory_image="signs_wooden_inventory.png", - on_place=signs.on_place_direction, - on_rightclick = signs.on_right_click_direction, + description = S("Wooden direction sign"), + tiles = { "signs_wooden_direction.png" }, + inventory_image = "signs_wooden_inventory.png", + signs_other_dir = 'signs:wooden_left_sign', + on_place = signs.on_place_direction, drawtype = "mesh", - mesh = "signs_dir_left.obj", - selection_box = { type="wallmounted", - wall_side = {-0.5, -7/32, -0.5, -7/16, 7/32, 7/16}, - wall_bottom = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, - wall_top = {-0.5, 0.5, -0.5, 0.5, 7/16, 0.5}}, - collision_box = { type="wallmounted", - wall_side = {-0.5, -7/32, -0.5, -7/16, 7/32, 7/16}, - wall_bottom = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, - wall_top = {-0.5, 0.5, -0.5, 0.5, 7/16, 0.5}}, - groups={not_in_creative_inventory=1}, - drop="signs:wooden_right", + mesh = "signs_dir_right.obj", + selection_box = { type="fixed", fixed = {-0.5, -7/32, 0.5, 7/16, 7/32, 7/16}}, + collision_box = { type="fixed", fixed = {-0,5, -7/32, 0.5, 7/16, 7/32, 7/16}}, }, }, - poster={ - depth=1/32, + wooden_left_sign = { + depth = 1/16, + width = 14/16, + height = 7/16, + entity_fields = { + right = 3/32, + size = { x = 12/16, y = 6/16 }, + resolution = { x = 112, y = 64 }, + maxlines = 2, + color = "#000", + }, + node_fields = { + description = S("Wooden direction sign"), + tiles = { "signs_wooden_direction.png" }, + inventory_image = "signs_wooden_inventory.png", + signs_other_dir = 'signs:wooden_right_sign', + drawtype = "mesh", + mesh = "signs_dir_left.obj", + selection_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}}, + collision_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}}, + groups = { not_in_creative_inventory = 1 }, + drop = "signs:wooden_right_sign", + }, + }, + paper_poster = { + depth = 1/32, width = 26/32, height = 30/32, entity_fields = { @@ -136,39 +128,21 @@ local models = { valign="top", }, node_fields = { - description=S("Poster"), - tiles={"signs_poster.png"}, - inventory_image="signs_poster_inventory.png", - on_construct=display_lib.on_construct, - on_rightclick=on_rightclick_poster, - on_receive_fields=on_receive_fields_poster, + description = S("Poster"), + tiles = { "signs_poster_sides.png", "signs_poster_sides.png", + "signs_poster_sides.png", "signs_poster_sides.png", + "signs_poster_sides.png", "signs_poster.png" }, + inventory_image = "signs_poster_inventory.png", + on_construct = display_lib.on_construct, + on_rightclick = on_rightclick_poster, + on_receive_fields = on_receive_fields_poster, }, }, } +-- Node registration for name, model in pairs(models) do signs.register_sign("signs", name, model) end -if minetest.get_modpath("homedecor") then - print ("["..minetest.get_current_modname().."] homedecor mod is present, not overriding default:sign.") -else --- Override default sign - signs.register_sign(":default", "sign_wall", { - depth = 1/16, - width = 14/16, - height = 10/16, - entity_fields = { - size = { x = 12/16, y = 8/16 }, - resolution = { x = 144, y = 64 }, - maxlines = 3, - color="#000", - }, - node_fields = { - description="Sign", - tiles={"signs_default.png"}, - inventory_image="signs_default_inventory.png", - }, - }) -end diff --git a/signs/svg/black_direction.svg b/signs/svg/black_direction.svg new file mode 100644 index 0000000..8e9b8a9 --- /dev/null +++ b/signs/svg/black_direction.svg @@ -0,0 +1,128 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/signs/svg/blue_street.svg b/signs/svg/blue_street.svg new file mode 100644 index 0000000..0aa87ff --- /dev/null +++ b/signs/svg/blue_street.svg @@ -0,0 +1,139 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/signs/svg/green_street.svg b/signs/svg/green_street.svg new file mode 100644 index 0000000..5d87509 --- /dev/null +++ b/signs/svg/green_street.svg @@ -0,0 +1,104 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/signs/svg/poster.svg b/signs/svg/poster.svg new file mode 100644 index 0000000..4f6f774 --- /dev/null +++ b/signs/svg/poster.svg @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/signs/textures/signs_default.png b/signs/textures/signs_default.png deleted file mode 100644 index 0db6bfd126dbc01c1b6b70c4a0d4f478f7bf4fb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 554 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GXl47+C{+LR=dn)M`SMYD1Ol!&R$- z6rzndLbTY!^w`7n*&>bDqm9|44A~7JgBATXS%Y=i z{I%G;)mgpNS%b9M{8U+eRM~>G*g|yKLUnX0?@NtqW6$He!#^W((J4 z3(;l`*I^6OV~sIlOE71PH|MaHW{%Wji#K791FF$wi!uNr_HbSHa6R@UGma#4&NOST zG;5w@OU@(<&R8S%M03srbB-8ejyMx`8yOZWDW?Db|Jz8~XOs1A*3u zoq{?YtkwN{T}4FSNL8Mz(YXF1d#fK$3 zRr}w3{mIp8kQe$s(ab3tktvby!_VEu&z1r z3;V4C6FI+Sn|B_On6EQ!_10CVX6M##|KIeK`&j$qmo+=@z3cz^`5bpnP;B}WSBd2J g=K4NajKBEpcy=gAC!T&H3UoGur>mdKI;Vst0B)$C`~Uy| diff --git a/signs/textures/signs_default_inventory.png b/signs/textures/signs_default_inventory.png deleted file mode 100644 index 55a512019ad371632da1d22c3e00989fddefcbc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 617 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstUx|vage(c z!@6@aFM%9|WRD45bDP46hOx7_4S6Fo+k-*%fF5)F&0- z6XN>+|Nn*vwVDv6>R`pXFqQgn)i@J&h)8XyGLTypq!4Yy5u(K&rpF$p&lYLK9&OAX zWyl_Bz#ePD5of_3Wy}_1${u6NVIjc)G{j$%HCUI;UyIFKoz+X7HAtJyPnFe2l`Tk% zEku_sR2OInyQL&!h&EfGHd~M;o2L@1ml99`YoI1us2)%aYk&r8fEKHr99x_*dz=YJ zyeVfq(0oJoC?ht1b=E*_R$EzCpi`rb*dw&r!gbj~v{}P-*uwN!V~p4m%-Q12Ijp6b zBlXzgP1xgrYIND641kC|T$epuk3GqZBgvdI&6+FCnkU(kGs%K8)`&gPoHN0kBgU8m z=yw|#7Aq+xV6a%`6T`o*i4(h^dV%^@>p%$hknsv{yQ^0UVc1A`4WZrzNwu&}bU*u7&H=g#IW z6%|#LvuAbv_;Ks!PiEGLi@Ax9xj1;Z_&9mF`wO~x*jFWV7;W2F7~UUNUS8hcIZ@?s aHV?zi_2TR2C7uuk`M}fF&t;ucLK6TDq^j)z diff --git a/signs/textures/signs_dir_texture.png b/signs/textures/signs_dir_texture.png deleted file mode 100644 index bcbbd688c0fbba833475d6b3dca0fc400793a1a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~4>K<_;~MU5n}I?Ro-U3d7N_4%+R1ysfQQ+?jeWs4 zd81nmnoP^TGcP&0GO$#^fi1z<-Rr$P+wnDw0d|v)DV1K0YjRAUoX^_FdoW|+@|MNZ s$}hN!PFDSAZJ`>##S>@g$yUSMal+&u=Z;?yKsy*bUHx3vIVCg!0BSWpWdHyG diff --git a/signs/textures/signs_poster_sides.png b/signs/textures/signs_poster_sides.png new file mode 100644 index 0000000000000000000000000000000000000000..ebb26de9d35ddfab5fff761b6750b2442abb0059 GIT binary patch literal 1106 zcmV-Y1g-mtP)^0SZEaSsKgh!N(|2MVlFzCsVZ)AVI{$&2LTJ05A}Y?SZ5;j1}vi z@7$LeNhiZfcxD*J7*_AZ+;<)~0PbOR9DQW0%V3A0J+}J3jV74xby!GK#5Nz7l(lm{`ChBKGxcZmgt$ zd(gKGEE>{-EIif%uNwp9aZMFx}tL=d6X;iRr|zJT@q{D>oKP6cd?cS|uALrVl@FRqlHNb zAER3Kn*a=$bFNUB!5Eo(QQk$&ntF892Ce88277gW#Iyu?-) z?s1H2W=oVkN7$m}O#pcS#@Ln^)AJUVD(u~q=)oY*yFb;4tOM6c>R7jLa|%u>(@-;W zJa?LfboK4jxEfm;f0F@~q1Dm#v6t5`gk**TAnOc`_|l@^0??lJNadqibH`Xcq_Sp$ zj{?(G^`~k2dEL*15yz;#cKRthv@SjvI(o$_--;6DS43DTqY${(x$5q?8xcB+5cR|4 zG%qOTP5XVb8z!59h-|Pi^Rq6V`@Swyi&erdfGmZ4GQ4`mXACq7tIp?sRKljaFIJ^k zr{kG=$EulW%@^+g_+f@A=6Cr(+KD~b9=}!BZ6W4_QGekG77;8tFCGiz0008LNklez-Xpyi1K5A@{yn4`P}dE0SkS*?Vv9-@f|_emtVw7NnQyaXCsx^lgtY1#R6RO^LEC0PcVO5CE|)D^}|b|NZqZ zjcze5fn^`&>MCWEZ`kHr^uA@CZP>G?(JkM7^u~d}Fa&+w5>FGnB&5|nLU{<~;Rg}x zvO-!8WmYjtB7dCW5HAVwgNPqLzK5A45&pe-!w{%@k$!HN8ju~ zSmcGd&xVr#aG;7-CPBSKNO2 zl%mkgXLBrZ&>+9cxu#c+i=#G(B#CJ19bMPs4P9E@)9-tBMS&$D3Wf|EljY?ST{q~u z!5g|*65{I|Z1Rf9=>%^Q18_1up+g;WAWWC0>12pc5?*@s9B&fe%z?Od#&VVtG>0zq zO#whrX#&@w(-m&$kf$r8GH7+jX1(IU505d!BqR#_V;fuDA4MFGlN)Vx!T|;b$})NI d{bRB$S6wFUqH002ovPDHLkV1nB zxFCQ#jGn-_BH;oa!-NZX2@)@ZVPy{y_yZni*%tnb%$AqGuk_9oDi^)v5lz z-zR`S+Unr$0GJtOMhJnNGpfp>7Bgq#mA0o(AMdigDTqjEsDGlWPHYEMgf#;8Fy%AfmkVy<3LW(A7=I#a5i2ciU=ts#v>zkgwfc^<^&NC za4D;?0#MAH)nz3&#vX%mfr!w#sfY+68t#f^M}m;e7>*o`P%nW-LCv|fUQy2?aUs@l zVgwh=oypV?Kz{>NQRplQ?#^hOK_QB8`_3vmYdxZwAtImv)ZxKK3ta?ADe>y{CsKx#i{A?k453pML4_*~4u20eIC(iFKG|Qx-7$j-At+3y z&hN(OEyrlFGgoqsBA%N$c00000NkvXXu0mjfa1{MV diff --git a/signs/textures/signs_wooden_inventory.png b/signs/textures/signs_wooden_inventory.png index e93ebe264bc7f0630c5de9c1e6218c672a88c709..d99748060bdf835d2f90e30bdfefc9c961873665 100644 GIT binary patch delta 595 zcmV-Z0<8Us3f=@WiBL{Q4GJ0x0000DNk~Le0000G0000G2nGNE03Y-JVE_OC24YJ` zL;(K){{a7>y{D6rF&KXbbV*G`2jK`76Dtp_VcgUJ00HYsL_t(I%hi)VYZGw*hM(X4 zzg$9c4K&dqrgbQ0P%P+BL9OECrzn0Arw%$Q?hZzWiWIR}Z3MBnD5i!Y1_i6MU`x|W zFUcjB+}+P1*e}pQd_TYg?>`}>iKCh6Ip_8kJj(j5j~sFl0*rLRwN2XsG5py8Q3XP z-g#CR07^ILKi6y#eqUa8mWixl$W&N8+(C%ZUQrPJwFK4H6 zbPoHt`7D0BgCF!cQE*XJonALUD3WNH5XT7sZazEqZyMtkbkky`{*%XVHqi`)SD&|e z{_z*X7(Bnr)AjGvn!6aLj$w|W!x-LgZlknYZFYC|xl(^A(hCMe!vs^;xHdCMb*+xB zt0;=#(y0lS-Zk<3F8iKO?L(7R%M;#hgt6#;9*(o%D<=O@SPR=0?_b}`fKfFESI3^hlKrt{6LOO>&>5RkO h<;Kwt#Qzt6ra!m-&6eAAOq2is002ovPDHLkV1gX$3FH6( literal 1289 zcmV+k1@`)hP)q~(g_id-&lLx3|FpwVcw1KR5gH(v+rsFSYq zo$hl^wFn{bE|+|#(H{U0fCs?;13>?4^Xo4@4MGZ9>kvw?*)#}xj4`;j!~2$WFhEHS z1e(U8m8A2YNJsRcM}(dpLFX(W{+XSi7Xje`33YvU?stEEE&dD8b{)U@@)t-H!z|(Y z@{+FiSlh6-zen!_)lJE|sTdD3l$J3Bv^fozx}fNHho_g@|G zw;wJLLZOX$a|3UlAkrH8K(#J#O~)u5^JwvyG)j4S_>x#f%(rID^9d@7NX?LT-QqVb zr-v`e)0koG2;x4VZ5>Tx@k(*_>V(Z^L$z9w zPjY7YHbuGSq9}0zhT}0l)+BifCZR*{{r5*?qXZL0L<$amI0UJQB7^T0AAk6a&p+8_ zJehKPTiyql*s$1JkO1@f45>U4M_Cl4!vsknSWjzP4!?WOkI#>2*A}f6JF^8JJblXH z!4Vg)UL%9x>HE(xC~nFPMhlk9l8?5BY)36wKDiGFZO!W+570qlBxre;37w~|N|Gcd z$`p~3!~?@*G$0xz$llX+o@P^Ft>b!m$>nu{Yc0#w6+a!H()9vccbuMG@T-qz479r6 z1-=KR2UK>2?_-?zBpVLVgxC zNrxjQ(~QOnHg$z-Ym|=Yq$H9(y;2yH6DJY6u8FllM3VEvW14lvVt1D;8&fO`F3SyH zeOK_s{{oUU!*+r3bcFAE-uwA8%-I!*QD_aVm)OlMqhU%nh-p{1gw}C+al>kL!`}X5 zM(GwWj$bgHK4N=5WoI_Qk8^ZnD2i*2kB<4an$Y~mC+rQNx-EI}%{NFKPu_cm)IEKD z!+Hgs3gm+UqpdCCG^1bFBw0$+2NsWa*cS^-l2SXzho5{5UVzq2@&!bis=Q@)vd@j0 z^5W0WQSvQC82X-cXU_I?3lSVf8RmPtR8@;G2}OCuG)_=Pk}sw->x$)1C*;!+gKUJB zF~|*V+aa|=X@z$kwp{b-^n}r9#vlK3KxZA$-v^j1<Cbp*?)oy9p!3;_dQQ` zci8>eBV1bphT`Iy&8A|KPw-6x%He{gwKbj|*E!BF3-U=uU2j;Oo$;r?pL20_%V;#g zzYP#6#c%)cHA*SEeu*OBeLzPMU3)~esYsHTyCE9zwx#bq&N;M-?)ph6l#*E6q67#8 z0T3b(dXI?{n${xZzelln_?ABa9sm!3cMbRl(Geq4I_||U00000NkvXXu0mjfdG1J~ diff --git a/signs_road/README.md b/signs_road/README.md index e042855..c09c82e 100644 --- a/signs_road/README.md +++ b/signs_road/README.md @@ -2,6 +2,8 @@ This mod provides road signs with text display. Text is locked if area is protected. +For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=13563) at the Minetest forums. + **Dependancies**: default, display\_lib, font\_lib, signs **License**: Code under LGPL, texture under CC-BY-SA @@ -10,19 +12,19 @@ This mod provides road signs with text display. Text is locked if area is protec **Blue Street Sign** - B W S + B W - S S S - - - B = Blue Dye, W = White Dye, S = Steel Ingot -**Green Street Sign** +**Red and White Street Sign** - G W S - S S S + W R - + S S S - - - -G = Green Dye, W = White Dye, S = Steel Ingot +W = White Dye, R = Red Dye, S = Steel Ingot **Black direction sign** @@ -32,3 +34,33 @@ G = Green Dye, W = White Dye, S = Steel Ingot B = Black Dye, W = White Dye, S = Steel Ingot +**White Signs** + +Two kinds of signs, normal and direction signs : + + W B - W B S + S S S S S - + - - - - - - + +W = White Dye, B = Black Dye, S = Steel Ingot + +**Green Signs** + +Two kinds of signs, normal and direction signs : + + G W - G W S + S S S S S - + - - - - - - + +G = Green Dye, W = White Dye, S = Steel Ingot + +**Yellow Signs** + +Two kinds of signs, normal and direction signs : + + Y B - Y B S + S S S S S - + - - - - - - + +Y = Yellow Dye, B = Black Dye, S = Steel Ingot + diff --git a/signs_road/compatibility.lua b/signs_road/compatibility.lua new file mode 100644 index 0000000..4ef25ba --- /dev/null +++ b/signs_road/compatibility.lua @@ -0,0 +1,58 @@ +--[[ + signs mod for Minetest - Various signs with text displayed on + (c) Pierre-Yves Rollo + + This file is part of signs. + + signs is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + signs is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with signs. If not, see . +--]] + +-- Wallmounted to facedir conversion +local wallmounted_to_facedir = { + [0]=1, -- Should not happend with signs + [1]=1, -- Should not happend with signs + [2]=1, + [3]=3, + [4]=0, + [5]=2 +} + +-- Nodes conversions +local convert_nodes = { + ['signs_road:blue_street'] = 'signs_road:blue_street_sign', + ['signs_road:green_street'] = 'signs_road:green_street_sign', + ['signs_road:black_right'] = 'signs_road:black_right_sign', + ['signs_road:black_left'] = 'signs_road:black_left_sign', + ['signs_road:green_right'] = 'signs_road:green_right_sign', + ['signs_road:green_left'] = 'signs_road:green_left_sign' +} + +local function compatibility_check(pos, node) + -- Old wallmounted modes to new facedir nodes conversion + node.name = convert_nodes[node.name] + if node.name then + node.param2 = wallmounted_to_facedir[node.param2] + display_lib.on_destruct(pos) + minetest.swap_node(pos, node) + display_lib.on_construct(pos) + end +end + +minetest.register_lbm({ name = "signs_road:conpatibility_1", + nodenames = {'signs_road:blue_street', 'signs_road:green_street', 'signs_road:black_right', + 'signs_road:black_left', 'signs_road:green_right', 'signs_road:green_left'}, + action = compatibility_check, +}) + + diff --git a/signs_road/copyright.txt b/signs_road/copyright.txt index 20965d5..b752dff 100644 --- a/signs_road/copyright.txt +++ b/signs_road/copyright.txt @@ -1 +1,4 @@ -Code, Textures and Models by Pierre-Yves Rollo +Code, Textures and Models by Pierre-Yves Rollo (pyrollo) +intllib support (i18n) by fat115 +intllib fallback code and tools by Diego Martínez (kaeza) + diff --git a/signs_road/crafts.lua b/signs_road/crafts.lua index 670b7e2..0a0c205 100644 --- a/signs_road/crafts.lua +++ b/signs_road/crafts.lua @@ -20,25 +20,53 @@ --]] minetest.register_craft({ - output = 'signs_road:blue_street', + output = 'signs_road:blue_street_sign 2', recipe = { - {'dye:blue', 'dye:white', 'default:steel_ingot'}, + {'dye:blue', 'dye:white', ''}, {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, {'', '', ''}, } }) minetest.register_craft({ - output = 'signs_road:green_street', + output = 'signs_road:red_street_sign 2', recipe = { - {'dye:green', 'dye:white', 'default:steel_ingot'}, + {'dye:white', 'dye:red', ''}, {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, {'', '', ''}, } }) minetest.register_craft({ - output = 'signs_road:black_right', + output = 'signs_road:white_street_sign 2', + recipe = { + {'dye:white', 'dye:black', ''}, + {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, + {'', '', ''}, + } +}) + +minetest.register_craft({ + output = 'signs_road:green_street_sign 2', + recipe = { + {'dye:green', 'dye:white', ''}, + {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, + {'', '', ''}, + } +}) + +minetest.register_craft({ + output = 'signs_road:yellow_street_sign 2', + recipe = { + {'dye:yellow', 'dye:black', ''}, + {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, + {'', '', ''}, + } +}) + + +minetest.register_craft({ + output = 'signs_road:black_right_sign 2', recipe = { {'dye:black', 'dye:white', 'default:steel_ingot'}, {'default:steel_ingot', 'default:steel_ingot', ''}, @@ -46,3 +74,30 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'signs_road:green_right_sign 2', + recipe = { + {'dye:green', 'dye:white', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:steel_ingot', ''}, + {'', '', ''}, + } +}) + +minetest.register_craft({ + output = 'signs_road:yellow_right_sign 2', + recipe = { + {'dye:yellow', 'dye:white', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:steel_ingot', ''}, + {'', '', ''}, + } +}) + +minetest.register_craft({ + output = 'signs_road:white_right_sign 2', + recipe = { + {'dye:white', 'dye:black', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:steel_ingot', ''}, + {'', '', ''}, + } +}) + diff --git a/signs_road/depends.txt b/signs_road/depends.txt index e6b5e54..730e727 100644 --- a/signs_road/depends.txt +++ b/signs_road/depends.txt @@ -1,6 +1,6 @@ default +intllib? dye display_lib font_lib signs -intllib? diff --git a/signs_road/init.lua b/signs_road/init.lua index 60c1b66..cd95c6c 100644 --- a/signs_road/init.lua +++ b/signs_road/init.lua @@ -20,12 +20,18 @@ --]] signs_road = {} -signs_road.path = minetest.get_modpath("signs_road") +signs_road.name = minetest.get_current_modname() +signs_road.path = minetest.get_modpath(signs_road.name) -- Load support for intllib. -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S, NS = dofile(signs_road.path.."/intllib.lua") signs_road.intllib = S dofile(signs_road.path.."/nodes.lua") dofile(signs_road.path.."/crafts.lua") +dofile(signs_road.path.."/compatibility.lua") + + + + + diff --git a/signs_road/locale/fr.po b/signs_road/locale/fr.po index 8208347..833f115 100644 --- a/signs_road/locale/fr.po +++ b/signs_road/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-05 09:50+0200\n" +"POT-Creation-Date: 2017-08-26 11:26+0200\n" "PO-Revision-Date: 2017-05-08 06:40+0200\n" "Last-Translator: Peppy \n" "Language-Team: \n" @@ -22,14 +22,35 @@ msgstr "" msgid "Blue street sign" msgstr "Plaque de rue bleue" +#: nodes.lua +msgid "Red and white town sign" +msgstr "Panneau de ville rouge et blanc" + +#: nodes.lua +msgid "White street sign" +msgstr "Panneau blanc" + #: nodes.lua msgid "Green street sign" -msgstr "Plaque de rue verte" +msgstr "Panneau vert" + +#: nodes.lua +msgid "Yellow street sign" +msgstr "Panneau jaune" #: nodes.lua msgid "Black direction sign" -msgstr "Panneau indicateur noir" +msgstr "Panneau de direction noir" #: nodes.lua msgid "Green direction sign" -msgstr "Panneau indicateur vert" +msgstr "Panneau de direction vert" + +#: nodes.lua +msgid "Yellow direction sign" +msgstr "Panneau de direction jaune" + +#: nodes.lua +msgid "White direction sign" +msgstr "Panneau de direction blanc" + diff --git a/signs_road/locale/template.pot b/signs_road/locale/template.pot index 1b5cfae..b15ce94 100644 --- a/signs_road/locale/template.pot +++ b/signs_road/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-05 09:50+0200\n" +"POT-Creation-Date: 2017-08-26 11:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,10 +21,22 @@ msgstr "" msgid "Blue street sign" msgstr "" +#: nodes.lua +msgid "Red and white town sign" +msgstr "" + +#: nodes.lua +msgid "White street sign" +msgstr "" + #: nodes.lua msgid "Green street sign" msgstr "" +#: nodes.lua +msgid "Yellow street sign" +msgstr "" + #: nodes.lua msgid "Black direction sign" msgstr "" @@ -32,3 +44,11 @@ msgstr "" #: nodes.lua msgid "Green direction sign" msgstr "" + +#: nodes.lua +msgid "Yellow direction sign" +msgstr "" + +#: nodes.lua +msgid "White direction sign" +msgstr "" diff --git a/signs_road/nodes.lua b/signs_road/nodes.lua index 980d4a3..9b7f205 100644 --- a/signs_road/nodes.lua +++ b/signs_road/nodes.lua @@ -22,134 +22,290 @@ local S = signs_road.intllib local models = { - blue_street={ + blue_street_sign = { depth = 1/16, width = 14/16, height = 12/16, entity_fields = { resolution = { x = 144, y = 64 }, maxlines = 3, - color="#fff", + color = "#fff", }, node_fields = { - description=S("Blue street sign"), - tiles={"signs_blue_street.png"}, - inventory_image="signs_blue_street_inventory.png", + description = S("Blue street sign"), + tiles = { "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_blue.png" }, + inventory_image = "signs_road_blue.png", }, }, - green_street={ - depth = 1/32, + red_street_sign = { + depth = 1/16, width = 1, - height = 6/16, + height = 7/16, entity_fields = { resolution = { x = 96, y = 64 }, maxlines = 1, - color="#fff", + color = "#000", }, node_fields = { - description=S("Green street sign"), - tiles={"signs_green_street.png"}, - inventory_image="signs_green_street_inventory.png", + description = S("Red and white town sign"), + tiles = { "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_red_white.png" }, + inventory_image="signs_road_red_white.png", }, }, - black_right={ + white_street_sign = { + depth = 1/16, + width = 1, + height = 7/16, + entity_fields = { + resolution = { x = 96, y = 64 }, + maxlines = 2, + color = "#000", + }, + node_fields = { + description = S("White street sign"), + tiles = { "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_white.png" }, + inventory_image = "signs_road_white.png", + }, + }, + green_street_sign = { + depth = 1/16, + width = 1, + height = 7/16, + entity_fields = { + resolution = { x = 96, y = 64 }, + maxlines = 2, + color = "#fff", + }, + node_fields = { + description = S("Green street sign"), + tiles = { "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_green.png" }, + inventory_image = "signs_road_green.png", + }, + }, + yellow_street_sign = { + depth = 1/16, + width = 1, + height = 7/16, + entity_fields = { + resolution = { x = 96, y = 64 }, + maxlines = 2, + color = "#000", + }, + node_fields = { + description = S("Yellow street sign"), + tiles = { "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_yellow.png" }, + inventory_image="signs_road_yellow.png", + }, + }, + black_right_sign = { + depth = 1/32, + width = 1, + height = 0.5, + entity_fields = { + resolution = { x = 96, y = 64 }, + maxlines = 1, + color = "#000", + }, + node_fields = { + description = S("Black direction sign"), + tiles = { "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_black_dir_right.png" }, + inventory_image = "signs_road_black_dir_inventory.png", + signs_other_dir = "signs_road:black_left_sign", + on_place = signs.on_place_direction, + on_rightclick = signs.on_right_click_direction, + }, + }, + black_left_sign = { depth = 1/32, width = 1, height = 0.5, entity_fields = { resolution = { x = 96, y = 64 }, maxlines = 1, - color="#000", + color = "#000", }, node_fields = { - description=S("Black direction sign"), - tiles={"signs_black_right.png"}, - inventory_image="signs_black_inventory.png", - on_place=signs.on_place_direction, - on_rightclick=signs.on_right_click_direction, + description = S("Black direction sign"), + tiles = { "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_sides.png", + "signs_road_sides.png", "signs_road_black_dir_left.png" }, + inventory_image = "signs_road_black_dir_inventory.png", + signs_other_dir = "signs_road:black_right_sign", + groups = { not_in_creative_inventory = 1 }, + drop = "signs_road:black_right_sign", + on_place = signs.on_place_direction, + on_rightclick = signs.on_right_click_direction, }, }, - black_left={ - depth = 1/32, - width = 1, - height = 0.5, - entity_fields = { - resolution = { x = 96, y = 64 }, - maxlines = 1, - color="#000", - }, - node_fields = { - description=S("Black direction sign"), - tiles={"signs_black_left.png"}, - inventory_image="signs_black_inventory.png", - groups={not_in_creative_inventory=1}, - drop="signs_road:black_right", - on_place=signs.on_place_direction, - on_rightclick=signs.on_right_click_direction, - }, - }, - green_right={ + + green_right_sign = { depth = 1/16, width = 14/16, height = 7/16, entity_fields = { + right = -3/32, size = { x = 12/16, y = 6/16 }, resolution = { x = 112, y = 64 }, maxlines = 2, - color="#fff", + color = "#fff", }, node_fields = { - description=S("Green direction sign"), - tiles={"signs_green_direction.png"}, - inventory_image="signs_green_dir_inventory.png", - on_place=signs.on_place_direction, + description = S("Green direction sign"), + tiles = { "signs_road_green_direction.png" }, + inventory_image = "signs_road_green_dir_inventory.png", + signs_other_dir = "signs_road:green_left_sign", + on_place = signs.on_place_direction, on_rightclick = signs.on_right_click_direction, drawtype = "mesh", mesh = "signs_dir_right.obj", - selection_box = { type="wallmounted", - wall_side = {-0.5, -7/32, -7/16, -7/16, 7/32, 0.5}, - wall_bottom = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, - wall_top = {-0.5, 0.5, -0.5, 0.5, 7/16, 0.5}}, - collision_box = { type="wallmounted", - wall_side = {-0.5, -7/32, -7/16, -7/16, 7/32, 0.5}, - wall_bottom = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, - wall_top = {-0.5, 0.5, -0.5, 0.5, 7/16, 0.5}}, + selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, + collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, }, }, - green_left={ + green_left_sign = { depth = 1/16, width = 14/16, height = 7/16, entity_fields = { + right = 3/32, size = { x = 12/16, y = 6/16 }, resolution = { x = 112, y = 64 }, maxlines = 2, color="#fff", }, node_fields = { - description=S("Green direction sign"), - tiles={"signs_green_direction.png"}, - inventory_image="signs_green_dir_inventory.png", + description = S("Green direction sign"), + tiles = { "signs_road_green_direction.png" }, + inventory_image = "signs_road_green_dir_inventory.png", + signs_other_dir = "signs_road:green_right_sign", + on_place = signs.on_place_direction, + on_rightclick = signs.on_right_click_direction, + drawtype = "mesh", + mesh = "signs_dir_left.obj", + selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, + collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, + groups = { not_in_creative_inventory = 1 }, + drop = "signs_road:green_right_sign", + }, + }, + yellow_right_sign = { + depth = 1/16, + width = 14/16, + height = 7/16, + entity_fields = { + right = -3/32, + size = { x = 12/16, y = 6/16 }, + resolution = { x = 112, y = 64 }, + maxlines = 2, + color = "#000", + }, + node_fields = { + description = S("Yellow direction sign"), + tiles = { "signs_road_yellow_direction.png" }, + inventory_image = "signs_road_yellow_dir_inventory.png", + signs_other_dir = "signs_road:yellow_left_sign", + on_place = signs.on_place_direction, + on_rightclick = signs.on_right_click_direction, + drawtype = "mesh", + mesh = "signs_dir_right.obj", + selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, + collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, + }, + }, + yellow_left_sign = { + depth = 1/16, + width = 14/16, + height = 7/16, + entity_fields = { + right = 3/32, + size = { x = 12/16, y = 6/16 }, + resolution = { x = 112, y = 64 }, + maxlines = 2, + color = "#000", + }, + node_fields = { + description = S("Yellow direction sign"), + tiles = { "signs_road_yellow_direction.png" }, + inventory_image = "signs_road_yellow_dir_inventory.png", + signs_other_dir = "signs_road:yellow_right_sign", + on_place = signs.on_place_direction, + on_rightclick = signs.on_right_click_direction, + drawtype = "mesh", + mesh = "signs_dir_left.obj", + selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, + collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, + groups = { not_in_creative_inventory = 1 }, + drop = "signs_road:yellow_left_sign", + }, + }, + white_right_sign = { + depth = 1/16, + width = 14/16, + height = 7/16, + entity_fields = { + right = -3/32, + size = { x = 12/16, y = 6/16 }, + resolution = { x = 112, y = 64 }, + maxlines = 2, + color = "#000", + }, + node_fields = { + description = S("White direction sign"), + tiles = { "signs_road_white_direction.png" }, + inventory_image = "signs_road_white_dir_inventory.png", + signs_other_dir = "signs_road:white_left_sign", + on_place = signs.on_place_direction, + on_rightclick = signs.on_right_click_direction, + drawtype = "mesh", + mesh = "signs_dir_right.obj", + selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, + collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, + }, + }, + white_left_sign = { + depth = 1/16, + width = 14/16, + height = 7/16, + entity_fields = { + right = 3/32, + size = { x = 12/16, y = 6/16 }, + resolution = { x = 112, y = 64 }, + maxlines = 2, + color = "#000", + }, + node_fields = { + description = S("White direction sign"), + tiles = { "signs_road_white_direction.png" }, + inventory_image = "signs_road_white_dir_inventory.png", + signs_other_dir = "signs_road:white_right_sign", on_place=signs.on_place_direction, on_rightclick = signs.on_right_click_direction, drawtype = "mesh", mesh = "signs_dir_left.obj", - selection_box = { type="wallmounted", - wall_side = {-0.5, -7/32, -0.5, -7/16, 7/32, 7/16}, - wall_bottom = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, - wall_top = {-0.5, 0.5, -0.5, 0.5, 7/16, 0.5}}, - collision_box = { type="wallmounted", - wall_side = {-0.5, -7/32, -0.5, -7/16, 7/32, 7/16}, - wall_bottom = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, - wall_top = {-0.5, 0.5, -0.5, 0.5, 7/16, 0.5}}, - groups={not_in_creative_inventory=1}, - drop="signs_road:green_right", + selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, + collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, + groups = { not_in_creative_inventory = 1 }, + drop = "signs_road:white_right_sign", }, }, } +-- Node registration for name, model in pairs(models) do signs.register_sign("signs_road", name, model) end + diff --git a/signs_road/svg/green_street.svg b/signs_road/svg/green_street.svg new file mode 100644 index 0000000..89d8474 --- /dev/null +++ b/signs_road/svg/green_street.svg @@ -0,0 +1,108 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/signs_road/svg/signs_black.svg b/signs_road/svg/signs_black.svg new file mode 100644 index 0000000..8e9b8a9 --- /dev/null +++ b/signs_road/svg/signs_black.svg @@ -0,0 +1,128 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/signs_road/svg/signs_blue_street.svg b/signs_road/svg/signs_blue_street.svg new file mode 100644 index 0000000..0aa87ff --- /dev/null +++ b/signs_road/svg/signs_blue_street.svg @@ -0,0 +1,139 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/signs_road/svg/signs_green_direction.svg b/signs_road/svg/signs_green_direction.svg new file mode 100644 index 0000000..3cdbc77 --- /dev/null +++ b/signs_road/svg/signs_green_direction.svg @@ -0,0 +1,168 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/signs_road/svg/signs_road_black_direction.svg b/signs_road/svg/signs_road_black_direction.svg new file mode 100644 index 0000000..f513524 --- /dev/null +++ b/signs_road/svg/signs_road_black_direction.svg @@ -0,0 +1,172 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/signs_road/svg/signs_road_red.svg b/signs_road/svg/signs_road_red.svg new file mode 100644 index 0000000..513b970 --- /dev/null +++ b/signs_road/svg/signs_road_red.svg @@ -0,0 +1,123 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/signs_road/svg/signs_yellow_direction.svg b/signs_road/svg/signs_yellow_direction.svg new file mode 100644 index 0000000..1414a5c --- /dev/null +++ b/signs_road/svg/signs_yellow_direction.svg @@ -0,0 +1,168 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/signs_road/svg/white_street.svg b/signs_road/svg/white_street.svg new file mode 100644 index 0000000..f33bc02 --- /dev/null +++ b/signs_road/svg/white_street.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/signs_road/svg/yellow_street.svg b/signs_road/svg/yellow_street.svg new file mode 100644 index 0000000..ea26f30 --- /dev/null +++ b/signs_road/svg/yellow_street.svg @@ -0,0 +1,108 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/signs_road/textures/signs_blue_street_inventory.png b/signs_road/textures/signs_blue_street_inventory.png deleted file mode 100644 index a702669d5262356df298b79adc6fb7d13948b435..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 472 zcmV;}0Vn>6P)9eFrZiB21~fN!<+q zfLUKK=Ktz45S`d(LAWjAlCrFzEGx*e*3>jt(xs-kl4Y%j^MNJxzOykpAp#r@uh?#% zwcIvIA_x(T_E`T78S}}q?jb~g-R=pVCs3AWEdZ|TAkSm$_b-U!BQBTs;R%!_lrn{F z&$XHZKv|yQc>=aQhm@((Qzk%k0%N{5<1zIfqZ61y2EYIq00UqE41faAwjGirg6lfk zja=73l0<0R?t1{vLsV6bJdd?P^ns+RYH%JZJtYrh*)4(<#T#sUt~HWXRgJ~s0RXUC zMMEAK&4h7$gp?^Zn@24GZQFtKZ~*u!Wdd5aUFyioit`w00r4gJbhi+AMl6>>lw+ezL^IUI_Bx(7!q;#?Nmj+LkK$$K4(zQ-2& z9$r^DsY=9ruNtcXooTjnW-oKAe;q>%lZrEPlref~Mj_iBEhn6PhWdBWub$7Z`rhQ(VO zZ0Hn-4!LlZ@y4R2cQ+@@Z7qEuqj2cxd4rqA^$%nW&hBn-?1@fDkP%q+wqdJ5lGKU? z%U3gRV71-zLw;?a`)%gMZyPUuJCISGu*KHkmYhT`KTk~}U&Kt=tYE{-7) zt#7X=@-;gMxIH|+Y zrskP5CoB}xV;C4&1RjVqa3A>e+hC8{z1!DSqvG>>e9tdlqjBcUyYuIC_qnfmD>MIq z^}hVH`;3e%90L1WzAs5*keGc>bRwUi0RP13p9$wSGBa@~G%#2`=U~}U&Kt)qLT^vIq zTHjt#xLtgu>7hyn&sGT&&gT+GmU+5<<>CAv^Pn~< zZPH9ZOUo^K4Gc^i3?d3&M8z6@|2|n@ZCo3tcQJNz>YFOQ+0#dZ#WD$6bP0l+XkK;1gtj diff --git a/signs_road/textures/signs_black_inventory.png b/signs_road/textures/signs_road_black_dir_inventory.png similarity index 100% rename from signs_road/textures/signs_black_inventory.png rename to signs_road/textures/signs_road_black_dir_inventory.png diff --git a/signs_road/textures/signs_black_left.png b/signs_road/textures/signs_road_black_dir_left.png similarity index 100% rename from signs_road/textures/signs_black_left.png rename to signs_road/textures/signs_road_black_dir_left.png diff --git a/signs_road/textures/signs_black_right.png b/signs_road/textures/signs_road_black_dir_right.png similarity index 100% rename from signs_road/textures/signs_black_right.png rename to signs_road/textures/signs_road_black_dir_right.png diff --git a/signs_road/textures/signs_blue_street.png b/signs_road/textures/signs_road_blue.png similarity index 100% rename from signs_road/textures/signs_blue_street.png rename to signs_road/textures/signs_road_blue.png diff --git a/signs_road/textures/signs_road_green.png b/signs_road/textures/signs_road_green.png new file mode 100644 index 0000000000000000000000000000000000000000..8512fb1d915bfc41c6eadf2cfbcd439d631b605c GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt=03T^vIq zTHju^q~(;{vXE6PUvAxIz{!0fvfazc<@xf75_5SAL??G1 zVLGRAZgb=NvzdGvOGC~vz2AG@cmc}Dr>iPk%5 u0e4}kg`(2siBm0RG1Y(QnG&Q`F2DPlmjB;o`Kv&eGkCiCxvX~}U&Kt(@1T^vIq zTHj7J^kPmFaJw(A#3+10DS{(T!K|uzE01Q&fn}S-Spq*WOk!qXIVc=)G;3nQY_+W` znXWY{a45NGpS+=xICYD)+2>t}Y|s9F7PV(_6ksV{Q{fl>HZ;!RZnKlzb$@+N>61Je z-lsn84N{c;UtqN3(bvy=S?O~_<`UH zk6&fNFW#sv>1BDqYB9xxbvZ}T^7%}TBJAPP9+H#cusw TEaVX|3>Z9J{an^LB{Ts5FAI>* literal 0 HcmV?d00001 diff --git a/signs_road/textures/signs_road_green_direction.png b/signs_road/textures/signs_road_green_direction.png new file mode 100644 index 0000000000000000000000000000000000000000..c4c8d109417b9227f18daba88070291cb6d088b1 GIT binary patch literal 1083 zcmV-B1jPG^P)w$e3W67XgT)6B1i^>UlZa=%c$w2O zqYFNQAgHrD-SsCk!b4ToRF6I4!RZZXx;i?tBI1k8?@M8}=g*(Jh%okKeefx7pFG&7Vlz8R@(TI;%S);%91VJzt!Zl9 zjZoAMz@Pnaw9}B1VP?qdx(}S4oq3G$_1y=|jd2{W3kX30rLH3>*{szDa|gxOR7!LI zjXht9OUc-VtH~!dv8h-ioKoWPuypq3KGTt zZwMT^O}X1bZX&{N*WnndI66nBJt0KurlH$)s46LCLWrme zp)gV*8h4+9bRcD@QXs^7Nxo*WbzGEdogW9os}aY@$*HtL6rfoU=(=tyqU&}5^g}-% zn@ODNSR*peY#azdG0P0&Kv}bn8-@w)S_KthyWL{uG)+y2)sooEr{YCPX++EJZ0d%7 z=qchPqJ*lV+!s=s;9c+NbzJfF+330+1VX3?Rlv=c#AWv8QxTysQj8OcsOTQ`mJL_P zq^aA5#ST$4jQFJUG<8GDiLUD~H^O{8EoV;OJ(cB3w%N4H5vl7McP9_sl3)#Wfq%1U z_u{e{q7%nAO^u+WoEXP(zIf=O3AQ>ZVH`)4K&TZ}y;j4l^t*0P4MSDYrIE5`9k*7) zmoG2bY);r+ZWlEykl$3rkh38%qZ;pA4cDC)`x}8JLi0{~N0a~n002ovPDHLkV1nmS B{{8>} literal 0 HcmV?d00001 diff --git a/signs_road/textures/signs_road_red_white.png b/signs_road/textures/signs_road_red_white.png new file mode 100644 index 0000000000000000000000000000000000000000..7afc6581bc5c9e0c22fa23260ec601fe6c8b1259 GIT binary patch literal 302 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt-!PT^vIq zTHj9D&D&xizeb>i8rT{hlr8B^UlOY;(U!QUXYvwr zW;=#6#wD^9{O9gk-%G!~DTb+yaTZ$;)609FoUg2`8C5(LJq%wNCY|x~{K+<_xwd^% zP1?ufjQ90Do^!<=VbW1xZ((@-YffqG!c}^Vx!jjoZkO$^xt$=hS@@j0$@!q`p00)8 p<)`eK{wpqO+G%AYp2I)V>+AxhKOd~w^%m%C22WQ%mvv4FO#m1XYeWD5 literal 0 HcmV?d00001 diff --git a/signs_road/textures/signs_road_sides.png b/signs_road/textures/signs_road_sides.png new file mode 100644 index 0000000000000000000000000000000000000000..7afd08eb7a56ce7a56fe7d52ca870c820f66f197 GIT binary patch literal 374 zcmV-+0g3*JP)CdN%F4pR!lI(0nVFf>)YQPi zz`nk|mzS5;($UPy&dklt&dbT3o}QJJm6MZ`yS%!%xVW#cug}lU(9+E?z=xIq000Sa zNLh0L01FcU01FcV0GgZ_00007bV*G`2jK`81`QoPS13jR005>*L_t&-(^XE{iUTnW zlMj3Z5}1TJ9$I$)|10azrwR;~ED0ksfiq!ti3kghJZchT&Hx1X<$^^1RVano0NauB zYzPrYvmJ?>x0xQAtAXouQT6{HVX6znB<{@Y)U+hnR_;z`c6F}~vH`Gl>SolnfvDGe z6t$C&sa47J@NMSdZHx()>+}fKm#*SF?@bG9Y1299moHtfFQ32@tO=u<5X=vX`rBFiEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0u=o-U3d z5v^~p81fxf5OBHJ|IqK)_w^H5O`oYmOg_|A+^l-kjRExkozBNx6Z4R)VpT6On zZ83Ak+L`Ptw(hHbI;S*t`c08Hd$aF~}U&Kt=OBT^vIq zTHj7pIrv49jZE=4hSZEU1?nJyY}nb$j`TD&vfE=tR!)(#qxP!vPJbT!|oTaL+|VmvsXS| c_;0%OBaOVOst@T+K$kLjy85}Sb4q9e01-`Q^#A|> literal 0 HcmV?d00001 diff --git a/signs_road/textures/signs_road_white_direction.png b/signs_road/textures/signs_road_white_direction.png new file mode 100644 index 0000000000000000000000000000000000000000..e6ae65827b8b2d2a9601b58352caa48effadaadd GIT binary patch literal 1096 zcmV-O1h@N%P)d;9h+XJ==`7y)c~<^mdV503ehCr^0y?j0#5cDvn=2%N%Ry?Vv@`8oUjzPb!B zF*V!?P^hhV`t<2B0^SRGN+&6xw&JLOoE0D9sjeX7IP$|aJQV`pzJ24(n>WV=n4J!R z*RNmm<;$02Dpu8#B!B<@Js&=NV7J?`-|xA+{4^uroa3R3sL;n4*K1fxo(s6Tx}s_P zgG2xI>sL}rRSR6(M$8mn)eiV6Uq6K9tf=a(GM#!J`1tXog%JL~c|c8>rs=i-?*$NI z4CJiKw4$)=p!(WIXn)-u`D$Fw%8kFCeJ&E(hAqN5XP!TQ?tpb8QUj_e)n6xWP5y6v z^}_%r1vA4rAuU8_c8pfvceiKY^74~8aa3`tGF|6|t*`FBQVP()-|UzUUKkjhA=w)XY={`(A@mV1-e zHQTst^7TC@%#1M&>&{gb?;CQSP&K47QcY&2bX^O@VP-#t`fi+=E{|a@<3nJ~#+XLD z55%@*I1GpgITySSh&X&@q)IeqHU~)}7ihA_hqxx+ve-5*xUl{|CB>QvLn+y4q`?V5 zyCN_Q!(7BL9OgkGjmx!}#VLk}b4$;rg!h7KAx(+8W*e8%40jZVILFP+4XQ@lMto@2 z#HuzI?}VHuq@K<;wv1_{ij#AKZyM^nkn;@h_C#;vs&6dHFpS{9`v%{5Ol?hEd#^SZ z;VUDBFq4QlIilWr;3}E4v0GW}K8l73n{}Qxw&ao-h5eYakb z7$aszNyD083w4FR@4KV8qKcE5()3gj8vTA~EZi=6#3Blu|AR@PFScLH~ z9I2si8iqVk*KFgqYPjED(f5xyT-~f{SRucwioO)Zg@Q~}U&Kt*#rT^vIq zTHjvX$ayG0r1jx_aqj5?Izcx%G>@p>QBYYBjvf^+TMF@75&Zy$00$-C`$qQmDF zg$=S7wr$`z*jQV0tK{3uc&P=9e81Eab91a3ULUS=D4fsZVN_B7=F$39`G@3d+?15= b)iU1wF1L5P>Q^nGI~hD({an^LB{Ts5Z8~aa literal 0 HcmV?d00001 diff --git a/signs_road/textures/signs_road_yellow_dir_inventory.png b/signs_road/textures/signs_road_yellow_dir_inventory.png new file mode 100644 index 0000000000000000000000000000000000000000..8b56025488ecabb959570e292af50c650c73f284 GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt-25T^vIq zTHju^&2n-SIr=evO)k^QmNf@+6qYt=@^r8;-E=HqzxFa`GiPp4#x%k51a*xz6SJQO zmVB7GM_i{guK2&f(Sq*cXEHmS1y~$E9REJiKY#uU&wB@+zd7K4YRBGmlZ}q-{wI0Y z+}n|{DI)T*(B->pieyeIr7yR!YtTAo;h)8Di+5M}g0yJosV<^#PJ}X^&rtVna1y<6 zNMR*o#ea=^lfwh@H`KUFihlXE|B?QVgW*QZhYc5V&Uh@9Eu^zopr0P#J8R{#J2 literal 0 HcmV?d00001 diff --git a/signs_road/textures/signs_road_yellow_direction.png b/signs_road/textures/signs_road_yellow_direction.png new file mode 100644 index 0000000000000000000000000000000000000000..f5b1b18fcb40546ce092c0487f86793c650390f4 GIT binary patch literal 1095 zcmV-N1i1T&P)T+RTbqW< zVIYr%aU8gN_Z|Rdh14fh6eaB00Ti3=yWJ(*?Hz``CxigN%a<>O0}|?kYJ*w9weaU< z!ps5KY&Mt`LM_m0*K zU2cGP_!r5!QG|8E~KH^ytl(voJZ1b!(m@}xlu2H&o-rmzy zyPS=ya5?FuC3el?@Z{vgbIv?`_)q}O&dx}wpNMF^6V$t?EYAO}4xnqhY0_xH-4RiS zndsd2(b{e|*9f>dWxk6FbxhZNVXdo~-_(_o>4%=CX^0`BIw2sU48uT-k*7aBbyZ~? zN0e}lKnRMPvmQ=4+v32@A!pY1Yde6hYuRqL#1H|v+Rf!?nx*DxmoPI*FiYWCYld-{y5fNI`p(*J z?R^oZ8qTGS_Sz2thF`4C6q3XKgnO6Wpx|D#F#(6=qJ?wS?F#j?H`u zUX+|iw4Tnc?dXS|I-Eq5&@|M2A?FF+^@(2FRb5|dp&>K@H(wmr+M7>7gi5V3 zP9&nDd(>MGTqTpP-7Iu`h@xS{r#Vm8cI1*tDPeAexjn5E9)IvymX&O~-7GEAwk_^X z8Peil4RwWoyWQ;B6*EL9j_33;w8iuAJ z<#A!LwcUCezIt`Rc6*22#nmzmE98$JJ=*_oSc)OBpc-#|8m=?1@)!OHG~?IaIxGMH N002ovPDHLkV1g#_3RD09 literal 0 HcmV?d00001 diff --git a/steles/README.md b/steles/README.md index 7b621dc..e83a6af 100644 --- a/steles/README.md +++ b/steles/README.md @@ -2,6 +2,8 @@ This mod provides stone steles with text display. Text is locked if area is protected. +For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=13563) at the Minetest forums. + **Dependancies**: default, display\_lib, font\_lib, technic? (Technic adds marble and granite steles) diff --git a/steles/init.lua b/steles/init.lua index a84a596..e5d2430 100644 --- a/steles/init.lua +++ b/steles/init.lua @@ -19,11 +19,11 @@ --]] steles = {} -steles.path = minetest.get_modpath("steles") +steles.name = minetest.get_current_modname() +steles.path = minetest.get_modpath(steles.name) -- Load support for intllib. -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S, NS = dofile(steles.path.."/intllib.lua") steles.intllib = S dofile(steles.path.."/config.lua") diff --git a/steles/locale/template.pot b/steles/locale/template.pot index f494ee7..0144ace 100644 --- a/steles/locale/template.pot +++ b/steles/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-05 10:06+0200\n" +"POT-Creation-Date: 2017-08-26 11:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/steles/nodes.lua b/steles/nodes.lua index a298293..39eb9ee 100644 --- a/steles/nodes.lua +++ b/steles/nodes.lua @@ -87,6 +87,7 @@ for i, material in ipairs(steles.materials) do end end end, + on_punch = function(pos, node, player, pointed_thing) display_lib.update_entities(pos) end, }) end end