diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2015-08-29 09:27:01 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2015-08-29 09:27:01 +0100 |
commit | a14fc6f3ad0a802dd7e6da71da06cba37a9fb23b (patch) | |
tree | 06624947532176c73b9149be33033b4e76a7824d /cocoa.lua | |
parent | e6babd6486730a0341ea3bde31c80ed920c2328c (diff) |
Added auto-refill routine and fixed a few bugs
Diffstat (limited to 'cocoa.lua')
-rw-r--r-- | cocoa.lua | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -25,6 +25,15 @@ function place_cocoa(itemstack, placer, pointed_thing, plantname) minetest.add_node(pt.above, {name = plantname}) if not minetest.setting_getbool("creative_mode") then itemstack:take_item() + -- check for refill + if itemstack:get_count() == 0 then + minetest.after(0.20, + farming.refill_plant, + placer, + "farming:cocoa_beans", + placer:get_wield_index() + ) + end -- END refill end return itemstack end |