From 2e90959a6c4116a99fca6915dcc7f3ccecaf4763 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 9 Mar 2022 09:19:43 +0000 Subject: [PATCH 1/2] lower refill time, add player check (thx BuckarooBanzai) --- init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index fddbc59..87aa48d 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20211204", + version = "20220309", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -407,6 +407,8 @@ end -- refill placed plant by crabman (26/08/2015) updated by TenPlus1 function farming.refill_plant(player, plantname, index) + if not player then return end + local inv = player:get_inventory() local old_stack = inv:get_stack("main", index) @@ -493,7 +495,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname) -- check for refill if itemstack:get_count() == 0 then - minetest.after(0.10, + minetest.after(0.2, farming.refill_plant, placer, name, From 0b06c7cd450c5ec9a76b3c22a9c57f06e4f8a7c2 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 13 Mar 2022 19:54:58 +0000 Subject: [PATCH 2/2] add sound to hemp block --- crops/hemp.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crops/hemp.lua b/crops/hemp.lua index 4cc05e5..c63487a 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -101,7 +101,8 @@ minetest.register_node("farming:hemp_block", { description = S("Hemp Block"), tiles = {"farming_hemp_block.png"}, paramtype = "light", - groups = {snappy = 1, oddly_breakable_by_hand = 1, flammable = 2} + groups = {snappy = 1, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_leaves_defaults() }) minetest.register_craft( {