[RESOLVED] Determine if a belt is a corner/turn belt
Posted: Fri Dec 01, 2023 3:25 am
First:
Is there a function in the API or a characteristic of the belt entities that I can exploit to determine if a belt is a corner belt?
For example, a West facing belt is, as far as I can find, programatically identical to a West facing belt with a South facing belt adjacent to its North side.
Currently I'm brute forcing it by checking adjacent positions to the belt in question, but that feels hamhanded and wrong. I assume there's a better way to determine this and I just can't find it.
Second:
Is there a way to allow the belt to 'connect' to the building I'm creating in my mod? (same funcitonality as the nose of one belt connecting to the tail of another)
How would one go about adding 'belt connection points' to a building.
The building I'm making is larger than 1x1, so if the process is different for larger dimension buildings, what's that process?
Thanks for any help.
Is there a function in the API or a characteristic of the belt entities that I can exploit to determine if a belt is a corner belt?
For example, a West facing belt is, as far as I can find, programatically identical to a West facing belt with a South facing belt adjacent to its North side.
Currently I'm brute forcing it by checking adjacent positions to the belt in question, but that feels hamhanded and wrong. I assume there's a better way to determine this and I just can't find it.
Second:
Is there a way to allow the belt to 'connect' to the building I'm creating in my mod? (same funcitonality as the nose of one belt connecting to the tail of another)
How would one go about adding 'belt connection points' to a building.
The building I'm making is larger than 1x1, so if the process is different for larger dimension buildings, what's that process?
Thanks for any help.