Jungle nodes are defined and used by minetest_game now,
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Tue, 19 Mar 2013 21:01:09 +0000 (17:01 -0400)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Tue, 19 Mar 2013 21:01:09 +0000 (17:01 -0400)
so we don't need them in moretrees anymore.  They're still used by moretrees
to generate out versions of jungletrees, though, and red/green/yellow leaves
are also still provided and defined.

leafdecay.lua
node_defs.lua
settings.lua

index 1870cb6b6db0a22c5f45e442dcc615cb0c1f68b0..174eb347187416ecf9f00dc4e5f556bd13067cc3 100644 (file)
@@ -58,6 +58,7 @@ end
 if moretrees.enable_replace_default_trees then
        minetest.register_alias("mapgen_tree", "air")
        minetest.register_alias("mapgen_leaves", "air")
+       minetest.register_alias("mapgen_apple", "air")
        plantslib:register_generate_plant(moretrees.beech_biome, moretrees.beech_model)
 
 elseif moretrees.enable_default_leafdecay then
index 6875f7d39833a8f34813d28a520dac5a85c451ad..a6faf4ae09aaa92a9a29d73f5f2bdb688694a143 100644 (file)
@@ -23,58 +23,65 @@ for i in ipairs(moretrees.treelist) do
        local selbox = moretrees.treelist[i][5]
        local vscale = moretrees.treelist[i][6]
 
+       if treename ~= "jungletree" then -- the default game provides jungle tree nodes.
+
+               minetest.register_node("moretrees:"..treename.."_trunk", {
+                       description = treedesc.." Trunk",
+                       tiles = {
+                               "moretrees_"..treename.."_trunk_top.png",
+                               "moretrees_"..treename.."_trunk_top.png",
+                               "moretrees_"..treename.."_trunk.png"
+                       },
+                       is_ground_content = true,
+                       groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
+                       sounds = default.node_sound_wood_defaults(),
+               })
 
-       minetest.register_node("moretrees:"..treename.."_trunk", {
-               description = treedesc.." Trunk",
-               tiles = {
-                       "moretrees_"..treename.."_trunk_top.png",
-                       "moretrees_"..treename.."_trunk_top.png",
-                       "moretrees_"..treename.."_trunk.png"
-               },
-               is_ground_content = true,
-               groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
-               sounds = default.node_sound_wood_defaults(),
-       })
+               minetest.register_node("moretrees:"..treename.."_planks", {
+                       description = treedesc.." Planks",
+                       tiles = {"moretrees_"..treename.."_wood.png"},
+                       is_ground_content = true,
+                       groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
+                       sounds = default.node_sound_wood_defaults(),
+               })
 
-       minetest.register_node("moretrees:"..treename.."_trunk_sideways", {
-               description = "Sideways "..treedesc.." Trunk",
-               tiles = {
-                       "moretrees_"..treename.."_trunk.png^[transformR90",
-                       "moretrees_"..treename.."_trunk.png^[transformR90",
-                       "moretrees_"..treename.."_trunk_top.png",
-                       "moretrees_"..treename.."_trunk_top.png",
-                       "moretrees_"..treename.."_trunk.png^[transformR90",
-                       "moretrees_"..treename.."_trunk.png^[transformR90"
+               minetest.register_node("moretrees:"..treename.."_sapling", {
+               description = treedesc.." Sapling",
+               drawtype = "plantlike",
+               tiles = {"moretrees_"..treename.."_sapling.png"},
+               inventory_image = "moretrees_"..treename.."_sapling.png",
+               paramtype = "light",
+               walkable = false,
+               selection_box = {
+                       type = "fixed",
+                       fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
                },
-               is_ground_content = true,
-               groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
-               sounds = default.node_sound_wood_defaults(),
-               paramtype2 = "facedir",
-       })
+               groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1},
+               sounds = default.node_sound_defaults(),
+               })
+       
+               -- player will get a sapling with 1/100 chance
+               -- player will get leaves only if he/she gets no saplings,
+               -- this is because max_items is 1
 
-       minetest.register_node("moretrees:"..treename.."_planks", {
-               description = treedesc.." Planks",
-               tiles = {"moretrees_"..treename.."_wood.png"},
-               is_ground_content = true,
-               groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
-               sounds = default.node_sound_wood_defaults(),
-       })
+               minetest.register_node("moretrees:"..treename.."_leaves", {
+                       description = treedesc.." Leaves",
+                       drawtype = "allfaces_optional",
+                       tiles = { "moretrees_"..treename.."_leaves.png" },
+                       paramtype = "light",
+                       groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
+                       sounds = default.node_sound_leaves_defaults(),
+
+                       drop = {
+                               max_items = 1,
+                               items = {
+                                       {items = {"moretrees:"..treename.."_sapling"}, rarity = 100 },
+                                       {items = {"moretrees:"..treename.."_leaves"} }
+                               }
+                       },
+               })
+       end
 
