Ability to follow belts and transport lines
Ability to follow belts and transport lines
I wrote some lua yesterday to follow a belt/LuaTransportLine to its end. It would be nice if this and related functionality was present in the API to be queried. I'd like to be able to ask a belt entity which belt(s) feed into it from which side(s), and which belt/underground/splitter it fees into, and/or the same for one or both luatransportlines on the belt.
Re: Ability to follow belts and transport lines
If this is in 0.14, I missed it. If it's scheduled for 0.15, hooray. If not, bump.
Re: Ability to follow belts and transport lines
Another bump. 80% of the code in Belt Combinators and Belt Overflow is just to be able to follow a belt to the end. I am slowly resolving bugs in my code, but doubt it will ever be perfect given the complexity. Also it would be much faster to use the information that must already exist for normal belt flow.
Re: Ability to follow belts and transport lines
Being able to trace this faster would also make it feasible to make a mod that displays "what is produced with all the ingredients flowing down this belt?"
Re: Ability to follow belts and transport lines
Another impending release, another bump. Would love to have this in 0.17 so I can get rid of 90% of the lua code and 99% of the cpu thrashing in my Belt Overflow mod, and now also so I can fix a bug in my mod that is going to be very difficult to fix otherwise.
Re: Ability to follow belts and transport lines
Here's another mod that could make use of this feature: https://www.reddit.com/r/factorio/comme ... way_to_go/
Re: Ability to follow belts and transport lines
See 63535
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Ability to follow belts and transport lines
.output_lines is not sufficient for figuring out if a belt is a curve or sideloaded. I find my belt-following mods still need all the same old logic for figuring out which belts are pointing at and pointed at by which other belts.
The game must know this, in at least two different places. First, the rendering of whole belts uses it, to show or not show a curved belt. Second, the belt to belt item transition code uses it, to decide whether to insert a new item at the back of the belt or at the side load position.
The game must know this, in at least two different places. First, the rendering of whole belts uses it, to show or not show a curved belt. Second, the belt to belt item transition code uses it, to decide whether to insert a new item at the back of the belt or at the side load position.
Re: Ability to follow belts and transport lines
You asked for where it leads, you get where it leads with output lines - you get another lua transport line which tells you the entity and the side, so exactly what your first post asks for.
If you want something different, make a request for that instead of posting here again.
If you want something different, make a request for that instead of posting here again.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Ability to follow belts and transport lines
Yes it is. Example for a simple transport belt: Get output lines of both transport lines. Compare if output lines point to same line -> sideloading, if they point to different lines -> just "the next belt".sparr wrote: Tue Mar 26, 2019 12:58 am .output_lines is not sufficient for figuring out if a belt is a curve or sideloaded.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Ability to follow belts and transport lines
sparr wrote: Wed Jun 01, 2016 5:56 pmI'd like to be able to ask a belt entity which belt(s) feed into it from which side(s)
Re: Ability to follow belts and transport lines
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.