store ship module layout in shipyard blueprint
This commit is contained in:
@@ -504,18 +504,26 @@ void GameWorldView::placeBlueprintAtTile(QPoint center)
|
||||
}
|
||||
|
||||
const BuildingId id = m_sim->tryPlaceBuilding(bb.type, anchor, bb.rotation);
|
||||
if (id == kInvalidBuildingId || bb.recipeId.empty()) { continue; }
|
||||
if (id == kInvalidBuildingId) { continue; }
|
||||
|
||||
if (bb.type == BuildingType::Shipyard)
|
||||
if (!bb.recipeId.empty())
|
||||
{
|
||||
if (m_sim->isSchematicUnlocked(bb.recipeId))
|
||||
if (bb.type == BuildingType::Shipyard)
|
||||
{
|
||||
if (m_sim->isSchematicUnlocked(bb.recipeId))
|
||||
{
|
||||
m_sim->buildings().setRecipe(id, bb.recipeId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sim->buildings().setRecipe(id, bb.recipeId);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (bb.shipLayout.has_value())
|
||||
{
|
||||
m_sim->buildings().setRecipe(id, bb.recipeId);
|
||||
m_sim->buildings().setShipLayout(id, *bb.shipLayout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user