[0.17.66] Storage tanks ignore x component of window_bounding_box corners
Posted: Fri Aug 23, 2019 4:36 pm
More modded tank shenanigans ... The window_bounding_box property of storage tank entities isn't documented but it's clearly the bounds of the little flow window drawn on tanks. For the same modded tank entity reported here, I was trying to fit a little flow window on. But whatever I tried, the bounding box seems to stick like glue to about -0.5 to 0.5 on the x axis. It correctly adjusts for the y part of the corners but ignores the x:
The window bounding box here is supposed to be {{-0.125,-1},{0.125,-0.65}} but it's more like {{-0.5,-1},{0.5,-0.65}}.
To check this, I replaced the vanilla storage's main picture with a blank sprite sheet:
The vanilla prototype defines the window_bounding_box as {{-0.125,0.6875},{0.1875,1.1875}} but that's not what you get. Again, the y part of the corners is taken into account, but the x value in the corners is ignored.
This doesn't matter for the vanilla tanks because they are 3x3 tiles and large enough to hide a multitude of sins, but this behaviour makes creating smaller tanks almost impossible, or larger tanks with a window that isn't dead centre on the x axis. I didn't even care about having a flow window but those fields are mandatory for some reason so I thought I'd try and make it work.
The window bounding box here is supposed to be {{-0.125,-1},{0.125,-0.65}} but it's more like {{-0.5,-1},{0.5,-0.65}}.
To check this, I replaced the vanilla storage's main picture with a blank sprite sheet:
The vanilla prototype defines the window_bounding_box as {{-0.125,0.6875},{0.1875,1.1875}} but that's not what you get. Again, the y part of the corners is taken into account, but the x value in the corners is ignored.
This doesn't matter for the vanilla tanks because they are 3x3 tiles and large enough to hide a multitude of sins, but this behaviour makes creating smaller tanks almost impossible, or larger tanks with a window that isn't dead centre on the x axis. I didn't even care about having a flow window but those fields are mandatory for some reason so I thought I'd try and make it work.