Work in progress on printing a store menu. Its buggy though

This commit is contained in:
eichhornchen
2020-12-07 20:54:53 +01:00
parent d39427f978
commit 8540a8f354
7 changed files with 68 additions and 34 deletions

View File

@ -6,6 +6,7 @@ from typing import Any, Optional
from .display.texturepack import TexturePack
from .entities.player import Player
from .entities.friendly import Merchant
from .enums import GameMode, KeyValues, DisplayActions
from .settings import Settings
from .translations import gettext as _, Translator
@ -127,3 +128,14 @@ class InventoryMenu(Menu):
@property
def values(self) -> list:
return self.player.inventory
class StoreMenu(Menu) :
merchant: Merchant
def update_merchant(self, merchant: Merchant) -> None:
self.merchant = merchant
@property
def values(self) -> list:
return self.merchant.inventory