Random map generator fixes, cleanup

This commit is contained in:
Zuhayr
2015-08-02 21:06:16 +09:30
parent 0d7b2570db
commit dd41dfa16a
4 changed files with 24 additions and 23 deletions

View File

@@ -7,7 +7,7 @@
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!within_bounds(current_cell))
if(!current_cell)
continue
if(x == 1 || y == 1 || x == limit_x || y == limit_y)
map[current_cell] = WALL_CHAR
@@ -19,7 +19,7 @@
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!within_bounds(current_cell))
if(!current_cell)
continue
if(!(x == 1 || y == 1 || x == limit_x || y == limit_y))
continue