add black and purple signs for cooly
@ -2,3 +2,4 @@ default
|
|||||||
intllib?
|
intllib?
|
||||||
screwdriver?
|
screwdriver?
|
||||||
keyword_interact?
|
keyword_interact?
|
||||||
|
craft_guide?
|
||||||
|
265
encoding.lua
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
-- encoding borrowed from signs_lib mod of https://github.com/lord-server/lord
|
||||||
|
|
||||||
|
local ansi_decode = {
|
||||||
|
[128] = "\208\130",
|
||||||
|
[129] = "\208\131",
|
||||||
|
[130] = "\226\128\154",
|
||||||
|
[131] = "\209\147",
|
||||||
|
[132] = "\226\128\158",
|
||||||
|
[133] = "\226\128\166",
|
||||||
|
[134] = "\226\128\160",
|
||||||
|
[135] = "\226\128\161",
|
||||||
|
[136] = "\226\130\172",
|
||||||
|
[137] = "\226\128\176",
|
||||||
|
[138] = "\208\137",
|
||||||
|
[139] = "\226\128\185",
|
||||||
|
[140] = "\208\138",
|
||||||
|
[141] = "\208\140",
|
||||||
|
[142] = "\208\139",
|
||||||
|
[143] = "\208\143",
|
||||||
|
[144] = "\209\146",
|
||||||
|
[145] = "\226\128\152",
|
||||||
|
[146] = "\226\128\153",
|
||||||
|
[147] = "\226\128\156",
|
||||||
|
[148] = "\226\128\157",
|
||||||
|
[149] = "\226\128\162",
|
||||||
|
[150] = "\226\128\147",
|
||||||
|
[151] = "\226\128\148",
|
||||||
|
[152] = "\194\152",
|
||||||
|
[153] = "\226\132\162",
|
||||||
|
[154] = "\209\153",
|
||||||
|
[155] = "\226\128\186",
|
||||||
|
[156] = "\209\154",
|
||||||
|
[157] = "\209\156",
|
||||||
|
[158] = "\209\155",
|
||||||
|
[159] = "\209\159",
|
||||||
|
[160] = "\194\160",
|
||||||
|
[161] = "\209\142",
|
||||||
|
[162] = "\209\158",
|
||||||
|
[163] = "\208\136",
|
||||||
|
[164] = "\194\164",
|
||||||
|
[165] = "\210\144",
|
||||||
|
[166] = "\194\166",
|
||||||
|
[167] = "\194\167",
|
||||||
|
[168] = "\208\129",
|
||||||
|
[169] = "\194\169",
|
||||||
|
[170] = "\208\132",
|
||||||
|
[171] = "\194\171",
|
||||||
|
[172] = "\194\172",
|
||||||
|
[173] = "\194\173",
|
||||||
|
[174] = "\194\174",
|
||||||
|
[175] = "\208\135",
|
||||||
|
[176] = "\194\176",
|
||||||
|
[177] = "\194\177",
|
||||||
|
[178] = "\208\134",
|
||||||
|
[179] = "\209\150",
|
||||||
|
[180] = "\210\145",
|
||||||
|
[181] = "\194\181",
|
||||||
|
[182] = "\194\182",
|
||||||
|
[183] = "\194\183",
|
||||||
|
[184] = "\209\145",
|
||||||
|
[185] = "\226\132\150",
|
||||||
|
[186] = "\209\148",
|
||||||
|
[187] = "\194\187",
|
||||||
|
[188] = "\209\152",
|
||||||
|
[189] = "\208\133",
|
||||||
|
[190] = "\209\149",
|
||||||
|
[191] = "\209\151"
|
||||||
|
}
|
||||||
|
local utf8_decode = {
|
||||||
|
[128] = {
|
||||||
|
[147] = "\150",
|
||||||
|
[148] = "\151",
|
||||||
|
[152] = "\145",
|
||||||
|
[153] = "\146",
|
||||||
|
[154] = "\130",
|
||||||
|
[156] = "\147",
|
||||||
|
[157] = "\148",
|
||||||
|
[158] = "\132",
|
||||||
|
[160] = "\134",
|
||||||
|
[161] = "\135",
|
||||||
|
[162] = "\149",
|
||||||
|
[166] = "\133",
|
||||||
|
[176] = "\137",
|
||||||
|
[185] = "\139",
|
||||||
|
[186] = "\155"
|
||||||
|
},
|
||||||
|
[130] = {[172] = "\136"},
|
||||||
|
[132] = {[150] = "\185", [162] = "\153"},
|
||||||
|
[194] = {
|
||||||
|
[152] = "\152",
|
||||||
|
[160] = "\160",
|
||||||
|
[164] = "\164",
|
||||||
|
[166] = "\166",
|
||||||
|
[167] = "\167",
|
||||||
|
[169] = "\169",
|
||||||
|
[171] = "\171",
|
||||||
|
[172] = "\172",
|
||||||
|
[173] = "\173",
|
||||||
|
[174] = "\174",
|
||||||
|
[176] = "\176",
|
||||||
|
[177] = "\177",
|
||||||
|
[181] = "\181",
|
||||||
|
[182] = "\182",
|
||||||
|
[183] = "\183",
|
||||||
|
[187] = "\187"
|
||||||
|
},
|
||||||
|
[208] = {
|
||||||
|
[129] = "\168",
|
||||||
|
[130] = "\128",
|
||||||
|
[131] = "\129",
|
||||||
|
[132] = "\170",
|
||||||
|
[133] = "\189",
|
||||||
|
[134] = "\178",
|
||||||
|
[135] = "\175",
|
||||||
|
[136] = "\163",
|
||||||
|
[137] = "\138",
|
||||||
|
[138] = "\140",
|
||||||
|
[139] = "\142",
|
||||||
|
[140] = "\141",
|
||||||
|
[143] = "\143",
|
||||||
|
[144] = "\192",
|
||||||
|
[145] = "\193",
|
||||||
|
[146] = "\194",
|
||||||
|
[147] = "\195",
|
||||||
|
[148] = "\196",
|
||||||
|
[149] = "\197",
|
||||||
|
[150] = "\198",
|
||||||
|
[151] = "\199",
|
||||||
|
[152] = "\200",
|
||||||
|
[153] = "\201",
|
||||||
|
[154] = "\202",
|
||||||
|
[155] = "\203",
|
||||||
|
[156] = "\204",
|
||||||
|
[157] = "\205",
|
||||||
|
[158] = "\206",
|
||||||
|
[159] = "\207",
|
||||||
|
[160] = "\208",
|
||||||
|
[161] = "\209",
|
||||||
|
[162] = "\210",
|
||||||
|
[163] = "\211",
|
||||||
|
[164] = "\212",
|
||||||
|
[165] = "\213",
|
||||||
|
[166] = "\214",
|
||||||
|
[167] = "\215",
|
||||||
|
[168] = "\216",
|
||||||
|
[169] = "\217",
|
||||||
|
[170] = "\218",
|
||||||
|
[171] = "\219",
|
||||||
|
[172] = "\220",
|
||||||
|
[173] = "\221",
|
||||||
|
[174] = "\222",
|
||||||
|
[175] = "\223",
|
||||||
|
[176] = "\224",
|
||||||
|
[177] = "\225",
|
||||||
|
[178] = "\226",
|
||||||
|
[179] = "\227",
|
||||||
|
[180] = "\228",
|
||||||
|
[181] = "\229",
|
||||||
|
[182] = "\230",
|
||||||
|
[183] = "\231",
|
||||||
|
[184] = "\232",
|
||||||
|
[185] = "\233",
|
||||||
|
[186] = "\234",
|
||||||
|
[187] = "\235",
|
||||||
|
[188] = "\236",
|
||||||
|
[189] = "\237",
|
||||||
|
[190] = "\238",
|
||||||
|
[191] = "\239"
|
||||||
|
},
|
||||||
|
[209] = {
|
||||||
|
[128] = "\240",
|
||||||
|
[129] = "\241",
|
||||||
|
[130] = "\242",
|
||||||
|
[131] = "\243",
|
||||||
|
[132] = "\244",
|
||||||
|
[133] = "\245",
|
||||||
|
[134] = "\246",
|
||||||
|
[135] = "\247",
|
||||||
|
[136] = "\248",
|
||||||
|
[137] = "\249",
|
||||||
|
[138] = "\250",
|
||||||
|
[139] = "\251",
|
||||||
|
[140] = "\252",
|
||||||
|
[141] = "\253",
|
||||||
|
[142] = "\254",
|
||||||
|
[143] = "\255",
|
||||||
|
[144] = "\161",
|
||||||
|
[145] = "\184",
|
||||||
|
[146] = "\144",
|
||||||
|
[147] = "\131",
|
||||||
|
[148] = "\186",
|
||||||
|
[149] = "\190",
|
||||||
|
[150] = "\179",
|
||||||
|
[151] = "\191",
|
||||||
|
[152] = "\188",
|
||||||
|
[153] = "\154",
|
||||||
|
[154] = "\156",
|
||||||
|
[155] = "\158",
|
||||||
|
[156] = "\157",
|
||||||
|
[158] = "\162",
|
||||||
|
[159] = "\159"
|
||||||
|
},
|
||||||
|
[210] = {[144] = "\165", [145] = "\180"}
|
||||||
|
}
|
||||||
|
|
||||||
|
local nmdc = {
|
||||||
|
[36] = "$",
|
||||||
|
[124] = "|"
|
||||||
|
}
|
||||||
|
|
||||||
|
function AnsiToUtf8(s)
|
||||||
|
local r, b = ""
|
||||||
|
for i = 1, s and s:len() or 0 do
|
||||||
|
b = s:byte(i)
|
||||||
|
if b < 128 then
|
||||||
|
r = r .. string.char(b)
|
||||||
|
else
|
||||||
|
if b > 239 then
|
||||||
|
r = r .. "\209" .. string.char(b - 112)
|
||||||
|
elseif b > 191 then
|
||||||
|
r = r .. "\208" .. string.char(b - 48)
|
||||||
|
elseif ansi_decode[b] then
|
||||||
|
r = r .. ansi_decode[b]
|
||||||
|
else
|
||||||
|
r = r .. "_"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return r
|
||||||
|
end
|
||||||
|
|
||||||
|
function Utf8ToAnsi(s)
|
||||||
|
local a, j, r, b = 0, 0, ""
|
||||||
|
for i = 1, s and s:len() or 0 do
|
||||||
|
b = s:byte(i)
|
||||||
|
if b < 128 then
|
||||||
|
if nmdc[b] then
|
||||||
|
r = r .. nmdc[b]
|
||||||
|
else
|
||||||
|
r = r .. string.char(b)
|
||||||
|
end
|
||||||
|
elseif a == 2 then
|
||||||
|
a, j = a - 1, b
|
||||||
|
elseif a == 1 then
|
||||||
|
--if j == nil or b == nil then return r end
|
||||||
|
--print(j)
|
||||||
|
--print(b)
|
||||||
|
--local ansi = utf8_decode[j]
|
||||||
|
--if ansi == nil then return r end
|
||||||
|
--if ansi[b] == nil then return r end
|
||||||
|
if utf8_decode[j] then
|
||||||
|
if utf8_decode[j][b] then
|
||||||
|
a, r = a - 1, r .. utf8_decode[j][b]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif b == 226 then
|
||||||
|
a = 2
|
||||||
|
elseif b == 194 or b == 208 or b == 209 or b == 210 then
|
||||||
|
j, a = b, 1
|
||||||
|
else
|
||||||
|
r = r .. "_"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return r
|
||||||
|
end
|
353
init.lua
@ -9,26 +9,64 @@
|
|||||||
-- { delta = {entity position for 270° yaw}, exact yaw expression }
|
-- { delta = {entity position for 270° yaw}, exact yaw expression }
|
||||||
-- { delta = {entity position for 90° yaw}, exact yaw expression }
|
-- { delta = {entity position for 90° yaw}, exact yaw expression }
|
||||||
-- }
|
-- }
|
||||||
|
-- Made colored metal signs optionals
|
||||||
|
local enable_colored_metal_signs = true
|
||||||
|
|
||||||
-- CWz's keyword interact mod uses this setting.
|
-- CWz's keyword interact mod uses this setting.
|
||||||
local current_keyword = minetest.setting_get("interact_keyword") or "iaccept"
|
local current_keyword = minetest.settings:get("interact_keyword") or "iaccept"
|
||||||
|
|
||||||
signs_lib = {}
|
signs_lib = {}
|
||||||
|
signs_lib.path = minetest.get_modpath(minetest.get_current_modname())
|
||||||
screwdriver = screwdriver or {}
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
signs_lib.wallmounted_rotate = function(pos, node, user, mode, new_param2)
|
-- Load support for intllib.
|
||||||
if mode ~= screwdriver.ROTATE_AXIS then return false end
|
local S, NS = dofile(signs_lib.path .. "/intllib.lua")
|
||||||
minetest.swap_node(pos, {name = node.name, param2 = (node.param2 + 1) % 6})
|
signs_lib.gettext = S
|
||||||
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
|
||||||
local e = v:get_luaentity()
|
-- text encoding
|
||||||
if e and e.name == "signs:text" then
|
dofile(signs_lib.path .. "/encoding.lua");
|
||||||
v:remove()
|
|
||||||
end
|
|
||||||
end
|
local wall_dir_change = {
|
||||||
signs_lib.update_sign(pos)
|
[0] = 4,
|
||||||
|
0,
|
||||||
|
5,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
signs_lib.wallmounted_rotate = function(pos, node, user, mode)
|
||||||
|
if mode ~= screwdriver.ROTATE_FACE then return false end
|
||||||
|
minetest.swap_node(pos, { name = node.name, param2 = wall_dir_change[node.param2 % 6] })
|
||||||
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
signs_lib.facedir_rotate = function(pos, node, user, mode)
|
||||||
|
if mode ~= screwdriver.ROTATE_FACE then return false end
|
||||||
|
local newparam2 = (node.param2 %8) + 1
|
||||||
|
if newparam2 == 5 then
|
||||||
|
newparam2 = 6
|
||||||
|
elseif newparam2 > 6 then
|
||||||
|
newparam2 = 0
|
||||||
|
end
|
||||||
|
minetest.swap_node(pos, { name = node.name, param2 = newparam2 })
|
||||||
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
signs_lib.facedir_rotate_simple = function(pos, node, user, mode)
|
||||||
|
if mode ~= screwdriver.ROTATE_FACE then return false end
|
||||||
|
local newparam2 = (node.param2 %8) + 1
|
||||||
|
if newparam2 > 3 then newparam2 = 0 end
|
||||||
|
minetest.swap_node(pos, { name = node.name, param2 = newparam2 })
|
||||||
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
signs_lib.modpath = minetest.get_modpath("signs_lib")
|
signs_lib.modpath = minetest.get_modpath("signs_lib")
|
||||||
|
|
||||||
local DEFAULT_TEXT_SCALE = {x=0.8, y=0.5}
|
local DEFAULT_TEXT_SCALE = {x=0.8, y=0.5}
|
||||||
@ -111,10 +149,6 @@ signs_lib.sign_post_model = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
|
||||||
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
|
|
||||||
signs_lib.gettext = S
|
|
||||||
|
|
||||||
-- the list of standard sign nodes
|
-- the list of standard sign nodes
|
||||||
|
|
||||||
signs_lib.sign_node_list = {
|
signs_lib.sign_node_list = {
|
||||||
@ -130,6 +164,8 @@ signs_lib.sign_node_list = {
|
|||||||
"signs:sign_wall_orange",
|
"signs:sign_wall_orange",
|
||||||
"signs:sign_wall_blue",
|
"signs:sign_wall_blue",
|
||||||
"signs:sign_wall_brown",
|
"signs:sign_wall_brown",
|
||||||
|
"signs:sign_wall_black",
|
||||||
|
"signs:sign_wall_purple",
|
||||||
"locked_sign:sign_wall_locked"
|
"locked_sign:sign_wall_locked"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +186,7 @@ default_sign_metal_image = "default_sign_steel.png"
|
|||||||
--table copy
|
--table copy
|
||||||
|
|
||||||
function signs_lib.table_copy(t)
|
function signs_lib.table_copy(t)
|
||||||
local nt = { };
|
local nt = { }
|
||||||
for k, v in pairs(t) do
|
for k, v in pairs(t) do
|
||||||
if type(v) == "table" then
|
if type(v) == "table" then
|
||||||
nt[k] = signs_lib.table_copy(v)
|
nt[k] = signs_lib.table_copy(v)
|
||||||
@ -163,7 +199,7 @@ end
|
|||||||
|
|
||||||
-- infinite stacks
|
-- infinite stacks
|
||||||
|
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
signs_lib.expect_infinite_stacks = false
|
signs_lib.expect_infinite_stacks = false
|
||||||
else
|
else
|
||||||
signs_lib.expect_infinite_stacks = true
|
signs_lib.expect_infinite_stacks = true
|
||||||
@ -171,28 +207,48 @@ end
|
|||||||
|
|
||||||
-- CONSTANTS
|
-- CONSTANTS
|
||||||
|
|
||||||
local MP = minetest.get_modpath("signs_lib")
|
|
||||||
|
|
||||||
-- Used by `build_char_db' to locate the file.
|
|
||||||
local FONT_FMT = "%s/hdf_%02x.png"
|
|
||||||
|
|
||||||
-- Simple texture name for building text texture.
|
|
||||||
local FONT_FMT_SIMPLE = "hdf_%02x.png"
|
|
||||||
|
|
||||||
-- Path to the textures.
|
-- Path to the textures.
|
||||||
local TP = MP.."/textures"
|
local TP = signs_lib.path .. "/textures"
|
||||||
|
-- Font file formatter
|
||||||
|
local CHAR_FILE = "%s_%02x.png"
|
||||||
|
-- Fonts path
|
||||||
|
local CHAR_PATH = TP .. "/" .. CHAR_FILE
|
||||||
|
|
||||||
|
-- Font name.
|
||||||
|
local font_name = "hdf"
|
||||||
|
|
||||||
-- Lots of overkill here. KISS advocates, go away, shoo! ;) -- kaeza
|
-- Lots of overkill here. KISS advocates, go away, shoo! ;) -- kaeza
|
||||||
|
|
||||||
local PNG_HDR = string.char(0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A)
|
local PNG_HDR = string.char(0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A)
|
||||||
|
|
||||||
|
-- check if a file does exist
|
||||||
|
-- to avoid reopening file after checking again
|
||||||
|
-- pass TRUE as second argument
|
||||||
|
function file_exists(name, return_handle, mode)
|
||||||
|
mode = mode or "r";
|
||||||
|
local f = io.open(name, mode)
|
||||||
|
if f ~= nil then
|
||||||
|
if (return_handle) then
|
||||||
|
return f
|
||||||
|
end
|
||||||
|
io.close(f)
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Read the image size from a PNG file.
|
-- Read the image size from a PNG file.
|
||||||
-- Returns image_w, image_h.
|
-- Returns image_w, image_h.
|
||||||
-- Only the LSB is read from each field!
|
-- Only the LSB is read from each field!
|
||||||
local function read_image_size(filename)
|
local function read_image_size(filename)
|
||||||
local f = io.open(filename, "rb")
|
local f = file_exists(filename, true, "rb")
|
||||||
|
-- file might not exist (don't crash the game)
|
||||||
|
if (not f) then
|
||||||
|
return 0, 0
|
||||||
|
end
|
||||||
f:seek("set", 0x0)
|
f:seek("set", 0x0)
|
||||||
local hdr = f:read(8)
|
local hdr = f:read(string.len(PNG_HDR))
|
||||||
if hdr ~= PNG_HDR then
|
if hdr ~= PNG_HDR then
|
||||||
f:close()
|
f:close()
|
||||||
return
|
return
|
||||||
@ -214,7 +270,7 @@ local COLORBGW, COLORBGH
|
|||||||
-- Please note that CHARS_PER_LINE is multiplied by the average character
|
-- Please note that CHARS_PER_LINE is multiplied by the average character
|
||||||
-- width to get the total width of the canvas, so for proportional fonts,
|
-- width to get the total width of the canvas, so for proportional fonts,
|
||||||
-- either more or fewer characters may fit on a line.
|
-- either more or fewer characters may fit on a line.
|
||||||
local CHARS_PER_LINE = 20 -- 30
|
local CHARS_PER_LINE = 30
|
||||||
local NUMBER_OF_LINES = 6
|
local NUMBER_OF_LINES = 6
|
||||||
|
|
||||||
-- 6 rows, max 80 chars per, plus a bit of fudge to
|
-- 6 rows, max 80 chars per, plus a bit of fudge to
|
||||||
@ -240,8 +296,8 @@ local function build_char_db()
|
|||||||
local total_width = 0
|
local total_width = 0
|
||||||
local char_count = 0
|
local char_count = 0
|
||||||
|
|
||||||
for c = 32, 126 do
|
for c = 32, 255 do
|
||||||
local w, h = read_image_size(FONT_FMT:format(TP, c))
|
local w, h = read_image_size(CHAR_PATH:format(font_name, c))
|
||||||
if w and h then
|
if w and h then
|
||||||
local ch = string.char(c)
|
local ch = string.char(c)
|
||||||
charwidth[ch] = w
|
charwidth[ch] = w
|
||||||
@ -299,12 +355,25 @@ local math_max = math.max
|
|||||||
local function fill_line(x, y, w, c)
|
local function fill_line(x, y, w, c)
|
||||||
c = c or "0"
|
c = c or "0"
|
||||||
local tex = { }
|
local tex = { }
|
||||||
for xx = 0, math.max(0, w), COLORBGW do
|
for xx = 0, math_max(0, w), COLORBGW do
|
||||||
table.insert(tex, (":%d,%d=slc_%s.png"):format(x + xx, y, c))
|
table.insert(tex, (":%d,%d=slc_%s.png"):format(x + xx, y, c))
|
||||||
end
|
end
|
||||||
return table.concat(tex)
|
return table.concat(tex)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- make char texture file name
|
||||||
|
-- if texture file does not exist use fallback texture instead
|
||||||
|
local function char_tex(font_name, ch)
|
||||||
|
local c = ch:byte()
|
||||||
|
local exists, tex = file_exists(CHAR_PATH:format(font_name, c))
|
||||||
|
if exists and c ~= 14 then
|
||||||
|
tex = CHAR_FILE:format(font_name, c)
|
||||||
|
else
|
||||||
|
tex = CHAR_FILE:format(font_name, 0x0)
|
||||||
|
end
|
||||||
|
return tex, exists
|
||||||
|
end
|
||||||
|
|
||||||
local function make_line_texture(line, lineno, pos)
|
local function make_line_texture(line, lineno, pos)
|
||||||
|
|
||||||
local width = 0
|
local width = 0
|
||||||
@ -342,7 +411,7 @@ local function make_line_texture(line, lineno, pos)
|
|||||||
if #chars < MAX_INPUT_CHARS then
|
if #chars < MAX_INPUT_CHARS then
|
||||||
table.insert(chars, {
|
table.insert(chars, {
|
||||||
off = ch_offs,
|
off = ch_offs,
|
||||||
tex=FONT_FMT_SIMPLE:format(c:byte()),
|
tex = char_tex(font_name, c),
|
||||||
col = ("%X"):format(cur_color),
|
col = ("%X"):format(cur_color),
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -384,7 +453,10 @@ local function make_line_texture(line, lineno, pos)
|
|||||||
end
|
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, ch.tex))
|
||||||
end
|
end
|
||||||
table.insert(texture, (":%d,%d=hdf_20.png"):format(xpos + word.w, ypos))
|
table.insert(
|
||||||
|
texture,
|
||||||
|
(":%d,%d="):format(xpos + word.w, ypos) .. char_tex(font_name, " ")
|
||||||
|
)
|
||||||
xpos = xpos + word.w + charwidth[" "]
|
xpos = xpos + word.w + charwidth[" "]
|
||||||
if xpos >= (SIGN_WIDTH + charwidth[" "]) then break end
|
if xpos >= (SIGN_WIDTH + charwidth[" "]) then break end
|
||||||
end
|
end
|
||||||
@ -410,10 +482,11 @@ end
|
|||||||
|
|
||||||
local function set_obj_text(obj, text, new, pos)
|
local function set_obj_text(obj, text, new, pos)
|
||||||
local split = new and split_lines_and_words or split_lines_and_words_old
|
local split = new and split_lines_and_words or split_lines_and_words_old
|
||||||
|
local text_ansi = Utf8ToAnsi(text)
|
||||||
local n = minetest.registered_nodes[minetest.get_node(pos).name]
|
local n = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||||
local text_scale = n.text_scale or DEFAULT_TEXT_SCALE
|
local text_scale = (n and n.text_scale) or DEFAULT_TEXT_SCALE
|
||||||
obj:set_properties({
|
obj:set_properties({
|
||||||
textures={make_sign_texture(split(text), pos)},
|
textures={make_sign_texture(split(text_ansi), pos)},
|
||||||
visual_size = text_scale,
|
visual_size = text_scale,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -423,8 +496,9 @@ signs_lib.construct_sign = function(pos, locked)
|
|||||||
meta:set_string(
|
meta:set_string(
|
||||||
"formspec",
|
"formspec",
|
||||||
"size[6,4]"..
|
"size[6,4]"..
|
||||||
|
-- "textarea[0,-0.3;6.5,3;text;;${text}]"..
|
||||||
"textarea[0,-0.3;6.6,3;text;;${text}]"..
|
"textarea[0,-0.3;6.6,3;text;;${text}]"..
|
||||||
"button_exit[2,3.4;2,1;ok;Write]"..
|
"button_exit[2,3.4;2,1;ok;"..S("Write").."]"..
|
||||||
"background[-0.5,-0.5;7,5;bg_signs_lib.jpg]")
|
"background[-0.5,-0.5;7,5;bg_signs_lib.jpg]")
|
||||||
meta:set_string("infotext", "")
|
meta:set_string("infotext", "")
|
||||||
end
|
end
|
||||||
@ -449,7 +523,7 @@ local function make_infotext(text)
|
|||||||
return table.concat(lines2, "\n")
|
return table.concat(lines2, "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
signs_lib.update_sign = function(pos, fields, owner)
|
signs_lib.update_sign = function(pos, fields, owner, node)
|
||||||
|
|
||||||
-- First, check if the interact keyword from CWz's mod is being set,
|
-- First, check if the interact keyword from CWz's mod is being set,
|
||||||
-- or has been changed since the last restart...
|
-- or has been changed since the last restart...
|
||||||
@ -471,7 +545,7 @@ signs_lib.update_sign = function(pos, fields, owner)
|
|||||||
signs_lib.destruct_sign(pos)
|
signs_lib.destruct_sign(pos)
|
||||||
meta:set_string("keyword", current_keyword)
|
meta:set_string("keyword", current_keyword)
|
||||||
local ownstr = ""
|
local ownstr = ""
|
||||||
if owner then ownstr = "Locked sign, owned by "..owner.."\n" end
|
if owner then ownstr = S("Locked sign, owned by @1\n", owner) end
|
||||||
meta:set_string("infotext", ownstr..string.gsub(make_infotext(stored_text), "@KEYWORD", current_keyword).." ")
|
meta:set_string("infotext", ownstr..string.gsub(make_infotext(stored_text), "@KEYWORD", current_keyword).." ")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -483,7 +557,7 @@ signs_lib.update_sign = function(pos, fields, owner)
|
|||||||
fields.text = trim_input(fields.text)
|
fields.text = trim_input(fields.text)
|
||||||
|
|
||||||
local ownstr = ""
|
local ownstr = ""
|
||||||
if owner then ownstr = "Locked sign, owned by "..owner.."\n" end
|
if owner then ownstr = S("Locked sign, owned by @1\n", owner) end
|
||||||
|
|
||||||
meta:set_string("infotext", ownstr..string.gsub(make_infotext(fields.text), "@KEYWORD", current_keyword).." ")
|
meta:set_string("infotext", ownstr..string.gsub(make_infotext(fields.text), "@KEYWORD", current_keyword).." ")
|
||||||
meta:set_string("text", fields.text)
|
meta:set_string("text", fields.text)
|
||||||
@ -493,31 +567,16 @@ signs_lib.update_sign = function(pos, fields, owner)
|
|||||||
else
|
else
|
||||||
new = (meta:get_int("__signslib_new_format") ~= 0)
|
new = (meta:get_int("__signslib_new_format") ~= 0)
|
||||||
end
|
end
|
||||||
local text = meta:get_string("text")
|
|
||||||
-- if text == nil then return end
|
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
|
||||||
local found
|
|
||||||
for _, v in ipairs(objects) do
|
|
||||||
local e = v:get_luaentity()
|
|
||||||
if e and e.name == "signs:text" then
|
|
||||||
-- if found then
|
|
||||||
v:remove()
|
|
||||||
-- else
|
|
||||||
-- set_obj_text(v, text, new, pos)
|
|
||||||
-- found = true
|
|
||||||
-- end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if text == nil or text == "" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- if found then
|
|
||||||
-- return
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- if there is no entity
|
signs_lib.destruct_sign(pos)
|
||||||
|
|
||||||
|
local text = meta:get_string("text")
|
||||||
|
if text == nil or text == "" then return end
|
||||||
|
|
||||||
|
--if node then print ("---", node.name, node.param2) end
|
||||||
|
|
||||||
local sign_info
|
local sign_info
|
||||||
local signnode = minetest.get_node(pos)
|
local signnode = node or minetest.get_node(pos)
|
||||||
local signname = signnode.name
|
local signname = signnode.name
|
||||||
local textpos = minetest.registered_nodes[signname].textpos
|
local textpos = minetest.registered_nodes[signname].textpos
|
||||||
if textpos then
|
if textpos then
|
||||||
@ -540,17 +599,24 @@ signs_lib.update_sign = function(pos, fields, owner)
|
|||||||
if sign_info == nil then
|
if sign_info == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local text = minetest.add_entity({x = pos.x + sign_info.delta.x,
|
local text = minetest.add_entity({
|
||||||
|
x = pos.x + sign_info.delta.x,
|
||||||
y = pos.y + sign_info.delta.y,
|
y = pos.y + sign_info.delta.y,
|
||||||
z = pos.z + sign_info.delta.z}, "signs:text")
|
z = pos.z + sign_info.delta.z}, "signs:text")
|
||||||
text:setyaw(sign_info.yaw)
|
text:set_yaw(sign_info.yaw)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- What kind of sign do we need to place, anyway?
|
-- What kind of sign do we need to place, anyway?
|
||||||
|
|
||||||
|
minetest.register_privilege("nosign", {
|
||||||
|
description = "Stops players placing signs",
|
||||||
|
give_to_singleplayer = false,
|
||||||
|
give_to_admin = false
|
||||||
|
})
|
||||||
|
|
||||||
function signs_lib.determine_sign_type(itemstack, placer, pointed_thing, locked)
|
function signs_lib.determine_sign_type(itemstack, placer, pointed_thing, locked)
|
||||||
local name
|
local name
|
||||||
name = minetest.get_node(pointed_thing.under).name
|
-- name = minetest.get_node(pointed_thing.under).name
|
||||||
-- if fences_with_sign[name] then
|
-- if fences_with_sign[name] then
|
||||||
-- if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then
|
-- if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then
|
||||||
-- minetest.record_protection_violation(pointed_thing.under,
|
-- minetest.record_protection_violation(pointed_thing.under,
|
||||||
@ -570,9 +636,17 @@ function signs_lib.determine_sign_type(itemstack, placer, pointed_thing, locked)
|
|||||||
end
|
end
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
-- is player limited from placing signs
|
||||||
|
if minetest.check_player_privs(placer:get_player_name(), {nosign = true}) then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local node=minetest.get_node(pointed_thing.under)
|
local node=minetest.get_node(pointed_thing.under)
|
||||||
|
|
||||||
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
|
if minetest.registered_nodes[node.name] and
|
||||||
|
minetest.registered_nodes[node.name].on_rightclick and
|
||||||
|
not placer:get_player_control().sneak then
|
||||||
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack, pointed_thing)
|
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack, pointed_thing)
|
||||||
else
|
else
|
||||||
local above = pointed_thing.above
|
local above = pointed_thing.above
|
||||||
@ -583,7 +657,7 @@ function signs_lib.determine_sign_type(itemstack, placer, pointed_thing, locked)
|
|||||||
|
|
||||||
local wdir = minetest.dir_to_wallmounted(dir)
|
local wdir = minetest.dir_to_wallmounted(dir)
|
||||||
|
|
||||||
local placer_pos = placer:getpos()
|
local placer_pos = placer:get_pos()
|
||||||
if placer_pos then
|
if placer_pos then
|
||||||
dir = {
|
dir = {
|
||||||
x = above.x - placer_pos.x,
|
x = above.x - placer_pos.x,
|
||||||
@ -630,11 +704,12 @@ function signs_lib.receive_fields(pos, formname, fields, sender, lock)
|
|||||||
sender:get_player_name())
|
sender:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local lockstr = lock and "locked " or ""
|
local lockstr = lock and S("locked ") or ""
|
||||||
if fields and fields.text and fields.ok then
|
if fields and fields.text and fields.ok then
|
||||||
minetest.log("action", S("%s wrote \"%s\" to "..lockstr.."sign at %s"):format(
|
minetest.log("action", S("@1 wrote \"@2\" to @3sign at @4",
|
||||||
(sender:get_player_name() or ""),
|
(sender:get_player_name() or ""),
|
||||||
fields.text,
|
fields.text:gsub('\\', '\\\\'):gsub("\n", "\\n"),
|
||||||
|
lockstr,
|
||||||
minetest.pos_to_string(pos)
|
minetest.pos_to_string(pos)
|
||||||
))
|
))
|
||||||
if lock then
|
if lock then
|
||||||
@ -671,7 +746,7 @@ minetest.register_node(":"..default_sign, {
|
|||||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
end,
|
end,
|
||||||
on_rotate = signs_lib.wallmounted_rotate
|
on_rotate = signs_lib.wallmounted_rotate
|
||||||
})
|
})
|
||||||
@ -700,8 +775,10 @@ minetest.register_node(":signs:sign_yard", {
|
|||||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
end,
|
end,
|
||||||
|
on_rotate = signs_lib.facedir_rotate_simple
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(":signs:sign_hanging", {
|
minetest.register_node(":signs:sign_hanging", {
|
||||||
@ -735,8 +812,9 @@ minetest.register_node(":signs:sign_hanging", {
|
|||||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
end,
|
end,
|
||||||
|
on_rotate = signs_lib.facedir_rotate_simple
|
||||||
})
|
})
|
||||||
--[[
|
--[[
|
||||||
minetest.register_node(":signs:sign_post", {
|
minetest.register_node(":signs:sign_post", {
|
||||||
@ -761,14 +839,15 @@ minetest.register_node(":signs:sign_post", {
|
|||||||
{ items = { "default:fence_wood" }},
|
{ items = { "default:fence_wood" }},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
on_rotate = signs_lib.facedir_rotate_simple
|
||||||
})
|
})
|
||||||
]]
|
]]
|
||||||
-- Locked wall sign
|
-- Locked wall sign
|
||||||
|
|
||||||
minetest.register_privilege("sign_editor", "Can edit all locked signs")
|
minetest.register_privilege("sign_editor", S("Can edit all locked signs"))
|
||||||
|
|
||||||
minetest.register_node(":locked_sign:sign_wall_locked", {
|
minetest.register_node(":locked_sign:sign_wall_locked", {
|
||||||
description = S("Sign"),
|
description = S("Locked Sign"),
|
||||||
inventory_image = "signs_locked_inv.png",
|
inventory_image = "signs_locked_inv.png",
|
||||||
wield_image = "signs_locked_inv.png",
|
wield_image = "signs_locked_inv.png",
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
@ -792,20 +871,20 @@ minetest.register_node(":locked_sign:sign_wall_locked", {
|
|||||||
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 pname = sender:get_player_name() or ""
|
local pname = sender:get_player_name() or ""
|
||||||
if pname ~= owner and pname ~= minetest.setting_get("name")
|
if pname ~= owner and pname ~= minetest.settings:get("name")
|
||||||
and not minetest.check_player_privs(pname, {sign_editor=true}) then
|
and not minetest.check_player_privs(pname, {sign_editor=true}) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
signs_lib.receive_fields(pos, formname, fields, sender, true)
|
signs_lib.receive_fields(pos, formname, fields, sender, true)
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos, player)
|
can_dig = function(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 pname = player:get_player_name()
|
local pname = player:get_player_name()
|
||||||
return pname == owner or pname == minetest.setting_get("name")
|
return pname == owner or pname == minetest.settings:get("name")
|
||||||
or minetest.check_player_privs(pname, {sign_editor=true})
|
or minetest.check_player_privs(pname, {sign_editor=true})
|
||||||
end,
|
end,
|
||||||
on_rotate = signs_lib.wallmounted_rotate
|
on_rotate = signs_lib.wallmounted_rotate
|
||||||
@ -840,22 +919,33 @@ if minetest.registered_nodes["default:sign_wall_steel"] then
|
|||||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
end,
|
end,
|
||||||
on_rotate = signs_lib.wallmounted_rotate
|
on_rotate = signs_lib.wallmounted_rotate
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- metal, colored signs
|
-- metal, colored signs
|
||||||
|
if enable_colored_metal_signs then
|
||||||
local sign_colors = { "green", "yellow", "red", "white_red", "white_black", "orange", "blue", "brown" }
|
-- array : color, translated color, default text color
|
||||||
local sign_default_text_colors = { "f", "0", "f", "4", "0", "0", "f", "f" }
|
local sign_colors = {
|
||||||
|
{"green", S("green"), "f"},
|
||||||
|
{"yellow", S("yellow"), "0"},
|
||||||
|
{"red", S("red"), "f"},
|
||||||
|
{"white_red", S("white_red"), "4"},
|
||||||
|
{"white_black", S("white_black"), "0"},
|
||||||
|
{"orange", S("orange"), "0"},
|
||||||
|
{"blue", S("blue"), "f"},
|
||||||
|
{"brown", S("brown"), "f"},
|
||||||
|
{"black", S("black"), "f"},
|
||||||
|
{"purple", S("purple"), "f"},
|
||||||
|
}
|
||||||
|
|
||||||
for i, color in ipairs(sign_colors) do
|
for i, color in ipairs(sign_colors) do
|
||||||
minetest.register_node(":signs:sign_wall_"..color, {
|
minetest.register_node(":signs:sign_wall_"..color[1], {
|
||||||
description = S("Sign ("..color..", metal)"),
|
description = S("Sign (@1, metal)", color[2]),
|
||||||
inventory_image = "signs_"..color.."_inv.png",
|
inventory_image = "signs_"..color[1].."_inv.png",
|
||||||
wield_image = "signs_"..color.."_inv.png",
|
wield_image = "signs_"..color[1].."_inv.png",
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -868,9 +958,9 @@ for i, color in ipairs(sign_colors) do
|
|||||||
"signs_metal_sides.png",
|
"signs_metal_sides.png",
|
||||||
"signs_metal_sides.png",
|
"signs_metal_sides.png",
|
||||||
"signs_metal_back.png",
|
"signs_metal_back.png",
|
||||||
"signs_"..color.."_front.png"
|
"signs_"..color[1].."_front.png"
|
||||||
},
|
},
|
||||||
default_color = sign_default_text_colors[i],
|
default_color = color[3],
|
||||||
groups = sign_groups,
|
groups = sign_groups,
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return signs_lib.determine_sign_type(itemstack, placer, pointed_thing)
|
return signs_lib.determine_sign_type(itemstack, placer, pointed_thing)
|
||||||
@ -885,19 +975,21 @@ for i, color in ipairs(sign_colors) do
|
|||||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||||
end,
|
end,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
end,
|
end,
|
||||||
|
on_rotate = signs_lib.facedir_rotate
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local signs_text_on_activate
|
local signs_text_on_activate
|
||||||
|
|
||||||
signs_text_on_activate = function(self)
|
signs_text_on_activate = function(self)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local text = meta:get_string("text")
|
local text = meta:get_string("text")
|
||||||
local new = (meta:get_int("__signslib_new_format") ~= 0)
|
local new = (meta:get_int("__signslib_new_format") ~= 0)
|
||||||
if text then
|
if text and minetest.registered_nodes[minetest.get_node(pos).name] then
|
||||||
text = trim_input(text)
|
text = trim_input(text)
|
||||||
set_obj_text(self.object, text, new, pos)
|
set_obj_text(self.object, text, new, pos)
|
||||||
end
|
end
|
||||||
@ -917,7 +1009,7 @@ function signs_lib.register_fence_with_sign(fencename, fencewithsignname)
|
|||||||
local def = minetest.registered_nodes[fencename]
|
local def = minetest.registered_nodes[fencename]
|
||||||
local def_sign = minetest.registered_nodes[fencewithsignname]
|
local def_sign = minetest.registered_nodes[fencewithsignname]
|
||||||
if not (def and def_sign) then
|
if not (def and def_sign) then
|
||||||
minetest.log("warning", "[signs_lib] Attempt to register unknown node as fence")
|
minetest.log("warning", "[signs_lib] "..S("Attempt to register unknown node as fence"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
def = signs_lib.table_copy(def)
|
def = signs_lib.table_copy(def)
|
||||||
@ -969,24 +1061,26 @@ function signs_lib.register_fence_with_sign(fencename, fencewithsignname)
|
|||||||
signs_lib.receive_fields(pos, formname, fields, sender)
|
signs_lib.receive_fields(pos, formname, fields, sender)
|
||||||
end
|
end
|
||||||
def_sign.on_punch = function(pos, node, puncher, ...)
|
def_sign.on_punch = function(pos, node, puncher, ...)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
end
|
end
|
||||||
local fencename = fencename
|
local fencename = fencename
|
||||||
def_sign.after_dig_node = function(pos, node, ...)
|
def_sign.after_dig_node = function(pos, node, ...)
|
||||||
node.name = fencename
|
node.name = fencename
|
||||||
minetest.add_node(pos, node)
|
minetest.add_node(pos, node)
|
||||||
end
|
end
|
||||||
|
def_sign.on_rotate = signs_lib.facedir_rotate_simple
|
||||||
|
|
||||||
def_sign.drop = default_sign
|
def_sign.drop = default_sign
|
||||||
minetest.register_node(":"..fencename, def)
|
minetest.register_node(":"..fencename, def)
|
||||||
minetest.register_node(":"..fencewithsignname, def_sign)
|
minetest.register_node(":"..fencewithsignname, def_sign)
|
||||||
table.insert(signs_lib.sign_node_list, fencewithsignname)
|
table.insert(signs_lib.sign_node_list, fencewithsignname)
|
||||||
minetest.log("verbose", S("Registered %s and %s"):format(fencename, fencewithsignname))
|
minetest.log("verbose", S("Registered @1 and @2", fencename, fencewithsignname))
|
||||||
end
|
end
|
||||||
]]
|
]]
|
||||||
build_char_db()
|
build_char_db()
|
||||||
|
|
||||||
--minetest.register_alias("homedecor:fence_wood_with_sign", "signs:sign_post")
|
minetest.register_alias("homedecor:fence_wood_with_sign", "signs:sign_post")
|
||||||
--minetest.register_alias("sign_wall_locked", "locked_sign:sign_wall_locked")
|
minetest.register_alias("sign_wall_locked", "locked_sign:sign_wall_locked")
|
||||||
|
|
||||||
--signs_lib.register_fence_with_sign("default:fence_wood", "signs:sign_post")
|
--signs_lib.register_fence_with_sign("default:fence_wood", "signs:sign_post")
|
||||||
|
|
||||||
@ -999,23 +1093,12 @@ minetest.register_lbm({
|
|||||||
label = "Restore sign text",
|
label = "Restore sign text",
|
||||||
run_at_every_load = true,
|
run_at_every_load = true,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
signs_lib.update_sign(pos)
|
signs_lib.update_sign(pos,nil,nil,node)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
]]
|
]]
|
||||||
-- locked sign
|
-- locked sign
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "locked_sign:sign_wall_locked",
|
|
||||||
recipe = {
|
|
||||||
{"group:wood", "group:wood", "group:wood"},
|
|
||||||
{"group:wood", "group:wood", "default:steel_ingot"},
|
|
||||||
{"", "group:stick", ""},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
--Alternate recipe
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "locked_sign:sign_wall_locked",
|
output = "locked_sign:sign_wall_locked",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1025,6 +1108,7 @@ minetest.register_craft({
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- craft recipes for the metal signs
|
-- craft recipes for the metal signs
|
||||||
|
if enable_colored_metal_signs then
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "signs:sign_wall_green",
|
output = "signs:sign_wall_green",
|
||||||
@ -1040,8 +1124,8 @@ minetest.register_craft( {
|
|||||||
{ "dye:dark_green", "dye:white", "dye:dark_green" },
|
{ "dye:dark_green", "dye:white", "dye:dark_green" },
|
||||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||||
},
|
},
|
||||||
})]]
|
})
|
||||||
|
]]
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "signs:sign_wall_yellow",
|
output = "signs:sign_wall_yellow",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1056,8 +1140,8 @@ minetest.register_craft( {
|
|||||||
{ "dye:yellow", "dye:black", "dye:yellow" },
|
{ "dye:yellow", "dye:black", "dye:yellow" },
|
||||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||||
},
|
},
|
||||||
})]]
|
})
|
||||||
|
]]
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "signs:sign_wall_red",
|
output = "signs:sign_wall_red",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1072,8 +1156,8 @@ minetest.register_craft( {
|
|||||||
{ "dye:red", "dye:white", "dye:red" },
|
{ "dye:red", "dye:white", "dye:red" },
|
||||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||||
},
|
},
|
||||||
})]]
|
})
|
||||||
|
]]
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "signs:sign_wall_white_red",
|
output = "signs:sign_wall_white_red",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1088,8 +1172,8 @@ minetest.register_craft( {
|
|||||||
{ "dye:white", "dye:red", "dye:white" },
|
{ "dye:white", "dye:red", "dye:white" },
|
||||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||||
},
|
},
|
||||||
})]]
|
})
|
||||||
|
]]
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "signs:sign_wall_white_black",
|
output = "signs:sign_wall_white_black",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1104,8 +1188,8 @@ minetest.register_craft( {
|
|||||||
{ "dye:white", "dye:black", "dye:white" },
|
{ "dye:white", "dye:black", "dye:white" },
|
||||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||||
},
|
},
|
||||||
})]]
|
})
|
||||||
|
]]
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "signs:sign_wall_orange",
|
output = "signs:sign_wall_orange",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1120,8 +1204,8 @@ minetest.register_craft( {
|
|||||||
{ "dye:orange", "dye:black", "dye:orange" },
|
{ "dye:orange", "dye:black", "dye:orange" },
|
||||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||||
},
|
},
|
||||||
})]]
|
})
|
||||||
|
]]
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "signs:sign_wall_blue",
|
output = "signs:sign_wall_blue",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1136,8 +1220,8 @@ minetest.register_craft( {
|
|||||||
{ "dye:blue", "dye:white", "dye:blue" },
|
{ "dye:blue", "dye:white", "dye:blue" },
|
||||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||||
},
|
},
|
||||||
})]]
|
})
|
||||||
|
]]
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "signs:sign_wall_brown",
|
output = "signs:sign_wall_brown",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1152,8 +1236,25 @@ minetest.register_craft( {
|
|||||||
{ "dye:brown", "dye:white", "dye:brown" },
|
{ "dye:brown", "dye:white", "dye:brown" },
|
||||||
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
{ "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" }
|
||||||
},
|
},
|
||||||
})]]
|
})
|
||||||
|
]]
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "signs:sign_wall_black",
|
||||||
|
recipe = {
|
||||||
|
{ "dye:black", "dye:white", "dye:black" },
|
||||||
|
{ "", default_sign_metal, "" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
if minetest.setting_get("log_mods") then
|
minetest.register_craft( {
|
||||||
minetest.log("action", S("signs loaded"))
|
output = "signs:sign_wall_purple",
|
||||||
|
recipe = {
|
||||||
|
{ "dye:violet", "dye:black", "dye:violet" },
|
||||||
|
{ "", default_sign_metal, "" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.settings:get("log_mods") then
|
||||||
|
minetest.log("action", S("[MOD] signs loaded"))
|
||||||
end
|
end
|
||||||
|
45
intllib.lua
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
-- 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
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
# 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
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
# 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
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# 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
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# 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
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
# 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] мод табличек загружен"
|
94
locale/template.pot
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
# 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 ""
|
BIN
textures/bg_signs_lib.jpg_
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
textures/hdf_00.png
Normal file
After Width: | Height: | Size: 87 B |
BIN
textures/hdf_a8.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
textures/hdf_b8.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
textures/hdf_b9.png
Normal file
After Width: | Height: | Size: 179 B |
BIN
textures/hdf_c0.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
textures/hdf_c1.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
textures/hdf_c2.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
textures/hdf_c3.png
Normal file
After Width: | Height: | Size: 141 B |
BIN
textures/hdf_c4.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
textures/hdf_c5.png
Normal file
After Width: | Height: | Size: 149 B |
BIN
textures/hdf_c6.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_c7.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_c8.png
Normal file
After Width: | Height: | Size: 171 B |
BIN
textures/hdf_c9.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
textures/hdf_ca.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
textures/hdf_cb.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_cc.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/hdf_cd.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
textures/hdf_ce.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
textures/hdf_cf.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
textures/hdf_d0.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
textures/hdf_d1.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
textures/hdf_d2.png
Normal file
After Width: | Height: | Size: 145 B |
BIN
textures/hdf_d3.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
textures/hdf_d4.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
textures/hdf_d5.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
textures/hdf_d6.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
textures/hdf_d7.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
textures/hdf_d8.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
textures/hdf_d9.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
textures/hdf_da.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
textures/hdf_db.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
textures/hdf_dc.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_dd.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
textures/hdf_de.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
textures/hdf_df.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
textures/hdf_e0.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/hdf_e1.png
Normal file
After Width: | Height: | Size: 178 B |
BIN
textures/hdf_e2.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
textures/hdf_e3.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
textures/hdf_e4.png
Normal file
After Width: | Height: | Size: 162 B |
BIN
textures/hdf_e5.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
textures/hdf_e6.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
textures/hdf_e7.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/hdf_e8.png
Normal file
After Width: | Height: | Size: 163 B |
BIN
textures/hdf_e9.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
textures/hdf_ea.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
textures/hdf_eb.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
textures/hdf_ec.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
textures/hdf_ed.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
textures/hdf_ee.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_ef.png
Normal file
After Width: | Height: | Size: 146 B |
BIN
textures/hdf_f0.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
textures/hdf_f1.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_f2.png
Normal file
After Width: | Height: | Size: 148 B |
BIN
textures/hdf_f3.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/hdf_f4.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
textures/hdf_f5.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
textures/hdf_f6.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
textures/hdf_f7.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
textures/hdf_f8.png
Normal file
After Width: | Height: | Size: 145 B |
BIN
textures/hdf_f9.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
textures/hdf_fa.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
textures/hdf_fb.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
textures/hdf_fc.png
Normal file
After Width: | Height: | Size: 156 B |
BIN
textures/hdf_fd.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
textures/hdf_fe.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
textures/hdf_ff.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
textures/signs_black_front.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
textures/signs_black_inv.png
Normal file
After Width: | Height: | Size: 106 B |
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 106 B |
BIN
textures/signs_purple_front.png
Normal file
After Width: | Height: | Size: 132 B |
BIN
textures/signs_purple_inv.png
Normal file
After Width: | Height: | Size: 106 B |
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 102 B |