delete the unused getAllBeltTiles and BeltTileInfo
This commit is contained in:
@@ -1263,38 +1263,6 @@ void BuildingSystem::forEachIncomingItem(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::vector<BuildingSystem::BeltTileInfo> BuildingSystem::getAllBeltTiles() const
|
|
||||||
{
|
|
||||||
std::vector<BeltTileInfo> result;
|
|
||||||
for (const Building& b : m_state.buildings)
|
|
||||||
{
|
|
||||||
if (b.type != BuildingType::Belt && b.type != BuildingType::Splitter)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
BeltTileInfo info;
|
|
||||||
info.buildingId = b.id;
|
|
||||||
info.tile = b.bodyCells.empty() ? b.anchor : b.bodyCells[0];
|
|
||||||
info.type = b.type;
|
|
||||||
if (!b.outputPorts.empty())
|
|
||||||
{
|
|
||||||
info.directionA = b.outputPorts[0].direction;
|
|
||||||
info.directionB = b.outputPorts[0].direction;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
info.directionA = b.rotation;
|
|
||||||
info.directionB = b.rotation;
|
|
||||||
}
|
|
||||||
if (b.type == BuildingType::Splitter && b.outputPorts.size() >= 2)
|
|
||||||
{
|
|
||||||
info.directionB = b.outputPorts[1].direction;
|
|
||||||
}
|
|
||||||
result.push_back(info);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::optional<BuildingId> BuildingSystem::findRotateInPlaceTarget(
|
std::optional<BuildingId> BuildingSystem::findRotateInPlaceTarget(
|
||||||
BuildingType type, QPoint anchor, Rotation rot) const
|
BuildingType type, QPoint anchor, Rotation rot) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -119,14 +119,6 @@ public:
|
|||||||
void tickOutputBelts();
|
void tickOutputBelts();
|
||||||
|
|
||||||
// -- Queries -------------------------------------------------------------
|
// -- Queries -------------------------------------------------------------
|
||||||
struct BeltTileInfo
|
|
||||||
{
|
|
||||||
BuildingId buildingId;
|
|
||||||
QPoint tile;
|
|
||||||
BuildingType type; // Belt or Splitter
|
|
||||||
Rotation directionA; // Belt: its direction; Splitter: first output
|
|
||||||
Rotation directionB; // Splitter: second output; Belt: same as directionA
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// REQ-UI-DEBUG-OVERLAY "Max Factory Production": count of completed
|
// REQ-UI-DEBUG-OVERLAY "Max Factory Production": count of completed
|
||||||
@@ -139,7 +131,6 @@ public:
|
|||||||
// nullopt for building types that show no light (belts, splitters, tunnels,
|
// nullopt for building types that show no light (belts, splitters, tunnels,
|
||||||
// HQ, defence stations). The Salvage Bay is a two-state special case:
|
// HQ, defence stations). The Salvage Bay is a two-state special case:
|
||||||
// Producing while its output buffer holds scrap, Starved when empty.
|
// Producing while its output buffer holds scrap, Starved when empty.
|
||||||
std::vector<BeltTileInfo> getAllBeltTiles() const;
|
|
||||||
|
|
||||||
// Visits every item currently emerging from a building output port on its
|
// Visits every item currently emerging from a building output port on its
|
||||||
// virtual output belt (REQ-MAT-OUTPUT-EMERGE), passing the item type and its
|
// virtual output belt (REQ-MAT-OUTPUT-EMERGE), passing the item type and its
|
||||||
|
|||||||
Reference in New Issue
Block a user