diff options
-rw-r--r-- | bonemeal.lua | 8 | ||||
-rw-r--r-- | dirt.lua | 6 | ||||
-rw-r--r-- | extra.lua | 16 | ||||
-rw-r--r-- | flowers.lua | 1 | ||||
-rw-r--r-- | init.lua | 2 |
5 files changed, 18 insertions, 15 deletions
diff --git a/bonemeal.lua b/bonemeal.lua index 4f7979b..b1a0174 100644 --- a/bonemeal.lua +++ b/bonemeal.lua @@ -170,14 +170,14 @@ local function growth(pointed_thing) local stage = ""
-- grow registered crops
- for _, row in pairs(crops) do
+ for n = 1, #crops do
- if string.find(node.name, row[1]) then
+ if string.find(node.name, crops[n][1]) then
stage = tonumber( node.name:split("_")[2] )
- stage = math.min(stage + math.random(1, 4), row[2])
+ stage = math.min(stage + math.random(1, 4), crops[n][2])
- minetest.set_node(pos, {name = row[1] .. stage})
+ minetest.set_node(pos, {name = crops[n][1] .. stage})
return
@@ -108,13 +108,13 @@ minetest.register_abm({ "group:ethereal_grass") -- count new grass nodes - for _,p in pairs(dirts) do + for n = 1, #dirts do - num = grasses[p] or 0 + num = grasses[dirts[n]] or 0 if num > curr_max then curr_max = num - curr_type = p + curr_type = dirts[n] end end @@ -41,20 +41,22 @@ minetest.register_craft({ }) -- X pattern craft recipes (5x 'a' in X pattern gives 5 of 'b') -for _,items in pairs({ +local cheat = { {"default:cobble", "default:gravel"}, {"default:gravel", "default:dirt"}, {"default:dirt", "default:sand"}, {"default:ice", "default:snow"}, {"ethereal:dry_dirt", "default:desert_sand"}, -}) do - local a, b = unpack(items) +} + +for n = 1, #cheat do + minetest.register_craft({ - output = b.." 5", + output = cheat[n][2] .. " 5", recipe = { - {a, "", a}, - {"", a, ""}, - {a, "", a}, + {cheat[n][1], "", cheat[n][1]}, + {"", cheat[n][1], ""}, + {cheat[n][1], "", cheat[n][1]}, } }) end diff --git a/flowers.lua b/flowers.lua index eb58102..79672e6 100644 --- a/flowers.lua +++ b/flowers.lua @@ -1,3 +1,4 @@ + -- Flowers spread over all types of soil minetest.register_abm({ nodenames = {"group:flora"}, @@ -1,6 +1,6 @@ --[[
- Minetest Ethereal Mod (17th May 2016)
+ Minetest Ethereal Mod (5th June 2016)
Created by ChinChow
|