summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-07-14 04:27:21 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-07-19 15:37:42 -0400
commit767d3e5ef703f5fff975a4e1138dc25bee85d33e (patch)
tree6da4b143f31d796594b36b30efb94f48e7a8a3cd
parent5048d4e894e40608a318fad88ee1cf8a79150b46 (diff)
use enable_unique_ids on all tree nodes (but not saplings)origin/unique_ids
remove long-dead paramtype2="waving" entries (it's just node def entry, waving=1 now) misc whitespace fixes
-rw-r--r--init.lua8
-rw-r--r--node_defs.lua75
-rw-r--r--tree_models.lua39
3 files changed, 70 insertions, 52 deletions
diff --git a/init.lua b/init.lua
index 9c36883..5c726f2 100644
--- a/init.lua
+++ b/init.lua
@@ -239,6 +239,8 @@ function moretrees:grow_jungletree(pos)
moretrees.jungletree_model.rules_b = moretrees.jt_rules_b2
end
+ moretrees.jungletree_model.enable_unique_ids = true
+
minetest.remove_node(pos)
local leaves = minetest.find_nodes_in_area({x = pos.x-1, y = pos.y, z = pos.z-1}, {x = pos.x+1, y = pos.y+10, z = pos.z+1}, "default:leaves")
for leaf in ipairs(leaves) do
@@ -263,6 +265,7 @@ function moretrees:grow_fir(pos)
moretrees.fir_model.rules_b = moretrees.ct_rules_b2
end
+ moretrees.fir_model.enable_unique_ids = true
moretrees.fir_model.iterations = 7
moretrees.fir_model.random_level = 5
@@ -290,6 +293,7 @@ function moretrees:grow_fir_snow(pos)
moretrees.fir_model.rules_b = moretrees.ct_rules_b2
end
+ moretrees.fir_model.enable_unique_ids = true
moretrees.fir_model.iterations = 2
moretrees.fir_model.random_level = 2
@@ -301,4 +305,8 @@ function moretrees:grow_fir_snow(pos)
minetest.spawn_tree(pos,moretrees.fir_model)
end
+minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
+ print(dump(node.name)..": param1 = "..dump(node.param1)..", param2 = "..dump(node.param2))
+end)
+
print(S("[Moretrees] Loaded (2013-02-11)"))
diff --git a/node_defs.lua b/node_defs.lua
index c5ad566..4c0c063 100644
--- a/node_defs.lua
+++ b/node_defs.lua
@@ -106,7 +106,6 @@ for i in ipairs(moretrees.treelist) do
tiles = {"moretrees_"..treename.."_sapling.png"},
inventory_image = "moretrees_"..treename.."_sapling.png",
paramtype = "light",
- paramtype2 = "waving",
walkable = false,
selection_box = {
type = "fixed",
@@ -122,7 +121,6 @@ for i in ipairs(moretrees.treelist) do
tiles = {"moretrees_"..treename.."_sapling.png"},
inventory_image = "moretrees_"..treename.."_sapling.png",
paramtype = "light",
- paramtype2 = "waving",
walkable = false,
selection_box = {
type = "fixed",
@@ -215,9 +213,8 @@ for i in ipairs(moretrees.treelist) do
inventory_image = "moretrees_"..fruit..".png^[transformR180",
wield_image = "moretrees_"..fruit..".png^[transformR180",
visual_scale = vscale,
- paramtype = "light",
- sunlight_propagates = true,
walkable = false,
+ paramtype = "light",
selection_box = {
type = "fixed",
fixed = selbox
@@ -241,47 +238,45 @@ for i in ipairs(moretrees.treelist) do
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_trunk")
if moretrees.spawn_saplings then
- table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling")
- table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling_ongen")
+ table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling")
+ table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling_ongen")
end
end
-- Extra nodes for jungle trees:
minetest.register_node("moretrees:jungletree_sapling", {
- description = S("Jungle Sapling"),
- drawtype = "plantlike",
- visual_scale = 1.0,
- tiles = {"default_junglesapling.png"},
- inventory_image = "default_junglesapling.png",
- wield_image = "default_junglesapling.png",
- paramtype = "light",
- paramtype2 = "waving",
- 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,sapling=1},
- sounds = default.node_sound_leaves_defaults(),
+ description = S("Jungle Sapling"),
+ drawtype = "plantlike",
+ visual_scale = 1.0,
+ tiles = {"default_junglesapling.png"},
+ inventory_image = "default_junglesapling.png",
+ wield_image = "default_junglesapling.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,sapling=1},
+ sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("moretrees:jungletree_sapling_ongen", {
- description = S("Jungle Sapling"),
- drawtype = "plantlike",
- visual_scale = 1.0,
- tiles = {"default_junglesapling.png"},
- inventory_image = "default_junglesapling.png",
- wield_image = "default_junglesapling.png",
- paramtype = "light",
- paramtype2 = "waving",
- 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,not_in_creative_inventory=1,sapling=1},
- sounds = default.node_sound_leaves_defaults(),
+ description = S("Jungle Sapling"),
+ drawtype = "plantlike",
+ visual_scale = 1.0,
+ tiles = {"default_junglesapling.png"},
+ inventory_image = "default_junglesapling.png",
+ wield_image = "default_junglesapling.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,not_in_creative_inventory=1,sapling=1},
+ sounds = default.node_sound_leaves_defaults(),
drop = "moretrees:jungletree_sapling"
})
@@ -357,10 +352,10 @@ table.insert(moretrees.avoidnodes, "moretrees:fir_trunk")
table.insert(moretrees.avoidnodes, "default:tree")
if moretrees.spawn_saplings then
- table.insert(moretrees.avoidnodes, "snow:sapling_pine")
- table.insert(moretrees.avoidnodes, "default:junglesapling")
- table.insert(moretrees.avoidnodes, "moretrees:jungle_tree_sapling")
- table.insert(moretrees.avoidnodes, "moretrees:jungle_tree_sapling_ongen")
+ table.insert(moretrees.avoidnodes, "snow:sapling_pine")
+ table.insert(moretrees.avoidnodes, "default:junglesapling")
+ table.insert(moretrees.avoidnodes, "moretrees:jungle_tree_sapling")
+ table.insert(moretrees.avoidnodes, "moretrees:jungle_tree_sapling_ongen")
end
-- "empty" (tapped) rubber tree nodes
diff --git a/tree_models.lua b/tree_models.lua
index f1cf5a5..7b8b26a 100644
--- a/tree_models.lua
+++ b/tree_models.lua
@@ -10,7 +10,8 @@ moretrees.beech_model={
iterations=2,
random_level=0,
trunk_type="single",
- thin_branches=true
+ thin_branches=true,
+ enable_unique_ids = true,
}
moretrees.apple_tree_model={
@@ -26,6 +27,7 @@ moretrees.apple_tree_model={
thin_branches=true,
fruit="default:apple",
fruit_chance=15,
+ enable_unique_ids = true,
}
moretrees.oak_model={
@@ -41,6 +43,7 @@ moretrees.oak_model={
thin_branches=false,
fruit="moretrees:acorn",
fruit_chance=3,
+ enable_unique_ids = true,
}
moretrees.sequoia_model={
@@ -55,7 +58,8 @@ moretrees.sequoia_model={
iterations=2,
random_level=0,
trunk_type="crossed",
- thin_branches=true
+ thin_branches=true,
+ enable_unique_ids = true,
}
moretrees.birch_model1={
@@ -70,7 +74,8 @@ moretrees.birch_model1={
iterations=2,
random_level=0,
trunk_type="single",
- thin_branches=true
+ thin_branches=true,
+ enable_unique_ids = true,
}
moretrees.birch_model2={
@@ -85,7 +90,8 @@ moretrees.birch_model2={
iterations=2,
random_level=0,
trunk_type="single",
- thin_branches=true
+ thin_branches=true,
+ enable_unique_ids = true,
}
moretrees.palm_model={
@@ -102,7 +108,8 @@ moretrees.palm_model={
trunk_type="single",
thin_branches=true,
fruit="moretrees:coconut",
- fruit_chance=0
+ fruit_chance=0,
+ enable_unique_ids = true,
}
moretrees.spruce_model1={
@@ -119,7 +126,8 @@ moretrees.spruce_model1={
trunk_type="crossed",
thin_branches=true,
fruit="moretrees:spruce_cone",
- fruit_chance=8
+ fruit_chance=8,
+ enable_unique_ids = true,
}
moretrees.spruce_model2={
@@ -135,7 +143,8 @@ moretrees.spruce_model2={
trunk_type="crossed",
thin_branches=true,
fruit="moretrees:spruce_cone",
- fruit_chance=8
+ fruit_chance=8,
+ enable_unique_ids = true,
}
moretrees.pine_model={
@@ -152,7 +161,8 @@ moretrees.pine_model={
trunk_type="single",
thin_branches=true,
fruit="moretrees:pine_cone",
- fruit_chance=8
+ fruit_chance=8,
+ enable_unique_ids = true,
}
moretrees.willow_model={
@@ -166,7 +176,8 @@ moretrees.willow_model={
iterations=2,
random_level=0,
trunk_type="crossed",
- thin_branches=true
+ thin_branches=true,
+ enable_unique_ids = true,
}
moretrees.acacia_model={
@@ -198,6 +209,7 @@ moretrees.acacia_model={
random_level=0,
trunk_type="single",
thin_branches=true,
+ enable_unique_ids = true,
}
moretrees.rubber_tree_model={
@@ -210,7 +222,8 @@ moretrees.rubber_tree_model={
iterations=3,
random_level=1,
trunk_type="double",
- thin_branches=true
+ thin_branches=true,
+ enable_unique_ids = true,
}
moretrees.jungletree_model={
@@ -227,7 +240,8 @@ moretrees.jungletree_model={
trunk_type=nil,
thin_branches=true,
fruit_chance=15,
- fruit="vines:vine"
+ fruit="vines:vine",
+ enable_unique_ids = true,
}
moretrees.fir_model={
@@ -242,5 +256,6 @@ moretrees.fir_model={
trunk_type="single",
thin_branches=true,
fruit="moretrees:fir_cone",
- fruit_chance=8
+ fruit_chance=8,
+ enable_unique_ids = true,
}