move the placement rules and the config-dependent queries off BuildingSystem
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user