Shia Smart Train Pumping

by Shia

Transfers fluid amounts below 1 in wagons to pumps

Utilities
6 years ago
0.15 - 0.16
4
Owner:
Shia
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
7 years ago
Latest Version:
0.2.3 (6 years ago)
Factorio version:
0.15 - 0.16
Downloaded by:
4 users

Changes the behavior of fluid wagons at stations while unloading.

If a fluid wagon arrives at a station and is pumped out an additional check will be run. Now if the fluid in a tank goes below 1 (but above 0) it tries to transfer the fluid to a pump which is at the right position and looks in the correct direction (like in the picture). The target pump also needs to be (directly) connected to the same fluid (empty pumps will not be used).
Works with multi-fluid wagons correctly without the loss of any fluid.

I didn't got any problems. Still, If you notice any strange behavior, just tell me.

Known issues:
- Pumps in correct position, direction and with same fluid, also are used as target when they are not connected to the wagon (circuit condition disabled or different pump already connected to that tank). However, It doesn't look like something which needs to be fixed to my eye.

Change log:
0.2.3:
- changed "wagon.direction" to "wagon.orientation"

0.2.2:
- Issue: Game crashed when removing a wagon while it was pumped out => SOLVED!

0.2.1:
- changed "info.json" for Factorio 0.16 (original code still works fine / was not able to find a good way to improve performance)

0.2.0:
- Issue: Sometimes a Pump was deleted from the list while it should not => SOLVED!
- Added: mod setting to enable/disable the behavior without reloading the game (initially enabled)
- Didn't encounter any problems with mega bases or huge amounts of enabled mods => actual version will be final as long as it is working.

0.1.1:
- Now saves between sessions (trains which would be affected prior to save now are processed after loading)