Correct (almost) all luacheck warnings

Also includes a few code opimizations:
- Combined mining drill functions
- Shorter alias registration (unused?)
- Add TODOs to address later
This commit is contained in:
SmallJoker
2022-06-06 21:04:13 +02:00
parent 0211c582e9
commit 0f6bdb1bde
22 changed files with 260 additions and 250 deletions

View File

@ -36,7 +36,10 @@ function technic.register_can(d)
local charge = get_can_level(itemstack)
if charge == data.can_capacity then return end
if minetest.is_protected(pointed_thing.under, user:get_player_name()) then
minetest.log("action", user:get_player_name().." tried to take "..node.name.." at protected position "..minetest.pos_to_string(pointed_thing.under).." with a "..data.can_name)
minetest.log("action", user:get_player_name()..
" tried to take "..node.name..
" at protected position "..minetest.pos_to_string(pointed_thing.under)..
" with a "..data.can_name)
return
end
minetest.remove_node(pointed_thing.under)
@ -63,7 +66,10 @@ function technic.register_can(d)
local charge = get_can_level(itemstack)
if charge == 0 then return end
if minetest.is_protected(pos, user:get_player_name()) then
minetest.log("action", user:get_player_name().." tried to place "..data.liquid_source_name.." at protected position "..minetest.pos_to_string(pos).." with a "..data.can_name)
minetest.log("action", user:get_player_name()..
" tried to place "..data.liquid_source_name..
" at protected position "..minetest.pos_to_string(pos)..
" with a "..data.can_name)
return
end
minetest.set_node(pos, {name=data.liquid_source_name})