dont require output belts to be aligned with output ports

This commit is contained in:
2026-04-22 21:15:39 +02:00
parent 36d6842f71
commit f29dc9862a
6 changed files with 45 additions and 61 deletions

View File

@@ -92,18 +92,14 @@ void BeltSystem::setSplitterFilters(QPoint tile,
// Port interface
// ---------------------------------------------------------------------------
bool BeltSystem::tryPutItem(Port port, Item item)
bool BeltSystem::tryPutItem(QPoint tile, Item item)
{
const std::map<std::pair<int, int>, BeltTile>::iterator it = m_belts.find(key(port.tile));
const std::map<std::pair<int, int>, BeltTile>::iterator it = m_belts.find(key(tile));
if (it == m_belts.end())
{
return false;
}
if (it->second.direction != port.direction)
{
return false;
}
return tryPlaceOnBelt(port.tile, item);
return tryPlaceOnBelt(tile, item);
}
std::optional<Item> BeltSystem::tryTakeItem(Port port)