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
Expose obj image offset and num images to plugins #17567
Expose obj image offset and num images to plugins #17567
Conversation
3ea73a6
to
674727e
Compare
I have a WIP branch where I have refactored the image loading code of objects. In this branch, I created two methods in Object.h: Would it be possible for you to change Also, you might as well change occurances of image offset to base image id for consistency. As for exposing the base image index in plugins... I kind of get the rationale. But from what I understand in the discord chat, what you actually need are specific image IDs (footpath preview). In which case it would be better to expose those fields, so that plugins do not rely on the image order of the object as much. Also, not all objects contain images, so it is somewhat specific to only a certain group of object types. Maybe create another interface that only objects containing images implement in |
|
Another question. What is the preferred style for addressing feedback in terms of commits? Do you like PRs to be squashed into a single commit or do you like multiple commits per PR? |
Obviously, but some object types can not have images. And the preview image being the first one is not always going to be the case. Some object types have multiple preview images. But this point can be skipped r.e. point 4.
|
Mostly because I'm new to typescript and wasn't sure about how interfaces really worked (looks like ducktyping). Hence a little hesitant to add another. I'm going to do some more reading tonight and I'll push a commit tomorrow morning addressing your feedback. Thanks for the help! |
46985b8
to
5311520
Compare
Music objects can now also contain images, otherwise looks fine. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
5311520
to
aaec560
Compare
aaec560
to
d1be706
Compare
This PR makes two changes.
For testing I opened up a park with all objects available and also wrote a toy plugin to check the images.