Display more precisely where we are in the store menu
This commit is contained in:
@ -22,6 +22,9 @@ class Game:
|
||||
"""
|
||||
The game object controls all actions in the game.
|
||||
"""
|
||||
# Global instance of the game
|
||||
INSTANCE: "Game"
|
||||
|
||||
map: Map
|
||||
player: Player
|
||||
screen: Any
|
||||
@ -32,6 +35,8 @@ class Game:
|
||||
"""
|
||||
Init the game.
|
||||
"""
|
||||
Game.INSTANCE = self
|
||||
|
||||
self.state = GameMode.MAINMENU
|
||||
self.waiting_for_friendly_key = False
|
||||
self.is_in_store_menu = True
|
||||
@ -52,7 +57,7 @@ class Game:
|
||||
Create a new game on the screen.
|
||||
"""
|
||||
# TODO generate a new map procedurally
|
||||
self.map = Map.load(ResourceManager.get_asset_path("example_map.txt"))
|
||||
self.map = Map.load(ResourceManager.get_asset_path("example_map_2.txt"))
|
||||
self.map.logs = self.logs
|
||||
self.logs.clear()
|
||||
self.player = Player()
|
||||
@ -163,6 +168,7 @@ class Game:
|
||||
self.logs.add_message(msg)
|
||||
if entity.is_merchant():
|
||||
self.state = GameMode.STORE
|
||||
self.is_in_store_menu = True
|
||||
self.store_menu.update_merchant(entity)
|
||||
|
||||
def handle_key_pressed_inventory(self, key: KeyValues) -> None:
|
||||
|
Reference in New Issue
Block a user