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

@@ -194,16 +194,19 @@ void GameWorldView::onFrame()
m_sim->drainSchematicDropEvents();
for (const SchematicDropEvent& ev : drops)
{
const QString shipName = toDisplayName(ev.schematicId);
const QString name = toDisplayName(ev.schematicId);
ToastEntry toast;
if (ev.wasNewUnlock)
if (ev.isModuleSchematic)
{
toast.text = "Schematic unlocked: " + shipName;
toast.text = ev.wasNewUnlock
? tr("Module unlocked: ") + name
: name + tr(" production level -> ") + QString::number(ev.newLevel);
}
else
{
toast.text = shipName + " production level -> "
+ QString::number(ev.newLevel);
toast.text = ev.wasNewUnlock
? tr("Schematic unlocked: ") + name
: name + tr(" production level -> ") + QString::number(ev.newLevel);
}
toast.createdWallMs = m_wallMs;
m_toasts.push_back(toast);