Fix non-uniform stuff repartition in chests

master
upsilon 2019-09-01 19:16:48 +02:00
parent 915c35fe39
commit 549736d159
No known key found for this signature in database
GPG Key ID: A80DAE1F266E1C3C
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ local function finalize_map(map)
splitted_stuff[k] = {}
local splitpoints = {}
for i = 1, #chests-1 do
table.insert(splitpoints, math.random(v))
table.insert(splitpoints, math.random(0, v))
end
table.sort(splitpoints)
splitted_stuff[k][1] = splitpoints[1] or 0 -- the or avoids crashing if there is only one chest