Platform GTFO (Stop rocket deliveries when leaving)


Fixes the bug(?) where platforms do not stop getting deliveries while some are still on the way despite wanting to leave. Works by triggering the next stop in the schedule as if the user had clicked in the GUI. (See mod page) Useful if your Gleba hauler wants to leave after a time, but a slow trickle of resources stops it from leaving. The mod should fix it for all platforms, by automatically evaluating wait conditions. But can also be triggered to leave using a circuit.

Utilities
28 days ago
2.0
21
Logistics
Owner:
Hexcoder
Source:
https://github.com/rbnelr/hexcoder-pl...
Homepage:
N/A
License:
MIT
Created:
29 days ago
Latest Version:
0.1.2 (28 days ago)
Factorio version:
2.0
Downloaded by:
21 users

Why

Fixes the bug(?) where platforms do not stop getting deliveries while some are still on the way despite wanting to leave.
Works by triggering the next stop in the schedule as if the user had clicked in the GUI.

Useful if your Gleba hauler wants to leave on a time condition, but a slow trickle of resources ends up preventing it from leaving.
The mod should fix it for all platforms, by automatically evaluating wait conditions.
But can also be triggered to leave using a circuit.


Explanation

When the player clicks on another stop in the platform schedule, the platform will wait for any rockets still on the way, but new rockets will not launch anymore.
You may want a time condition on your Gleba ship to trigger it to leave, but this time it will keep requesting and only leave once no rockets are on the way for at least a short moment.
This makes it possible for a slow trickle of resources to completely prevent the time condition from working.

This mod can fix the problem by triggering the next stop in the schedule as if the user had clicked in the GUI.
Of course the mod needs to figure out when to leave, but the modding API gives no easy way to check if the wait conditions are fulfilled or not, so I had to implement every single wait conditions alongside the AND/OR logic from scratch, welp...


Auto wait conditions

The mod should fix it for all platforms, by automatically evaluating wait conditions.
But you can turn this off in the settings should you find a bug (please let me know).
The damage condition is not supported at all, as there seems to be no API to compute it. (Evaluates to false, which is not a problem if there is an OR time condition)

Circuit 'GTFO' Signal

Sending the configured signal (default is hourglass) will trigger the same logic, forcing the platform to move on.
A suggested circuit to simulate a time condition at Gleba (C is in ticks so seconds*60):
(Don't forget to enable 'send to platform')