diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2015-05-07 23:44:23 -0700 |
---|---|---|
committer | Auke Kok <auke-jan.h.kok@intel.com> | 2015-05-07 23:44:23 -0700 |
commit | c33ff695c010b211845fb642532eb4a98736d585 (patch) | |
tree | 67cf5fd5df863686e5cca449c0121dc8455112e6 | |
parent | 68f0acc354eb53798c70e4c41ea3afc89c2f21a8 (diff) |
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.
-rw-r--r-- | corn.lua | 2 | ||||
-rw-r--r-- | init.lua | 8 |
2 files changed, 5 insertions, 5 deletions
@@ -332,7 +332,7 @@ local properties = { soak = 60, soak_damage = 75, wither = 10, - wither_damage = 1, + wither_damage = 5, doublesize = true, } @@ -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 |