From 45c8184ebea17abe0675b3ae3a406a804fe79b1c Mon Sep 17 00:00:00 2001 From: ademant Date: Wed, 9 Jan 2019 11:50:02 +0100 Subject: [PATCH] abm also set plant on grass area --- abm.lua | 4 +++- settingtypes.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/abm.lua b/abm.lua index 25d552d..3f3db7c 100644 --- a/abm.lua +++ b/abm.lua @@ -98,7 +98,9 @@ minetest.register_abm({ local ptabove={x=pos.x,y=pos.y+1,z=pos.z} local above = minetest.get_node(ptabove) if above.name ~= "air" then - return + if (minetest.get_item_group(above.name, "grass")==0) or (minetest.get_item_group(above.name, "dry_grass")==0) then + return + end end local ptlight=minetest.get_node_light(ptabove) if ptlight < farming.min_light then diff --git a/settingtypes.txt b/settingtypes.txt index 6f69994..767cf85 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -3,7 +3,7 @@ farming.viscosity (Viscosity of walking through grain) int 1 1 10 farming.wait_min (Minimum waiting time for next growing step) int 60 5 500 farming.wait_max (Maximum waiting time for next growing step) int 70 6 510 farming.wilt_removal_time (Mean time to remove wilt crops) int 120 5 500 -farming.wilt_time (Mean time for fullgrown crop to wilt) int 1200 5 5000 +farming.wilt_time (Mean time for fullgrown crop to wilt) int 6400 5 5000 farming.min_light (Min light needed for crops to grow) int 10 1 14 farming.health_threshold (healthiness threshold) int 50 1 100 farming.factor_regrow (factor for regrow after punching) float 2