Add chest bounds to cavern map

This commit is contained in:
rubenwardy 2018-01-06 03:21:39 +00:00
parent 0a5e05201f
commit 61b909142e
2 changed files with 7 additions and 1 deletions

View file

@ -186,7 +186,7 @@ function place_chests(minp, maxp, seed, number_chests)
local y_max = math.min(maxp.y, height_max)
local attempts = 0
local chests_placed = 0
while chests_placed < number_chests and attempts < number_chests + 6 do
while chests_placed < number_chests and attempts < number_chests + 12 do
attempts = attempts + 1
local pos = {
x = math.random(minp.x, maxp.x),