mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Prevent registration of certain new content after load time
This commit is contained in:
parent
ca047c3e58
commit
a9a3b05cc3
3 changed files with 55 additions and 6 deletions
|
@ -59,6 +59,9 @@ end
|
|||
local alias_metatable = {
|
||||
__index = function(t, name)
|
||||
return rawget(t, core.registered_aliases[name])
|
||||
end,
|
||||
__newindex = function()
|
||||
error("table is read-only")
|
||||
end
|
||||
}
|
||||
setmetatable(core.registered_items, alias_metatable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue