electric/mods/ebiometrees/api.lua
Aleksey Chubukov 940592395d tree test
2023-05-11 02:39:08 +03:00

17 lines
612 B
Lua

ebiometrees.registered_trees = {}
function ebiometrees.register_tree(name, data)
ebiometrees.registered_trees[name] = data
ebiometrees.register_subnodes(name)
end
function ebiometrees.register_subnodes(tree_name)
local modname = tree_name:match("([^:]*):")
local basename = tree_name:match(":([^:]+)")
local data = ebiometrees.registered_trees[tree_name]
ebiometrees.register_tree_sapling(modname, basename, data)
ebiometrees.register_tree_sprout(modname, basename, data)
ebiometrees.register_tree_leaves(modname, basename, data)
ebiometrees.register_tree_trunks(modname, basename, data)
end