nodecore-cd2025/mods/nc_api/item_oldnames.lua
Aaron Suen f70c34cf8e Refactor amalgam into its own mod
This declutters nc_terrain and paves the way for
more igneous content
2020-06-06 08:00:59 -04:00

16 lines
459 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
def.oldnames = nil
end
end)