diff options
author | Auke Kok <sofar@foo-projects.org> | 2016-10-18 09:33:30 -0700 |
---|---|---|
committer | Auke Kok <sofar@foo-projects.org> | 2016-10-18 09:33:30 -0700 |
commit | 3b6c0e5e782b0dc9935e9c9c363475c733bde92a (patch) | |
tree | 06dc292b19da6f6d64311dd0b1e2901c8ac8f37f /init.lua | |
parent | e6421d8d495c4415eeae80c7b1a2ce20d55e443d (diff) |
Luacheck cleanups and .luacheckrc
Use `luacheck .` to run luacheck on this mod.
Cleaned up luacheck errors.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -159,7 +159,6 @@ crops.can_grow = function(pos) end crops.particles = function(pos, flag) - local p = {} if flag == 0 then -- wither (0) minetest.add_particlespawner({ @@ -337,7 +336,7 @@ if crops.settings.hydration then if not f == nil then water = math.min(100, water + 2) else - local f = minetest.find_node_near(pos, 2, {"default:water_source", "default:water_flowing"}) + f = minetest.find_node_near(pos, 2, {"default:water_source", "default:water_flowing"}) if not f == nil then water = math.min(100, water + 1) end @@ -356,8 +355,8 @@ if crops.settings.hydration then -- for convenience, copy water attribute to top half if not plant.properties.doublesize == nil and plant.properties.doublesize then local above = { x = pos.x, y = pos.y + 1, z = pos.z} - local meta = minetest.get_meta(above) - meta:set_int("crops_water", water) + local abovemeta = minetest.get_meta(above) + abovemeta:set_int("crops_water", water) end if water <= plant.properties.wither_damage then |