diff --git a/.luacheckrc b/.luacheckrc index 350fb8c..4891133 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,10 +1,8 @@ unused_args = false -allow_defined_top = true max_line_length = 999 globals = { - "technic", "minetest", - "srcstack", + "technic", "technic_cnc", "minetest", "wrench" } read_globals = { diff --git a/extranodes/init.lua b/extranodes/init.lua index 42c7d67..55b4e8b 100644 --- a/extranodes/init.lua +++ b/extranodes/init.lua @@ -57,7 +57,7 @@ if minetest.get_modpath("moreblocks") then tiles={"technic_stainless_steel_block.png"}, }) - function register_technic_stairs_alias(modname, origname, newmod, newname) + local function register_technic_stairs_alias(modname, origname, newmod, newname) minetest.register_alias(modname .. ":slab_" .. origname, newmod..":slab_" .. newname) minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", newmod..":slab_" .. newname .. "_inverted") minetest.register_alias(modname .. ":slab_" .. origname .. "_wall", newmod..":slab_" .. newname .. "_wall") diff --git a/technic/machines/MV/lighting.lua b/technic/machines/MV/lighting.lua index f7c9124..9a8d369 100644 --- a/technic/machines/MV/lighting.lua +++ b/technic/machines/MV/lighting.lua @@ -12,7 +12,7 @@ else S = function (s) return s end end -function technic_homedecor_node_is_owned(pos, placer) +local function technic_homedecor_node_is_owned(pos, placer) local ownername = false if type(isprotect) == "function" then -- glomie's protection mod if not isprotect(5, pos, placer) then diff --git a/technic_cnc/cnc.lua b/technic_cnc/cnc.lua index cb81bd4..eb158aa 100644 --- a/technic_cnc/cnc.lua +++ b/technic_cnc/cnc.lua @@ -236,7 +236,7 @@ local run = function(pos, node) meta:set_int("src_time", meta:get_int("src_time") + 1) if meta:get_int("src_time") >= 3 then -- 3 ticks per output meta:set_int("src_time", 0) - srcstack = inv:get_stack("src", 1) + local srcstack = inv:get_stack("src", 1) srcstack:take_item() inv:set_stack("src", 1, srcstack) inv:add_item("dst", result.." "..meta:get_int("cnc_multiplier"))