Skip to content

Implement basic inserter functioonality #4

@luka177

Description

@luka177

Inserters are defined by InserterPrototype https://lua-api.factorio.com/latest/prototypes/InserterPrototype.html that was implemented in #ac6ddb3844c02cdba1f97e232ff60ee80ffcbd09
But simulatuion needs to be implemented
Inserters move in 2 axis, extending and rotating, they do so to move items from belt, item-on-grouind, output inventory of crafting machine, vehicle or chests into belt, item-on-ground (inserter never stacks item-on-ground), input inventory of crafting machine, vehicle or chest. inserter ALWAYS move item 180 degrees in their direction, that leads to item being moved by 2 tiles, as its picked up on a tile adjustment to inserter and is dropped off on opposite adjustment tile, but there is an exeption, long handed inserter that picks up and dropps off items across 1 tile moving item by 4 tiles. While in general items are picked up and dropped off at the center of the tile, that isnt true for belts where items are picked up at the point item is located on belt, and dropped off strictly on opposite side of belt to the inserter, also only if there is enough free spce on the belt, if the belt is tightly packed (no free space at all) inserter waits, if there is free spcae but not enough, items on belt behind the inserter wait untill there is enough free space. Inserters also typically move stacks of items, so inserter picks up an item and wait for next one for some timeout. Inserters never pick an item up unless at given tick there is a way to drop it off. Inserters choose shortest path at given time with no ahead of time guessing. If both rotation pathes are same in terms of distance CW is chosen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    InserterA basic entity that moves items short-range

    Projects

    Status

    ToDo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions