For my belt sorter mod I would like to make outgoing belts connect to the entity itself.
However currently I don't see a way to implement this. Spawning invisible belts below the entity doesn't help since there would be multiple outgoing belts and those outgoing belts only check for 1 belt on the beltSorter's tile it seems.
See also this screenshot: https://github.com/judos/beltSorter/issues/9
It would be cool to have a property to make belts automatically connect (visually change their input direction) to an entity.
Thanks for your feedback!
Cheers
Connect adjacent belts to entity
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Connect adjacent belts to entity
The base game is getting "loader" belts that do this sort of thing. There's a mod that enables the hidden entities: https://mods.factorio.com/mods/kij336/add-loader
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- DedlySpyder
- Filter Inserter
- Posts: 253
- Joined: Fri Jun 20, 2014 11:42 am
- Contact:
Re: Connect adjacent belts to entity
Pretty sure that loaders were scrapped from the game (replaced by stack inserters), but they included what they had on them for modders to useaubergine18 wrote:The base game is getting "loader" belts that do this sort of thing. There's a mod that enables the hidden entities: https://mods.factorio.com/mods/kij336/add-loader
Re: Connect adjacent belts to entity
Ok thanks to Nexela we could narrow down the problem.
Spawning multiple belts on the same tile helps and adjacend belts will connect. The problem is only 2 output belts will connect and it's always either only vertical or only horizontal. See also the image.
Spawning multiple belts on the same tile helps and adjacend belts will connect. The problem is only 2 output belts will connect and it's always either only vertical or only horizontal. See also the image.
- Attachments
-
- 3d15177a-790b-11e6-95c1-1d5368d4366e.png (213.91 KiB) Viewed 2809 times
Last edited by judos on Mon Sep 12, 2016 11:01 pm, edited 1 time in total.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Connect adjacent belts to entity
?See also the appendix.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: Connect adjacent belts to entity
I meant the image that I appended.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Connect adjacent belts to entity
For the curved belts, have you investigated their .direction/.orientation/etc? Maybe a combination of the two is what determines whether to use curved belt sprites? If so, you could potentially listen for changes in belts (create/destroy, etc) adjacent to your entity, and then ensure any that connect to your entity have the right combo of .direction and .orientation etc?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: Connect adjacent belts to entity
Just for giggles
Way too hacky to include reliably but a proof of concept. and gives me hope that it can be done!
Way too hacky to include reliably but a proof of concept. and gives me hope that it can be done!
- Attachments
-
- sorter.png (156.35 KiB) Viewed 2803 times
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Connect adjacent belts to entity
Which property was it - the .orientation or .direction or something else?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.