Is it possible to read logistic requests that are "in flight" on a space platform?
Posted: Tue Mar 25, 2025 12:49 pm
TL;DR
When a space platform has a logistic request that's being fulfilled from a planet, provide a way to read the quantity in flight in a script.
WHAT
Somewhere in the inner workings of the game, it already knows the number in flight, since this is seen in the tooltip when you hover over a request on a platform.
If I have access to the LogisticFilter for the request I care about, I'd like to get a way to query the count in flight. This value would be nil if nothing is in flight, or if the LogisticFilter is owned by (e.g.) a LuaConstantCombinatorControlBehavior, but for requests with items in flight, it would hold a non-zero value.
WHY
There are cases where I want to perform an action when I know a logistic request will be fulfilled, even though the last set of items are still in flight. An example of this is on Gleba, as soon as there are enough Agricultural packs to satisfy the logistic request, I want to shut down production of Agricultural packs. I'm using Earendel's Signal Transmission mod to let the ship send a signal to the planet telling it to stop production when it has enough Agricultural packs.
The problem with this is that the signal is sent only after they have all arrived, meaning production continues needlessly while the last batch are in flight. If I know both the count on board and the count in flight, I can stop production the instant enough have been made.
When a space platform has a logistic request that's being fulfilled from a planet, provide a way to read the quantity in flight in a script.
WHAT
Somewhere in the inner workings of the game, it already knows the number in flight, since this is seen in the tooltip when you hover over a request on a platform.
If I have access to the LogisticFilter for the request I care about, I'd like to get a way to query the count in flight. This value would be nil if nothing is in flight, or if the LogisticFilter is owned by (e.g.) a LuaConstantCombinatorControlBehavior, but for requests with items in flight, it would hold a non-zero value.
WHY
There are cases where I want to perform an action when I know a logistic request will be fulfilled, even though the last set of items are still in flight. An example of this is on Gleba, as soon as there are enough Agricultural packs to satisfy the logistic request, I want to shut down production of Agricultural packs. I'm using Earendel's Signal Transmission mod to let the ship send a signal to the planet telling it to stop production when it has enough Agricultural packs.
The problem with this is that the signal is sent only after they have all arrived, meaning production continues needlessly while the last batch are in flight. If I know both the count on board and the count in flight, I can stop production the instant enough have been made.