mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-22 16:10:18 +01:00
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
|
||||
|
||||
local function trim_input(text)
|
||||
local txt_len = string.len(text)
|
||||
text_trimmed = string.sub(text, 1, math.min(MAX_INPUT_CHARS, txt_len))
|
||||
return text_trimmed
|
||||
return text:sub(1, math.min(MAX_INPUT_CHARS, text:len()))
|
||||
end
|
||||
|
||||
-- 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())
|
||||
return
|
||||
end
|
||||
lockstr = ""
|
||||
if lock then lockstr = "locked " end
|
||||
local lockstr = lock and "locked " or ""
|
||||
if fields and fields.text and fields.ok then
|
||||
minetest.log("action", S("%s wrote \"%s\" to "..lockstr.."sign at %s"):format(
|
||||
(sender:get_player_name() or ""),
|
||||
|
Loading…
Reference in New Issue
Block a user