mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-17 02:15:22 +02:00
Prevent registration of certain new content after load time
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user