mirror of
https://github.com/minetest-mods/digilines.git
synced 2024-09-27 22:30:22 +02:00
Fix LuaCheck warnings
This commit is contained in:
parent
edf1f15c31
commit
ab633710ff
15
.luacheckrc
15
.luacheckrc
|
@ -1,12 +1,13 @@
|
||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"vector",
|
"vector",
|
||||||
"screwdriver",
|
"screwdriver",
|
||||||
"minetest",
|
"minetest",
|
||||||
"default",
|
"default",
|
||||||
"pipeworks",
|
"pipeworks",
|
||||||
"dump",
|
"dump",
|
||||||
"VoxelArea",
|
"VoxelArea",
|
||||||
|
"ItemStack",
|
||||||
}
|
}
|
||||||
|
|
||||||
globals = {
|
globals = {
|
||||||
|
|
|
@ -92,7 +92,7 @@ function digilines.transmit(pos, channel, msg, checked)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
checked[checkedID] = true
|
checked[checkedID] = true
|
||||||
|
|
||||||
digilines.vm_begin()
|
digilines.vm_begin()
|
||||||
local queue = queue_new()
|
local queue = queue_new()
|
||||||
queue_enqueue(queue, pos)
|
queue_enqueue(queue, pos)
|
||||||
|
@ -112,9 +112,9 @@ function digilines.transmit(pos, channel, msg, checked)
|
||||||
for _, rule in ipairs(rules) do
|
for _, rule in ipairs(rules) do
|
||||||
local nextPos = digilines.addPosRule(curPos, rule)
|
local nextPos = digilines.addPosRule(curPos, rule)
|
||||||
if digilines.rules_link(curPos, nextPos) then
|
if digilines.rules_link(curPos, nextPos) then
|
||||||
local checkedID = minetest.hash_node_position(nextPos)
|
local checkedID2 = minetest.hash_node_position(nextPos)
|
||||||
if not checked[checkedID] then
|
if not checked[checkedID2] then
|
||||||
checked[checkedID] = true
|
checked[checkedID2] = true
|
||||||
queue_enqueue(queue, nextPos)
|
queue_enqueue(queue, nextPos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -229,7 +229,7 @@ minetest.register_node("digilines:chest", {
|
||||||
last_inventory_take_index = index
|
last_inventory_take_index = index
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
on_metadata_inventory_move = function(pos, _, from_index, _, to_index, count, player)
|
||||||
-- See what would happen if we were to move the items back from in the
|
-- See what would happen if we were to move the items back from in the
|
||||||
-- opposite direction. In the event of a normal move, this must
|
-- opposite direction. In the event of a normal move, this must
|
||||||
-- succeed, because a normal move subtracts some items from the from
|
-- succeed, because a normal move subtracts some items from the from
|
||||||
|
|
11
lcd.lua
11
lcd.lua
|
@ -173,7 +173,7 @@ local prepare_writing = function(pos)
|
||||||
if entity then
|
if entity then
|
||||||
set_texture(entity)
|
set_texture(entity)
|
||||||
rotate_text(pos)
|
rotate_text(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local spawn_entity = function(pos)
|
local spawn_entity = function(pos)
|
||||||
|
@ -225,12 +225,12 @@ minetest.register_node("digilines:lcd", {
|
||||||
end,
|
end,
|
||||||
on_construct = reset_meta,
|
on_construct = reset_meta,
|
||||||
on_destruct = clearscreen,
|
on_destruct = clearscreen,
|
||||||
on_punch = function(pos, node, puncher, pointed_thing)
|
on_punch = function(pos, _, puncher, _)
|
||||||
if minetest.is_player(puncher) then
|
if minetest.is_player(puncher) then
|
||||||
spawn_entity(pos)
|
spawn_entity(pos)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_rotate = function(pos, node, user, mode, new_param2)
|
on_rotate = function(pos, _, _, mode, new_param2)
|
||||||
if mode ~= screwdriver.ROTATE_FACE then
|
if mode ~= screwdriver.ROTATE_FACE then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -273,7 +273,10 @@ minetest.register_craft({
|
||||||
output = "digilines:lcd 2",
|
output = "digilines:lcd 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"},
|
{"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"},
|
||||||
{"mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off"},
|
{"mesecons_lightstone:lightstone_green_off",
|
||||||
|
"mesecons_lightstone:lightstone_green_off",
|
||||||
|
"mesecons_lightstone:lightstone_green_off"},
|
||||||
|
|
||||||
{"default:glass","default:glass","default:glass"}
|
{"default:glass","default:glass","default:glass"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user