Skip to content

Commit b70fd16

Browse files
committedJul 7, 2014
Oops, fix //set.
1 parent 9616c7d commit b70fd16

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed
 

Diff for: ‎worldedit/manipulations.lua

+3-7
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,10 @@ worldedit.set = function(pos1, pos2, nodenames)
5050
end
5151
if #node_ids == 1 then --only one type of node
5252
local id = node_ids[1]
53-
for i in area:iterp(pos1, pos2) do
54-
nodes[i] = node_ids[id]
55-
end
56-
else --fill randomly with all types of specified nodes
53+
for i in area:iterp(pos1, pos2) do nodes[i] = id end --fill area with node
54+
else --several tpyes of nodes specified
5755
local id_count, rand = #node_ids, math.random
58-
for i in area:iterp(pos1, pos2) do
59-
nodes[i] = node_ids[rand(id_count)]
60-
end
56+
for i in area:iterp(pos1, pos2) do nodes[i] = node_ids[rand(id_count)] end --fill randomly with all types of specified nodes
6157
end
6258

6359
--update map nodes

0 commit comments

Comments
 (0)
Please sign in to comment.