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

@ -6,6 +6,12 @@ h = 230
team.1 = red
team.1.color = red
team.1.pos = -20,-2,65
team.1.chests1 = -63,-4,26
team.1.chests2 = -6,20,73
team.1.num_chests = 15
team.2 = blue
team.2.color = blue
team.2.pos = -48,0,-83
team.2.chests1 = -72,-4,-97
team.2.chests2 = 7,15,-33
team.2.num_chests = 15

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),