mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-27 03:15:29 +01:00
Prevent registration of certain new content after load time
This commit is contained in:
@@ -36,6 +36,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