1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Always set globals in __newindex (#13131)

This commit is contained in:
Jude Melton-Houghton
2023-01-09 15:00:49 -05:00
committed by GitHub
parent d0b6f217ae
commit d69cb4fb5d

View File

@@ -14,6 +14,7 @@ local declared = {}
local warned = {}
function meta:__newindex(name, value)
rawset(self, name, value)
if declared[name] then
return
end
@@ -25,7 +26,6 @@ function meta:__newindex(name, value)
:format(name, desc))
warned[warn_key] = true
end
rawset(self, name, value)
declared[name] = true
end