Conversation
…o changed the correct path where the `src/inventory_gui.py` is now located in.
- Also changed the `src/sprites.py` file name to `src/sprites/base.py` since we might want to adapt the sprites classes to inherit from a base Sprite class later on, it also helps to make the file not too big and easier to navigate. - Changed the reference of sprites.py to base.py in game_running.py
…he states directory
…thon 3.9, also fixed some typos
- Created an abstract class called BaseSprite, that has Sprite as argument. It's referred to pygame.sprite.Sprite. -Each new sprite class that will be made, must inherit BaseSprite class
…e it to this, but I have AllSprites still as reference and in use for this abstract class. - Moved the current working player camera to make it more clear what the purpose of the camera is.
- Fixed the imports of the codebase with the changes I made from the old sprites.py file.
- Moved class to the entities directory inside the sprites directory.
…stract class now.
- move inventory_gui.py to `gui` directory. - add type hints to file - size of extract icon was set to 16, is now TILE_SIZE.
Davidek523
approved these changes
Mar 31, 2025
Collaborator
Davidek523
left a comment
There was a problem hiding this comment.
I approve these changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Type of Pull Request
Only check one box per pull request.
Summary
This PR refactors
sprites.pyand divides the code in different directories:Camera Group logic
pygame.sprite.Groupdoes.Small changes
Docstrings notes
In some files, I added some docstrings to make it easier to read and understand what the class, args etc. do.
Small
shop.pyrefactorshop_state.pystate and the sprite logic is moved to its own src/sprites/shop directory.Related Issues
This PR issue(s)
✅ Checklist:
🏷️ Labels:
type:refactor,priority:high