Display inventory content in statdisplay

This commit is contained in:
Yohann D'ANELLO
2020-11-11 23:41:06 +01:00
parent 12c653fe15
commit 21e85078a4
3 changed files with 16 additions and 5 deletions

View File

@ -35,8 +35,13 @@ class StatsDisplay(Display):
for _ in range(self.width - len(string3) - 1):
string3 = string3 + " "
self.pad.addstr(2, 0, string3)
inventory_str = "Inventaire : " + "".join(
self.pack[item.name.upper()] for item in self.player.inventory)
self.pad.addstr(3, 0, inventory_str)
if self.player.dead:
self.pad.addstr(3, 0, "YOU ARE DEAD",
self.pad.addstr(4, 0, "VOUS ÊTES MORT",
curses.A_BOLD | curses.A_BLINK | curses.A_STANDOUT
| self.color_pair(3))
@ -44,4 +49,4 @@ class StatsDisplay(Display):
self.pad.clear()
self.update_pad()
self.pad.refresh(0, 0, self.y, self.x,
3 + self.y, self.width + self.x)
4 + self.y, self.width + self.x)