Keith1039 / Pygame-RPG

A repository of me trying to make an RPG with a custom game engine with Pygame added in as support.
0 stars 0 forks source link

Pygame-RPG 15.2 Housekeeping and bugfixing #49

Closed Keith1039 closed 8 months ago

Keith1039 commented 8 months ago

Pygame-RPG 15.2 Housekeeping and bugfixing

This round of changes involve updating the save files, fixing an issue in the UI_Handler.py file and having the objects that require the Knight and the BattleManager class import them from the file instead of making a dummy class of them. Further details regarding to each change can be found below.

Since the save files in use were from near the beginning of the project, they do not have all of the data that the Knight class now needs. As a result, they were updated to reflect the current Knight class.

There was a slight error in the UI_Handler.py file which had the code look for the save file meant to be used when the user clicked on "Continue" in the start screen. The path used was "Save/.." when the proper path was "save/..". In Windows this isn't an issue but on other platforms this would cause the game to crash.

At the beginning of the project I thought it was easier to make a Dummy Knight file that mimicked the Knight classes behavior. Unfortunately, I forgot to update the file that had the Dummy Knight class which led to the tests in the manager package that needed a Knight object to test it to be outdated. All files that require Knight or BattleManager objects now import the code directly, this ensures that the testing will always be up to date. All of the tests have been fixed and they now pass.

Note: A test in BattleManager doesn't pass but that will be addressed later

PR checklist