Closed Martin-Pitt closed 10 months ago
@Martin-Pitt I agree that a sprite sheet would be more ideal, but I've no idea how to do that kind of stuff. I went ahead and used your referenced effort to create a PR with the images broken out. Thanks for the work! #61
Yeah a spritesheet would probably be more optimized but assets are cached anyway and I find spritesheets to be a pain to use. It would probably be the right move but it's good enough atm
It's merged and deployed, all the icons seem to be good. It seems that some item and recipe names are not matching and come back as "Unknown" or "Not Set" in some blueprints but at least it's showing the right icons so the matching icon - asset seems to be working well, I'll check the issues with the names this week-end.
Thanks a gain to both of you.
Only thing I can think of is maybe Rails spun up before those json files were replaced. I dunno how your deployment is setup to know if that is even possible. I say this because those Engine classes are singleton, so they won't see a change in the json file.
First, the entities and recipes data files have been updated into PRs #57 & #58
I've copy pasted in updated data that I'd been using in my calculator: Martin-Pitt/dsp-prod-ratios The parser I created is available at: Martin-Pitt/dsp-parser
Second, there are also images available, but they are in a spritesheet format: Martin-Pitt/dsp-parser/tree/main/dist/spritesheets
I could generate individual asset files — but in my experience it is recommend to use spritesheet(s) instead of browsers making many individual small requests, especially when there are multiple image formats (or device ratios) available.
In this case we have the new
.webp
and.avif
formats which offer significantly smaller file sizes with good cross browser support so far. There is also CSS automatically generated for the icons, feel free to use the stylesheet or modify as you need to, it does however use newer CSS likeaspect-ratio
,image-set
and@layer
.I'm not familiar with this project code to make the modification to use spritesheets myself.