depend on factory data instead of BuildingSystem in the AI path

This commit is contained in:
2026-08-05 06:44:49 +02:00
parent 46932e4abf
commit 0408336cf9
17 changed files with 238 additions and 126 deletions

View File

@@ -52,3 +52,18 @@ bool isBeltSubsystemType(BuildingType type)
|| type == BuildingType::TunnelEntry
|| type == BuildingType::TunnelExit;
}
bool isProductionBuildingType(BuildingType type)
{
switch (type)
{
case BuildingType::Miner:
case BuildingType::Smelter:
case BuildingType::Assembler:
case BuildingType::ReprocessingPlant:
case BuildingType::Shipyard:
return true;
default:
return false;
}
}

View File

@@ -35,6 +35,10 @@ std::string buildingTypeId(BuildingType type);
// they receive, matching against every recipe of their building type.
bool isAutoRecipeBuildingType(BuildingType type);
// Buildings that run a production cycle: Miner, Smelter, Assembler, Reprocessing
// Plant and Shipyard (REQ-UI-DEBUG-OVERLAY counts these).
bool isProductionBuildingType(BuildingType type);
// Belts, splitters, and tunnel ends keep their runtime data in the belt subsystem
// rather than in the Building instance, so placing/removing them must register or
// unregister a tile with BeltSystem.