mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-21 02:37:28 +02: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:
@@ -82,6 +82,21 @@ editor_mode::selftest_result editor_mode::selftest_terrain(std::string const &co
|
||||
WriteLog("SELFTEST nmtmake " + where + ": " + m_nmt_state.status);
|
||||
return selftest_result::handled;
|
||||
}
|
||||
if (command == "nmtoffer")
|
||||
{
|
||||
// the offer of the terrain to a scenery begun from nothing: logged, and taken with the place given, if any
|
||||
double north{0.0}, east{0.0};
|
||||
words >> north >> east;
|
||||
WriteLog(format("SELFTEST nmtoffer: shown %d", m_nmt_state.prompt ? 1 : 0));
|
||||
if (north > 0.0 && east > 0.0 && m_nmt_state.prompt)
|
||||
{
|
||||
m_nmt_state.north = north;
|
||||
m_nmt_state.east = east;
|
||||
nmt_accept_offer();
|
||||
WriteLog("SELFTEST nmtoffer taken: " + m_nmt_state.status);
|
||||
}
|
||||
return selftest_result::handled;
|
||||
}
|
||||
if (command == "nmtwait")
|
||||
{
|
||||
// till the model is in and the chunks waiting for it are made
|
||||
|
||||
Reference in New Issue
Block a user