17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-01 13:44:49 +01:00

feat(editor): a scenery begun from nothing is asked for its terrain as the first track is laid

With the lay tool on, a scenery with no tracks nor terrain chunks gets the offer of the terrain model and the aerial photos
around the camera; without a place yet it asks for the PUWG 1992 coordinates of this point, as geoportal.gov.pl gives them,
and keeps them as the place of its orthophoto. The offer can be turned off (editor setting terrain_offer). Self-test
nmtoffer.
This commit is contained in:
maj00r
2026-10-18 13:02:01 +02:00
parent 5af699fba4
commit 5a00d88be9
7 changed files with 129 additions and 0 deletions

View File

@@ -104,6 +104,8 @@ bool editorSettings::load()
parse(value, m_palette);
else if (key == "first_steps")
m_first_steps = (value == "1");
else if (key == "terrain_offer")
m_terrain_offer = (value == "1");
else if (key == "track_tools_all")
m_track_tools_more = (value == "1");
else if (key.rfind(origin_prefix, 0) == 0)
@@ -150,6 +152,7 @@ bool editorSettings::save()
stream << "nodebank_card " << m_nodebank_card << "\n";
stream << "colours " << m_palette << "\n";
stream << "first_steps " << (m_first_steps ? 1 : 0) << "\n";
stream << "terrain_offer " << (m_terrain_offer ? 1 : 0) << "\n";
stream << "track_tools_all " << (m_track_tools_more ? 1 : 0) << "\n";
stream << std::fixed << std::setprecision(3);
for (auto const &origin : m_orthophoto_origins)

View File

@@ -56,6 +56,9 @@ public:
bool first_steps() const { return m_first_steps; }
void first_steps(bool Show) { m_first_steps = Show; }
// a scenery begun with no terrain is offered the terrain model as the first track is laid
bool terrain_offer() const { return m_terrain_offer; }
void terrain_offer(bool Offer) { m_terrain_offer = Offer; }
bool track_tools_more() const { return m_track_tools_more; }
void track_tools_more(bool Show) { m_track_tools_more = Show; }
@@ -69,6 +72,7 @@ private:
int m_nodebank_card{96};
int m_palette{0};
bool m_first_steps{true};
bool m_terrain_offer{true};
bool m_track_tools_more{false};
};