mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 02:44:58 +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:
@@ -198,6 +198,9 @@ static const bool Humandriver = false;
|
||||
static const int maxorders = 64; // ilość rozkazów w tabelce
|
||||
static const int maxdriverfails = 4; // ile błędów może zrobić AI zanim zmieni nastawienie
|
||||
extern bool WriteLogFlag; // logowanie parametrów fizycznych
|
||||
// the physics logs of the trains only (physicslog.trains yes): of each driver of rail vehicles who drives them, not
|
||||
// of the passengers nor of the vehicles of the roads
|
||||
extern bool WriteTrainLogFlag;
|
||||
static const int BrakeAccTableSize = 20;
|
||||
|
||||
static const int gbh_NP = -2; //odciecie w hamulcu ogolnym
|
||||
@@ -723,7 +726,10 @@ private:
|
||||
// methods
|
||||
// the line of the log, to PhysicsLogs (utilities/physicslog.h)
|
||||
void PhysicsLog();
|
||||
// its log begun anew, its file emptied and given the header
|
||||
void begin_physicslog();
|
||||
// members
|
||||
bool PhysicsLogBegun = false; // its log was begun, by this driver
|
||||
double LastUpdatedTime = 0.0; // czas od ostatniego logu
|
||||
double ElapsedTime = 0.0; // czas od poczatku logu
|
||||
|
||||
@@ -736,6 +742,10 @@ public:
|
||||
// user is in, to write its log at the end when the logs of all the vehicles are off
|
||||
std::string const &physicslog_name() const {
|
||||
return VehicleName; }
|
||||
// whether it writes its physics log itself: all with "physicslog yes", with "physicslog.trains yes" one who drives
|
||||
// rail vehicles. a driver made primary later begins its log then
|
||||
bool writes_physicslog() const {
|
||||
return WriteLogFlag || ( WriteTrainLogFlag && is_train() && primary() ); }
|
||||
static std::string_view physicslog_header();
|
||||
std::string physicslog_line() const;
|
||||
TDynamicObject *Vehicle( end const Side ) const {
|
||||
|
||||
Reference in New Issue
Block a user