diff --git a/init.lua b/init.lua index 10fa0f6..2f00e86 100644 --- a/init.lua +++ b/init.lua @@ -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)