[2.0.14] Rail signal selection_box shifts incorrectly when not on tile edges

Post your bugs and problems so we can fix them.
robot256
Smart Inserter
Smart Inserter
Posts: 1063
Joined: Sun Mar 17, 2019 1:52 am
Contact:

[2.0.14] Rail signal selection_box shifts incorrectly when not on tile edges

Post by robot256 »

When using selection_box to produce an asymmetric selection area, the actual selection box is different than the entered values specifically when the boundaries are not on tile edges. In these cases, the highlight box accuratly reflects the mouse-selectable area, so this is a different bug than viewtopic.php?f=7&t=119778

Example:
With selection_box = {{-1.5, -0.5}, {-0.5, 0.5}} (and selection_box_shift = 0,0), the selection rectangle is shifted by 1.0 tiles as expected. (East orientation shown)
Screenshot 2024-11-03 200332_2.png
Screenshot 2024-11-03 200332_2.png (62.43 KiB) Viewed 136 times
I then tried to make the box a little smaller than a full tile. I set selection_box = {{-1.35, -0.65}, {-0.35, 0.35}} (selection_box_shift is still 0,0). The total width of the box should be 0.7x0.7 tiles and the center should still be offset by 1.0. But the result I get is the following:
Screenshot 2024-11-03 200834.png
Screenshot 2024-11-03 200834.png (164.7 KiB) Viewed 136 times
The box is still 1.0x1.0 tiles wide, and the center has been shifted by (0.15, 0.15). This happens in all four cardinal directions (the diagonals have other issues as I reported).
Post Reply

Return to “Bug Reports”