aboutsummaryrefslogtreecommitdiff
path: root/clientmods/preview
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2019-11-09 16:15:05 +0100
committersfan5 <sfan5@live.de>2019-11-11 14:06:48 +0100
commitc44318a253783dde37e3bb688e29927da3b4cac0 (patch)
tree67cd18e68ed0b9aa6a3d0182a6e44928c6fdafd5 /clientmods/preview
parent2c4cf508a9b94a76ce2ca7c7317258471a41c51d (diff)
downloadminetest-c44318a253783dde37e3bb688e29927da3b4cac0.tar.gz
minetest-c44318a253783dde37e3bb688e29927da3b4cac0.tar.bz2
minetest-c44318a253783dde37e3bb688e29927da3b4cac0.zip
[CSM] Fix and improve minetest.get_language()
Previously this method would accidentally reset the locale and break everything.
Diffstat (limited to 'clientmods/preview')
-rw-r--r--clientmods/preview/init.lua17
1 files changed, 11 insertions, 6 deletions
diff --git a/clientmods/preview/init.lua b/clientmods/preview/init.lua
index 2e679b866..5777adcaf 100644
--- a/clientmods/preview/init.lua
+++ b/clientmods/preview/init.lua
@@ -9,13 +9,18 @@ core.register_on_shutdown(function()
end)
local id = nil
-local server_info = core.get_server_info()
-print("Server version: " .. server_info.protocol_version)
-print("Server ip: " .. server_info.ip)
-print("Server address: " .. server_info.address)
-print("Server port: " .. server_info.port)
+do
+ local server_info = core.get_server_info()
+ print("Server version: " .. server_info.protocol_version)
+ print("Server ip: " .. server_info.ip)
+ print("Server address: " .. server_info.address)
+ print("Server port: " .. server_info.port)
-print("CSM restrictions: " .. dump(core.get_csm_restrictions()))
+ print("CSM restrictions: " .. dump(core.get_csm_restrictions()))
+
+ local l1, l2 = core.get_language()
+ print("Configured language: " .. l1 .. " / " .. l2)
+end
mod_channel = core.mod_channel_join("experimental_preview")