add BuildingGrid to manage tile occupancy

This commit is contained in:
2026-08-04 18:26:01 +02:00
parent 3990351a16
commit 60cc187d92
5 changed files with 121 additions and 43 deletions

View File

@@ -15,6 +15,7 @@
#include "BeltSystem.h"
#include "Building.h"
#include "BuildingGrid.h"
#include "BuildingType.h"
#include "BuildingId.h"
#include "GameConfig.h"
@@ -309,6 +310,7 @@ private:
};
std::deque<DeconstructionEntry> m_deconstructionQueue;
// Maps every occupied body-cell coordinate to the entity that owns it.
std::map<std::pair<int, int>, BuildingId> m_tileOccupancy;
// The authority on which building owns which tile; every placement and removal
// path claims and releases its body cells here.
BuildingGrid m_grid;
};