Compare commits
15 Commits
60d67afab3
...
oob_fix
Author | SHA1 | Date | |
---|---|---|---|
3e6328ac43 | |||
64902b845d | |||
1fdff47dc8 | |||
e387808065 | |||
1c881d6f22 | |||
cd6bf1eabe | |||
1dd01e3bc6 | |||
ed3a679bca | |||
5ae111e1fa | |||
aff005e745 | |||
3d0e8d47e6 | |||
8aafe6608c | |||
e66863d115 | |||
4018128e84 | |||
a9858c76af |
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
util/blender export-ignore
|
@ -12,6 +12,5 @@ read_globals = {
|
|||||||
"ItemStack", "vector", "default",
|
"ItemStack", "vector", "default",
|
||||||
|
|
||||||
-- Mod deps
|
-- Mod deps
|
||||||
"intllib",
|
|
||||||
"screwdriver",
|
"screwdriver",
|
||||||
}
|
}
|
||||||
|
4
API.md
@ -236,7 +236,7 @@ signs_lib.register_sign("basic_signs:sign_wall_glass", {
|
|||||||
allow_onpole = true,
|
allow_onpole = true,
|
||||||
allow_onpole_horizontal = true,
|
allow_onpole_horizontal = true,
|
||||||
allow_yard = true,
|
allow_yard = true,
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ signs_lib.register_sign("basic_signs:sign_wall_glass", {
|
|||||||
|
|
||||||
* `signs_lib.rightclick_sign(pos, node, player, itemstack, pointed_thing)`
|
* `signs_lib.rightclick_sign(pos, node, player, itemstack, pointed_thing)`
|
||||||
|
|
||||||
Open the default sign formspec, if the player has the `signslib_edit` privilege.
|
Open the default sign formspec, if the player has the `signslib_edit` privilege. (privilege can be set by `signs_lib.edit_priv` setting)
|
||||||
|
|
||||||
* `signs_lib.destruct_sign(pos)`
|
* `signs_lib.destruct_sign(pos)`
|
||||||
|
|
||||||
|
@ -67,3 +67,4 @@ The list of loaded, sign-bearing blocks is created/populated by an LBM (and trim
|
|||||||
* `signslib_edit`
|
* `signslib_edit`
|
||||||
|
|
||||||
Allows to rotate signs and to open (and consequently edit) any default sign formspec.
|
Allows to rotate signs and to open (and consequently edit) any default sign formspec.
|
||||||
|
(privilege can be set by `signs_lib.edit_priv` setting)
|
||||||
|
152
api.lua
@ -1,6 +1,12 @@
|
|||||||
-- signs_lib api, backported from street_signs
|
-- signs_lib api, backported from street_signs
|
||||||
|
|
||||||
local S = signs_lib.gettext
|
local S = signs_lib.S
|
||||||
|
local FS = function(...) return minetest.formspec_escape(S(...)) end
|
||||||
|
local has_default_mod = minetest.get_modpath("default")
|
||||||
|
|
||||||
|
local function log(level, messagefmt, ...)
|
||||||
|
minetest.log(level, "[signs_lib] " .. messagefmt:format(...))
|
||||||
|
end
|
||||||
|
|
||||||
local function get_sign_formspec() end
|
local function get_sign_formspec() end
|
||||||
|
|
||||||
@ -21,14 +27,14 @@ signs_lib.standard_xoffs = 4
|
|||||||
signs_lib.standard_yoffs = 0
|
signs_lib.standard_yoffs = 0
|
||||||
signs_lib.standard_cpl = 35
|
signs_lib.standard_cpl = 35
|
||||||
|
|
||||||
signs_lib.standard_wood_groups = table.copy(default and minetest.registered_items["default:sign_wall_wood"].groups or {})
|
signs_lib.standard_wood_groups = table.copy(has_default_mod and minetest.registered_items["default:sign_wall_wood"].groups or {})
|
||||||
signs_lib.standard_wood_groups.attached_node = nil
|
signs_lib.standard_wood_groups.attached_node = nil
|
||||||
|
|
||||||
signs_lib.standard_steel_groups = table.copy(default and minetest.registered_items["default:sign_wall_steel"].groups or {})
|
signs_lib.standard_steel_groups = table.copy(has_default_mod and minetest.registered_items["default:sign_wall_steel"].groups or {})
|
||||||
signs_lib.standard_steel_groups.attached_node = nil
|
signs_lib.standard_steel_groups.attached_node = nil
|
||||||
|
|
||||||
signs_lib.standard_wood_sign_sounds = table.copy(default and minetest.registered_items["default:sign_wall_wood"].sounds or {})
|
signs_lib.standard_wood_sign_sounds = table.copy(has_default_mod and minetest.registered_items["default:sign_wall_wood"].sounds or {})
|
||||||
signs_lib.standard_steel_sign_sounds = table.copy(default and minetest.registered_items["default:sign_wall_steel"].sounds or {})
|
signs_lib.standard_steel_sign_sounds = table.copy(has_default_mod and minetest.registered_items["default:sign_wall_steel"].sounds or {})
|
||||||
|
|
||||||
signs_lib.default_text_scale = {x=10, y=10}
|
signs_lib.default_text_scale = {x=10, y=10}
|
||||||
|
|
||||||
@ -160,18 +166,23 @@ local ctexcache_wide = {}
|
|||||||
-- entity handling
|
-- entity handling
|
||||||
|
|
||||||
minetest.register_entity("signs_lib:text", {
|
minetest.register_entity("signs_lib:text", {
|
||||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
initial_properties = {
|
||||||
visual = "mesh",
|
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||||
mesh = "signs_lib_standard_sign_entity_wall.obj",
|
visual = "mesh",
|
||||||
textures = {},
|
mesh = "signs_lib_standard_sign_entity_wall.obj",
|
||||||
static_save = true,
|
textures = {},
|
||||||
backface_culling = false,
|
static_save = true,
|
||||||
|
backface_culling = false,
|
||||||
|
},
|
||||||
on_activate = function(self)
|
on_activate = function(self)
|
||||||
local node = minetest.get_node(self.object:get_pos())
|
local node = minetest.get_node(self.object:get_pos())
|
||||||
if minetest.get_item_group(node.name, "sign") == 0 then
|
if minetest.get_item_group(node.name, "sign") == 0 then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
on_blast = function(self, damage)
|
||||||
|
return false, false, {}
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
function signs_lib.delete_objects(pos)
|
function signs_lib.delete_objects(pos)
|
||||||
@ -456,15 +467,6 @@ signs_lib.charwidth_wide32 = build_char_db(32)
|
|||||||
|
|
||||||
local math_max = math.max
|
local math_max = math.max
|
||||||
|
|
||||||
local function fill_line(x, y, w, c, font_size, colorbgw)
|
|
||||||
c = c or "0"
|
|
||||||
local tex = { }
|
|
||||||
for xx = 0, math.max(0, w), colorbgw do
|
|
||||||
table.insert(tex, (":%d,%d=signs_lib_color_"..font_size.."px_%s.png"):format(x + xx, y, c))
|
|
||||||
end
|
|
||||||
return table.concat(tex)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- make char texture file name
|
-- make char texture file name
|
||||||
-- if texture file does not exist use fallback texture instead
|
-- if texture file does not exist use fallback texture instead
|
||||||
local function char_tex(font_name, ch)
|
local function char_tex(font_name, ch)
|
||||||
@ -500,6 +502,26 @@ local function char_tex_wide(font_name, ch)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- sign colour table
|
||||||
|
local colgrid = {
|
||||||
|
["0"] = "000000", -- black
|
||||||
|
["1"] = "000080", -- blue
|
||||||
|
["2"] = "008000", -- dark green
|
||||||
|
["3"] = "008080", -- dark cyan
|
||||||
|
["4"] = "800000", -- red
|
||||||
|
["5"] = "800080", -- purple
|
||||||
|
["6"] = "804000", -- brown
|
||||||
|
["7"] = "808080", -- light grey
|
||||||
|
["8"] = "404040", -- dark grey
|
||||||
|
["9"] = "8080ff", -- light blue
|
||||||
|
["A"] = "80ff80", -- green
|
||||||
|
["B"] = "80ffff", -- cyan
|
||||||
|
["C"] = "ff8080", -- skin pink
|
||||||
|
["D"] = "ff80ff", -- pink
|
||||||
|
["E"] = "ffff00", -- yellow
|
||||||
|
["F"] = "ffffff" -- white
|
||||||
|
}
|
||||||
|
|
||||||
local function make_line_texture(line, lineno, pos, line_width, line_height, cwidth_tab, font_size, colorbgw, cwidth_tab_wide, force_unicode_font)
|
local function make_line_texture(line, lineno, pos, line_width, line_height, cwidth_tab, font_size, colorbgw, cwidth_tab_wide, force_unicode_font)
|
||||||
local width = 0
|
local width = 0
|
||||||
local maxw = 0
|
local maxw = 0
|
||||||
@ -514,7 +536,7 @@ local function make_line_texture(line, lineno, pos, line_width, line_height, cwi
|
|||||||
|
|
||||||
-- We check which chars are available here.
|
-- We check which chars are available here.
|
||||||
for word_i, word in ipairs(line) do
|
for word_i, word in ipairs(line) do
|
||||||
local chars = { }
|
local chars = {}
|
||||||
local ch_offs = 0
|
local ch_offs = 0
|
||||||
local word_l = #word
|
local word_l = #word
|
||||||
local i = 1
|
local i = 1
|
||||||
@ -572,7 +594,7 @@ local function make_line_texture(line, lineno, pos, line_width, line_height, cwi
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if w then
|
if w then
|
||||||
width = width + w + 1
|
width = width + w
|
||||||
if width >= (line_width - cwidth_tab[" "]) then
|
if width >= (line_width - cwidth_tab[" "]) then
|
||||||
width = 0
|
width = 0
|
||||||
else
|
else
|
||||||
@ -604,7 +626,7 @@ local function make_line_texture(line, lineno, pos, line_width, line_height, cwi
|
|||||||
else
|
else
|
||||||
local w = cwidth_tab[c]
|
local w = cwidth_tab[c]
|
||||||
if w then
|
if w then
|
||||||
width = width + w + 1
|
width = width + w
|
||||||
if width >= (line_width - cwidth_tab[" "]) then
|
if width >= (line_width - cwidth_tab[" "]) then
|
||||||
width = 0
|
width = 0
|
||||||
else
|
else
|
||||||
@ -622,7 +644,7 @@ local function make_line_texture(line, lineno, pos, line_width, line_height, cwi
|
|||||||
end
|
end
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
width = width + cwidth_tab[" "] + 1
|
width = width + cwidth_tab[" "]
|
||||||
maxw = math_max(width, maxw)
|
maxw = math_max(width, maxw)
|
||||||
table.insert(words, { chars=chars, w=ch_offs })
|
table.insert(words, { chars=chars, w=ch_offs })
|
||||||
end
|
end
|
||||||
@ -636,36 +658,25 @@ local function make_line_texture(line, lineno, pos, line_width, line_height, cwi
|
|||||||
local xpos = start_xpos
|
local xpos = start_xpos
|
||||||
local ypos = (line_height + def.line_spacing)* lineno + def.y_offset
|
local ypos = (line_height + def.line_spacing)* lineno + def.y_offset
|
||||||
|
|
||||||
cur_color = nil
|
|
||||||
|
|
||||||
for word_i, word in ipairs(words) do
|
for word_i, word in ipairs(words) do
|
||||||
local xoffs = (xpos - start_xpos)
|
local xoffs = (xpos - start_xpos)
|
||||||
if (xoffs > 0) and ((xoffs + word.w) > maxw) then
|
if (xoffs > 0) and ((xoffs + word.w) > maxw) then
|
||||||
table.insert(texture, fill_line(xpos, ypos, maxw, "n", font_size, colorbgw))
|
|
||||||
xpos = start_xpos
|
xpos = start_xpos
|
||||||
ypos = ypos + line_height + def.line_spacing
|
ypos = ypos + line_height + def.line_spacing
|
||||||
lineno = lineno + 1
|
lineno = lineno + 1
|
||||||
if lineno >= def.number_of_lines then break end
|
if lineno >= def.number_of_lines then break end
|
||||||
table.insert(texture, fill_line(xpos, ypos, maxw, cur_color, font_size, colorbgw))
|
|
||||||
end
|
end
|
||||||
for ch_i, ch in ipairs(word.chars) do
|
for ch_i, ch in ipairs(word.chars) do
|
||||||
if ch.col ~= cur_color then
|
|
||||||
cur_color = ch.col
|
-- colorize character texture
|
||||||
table.insert(texture, fill_line(xpos + ch.off, ypos, maxw, cur_color, font_size, colorbgw))
|
local newtex = ch.tex .. '\\^[colorize\\:#' .. colgrid[ch.col]
|
||||||
end
|
|
||||||
table.insert(texture, (":%d,%d=%s"):format(xpos + ch.off, ypos, ch.tex))
|
table.insert(texture, (":%d,%d=%s"):format(xpos + ch.off, ypos, newtex))
|
||||||
end
|
end
|
||||||
table.insert(
|
|
||||||
texture,
|
|
||||||
(":%d,%d="):format(xpos + word.w, ypos) .. char_tex(font_name, " ")
|
|
||||||
)
|
|
||||||
xpos = xpos + word.w + cwidth_tab[" "]
|
xpos = xpos + word.w + cwidth_tab[" "]
|
||||||
if xpos >= (line_width + cwidth_tab[" "]) then break end
|
if xpos >= (line_width + cwidth_tab[" "]) then break end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(texture, fill_line(xpos, ypos, maxw, "n", font_size, colorbgw))
|
|
||||||
table.insert(texture, fill_line(start_xpos, ypos + line_height, maxw, "n", font_size, colorbgw))
|
|
||||||
|
|
||||||
return table.concat(texture), lineno
|
return table.concat(texture), lineno
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -710,7 +721,7 @@ function signs_lib.make_sign_texture(lines, pos)
|
|||||||
table.insert(texture, linetex)
|
table.insert(texture, linetex)
|
||||||
lineno = ln + 1
|
lineno = ln + 1
|
||||||
end
|
end
|
||||||
table.insert(texture, "^[makealpha:0,0,0")
|
|
||||||
return table.concat(texture, "")
|
return table.concat(texture, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -742,6 +753,15 @@ function signs_lib.destruct_sign(pos)
|
|||||||
signs_lib.delete_objects(pos)
|
signs_lib.delete_objects(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function signs_lib.blast_sign(pos, intensity)
|
||||||
|
if signs_lib.can_modify(pos, "") then
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
local drops = minetest.get_node_drops(node, "tnt:blast")
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
return drops
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function make_infotext(text)
|
local function make_infotext(text)
|
||||||
text = trim_input(text)
|
text = trim_input(text)
|
||||||
local lines = signs_lib.split_lines_and_words(text) or {}
|
local lines = signs_lib.split_lines_and_words(text) or {}
|
||||||
@ -803,7 +823,16 @@ end
|
|||||||
function signs_lib.can_modify(pos, player)
|
function signs_lib.can_modify(pos, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
local playername = player:get_player_name()
|
local playername
|
||||||
|
if type(player) == "userdata" then
|
||||||
|
playername = player:get_player_name()
|
||||||
|
|
||||||
|
elseif type(player) == "string" then
|
||||||
|
playername = player
|
||||||
|
|
||||||
|
else
|
||||||
|
playername = ""
|
||||||
|
end
|
||||||
|
|
||||||
if minetest.is_protected(pos, playername) then
|
if minetest.is_protected(pos, playername) then
|
||||||
minetest.record_protection_violation(pos, playername)
|
minetest.record_protection_violation(pos, playername)
|
||||||
@ -812,7 +841,7 @@ function signs_lib.can_modify(pos, player)
|
|||||||
|
|
||||||
if owner == ""
|
if owner == ""
|
||||||
or playername == owner
|
or playername == owner
|
||||||
or (minetest.check_player_privs(playername, {signslib_edit=true}))
|
or minetest.get_player_privs(playername)[signs_lib.edit_priv]
|
||||||
or (playername == minetest.settings:get("name")) then
|
or (playername == minetest.settings:get("name")) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -951,7 +980,7 @@ function signs_lib.after_place_node(pos, placer, itemstack, pointed_thing, locke
|
|||||||
end
|
end
|
||||||
|
|
||||||
function signs_lib.register_fence_with_sign()
|
function signs_lib.register_fence_with_sign()
|
||||||
minetest.log("warning", "[signs_lib] ".."Attempt to call no longer used function signs_lib.register_fence_with_sign()")
|
log("warning", "Attempt to call no longer used function signs_lib.register_fence_with_sign()")
|
||||||
end
|
end
|
||||||
|
|
||||||
local use_glow = function(pos, node, puncher, pointed_thing)
|
local use_glow = function(pos, node, puncher, pointed_thing)
|
||||||
@ -984,6 +1013,7 @@ function signs_lib.register_sign(name, raw_def)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def.after_place_node = raw_def.after_place_node or signs_lib.after_place_node
|
def.after_place_node = raw_def.after_place_node or signs_lib.after_place_node
|
||||||
|
def.on_blast = raw_def.on_blast or signs_lib.blast_sign
|
||||||
|
|
||||||
if raw_def.entity_info then
|
if raw_def.entity_info then
|
||||||
|
|
||||||
@ -1251,7 +1281,7 @@ minetest.register_lbm({
|
|||||||
minetest.register_chatcommand("regen_signs", {
|
minetest.register_chatcommand("regen_signs", {
|
||||||
params = "",
|
params = "",
|
||||||
privs = {server = true},
|
privs = {server = true},
|
||||||
description = "Skims through all currently-loaded sign-bearing mapblocks, clears away any entities within each sign's node space, and regenerates their text entities, if any.",
|
description = S("Skims through all currently-loaded sign-bearing mapblocks, clears away any entities within each sign's node space, and regenerates their text entities, if any."),
|
||||||
func = function(player_name, params)
|
func = function(player_name, params)
|
||||||
local allsigns = {}
|
local allsigns = {}
|
||||||
local totalsigns = 0
|
local totalsigns = 0
|
||||||
@ -1270,13 +1300,13 @@ minetest.register_chatcommand("regen_signs", {
|
|||||||
end
|
end
|
||||||
if signs_lib.totalblocks < 0 then signs_lib.totalblocks = 0 end
|
if signs_lib.totalblocks < 0 then signs_lib.totalblocks = 0 end
|
||||||
if totalsigns == 0 then
|
if totalsigns == 0 then
|
||||||
minetest.chat_send_player(player_name, "There are no signs in the currently-loaded terrain.")
|
minetest.chat_send_player(player_name, S("There are no signs in the currently-loaded terrain."))
|
||||||
signs_lib.block_list = {}
|
signs_lib.block_list = {}
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.chat_send_player(player_name, "Found a total of "..totalsigns.." sign nodes across "..signs_lib.totalblocks.." blocks.")
|
minetest.chat_send_player(player_name, S("Found a total of @1 sign nodes across @2 blocks.", totalsigns, signs_lib.totalblocks))
|
||||||
minetest.chat_send_player(player_name, "Regenerating sign entities...")
|
minetest.chat_send_player(player_name, S("Regenerating sign entities ..."))
|
||||||
|
|
||||||
for _, b in pairs(allsigns) do
|
for _, b in pairs(allsigns) do
|
||||||
for _, pos in ipairs(b) do
|
for _, pos in ipairs(b) do
|
||||||
@ -1288,11 +1318,15 @@ minetest.register_chatcommand("regen_signs", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
minetest.chat_send_player(player_name, "Finished.")
|
minetest.chat_send_player(player_name, S("Finished."))
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_privilege("signslib_edit", {})
|
minetest.register_on_mods_loaded(function()
|
||||||
|
if not minetest.registered_privileges[signs_lib.edit_priv] then
|
||||||
|
minetest.register_privilege("signslib_edit", {})
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1312,14 +1346,14 @@ function get_sign_formspec(pos, nodename)
|
|||||||
"image[0.1,2.4;7,1;signs_lib_sign_color_palette.png]",
|
"image[0.1,2.4;7,1;signs_lib_sign_color_palette.png]",
|
||||||
"textarea[0.15,-0.2;6.3,2.8;text;;" .. minetest.formspec_escape(txt) .. "]",
|
"textarea[0.15,-0.2;6.3,2.8;text;;" .. minetest.formspec_escape(txt) .. "]",
|
||||||
"button_exit[3.7,3.4;2,1;ok;" .. S("Write") .. "]",
|
"button_exit[3.7,3.4;2,1;ok;" .. S("Write") .. "]",
|
||||||
"label[0.3,3.4;Unicode font]",
|
"label[0.3,3.4;"..FS("Unicode font").."]",
|
||||||
"image_button[0.6,3.7;1,0.6;signs_lib_switch_" .. state .. ".png;uni_"
|
"image_button[0.6,3.7;1,0.6;signs_lib_switch_" .. state .. ".png;uni_"
|
||||||
.. state .. ";;;false;signs_lib_switch_interm.png]",
|
.. state .. ";;;false;signs_lib_switch_interm.png]",
|
||||||
}
|
}
|
||||||
|
|
||||||
if minetest.registered_nodes[nodename].allow_widefont then
|
if minetest.registered_nodes[nodename].allow_widefont then
|
||||||
state = meta:get_int("widefont") == 1 and "on" or "off"
|
state = meta:get_int("widefont") == 1 and "on" or "off"
|
||||||
formspec[#formspec+1] = "label[2.1,3.4;Wide font]"
|
formspec[#formspec+1] = "label[2.1,3.4;"..FS("Wide font").."]"
|
||||||
formspec[#formspec+1] = "image_button[2.3,3.7;1,0.6;signs_lib_switch_" .. state .. ".png;wide_"
|
formspec[#formspec+1] = "image_button[2.3,3.7;1,0.6;signs_lib_switch_" .. state .. ".png;wide_"
|
||||||
.. state .. ";;;false;signs_lib_switch_interm.png]"
|
.. state .. ";;;false;signs_lib_switch_interm.png]"
|
||||||
end
|
end
|
||||||
@ -1337,11 +1371,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
|
|
||||||
if fields.text and fields.ok then
|
if fields.text and fields.ok then
|
||||||
minetest.log("action", S("@1 wrote \"@2\" to sign at @3",
|
log("action", "%s wrote %q to sign at %s",
|
||||||
(playername or ""),
|
(playername or ""),
|
||||||
fields.text:gsub('\\', '\\\\'):gsub("\n", "\\n"),
|
fields.text:gsub("\n", "\\n"),
|
||||||
pos_string
|
pos_string
|
||||||
))
|
)
|
||||||
signs_lib.update_sign(pos, fields)
|
signs_lib.update_sign(pos, fields)
|
||||||
elseif fields.wide_on or fields.wide_off or fields.uni_on or fields.uni_off then
|
elseif fields.wide_on or fields.wide_off or fields.uni_on or fields.uni_off then
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
@ -1365,20 +1399,20 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if change_wide then
|
if change_wide then
|
||||||
minetest.log("action", S("@1 flipped the wide-font switch to \"@2\" at @3",
|
log("action", "%s flipped the wide-font switch to %q at %s",
|
||||||
(playername or ""),
|
(playername or ""),
|
||||||
(fields.wide_on and "off" or "on"),
|
(fields.wide_on and "off" or "on"),
|
||||||
minetest.pos_to_string(pos)
|
minetest.pos_to_string(pos)
|
||||||
))
|
)
|
||||||
signs_lib.update_sign(pos, fields)
|
signs_lib.update_sign(pos, fields)
|
||||||
minetest.show_formspec(playername, "signs_lib:sign", get_sign_formspec(pos, node.name))
|
minetest.show_formspec(playername, "signs_lib:sign", get_sign_formspec(pos, node.name))
|
||||||
end
|
end
|
||||||
if change_uni then
|
if change_uni then
|
||||||
minetest.log("action", S("@1 flipped the unicode-font switch to \"@2\" at @3",
|
log("action", "%s flipped the unicode-font switch to %q at %s",
|
||||||
(playername or ""),
|
(playername or ""),
|
||||||
(fields.uni_on and "off" or "on"),
|
(fields.uni_on and "off" or "on"),
|
||||||
minetest.pos_to_string(pos)
|
minetest.pos_to_string(pos)
|
||||||
))
|
)
|
||||||
signs_lib.update_sign(pos, fields)
|
signs_lib.update_sign(pos, fields)
|
||||||
minetest.show_formspec(playername, "signs_lib:sign", get_sign_formspec(pos, node.name))
|
minetest.show_formspec(playername, "signs_lib:sign", get_sign_formspec(pos, node.name))
|
||||||
end
|
end
|
||||||
|
5
init.lua
@ -7,8 +7,9 @@ signs_lib = {}
|
|||||||
|
|
||||||
signs_lib.path = minetest.get_modpath(minetest.get_current_modname())
|
signs_lib.path = minetest.get_modpath(minetest.get_current_modname())
|
||||||
|
|
||||||
local S = dofile(signs_lib.path .. "/intllib.lua")
|
signs_lib.S = minetest.get_translator(minetest.get_current_modname())
|
||||||
signs_lib.gettext = S
|
|
||||||
|
signs_lib.edit_priv = minetest.settings:get("signs_lib.edit_priv") or "signslib_edit"
|
||||||
|
|
||||||
dofile(signs_lib.path.."/encoding.lua")
|
dofile(signs_lib.path.."/encoding.lua")
|
||||||
dofile(signs_lib.path.."/api.lua")
|
dofile(signs_lib.path.."/api.lua")
|
||||||
|
45
intllib.lua
@ -1,45 +0,0 @@
|
|||||||
|
|
||||||
-- Fallback functions for when `intllib` is not installed.
|
|
||||||
-- Code released under Unlicense <http://unlicense.org>.
|
|
||||||
|
|
||||||
-- Get the latest version of this file at:
|
|
||||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
|
||||||
|
|
||||||
local function format(str, ...)
|
|
||||||
local args = { ... }
|
|
||||||
local function repl(escape, open, num, close)
|
|
||||||
if escape == "" then
|
|
||||||
local replacement = tostring(args[tonumber(num)])
|
|
||||||
if open == "" then
|
|
||||||
replacement = replacement..close
|
|
||||||
end
|
|
||||||
return replacement
|
|
||||||
else
|
|
||||||
return "@"..open..num..close
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
|
||||||
end
|
|
||||||
|
|
||||||
local gettext, ngettext
|
|
||||||
if minetest.get_modpath("intllib") then
|
|
||||||
if intllib.make_gettext_pair then
|
|
||||||
-- New method using gettext.
|
|
||||||
gettext, ngettext = intllib.make_gettext_pair()
|
|
||||||
else
|
|
||||||
-- Old method using text files.
|
|
||||||
gettext = intllib.Getter()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Fill in missing functions.
|
|
||||||
|
|
||||||
gettext = gettext or function(msgid, ...)
|
|
||||||
return format(msgid, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
|
||||||
return format(n==1 and msgid or msgid_plural, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
return gettext, ngettext
|
|
97
locale/de.po
@ -1,97 +0,0 @@
|
|||||||
# German Translation for the signs_lib mod.
|
|
||||||
# Copyright (C) 2018 Vanessa Ezekowitz
|
|
||||||
# This file is distributed under the same license as the signs_lib package.
|
|
||||||
# Xanthin, 2017.
|
|
||||||
# CodeXP <codexp@gmx.net>, 2018.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: \n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2017-07-31 18:31+0200\n"
|
|
||||||
"PO-Revision-Date: 2018-03-24 22:00+0100\n"
|
|
||||||
"Last-Translator: CodeXP <codexp@gmx.net>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"Language: de\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Generator: Poedit 1.8.12\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Write"
|
|
||||||
msgstr "schreiben"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked sign, owned by @1\n"
|
|
||||||
msgstr "gesperrter Schild, gehört @1\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "locked "
|
|
||||||
msgstr "gesperrt "
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
#, fuzzy
|
|
||||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
|
||||||
msgstr "@1 schrieb \"@2\" auf das @3Schild bei @4"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign"
|
|
||||||
msgstr "Schild"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Can edit all locked signs"
|
|
||||||
msgstr "Kann alle gesperrte Schilder bearbeiten"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked Sign"
|
|
||||||
msgstr "gesperrter Schild"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "green"
|
|
||||||
msgstr "grün"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "yellow"
|
|
||||||
msgstr "gelb"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "red"
|
|
||||||
msgstr "rot"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_red"
|
|
||||||
msgstr "weißrot"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_black"
|
|
||||||
msgstr "schwarzweiß"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "orange"
|
|
||||||
msgstr "orange"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "blue"
|
|
||||||
msgstr "blau"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "brown"
|
|
||||||
msgstr "braun"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign (@1, metal)"
|
|
||||||
msgstr "Schild (@1, Metall)"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Attempt to register unknown node as fence"
|
|
||||||
msgstr "Versuch ein unbekanntes Element als Zaun zu registrieren"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Registered @1 and @2"
|
|
||||||
msgstr "Registrierte @1 und @2"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "[MOD] signs loaded"
|
|
||||||
msgstr "[MOD] Schilder-Mod geladen"
|
|
95
locale/es.po
@ -1,95 +0,0 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: \n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2017-07-31 18:22+0200\n"
|
|
||||||
"PO-Revision-Date: 2017-07-31 18:30+0200\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Generator: Poedit 1.8.12\n"
|
|
||||||
"Last-Translator: Carlos Barraza\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
"Language: es\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked sign, owned by @1\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "locked "
|
|
||||||
msgstr "bloqueada "
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
|
||||||
msgstr "@1 escribio \"@2\" en el cartel @3en @4"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign"
|
|
||||||
msgstr "Letrero"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Can edit all locked signs"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Locked Sign"
|
|
||||||
msgstr "Letrero bloqueada"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "green"
|
|
||||||
msgstr "verde"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "yellow"
|
|
||||||
msgstr "amarillo"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "red"
|
|
||||||
msgstr "rojo"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
#, fuzzy
|
|
||||||
msgid "white_red"
|
|
||||||
msgstr "rojo y blanco"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
#, fuzzy
|
|
||||||
msgid "white_black"
|
|
||||||
msgstr "negro y blanco"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "orange"
|
|
||||||
msgstr "naranja"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "blue"
|
|
||||||
msgstr "azul"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "brown"
|
|
||||||
msgstr "marrón"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
#, fuzzy
|
|
||||||
msgid "Sign (@1, metal)"
|
|
||||||
msgstr "Letrero (@1, metal)"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Attempt to register unknown node as fence"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Registered @1 and @2"
|
|
||||||
msgstr "Registrado @1 y @2"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "[MOD] signs loaded"
|
|
||||||
msgstr "[MOD] signs cargados"
|
|
91
locale/fr.po
@ -1,91 +0,0 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: \n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2017-07-31 18:13+0200\n"
|
|
||||||
"PO-Revision-Date: 2017-07-31 18:22+0200\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Generator: Poedit 1.8.12\n"
|
|
||||||
"Last-Translator: fat115 <fat115@framasoft.org>\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
||||||
"Language: fr\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked sign, owned by @1\n"
|
|
||||||
msgstr "Panneau verrouillé, appartient à @1\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "locked "
|
|
||||||
msgstr "verrouillé "
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
|
||||||
msgstr "@1 a écrit \"@2\" sur le panneau @3en @4"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign"
|
|
||||||
msgstr "Panneau"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Can edit all locked signs"
|
|
||||||
msgstr "Peut modifier les panneaux verrouillés"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked Sign"
|
|
||||||
msgstr "Panneau (verrouillé)"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "green"
|
|
||||||
msgstr "vert"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "yellow"
|
|
||||||
msgstr "jaune"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "red"
|
|
||||||
msgstr "rouge"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_red"
|
|
||||||
msgstr "rouge et blanc"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_black"
|
|
||||||
msgstr "noir et blanc"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "orange"
|
|
||||||
msgstr "orange"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "blue"
|
|
||||||
msgstr "bleu"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "brown"
|
|
||||||
msgstr "marron"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign (@1, metal)"
|
|
||||||
msgstr "Panneau (@1, métal)"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Attempt to register unknown node as fence"
|
|
||||||
msgstr "Tentative d'enregistrer un nœud inconnu comme barrière"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Registered @1 and @2"
|
|
||||||
msgstr "Enregistrement de @1 et @"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "[MOD] signs loaded"
|
|
||||||
msgstr "[MOD] signs chargé"
|
|
91
locale/ms.po
@ -1,91 +0,0 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: \n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2017-07-31 18:00+0200\n"
|
|
||||||
"PO-Revision-Date: 2017-11-17 02:38+0800\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Generator: Poedit 2.0.4\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
||||||
"Language: ms\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked sign, owned by @1\n"
|
|
||||||
msgstr "Papan tanda berkunci, milik @1\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "locked "
|
|
||||||
msgstr "berkunci "
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
|
||||||
msgstr "@1 menulis \"@2\" atas papan tanda @3dekat @4"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign"
|
|
||||||
msgstr "Papan Tanda"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Can edit all locked signs"
|
|
||||||
msgstr "Boleh sunting semua papan tanda berkunci"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked Sign"
|
|
||||||
msgstr "Papan Tanda Berkunci"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "green"
|
|
||||||
msgstr "hijau"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "yellow"
|
|
||||||
msgstr "kuning"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "red"
|
|
||||||
msgstr "merah"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_red"
|
|
||||||
msgstr "putih_merah"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_black"
|
|
||||||
msgstr "putih_hitam"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "orange"
|
|
||||||
msgstr "jingga"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "blue"
|
|
||||||
msgstr "biru"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "brown"
|
|
||||||
msgstr "perang"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign (@1, metal)"
|
|
||||||
msgstr "Papan Tanda (@1, logam)"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Attempt to register unknown node as fence"
|
|
||||||
msgstr "Cuba untuk mendaftar nod tidak diketahui sebagai pagar"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Registered @1 and @2"
|
|
||||||
msgstr "Telah daftar @1 dan @2"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "[MOD] signs loaded"
|
|
||||||
msgstr "[MODS] signs telah dimuatkan"
|
|
94
locale/ru.po
@ -1,94 +0,0 @@
|
|||||||
# Russian Translation for the signs_lib mod.
|
|
||||||
# Copyright (C) 2018 Vanessa Ezekowitz
|
|
||||||
# This file is distributed under the same license as the signs_lib package.
|
|
||||||
# CodeXP <codexp@gmx.net>, 2018.
|
|
||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: signs_lib\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-03-24 22:23+0100\n"
|
|
||||||
"PO-Revision-Date: \n"
|
|
||||||
"Last-Translator: CodeXP <codexp@gmx.net>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"Language: ru\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Write"
|
|
||||||
msgstr "записать"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked sign, owned by @1\n"
|
|
||||||
msgstr "защищенная табличка, пренадлежит @1\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "locked "
|
|
||||||
msgstr "защищенный "
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
|
||||||
msgstr "@1 записал \"@2\" в @3sign на @4"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign"
|
|
||||||
msgstr "табличка"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Can edit all locked signs"
|
|
||||||
msgstr "Может редактировать все защищенные таблички"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked Sign"
|
|
||||||
msgstr "защищенная табличка"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "green"
|
|
||||||
msgstr "зеленая"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "yellow"
|
|
||||||
msgstr "желтая"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "red"
|
|
||||||
msgstr "красная"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_red"
|
|
||||||
msgstr "краснобелая"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_black"
|
|
||||||
msgstr "чернобелая"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "orange"
|
|
||||||
msgstr "оранжевая"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "blue"
|
|
||||||
msgstr "синея"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "brown"
|
|
||||||
msgstr "коричневая"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign (@1, metal)"
|
|
||||||
msgstr "Табличка (@1, металл)"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Attempt to register unknown node as fence"
|
|
||||||
msgstr "Попытка зарегистрировать неизвестный узел как забор"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Registered @1 and @2"
|
|
||||||
msgstr "Зарегистрировано @1 для @2"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "[MOD] signs loaded"
|
|
||||||
msgstr "[MOD] мод табличек загружен"
|
|
12
locale/signs_lib.de.tr
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# textdomain: signs_lib
|
||||||
|
Locked sign, owned by @1@n=Abgeschlossenes Schild, gehört @1@n
|
||||||
|
Skims through all currently-loaded sign-bearing mapblocks, clears away any entities within each sign's node space, and regenerates their text entities, if any.=Iteriert durch alle derzeit geladenen Kartenblöcke, die Schilder enthalten, löscht alle Entities innerhalb des Node-Raums eines jeden Schildes und erzeugt ihre Text-Entities, falls vorhanden, neu.
|
||||||
|
There are no signs in the currently-loaded terrain.=Im derzeit geladenen Gelände befinden sich keine Schilder.
|
||||||
|
Found a total of @1 sign nodes across @2 blocks.=Insgesamt wurden @1 Schild-Nodes über @2 Kartenblöcke gefunden.
|
||||||
|
Regenerating sign entities ...=Schild-Entities werden neu erzeugt ...
|
||||||
|
Finished.=Fertig.
|
||||||
|
Write=Schreiben
|
||||||
|
Unicode font=Unicode-Schrift
|
||||||
|
Wide font=Weite Schrift
|
||||||
|
Wooden Wall Sign=Holzwandschild
|
||||||
|
Steel Wall Sign=Stahlwandschild
|
12
locale/signs_lib.es.tr
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# textdomain: signs_lib
|
||||||
|
Locked sign, owned by @1@n=Cartel bloqueado, propiedad de @1
|
||||||
|
Skims through all currently-loaded sign-bearing mapblocks, clears away any entities within each sign's node space, and regenerates their text entities, if any.=Examina todos los bloques de mapas que contienen letreros cargados actualmente, elimina cualquier entidad dentro del espacio de nodo de cada cartel y regenera sus entidades de texto, si las hay.
|
||||||
|
There are no signs in the currently-loaded terrain.=No hay carteles en el terreno actual cargado.
|
||||||
|
Found a total of @1 sign nodes across @2 blocks.=Se han encontrado un total de @1 cartel(es) a traves de @2 bloque(s).
|
||||||
|
Regenerating sign entities ...=Regenerando entidades de los carteles...
|
||||||
|
Finished.=Terminado
|
||||||
|
Write=Escribir
|
||||||
|
Unicode font=Fuente unicode
|
||||||
|
Wide font=Fuente ancha
|
||||||
|
Wooden Wall Sign=Cartel de Madera
|
||||||
|
Steel Wall Sign=Cartel de Acero
|
12
locale/signs_lib.fr.tr
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# textdomain: signs_lib
|
||||||
|
Locked sign, owned by @1@n=Panneau verrouillé, appartient à @1@n
|
||||||
|
Skims through all currently-loaded sign-bearing mapblocks, clears away any entities within each sign's node space, and regenerates their text entities, if any.=
|
||||||
|
There are no signs in the currently-loaded terrain.=
|
||||||
|
Found a total of @1 sign nodes across @2 blocks.=
|
||||||
|
Regenerating sign entities ...=
|
||||||
|
Finished.=
|
||||||
|
Write=
|
||||||
|
Unicode font=
|
||||||
|
Wide font=
|
||||||
|
Wooden Wall Sign=
|
||||||
|
Steel Wall Sign=
|
12
locale/signs_lib.ms.tr
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# textdomain: signs_lib
|
||||||
|
Locked sign, owned by @1@n=Papan tanda berkunci, milik @1@n
|
||||||
|
Skims through all currently-loaded sign-bearing mapblocks, clears away any entities within each sign's node space, and regenerates their text entities, if any.=
|
||||||
|
There are no signs in the currently-loaded terrain.=
|
||||||
|
Found a total of @1 sign nodes across @2 blocks.=
|
||||||
|
Regenerating sign entities ...=
|
||||||
|
Finished.=
|
||||||
|
Write=
|
||||||
|
Unicode font=
|
||||||
|
Wide font=
|
||||||
|
Wooden Wall Sign=
|
||||||
|
Steel Wall Sign=
|
12
locale/signs_lib.ru.tr
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# textdomain: signs_lib
|
||||||
|
Locked sign, owned by @1@n=защищенная табличка, пренадлежит @1@n
|
||||||
|
Skims through all currently-loaded sign-bearing mapblocks, clears away any entities within each sign's node space, and regenerates their text entities, if any.=
|
||||||
|
There are no signs in the currently-loaded terrain.=
|
||||||
|
Found a total of @1 sign nodes across @2 blocks.=
|
||||||
|
Regenerating sign entities ...=
|
||||||
|
Finished.=
|
||||||
|
Write=записать
|
||||||
|
Unicode font=
|
||||||
|
Wide font=
|
||||||
|
Wooden Wall Sign=
|
||||||
|
Steel Wall Sign=
|
@ -1,94 +0,0 @@
|
|||||||
# LANGUAGE Translation for the signs_lib mod.
|
|
||||||
# Copyright (C) 2018 Vanessa Ezekowitz
|
|
||||||
# This file is distributed under the same license as the signs_lib package.
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: signs_lib\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-03-24 22:23+0100\n"
|
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
||||||
"Language: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Write"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked sign, owned by @1\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "locked "
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "@1 wrote \"@2\" to @3sign at @4"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Can edit all locked signs"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Locked Sign"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "green"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "yellow"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "red"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_red"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "white_black"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "orange"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "blue"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "brown"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Sign (@1, metal)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Attempt to register unknown node as fence"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Registered @1 and @2"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "[MOD] signs loaded"
|
|
||||||
msgstr ""
|
|
12
locale/template.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# textdomain: signs_lib
|
||||||
|
Locked sign, owned by @1@n=
|
||||||
|
Skims through all currently-loaded sign-bearing mapblocks, clears away any entities within each sign's node space, and regenerates their text entities, if any.=
|
||||||
|
There are no signs in the currently-loaded terrain.=
|
||||||
|
Found a total of @1 sign nodes across @2 blocks.=
|
||||||
|
Regenerating sign entities ...=
|
||||||
|
Finished.=
|
||||||
|
Write=
|
||||||
|
Unicode font=
|
||||||
|
Wide font=
|
||||||
|
Wooden Wall Sign=
|
||||||
|
Steel Wall Sign=
|
2
mod.conf
@ -1,5 +1,5 @@
|
|||||||
name = signs_lib
|
name = signs_lib
|
||||||
author = VanessaE
|
author = VanessaE
|
||||||
optional_depends = intllib, screwdriver, streetspoles, streetlamps, cottages, prefab_redo, default
|
optional_depends = screwdriver, streetspoles, streetlamps, cottages, prefab_redo, default
|
||||||
description = Adds signs with readable text.
|
description = Adds signs with readable text.
|
||||||
min_minetest_version = 5.4.0
|
min_minetest_version = 5.4.0
|
||||||
|
1
settingstypes.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
signs_lib.edit_priv (Allows to rotate signs and to open (and consequently edit) any default sign formspec) string signslib_edit
|
@ -1,8 +1,10 @@
|
|||||||
-- Definitions for standard minetest_game wooden and steel wall signs
|
-- Definitions for standard minetest_game wooden and steel wall signs
|
||||||
|
|
||||||
|
local S = signs_lib.S
|
||||||
|
|
||||||
if minetest.get_modpath("default") then
|
if minetest.get_modpath("default") then
|
||||||
signs_lib.register_sign("default:sign_wall_wood", {
|
signs_lib.register_sign("default:sign_wall_wood", {
|
||||||
description = "Wooden wall sign",
|
description = S("Wooden Wall Sign"),
|
||||||
inventory_image = "signs_lib_sign_wall_wooden_inv.png",
|
inventory_image = "signs_lib_sign_wall_wooden_inv.png",
|
||||||
tiles = {
|
tiles = {
|
||||||
"signs_lib_sign_wall_wooden.png",
|
"signs_lib_sign_wall_wooden.png",
|
||||||
@ -20,7 +22,7 @@ if minetest.get_modpath("default") then
|
|||||||
})
|
})
|
||||||
|
|
||||||
signs_lib.register_sign("default:sign_wall_steel", {
|
signs_lib.register_sign("default:sign_wall_steel", {
|
||||||
description = "Steel wall sign",
|
description = S("Steel Wall Sign"),
|
||||||
inventory_image = "signs_lib_sign_wall_steel_inv.png",
|
inventory_image = "signs_lib_sign_wall_steel_inv.png",
|
||||||
tiles = {
|
tiles = {
|
||||||
"signs_lib_sign_wall_steel.png",
|
"signs_lib_sign_wall_steel.png",
|
||||||
|
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 98 B |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 102 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 102 B After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 74 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 94 B |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 98 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 131 B |