Where do storage tanks get their alt-info icon position from?
Posted: Sun Jun 13, 2021 11:59 am
Here we see a string of pipe entities with two kinds of 1x1 storage tank in the middle. The tanks have exactly the same selection box as the pipes. They have a different collision box but in both cases they're centred on the tile. But the alt-info icons for these small tanks are not drawn in the same place as pipes or at the same scale.
Neither tanks nor pipes have the entity_info_icon_shift property that crafting machines and turrets have, so it's not coming from that. It isn't coming from the position of the window_background or flow sprites because the vanilla 3x3 storage tank has a window in a completely different place (much lower down on the entity) and its alt-info icon isn't anywhere near it. I have tried messing with drawing_box and that has no effect either. Turning off scale_info_icons just renders the icon at 1:1 pixels, the location remains the same.
For vanilla storage tanks, the icon is drawn just slightly above the center of the entity - by about the same amount relative to size. It's just that because the icon is larger and within the entity's boundary, it doesn't look wrong in that case. Is it a hardcoded assumption that tanks are at least 3x3, then?
Neither tanks nor pipes have the entity_info_icon_shift property that crafting machines and turrets have, so it's not coming from that. It isn't coming from the position of the window_background or flow sprites because the vanilla 3x3 storage tank has a window in a completely different place (much lower down on the entity) and its alt-info icon isn't anywhere near it. I have tried messing with drawing_box and that has no effect either. Turning off scale_info_icons just renders the icon at 1:1 pixels, the location remains the same.
For vanilla storage tanks, the icon is drawn just slightly above the center of the entity - by about the same amount relative to size. It's just that because the icon is larger and within the entity's boundary, it doesn't look wrong in that case. Is it a hardcoded assumption that tanks are at least 3x3, then?