forked from nalc/homedecor_modpack
Localize globals.
This commit is contained in:
parent
a64b436dc2
commit
d213e5aa16
|
@ -179,9 +179,7 @@ local CHARDB_FILE = minetest.get_worldpath().."/signs_lib_chardb"
|
||||||
-- helper functions to trim sign text input/output
|
-- helper functions to trim sign text input/output
|
||||||
|
|
||||||
local function trim_input(text)
|
local function trim_input(text)
|
||||||
local txt_len = string.len(text)
|
return text:sub(1, math.min(MAX_INPUT_CHARS, text:len()))
|
||||||
text_trimmed = string.sub(text, 1, math.min(MAX_INPUT_CHARS, txt_len))
|
|
||||||
return text_trimmed
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns true if any file differs from cached one.
|
-- Returns true if any file differs from cached one.
|
||||||
|
@ -630,8 +628,7 @@ function signs_lib.receive_fields(pos, formname, fields, sender, lock)
|
||||||
sender:get_player_name())
|
sender:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
lockstr = ""
|
local lockstr = lock and "locked " or ""
|
||||||
if lock then lockstr = "locked " end
|
|
||||||
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("%s wrote \"%s\" to "..lockstr.."sign at %s"):format(
|
||||||
(sender:get_player_name() or ""),
|
(sender:get_player_name() or ""),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user