Skip to content
Permalink
Browse files

Make //fixlight work again

The dig-air-nodes method seems to have stopped working a few Minetest version ago
  • Loading branch information
sfan5 committed Jan 2, 2017
1 parent 3a7fb5b commit 92fe95fab78de668f6732648644be0b9a768d298
Showing with 4 additions and 7 deletions.
  1. +4 −7 worldedit/manipulations.lua
@@ -575,14 +575,11 @@ end
function worldedit.fixlight(pos1, pos2)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)

worldedit.keep_loaded(pos1, pos2)
local vmanip = minetest.get_voxel_manip(pos1, pos2)
vmanip:write_to_map()
vmanip:update_map() -- this updates the lighting

local nodes = minetest.find_nodes_in_area(pos1, pos2, "air")
local dig_node = minetest.dig_node
for _, pos in ipairs(nodes) do
dig_node(pos)
end
return #nodes
return worldedit.volume(pos1, pos2)
end


0 comments on commit 92fe95f

Please sign in to comment.
You can’t perform that action at this time.