fix bug where buildings could not output directly on splitters
This commit is contained in:
@@ -199,7 +199,7 @@ void BeltSystem::reevaluateTunnelPairing()
|
||||
// Port interface
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
bool BeltSystem::tryPutItem(QPoint tile, Item item)
|
||||
bool BeltSystem::tryPutItem(QPoint tile, Item item, Rotation fromDir)
|
||||
{
|
||||
const std::map<std::pair<int, int>, BeltTile>::iterator bIt = m_belts.find(key(tile));
|
||||
if (bIt != m_belts.end())
|
||||
@@ -207,6 +207,19 @@ bool BeltSystem::tryPutItem(QPoint tile, Item item)
|
||||
return tryPlaceOnBelt(tile, item);
|
||||
}
|
||||
|
||||
const std::map<std::pair<int, int>, SplitterTile>::iterator splIt =
|
||||
m_splitters.find(key(tile));
|
||||
if (splIt != m_splitters.end())
|
||||
{
|
||||
if (!splIt->second.back)
|
||||
{
|
||||
splIt->second.back = BeltItemSlot{item, 0.0};
|
||||
splIt->second.backDir = fromDir;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::map<std::pair<int, int>, TunnelEntryTile>::iterator teIt =
|
||||
m_tunnelEntries.find(key(tile));
|
||||
if (teIt != m_tunnelEntries.end())
|
||||
|
||||
Reference in New Issue
Block a user