mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2025-06-29 23:10:39 +02:00
Various code fixes detected by luacheck
* Luablock: Fix the missing position argument when executing the lua code fails * Wireless: Fix the missing id argument * Localize several variables * Some other small changes, e.g. dead code removal
This commit is contained in:
committed by
Pierre-Adrien Langrognet
parent
28292dc2a5
commit
c41d0371c0
@ -186,10 +186,10 @@ function wireless_receptor_off(pos, id, network, check)
|
||||
end
|
||||
end
|
||||
|
||||
function activate_network(owner, channel)
|
||||
local function activate_network(owner, channel)
|
||||
local network = wireless[owner][channel]
|
||||
for _, wl_pos in pairs(network.members) do
|
||||
wireless_receptor_on(wl_pos, id, network)
|
||||
for i, wl_pos in pairs(network.members) do
|
||||
wireless_receptor_on(wl_pos, i, network)
|
||||
end
|
||||
end
|
||||
|
||||
@ -300,7 +300,6 @@ mesecon.register_node("moremesecons_wireless:wireless", {
|
||||
mesecon.receptor_off(pos)
|
||||
end,
|
||||
after_place_node = function(pos, placer)
|
||||
local placername = placer:get_player_name()
|
||||
set_owner(pos, placer:get_player_name())
|
||||
end,
|
||||
on_receive_fields = function(pos, _, fields, player)
|
||||
|
Reference in New Issue
Block a user