-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Make it easier and more efficient to access a property by name #54
Comments
Sounds very sensible, and since |
Yup, I can make this change |
Can we avoid breaking by using:
|
We could! But if we don't really care about backwards compatibility, might as well keep the simple name "properties"? |
Is there something called properties in tiled? If that is the case I'd definitely keep it. And as you said, we're don't care that much about breaking changes here. |
What could be improved
Properties on tiles and objects are unique, but are returned as
List<Property>
, which makes it difficult to access a property by name and requires iterating through the entire list each time.So, I'm suggesting changing
tile.properties
andobject.properties
(and anywhere else applicable) toMap<String, Property>
, for better access.Why should this be improved
The Tiled editor doesn't allow multiple properties with the same name, and accessing the properties by name would better match the Tiled editor. In addition, if the properties are keyed by name it will be more efficient.
Any risks?
This would be a breaking change.
The text was updated successfully, but these errors were encountered: