move the placement rules and the config-dependent queries off BuildingSystem

This commit is contained in:
2026-08-05 06:49:49 +02:00
parent 537597c854
commit d87d063b10
14 changed files with 340 additions and 274 deletions

View File

@@ -1,6 +1,7 @@
#include "Simulation.h"
#include "FactoryQueries.h"
#include "PlacementRules.h"
#include <algorithm>
#include <cassert>
@@ -860,7 +861,7 @@ std::optional<BuildingId> Simulation::tryPlaceBuilding(BuildingType type, QPoint
return std::nullopt;
}
if (!m_buildingSystem->isPlacementValid(type, anchor, rotation))
if (!isPlacementValid(m_factoryState, m_config, type, anchor, rotation))
{
return std::nullopt;
}