Doors #156
|
@ -82,6 +82,7 @@ TexturePack.ASCII_PACK = TexturePack(
|
||||||
BOW=')',
|
BOW=')',
|
||||||
CHEST='□',
|
CHEST='□',
|
||||||
CHESTPLATE='(',
|
CHESTPLATE='(',
|
||||||
|
DOOR='&',
|
||||||
EAGLE='µ',
|
EAGLE='µ',
|
||||||
EMPTY=' ',
|
EMPTY=' ',
|
||||||
EXPLOSION='%',
|
EXPLOSION='%',
|
||||||
|
@ -124,6 +125,8 @@ TexturePack.SQUIRREL_PACK = TexturePack(
|
||||||
BOW='🏹',
|
BOW='🏹',
|
||||||
CHEST='🧰',
|
CHEST='🧰',
|
||||||
CHESTPLATE='🦺',
|
CHESTPLATE='🦺',
|
||||||
|
DOOR=('🚪', curses.COLOR_WHITE, (1000, 1000, 1000),
|
||||||
|
curses.COLOR_WHITE, (1000, 1000, 1000)),
|
||||||
EAGLE='🦅',
|
EAGLE='🦅',
|
||||||
EMPTY=' ',
|
EMPTY=' ',
|
||||||
EXPLOSION='💥',
|
EXPLOSION='💥',
|
||||||
|
|
|
@ -390,6 +390,7 @@ class Tile(Enum):
|
||||||
WALL = auto()
|
WALL = auto()
|
||||||
FLOOR = auto()
|
FLOOR = auto()
|
||||||
LADDER = auto()
|
LADDER = auto()
|
||||||
|
DOOR = auto()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_ascii_char(ch: str) -> "Tile":
|
def from_ascii_char(ch: str) -> "Tile":
|
||||||
|
|
|
@ -83,8 +83,7 @@ class Generator:
|
||||||
def place_room(level: List[List[Tile]], y: int, x: int,
|
def place_room(level: List[List[Tile]], y: int, x: int,
|
||||||
room: List[List[Tile]], door_y: int, door_x: int) -> None:
|
room: List[List[Tile]], door_y: int, door_x: int) -> None:
|
||||||
rh, rw = len(room), len(room[0])
|
rh, rw = len(room), len(room[0])
|
||||||
# maybe place Tile.DOOR here ?
|
level[y][x] = Tile.DOOR
|
||||||
level[y][x] = Tile.FLOOR
|
|
||||||
for ry in range(rh):
|
for ry in range(rh):
|
||||||
for rx in range(rw):
|
for rx in range(rw):
|
||||||
if room[ry][rx] == Tile.FLOOR:
|
if room[ry][rx] == Tile.FLOOR:
|
||||||
|
|
Loading…
Reference in New Issue