nodecore-cd2025/mods/nc_api/item_oldnames.lua
Aaron Suen 39dea8a2ae MAJOR: Code quality audit using luacheck.
- Removed lots of unused variables, a few shadowed identifiers.
- Removed a few sections of dead code.
2019-08-31 09:26:53 -04:00

15 lines
437 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore, pairs
= minetest, nodecore, pairs
-- LUALOCALS > ---------------------------------------------------------
nodecore.register_on_register_item(function(name, def)
if def.oldnames then
for _, v in pairs(def.oldnames) do
if not minetest.registered_items[v] then
minetest.register_alias(v, name)
end
end
end
end)