Add chest bounds to cavern map
This commit is contained in:
parent
0a5e05201f
commit
61b909142e
2 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,12 @@ h = 230
|
||||||
team.1 = red
|
team.1 = red
|
||||||
team.1.color = red
|
team.1.color = red
|
||||||
team.1.pos = -20,-2,65
|
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 = blue
|
||||||
team.2.color = blue
|
team.2.color = blue
|
||||||
team.2.pos = -48,0,-83
|
team.2.pos = -48,0,-83
|
||||||
|
team.2.chests1 = -72,-4,-97
|
||||||
|
team.2.chests2 = 7,15,-33
|
||||||
|
team.2.num_chests = 15
|
||||||
|
|
|
@ -186,7 +186,7 @@ function place_chests(minp, maxp, seed, number_chests)
|
||||||
local y_max = math.min(maxp.y, height_max)
|
local y_max = math.min(maxp.y, height_max)
|
||||||
local attempts = 0
|
local attempts = 0
|
||||||
local chests_placed = 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
|
attempts = attempts + 1
|
||||||
local pos = {
|
local pos = {
|
||||||
x = math.random(minp.x, maxp.x),
|
x = math.random(minp.x, maxp.x),
|
||||||
|
|
Loading…
Reference in a new issue