diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2016-01-09 12:25:33 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2016-01-09 12:25:33 +0000 |
commit | ad7b63b86971ccae7b1abc008196c9e9553b54ec (patch) | |
tree | 05fe8e2a0ea0e9b8d4939cffaed46e6abb0cf9f4 /mushroom.lua | |
parent | 94873618b17859a6f3cc9c3a02dcc88b511075cf (diff) |
Optimize and tidy code.
Diffstat (limited to 'mushroom.lua')
-rw-r--r-- | mushroom.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mushroom.lua b/mushroom.lua index 5485c07..39e14d2 100644 --- a/mushroom.lua +++ b/mushroom.lua @@ -51,8 +51,6 @@ minetest.register_node(":flowers:mushroom_brown", { }
})
-end
-
-- mushroom spread and death
minetest.register_abm({
nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"},
@@ -89,13 +87,15 @@ minetest.register_abm({ end
if minetest.get_item_group(node_under.name, "soil") ~= 0
- and minetest.get_node_light(pos, nil) < 13
- and minetest.get_node_light(random, nil) < 13 then
- minetest.set_node(random, {name = node.name})
+ and minetest.get_node_light(pos, nil) < 9
+ and minetest.get_node_light(random, nil) < 9 then
+ minetest.swap_node(random, {name = node.name})
end
end
})
+end
+
-- these old mushroom related nodes can be simplified now
minetest.register_alias("flowers:mushroom_spores_brown", "flowers:mushroom_brown")
minetest.register_alias("flowers:mushroom_spores_red", "flowers:mushroom_red")
|