From 56c3a4d750455cf304effeeeb262594fd2becac0 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 8 Jan 2017 00:50:33 +0100 Subject: [PATCH] Remove flora ABM --- mods/flowers/init.lua | 48 ------------------------------------------- 1 file changed, 48 deletions(-) diff --git a/mods/flowers/init.lua b/mods/flowers/init.lua index cd48bf42..96344ddd 100644 --- a/mods/flowers/init.lua +++ b/mods/flowers/init.lua @@ -276,54 +276,6 @@ function register_large(name, desc, inv_img, bot_img, colr) --change in function end - ------------------------------ ---- Generation terrin ---- ------------------------------ - -minetest.register_abm({ - nodenames = {"group:flora"}, - neighbors = {"default:dirt_with_grass", "default:sand"}, - interval = 40, - chance = 20, - action = function(pos, node) - pos.y = pos.y - 1 - local under = minetest.get_node(pos) - pos.y = pos.y + 1 - if under.name == "default:sand" then - minetest.set_node(pos, {name="default:dry_shrub"}) - elseif under.name ~= "default:sand" then - return - end - - local light = minetest.get_node_light(pos) - if not light or light < 10 then - return - end - - local pos0 = {x=pos.x-4,y=pos.y-4,z=pos.z-4} - local pos1 = {x=pos.x+4,y=pos.y+4,z=pos.z+4} - - local flowers = minetest.find_nodes_in_area(pos0, pos1, "group:flora") - if #flowers > 3 then - return - end - - local seedling = minetest.find_nodes_in_area(pos0, pos1, "default:dirt_with_grass") - if #seedling > 0 then - seedling = seedling[math.random(#seedling)] - seedling.y = seedling.y + 1 - light = minetest.get_node_light(seedling) - if not light or light < 13 then - return - end - if minetest.get_node(seedling).name == "air" then - minetest.set_node(seedling, {name=node.name}) - end - end - end, -}) - -- -- Flower Pot --