Return to repo list

heart-of-gold

Tactical RPG written in python, using pygame.
Return to HMagellan.com

commit 5375168c540273118e1aee7d3086349636fd9362
parent 5762f91147b69d43d4a95bc149c1c9525c58c950
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Wed,  4 Nov 2020 16:13:58 -0600

Menu should now be in line with new functionality

Diffstat:
Msrc/menu.py | 5++---
Msrc/piece.py | 8++++----
2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/menu.py b/src/menu.py @@ -103,9 +103,8 @@ class Menu(object): # Load buttons, if any for b in self.definition["buttons"]: - nmb = MenuButton(b, self.contained_entities, - self.manager.game.sheet_manager.loaded_sheets[self.definition["buttons"][b]["sheet"]], - tuple(self.definition["buttons"][b]["sprite"]), None, False, True, None, self.definition["buttons"][b]["effects"]) + nmb = MenuButton(self.manager.bus.fetch_sheet(self.definition["buttons"][b]["sheet"]), tuple(self.definition["buttons"][b]["sprite"]), + None, False, self.definition["buttons"][b]["effects"]) nmb.rect.topleft = tuple(self.definition["buttons"][b]["pos"]) self.button_group.add(nmb) diff --git a/src/piece.py b/src/piece.py @@ -78,9 +78,9 @@ class PieceManager(manager.Manager): """ piece = None for p in self.pieces: - if p.name == name - piece = p - break + if p.name == name: + piece = p + break return piece def get_piece_by_tile(self, tile_pos): @@ -221,7 +221,7 @@ class Piece(entity.Entity): """ def __init__(self, sheet, sprite = (0, 0), animation = None, animated = False, - name, passable = False, normal_stats = None, active_stats = None, team = None): + name = None, passable = False, normal_stats = None, active_stats = None, team = None): # Parent initialization super().__init__(sheet, sprite, animation, animated)