1
0
Fork 0
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:
sfan5 2025-03-16 20:22:05 +01:00
parent ca047c3e58
commit a9a3b05cc3
3 changed files with 55 additions and 6 deletions

View file

@ -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)