From 7c5c3c57ec27ccc24c8d6b01eb4d5a25a745e074 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 3 May 2022 19:03:31 -0700 Subject: [PATCH] Fill the map with Empty tiles instead of Wall tiles --- roguebasin/map.py | 4 ++-- roguebasin/tile.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roguebasin/map.py b/roguebasin/map.py index 693f54b..8a2f53e 100644 --- a/roguebasin/map.py +++ b/roguebasin/map.py @@ -6,7 +6,7 @@ import numpy as np import random import tcod from .geometry import Point, Rect, Size -from .tile import Floor, Wall +from .tile import Empty, Floor, Wall from typing import List, Optional LOG = logging.getLogger('map') @@ -86,7 +86,7 @@ class RoomsAndCorridorsGenerator(MapGenerator): min_width=minimum_room_size.width + 2, min_height=minimum_room_size.height + 2, max_horizontal_ratio=1.5, max_vertical_ratio=1.5) - tiles = np.full(tuple(self.size), fill_value=Wall, order='F') + tiles = np.full(tuple(self.size), fill_value=Empty, order='F') # Generate the rooms rooms: List['RectangularRoom'] = [] diff --git a/roguebasin/tile.py b/roguebasin/tile.py index 80abfce..7048a50 100644 --- a/roguebasin/tile.py +++ b/roguebasin/tile.py @@ -25,5 +25,6 @@ tile_datatype = np.dtype([ def tile(*, walkable: int, transparent: int, dark: Tuple[int, Tuple[int, int, int], Tuple[int, int ,int]]) -> np.ndarray: return np.array((walkable, transparent, dark), dtype=tile_datatype) +Empty = tile(walkable=False, transparent=False, dark=(ord(' '), (255, 255, 255), (0, 0, 0))) Floor = tile(walkable=True, transparent=True, dark=(ord(' '), (255, 255, 255), (50, 50, 150))) Wall = tile(walkable=False, transparent=False, dark=(ord(' '), (255, 255, 255), (0, 0, 150))) \ No newline at end of file