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

@@ -108,9 +108,11 @@ ShipStatsPanel::ShipStatsPanel(const GameConfig* config, QWidget* parent)
void ShipStatsPanel::refresh(const std::string& shipId,
int level,
const std::vector<PlacedModule>& modules)
const std::vector<PlacedModule>& modules,
const std::map<std::string, int>& moduleLevelOverrides)
{
const ShipStats stats = calculateShipStats(*m_config, shipId, level, modules);
const ShipStats stats = calculateShipStats(*m_config, shipId, level, modules,
moduleLevelOverrides);
const QString hpText = tr("HP: %1").arg(static_cast<int>(stats.hp + 0.5f));
applyStats(stats, hpText);
}