Remove schematic upgrades and module and ship levels

This commit is contained in:
2026-07-02 21:32:36 +02:00
parent 81b1c7a66b
commit 18e732ae99
43 changed files with 498 additions and 666 deletions

View File

@@ -107,8 +107,8 @@ TEST_CASE("CombatSystem: ship fires when cooldown=0 and target in range", "[comb
const ShipDef* combatDef = findCombatShip(f.cfg);
REQUIRE(combatDef != nullptr);
const entt::entity enemy = f.ships.spawn(combatDef->id, 1, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, 1, QVector2D(4.0f, 5.0f), false);
const entt::entity enemy = f.ships.spawn(combatDef->id, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, QVector2D(4.0f, 5.0f), false);
f.wireEnemyTarget(enemy, player);
const float hpBefore = f.admin.get<HealthComponent>(player).hp;
@@ -127,8 +127,8 @@ TEST_CASE("CombatSystem: cooldown prevents firing before it expires", "[combat]"
const ShipDef* combatDef = findCombatShip(f.cfg);
REQUIRE(combatDef != nullptr);
const entt::entity enemy = f.ships.spawn(combatDef->id, 1, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, 1, QVector2D(4.0f, 5.0f), false);
const entt::entity enemy = f.ships.spawn(combatDef->id, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, QVector2D(4.0f, 5.0f), false);
f.wireEnemyTarget(enemy, player);
{
@@ -163,8 +163,8 @@ TEST_CASE("CombatSystem: no fire when target is out of range", "[combat]")
const ShipDef* combatDef = findCombatShip(f.cfg);
REQUIRE(combatDef != nullptr);
const entt::entity enemy = f.ships.spawn(combatDef->id, 1, QVector2D(0.0f, 0.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, 1, QVector2D(500.0f, 0.0f), false);
const entt::entity enemy = f.ships.spawn(combatDef->id, QVector2D(0.0f, 0.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, QVector2D(500.0f, 0.0f), false);
f.wireEnemyTarget(enemy, player);
std::vector<BeamFiredEvent> events;
@@ -200,7 +200,7 @@ TEST_CASE("CombatSystem: player station fires at enemy ship in range", "[combat]
REQUIRE(combatDef != nullptr);
const entt::entity enemyShip = sim.ships().spawn(
combatDef->id, 1,
combatDef->id,
QVector2D(stationCenter.x() + 1.0f, stationCenter.y()),
/*isEnemy=*/true);
@@ -238,7 +238,7 @@ TEST_CASE("CombatSystem: enemy station fires at player ship in range", "[combat]
REQUIRE(combatDef != nullptr);
sim.ships().spawn(
combatDef->id, 1,
combatDef->id,
QVector2D(stationCenter.x() - 1.0f, stationCenter.y()),
/*isEnemy=*/false);
@@ -276,7 +276,7 @@ TEST_CASE("CombatSystem: player ship fires at enemy station in range", "[combat]
REQUIRE(combatDef != nullptr);
const entt::entity playerShip = sim.ships().spawn(
combatDef->id, 1,
combatDef->id,
QVector2D(stationCenter.x() - 1.0f, stationCenter.y()),
/*isEnemy=*/false);
@@ -304,8 +304,8 @@ TEST_CASE("CombatSystem: damage not applied before impact tick", "[combat]")
const ShipDef* combatDef = findCombatShip(f.cfg);
REQUIRE(combatDef != nullptr);
const entt::entity enemy = f.ships.spawn(combatDef->id, 1, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, 1, QVector2D(4.0f, 5.0f), false);
const entt::entity enemy = f.ships.spawn(combatDef->id, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, QVector2D(4.0f, 5.0f), false);
f.wireEnemyTarget(enemy, player);
const float hpBefore = f.admin.get<HealthComponent>(player).hp;
@@ -326,8 +326,8 @@ TEST_CASE("CombatSystem: damage applied exactly at impact tick", "[combat]")
const ShipDef* combatDef = findCombatShip(f.cfg);
REQUIRE(combatDef != nullptr);
const entt::entity enemy = f.ships.spawn(combatDef->id, 1, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, 1, QVector2D(4.0f, 5.0f), false);
const entt::entity enemy = f.ships.spawn(combatDef->id, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, QVector2D(4.0f, 5.0f), false);
f.wireEnemyTarget(enemy, player);
const float hpBefore = f.admin.get<HealthComponent>(player).hp;
@@ -345,8 +345,8 @@ TEST_CASE("CombatSystem: damage silently dropped if target already dead", "[comb
const ShipDef* combatDef = findCombatShip(f.cfg);
REQUIRE(combatDef != nullptr);
const entt::entity enemy = f.ships.spawn(combatDef->id, 1, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, 1, QVector2D(4.0f, 5.0f), false);
const entt::entity enemy = f.ships.spawn(combatDef->id, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, QVector2D(4.0f, 5.0f), false);
f.wireEnemyTarget(enemy, player);
std::vector<BeamFiredEvent> events;
@@ -366,8 +366,8 @@ TEST_CASE("CombatSystem: damage still applied if shooter already dead", "[combat
const ShipDef* combatDef = findCombatShip(f.cfg);
REQUIRE(combatDef != nullptr);
const entt::entity enemy = f.ships.spawn(combatDef->id, 1, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, 1, QVector2D(4.0f, 5.0f), false);
const entt::entity enemy = f.ships.spawn(combatDef->id, QVector2D(5.0f, 5.0f), true);
const entt::entity player = f.ships.spawn(combatDef->id, QVector2D(4.0f, 5.0f), false);
f.wireEnemyTarget(enemy, player);
const float hpBefore = f.admin.get<HealthComponent>(player).hp;
@@ -393,7 +393,7 @@ TEST_CASE("CombatSystem: dead ship is removed after tick step 9", "[combat]")
const ShipDef* combatDef = findCombatShip(sim.config());
REQUIRE(combatDef != nullptr);
const entt::entity ship = sim.ships().spawn(combatDef->id, 1,
const entt::entity ship = sim.ships().spawn(combatDef->id,
QVector2D(10.0f, 10.0f));
sim.admin().get<HealthComponent>(ship).hp = -1.0f;
@@ -411,7 +411,7 @@ TEST_CASE("CombatSystem: scrap is spawned on ship death", "[combat]")
// (REQ-RES-SCRAP-DROP): round(threat * scrap_per_threat). The interceptor's
// threat is 59.0 and the test config sets scrap_per_threat = 1.0, so it drops
// round(59.0 * 1.0) = 59 scrap.
const entt::entity ship = sim.ships().spawn("interceptor", 1,
const entt::entity ship = sim.ships().spawn("interceptor",
QVector2D(10.0f, 10.0f));
sim.admin().get<HealthComponent>(ship).hp = -1.0f;