1
0
mirror of https://github.com/mt-mods/signs_lib.git synced 2025-07-12 20:30:22 +02:00

Compare commits

...

19 Commits

Author SHA1 Message Date
e66863d115 Merge pull request #11 from Niklp09/master
use MT5 translator
2022-06-19 17:18:57 +02:00
4018128e84 use signs_lib.S 2022-06-19 08:33:39 +02:00
a9858c76af use MT5 translator 2022-06-18 20:15:43 +02:00
60d67afab3 force all signs into the sign group 2022-05-11 20:41:09 +02:00
4dbfbec96e remove sign entity if sign is gone (due to voxelmanip or such) (#9) 2022-05-10 19:47:15 -04:00
14efa6eeb7 hotfix fake player action 2022-03-09 01:10:54 +01:00
b0808a376a Remove default dependency (#6) 2022-02-07 23:54:55 +11:00
aa5f865131 Add luacheck (#3)
Co-authored-by: syimyuzya <syimyuzya@gmail.com>
2021-12-09 15:46:33 +11:00
30d0af57be optimize all textures
1666613 bytes -> 1023131 bytes (61% of the original size)
2021-12-08 21:06:20 +11:00
fe5cbb0a66 Full Unicode Plane 0 charset support (63000+ chars, only ~2MB) (#2)
Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
2021-12-08 21:01:30 +11:00
1327cb2112 make sure digger is valid before checking for creative
(else assume survival)
2021-07-15 15:14:52 -04:00
c08eb3452f allow writing # on signs 2021-06-05 17:06:08 +10:00
3ee06f9ba2 protect against nil player on rightclick
(some mods' machines don't supply a valid player object)
2021-06-03 08:40:45 -04:00
02c19e89d9 don't try to run the glow code if the sign's being punched by a machine
that doesn't use a fake player object e.g. basic_machines
2021-05-29 08:03:50 -04:00
8b6f5e23a6 fix typo 2021-05-28 13:24:01 -04:00
85dd92fb25 update register_sign to add glow effect for all signs with allow_glow check. 2021-05-27 19:07:46 +00:00
16b9251511 Add glow feature to signs, with three brightness levels 2021-05-27 17:33:20 +00:00
b0fac5ef9f remove the old blue/starry background
(replaced with a transparent image so that
it can still be themed by Dreambuilder)
tidied up the formspec a bit
2021-03-04 09:40:14 -05:00
34689b5b04 bump minimum engine ver 2021-03-04 08:47:17 -05:00
1100 changed files with 7736 additions and 822 deletions

13
.github/workflows/luacheck.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: luacheck
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: apt
run: sudo apt-get install -y luarocks
- name: luacheck install
run: luarocks install --local luacheck
- name: luacheck run
run: $HOME/.luarocks/bin/luacheck ./

16
.luacheckrc Normal file
View File

@ -0,0 +1,16 @@
unused_args = false
max_line_length = 180
globals = {
"minetest",
"signs_lib",
}
read_globals = {
-- Builtin
table = {fields = {"copy"}},
"ItemStack", "vector", "default",
-- Mod deps
"screwdriver",
}

6
API.md
View File

@ -149,9 +149,11 @@ In this text, common terms such as `pos`, `node`, or `placer`/`digger` will not
* `font_size = int`
Selects which font to use, either 15 or 31 (pixel height). This setting directly affects the sign's vertical resolution.
Selects which font to use, either 16 or 32 (pixel height). This setting directly affects the sign's vertical resolution.
Default: 15
Default: 16
Note: Valid values were formerly 15 and 31, these are now aliases of 16 and 32 respectively.
* `x_offset = int`
* `y_offset = int`

View File

@ -22,10 +22,16 @@ That said, there are some basic text formatting options:
Writing "^" followed by a letter "a" through "h" will produce double-wide versions of these arrows, in the same order. These wide arrows occupy 0x89 to 0x91 in the character set.
To write a "^" on a sign, wirte "#^"
* A color may be specified in the sign text by using "#" followed by a single hexadcimal digit (0-9 or a-f). These colors come from the standard Linux/IRC/CGA color set, and are shown in the sign's formspec. Any color change will remain in effect until changed again, or until the next line break. Any number of color changes in any arbitrary arrangement is allowed.
To write "#" on a sign, write "##".
* Most writable signs can display double-wide text by flipping a switch in the sign's formspec.
* Support full Unicode Plane 0 charset (63000+ characters). The "Unicode font" switch on each sign can be turned on for a more consistent letter style in multilingual text.
## Sign placement and rotation notes
* Pointing at a wall while placing will, of course, place the sign on the wall.

350
api.lua
View File

@ -1,9 +1,11 @@
-- signs_lib api, backported from street_signs
local S = signs_lib.gettext
local S = signs_lib.S
local function get_sign_formspec() end
signs_lib.glow_item = "basic_materials:energy_crystal_simple"
signs_lib.lbm_restore_nodes = {}
signs_lib.old_fenceposts = {}
signs_lib.old_fenceposts_replacement_signs = {}
@ -14,21 +16,19 @@ signs_lib.standard_lines = 6
signs_lib.standard_hscale = 1
signs_lib.standard_vscale = 1
signs_lib.standard_lspace = 1
signs_lib.standard_fsize = 15
signs_lib.standard_fsize = 16
signs_lib.standard_xoffs = 4
signs_lib.standard_yoffs = 0
signs_lib.standard_cpl = 35
signs_lib.standard_wood_groups = table.copy(minetest.registered_items["default:sign_wall_wood"].groups)
signs_lib.standard_wood_groups.sign = 1
signs_lib.standard_wood_groups = table.copy(default and minetest.registered_items["default:sign_wall_wood"].groups or {})
signs_lib.standard_wood_groups.attached_node = nil
signs_lib.standard_steel_groups = table.copy(minetest.registered_items["default:sign_wall_steel"].groups)
signs_lib.standard_steel_groups.sign = 1
signs_lib.standard_steel_groups = table.copy(default and minetest.registered_items["default:sign_wall_steel"].groups or {})
signs_lib.standard_steel_groups.attached_node = nil
signs_lib.standard_wood_sign_sounds = table.copy(minetest.registered_items["default:sign_wall_wood"].sounds)
signs_lib.standard_steel_sign_sounds = table.copy(minetest.registered_items["default:sign_wall_steel"].sounds)
signs_lib.standard_wood_sign_sounds = table.copy(default 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.default_text_scale = {x=10, y=10}
@ -165,7 +165,13 @@ minetest.register_entity("signs_lib:text", {
mesh = "signs_lib_standard_sign_entity_wall.obj",
textures = {},
static_save = true,
backface_culling = false
backface_culling = false,
on_activate = function(self)
local node = minetest.get_node(self.object:get_pos())
if minetest.get_item_group(node.name, "sign") == 0 then
self.object:remove()
end
end,
})
function signs_lib.delete_objects(pos)
@ -180,7 +186,7 @@ function signs_lib.delete_objects(pos)
end
end
function signs_lib.spawn_entity(pos, texture)
function signs_lib.spawn_entity(pos, texture, glow)
local node = minetest.get_node(pos)
local def = minetest.registered_items[node.name]
if not def or not def.entity_info then return end
@ -229,6 +235,10 @@ function signs_lib.spawn_entity(pos, texture)
end
end
if glow ~= "" then
obj:set_properties( {glow = tonumber(glow * 5)} )
end
if yaw then
obj:set_rotation({x = pitch, y = yaw, z=0})
@ -247,14 +257,14 @@ function signs_lib.spawn_entity(pos, texture)
end
end
function signs_lib.set_obj_text(pos, text)
function signs_lib.set_obj_text(pos, text, glow)
local split = signs_lib.split_lines_and_words
local text_ansi = Utf8ToAnsi(text)
local n = minetest.registered_nodes[minetest.get_node(pos).name]
local text_ansi = signs_lib.Utf8ToAnsi(text)
signs_lib.delete_objects(pos)
-- only create sign entity for actual text
if text_ansi and text_ansi ~= "" then
signs_lib.spawn_entity(pos, signs_lib.make_sign_texture(split(text_ansi), pos) )
signs_lib.spawn_entity(pos,
signs_lib.make_sign_texture(split(text_ansi), pos), glow)
end
end
@ -335,6 +345,7 @@ local TP = signs_lib.path .. "/textures"
-- Font file formatter
local CHAR_FILE = "%s_%02x.png"
local CHAR_FILE_WIDE = "%s_%s.png"
local UNIFONT_TEX = "signs_lib_uni%02x.png\\^[sheet\\:16x16\\:%d,%d"
-- Fonts path
local CHAR_PATH = TP .. "/" .. CHAR_FILE
local CHAR_PATH_WIDE = TP .. "/" .. CHAR_FILE_WIDE
@ -428,20 +439,18 @@ local function build_char_db(font_size)
return cw, cbw, cbh, (total_width / char_count), cw_wide
end
signs_lib.charwidth15,
signs_lib.colorbgw15,
signs_lib.lineheight15,
signs_lib.avgwidth15,
signs_lib.charwidth_wide15 = build_char_db(15)
signs_lib.charwidth16,
signs_lib.colorbgw16,
signs_lib.lineheight16,
signs_lib.avgwidth16,
signs_lib.charwidth_wide16 = build_char_db(16)
signs_lib.charwidth31,
signs_lib.colorbgw31,
signs_lib.lineheight31,
signs_lib.avgwidth31,
signs_lib.charwidth_wide31 = build_char_db(31)
signs_lib.charwidth32,
signs_lib.colorbgw32,
signs_lib.lineheight32,
signs_lib.avgwidth32,
signs_lib.charwidth_wide32 = build_char_db(32)
local sign_groups = {choppy=2, dig_immediate=2}
local fences_with_sign = { }
-- some local helper functions
@ -463,7 +472,8 @@ local function char_tex(font_name, ch)
return ctexcache[font_name..ch], true
else
local c = ch:byte()
local exists, tex = file_exists(CHAR_PATH:format(font_name, c))
local exists = file_exists(CHAR_PATH:format(font_name, c))
local tex
if exists and c ~= 14 then
tex = CHAR_FILE:format(font_name, c)
else
@ -478,7 +488,8 @@ local function char_tex_wide(font_name, ch)
if ctexcache_wide[font_name..ch] then
return ctexcache_wide[font_name..ch], true
else
local exists, tex = file_exists(CHAR_PATH_WIDE:format(font_name, ch))
local exists = file_exists(CHAR_PATH_WIDE:format(font_name, ch))
local tex
if exists then
tex = CHAR_FILE_WIDE:format(font_name, ch)
else
@ -489,7 +500,7 @@ local function char_tex_wide(font_name, ch)
end
end
local function make_line_texture(line, lineno, pos, line_width, line_height, cwidth_tab, font_size, colorbgw, cwidth_tab_wide)
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 maxw = 0
local font_name = "signs_lib_font_"..font_size.."px"
@ -505,57 +516,61 @@ local function make_line_texture(line, lineno, pos, line_width, line_height, cwi
for word_i, word in ipairs(line) do
local chars = { }
local ch_offs = 0
word = string.gsub(word, "%^[12345678abcdefgh]", {
["^1"] = string.char(0x81),
["^2"] = string.char(0x82),
["^3"] = string.char(0x83),
["^4"] = string.char(0x84),
["^5"] = string.char(0x85),
["^6"] = string.char(0x86),
["^7"] = string.char(0x87),
["^8"] = string.char(0x88),
["^a"] = string.char(0x8a),
["^b"] = string.char(0x8b),
["^c"] = string.char(0x8c),
["^d"] = string.char(0x8d),
["^e"] = string.char(0x8e),
["^f"] = string.char(0x8f),
["^g"] = string.char(0x90),
["^h"] = string.char(0x91)
})
local word_l = #word
local i = 1
local escape = 0
while i <= word_l do
local wide_c
if "&#x" == word:sub(i, i + 2) then
local j = i + 3
local collected = ""
while j <= word_l do
local c = word:sub(j, j)
if c == ";" then
wide_c = collected
break
elseif c < "0" then
break
elseif "f" < c then
break
elseif ("9" < c) and (c < "a") then
break
else
collected = collected .. c
j = j + 1
end
end
end
local wide_type, wide_c = string.match(word:sub(i), "^&#([xu])(%x+);")
local c = word:sub(i, i)
if c == "#" then
local cc = tonumber(word:sub(i+1, i+1), 16)
if cc then
local c2 = word:sub(i+1, i+1)
if escape > 0 then escape = escape - 1 end
if c == "^" and escape == 0 and c2:find("[1-8a-h]") then
c = string.char(tonumber(c2,18)+0x80)
i = i + 1
cur_color = cc
end
local wide_skip = 0
if force_unicode_font then
if wide_c then
wide_skip = #wide_c + 3
wide_type = "u"
elseif c:byte() < 0x80 or c:byte() >= 0xa0 then
wide_type = "u"
local uchar = signs_lib.AnsiToUtf8(c)
local code
if #uchar == 1 then
code = uchar:byte()
else
code = uchar:byte() % (2 ^ (7 - #uchar))
for j = 1, #uchar do
code = code * (2 ^ 6) + uchar:byte(j) - 0x80
end
end
wide_c = string.format("%04x", code)
end
elseif wide_c then
local w = cwidth_tab_wide[wide_c]
wide_skip = #wide_c + 3
end
if c == "#" and escape == 0 and c2:find("[0-9A-Fa-f#^]") then
if c2 == "#" or c2 == "^" then
escape = 2
else
i = i + 1
cur_color = tonumber(c2, 16)
end
elseif wide_c then
local w, code
if wide_type == "x" then
w = cwidth_tab_wide[wide_c]
elseif wide_type == "u" and #wide_c <= 4 then
w = font_size
code = tonumber(wide_c, 16)
if signs_lib.unifont_halfwidth[code] then
w = math.floor(w / 2)
end
end
if w then
width = width + w + 1
if width >= (line_width - cwidth_tab[" "]) then
@ -564,15 +579,28 @@ local function make_line_texture(line, lineno, pos, line_width, line_height, cwi
maxw = math_max(width, maxw)
end
if #chars < MAX_INPUT_CHARS then
local tex
if wide_type == "u" then
local page = math.floor(code / 256)
local idx = code % 256
local x = idx % 16
local y = math.floor(idx / 16)
tex = UNIFONT_TEX:format(page, x, y)
if font_size == 32 then
tex = tex .. "\\^[resize\\:32x32"
end
else
tex = char_tex_wide(font_name, wide_c)
end
table.insert(chars, {
off = ch_offs,
tex = char_tex_wide(font_name, wide_c),
tex = tex,
col = ("%X"):format(cur_color),
})
end
ch_offs = ch_offs + w
end
i = i + #wide_c + 3
i = i + wide_skip
else
local w = cwidth_tab[c]
if w then
@ -654,26 +682,23 @@ function signs_lib.make_sign_texture(lines, pos)
local char_width
local char_width_wide
local colorbgw
local widemult = 1
local widemult = meta:get_int("widefont") == 1 and 0.5 or 1
local force_unicode_font = meta:get_int("unifont") == 1
if meta:get_int("widefont") == 1 then
widemult = 0.5
end
if def.font_size and def.font_size == 31 then
font_size = 31
line_width = math.floor(signs_lib.avgwidth31 * def.chars_per_line) * (def.horiz_scaling * widemult)
line_height = signs_lib.lineheight31
char_width = signs_lib.charwidth31
char_width_wide = signs_lib.charwidth_wide31
colorbgw = signs_lib.colorbgw31
if def.font_size and (def.font_size == 32 or def.font_size == 31) then
font_size = 32
line_width = math.floor(signs_lib.avgwidth32 * def.chars_per_line) * (def.horiz_scaling * widemult)
line_height = signs_lib.lineheight32
char_width = signs_lib.charwidth32
char_width_wide = signs_lib.charwidth_wide32
colorbgw = signs_lib.colorbgw32
else
font_size = 15
line_width = math.floor(signs_lib.avgwidth15 * def.chars_per_line) * (def.horiz_scaling * widemult)
line_height = signs_lib.lineheight15
char_width = signs_lib.charwidth15
char_width_wide = signs_lib.charwidth_wide15
colorbgw = signs_lib.colorbgw15
font_size = 16
line_width = math.floor(signs_lib.avgwidth16 * def.chars_per_line) * (def.horiz_scaling * widemult)
line_height = signs_lib.lineheight16
char_width = signs_lib.charwidth16
char_width_wide = signs_lib.charwidth_wide16
colorbgw = signs_lib.colorbgw16
end
local texture = { ("[combine:%dx%d"):format(line_width, (line_height + def.line_spacing) * def.number_of_lines * def.vert_scaling) }
@ -681,7 +706,7 @@ function signs_lib.make_sign_texture(lines, pos)
local lineno = 0
for i = 1, #lines do
if lineno >= def.number_of_lines then break end
local linetex, ln = make_line_texture(lines[i], lineno, pos, line_width, line_height, char_width, font_size, colorbgw, char_width_wide)
local linetex, ln = make_line_texture(lines[i], lineno, pos, line_width, line_height, char_width, font_size, colorbgw, char_width_wide, force_unicode_font)
table.insert(texture, linetex)
lineno = ln + 1
end
@ -700,13 +725,20 @@ end
function signs_lib.rightclick_sign(pos, node, player, itemstack, pointed_thing)
if not signs_lib.can_modify(pos, player) then return end
if not player or not signs_lib.can_modify(pos, player) then return end
if not player.get_meta then return end
player:get_meta():set_string("signslib:pos", minetest.pos_to_string(pos))
minetest.show_formspec(player:get_player_name(), "signs_lib:sign", get_sign_formspec(pos, node.name))
end
function signs_lib.destruct_sign(pos)
local meta = minetest.get_meta(pos)
local glow = meta:get_string("glow")
if glow ~= "" and not minetest.is_creative_enabled("") then
local num = tonumber(glow)
minetest.add_item(pos, ItemStack(signs_lib.glow_item .. " " .. num))
end
signs_lib.delete_objects(pos)
end
@ -715,11 +747,37 @@ local function make_infotext(text)
local lines = signs_lib.split_lines_and_words(text) or {}
local lines2 = { }
for _, line in ipairs(lines) do
table.insert(lines2, (table.concat(line, " "):gsub("#[0-9a-fA-F]", ""):gsub("##", "#")))
table.insert(lines2, (table.concat(line, " "):gsub("#[0-9a-fA-F#^]", function (s)
return s:sub(2):find("[#^]") and s:sub(2) or ""
end)))
end
return table.concat(lines2, "\n")
end
function signs_lib.glow(pos, node, puncher)
local name = puncher:get_player_name()
if minetest.is_protected(pos, name) then
return
end
local tool = puncher:get_wielded_item()
if tool:get_name() == signs_lib.glow_item then
local meta = minetest.get_meta(pos)
local glow = tonumber(meta:get_string("glow"))
if not glow then
glow = 1
elseif glow < 3 then
glow = glow + 1
else
return -- already at brightest level
end
if not minetest.is_creative_enabled(name) then
tool:take_item()
puncher:set_wielded_item(tool)
end
meta:set_string("glow", glow)
end
end
function signs_lib.update_sign(pos, fields)
local meta = minetest.get_meta(pos)
@ -737,7 +795,9 @@ function signs_lib.update_sign(pos, fields)
meta:set_string("text", text)
meta:set_string("infotext", ownstr..make_infotext(text).." ")
signs_lib.set_obj_text(pos, text)
local glow = meta:get_string("glow")
signs_lib.set_obj_text(pos, text, glow)
end
function signs_lib.can_modify(pos, player)
@ -853,10 +913,6 @@ function signs_lib.after_place_node(pos, placer, itemstack, pointed_thing, locke
local def = minetest.registered_items[signname]
local ppos = minetest.get_pointed_thing_position(pointed_thing)
local pnode = minetest.get_node(ppos)
local pdef = minetest.registered_items[pnode.name]
if def.allow_onpole and signs_lib.check_for_pole(pos, pointed_thing) and not controls.sneak then
local newparam2
local lookdir = minetest.yaw_to_dir(placer:get_look_horizontal())
@ -865,7 +921,6 @@ function signs_lib.after_place_node(pos, placer, itemstack, pointed_thing, locke
else
newparam2 = minetest.dir_to_facedir(lookdir)
end
local node = minetest.get_node(pos)
minetest.swap_node(pos, {name = no_wall_name.."_onpole", param2 = newparam2})
elseif def.allow_onpole_horizontal and signs_lib.check_for_horizontal_pole(pos, pointed_thing) and not controls.sneak then
local newparam2
@ -875,15 +930,12 @@ function signs_lib.after_place_node(pos, placer, itemstack, pointed_thing, locke
else
newparam2 = minetest.dir_to_facedir(lookdir)
end
local node = minetest.get_node(pos)
minetest.swap_node(pos, {name = no_wall_name.."_onpole_horiz", param2 = newparam2})
elseif def.allow_hanging and signs_lib.check_for_ceiling(pointed_thing) and not controls.sneak then
local newparam2 = minetest.dir_to_facedir(placer:get_look_dir())
local node = minetest.get_node(pos)
minetest.swap_node(pos, {name = no_wall_name.."_hanging", param2 = newparam2})
elseif def.allow_yard and signs_lib.check_for_floor(pointed_thing) and not controls.sneak then
local newparam2 = minetest.dir_to_facedir(placer:get_look_dir())
local node = minetest.get_node(pos)
minetest.swap_node(pos, {name = no_wall_name.."_yard", param2 = newparam2})
elseif def.paramtype2 == "facedir" and signs_lib.check_for_ceiling(pointed_thing) then
minetest.swap_node(pos, {name = signname, param2 = 6})
@ -902,6 +954,23 @@ 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()")
end
local use_glow = function(pos, node, puncher, pointed_thing)
if puncher then -- if e.g. a machine tries to punch; only a real person should change the lighting
signs_lib.glow(pos, node, puncher)
end
return signs_lib.update_sign(pos)
end
local glow_drops = function(pos, oldnode, oldmetadata, digger)
if digger and minetest.is_creative_enabled(digger:get_player_name()) then
return
end
local glow = oldmetadata and oldmetadata.fields and oldmetadata.fields.glow
if glow then
minetest.add_item(pos, ItemStack(signs_lib.glow_item .. " " .. glow))
end
end
function signs_lib.register_sign(name, raw_def)
local def = table.copy(raw_def)
@ -917,9 +986,16 @@ function signs_lib.register_sign(name, raw_def)
def.after_place_node = raw_def.after_place_node or signs_lib.after_place_node
if raw_def.entity_info then
if def.allow_glow ~= false then
def.on_punch = raw_def.on_punch or use_glow
def.after_dig_node = raw_def.after_dig_node or glow_drops
else
def.on_punch = raw_def.on_punch or signs_lib.update_sign
end
def.on_rightclick = raw_def.on_rightclick or signs_lib.rightclick_sign
def.on_destruct = raw_def.on_destruct or signs_lib.destruct_sign
def.on_punch = raw_def.on_punch or signs_lib.update_sign
def.number_of_lines = raw_def.number_of_lines or signs_lib.standard_lines
def.horiz_scaling = raw_def.horiz_scaling or signs_lib.standard_hscale
def.vert_scaling = raw_def.vert_scaling or signs_lib.standard_vscale
@ -951,6 +1027,9 @@ function signs_lib.register_sign(name, raw_def)
def.groups = signs_lib.standard_wood_groups
end
-- force all signs into the sign group
def.groups.sign = def.groups.sign or 1
local cbox = signs_lib.make_selection_boxes(35, 25)
def.selection_box = raw_def.selection_box or cbox
@ -1161,7 +1240,7 @@ minetest.register_lbm({
run_at_every_load = true,
action = function(pos, node)
-- yeah, yeah... I know I'm hashing a block pos, but it's still just a set of coords
local hash = minetest.hash_node_position(vector.floor(vector.divide(pos, core.MAP_BLOCKSIZE)))
local hash = minetest.hash_node_position(vector.floor(vector.divide(pos, minetest.MAP_BLOCKSIZE)))
if not signs_lib.block_list[hash] then
signs_lib.block_list[hash] = true
signs_lib.totalblocks = signs_lib.totalblocks + 1
@ -1178,9 +1257,9 @@ minetest.register_chatcommand("regen_signs", {
local totalsigns = 0
for b in pairs(signs_lib.block_list) do
local blockpos = minetest.get_position_from_hash(b)
local pos1 = vector.multiply(blockpos, core.MAP_BLOCKSIZE)
local pos2 = vector.add(pos1, core.MAP_BLOCKSIZE - 1)
if minetest.get_node_or_nil(vector.add(pos1, core.MAP_BLOCKSIZE/2)) then
local pos1 = vector.multiply(blockpos, minetest.MAP_BLOCKSIZE)
local pos2 = vector.add(pos1, minetest.MAP_BLOCKSIZE - 1)
if minetest.get_node_or_nil(vector.add(pos1, minetest.MAP_BLOCKSIZE/2)) then
local signs_in_block = minetest.find_nodes_in_area(pos1, pos2, {"group:sign"})
allsigns[#allsigns + 1] = signs_in_block
totalsigns = totalsigns + #signs_in_block
@ -1225,19 +1304,23 @@ function get_sign_formspec(pos, nodename)
local meta = minetest.get_meta(pos)
local txt = meta:get_string("text")
local state = meta:get_int("unifont") == 1 and "on" or "off"
local formspec = {
"size[6,4]",
"textarea[0,-0.3;6.5,3;text;;" .. minetest.formspec_escape(txt) .. "]",
"background[-0.5,-0.5;7,5;signs_lib_sign_bg.jpg]",
"button_exit[2,3.4;2,1;ok;" .. S("Write") .. "]"
"background[-0.5,-0.5;7,5;signs_lib_sign_bg.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) .. "]",
"button_exit[3.7,3.4;2,1;ok;" .. S("Write") .. "]",
"label[0.3,3.4;Unicode font]",
"image_button[0.6,3.7;1,0.6;signs_lib_switch_" .. state .. ".png;uni_"
.. state .. ";;;false;signs_lib_switch_interm.png]",
}
if minetest.registered_nodes[nodename].allow_widefont then
local state = "off"
if meta:get_int("widefont") == 1 then state = "on" end
formspec[5] = "label[0.5,3.4;Use wide font]"
formspec[6] = "image_button[0.6,3.7;1,0.6;signs_lib_switch_" .. state .. ".png;"
state = meta:get_int("widefont") == 1 and "on" or "off"
formspec[#formspec+1] = "label[2.1,3.4;Wide font]"
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]"
end
@ -1260,23 +1343,40 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
pos_string
))
signs_lib.update_sign(pos, fields)
elseif fields.on or fields.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 meta = minetest.get_meta(pos)
local change
local change_wide
local change_uni
if fields.on and meta:get_int("widefont") == 1 then
if fields.wide_on and meta:get_int("widefont") == 1 then
meta:set_int("widefont", 0)
change = true
elseif fields.off and meta:get_int("widefont") == 0 then
change_wide = true
elseif fields.wide_off and meta:get_int("widefont") == 0 then
meta:set_int("widefont", 1)
change = true
change_wide = true
end
if fields.uni_on and meta:get_int("unifont") == 1 then
meta:set_int("unifont", 0)
change_uni = true
elseif fields.uni_off and meta:get_int("unifont") == 0 then
meta:set_int("unifont", 1)
change_uni = true
end
if change then
if change_wide then
minetest.log("action", S("@1 flipped the wide-font switch to \"@2\" at @3",
(playername or ""),
(fields.on and "off" or "on"),
(fields.wide_on and "off" or "on"),
minetest.pos_to_string(pos)
))
signs_lib.update_sign(pos, fields)
minetest.show_formspec(playername, "signs_lib:sign", get_sign_formspec(pos, node.name))
end
if change_uni then
minetest.log("action", S("@1 flipped the unicode-font switch to \"@2\" at @3",
(playername or ""),
(fields.uni_on and "off" or "on"),
minetest.pos_to_string(pos)
))
signs_lib.update_sign(pos, fields)

View File

@ -1,4 +1,4 @@
if minetest.get_modpath("default") then
local default_fences = {
"default:fence_wood",
"default:fence_acacia_wood",
@ -12,6 +12,7 @@ for _, n in ipairs(default_fences) do
check_for_pole = true
})
end
end
if minetest.get_modpath("cottages") then
local cbox = table.copy(minetest.registered_items["cottages:table"].node_box)

View File

@ -1,5 +1,8 @@
-- encoding borrowed from signs_lib fork at https://github.com/lord-server/lord
-- The "ANSI" encoding here actually refers to "windows-1251", which shows up as
-- "ANSI" on Russian version of MS Windows
local ansi_decode = {
[128] = "\208\130",
[129] = "\208\131",
@ -234,7 +237,7 @@ local nmdc = {
[124] = "|"
}
function AnsiToUtf8(s)
function signs_lib.AnsiToUtf8(s)
local r, b = ""
for i = 1, s and s:len() or 0 do
b = s:byte(i)
@ -255,10 +258,14 @@ function AnsiToUtf8(s)
return r
end
function Utf8ToAnsi(s)
local a, j, r, b, scope = 0, 0, ""
function signs_lib.Utf8ToAnsi(s)
local r, b = ""
local scope
local j, l, u
for i = 1, s and s:len() or 0 do
b = s:byte(i)
-- legacy parser
if b == 0x26 then
r = r .. "&#x26;"
elseif b < 128 then
@ -271,18 +278,57 @@ function Utf8ToAnsi(s)
if scope[b] then
scope = scope[b]
if "string" == type(scope) then
r, scope = r .. scope
r, scope = r .. scope, nil
j = -1 -- supress general UTF-8 parser
end
else
r, scope = r .. "_"
scope = nil
end
elseif utf8_decode[b] then
scope = utf8_decode[b]
else
r = r .. "_"
end
-- general UTF-8 parser
if j == -1 then -- supressed by legacy parser
j = nil
elseif b < 0x80 then
if j then
r = r .. "&#ufffd;"
j = nil
end
-- ASCII handled by legacy parser
elseif b >= 0xc0 then
if j then
r = r .. "&#ufffd;"
end
j = i
if b >= 0xf8 then
r = r .. "&#ufffd;"
j = nil
elseif b >= 0xf0 then
l, u = 4, b % (2 ^ 3)
elseif b >= 0xe0 then
l, u = 3, b % (2 ^ 4)
else
l, u = 2, b % (2 ^ 5)
end
else
if j then
u = u * (2 ^ 6) + b % (2 ^ 6)
if i == j + l - 1 then
r = r .. string.format("&#u%x;", u)
j = nil
end
else
r = r .. "&#ufffd;"
end
end
end
if j then
r = r .. "&#ufffd;"
end
return r
end
signs_lib.wide_character_codes = wide_character_codes
signs_lib.unifont_halfwidth = dofile(signs_lib.path.."/unifont-halfwidth.lua")

View File

@ -7,8 +7,7 @@ signs_lib = {}
signs_lib.path = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(signs_lib.path .. "/intllib.lua")
signs_lib.gettext = S
signs_lib.S = minetest.get_translator(minetest.get_current_modname())
dofile(signs_lib.path.."/encoding.lua")
dofile(signs_lib.path.."/api.lua")

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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é"

View File

@ -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"

View File

@ -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] мод табличек загружен"

27
locale/signs_lib.de.tr Normal file
View File

@ -0,0 +1,27 @@
# textdomain: signs_lib
Locked sign, owned by @1@n=gesperrter Schild, gehört @1@n
Write=schreiben
@1 wrote "@2" to sign at @3=
@1 flipped the wide-font switch to "@2" at @3=
@1 flipped the unicode-font switch to "@2" at @3=
##### not used anymore #####
locked =gesperrt
@1 wrote "@2" to @3sign at @4=@1 schrieb "@2" auf das @3Schild bei @4
Sign=Schild
Can edit all locked signs=Kann alle gesperrte Schilder bearbeiten
Locked Sign=gesperrter Schild
green=grün
yellow=gelb
red=rot
white_red=weißrot
white_black=schwarzweiß
orange=orange
blue=blau
brown=braun
Sign (@1, metal)=Schild (@1, Metall)
Attempt to register unknown node as fence=Versuch ein unbekanntes Element als Zaun zu registrieren
Registered @1 and @2=Registrierte @1 und @2
[MOD] signs loaded=[MOD] Schilder-Mod geladen

25
locale/signs_lib.es.tr Normal file
View File

@ -0,0 +1,25 @@
# textdomain: signs_lib
Locked sign, owned by @1@n=
Write=
@1 wrote "@2" to sign at @3=
@1 flipped the wide-font switch to "@2" at @3=
@1 flipped the unicode-font switch to "@2" at @3=
##### not used anymore #####
locked =bloqueada
@1 wrote "@2" to @3sign at @4=@1 escribio "@2" en el cartel @3en @4
Sign=Letrero
Locked Sign=Letrero bloqueada
green=verde
yellow=amarillo
red=rojo
white_red=rojo y blanco
white_black=negro y blanco
orange=naranja
blue=azul
brown=marrón
Sign (@1, metal)=Letrero (@1, metal)
Registered @1 and @2=Registrado @1 y @2
[MOD] signs loaded=[MOD] signs cargados

27
locale/signs_lib.fr.tr Normal file
View File

@ -0,0 +1,27 @@
# textdomain: signs_lib
Locked sign, owned by @1@n=Panneau verrouillé, appartient à @1@n
Write=
@1 wrote "@2" to sign at @3=
@1 flipped the wide-font switch to "@2" at @3=
@1 flipped the unicode-font switch to "@2" at @3=
##### not used anymore #####
locked =verrouillé
@1 wrote "@2" to @3sign at @4=@1 a écrit "@2" sur le panneau @3en @4
Sign=Panneau
Can edit all locked signs=Peut modifier les panneaux verrouillés
Locked Sign=Panneau (verrouillé)
green=vert
yellow=jaune
red=rouge
white_red=rouge et blanc
white_black=noir et blanc
orange=orange
blue=bleu
brown=marron
Sign (@1, metal)=Panneau (@1, métal)
Attempt to register unknown node as fence=Tentative d'enregistrer un nœud inconnu comme barrière
Registered @1 and @2=Enregistrement de @1 et @
[MOD] signs loaded=[MOD] signs chargé

27
locale/signs_lib.ms.tr Normal file
View File

@ -0,0 +1,27 @@
# textdomain: signs_lib
Locked sign, owned by @1@n=Papan tanda berkunci, milik @1@n
Write=
@1 wrote "@2" to sign at @3=
@1 flipped the wide-font switch to "@2" at @3=
@1 flipped the unicode-font switch to "@2" at @3=
##### not used anymore #####
locked =berkunci
@1 wrote "@2" to @3sign at @4=@1 menulis "@2" atas papan tanda @3dekat @4
Sign=Papan Tanda
Can edit all locked signs=Boleh sunting semua papan tanda berkunci
Locked Sign=Papan Tanda Berkunci
green=hijau
yellow=kuning
red=merah
white_red=putih_merah
white_black=putih_hitam
orange=jingga
blue=biru
brown=perang
Sign (@1, metal)=Papan Tanda (@1, logam)
Attempt to register unknown node as fence=Cuba untuk mendaftar nod tidak diketahui sebagai pagar
Registered @1 and @2=Telah daftar @1 dan @2
[MOD] signs loaded=[MODS] signs telah dimuatkan

27
locale/signs_lib.ru.tr Normal file
View File

@ -0,0 +1,27 @@
# textdomain: signs_lib
Locked sign, owned by @1@n=защищенная табличка, пренадлежит @1@n
Write=записать
@1 wrote "@2" to sign at @3=
@1 flipped the wide-font switch to "@2" at @3=
@1 flipped the unicode-font switch to "@2" at @3=
##### not used anymore #####
locked =защищенный
@1 wrote "@2" to @3sign at @4=@1 записал "@2" в @3sign на @4
Sign=табличка
Can edit all locked signs=Может редактировать все защищенные таблички
Locked Sign=защищенная табличка
green=зеленая
yellow=желтая
red=красная
white_red=краснобелая
white_black=чернобелая
orange=оранжевая
blue=синея
brown=коричневая
Sign (@1, metal)=Табличка (@1, металл)
Attempt to register unknown node as fence=Попытка зарегистрировать неизвестный узел как забор
Registered @1 and @2=Зарегистрировано @1 для @2
[MOD] signs loaded=[MOD] мод табличек загружен

View File

@ -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 ""

6
locale/template.txt Normal file
View File

@ -0,0 +1,6 @@
# textdomain: signs_lib
Locked sign, owned by @1@n=
Write=
@1 wrote "@2" to sign at @3=
@1 flipped the wide-font switch to "@2" at @3=
@1 flipped the unicode-font switch to "@2" at @3=

View File

@ -1,6 +1,5 @@
name = signs_lib
author = VanessaE
depends = default
optional_depends = intllib, screwdriver, streetspoles, streetlamps, cottages, prefab_redo
optional_depends = screwdriver, streetspoles, streetlamps, cottages, prefab_redo, default
description = Adds signs with readable text.
min_minetest_version = 5.2.0
min_minetest_version = 5.4.0

View File

@ -1,5 +1,6 @@
-- Definitions for standard minetest_game wooden and steel wall signs
if minetest.get_modpath("default") then
signs_lib.register_sign("default:sign_wall_wood", {
description = "Wooden wall sign",
inventory_image = "signs_lib_sign_wall_wooden_inv.png",
@ -54,7 +55,7 @@ minetest.register_alias("default:sign_wall_steel_onpole", "default:sign_st
minetest.register_alias("default:sign_wall_steel_onpole_horiz", "default:sign_steel_onpole_horiz")
minetest.register_alias("default:sign_wall_steel_hanging", "default:sign_steel_hanging")
minetest.register_alias("default:sign_wall_steel_yard", "default:sign_steel_yard")
end
table.insert(signs_lib.lbm_restore_nodes, "signs:sign_hanging")
table.insert(signs_lib.lbm_restore_nodes, "basic_signs:hanging_sign")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

Some files were not shown because too many files have changed in this diff Show More