mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-15 23:10:41 +01:00
a bit stricter luacheck and some global leakage fixes
This commit is contained in:
parent
f3fbd1f75d
commit
6525f11a5d
|
@ -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 = {
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user