Oops, fix //set.

This commit is contained in:
Uberi 2014-07-14 00:11:33 -04:00
parent 58d7a7134e
commit d8aa7e72a7

View File

@ -48,8 +48,8 @@ worldedit.set = function(pos1, pos2, nodenames)
for i,v in ipairs(nodenames) do
node_ids[i] = minetest.get_content_id(nodenames[i])
end
if #node_ids then --only one type of node
local id = node_ids
if #node_ids == 1 then --only one type of node
local id = node_ids[1]
for i in area:iterp(pos1, pos2) do nodes[i] = id end --fill area with node
else --several types of nodes specified
local id_count, rand = #node_ids, math.random