rename EntityId to BuildingId

This commit is contained in:
2026-05-23 07:53:56 +02:00
parent dc4ebd5f2d
commit b57299fd2a
28 changed files with 273 additions and 274 deletions

View File

@@ -32,7 +32,7 @@ struct Fixture
{
GameConfig cfg;
BeltSystem belts;
EntityId nextId;
BuildingId nextBuildingId;
int stock;
std::mt19937 rng;
EntityAdmin admin;
@@ -46,11 +46,11 @@ struct Fixture
explicit Fixture()
: cfg(loadConfig())
, belts(cfg.world.beltSpeedTilesPerSecond)
, nextId(1)
, nextBuildingId(1)
, stock(0)
, rng(42)
, buildings(cfg, belts,
[this]() { return nextId++; },
[this]() { return nextBuildingId++; },
[this](int n) { stock += n; },
[](const std::string&, QVector2D, const std::optional<ShipLayoutConfig>&) {},
rng)
@@ -365,7 +365,7 @@ TEST_CASE("BehaviorSystem: full-cargo salvage ship moves toward SalvageBay", "[b
{
Fixture f;
const EntityId bayId = f.buildings.place(BuildingType::SalvageBay,
const BuildingId bayId = f.buildings.place(BuildingType::SalvageBay,
QPoint(-4, 0), Rotation::East, 0);
Tick t = 0;
for (int i = 0; i < 500; ++i)