summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crafts.lua88
-rw-r--r--init.lua6
-rw-r--r--node_defs.lua158
-rw-r--r--textures/Thumbs.dbbin6144 -> 0 bytes
-rw-r--r--textures/moretrees_conifer_leaves.png (renamed from textures/conifers_leaves.png)bin333 -> 333 bytes
-rw-r--r--textures/moretrees_conifer_leaves_bright.png (renamed from textures/conifers_leaves_special.png)bin367 -> 367 bytes
-rw-r--r--textures/moretrees_conifer_sapling.png (renamed from textures/conifers_sapling.png)bin454 -> 454 bytes
-rw-r--r--textures/moretrees_conifer_trunk.png (renamed from textures/conifers_trunk.png)bin699 -> 699 bytes
-rw-r--r--textures/moretrees_conifer_trunk_reversed.png (renamed from textures/conifers_trunk_reversed.png)bin721 -> 721 bytes
-rw-r--r--textures/moretrees_conifer_trunktop.png (renamed from textures/conifers_trunktop.png)bin768 -> 768 bytes
-rw-r--r--textures/moretrees_jungletree_bark.png (renamed from textures/jungletree_bark.png)bin705 -> 705 bytes
-rw-r--r--textures/moretrees_jungletree_leaves_green.png (renamed from textures/jungletree_leaves_green.png)bin456 -> 456 bytes
-rw-r--r--textures/moretrees_jungletree_leaves_red.png (renamed from textures/jungletree_leaves_red.png)bin469 -> 469 bytes
-rw-r--r--textures/moretrees_jungletree_leaves_yellow.png (renamed from textures/jungletree_leaves_yellow.png)bin467 -> 467 bytes
-rw-r--r--textures/moretrees_jungletree_sapling.png (renamed from textures/jungletree_sapling.png)bin215 -> 215 bytes
-rw-r--r--textures/moretrees_jungletree_wood.pngbin0 -> 789 bytes
16 files changed, 185 insertions, 67 deletions
diff --git a/crafts.lua b/crafts.lua
index 46fc41d..3f24c01 100644
--- a/crafts.lua
+++ b/crafts.lua
@@ -1,32 +1,96 @@
---
--- Conifers crafting definitions
---
+
+for i in ipairs(simple_trees) do
+ minetest.register_craft({
+ output = "moretrees:"..simple_trees[i].."_trunk_sideways 2",
+ recipe = {
+ {"moretrees:"..simple_trees[i].."_trunk", "moretrees:"..simple_trees[i].."_trunk"}
+ }
+ })
+
+ minetest.register_craft({
+ output = "moretrees:"..simple_trees[i].."_trunk 2",
+ recipe = {
+ {"moretrees:"..simple_trees[i].."_trunk_sideways"},
+ {"moretrees:"..simple_trees[i].."_trunk_sideways"}
+ }
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = "moretrees:"..simple_trees[i].."_planks 4",
+ recipe = {
+ "moretrees:"..simple_trees[i].."_trunk"
+ }
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = "moretrees:"..simple_trees[i].."_planks 4",
+ recipe = {
+ "moretrees:"..simple_trees[i].."_trunk_sideways"
+ }
+ })
+end
+
+----
+
+minetest.register_craft({
+ output = "moretrees:jungletree_trunk_sideways 2",
+ recipe = {
+ {"default:jungletree", "default:jungletree"},
+ }
+})
+
+minetest.register_craft({
+ output = "default:jungletree 2",
+ recipe = {
+ {"moretrees:jungletree_trunk_sideways"},
+ {"moretrees:jungletree_trunk_sideways"}
+ }
+})
+
+minetest.register_craft({
+ output = "moretrees:jungletree_planks 4",
+ recipe = {
+ {"default:jungletree"}
+ }
+})
+
+minetest.register_craft({
+ output = "moretrees:jungletree_planks 4",
+ recipe = {
+ {"moretrees:jungletree_trunk_sideways"}
+ }
+})
+
+----
+
minetest.register_craft({
- output = 'node "conifers:trunk_reversed" 2',
+ output = "conifers:trunk_reversed 2",
recipe = {
- {'node "conifers:trunk"', 'node "conifers:trunk"'},
+ {"conifers:trunk", "conifers:trunk"},
}
})
minetest.register_craft({
- output = 'node "conifers:trunk" 2',
+ output = "conifers:trunk 2",
recipe = {
- {'node "conifers:trunk_reversed"'},
- {'node "conifers:trunk_reversed"'}
+ {"conifers:trunk_reversed"},
+ {"conifers:trunk_reversed"}
}
})
minetest.register_craft({
- output = 'default:wood 4',
+ output = "default:wood 4",
recipe = {
- {'conifers:trunk'}
+ {"conifers:trunk"}
}
})
minetest.register_craft({
- output = 'default:wood 4',
+ output = "default:wood 4",
recipe = {
- {'conifers:trunk_reversed'}
+ {"conifers:trunk_reversed"}
}
})
diff --git a/init.lua b/init.lua
index 6b8e2b1..d2ffa5a 100644
--- a/init.lua
+++ b/init.lua
@@ -29,10 +29,10 @@
--
moretrees = {}
-dofile(minetest.get_modpath("moretrees").."/crafts.lua")
dofile(minetest.get_modpath("moretrees").."/node_defs.lua")
dofile(minetest.get_modpath("moretrees").."/tree_models.lua")
dofile(minetest.get_modpath("moretrees").."/biome_defs.lua")
+dofile(minetest.get_modpath("moretrees").."/crafts.lua")
-- tree spawning setup
@@ -90,8 +90,8 @@ end
plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:birch_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_birch",nil)
plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:spruce_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_spruce",nil)
-plantslib:grow_plants(sapling_interval,sapling_chance,"conifers:sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_conifer",nil)
-plantslib:grow_plants(sapling_interval,sapling_chance,"jungletree:sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_jungletree",nil)
+plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:conifer_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_conifer",nil)
+plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:jungletree_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_jungletree",nil)
-- Code to spawn a birch tree
diff --git a/node_defs.lua b/node_defs.lua
index 9d5842c..d807f95 100644
--- a/node_defs.lua
+++ b/node_defs.lua
@@ -14,19 +14,19 @@ leaves = {
moretrees.avoidnodes = {}
table.insert(moretrees.avoidnodes, "default:jungletree")
-table.insert(moretrees.avoidnodes, "jungletree:leaves_red")
-table.insert(moretrees.avoidnodes, "jungletree:leaves_green")
-table.insert(moretrees.avoidnodes, "jungletree:leaves_yellow")
-table.insert(moretrees.avoidnodes, "conifers:trunk")
-table.insert(moretrees.avoidnodes, "conifers:leaves")
-table.insert(moretrees.avoidnodes, "conifers:leaves_special")
+table.insert(moretrees.avoidnodes, "moretrees:jungletree_trunk")
+table.insert(moretrees.avoidnodes, "moretrees:jungletree_leaves_red")
+table.insert(moretrees.avoidnodes, "moretrees:jungletree_leaves_green")
+table.insert(moretrees.avoidnodes, "moretrees:jungletree_leaves_yellow")
+table.insert(moretrees.avoidnodes, "moretrees:conifer_trunk")
+table.insert(moretrees.avoidnodes, "moretrees:conifer_leaves")
+table.insert(moretrees.avoidnodes, "moretrees:conifer_leaves_bright")
for i in ipairs(leaves) do
local name = leaves[i]
minetest.register_node("moretrees:"..leaves[i][1].."_leaves", {
description = leaves[i][2],
drawtype = "allfaces_optional",
- visual_scale = 1.3,
tiles = { "moretrees_"..leaves[i][1].."_leaves.png" },
paramtype = "light",
groups = {tree=1, snappy=3, flammable=2},
@@ -71,6 +71,21 @@ for i in ipairs(trees) do
sounds = default.node_sound_wood_defaults(),
})
+ minetest.register_node("moretrees:"..treename.."_trunk_sideways", {
+ description = treedesc.." Trunk (sideways)",
+ tiles = {
+ "moretrees_"..treename..".png^[transformR90",
+ "moretrees_"..treename..".png^[transformR90",
+ "moretrees_"..treename.."_top.png",
+ "moretrees_"..treename.."_top.png",
+ "moretrees_"..treename..".png^[transformR90",
+ "moretrees_"..treename..".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(),
+ })
+
minetest.register_node("moretrees:"..treename.."_planks", {
description = treedesc.." Planks",
tiles = {"moretrees_"..treename.."_wood.png"},
@@ -117,30 +132,58 @@ for i in ipairs(trees) do
end
---- For backward compatibility, jungle trees and firs ("conifers") are defined
---- separately.
-
-- Nodes for jungle trees
-minetest.register_node(":jungletree:sapling", {
+minetest.register_node("moretrees:jungletree_sapling", {
description = "Jungle Tree Sapling",
drawtype = "plantlike",
- visual_scale = 1.0,
- tiles = {"jungletree_sapling.png"},
- inventory_image = "jungletree_sapling.png",
- wield_image = "default_sapling.png",
+ tiles = {"moretrees_jungletree_sapling.png"},
paramtype = "light",
walkable = false,
groups = {snappy=2,dig_immediate=3,flammable=2},
})
+minetest.register_node("moretrees:jungletree_trunk", {
+ description = "Jungle Tree trunk (sideways)",
+ tiles = {
+ "default_jungletree_top.png",
+ "default_jungletree_top.png",
+ "default_jungletree.png",
+ "default_jungletree.png",
+ "default_jungletree.png",
+ "default_jungletree.png"
+ },
+ groups = {wood=1,snappy=2,dig_immediate=3,flammable=2},
+})
+
+minetest.register_node("moretrees:jungletree_planks", {
+ description = "Jungle Tree Planks",
+ tiles = {
+ "moretrees_jungletree_wood.png",
+ },
+ groups = {wood=1,snappy=2,dig_immediate=3,flammable=2},
+})
+
+minetest.register_node("moretrees:jungletree_trunk_sideways", {
+ description = "Jungle Tree trunk (sideways)",
+ tiles = {
+ "default_jungletree.png^[transformR90",
+ "default_jungletree.png^[transformR90",
+ "default_jungletree_top.png",
+ "default_jungletree_top.png",
+ "default_jungletree.png^[transformR90",
+ "default_jungletree.png^[transformR90"
+ },
+ groups = {wood=1,snappy=2,dig_immediate=3,flammable=2},
+})
+
local leaves = {"green","yellow","red"}
for color = 1, 3 do
- local leave_name = ":jungletree:leaves_"..leaves[color]
+ local leave_name = "moretrees:jungletree_leaves_"..leaves[color]
minetest.register_node(leave_name, {
description = "Jungle Tree Leaves",
drawtype = "allfaces_optional",
- tiles = {"jungletree_leaves_"..leaves[color]..".png"},
+ tiles = {"moretrees_jungletree_leaves_"..leaves[color]..".png"},
paramtype = "light",
groups = {snappy=3, leafdecay=3, flammable=2},
drop = {
@@ -148,13 +191,13 @@ for color = 1, 3 do
items = {
{
-- player will get sapling with 1/20 chance
- items = {'jungletree:sapling'},
+ items = {'moretrees:jungletree_sapling'},
rarity = 20,
},
{
-- player will get leaves only if he get no saplings,
-- this is because max_items is 1
- items = {"jungletree:leaves_"..leaves[color]},
+ items = {"moretrees:jungletree_leaves_"..leaves[color]},
}
}
},
@@ -164,62 +207,61 @@ end
-- Nodes for conifers
-minetest.register_node(":conifers:trunk", {
+minetest.register_node("moretrees:conifer_trunk", {
description = "Conifer trunk",
tile_images = {
- "conifers_trunktop.png",
- "conifers_trunktop.png",
- "conifers_trunk.png",
- "conifers_trunk.png",
- "conifers_trunk.png",
- "conifers_trunk.png"
+ "moretrees_conifer_trunktop.png",
+ "moretrees_conifer_trunktop.png",
+ "moretrees_conifer_trunk.png",
+ "moretrees_conifer_trunk.png",
+ "moretrees_conifer_trunk.png",
+ "moretrees_conifer_trunk.png"
},
- paramtype = "facedir_simple",
is_ground_content = true,
groups = {
tree = 1,
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 1,
- flammable = 2
+ flammable = 2,
+ wood = 1
},
sounds = default.node_sound_wood_defaults()
})
-minetest.register_node(":conifers:trunk_reversed", {
+minetest.register_node("moretrees:conifer_trunk_sideways", {
description = "Conifer reversed trunk",
tile_images = {
- "conifers_trunk_reversed.png",
- "conifers_trunk_reversed.png",
- "conifers_trunktop.png",
- "conifers_trunktop.png",
- "conifers_trunk_reversed.png",
- "conifers_trunk_reversed.png"
+ "moretrees_conifer_trunk.png^[transformR90",
+ "moretrees_conifer_trunk.png^[transformR90",
+ "moretrees_conifer_trunktop.png",
+ "moretrees_conifer_trunktop.png",
+ "moretrees_conifer_trunk.png^[transformR90",
+ "moretrees_conifer_trunk.png^[transformR90"
},
--inventory_image = minetest.inventorycube(
--"conifers_trunk.png",
--"conifers_trunktop.png",
--"conifers_trunk.png"
--),
- paramtype = "facedir_simple",
+ paramtype2 = "facedir",
material = minetest.digprop_woodlike(1.0),
- legacy_facedir_simple = true,
- is_ground_content = true,
+
groups = {
tree = 1,
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 1,
- flammable = 2
+ flammable = 2,
+ wood = 1
},
sounds = default.node_sound_wood_defaults()
})
-minetest.register_node(":conifers:leaves", {
- description = "Conifer leaves",
+minetest.register_node("moretrees:conifer_leaves", {
drawtype = "allfaces_optional",
- visual_scale = 1.3,
- tile_images = { "conifers_leaves.png" },
+ description = "Conifer leaves",
+ tile_images = { "moretrees_conifer_leaves.png" },
paramtype = "light",
groups = {
snappy = 3,
@@ -244,12 +286,12 @@ minetest.register_node(":conifers:leaves", {
sounds = default.node_sound_leaves_defaults()
})
-minetest.register_node(":conifers:leaves_special", {
- description = "Bright conifer leaves",
+minetest.register_node("moretrees:conifer_leaves_bright", {
drawtype = "allfaces_optional",
- visual_scale = 1.3,
- tile_images = { "conifers_leaves_special.png" },
+ description = "Bright conifer leaves",
+ tile_images = { "moretrees_conifer_leaves_bright.png" },
paramtype = "light",
+
groups = {
snappy = 3,
leafdecay = 3,
@@ -273,13 +315,10 @@ minetest.register_node(":conifers:leaves_special", {
sounds = default.node_sound_leaves_defaults()
})
-minetest.register_node(":conifers:sapling", {
+minetest.register_node("moretrees:conifer_sapling", {
description = "Conifer sapling",
drawtype = "plantlike",
- visual_scale = 1.0,
- tile_images = {"conifers_sapling.png"},
- inventory_image = "conifers_sapling.png",
- wield_image = "conifers_sapling.png",
+ tile_images = {"moretrees_conifer_sapling.png"},
paramtype = "light",
walkable = false,
groups = {
@@ -290,3 +329,18 @@ minetest.register_node(":conifers:sapling", {
sounds = default.node_sound_defaults(),
})
+
+
+-- Backward compatbility with old mods/nodes:
+
+minetest.register_alias("default:jungletree", "moretrees:jungletree_trunk")
+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("conifers:trunk", "moretrees:conifer_trunk")
+minetest.register_alias("conifers:trunk_reversed", "moretrees:conifer_trunk_sideways")
+minetest.register_alias("conifers:leaves", "moretrees:conifer_leaves")
+minetest.register_alias("conifers:leaves_special", "moretrees:conifer_leaves_bright")
+minetest.register_alias("conifers:sapling", "moretrees:conifer_sapling")
+
diff --git a/textures/Thumbs.db b/textures/Thumbs.db
deleted file mode 100644
index cce32de..0000000
--- a/textures/Thumbs.db
+++ /dev/null
Binary files differ
diff --git a/textures/conifers_leaves.png b/textures/moretrees_conifer_leaves.png
index cfaaa1c..cfaaa1c 100644
--- a/textures/conifers_leaves.png
+++ b/textures/moretrees_conifer_leaves.png
Binary files differ
diff --git a/textures/conifers_leaves_special.png b/textures/moretrees_conifer_leaves_bright.png
index c5dca1c..c5dca1c 100644
--- a/textures/conifers_leaves_special.png
+++ b/textures/moretrees_conifer_leaves_bright.png
Binary files differ
diff --git a/textures/conifers_sapling.png b/textures/moretrees_conifer_sapling.png
index bcbed08..bcbed08 100644
--- a/textures/conifers_sapling.png
+++ b/textures/moretrees_conifer_sapling.png
Binary files differ
diff --git a/textures/conifers_trunk.png b/textures/moretrees_conifer_trunk.png
index 6e4e67a..6e4e67a 100644
--- a/textures/conifers_trunk.png
+++ b/textures/moretrees_conifer_trunk.png
Binary files differ
diff --git a/textures/conifers_trunk_reversed.png b/textures/moretrees_conifer_trunk_reversed.png
index 0730e31..0730e31 100644
--- a/textures/conifers_trunk_reversed.png
+++ b/textures/moretrees_conifer_trunk_reversed.png
Binary files differ
diff --git a/textures/conifers_trunktop.png b/textures/moretrees_conifer_trunktop.png
index 4f21401..4f21401 100644
--- a/textures/conifers_trunktop.png
+++ b/textures/moretrees_conifer_trunktop.png
Binary files differ
diff --git a/textures/jungletree_bark.png b/textures/moretrees_jungletree_bark.png
index d826fdd..d826fdd 100644
--- a/textures/jungletree_bark.png
+++ b/textures/moretrees_jungletree_bark.png
Binary files differ
diff --git a/textures/jungletree_leaves_green.png b/textures/moretrees_jungletree_leaves_green.png
index 00f2ddc..00f2ddc 100644
--- a/textures/jungletree_leaves_green.png
+++ b/textures/moretrees_jungletree_leaves_green.png
Binary files differ
diff --git a/textures/jungletree_leaves_red.png b/textures/moretrees_jungletree_leaves_red.png
index 3f3ea19..3f3ea19 100644
--- a/textures/jungletree_leaves_red.png
+++ b/textures/moretrees_jungletree_leaves_red.png
Binary files differ
diff --git a/textures/jungletree_leaves_yellow.png b/textures/moretrees_jungletree_leaves_yellow.png
index 93c7d6a..93c7d6a 100644
--- a/textures/jungletree_leaves_yellow.png
+++ b/textures/moretrees_jungletree_leaves_yellow.png
Binary files differ
diff --git a/textures/jungletree_sapling.png b/textures/moretrees_jungletree_sapling.png
index 1ba0fd1..1ba0fd1 100644
--- a/textures/jungletree_sapling.png
+++ b/textures/moretrees_jungletree_sapling.png
Binary files differ
diff --git a/textures/moretrees_jungletree_wood.png b/textures/moretrees_jungletree_wood.png
new file mode 100644
index 0000000..f0dd5d6
--- /dev/null
+++ b/textures/moretrees_jungletree_wood.png
Binary files differ