fix bug where splitter filters were not taken over to blueprint

This commit is contained in:
2026-06-23 21:08:46 +02:00
parent d271d65678
commit 577927ef70
6 changed files with 123 additions and 2 deletions

View File

@@ -201,6 +201,16 @@ Blueprint BlueprintPanel::createBlueprintFromSelection() const
bb.offset = e.building->anchor - center;
bb.recipeId = e.building->recipeId;
bb.shipLayout = e.building->shipLayout;
if (e.building->type == BuildingType::Splitter)
{
const std::optional<BeltSystem::SplitterInfo> info =
m_sim->belts().getSplitterInfo(e.building->anchor);
if (info.has_value())
{
bb.splitterFilterA = info->filterA;
bb.splitterFilterB = info->filterB;
}
}
bp.buildings.push_back(bb);
}
return bp;