1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-17 18:35:20 +02: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)