show recipes visually instead of describing them in text
This commit is contained in:
@@ -83,20 +83,11 @@ BufferedBuildingContent::CycleInfo ShipyardContent::getCycleInfo(
|
||||
*getContext().config, target.recipeId, target.shipLayout);
|
||||
|
||||
// A shipyard's output is the ship itself, which never lands in an item buffer -- so
|
||||
// the summary shows one ship rather than an item id.
|
||||
info.durationSeconds = shipDef->schematic.productionTimeSeconds;
|
||||
if (target.shipLayout.has_value())
|
||||
{
|
||||
for (const PlacedModule& placed : target.shipLayout->placedModules)
|
||||
{
|
||||
const ModuleDef* moduleDef =
|
||||
getContext().config->modules.findModuleDef(placed.moduleId);
|
||||
if (moduleDef)
|
||||
{
|
||||
info.durationSeconds += moduleDef->productionTimeSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
// the summary shows no output item at all. The time is the schematic's plus its
|
||||
// modules', from the same place the layout dialog's build cost reads it
|
||||
// (REQ-MOD-PRODUCTION-TIME).
|
||||
info.durationSeconds = computeShipyardProductionTimeSeconds(
|
||||
*getContext().config, target.recipeId, target.shipLayout);
|
||||
info.runsProduction = true;
|
||||
return info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user