Return to repo list

heart-of-gold

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

commit 5a67ed50cef31db37ec2446d0bd795fa4ba68063
parent 069f24d7ec6f02ed2527d3b654a1b4607964319b
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Wed, 14 Oct 2020 15:26:40 -0500

Now safe to switch between 2 current modes

Diffstat:
Mdata/json/ents/testmap1.json | 1-
Msrc/game.py | 5++++-
Msrc/vgo.py | 4----
3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/data/json/ents/testmap1.json b/data/json/ents/testmap1.json @@ -2,7 +2,6 @@ "testent1" : { "name" : "Jisella", "type" : "Piece", - "unit" : "jisella_1.json", "sheet" : "jisella_1", "visible" : true, "animation" : "stand_L", diff --git a/src/game.py b/src/game.py @@ -101,7 +101,10 @@ class Game(object): elif self.state_mode == "Battle_Mode": self.board_manager.update_board(self.screen) self.entity_manager.update_entities(self.screen) - self.menu_manager.update_current_menu(self.screen) + # NOTE: MenuManager should not be an overlay for the + # battle mode. In-battle menus should be handled + # by EntityManager most likely + #self.menu_manager.update_current_menu(self.screen) # Last, update the screen pygame.display.update() diff --git a/src/vgo.py b/src/vgo.py @@ -343,10 +343,6 @@ class EntityManager(manager.Manager): self.game.sheet_manager.animations[j[e]["sheet"]][j[e]["animation"]], j[e]["animated"], j[e]["passable"], unit.Unit(self, self.game.unit_manager.get_stats(j[e]["name"])), j[e]["team"]) - # TODO: This whole thing is a mess. It is time to simplify what - # values get passed to new ents - if "unit" in j[e].keys(): - ne.unit = json.load(open(os.path.join(STATUS_JSON_PATH, j[e]["unit"]))) ne.assign_tile(self.game.board_manager.get_tile_at_tile_pos(tuple(j[e]["tile"]))) ne.snap_to_tile() self.add_entity(ne)