mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-19 19:25:18 +02:00
Cherry-pick most commits since 15c0376
Commits not directly related to network changes were cherry-picked on a best-effort basis, as some cause difficult merge conflicts. Commits skipped over:0d1eedcccc
aa474e4501
82482ecd9d
b214cde5b4
2066655aae
7e088fdfe3
40bf1d7b5f
1b2f64473e
7e56637ed0
64ff966bae
51057a56f5
009149a073
cf4045ff0f
e357577cb2
49f84b76bc
b019221c30
7880ff74b6
146f77fdb7
a704c04f00
Commits with conflicts:038d3a31df
e9eda2b0d0
708337dfc2
~~ modified client.cpp manually; shadow changes to packethandlers/client.cpp36e8ba9ce2
~~ modified main.cpp manually; add ALLOW_ZWRITE_ON_TRANSPARENT set3b6480c5b0
~~ modified server.cpp manually; change wrapDegrees -> modulo360f5a5854ea9d
c09d026f05
3c91ad8fc2
This commit is contained in:
@@ -545,12 +545,11 @@ function table.copy(t, seen)
|
||||
seen = seen or {}
|
||||
seen[t] = n
|
||||
for k, v in pairs(t) do
|
||||
n[type(k) ~= "table" and k or seen[k] or table.copy(k, seen)] =
|
||||
type(v) ~= "table" and v or seen[v] or table.copy(v, seen)
|
||||
n[(type(k) == "table" and (seen[k] or table.copy(k, seen))) or k] =
|
||||
(type(v) == "table" and (seen[v] or table.copy(v, seen))) or v
|
||||
end
|
||||
return n
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- mainmenu only functions
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -565,7 +564,7 @@ if INIT == "mainmenu" then
|
||||
return nil
|
||||
end
|
||||
|
||||
function fgettext(text, ...)
|
||||
function fgettext_ne(text, ...)
|
||||
text = core.gettext(text)
|
||||
local arg = {n=select('#', ...), ...}
|
||||
if arg.n >= 1 then
|
||||
@@ -587,7 +586,11 @@ if INIT == "mainmenu" then
|
||||
end
|
||||
text = result
|
||||
end
|
||||
return core.formspec_escape(text)
|
||||
return text
|
||||
end
|
||||
|
||||
function fgettext(text, ...)
|
||||
return core.formspec_escape(fgettext_ne(text, ...))
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user