Hello everyone, hello dear dev's
I am trying to create a mod which allows you, to built speed editable belt's.
There I have to get the Belt-Line to change the speed, do the electricity calculation and more.
It would be nice, if there would be a way to get all Belt's of one line.
I know there is the belt_neighbors which gives you the neighbor of a single belt.
But I hoped, that you could get all the belt entities from a belt line in one table, to get a better performance.
If you don't store them while creating the path for the Items, you don't need to implement this.
But if the data is already stored in a variable, it would be nice if I could access the variable through the api.
Get Belts of belt Line
Re: Get Belts of belt Line
Belt speed is just changeable runtime so i'm not sure how this would be of any use to you.
If you want to get ahold of me I'm almost always on Discord.
Re: Get Belts of belt Line
I am not sure, if I understood your answer right, maybe I missed the context because englisch isn't my primary language.Rseding91 wrote: Sun Jan 31, 2021 12:49 am Belt speed is just changeable runtime so i'm not sure how this would be of any use to you.
So, can you change the Belt_speed while in-game? That's what I have understood from your message.
At the moment I do this with create_entity viewtopic.php?f=34&t=95188
And to my question, accessing all belts of one transport line would make it just easier for me, to handle the built and destroy-events. Because at the mpment I would have to loop through the blet_neighbors pretty often. Not every time a belt is built, but every time a belt is destroyed ore rotated I have to figure out, if the line changed, where it split's to two lines and so on.
So if there would be a way to access all Belt's of a transport line, I would not have to loop through the belt_neighbors and that would be good for the performance.
Re: Get Belts of belt Line
Sorry; I meant to say setting belt speeds runtime is *not* possible.
If you want to get ahold of me I'm almost always on Discord.
Re: Get Belts of belt Line
How you maybe saw in the vid, I decided to use create_entity to make it possible, At the moment I am creating the line-detection.Rseding91 wrote: Sun Jan 31, 2021 4:34 pm Sorry; I meant to say setting belt speeds runtime is *not* possible.
And that's the point where it would be nice, to get at least the positions of the belts in array.
at the moment I try it with belt_neighbour.