Fix some warnings.
authorDiego Martínez <kaeza@users.noreply.github.com>
Sun, 5 Mar 2017 07:50:25 +0000 (04:50 -0300)
committerparamat <mat.gregory@virginmedia.com>
Sun, 5 Mar 2017 09:27:53 +0000 (09:27 +0000)
Also fixes the failing travis checks.

.luacheckrc
mods/screwdriver/init.lua
mods/tnt/init.lua

index 52b25132fd5516c4eacd66d599acfa5fd946f6a6..6f4fdd2cbf8a3046c500c24b6cc01088a1bbd07e 100644 (file)
@@ -8,6 +8,8 @@ read_globals = {
        "vector",
        "VoxelManip", "VoxelArea",
        "PseudoRandom", "ItemStack",
+       -- Silence "accessing undefined field copy of global table".
+       table = { fields = { "copy" } }
 }
 
 -- Overwrites minetest.handle_node_drops
index e73b618fb8c37ac6d02f00101632480e1d8d8e0a..d898cb9f038608f4ddac7a70599d4d302d324a39 100644 (file)
@@ -52,7 +52,8 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses)
        local new_param2 = preservePart + rotationPart
        local should_rotate = true
 
-       if ndef and ndef.on_rotate then -- Node provides a handler, so let the handler decide instead if the node can be rotated
+       -- Node provides a handler, so let the handler decide instead if the node can be rotated
+       if ndef and ndef.on_rotate then
                -- Copy pos and node because callback can modify it
                local result = ndef.on_rotate(vector.new(pos),
                                {name = node.name, param1 = node.param1, param2 = node.param2},
index 5d1de604cbdb535236a5b34266cfd96a61a09c4f..5a405566db3849e8824c4af3131c3e623e3ef470 100644 (file)
@@ -399,7 +399,12 @@ minetest.register_node("tnt:gunpowder", {
        is_ground_content = false,
        sunlight_propagates = true,
        walkable = false,
-       tiles = {"tnt_gunpowder_straight.png", "tnt_gunpowder_curved.png", "tnt_gunpowder_t_junction.png", "tnt_gunpowder_crossing.png"},
+       tiles = {
+               "tnt_gunpowder_straight.png",
+               "tnt_gunpowder_curved.png",
+               "tnt_gunpowder_t_junction.png",
+               "tnt_gunpowder_crossing.png"
+       },
        inventory_image = "tnt_gunpowder_inventory.png",
        wield_image = "tnt_gunpowder_inventory.png",
        selection_box = {
@@ -476,7 +481,11 @@ minetest.register_node("tnt:gunpowder_burning", {
                fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
        },
        drop = "",
-       groups = {dig_immediate = 2, attached_node = 1, connect_to_raillike = minetest.raillike_group("gunpowder")},
+       groups = {
+               dig_immediate = 2,
+               attached_node = 1,
+               connect_to_raillike = minetest.raillike_group("gunpowder")
+       },
        sounds = default.node_sound_leaves_defaults(),
        on_timer = function(pos, elapsed)
                for dx = -1, 1 do