blockgame/mods/bg_api/cleanup.lua
trans_soup 20b29c833f complete cleanup after rename.
clean up things that were broken after renaming `bg_core` to
`bg_terrain`.

also clean up after global rename that added `bg_` prefix to every mod
name.
2023-10-16 10:14:34 +02:00

20 lines
471 B
Lua

-- move from old modnames to new ones. (old ones didn't have the `bg_` prefix.)
minetest.register_lbm({
name = "bg_api:rename_legacy_nodes",
nodenames = {
"tree:log",
"tree:log_alive",
"tree:leaves",
"tree:leaves_alive",
"tree:sapling",
"tree:root",
"tree:nut",
"stoneworking:tile",
"stoneworking:bricks",
},
run_at_every_load = true,
action = function (pos, node)
local name = node.name
minetest.set_node(pos, {name = "bg_" .. name})
end,
})