dont require output belts to be aligned with output ports
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user