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