mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 08:03:45 +01:00
Always set globals in __newindex (#13131)
This commit is contained in:
parent
d0b6f217ae
commit
d69cb4fb5d
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user