From 3b6c0e5e782b0dc9935e9c9c363475c733bde92a Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 18 Oct 2016 09:33:30 -0700 Subject: Luacheck cleanups and .luacheckrc Use `luacheck .` to run luacheck on this mod. Cleaned up luacheck errors. --- init.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 764db29..537edd9 100644 --- a/init.lua +++ b/init.lua @@ -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 -- cgit v1.2.3