summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2015-12-13 10:30:17 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2015-12-13 10:30:17 +0000
commit3a25e79efe1203ea6b37e19b337e94662b641561 (patch)
tree12e5496dd2bc0ba9aedbddcdf4cb6bde593f3981
parent0ec560b31a69f70a59256efb99158e47cb03b6a4 (diff)
Fire Flowers spread
-rw-r--r--README.md1
-rw-r--r--flowers.lua28
-rw-r--r--init.lua2
3 files changed, 29 insertions, 2 deletions
diff --git a/README.md b/README.md
index 5e2a6c9..0e1d71c 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ Ethereal v7 Mapgen mod for Minetest
- Dirt with dry grass turns into green grass when near water
- Ice or snow above sea level melts into river water
- Disabling ethereal biomes no longer shows error messages
+- Fire Flowers re-generate, can also be made into Fire Dust
### 1.18
diff --git a/flowers.lua b/flowers.lua
index df3646e..21c6dcc 100644
--- a/flowers.lua
+++ b/flowers.lua
@@ -3,7 +3,7 @@ minetest.register_abm({
nodenames = {"group:flora"},
neighbors = {"group:soil"},
interval = 25,
- chance = 10,
+ chance = 15,
catch_up = false,
action = function(pos, node)
@@ -45,6 +45,32 @@ minetest.register_abm({
return
+ elseif num > 3
+ and node.name == "ethereal:dry_shrub" then
+
+ local grass = minetest.find_nodes_in_area_under_air(
+ pos0, pos1, {"ethereal:dry_shrub"})
+
+ local fflower = minetest.find_nodes_in_area_under_air(
+ pos0, pos1, {"ethereal:fire_flower"})
+
+ if #grass > 4
+ and #fflower < 1 then
+
+ grass = grass[math.random(#grass)]
+
+ grass.y = grass.y - 1
+
+ if minetest.get_node(grass).name == "ethereal:fiery_dirt" then
+
+ grass.y = grass.y + 1
+
+ minetest.set_node(grass, {name = "ethereal:fire_flower"})
+ end
+ end
+
+ return
+
elseif num > 3 then
return
end
diff --git a/init.lua b/init.lua
index 2af7328..8e2c319 100644
--- a/init.lua
+++ b/init.lua
@@ -1,6 +1,6 @@
--[[
- Minetest Ethereal Mod 1.19 (3rd December 2015)
+ Minetest Ethereal Mod 1.19 (13th December 2015)
Created by ChinChow