From 99a729e48837d01eb105ff0fdc4e28a7b531736c Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Fri, 1 Feb 2019 17:58:40 +0000 Subject: [PATCH] fix scythe harvest of beanpoles and grapes --- crops/beans.lua | 2 +- crops/grapes.lua | 2 +- hoes.lua | 18 +++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/crops/beans.lua b/crops/beans.lua index a75030a..bd3b8ee 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -191,7 +191,7 @@ local crop_def = { selection_box = farming.select, groups = { snappy = 3, flammable = 3, not_in_creative_inventory = 1, - attached_node = 1, growing = 1 + attached_node = 1, growing = 1, plant = 1 }, sounds = default.node_sound_leaves_defaults() } diff --git a/crops/grapes.lua b/crops/grapes.lua index c341075..2b33427 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -186,7 +186,7 @@ local crop_def = { selection_box = farming.select, groups = { snappy = 3, flammable = 3, not_in_creative_inventory = 1, - attached_node = 1, growing = 1 + attached_node = 1, growing = 1, plant = 1 }, sounds = default.node_sound_leaves_defaults() } diff --git a/hoes.lua b/hoes.lua index 6b38de2..bd440a5 100644 --- a/hoes.lua +++ b/hoes.lua @@ -402,15 +402,19 @@ minetest.register_tool("farming:scythe_mithril", { -- add dropped items for _, dropped_item in pairs(drops) do - local obj = minetest.add_item(pos, dropped_item) + if dropped_item ~= "farming:trellis" + and dropped_item ~= "farming:beanpole" then - if obj then + local obj = minetest.add_item(pos, dropped_item) - obj:set_velocity({ - x = math.random(-10, 10) / 9, - y = 3, - z = math.random(-10, 10) / 9, - }) + if obj then + + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 3, + z = math.random(-10, 10) / 9, + }) + end end end