Industrial Belt Crossings


Compact 1×1 belt crossings with independent straight-through flows and lanes. Uses connected belt speeds, preserves quality and belt stacks, and needs no electricity.

Content
10 hours ago
2.0 - 2.1
284
Logistics

i Right Angle Belt Connection

9 days ago

Is there any way to have a right-angle belt connect to the crossing? Following the example you show on the info page, I'd like to have that copper ore belt run directly along side the iron ore belts rather than 1 tile up.

[deleted message]
9 days ago

Oh, never mind - I played around with them a bit myself and realized what you meant.

9 days ago

Done

8 days ago
(updated 8 days ago)

Thanks for the quick update. I'm still running Factorio 2.0, so I don't have 'get_item_position'. I made the following backward compatibility edit in control.lua around line 161.
[code]
-- LuaTransportLine.get_item_position only exists in Factorio 2.1+. On 2.0,
-- merely indexing the missing key raises an error, so probe it with pcall.
local ok,pos=pcall(function()return line.get_item_position(#line)end)
if ok and type(pos)=='number' then
last=pos
else
...
[/code]

I also had to work around some proxy validity errors. Around line 112 I added the following:
[code]
-- A stale (invalid) reference is not nil, so it used to slip past the
-- "if not proxy" creation below and crash on first use. Drop it so it is rebuilt.
if proxy and not proxy.valid then r.proxy=nil;proxy=nil;r.dirty=true end
[/code]

Before (old) line 129 I added:
``` if not proxy.valid then r.proxy=nil;r.dirty=true;return end

And I wrapped the proxy.disabled_by_script = true statement on line 130 with this check:
``` if proxy.valid then proxy.disabled_by_script=true else r.proxy=nil;r.dirty=true end

(sorry, I obviously don't know how to format code for this forum)

[deleted message]
8 days ago

I’ve added a separate version 1.0.7, which works with Factorio 2.0. If you run into any other issues or have any suggestions, just let me know!

This thread has been locked.