Factory connectors are Satisfactory’s system for transferring items from one machine to the next. Conveyors also utilize factory connectors to transfer items from a machine into its internal buffer (the belt).
The Factory-Connector-System is a pull-based system.
That means if a machine has an empty internal buffer and wants to get filled by a factory connector,
the machine requests (via a Grab call) an item from the given connector.
The connector can then reply with nothing (if there aren’t any items) or the item it transfers.
If it returns something, the caller (the machine) needs to
make sure it does something with that item,
else the item just disappears.
The Factory-Connector itself asks its connected
Factory-Connector or it’s outer object to return an item.
A machine (
AFGBuildable) contains a Factory-Connector which contains a
reference to a connected one, and that one will grab the item from the connected machine (belt).
This is a flow example of a machine output of the Grab calls.
A conveyor which has a free space → FactoryConnector in the conveyor which is connected to the machines connector → Factory-Connector of the machine which is connected to the connector of the conveyor → Machine
This is a flow example of a machine input of the Grab calls.
Machine → Factory-Connector of the machine connected to the connector of the conveyor → Factory-Connector of the conveyor connected to the connector of the machine → Conveyor
If the machine just want to know what it can grab without actually transferring any items, then it can use the Peek functions. An example use case of this is filtering what it allows on the input side. These Peek functions work mostly the same as the Grab functions, except they don’t actually cause a item transfer to happen.
It is highly recommended to do item transfers, peeks, etc. in the Factory Tick call so that they are optimized for multiple cores.
FGBuildable adds two functions.
This function gets called by
FGFactoryConnector`s which have the `mForwardPeekAndGrabToBuildable option enabled.
Information about what connector wants to grab is passed and the function returns what actually gets grabed.
If you interact with a inventory or what ever, you need to make sure that you have removed the item from it, else the component could grab indefinetly, and that’s not what we want.
UFGFactoryConnectionComponent is a
USceneComponent used to implement a Factory-Connector.
Use this directly as a component for you
- M Connector
The material type of connection. (Solid, Liquid, or Gas)
- M Direction
The I/O direction of the factory connector. If it receives items or if it sends items.
- M Connector Clearance
The distance after which the connected conveyor is allowed to bend.
- M Forward Peek and Grab to Buildable
If the grab and peeks should get redirected to the owner (just