fix luacheck warnings

This commit is contained in:
wsor 2020-12-05 14:23:43 -05:00
parent 932e12410a
commit a5fd28affd

View File

@ -35,9 +35,12 @@ minetest.register_chatcommand("mapfix", {
previous = time
end
minetest.log("action", name .. " uses mapfix at " .. minetest.pos_to_string(vector.round(pos)) .. " with radius " .. size)
minetest.log("action",
name .. " uses mapfix at " .. minetest.pos_to_string(vector.round(pos)) .. " with radius " .. size)
size = math.max(math.floor(size - 8), 0) -- When passed to get_voxel_manip, positions are rounded up, to a multiple of 16 nodes in each direction. By subtracting 8 it's rounded to the nearest chunk border. max is used to avoid negative radius.
-- When passed to get_voxel_manip, positions are rounded up, to a multiple of 16 nodes in each direction.
-- By subtracting 8 it's rounded to the nearest chunk border. max is used to avoid negative radius.
size = math.max(math.floor(size - 8), 0)
local minp = vector.subtract(pos, size)
local maxp = vector.add(pos, size)