extract the production rules as free functions over config and building

This commit is contained in:
2026-08-05 06:49:15 +02:00
parent 58b94223f7
commit 9c3be0fbd0
7 changed files with 199 additions and 158 deletions

View File

@@ -1,5 +1,6 @@
#include "GameWorldView.h"
#include "FactoryQueries.h"
#include "ProductionRules.h"
#include <algorithm>
#include <cctype>
@@ -1341,7 +1342,7 @@ void GameWorldView::drawBuildings(QPainter& painter)
// building footprints are rectangular, so a corner of the axis-aligned
// bounding box is the true corner.
if (const std::optional<ProductionStatus> status =
m_sim->getBuildings().getProductionStatus(b))
getProductionStatus(m_sim->getConfig(), b))
{
const float px = getTilePx();
const float r = px * 0.18f;