[posila][for 0.16]Rotated alignment of even-length type storage-tank off by .5
Posted: Sun Aug 27, 2017 9:13 am
Finishing up a fluid handling mod based on type storage-tank. 'Odd' lengths (1x3, 1x5, 1x7) behave properly now that the previous rotation bug was fixed, but I discovered that if the length is an even number of tiles (1x2, 1x4, etc), the item becomes misaligned when rotated. Here I made a 1x2 item with graphics representing two conjoined pipe connections using the same dimensions as another 1x2 object (pump):
Note that the lower left object is incorrectly offset by 0.5x0.5. Values used for the above:
Note that the lower left object is incorrectly offset by 0.5x0.5. Values used for the above:
Code: Select all
collision_box = {{-0.29, -0.79}, {0.29, 0.79}}
selection_box = {{-0.5, -1}, {0.5, 1}}
pipe_connections = {
{ position = {0, -1.5} },
{ position = {0, 1.5} },
{ position = {-1, -0.5} },
{ position = {-1, 0.5} },
{ position = {1, -0.5} },
{ position = {1, 0.5} },