minetest_game/mods/vipworld/moretrees/init.lua

70 lines
1.6 KiB
Lua

-- More trees! 2013-04-07
--
-- This mod adds more types of trees to the game
--
-- Some of the node definitions and textures came from cisoun's conifers mod
-- and bas080's jungle trees mod.
--
-- Brought together into one mod and made L-systems compatible by Vanessa
-- Ezekowitz.
--
-- Firs and Jungle tree axioms/rules by Vanessa Dannenberg, with the
-- latter having been tweaked by RealBadAngel, most other axioms/rules written
-- by RealBadAngel.
--
moretrees = {}
-- Read the default config file (and if necessary, copy it to the world folder).
local worldpath=minetest.get_worldpath()
local modpath=minetest.get_modpath("moretrees")
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s) return s end
end
moretrees.intllib = S
-- clone node
function moretrees.clone_node(name)
local node2 = {}
local node = minetest.registered_nodes[name]
for k,v in pairs(node) do
node2[k]=v
end
return node2
end
-- infinite stacks checking
if minetest.get_modpath("unified_inventory") or not
minetest.settings:get_bool("creative_mode") then
moretrees.expect_infinite_stacks = false
else
moretrees.expect_infinite_stacks = true
end
-- tables, load other files
moretrees.cutting_tools = {
"default:axe_bronze",
"default:axe_diamond",
"default:axe_mese",
"default:axe_steel",
"glooptest:axe_alatro",
"glooptest:axe_arol",
"moreores:axe_mithril",
"moreores:axe_silver",
"titanium:axe",
}
dofile(modpath.."/node_defs.lua")
dofile(modpath.."/date_palm.lua")
dofile(modpath.."/cocos_palm.lua")