changed a few errors

This commit is contained in:
eichhornchen 2020-11-06 17:03:06 +01:00
parent 38ed5259d5
commit 4a54609bad
1 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
import curses
from dungeonbattle.interfaces import Map
from dungeonbattle.settings import Settings
import dungeonbattle.texturepack
import dungeonbattle.texturepack as tp
class MapDisplay:
@ -11,13 +11,15 @@ class MapDisplay:
self.height = height
self.map = m
self.pad = curses.newpad(m.height, m.width+1)
if Settings.TEXTURE_PACK == 'ASCII'
self.textures = ascii_textures
if self.settings.TEXTURE_PACK == 'ASCII'
self.textures = tp.ascii_textures
if self.settings.TEXTURE_PACK == 'SQUIRREL'
self.textures = tp.squirrel_textures
def update_pad(self):
self.pad.addstr(0, 0, self.map.draw_string())
for e in self.map.entities:
self.pad.addch(e.y, e.x, self.textures[e.name])
self.pad.addstr(e.y, e.x, self.textures[e.name])
def display(self, y, x):
deltay, deltax = (self.height // 2) + 1, (self.width //2) + 1