-
Notifications
You must be signed in to change notification settings - Fork 83
Expanded objects #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Expanded objects #189
Conversation
Changed the copyright years in multiple files for consistency. Adjusted object types in `pytmx.py` to include additional types such as ellipse, point, and text, along with their respective attributes. Refined imports and typing hints across various modules for clarity and efficiency.
Changed all single quotes to double quotes for string literals in pytmx.py. This ensures uniformity in the codebase and improves readability and maintainability of the code. No functional changes were made.
Hmm, those changes made by your IDE are a bit suspect They've changed the copyright years to be in the past. What's worse though is that they've removed the return typehints which are useful for people working with PyTMX |
I didn't notice the type hint changes. I'll go through them and check it out, I'm all about typing. |
This reverts commit ec662ae
Introduce a new method, get_tile_flags_by_gid, to fetch tile flags using the global tile ID (GID). This improves the convenience of accessing tile properties directly by their GID.
Okay, I've removed the changes my IDE made, and left only the object changes, also I added a function called get_tile_flags_by_gid to get the flags of a gid, I use this for correctly flipping and rotating my colliders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving some drive-by comments :)
I was about to make the same changes, so let's try to get this PR in, it's useful!
BTW I switched to using @pnearing's repo for my project, and it does work. One thing to note is that images/tiles are considered rectangles. Which is not wrong, as you can use the |
Sorry to add yet another comment, but another thing that would be convenient is if rectangles also had |
Remove unnecessary changes
Remove unnecessary change
If you happen to still be using my repo, I added points for rectangles. |
I expanded TiledObject to recognize ellipses, text and points. I added a new property to the object called object_type which is meant to be a literal string, currently it will be one of "rectangle", "text" "polygon" "polyline", "ellipse", and "point".
Also my IDE cleaned up and made some date changes.