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. --- tools.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tools.lua') diff --git a/tools.lua b/tools.lua index c406223..cb80788 100644 --- a/tools.lua +++ b/tools.lua @@ -31,19 +31,19 @@ minetest.register_tool("crops:watering_can", { if minetest.get_item_group(minetest.get_node(pos).name, "water") >= 3 then if wear ~= 1 then minetest.sound_play("crops_watercan_entering", {pos=pos, gain=0.8}) - minetest.after(math.random()/2, function(pos) + minetest.after(math.random()/2, function(p) if math.random(2) == 1 then - minetest.sound_play("crops_watercan_splash_quiet", {pos=pos, gain=0.1}) + minetest.sound_play("crops_watercan_splash_quiet", {pos=p, gain=0.1}) end if math.random(3) == 1 then - minetest.after(math.random()/2, function(pos) - minetest.sound_play("crops_watercan_splash_small", {pos=pos, gain=0.7}) - end, pos) + minetest.after(math.random()/2, function(pp) + minetest.sound_play("crops_watercan_splash_small", {pos=pp, gain=0.7}) + end, p) end if math.random(3) == 1 then - minetest.after(math.random()/2, function(pos) - minetest.sound_play("crops_watercan_splash_big", {pos=pos, gain=0.7}) - end, pos) + minetest.after(math.random()/2, function(pp) + minetest.sound_play("crops_watercan_splash_big", {pos=pp, gain=0.7}) + end, p) end end, pos) itemstack:set_wear(1) -- cgit v1.2.3