17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

feat(editor): add R500 double slip

This commit is contained in:
maj00r
2026-10-03 01:38:40 +02:00
parent 4d060f166e
commit 7825b92190

View File

@@ -1287,13 +1287,12 @@ std::vector<editor_track::switch_template> editor_track::standard_switch_templat
{"Rz 1:26,5 R2500", 2500.0, 26.5, 0.0, 0.0},
};
std::vector<switch_template> result;
for (auto const radius : {190.0, 300.0})
for (auto const &definition : {std::pair<double, char const *>{190.0, "1:9"}, {300.0, "1:9"}, {500.0, "1:12"}})
{
switch_template slip;
slip.double_slip = true;
slip.radius = radius;
slip.ratio = 9.0;
slip.label = "Rkpd 1:9 R" + std::to_string(static_cast<int>(radius)) + " double slip (click at a crossing of two straights)";
slip.radius = definition.first;
slip.label = std::string{"Rkpd "} + definition.second + " R" + std::to_string(static_cast<int>(definition.first)) + " double slip (click at a crossing of two straights)";
result.push_back(slip);
}
for (auto const &definition : definitions)