From a6b93cacfbc4bcfe1717b34e1b5d504da3af2dda Mon Sep 17 00:00:00 2001 From: eichhornchen Date: Fri, 6 Nov 2020 17:04:42 +0100 Subject: [PATCH] Changed Tiles to take into account the texturepack --- dungeonbattle/interfaces.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dungeonbattle/interfaces.py b/dungeonbattle/interfaces.py index ee4d6a3..bedf121 100644 --- a/dungeonbattle/interfaces.py +++ b/dungeonbattle/interfaces.py @@ -1,6 +1,7 @@ #!/usr/bin/env python from enum import Enum - +from dungeonbattle.settings import Settings +import dungeonbattle.texturepack as tp class Map: """ @@ -53,9 +54,14 @@ class Map: class Tile(Enum): - EMPTY = ' ' - WALL = '█' - FLOOR = '.' + if self.settings.TEXTURE_PACK == 'ASCII' + self.textures = tp.ascii_textures + if self.settings.TEXTURE_PACK == 'SQUIRREL' + self.textures = tp.squirrel_textures + + EMPTY = self.textures["EMPTY"] + WALL = self.textures["WALL"] + FLOOR = self.textures["FLOOR"] def is_wall(self) -> bool: return self == Tile.WALL