Fix minetn-6 map generation errors
Two error cases with the map generation in minetn-6: first one was the lregion placement impossible, caused by randomly generated mines not going past the map either left or right, and the stair generation being restricted outside the fixed map. second was one side of the map being unreachable, because the mines layout joined to the other side right at the edge of map behind the small room with the "x" mapchars.
This commit is contained in:
@@ -24,24 +24,28 @@ x------xxxxxxxxxxxxxx-----------------xx
|
||||
.|...+..--+--.........|...|..|...|...|..
|
||||
.|...|..|...|..-----..|...|..|-+---+--..
|
||||
.-----..|...|--|...|..--+---+-.........x
|
||||
........|...|..|...+.............-----..
|
||||
........|...|..|...+.............-----.x
|
||||
........-----..|...|......--+-...|...|..
|
||||
x----...|...|+------..{...|..|...+...|..
|
||||
x|..+...|...|.............|..|...|...|..
|
||||
x|..|...|...|-+-.....---+-------------.x
|
||||
x----...--+--..|..-+-|..................
|
||||
...|........|..|..|..|----....--------x.
|
||||
...|..T.....----..|..|...+....|......|x.
|
||||
.|..|...|...|-+-.....---+-------------.x
|
||||
.----...--+--..|..-+-|..................
|
||||
...|........|..|..|..|----....--------.x
|
||||
...|..T.....----..|..|...+....|......|..
|
||||
...|-....{........|..|...|....+......|x.
|
||||
...--..-....T.....--------....|......|x.
|
||||
.......--.....................----------
|
||||
xxxxx-----xxxxxxxxxxxxxxxxxx------------
|
||||
.xxxx-----xxxxxxxxxxxxxxxxxx------------
|
||||
xxxx-------xxxxxxxxxxxxxxx--------------
|
||||
]] });
|
||||
|
||||
des.region(selection.area(00,00,39,19),"lit")
|
||||
des.levregion({ type="stair-up", region={01,03,20,19}, region_islev=1, exclude={0,0,39,19} })
|
||||
des.levregion({ type="stair-down", region={61,03,75,19}, region_islev=1, exclude={0,0,39,19} })
|
||||
|
||||
-- stairs can generate 1 column left or right inside the map,
|
||||
-- in case the randomly generated mines layout doesn't extend outside the map
|
||||
des.levregion({ type="stair-up", region={01,03,21,19}, region_islev=1, exclude={1,0,39,18} })
|
||||
des.levregion({ type="stair-down", region={60,03,75,19}, region_islev=1, exclude={0,0,38,18} })
|
||||
|
||||
des.region(selection.area(13,7,14,8),"unlit")
|
||||
des.region({ region={09,09, 11,11}, lit=1, type="candle shop", filled=1 })
|
||||
des.region({ region={16,06, 18,08}, lit=1, type="tool shop", filled=1 })
|
||||
|
||||
Reference in New Issue
Block a user