20b29c833f
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.
20 lines
471 B
Lua
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,
|
|
})
|