summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorAuke Kok <sofar@foo-projects.org>2016-10-18 09:33:30 -0700
committerAuke Kok <sofar@foo-projects.org>2016-10-18 09:33:30 -0700
commit3b6c0e5e782b0dc9935e9c9c363475c733bde92a (patch)
tree06dc292b19da6f6d64311dd0b1e2901c8ac8f37f /init.lua
parente6421d8d495c4415eeae80c7b1a2ce20d55e443d (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.lua7
1 files changed, 3 insertions, 4 deletions
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