forked from minetest-mods/mapfix
fix luacheck warnings
This commit is contained in:
parent
932e12410a
commit
a5fd28affd
7
init.lua
7
init.lua
@ -35,9 +35,12 @@ minetest.register_chatcommand("mapfix", {
|
|||||||
previous = time
|
previous = time
|
||||||
end
|
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 minp = vector.subtract(pos, size)
|
||||||
local maxp = vector.add(pos, size)
|
local maxp = vector.add(pos, size)
|
||||||
|
Loading…
Reference in New Issue
Block a user