fixed doors

This commit is contained in:
Lukas Nöllemeyer 2024-08-19 20:19:33 +02:00
parent 200a0a4996
commit e3dfc649d4
3 changed files with 4 additions and 8 deletions

View file

@ -109,7 +109,7 @@ class MainScreen(Screen):
console.rgba[["ch","fg"]][j, i] = 0x2591, (50,50,50, 255) console.rgba[["ch","fg"]][j, i] = 0x2591, (50,50,50, 255)
continue continue
walkable = (not in_map) or map.walkable[map_pos.y, map_pos.x] walkable = (not in_map) or map.walkable[map_pos.y, map_pos.x]
if walkable: if walkable or world_pos in doors:
console.rgba[["ch","fg"]][j, i] = FLOOR_CHAR, (70,70,70, 255) console.rgba[["ch","fg"]][j, i] = FLOOR_CHAR, (70,70,70, 255)
continue continue
ch = VERTICAL_WALL_CHAR ch = VERTICAL_WALL_CHAR

View file

@ -47,7 +47,8 @@ class SelectItem(MenuItem):
def on_draw(self, console: tcod.console.Console, x: int, y: int, highlight: bool) -> None: def on_draw(self, console: tcod.console.Console, x: int, y: int, highlight: bool) -> None:
"""Render this items label.""" """Render this items label."""
console.print(x, y, self.label, fg=(255, 255, 255), bg=(64, 64, 64) if highlight else (0, 0, 0)) #g.foreground.print(x, y, self.label, fg=(255, 255, 255), bg=(64, 64, 64) if highlight else (0, 0, 0))
g.background.print(x, y, self.label, fg=(255, 255, 255), bg=(64, 64, 64) if highlight else (0, 0, 0))
@attrs.define() @attrs.define()

View file

@ -18,17 +18,12 @@ def valid_tileset():
"Oryx/oryx_roguelike_2.0/Terrain.png", columns=16, rows=11, charmap=[i for i in range(255)] "Oryx/oryx_roguelike_2.0/Terrain.png", columns=16, rows=11, charmap=[i for i in range(255)]
) )
player = monstertiles.get_tile(1)
player = [[[r,g,b,a] if a > 0 else [0,0,0,0]
for r,g,b,a in row]
for row in player]
tileset.set_tile(ord('@'), player) tileset.set_tile(ord('@'), monstertiles.get_tile(1))
tileset.set_tile(ord('/'), terraintiles.get_tile(ord('?'))) tileset.set_tile(ord('/'), terraintiles.get_tile(ord('?')))
tileset.set_tile(ord('|'), terraintiles.get_tile(ord('!'))) tileset.set_tile(ord('|'), terraintiles.get_tile(ord('!')))
tileset.set_tile(ord('_'), terraintiles.get_tile(ord('0'))) tileset.set_tile(ord('_'), terraintiles.get_tile(ord('0')))
tileset.set_tile(ord('\\'), terraintiles.get_tile(ord('/'))) tileset.set_tile(ord('\\'), terraintiles.get_tile(ord('/')))
tileset.set_tile(ord('.'), terraintiles.get_tile(20)) tileset.set_tile(ord('.'), terraintiles.get_tile(20))
tileset.set_tile(ord(','), terraintiles.get_tile(12)) tileset.set_tile(ord(','), terraintiles.get_tile(12))
print(tileset.get_tile(ord('@'))[10])
return tileset return tileset