allow to unlock modules when destroying defence stations

This commit is contained in:
2026-06-10 21:43:48 +02:00
parent aad094f842
commit af96b95f61
19 changed files with 203 additions and 51 deletions

View File

@@ -16,6 +16,8 @@
#include "ShipSystem.h"
#include "StationBodyComponent.h"
#include "WeaponComponent.h"
#include "ModulesConfig.h"
#include "ShipsConfig.h"
#include "Simulation.h"
#include "Tick.h"
#include "WaveSystem.h"
@@ -278,10 +280,13 @@ TEST_CASE("WaveSystem: push schematic drop awards a known ship id", "[wave]")
bool validId = false;
for (const ShipDef& def : sim.config().ships.ships)
{
if (def.id == events[0].schematicId)
if (def.id == events[0].schematicId) { validId = true; break; }
}
if (!validId)
{
for (const ModuleDef& def : sim.config().modules.modules)
{
validId = true;
break;
if (def.id == events[0].schematicId) { validId = true; break; }
}
}
REQUIRE(validId);