While preparing Bio Industries for 1.1, I tried to optimize the code, and using "size" instead of both "width" and "height" for square graphics seemed like a good idea to get rid of a couple of lines. But there was an issue with BI's wooden pipes: This happens with Factorio 0.18 and 1.1. While making the screenshots, I used the same version of the mod, with only one file differing. I've attached the two versions of the file, a diff should show that these versions really are the same except for the different specifications of sprite sizes. To reproduce the bug, you can use BI 0.18.29, build some wooden pipes, then replace prototypes/Wood_Products/entity.lua with the attached entities_size.lua.[t]he width and height of the sprite. If this is an array, the first member of the array is the width and the second is the height. Otherwise the size is both width and height.
Breaking graphics by using size instead of height/width
Breaking graphics by using size instead of height/width
According to the wiki, the size parameter specifies
- Attachments
-
- entities_width_height.lua
- (45.57 KiB) Downloaded 63 times
-
- entities_size.lua
- (44.86 KiB) Downloaded 72 times
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Breaking graphics by using size instead of height/width
Not a bug.
Please check `prototypes/Wood_Products/pipes.lua` function `change_graphics`. If size is specified it has priority over width/height
Please check `prototypes/Wood_Products/pipes.lua` function `change_graphics`. If size is specified it has priority over width/height
Re: Breaking graphics by using size instead of height/width
Thanks for finding my bug! I somehow overlooked that function and forgot that I explicitly made it to adjust only width/height when I changed it some months ago. Last night I only looked for what changed between the working and the buggy version. Should have gone one layer deeper before posting that bug report …boskid wrote: Mon Dec 14, 2020 7:00 am Not a bug.
Please check `prototypes/Wood_Products/pipes.lua` function `change_graphics`. If size is specified it has priority over width/height

A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!