From c33ff695c010b211845fb642532eb4a98736d585 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Thu, 7 May 2015 23:44:23 -0700 Subject: Off-by one change. take damge when water <>= damage_limit (and not <>) corn can go down to 5. 0-4 is considered bone dry anyway. --- init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index ea5ae04..fbef295 100644 --- a/init.lua +++ b/init.lua @@ -335,16 +335,16 @@ minetest.register_abm({ meta:set_int("crops_water", water) end - if water < plant.properties.wither_damage then + if water <= plant.properties.wither_damage then crops.particles(pos, 0) damage = damage + math.random(crops.settings.damage_tick_min, crops.settings.damage_tick_max) - elseif water < plant.properties.wither then + elseif water <= plant.properties.wither then crops.particles(pos, 0) return - elseif water > plant.properties.soak_damage then + elseif water >= plant.properties.soak_damage then crops.particles(pos, 1) damage = damage + math.random(crops.settings.damage_tick_min, crops.settings.damage_tick_max) - elseif water > plant.properties.soak then + elseif water >= plant.properties.soak then crops.particles(pos, 1) return end -- cgit v1.2.3