mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 01:30:16 +01:00
feat(editor): the tracks are laid to the PKP PLK norms only: the choice of the free laying is gone, its cards in the panels of the laying and of the plan, the question as the laying starts and the setting; the transition curves and the cant of the norms always, the speed of the laying with its chips, the radius below the minimum for the speed a warning. The settings keep the radii the bends of the straights will be eased with instead
This commit is contained in:
@@ -493,11 +493,6 @@ void editor_mode::show_track_tab(track_tab const Wanted)
|
||||
m_switch.armed = -1;
|
||||
m_signal.armed = false;
|
||||
m_track_tab = Tab;
|
||||
if ((Tab == track_tab::lay || Tab == track_tab::straights || Tab == track_tab::route) && false == m_norms_asked && EditorSettings.norms() == editorSettings::track_norms::ask && std::getenv("EU07_EDITOR_SELFTEST") == nullptr)
|
||||
{
|
||||
m_norms_asked = true;
|
||||
m_norms_prompt = true;
|
||||
}
|
||||
auto *track{selected_track()};
|
||||
switch (Tab)
|
||||
{
|
||||
@@ -1854,8 +1849,7 @@ std::string editor_mode::track_readout() const
|
||||
auto text{radius > 0.0 ? format("L %.2f m R %.0f m", length, radius) + speed_of(radius, laying_norms()) : format("L %.2f m %s", length, STR_C("straight"))};
|
||||
if (auto const eased{eased_of(m_eased_last)}; false == eased.empty())
|
||||
text += "\n" + eased;
|
||||
if (false == m_norms_free)
|
||||
text += "\n" + design_speed_of(m_extend.track, snapped ? target.track : nullptr);
|
||||
text += "\n" + design_speed_of(m_extend.track, snapped ? target.track : nullptr);
|
||||
if (auto const vertical{vertical_of(pieces)}; false == vertical.empty())
|
||||
text += "\n" + vertical;
|
||||
if (snapped)
|
||||
@@ -1890,7 +1884,6 @@ std::string editor_mode::track_readout() const
|
||||
text = format("L %.1f m %s", lay.preview_length, STR_C("straight"));
|
||||
if (auto const eased{eased_of(m_eased_last)}; false == eased.empty())
|
||||
text += "\n" + eased;
|
||||
if (false == m_norms_free)
|
||||
{
|
||||
auto const [from, to]{laying_ends()};
|
||||
text += "\n" + design_speed_of(from, to);
|
||||
@@ -2009,7 +2002,7 @@ std::string editor_mode::track_shaping(bool const Joined) const
|
||||
auto text{std::string{STR_C(names[static_cast<int>(m_track_layout)])}};
|
||||
if (m_track_layout == track_layout::arc_straight || m_track_layout == track_layout::straight_arc)
|
||||
text += format(" R %.0f m", m_lay.radius);
|
||||
return text + "\n" + STR("Ctrl+wheel: radius, Shift+wheel: arc / straight") + (m_norms_free ? std::string{} : STR(", Ctrl+Shift+wheel: speed"));
|
||||
return text + "\n" + STR("Ctrl+wheel: radius, Shift+wheel: arc / straight") + STR(", Ctrl+Shift+wheel: speed");
|
||||
}
|
||||
auto const &join{m_join_last};
|
||||
char const *const kinds[]{"", "straight", "arc", "curve", "reverse curve", "free curve"};
|
||||
@@ -2024,7 +2017,7 @@ std::string editor_mode::track_shaping(bool const Joined) const
|
||||
text += format(" V %.0f km/h", join.speed);
|
||||
if (join.variants > 1)
|
||||
text += format(" %d/%d", (m_join_variant % join.variants + join.variants) % join.variants + 1, join.variants);
|
||||
return text + "\n" + STR("Ctrl+wheel: radius, Shift+wheel: another shape") + (m_norms_free ? std::string{} : STR(", Ctrl+Shift+wheel: speed"));
|
||||
return text + "\n" + STR("Ctrl+wheel: radius, Shift+wheel: another shape") + STR(", Ctrl+Shift+wheel: speed");
|
||||
}
|
||||
|
||||
void editor_mode::draw_empty_scenery_hint()
|
||||
|
||||
Reference in New Issue
Block a user