aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/client/cheats.lua1
-rw-r--r--builtin/client/register.lua4
-rw-r--r--builtin/common/misc_helpers.lua18
-rw-r--r--builtin/common/tests/vector_spec.lua19
-rw-r--r--builtin/common/vector.lua22
-rw-r--r--builtin/game/chat.lua115
-rw-r--r--builtin/game/falling.lua25
-rw-r--r--builtin/game/features.lua1
-rw-r--r--builtin/game/item.lua15
-rw-r--r--builtin/game/privileges.lua8
-rw-r--r--builtin/locale/__builtin.de.tr27
-rw-r--r--builtin/locale/__builtin.it.tr33
-rw-r--r--builtin/locale/template.txt26
-rw-r--r--builtin/mainmenu/init.lua4
-rw-r--r--builtin/mainmenu/serverlistmgr.lua10
-rw-r--r--builtin/mainmenu/tab_about.lua (renamed from builtin/mainmenu/tab_credits.lua)11
-rw-r--r--builtin/settingtypes.txt37
17 files changed, 274 insertions, 102 deletions
diff --git a/builtin/client/cheats.lua b/builtin/client/cheats.lua
index e4cace744..a1e00814e 100644
--- a/builtin/client/cheats.lua
+++ b/builtin/client/cheats.lua
@@ -12,6 +12,7 @@ core.cheats = {
["NoSlow"] = "no_slow",
["JetPack"] = "jetpack",
["AntiSlip"] = "antislip",
+ ["AirJump"] = "airjump",
},
["Render"] = {
["Xray"] = "xray",
diff --git a/builtin/client/register.lua b/builtin/client/register.lua
index 2b5526523..f17188b84 100644
--- a/builtin/client/register.lua
+++ b/builtin/client/register.lua
@@ -105,6 +105,10 @@ core.registered_on_inventory_open, core.register_on_inventory_open = make_regist
core.registered_on_recieve_physics_override, core.register_on_recieve_physics_override = make_registration()
core.registered_on_play_sound, core.register_on_play_sound = make_registration()
core.registered_on_spawn_particle, core.register_on_spawn_particle = make_registration()
+core.registered_on_object_properties_change, core.register_on_object_properties_change = make_registration()
+core.registered_on_object_hp_change, core.register_on_object_hp_change = make_registration()
+core.registered_on_object_add, core.register_on_object_add = make_registration()
core.registered_nodes = {}
core.registered_items = {}
+core.object_refs = {}
diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua
index b86d68f5f..324d83b07 100644
--- a/builtin/common/misc_helpers.lua
+++ b/builtin/common/misc_helpers.lua
@@ -244,6 +244,15 @@ function math.factorial(x)
return v
end
+
+function math.round(x)
+ if x >= 0 then
+ return math.floor(x + 0.5)
+ end
+ return math.ceil(x - 0.5)
+end
+
+
function core.formspec_escape(text)
if text ~= nil then
text = string.gsub(text,"\\","\\\\")
@@ -785,3 +794,12 @@ end
function core.is_nan(number)
return number ~= number
end
+
+function core.inventorycube(img1, img2, img3)
+ img2 = img2 or img1
+ img3 = img3 or img1
+ return "[inventorycube"
+ .. "{" .. img1:gsub("%^", "&")
+ .. "{" .. img2:gsub("%^", "&")
+ .. "{" .. img3:gsub("%^", "&")
+end
diff --git a/builtin/common/tests/vector_spec.lua b/builtin/common/tests/vector_spec.lua
index 0f287363a..104c656e9 100644
--- a/builtin/common/tests/vector_spec.lua
+++ b/builtin/common/tests/vector_spec.lua
@@ -48,6 +48,25 @@ describe("vector", function()
assert.same({ x = 41, y = 52, z = 63 }, vector.offset(vector.new(1, 2, 3), 40, 50, 60))
end)
+ it("to_string()", function()
+ local v = vector.new(1, 2, 3.14)
+ assert.same("(1, 2, 3.14)", vector.to_string(v))
+ end)
+
+ it("from_string()", function()
+ local v = vector.new(1, 2, 3.14)
+ assert.same({v, 13}, {vector.from_string("(1, 2, 3.14)")})
+ assert.same({v, 12}, {vector.from_string("(1,2 ,3.14)")})
+ assert.same({v, 12}, {vector.from_string("(1,2,3.14,)")})
+ assert.same({v, 11}, {vector.from_string("(1 2 3.14)")})
+ assert.same({v, 15}, {vector.from_string("( 1, 2, 3.14 )")})
+ assert.same({v, 15}, {vector.from_string(" ( 1, 2, 3.14) ")})
+ assert.same({vector.new(), 8}, {vector.from_string("(0,0,0) ( 1, 2, 3.14) ")})
+ assert.same({v, 22}, {vector.from_string("(0,0,0) ( 1, 2, 3.14) ", 8)})
+ assert.same({v, 22}, {vector.from_string("(0,0,0) ( 1, 2, 3.14) ", 9)})
+ assert.same(nil, vector.from_string("nothing"))
+ end)
+
-- This function is needed because of floating point imprecision.
local function almost_equal(a, b)
if type(a) == "number" then
diff --git a/builtin/common/vector.lua b/builtin/common/vector.lua
index d6437deda..2ef8fc617 100644
--- a/builtin/common/vector.lua
+++ b/builtin/common/vector.lua
@@ -12,6 +12,22 @@ function vector.new(a, b, c)
return {x=0, y=0, z=0}
end
+function vector.from_string(s, init)
+ local x, y, z, np = string.match(s, "^%s*%(%s*([^%s,]+)%s*[,%s]%s*([^%s,]+)%s*[,%s]" ..
+ "%s*([^%s,]+)%s*[,%s]?%s*%)()", init)
+ x = tonumber(x)
+ y = tonumber(y)
+ z = tonumber(z)
+ if not (x and y and z) then
+ return nil
+ end
+ return {x = x, y = y, z = z}, np
+end
+
+function vector.to_string(v)
+ return string.format("(%g, %g, %g)", v.x, v.y, v.z)
+end
+
function vector.equals(a, b)
return a.x == b.x and
a.y == b.y and
@@ -41,9 +57,9 @@ end
function vector.round(v)
return {
- x = math.floor(v.x + 0.5),
- y = math.floor(v.y + 0.5),
- z = math.floor(v.z + 0.5)
+ x = math.round(v.x),
+ y = math.round(v.y),
+ z = math.round(v.z)
}
end
diff --git a/builtin/game/chat.lua b/builtin/game/chat.lua
index bf2d7851e..0bd12c25f 100644
--- a/builtin/game/chat.lua
+++ b/builtin/game/chat.lua
@@ -75,9 +75,9 @@ core.register_on_chat_message(function(name, message)
local has_privs, missing_privs = core.check_player_privs(name, cmd_def.privs)
if has_privs then
core.set_last_run_mod(cmd_def.mod_origin)
- local t_before = minetest.get_us_time()
+ local t_before = core.get_us_time()
local success, result = cmd_def.func(name, param)
- local delay = (minetest.get_us_time() - t_before) / 1000000
+ local delay = (core.get_us_time() - t_before) / 1000000
if success == false and result == nil then
core.chat_send_player(name, "-!- "..S("Invalid command usage."))
local help_def = core.registered_chatcommands["help"]
@@ -91,11 +91,12 @@ core.register_on_chat_message(function(name, message)
if delay > msg_time_threshold then
-- Show how much time it took to execute the command
if result then
- result = result ..
- minetest.colorize("#f3d2ff", " (%.5g s)"):format(delay)
+ result = result .. core.colorize("#f3d2ff", S(" (@1 s)",
+ string.format("%.5f", delay)))
else
- result = minetest.colorize("#f3d2ff",
- "Command execution took %.5f s"):format(delay)
+ result = core.colorize("#f3d2ff", S(
+ "Command execution took @1 s",
+ string.format("%.5f", delay)))
end
end
if result then
@@ -166,6 +167,18 @@ core.register_chatcommand("admin", {
end,
})
+local function privileges_of(name, privs)
+ if not privs then
+ privs = core.get_player_privs(name)
+ end
+ local privstr = core.privs_to_string(privs, ", ")
+ if privstr == "" then
+ return S("@1 does not have any privileges.", name)
+ else
+ return S("Privileges of @1: @2", name, privstr)
+ end
+end
+
core.register_chatcommand("privs", {
params = S("[<name>]"),
description = S("Show privileges of yourself or another player"),
@@ -175,9 +188,7 @@ core.register_chatcommand("privs", {
if not core.player_exists(name) then
return false, S("Player @1 does not exist.", name)
end
- return true, S("Privileges of @1: @2", name,
- core.privs_to_string(
- core.get_player_privs(name), ", "))
+ return true, privileges_of(name)
end,
})
@@ -226,7 +237,10 @@ local function handle_grant_command(caller, grantname, grantprivstr)
core.string_to_privs(core.settings:get("basic_privs") or "interact,shout")
for priv, _ in pairs(grantprivs) do
if not basic_privs[priv] and not caller_privs.privs then
- return false, S("Your privileges are insufficient.")
+ return false, S("Your privileges are insufficient. "..
+ "'@1' only allows you to grant: @2",
+ "basic_privs",
+ core.privs_to_string(basic_privs, ', '))
end
if not core.registered_privileges[priv] then
privs_unknown = privs_unknown .. S("Unknown privilege: @1", priv) .. "\n"
@@ -245,15 +259,13 @@ local function handle_grant_command(caller, grantname, grantprivstr)
if grantname ~= caller then
core.chat_send_player(grantname,
S("@1 granted you privileges: @2", caller,
- core.privs_to_string(grantprivs, ' ')))
+ core.privs_to_string(grantprivs, ', ')))
end
- return true, S("Privileges of @1: @2", grantname,
- core.privs_to_string(
- core.get_player_privs(grantname), ' '))
+ return true, privileges_of(grantname)
end
core.register_chatcommand("grant", {
- params = S("<name> (<privilege> | all)"),
+ params = S("<name> (<privilege> [, <privilege2> [<...>]] | all)"),
description = S("Give privileges to player"),
func = function(name, param)
local grantname, grantprivstr = string.match(param, "([^ ]+) (.+)")
@@ -265,7 +277,7 @@ core.register_chatcommand("grant", {
})
core.register_chatcommand("grantme", {
- params = S("<privilege> | all"),
+ params = S("<privilege> [, <privilege2> [<...>]] | all"),
description = S("Grant privileges to yourself"),
func = function(name, param)
if param == "" then
@@ -285,16 +297,13 @@ local function handle_revoke_command(caller, revokename, revokeprivstr)
return false, S("Player @1 does not exist.", revokename)
end
- local revokeprivs = core.string_to_privs(revokeprivstr)
local privs = core.get_player_privs(revokename)
- local basic_privs =
- core.string_to_privs(core.settings:get("basic_privs") or "interact,shout")
- for priv, _ in pairs(revokeprivs) do
- if not basic_privs[priv] and not caller_privs.privs then
- return false, S("Your privileges are insufficient.")
- end
- end
+ local revokeprivs = core.string_to_privs(revokeprivstr)
+ local is_singleplayer = core.is_singleplayer()
+ local is_admin = not is_singleplayer
+ and revokename == core.settings:get("name")
+ and revokename ~= ""
if revokeprivstr == "all" then
revokeprivs = privs
privs = {}
@@ -304,27 +313,73 @@ local function handle_revoke_command(caller, revokename, revokeprivstr)
end
end
+ local privs_unknown = ""
+ local basic_privs =
+ core.string_to_privs(core.settings:get("basic_privs") or "interact,shout")
+ local irrevokable = {}
+ local has_irrevokable_priv = false
+ for priv, _ in pairs(revokeprivs) do
+ if not basic_privs[priv] and not caller_privs.privs then
+ return false, S("Your privileges are insufficient. "..
+ "'@1' only allows you to revoke: @2",
+ "basic_privs",
+ core.privs_to_string(basic_privs, ', '))
+ end
+ local def = core.registered_privileges[priv]
+ if not def then
+ privs_unknown = privs_unknown .. S("Unknown privilege: @1", priv) .. "\n"
+ elseif is_singleplayer and def.give_to_singleplayer then
+ irrevokable[priv] = true
+ elseif is_admin and def.give_to_admin then
+ irrevokable[priv] = true
+ end
+ end
+ for priv, _ in pairs(irrevokable) do
+ revokeprivs[priv] = nil
+ has_irrevokable_priv = true
+ end
+ if privs_unknown ~= "" then
+ return false, privs_unknown
+ end
+ if has_irrevokable_priv then
+ if is_singleplayer then
+ core.chat_send_player(caller,
+ S("Note: Cannot revoke in singleplayer: @1",
+ core.privs_to_string(irrevokable, ', ')))
+ elseif is_admin then
+ core.chat_send_player(caller,
+ S("Note: Cannot revoke from admin: @1",
+ core.privs_to_string(irrevokable, ', ')))
+ end
+ end
+
+ local revokecount = 0
for priv, _ in pairs(revokeprivs) do
-- call the on_revoke callbacks
core.run_priv_callbacks(revokename, priv, caller, "revoke")
+ revokecount = revokecount + 1
end
core.set_player_privs(revokename, privs)
+ local new_privs = core.get_player_privs(revokename)
+
+ if revokecount == 0 then
+ return false, S("No privileges were revoked.")
+ end
+
core.log("action", caller..' revoked ('
..core.privs_to_string(revokeprivs, ', ')
..') privileges from '..revokename)
if revokename ~= caller then
core.chat_send_player(revokename,
S("@1 revoked privileges from you: @2", caller,
- core.privs_to_string(revokeprivs, ' ')))
+ core.privs_to_string(revokeprivs, ', ')))
end
- return true, S("Privileges of @1: @2", revokename,
- core.privs_to_string(
- core.get_player_privs(revokename), ' '))
+ return true, privileges_of(revokename, new_privs)
end
core.register_chatcommand("revoke", {
- params = S("<name> (<privilege> | all)"),
+ params = S("<name> (<privilege> [, <privilege2> [<...>]] | all)"),
description = S("Remove privileges from player"),
privs = {},
func = function(name, param)
@@ -337,7 +392,7 @@ core.register_chatcommand("revoke", {
})
core.register_chatcommand("revokeme", {
- params = S("<privilege> | all"),
+ params = S("<privilege> [, <privilege2> [<...>]] | all"),
description = S("Revoke privileges from yourself"),
privs = {},
func = function(name, param)
diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua
index 057d0d0ed..2cc0d8fac 100644
--- a/builtin/game/falling.lua
+++ b/builtin/game/falling.lua
@@ -84,9 +84,6 @@ core.register_entity(":__builtin:falling_node", {
local textures
if def.tiles and def.tiles[1] then
local tile = def.tiles[1]
- if def.drawtype == "torchlike" and def.paramtype2 ~= "wallmounted" then
- tile = def.tiles[2] or def.tiles[1]
- end
if type(tile) == "table" then
tile = tile.name
end
@@ -147,11 +144,7 @@ core.register_entity(":__builtin:falling_node", {
-- Rotate entity
if def.drawtype == "torchlike" then
- if def.paramtype2 == "wallmounted" then
- self.object:set_yaw(math.pi*0.25)
- else
- self.object:set_yaw(-math.pi*0.25)
- end
+ self.object:set_yaw(math.pi*0.25)
elseif ((node.param2 ~= 0 or def.drawtype == "nodebox" or def.drawtype == "mesh")
and (def.wield_image == "" or def.wield_image == nil))
or def.drawtype == "signlike"
@@ -165,8 +158,12 @@ core.register_entity(":__builtin:falling_node", {
if euler then
self.object:set_rotation(euler)
end
- elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then
+ elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted" or def.drawtype == "signlike") then
local rot = node.param2 % 8
+ if (def.drawtype == "signlike" and def.paramtype2 ~= "wallmounted" and def.paramtype2 ~= "colorwallmounted") then
+ -- Change rotation to "floor" by default for non-wallmounted paramtype2
+ rot = 1
+ end
local pitch, yaw, roll = 0, 0, 0
if def.drawtype == "nodebox" or def.drawtype == "mesh" then
if rot == 0 then
@@ -208,6 +205,14 @@ core.register_entity(":__builtin:falling_node", {
end
end
self.object:set_rotation({x=pitch, y=yaw, z=roll})
+ elseif (def.drawtype == "mesh" and def.paramtype2 == "degrotate") then
+ local p2 = (node.param2 - (def.place_param2 or 0)) % 240
+ local yaw = (p2 / 240) * (math.pi * 2)
+ self.object:set_yaw(yaw)
+ elseif (def.drawtype == "mesh" and def.paramtype2 == "colordegrotate") then
+ local p2 = (node.param2 % 32 - (def.place_param2 or 0) % 32) % 24
+ local yaw = (p2 / 24) * (math.pi * 2)
+ self.object:set_yaw(yaw)
end
end
end,
@@ -407,7 +412,7 @@ local function convert_to_falling_node(pos, node)
obj:get_luaentity():set_node(node, metatable)
core.remove_node(pos)
- return true
+ return true, obj
end
function core.spawn_falling_node(pos)
diff --git a/builtin/game/features.lua b/builtin/game/features.lua
index 36ff1f0b0..8f0604448 100644
--- a/builtin/game/features.lua
+++ b/builtin/game/features.lua
@@ -19,6 +19,7 @@ core.features = {
object_step_has_moveresult = true,
direct_velocity_on_players = true,
use_texture_alpha_string_modes = true,
+ degrotate_240_steps = true,
}
function core.has_feature(arg)
diff --git a/builtin/game/item.lua b/builtin/game/item.lua
index dc0247e5f..c4d93abd6 100644
--- a/builtin/game/item.lua
+++ b/builtin/game/item.lua
@@ -15,15 +15,6 @@ end
-- Item definition helpers
--
-function core.inventorycube(img1, img2, img3)
- img2 = img2 or img1
- img3 = img3 or img1
- return "[inventorycube"
- .. "{" .. img1:gsub("%^", "&")
- .. "{" .. img2:gsub("%^", "&")
- .. "{" .. img3:gsub("%^", "&")
-end
-
function core.dir_to_facedir(dir, is6d)
--account for y if requested
if is6d and math.abs(dir.y) > math.abs(dir.x) and math.abs(dir.y) > math.abs(dir.z) then
@@ -144,7 +135,7 @@ end
function core.is_colored_paramtype(ptype)
return (ptype == "color") or (ptype == "colorfacedir") or
- (ptype == "colorwallmounted")
+ (ptype == "colorwallmounted") or (ptype == "colordegrotate")
end
function core.strip_param2_color(param2, paramtype2)
@@ -155,6 +146,8 @@ function core.strip_param2_color(param2, paramtype2)
param2 = math.floor(param2 / 32) * 32
elseif paramtype2 == "colorwallmounted" then
param2 = math.floor(param2 / 8) * 8
+ elseif paramtype2 == "colordegrotate" then
+ param2 = math.floor(param2 / 32) * 32
end
-- paramtype2 == "color" requires no modification.
return param2
@@ -332,6 +325,8 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
color_divisor = 8
elseif def.paramtype2 == "colorfacedir" then
color_divisor = 32
+ elseif def.paramtype2 == "colordegrotate" then
+ color_divisor = 32
end
if color_divisor then
local color = math.floor(metatable.palette_index / color_divisor)
diff --git a/builtin/game/privileges.lua b/builtin/game/privileges.lua
index aee32a34e..1d3efb525 100644
--- a/builtin/game/privileges.lua
+++ b/builtin/game/privileges.lua
@@ -32,7 +32,13 @@ end
core.register_privilege("interact", S("Can interact with things and modify the world"))
core.register_privilege("shout", S("Can speak in chat"))
-core.register_privilege("basic_privs", S("Can modify 'shout' and 'interact' privileges"))
+
+local basic_privs =
+ core.string_to_privs((core.settings:get("basic_privs") or "shout,interact"))
+local basic_privs_desc = S("Can modify basic privileges (@1)",
+ core.privs_to_string(basic_privs, ', '))
+core.register_privilege("basic_privs", basic_privs_desc)
+
core.register_privilege("privs", S("Can modify privileges"))
core.register_privilege("teleport", {
diff --git a/builtin/locale/__builtin.de.tr b/builtin/locale/__builtin.de.tr
index eaadf611b..e8bc1fd84 100644
--- a/builtin/locale/__builtin.de.tr
+++ b/builtin/locale/__builtin.de.tr
@@ -2,6 +2,8 @@
Empty command.=Leerer Befehl.
Invalid command: @1=Ungültiger Befehl: @1
Invalid command usage.=Ungültige Befehlsverwendung.
+ (@1 s)= (@1 s)
+Command execution took @1 s=Befehlsausführung brauchte @1 s
You don't have permission to run this command (missing privileges: @1).=Sie haben keine Erlaubnis, diesen Befehl auszuführen (fehlende Privilegien: @1).
Unable to get position of player @1.=Konnte Position vom Spieler @1 nicht ermitteln.
Incorrect area format. Expected: (x1,y1,z1) (x2,y2,z2)=Ungültiges Gebietsformat. Erwartet: (x1,y1,z1) (x2,y2,z2)
@@ -10,24 +12,30 @@ Show chat action (e.g., '/me orders a pizza' displays '<player name> orders a pi
Show the name of the server owner=Den Namen des Servereigentümers zeigen
The administrator of this server is @1.=Der Administrator dieses Servers ist @1.
There's no administrator named in the config file.=In der Konfigurationsdatei wurde kein Administrator angegeben.
+@1 does not have any privileges.=@1 hat keine Privilegien.
+Privileges of @1: @2=Privilegien von @1: @2
[<name>]=[<Name>]
Show privileges of yourself or another player=Ihre eigenen Privilegien oder die eines anderen Spielers anzeigen
Player @1 does not exist.=Spieler @1 existiert nicht.
-Privileges of @1: @2=Privilegien von @1: @2
<privilege>=<Privileg>
Return list of all online players with privilege=Liste aller Spieler mit einem Privileg ausgeben
Invalid parameters (see /help haspriv).=Ungültige Parameter (siehe „/help haspriv“).
Unknown privilege!=Unbekanntes Privileg!
Players online with the "@1" privilege: @2=Derzeit online spielende Spieler mit dem „@1“-Privileg: @2
Your privileges are insufficient.=Ihre Privilegien sind unzureichend.
+Your privileges are insufficient. '@1' only allows you to grant: @2=Ihre Privilegien sind unzureichend. Mit „@1“ können Sie nur folgendes gewähren: @2
Unknown privilege: @1=Unbekanntes Privileg: @1
@1 granted you privileges: @2=@1 gewährte Ihnen Privilegien: @2
-<name> (<privilege> | all)=<Name> (<Privileg> | all)
+<name> (<privilege> [, <privilege2> [<...>]] | all)=<Name> (<Privileg> [, <Privileg2> [<...>]] | all)
Give privileges to player=Privileg an Spieler vergeben
Invalid parameters (see /help grant).=Ungültige Parameter (siehe „/help grant“).
-<privilege> | all=<Privileg> | all
+<privilege> [, <privilege2> [<...>]] | all=<Privileg> [, <Privileg2> [<...>]] | all
Grant privileges to yourself=Privilegien an Ihnen selbst vergeben
Invalid parameters (see /help grantme).=Ungültige Parameter (siehe „/help grantme“).
+Your privileges are insufficient. '@1' only allows you to revoke: @2=Ihre Privilegien sind unzureichend. Mit „@1“ können Sie nur folgendes entziehen: @2
+Note: Cannot revoke in singleplayer: @1=Anmerkung: Im Einzelspielermodus kann man folgendes nicht entziehen: @1
+Note: Cannot revoke from admin: @1=Anmerkung: Vom Admin kann man folgendes nicht entziehen: @1
+No privileges were revoked.=Es wurden keine Privilegien entzogen.
@1 revoked privileges from you: @2=@1 entfernte Privilegien von Ihnen: @2
Remove privileges from player=Privilegien von Spieler entfernen
Invalid parameters (see /help revoke).=Ungültige Parameter (siehe „/help revoke“).
@@ -156,7 +164,6 @@ Kicked @1.=@1 hinausgeworfen.
Clear all objects in world=Alle Objekte in der Welt löschen
Invalid usage, see /help clearobjects.=Ungültige Verwendung, siehe /help clearobjects.
Clearing all objects. This may take a long time. You may experience a timeout. (by @1)=Lösche alle Objekte. Dies kann eine lange Zeit dauern. Eine Netzwerkzeitüberschreitung könnte für Sie auftreten. (von @1)
-Objects cleared.=Objekte gelöscht.
Cleared all objects.=Alle Objekte gelöscht.
<name> <message>=<Name> <Nachricht>
Send a direct message to a player=Eine Direktnachricht an einen Spieler senden
@@ -184,7 +191,6 @@ Available commands:=Verfügbare Befehle:
Command not available: @1=Befehl nicht verfügbar: @1
[all | privs | <cmd>]=[all | privs | <Befehl>]
Get help for commands or list privileges=Hilfe für Befehle erhalten oder Privilegien auflisten
-Available privileges:=Verfügbare Privilegien:
Command=Befehl
Parameters=Parameter
For more information, click on any entry in the list.=Für mehr Informationen klicken Sie auf einen beliebigen Eintrag in der Liste.
@@ -194,16 +200,20 @@ Available commands: (see also: /help <cmd>)=Verfügbare Befehle: (siehe auch: /h
Close=Schließen
Privilege=Privileg
Description=Beschreibung
+Available privileges:=Verfügbare Privilegien:
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<Filter>] | dump [<Filter>] | save [<Format> [<Filter>]]
Handle the profiler and profiling data=Den Profiler und Profilingdaten verwalten
Statistics written to action log.=Statistiken zum Aktionsprotokoll geschrieben.
Statistics were reset.=Statistiken wurden zurückgesetzt.
Usage: @1=Verwendung: @1
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=Format kann entweder „txt“, „csv“, „lua“, „json“ oder „json_pretty“ sein (die Struktur kann sich in Zukunft ändern).
+@1 joined the game.=@1 ist dem Spiel beigetreten.
+@1 left the game.=@1 hat das Spiel verlassen.
+@1 left the game (timed out).=@1 hat das Spiel verlassen (Netzwerkzeitüberschreitung).
(no description)=(keine Beschreibung)
Can interact with things and modify the world=Kann mit Dingen interagieren und die Welt verändern
Can speak in chat=Kann im Chat sprechen
-Can modify 'shout' and 'interact' privileges=Kann die „shout“- und „interact“-Privilegien anpassen
+Can modify basic privileges (@1)=Kann grundlegende Privilegien anpassen (@1)
Can modify privileges=Kann Privilegien anpassen
Can teleport self=Kann sich selbst teleportieren
Can teleport other players=Kann andere Spieler teleportieren
@@ -223,3 +233,8 @@ Unknown Item=Unbekannter Gegenstand
Air=Luft
Ignore=Ignorieren
You can't place 'ignore' nodes!=Sie können keine „ignore“-Blöcke platzieren!
+Values below show absolute/relative times spend per server step by the instrumented function.=Die unten angegebenen Werte zeigen absolute/relative Zeitspannen, die je Server-Step von der instrumentierten Funktion in Anspruch genommen wurden.
+A total of @1 sample(s) were taken.=Es wurden insgesamt @1 Datenpunkt(e) aufgezeichnet.
+The output is limited to '@1'.=Die Ausgabe ist beschränkt auf „@1“.
+Saving of profile failed: @1=Speichern des Profils fehlgeschlagen: @1
+Profile saved to @1=Profil abgespeichert nach @1
diff --git a/builtin/locale/__builtin.it.tr b/builtin/locale/__builtin.it.tr
index 94bc870c8..8bce1d0d2 100644
--- a/builtin/locale/__builtin.it.tr
+++ b/builtin/locale/__builtin.it.tr
@@ -2,6 +2,8 @@
Empty command.=Comando vuoto.
Invalid command: @1=Comando non valido: @1
Invalid command usage.=Utilizzo del comando non valido.
+ (@1 s)=
+Command execution took @1 s=
You don't have permission to run this command (missing privileges: @1).=Non hai il permesso di eseguire questo comando (privilegi mancanti: @1).
Unable to get position of player @1.=Impossibile ottenere la posizione del giocatore @1.
Incorrect area format. Expected: (x1,y1,z1) (x2,y2,z2)=Formato dell'area non corretto. Richiesto: (x1,y1,z1) (x2,y2,z2)
@@ -10,24 +12,30 @@ Show chat action (e.g., '/me orders a pizza' displays '<player name> orders a pi
Show the name of the server owner=Mostra il nome del proprietario del server
The administrator of this server is @1.=L'amministratore di questo server è @1.
There's no administrator named in the config file.=Non c'è nessun amministratore nel file di configurazione.
+@1 does not have any privileges.=
+Privileges of @1: @2=Privilegi di @1: @2
[<name>]=[<nome>]
Show privileges of yourself or another player=Mostra i privilegi propri o di un altro giocatore
Player @1 does not exist.=Il giocatore @1 non esiste.
-Privileges of @1: @2=Privilegi di @1: @2
<privilege>=<privilegio>
Return list of all online players with privilege=Ritorna una lista di tutti i giocatori connessi col tale privilegio
Invalid parameters (see /help haspriv).=Parametri non validi (vedi /help haspriv).
Unknown privilege!=Privilegio sconosciuto!
Players online with the "@1" privilege: @2=Giocatori connessi con il privilegio "@1": @2
Your privileges are insufficient.=I tuoi privilegi sono insufficienti.
+Your privileges are insufficient. '@1' only allows you to grant: @2=
Unknown privilege: @1=Privilegio sconosciuto: @1
@1 granted you privileges: @2=@1 ti ha assegnato i seguenti privilegi: @2
-<name> (<privilege> | all)=<nome> (<privilegio> | all)
+<name> (<privilege> [, <privilege2> [<...>]] | all)=
Give privileges to player=Dà privilegi al giocatore
Invalid parameters (see /help grant).=Parametri non validi (vedi /help grant).
-<privilege> | all=<privilegio> | all
+<privilege> [, <privilege2> [<...>]] | all=
Grant privileges to yourself=Assegna dei privilegi a te stessǝ
Invalid parameters (see /help grantme).=Parametri non validi (vedi /help grantme).
+Your privileges are insufficient. '@1' only allows you to revoke: @2=
+Note: Cannot revoke in singleplayer: @1=
+Note: Cannot revoke from admin: @1=
+No privileges were revoked.=
@1 revoked privileges from you: @2=@1 ti ha revocato i seguenti privilegi: @2
Remove privileges from player=Rimuove privilegi dal giocatore
Invalid parameters (see /help revoke).=Parametri non validi (vedi /help revoke).
@@ -183,7 +191,6 @@ Available commands:=Comandi disponibili:
Command not available: @1=Comando non disponibile: @1
[all | privs | <cmd>]=[all | privs | <comando>]
Get help for commands or list privileges=Richiama la finestra d'aiuto dei comandi o dei privilegi
-Available privileges:=Privilegi disponibili:
Command=Comando
Parameters=Parametri
For more information, click on any entry in the list.=Per più informazioni, clicca su una qualsiasi voce dell'elenco.
@@ -193,16 +200,20 @@ Available commands: (see also: /help <cmd>)=Comandi disponibili: (vedi anche /he
Close=Chiudi
Privilege=Privilegio
Description=Descrizione
+Available privileges:=Privilegi disponibili:
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtro>] | dump [<filtro>] | save [<formato> [<filtro>]] | reset
Handle the profiler and profiling data=Gestisce il profiler e i dati da esso elaborati
Statistics written to action log.=Statistiche scritte nel log delle azioni.
Statistics were reset.=Le statistiche sono state resettate.
Usage: @1=Utilizzo: @1
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=I formati supportati sono txt, csv, lua, json e json_pretty (le strutture potrebbero essere soggetti a cambiamenti).
+@1 joined the game.=
+@1 left the game.=
+@1 left the game (timed out).=
(no description)=(nessuna descrizione)
Can interact with things and modify the world=Si può interagire con le cose e modificare il mondo
Can speak in chat=Si può parlare in chat
-Can modify 'shout' and 'interact' privileges=Si possono modificare i privilegi 'shout' e 'interact'
+Can modify basic privileges (@1)=
Can modify privileges=Si possono modificare i privilegi
Can teleport self=Si può teletrasportare se stessз
Can teleport other players=Si possono teletrasportare gli altri giocatori
@@ -222,3 +233,15 @@ Unknown Item=Oggetto sconosciuto
Air=Aria
Ignore=Ignora
You can't place 'ignore' nodes!=Non puoi piazzare nodi 'ignore'!
+Values below show absolute/relative times spend per server step by the instrumented function.=
+A total of @1 sample(s) were taken.=
+The output is limited to '@1'.=
+Saving of profile failed: @1=
+Profile saved to @1=
+
+
+##### not used anymore #####
+
+<name> (<privilege> | all)=<nome> (<privilegio> | all)
+<privilege> | all=<privilegio> | all
+Can modify 'shout' and 'interact' privileges=Si possono modificare i privilegi 'shout' e 'interact'
diff --git a/builtin/locale/template.txt b/builtin/locale/template.txt
index c5ace1a2f..db0ee07b8 100644
--- a/builtin/locale/template.txt
+++ b/builtin/locale/template.txt
@@ -2,6 +2,8 @@
Empty command.=
Invalid command: @1=
Invalid command usage.=
+ (@1 s)=
+Command execution took @1 s=
You don't have permission to run this command (missing privileges: @1).=
Unable to get position of player @1.=
Incorrect area format. Expected: (x1,y1,z1) (x2,y2,z2)=
@@ -10,24 +12,30 @@ Show chat action (e.g., '/me orders a pizza' displays '<player name> orders a pi
Show the name of the server owner=
The administrator of this server is @1.=
There's no administrator named in the config file.=
+@1 does not have any privileges.=
+Privileges of @1: @2=
[<name>]=
Show privileges of yourself or another player=
Player @1 does not exist.=
-Privileges of @1: @2=
<privilege>=
Return list of all online players with privilege=
Invalid parameters (see /help haspriv).=
Unknown privilege!=
Players online with the "@1" privilege: @2=
Your privileges are insufficient.=
+Your privileges are insufficient. '@1' only allows you to grant: @2=
Unknown privilege: @1=
@1 granted you privileges: @2=
-<name> (<privilege> | all)=
+<name> (<privilege> [, <privilege2> [<...>]] | all)=
Give privileges to player=
Invalid parameters (see /help grant).=
-<privilege> | all=
+<privilege> [, <privilege2> [<...>]] | all=
Grant privileges to yourself=
Invalid parameters (see /help grantme).=
+Your privileges are insufficient. '@1' only allows you to revoke: @2=
+Note: Cannot revoke in singleplayer: @1=
+Note: Cannot revoke from admin: @1=
+No privileges were revoked.=
@1 revoked privileges from you: @2=
Remove privileges from player=
Invalid parameters (see /help revoke).=
@@ -183,7 +191,6 @@ Available commands:=
Command not available: @1=
[all | privs | <cmd>]=
Get help for commands or list privileges=
-Available privileges:=
Command=
Parameters=
For more information, click on any entry in the list.=
@@ -193,16 +200,20 @@ Available commands: (see also: /help <cmd>)=
Close=
Privilege=
Description=
+Available privileges:=
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=
Handle the profiler and profiling data=
Statistics written to action log.=
Statistics were reset.=
Usage: @1=
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=
+@1 joined the game.=
+@1 left the game.=
+@1 left the game (timed out).=
(no description)=
Can interact with things and modify the world=
Can speak in chat=
-Can modify 'shout' and 'interact' privileges=
+Can modify basic privileges (@1)=
Can modify privileges=
Can teleport self=
Can teleport other players=
@@ -222,3 +233,8 @@ Unknown Item=
Air=
Ignore=
You can't place 'ignore' nodes!=
+Values below show absolute/relative times spend per server step by the instrumented function.=
+A total of @1 sample(s) were taken.=
+The output is limited to '@1'.=
+Saving of profile failed: @1=
+Profile saved to @1=
diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua
index 2096b0cfc..2481078e2 100644
--- a/builtin/mainmenu/init.lua
+++ b/builtin/mainmenu/init.lua
@@ -49,7 +49,7 @@ local tabs = {}
tabs.settings = dofile(menupath .. DIR_DELIM .. "tab_settings.lua")
tabs.content = dofile(menupath .. DIR_DELIM .. "tab_content.lua")
-tabs.credits = dofile(menupath .. DIR_DELIM .. "tab_credits.lua")
+tabs.about = dofile(menupath .. DIR_DELIM .. "tab_about.lua")
tabs.local_game = dofile(menupath .. DIR_DELIM .. "tab_local.lua")
tabs.play_online = dofile(menupath .. DIR_DELIM .. "tab_online.lua")
@@ -98,7 +98,7 @@ local function init_globals()
tv_main:add(tabs.content)
tv_main:add(tabs.settings)
- tv_main:add(tabs.credits)
+ tv_main:add(tabs.about)
tv_main:set_global_event_handler(main_event_handler)
tv_main:set_fixed_size(false)
diff --git a/builtin/mainmenu/serverlistmgr.lua b/builtin/mainmenu/serverlistmgr.lua
index 9876d8ac5..964d0c584 100644
--- a/builtin/mainmenu/serverlistmgr.lua
+++ b/builtin/mainmenu/serverlistmgr.lua
@@ -90,8 +90,11 @@ function serverlistmgr.sync()
end
--------------------------------------------------------------------------------
-local function get_favorites_path()
+local function get_favorites_path(folder)
local base = core.get_user_path() .. DIR_DELIM .. "client" .. DIR_DELIM .. "serverlist" .. DIR_DELIM
+ if folder then
+ return base
+ end
return base .. core.settings:get("serverlist_file")
end
@@ -103,9 +106,8 @@ local function save_favorites(favorites)
core.settings:set("serverlist_file", filename:sub(1, #filename - 4) .. ".json")
end
- local path = get_favorites_path()
- core.create_dir(path)
- core.safe_file_write(path, core.write_json(favorites))
+ assert(core.create_dir(get_favorites_path(true)))
+ core.safe_file_write(get_favorites_path(), core.write_json(favorites))
end
--------------------------------------------------------------------------------
diff --git a/builtin/mainmenu/tab_credits.lua b/builtin/mainmenu/tab_about.lua
index fe2b68c04..cb566f773 100644
--- a/builtin/mainmenu/tab_credits.lua
+++ b/builtin/mainmenu/tab_about.lua
@@ -107,8 +107,8 @@ local function buildCreditList(source)
end
return {
- name = "credits",
- caption = fgettext("Credits"),
+ name = "about",
+ caption = fgettext("About"),
cbf_formspec = function(tabview, name, tabdata)
local logofile = defaulttexturedir .. "logo.png"
local version = core.get_version()
@@ -131,11 +131,16 @@ return {
buildCreditList(previous_contributors) .. "," ..
";1]"
+ -- Render information
+ fs = fs .. "label[0.75,4.9;" ..
+ fgettext("Active renderer:") .. "\n" ..
+ core.formspec_escape(core.get_screen_info().render_info) .. "]"
+
if PLATFORM ~= "Android" then
fs = fs .. "tooltip[userdata;" ..
fgettext("Opens the directory that contains user-provided worlds, games, mods,\n" ..
"and texture packs in a file manager / explorer.") .. "]"
- fs = fs .. "button[0,4.75;3.5,1;userdata;" .. fgettext("Open User Data Directory") .. "]"
+ fs = fs .. "button[0,4;3.5,1;userdata;" .. fgettext("Open User Data Directory") .. "]"
end
return fs
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt
index 50a51b973..ab3ceb9e7 100644
--- a/builtin/settingtypes.txt
+++ b/builtin/settingtypes.txt
@@ -516,18 +516,17 @@ bilinear_filter (Bilinear filtering) bool false
trilinear_filter (Trilinear filtering) bool false
# Filtered textures can blend RGB values with fully-transparent neighbors,
-# which PNG optimizers usually discard, sometimes resulting in a dark or
-# light edge to transparent textures. Apply this filter to clean that up
-# at texture load time.
+# which PNG optimizers usually discard, often resulting in dark or
+# light edges to transparent textures. Apply a filter to clean that up
+# at texture load time. This is automatically enabled if mipmapping is enabled.
texture_clean_transparent (Clean transparent textures) bool false
# When using bilinear/trilinear/anisotropic filters, low-resolution textures
# can be blurred, so automatically upscale them with nearest-neighbor
# interpolation to preserve crisp pixels. This sets the minimum texture size
# for the upscaled textures; higher values look sharper, but require more
-# memory. Powers of 2 are recommended. Setting this higher than 1 may not
-# have a visible effect unless bilinear/trilinear/anisotropic filtering is
-# enabled.
+# memory. Powers of 2 are recommended. This setting is ONLY applies if
+# bilinear/trilinear/anisotropic filtering is enabled.
# This is also used as the base node texture size for world-aligned
# texture autoscaling.
texture_min_size (Minimum texture size) int 64
@@ -674,7 +673,7 @@ lighting_boost_spread (Light curve boost spread) float 0.2 0.0 0.4
# Path to texture directory. All textures are first searched from here.
texture_path (Texture path) path
-# The rendering back-end for Irrlicht.
+# The rendering back-end.
# A restart is required after changing this.
# Note: On Android, stick with OGLES1 if unsure! App may fail to start otherwise.
# On other platforms, OpenGL is recommended.
@@ -871,7 +870,7 @@ font_path (Regular font path) filepath fonts/Arimo-Regular.ttf
font_path_bold (Bold font path) filepath fonts/Arimo-Bold.ttf
font_path_italic (Italic font path) filepath fonts/Arimo-Italic.ttf
-font_path_bolditalic (Bold and italic font path) filepath fonts/Arimo-BoldItalic.ttf
+font_path_bold_italic (Bold and italic font path) filepath fonts/Arimo-BoldItalic.ttf
# Font size of the monospace font in point (pt).
mono_font_size (Monospace font size) int 15 1
@@ -884,16 +883,7 @@ mono_font_path (Monospace font path) filepath fonts/Cousine-Regular.ttf
mono_font_path_bold (Bold monospace font path) filepath fonts/Cousine-Bold.ttf
mono_font_path_italic (Italic monospace font path) filepath fonts/Cousine-Italic.ttf
-mono_font_path_bolditalic (Bold and italic monospace font path) filepath fonts/Cousine-BoldItalic.ttf
-
-# Font size of the fallback font in point (pt).
-fallback_font_size (Fallback font size) int 15 1
-
-# Shadow offset (in pixels) of the fallback font. If 0, then shadow will not be drawn.
-fallback_font_shadow (Fallback font shadow) int 1
-
-# Opaqueness (alpha) of the shadow behind the fallback font, between 0 and 255.
-fallback_font_shadow_alpha (Fallback font shadow alpha) int 128 0 255
+mono_font_path_bold_italic (Bold and italic monospace font path) filepath fonts/Cousine-BoldItalic.ttf
# Path of the fallback font.
# If “freetype” setting is enabled: Must be a TrueType font.
@@ -1407,7 +1397,7 @@ name (Player name) string
# Set the language. Leave empty to use the system language.
# A restart is required after changing this.
-language (Language) enum ,ar,ca,cs,da,de,dv,el,en,eo,es,et,eu,fil,fr,hu,id,it,ja,ja_KS,jbo,kk,kn,lo,lt,ms,my,nb,nl,nn,pl,pt,pt_BR,ro,ru,sl,sr_Cyrl,sv,sw,th,tr,uk,vi
+language (Language) enum ,be,bg,ca,cs,da,de,el,en,eo,es,et,eu,fi,fr,gd,gl,hu,id,it,ja,jbo,kk,ko,lt,lv,ms,nb,nl,nn,pl,pt,pt_BR,ro,ru,sk,sl,sr_Cyrl,sr_Latn,sv,sw,tr,uk,vi,zh_CN,zh_TW
# Level of logging to be written to debug.txt:
# - <nothing> (no logging)
@@ -1434,9 +1424,8 @@ enable_ipv6 (IPv6) bool true
[*Advanced]
-# Default timeout for cURL, stated in milliseconds.
-# Only has an effect if compiled with cURL.
-curl_timeout (cURL timeout) int 5000
+# Maximum time an interactive request (e.g. server list fetch) may take, stated in milliseconds.
+curl_timeout (cURL interactive timeout) int 20000
# Limits number of parallel HTTP requests. Affects:
# - Media fetch if server uses remote_media setting.
@@ -1445,7 +1434,7 @@ curl_timeout (cURL timeout) int 5000
# Only has an effect if compiled with cURL.
curl_parallel_limit (cURL parallel limit) int 8
-# Maximum time in ms a file download (e.g. a mod download) may take.
+# Maximum time a file download (e.g. a mod download) may take, stated in milliseconds.
curl_file_download_timeout (cURL file download timeout) int 300000
# Makes DirectX work with LuaJIT. Disable if it causes troubles.
@@ -2334,3 +2323,5 @@ player_esp_color (PlayerESP Color) v3f 0, 255, 0
tool_range (Additional Tool Range) int 2
reach (Reach) bool false
+
+airjump (AirJump) bool false