Page 1 of 1

Separate top_pivot_shift values for pump input and output

Posted: Sat Jun 27, 2026 3:50 am
by robot256
Request:

Add the ability to shift the pump's wagon connection arm top pivot point by different amounts for the pump input and output arms. This would be to match the existing ability to shift the BasePumpWagonConnectionAnimations differently for input and output. For example, change PumpWagonConnectionGraphics::top_pivot_shift to be a table containing {input=PumpWagonConnectionShift4Way, output=PumpWagonConnectionShift4Way}.

Application:

I really like the new stretchy pump arms and want to do more with them, specifically for the Cargo Ships oil tanker. To allow the pumps to connect to the water rails from on land without overlapping the ship sprites, I created a two 1x4 tile pump entities, one with a long input side and one with a long output side. (The only way to connect to wagons is to have the pump collision box adjacent to the rail, so the collision box must be wider than the sprites.)

To draw the pump body at one edge of the 4-wide collision box, I applied the same 1-tile-from-center shift to the animations, fluid_animation, glass_pictures, wagon_connection_graphics.base.input, and wagon_connection_graphics.base.output sprite definitions.

The wagon_connection_graphics.part1 and wagon_connection_graphics.part2 are shifted according to top_pivot_shift. Right now, the input and output are both shifted by top_pivot_shift[direction] relative to the entity center point. This means that if the input and output arms are not positioned symmetrically about the entity center, one of the pivot points will always be wrong.

Here is how it affects my use case. I adjusted the top_pivot_shift so that the long arm to the ship looks right, which means it starts almost right on the entity center line. When the short arm to the fluid wagon is drawn, it also starts near the entity center line, even though the input arm base is 2 tiles away from the center. With the ability to set the input and output arm top_pivot_shift separately, I would be able to make both sides of the asymmetric pump look correct.
{07BDE6C4-A074-4858-8C68-2D83BB17A349}.png
{07BDE6C4-A074-4858-8C68-2D83BB17A349}.png (2.58 MiB) Viewed 25 times