-       minetest.register_node("moretrees:"..treename.."_sapling", {
-       description = treedesc.." Sapling",
-       drawtype = "plantlike",
-       tiles = {"moretrees_"..treename.."_sapling.png"},
-       inventory_image = "moretrees_"..treename.."_sapling.png",
-       paramtype = "light",
-       walkable = false,
-       selection_box = {
-               type = "fixed",
-               fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
-       },
-       groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1},
-       sounds = default.node_sound_defaults(),
-       })
-       
        if (fruit ~= nil) then
                minetest.register_node("moretrees:"..fruit, {
                        description = fruitdesc,
@@ -95,28 +102,21 @@ for i in ipairs(moretrees.treelist) do
                })
        end
 
-       -- player will get a sapling with 1/100 chance
-       -- player will get leaves only if he/she gets no saplings,
-       -- this is because max_items is 1
-
-       if treename ~= "jungletree" then
-               minetest.register_node("moretrees:"..treename.."_leaves", {
-                       description = treedesc.." Leaves",
-                       drawtype = "allfaces_optional",
-                       tiles = { "moretrees_"..treename.."_leaves.png" },
-                       paramtype = "light",
-                       groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
-                       sounds = default.node_sound_leaves_defaults(),
-
-                       drop = {
-                               max_items = 1,
-                               items = {
-                                       {items = {"moretrees:"..treename.."_sapling"}, rarity = 100 },
-                                       {items = {"moretrees:"..treename.."_leaves"} }
-                               }
-                       },
-               })
-       end
+       minetest.register_node("moretrees:"..treename.."_trunk_sideways", {
+               description = "Sideways "..treedesc.." Trunk",
+               tiles = {
+                       "moretrees_"..treename.."_trunk.png^[transformR90",
+                       "moretrees_"..treename.."_trunk.png^[transformR90",
+                       "moretrees_"..treename.."_trunk_top.png",
+                       "moretrees_"..treename.."_trunk_top.png",
+                       "moretrees_"..treename.."_trunk.png^[transformR90",
+                       "moretrees_"..treename.."_trunk.png^[transformR90"
+               },
+               is_ground_content = true,
+               groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
+               sounds = default.node_sound_wood_defaults(),
+               paramtype2 = "facedir",
+       })
 
        table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_trunk")
 end
@@ -187,19 +187,18 @@ table.insert(moretrees.avoidnodes, "default:jungletree")
 table.insert(moretrees.avoidnodes, "moretrees:jungletree_trunk")
 table.insert(moretrees.avoidnodes, "moretrees:fir_trunk")
 
--- Backward compatbility with old mods/nodes:
-minetest.registered_items["jungletree"] = nil
-minetest.registered_aliases["jungletree"] = nil
-minetest.registered_items["default:jungletree"] = nil
-minetest.registered_aliases["default:jungletree"] = nil
+-- For compatibility with newly-re-introduced default jungles and related nodes.
+
+minetest.register_alias("moretrees:jungletree_trunk", "default:jungletree")
+minetest.register_alias("moretrees:jungletree_planks", "default:junglewood")
+minetest.register_alias("moretrees:jungletree_sapling", "default:junglesapling")
+minetest.register_alias("jungletree:sapling", "default:junglesapling")
 
-minetest.register_alias("jungletree", "moretrees:jungletree_trunk")
-minetest.register_alias("default:jungletree", "moretrees:jungletree_trunk")
+-- These next ones are for the old jungle trees and conifers mods.
 
 minetest.register_alias("jungletree:leaves_green", "moretrees:jungletree_leaves_green")
 minetest.register_alias("jungletree:leaves_red", "moretrees:jungletree_leaves_red")
 minetest.register_alias("jungletree:leaves_yellow", "moretrees:jungletree_leaves_yellow")
-minetest.register_alias("jungletree:sapling", "moretrees:jungletree_sapling")
 
 minetest.register_alias("moretrees:conifer_trunk", "moretrees:fir_trunk")
 minetest.register_alias("moretrees:conifer_trunk_sideways", "moretrees:fir_trunk_sideways")
index 85a3a5d6238e44ce527717b7011f38a95408633f..9311cd338bee5f02b37dca61cd8bb8b16b314280 100644 (file)
@@ -1,8 +1,10 @@
 -- Global configuration variables
 
--- Enable replacement of default trees with birch if you want but be warned -
--- due to bugs in the speed of the engine's map generator/loader, doing so\
--- will slow it WAY down.
+-- Enable replacement of default trees with beech if you want but be warned -
+-- due to bugs in the speed of the engine's map generator/loader, doing so
+-- will slow it WAY down.  Note:  The code that uses this variable is in
+-- leafdecay.lua because of how it interacts with settings related to that
+-- function.
 
 moretrees.enable_replace_default_trees = false