18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 23:14:59 +01:00

feat(physicslog): the logs of the trains only, physicslog.trains

"physicslog.trains yes" in eu07.ini writes the .dat log of each driver who
drives rail vehicles, not of the passengers nor of the road vehicles that make
"physicslog yes" hundreds of files on a big scenery: the tape of every train.
A driver made primary later begins its log then, and isn't counted while it
doesn't log. The black box goes with it when the ini says nothing of its own,
and doesn't write a second log of a driver writing its own. The doc tells the
doors' sides are the vehicle's, the driver's swapped in the rear cab.
This commit is contained in:
maj00r
2026-11-15 23:48:23 +01:00
parent 043b9fb2f0
commit b7950af6b6
5 changed files with 54 additions and 14 deletions

View File

@@ -538,6 +538,13 @@ bool global_settings::ConfigParseSimulation(cParser& Parser, const std::string&
return true;
}
// the physics logs of the trains only, of the drivers of rail vehicles; "physicslog yes" writes them all anyway
if (token == "physicslog.trains")
{
ParseOne(Parser, WriteTrainLogFlag);
return true;
}
if (token == "blackbox")
{
bool blackbox{false};
@@ -1737,6 +1744,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "sound.volume.ambient", EnvironmentAmbientVolume );
export_as_text( Output, "sound.asyncload", AudioAsyncLoad );
export_as_text( Output, "physicslog", WriteLogFlag );
export_as_text( Output, "physicslog.trains", WriteTrainLogFlag );
if( BlackBox ) {
export_as_text( Output, "blackbox", *BlackBox );
}