Changed Tiles to take into account the texturepack
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user