Run luacheck and fix the warnings.

This commit is contained in:
Tim 2016-08-06 00:00:06 +02:00
parent 0b85ec0911
commit a2b7ebc6f2
6 changed files with 14 additions and 8 deletions

9
.luacheckrc Normal file
View File

@ -0,0 +1,9 @@
unused_args = false
allow_defined_top = true
read_globals = {
"minetest",
"vector", "ItemStack",
"default",
"stairs", "doors", "xpanes",
}

View File

@ -504,9 +504,9 @@ function realchess.move(pos, from_list, from_index, to_list, to_index, _, player
meta:set_string("playerWhite", playerWhite) meta:set_string("playerWhite", playerWhite)
meta:set_string("playerBlack", playerBlack) meta:set_string("playerBlack", playerBlack)
meta:set_string("lastMove", thisMove) lastMove = thisMove
meta:set_string("lastMove", lastMove)
meta:set_int("lastMoveTime", minetest.get_gametime()) meta:set_int("lastMoveTime", minetest.get_gametime())
local lastMove = meta:get_string("lastMove")
if lastMove == "black" then if lastMove == "black" then
minetest.chat_send_player(playerWhite, "["..os.date("%H:%M:%S").."] ".. minetest.chat_send_player(playerWhite, "["..os.date("%H:%M:%S").."] "..

View File

@ -127,7 +127,6 @@ function enchanting.destruct(pos)
end end
function enchanting.timer(pos) function enchanting.timer(pos)
local node = minetest.get_node(pos)
local num = #minetest.get_objects_inside_radius(pos, 0.9) local num = #minetest.get_objects_inside_radius(pos, 0.9)
if num == 0 then if num == 0 then

View File

@ -354,7 +354,6 @@ xdecor.register("painting_1", {
inventory_image = "xdecor_painting_empty.png", inventory_image = "xdecor_painting_empty.png",
wield_image = "xdecor_painting_empty.png", wield_image = "xdecor_painting_empty.png",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
wield_image = "xdecor_painting_empty.png",
sunlight_propagates = true, sunlight_propagates = true,
groups = {choppy=3, oddly_breakable_by_hand=2, flammable=2, attached_node=1}, groups = {choppy=3, oddly_breakable_by_hand=2, flammable=2, attached_node=1},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),

View File

@ -9,9 +9,7 @@ end)
function rope.place(itemstack, placer, pointed_thing) function rope.place(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then if pointed_thing.type == "node" then
local under = pointed_thing.under local pos = pointed_thing.above
local above = pointed_thing.above
local pos = above
local oldnode = minetest.get_node(pos) local oldnode = minetest.get_node(pos)
local stackname = itemstack:get_name() local stackname = itemstack:get_name()
if minetest.is_protected(pos, placer:get_player_name()) then return end if minetest.is_protected(pos, placer:get_player_name()) then return end

View File

@ -229,7 +229,8 @@ for i = 1, #nodes do
local def = minetest.registered_nodes[node] local def = minetest.registered_nodes[node]
if d[3] then if d[3] then
local groups, tiles = {}, {} local groups = {}
local tiles
groups.not_in_creative_inventory = 1 groups.not_in_creative_inventory = 1
for k, v in pairs(def.groups) do for k, v in pairs(def.groups) do