fix issue where shipyard did not produce anything

This commit is contained in:
2026-04-21 22:17:48 +02:00
parent 2523cd6a1b
commit 393c49e1bb
12 changed files with 393 additions and 16 deletions

View File

@@ -52,6 +52,7 @@ TEST_CASE("CombatSystem: ship fires when cooldown=0 and target in range", "[comb
BuildingSystem buildings(cfg, belts,
[&nextBldId]() { return nextBldId++; },
[](int){},
[](const std::string&, QVector2D) {},
rng);
// Spawn an enemy combat ship close to the player side.
@@ -112,6 +113,7 @@ TEST_CASE("CombatSystem: cooldown prevents firing before it expires", "[combat]"
BuildingSystem buildings(cfg, belts,
[&nextBldId]() { return nextBldId++; },
[](int){},
[](const std::string&, QVector2D) {},
rng);
const EntityId enemyId = ships.spawn(combatDef->id, 1, QVector2D(5.0f, 5.0f), true);
@@ -160,6 +162,7 @@ TEST_CASE("CombatSystem: no fire when target is out of range", "[combat]")
BuildingSystem buildings(cfg, belts,
[&nextBldId]() { return nextBldId++; },
[](int){},
[](const std::string&, QVector2D) {},
rng);
const EntityId enemyId = ships.spawn(combatDef->id, 1, QVector2D(0.0f, 0.0f), true);