Skip to content

Commit c41c531

Browse files
committed
Merge branch 'master' into Containers-official
2 parents b348ee0 + cb60f88 commit c41c531

File tree

21 files changed

+781
-812
lines changed

21 files changed

+781
-812
lines changed

Source/Contrib/SimulatorTester/Program.cs

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using System.IO;
2424
using System.Windows.Forms;
2525
using Orts.Common;
26+
using System.Diagnostics;
2627

2728
namespace SimulatorTester
2829
{
@@ -31,9 +32,35 @@ internal class Program
3132
static void Main(string[] args)
3233
{
3334
var options = args.Where(a => a.StartsWith("-") || a.StartsWith("/")).Select(a => a.Substring(1));
34-
var files = args.Where(a => !a.StartsWith("-") && !a.StartsWith("/"));
35+
var files = args.Where(a => !a.StartsWith("-") && !a.StartsWith("/")).ToList();
3536
var settings = new UserSettings(options);
3637

38+
if (files.Count != 1 || options.Contains("help", StringComparer.InvariantCultureIgnoreCase))
39+
{
40+
var version = FileVersionInfo.GetVersionInfo(Application.ExecutablePath);
41+
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
42+
Console.WriteLine();
43+
Console.WriteLine("Usage:");
44+
Console.WriteLine(" {0} [options] <save-file>", Path.GetFileNameWithoutExtension(Application.ExecutablePath));
45+
Console.WriteLine();
46+
Console.WriteLine("Options:");
47+
Console.WriteLine(" <save-file> {0} save file to use", Application.ProductName);
48+
Console.WriteLine(" /quiet Do not show summary of simulation (only exit code is set)");
49+
Console.WriteLine(" /verbose Show version and settings (similar to a {0} log)", Application.ProductName);
50+
Console.WriteLine(" /fps <fps> Set the simulation frame-rate [default: 10]");
51+
Console.WriteLine(" /help Show help and usage information");
52+
Console.WriteLine(" ...and any standard {0} option", Application.ProductName);
53+
Console.WriteLine();
54+
Console.WriteLine("The {0} takes a save file and:", version.FileDescription);
55+
Console.WriteLine(" - Loads the same activity as contained in the save file");
56+
Console.WriteLine(" - Runs the simulation at the specified FPS for the same duration as the save file");
57+
Console.WriteLine(" - Compares the final position with that contained in the save file");
58+
Console.WriteLine();
59+
Console.WriteLine("The exit code is set to the distance from the target in meters");
60+
Console.WriteLine();
61+
return;
62+
}
63+
3764
if (settings.Verbose)
3865
{
3966
Console.WriteLine("This is a log file for {0}. Please include this file in bug reports.", Application.ProductName);
@@ -53,7 +80,7 @@ static void Main(string[] args)
5380
LogSeparator();
5481
}
5582

56-
var saveFile = files.First();
83+
var saveFile = files[0];
5784
using (BinaryReader inf = new BinaryReader(new FileStream(saveFile, FileMode.Open, FileAccess.Read)))
5885
{
5986
var cts = new CancellationTokenSource(() => { });

Source/Documentation/Manual/driving.rst

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ within the cabview, see :ref:`here <cabs-odometer>`.
633633
.. _debriefeval:
634634

635635

636-
Debrief Evaluation
636+
Activity Evaluation
637637
------------------
638638

639639
``Description``
@@ -643,15 +643,14 @@ This feature displays a real-time evaluation of the player's performance
643643
during the activity run and a final report at the end of an activity.
644644
The evaluation reports various parameters to provide to the player info in order
645645
to improve his train driving ability.
646-
While the activity is running relevant data are stored and displayed.
647-
The stored data are used to generate a report at the end of the activity.
646+
While the activity is running, relevant data are stored and displayed.
647+
The stored data is used to generate a report at the end of the activity.
648648

649649

650650
``How It Works``
651651
''''''''''''''''
652652

653-
Activity evaluation is enabled only for Activity mode, and requires the
654-
"Debrief evaluation" checkbox in the main menu window to be enabled.
653+
Activity evaluation is enabled only for Activity mode.
655654
Checking some checkboxes within the various option tabs of the main menu
656655
provides additional parameters for the activity evaluation.
657656

@@ -664,23 +663,11 @@ and here an example about the Options/Simulation tab:
664663
.. image:: images/dbfeval-options-simulation.png
665664

666665
Checkboxes shown as unchecked in the two above pictures may be checked or
667-
unchecked, but don't have effect to activity evaluation.
666+
unchecked, but don't have any effect on activity evaluation.
668667

669668
A tab named "Evaluation" is present on the F1 Help Information Monitor.
670669
Once the activity is running it displays dynamic information about the player
671670
train performance up to that moment.
672-
673-
If the "Debrief evaluation" checkbox is unchecked, a message reminds this.
674-
675-
676-
677-
.. image:: images/dbfeval-evaluation-unchecked.png
678-
:scale: 100%
679-
:align: center
680-
681-
682-
In case that Debrief evaluation was checked, **Actual status: (**\ |darr| **)**\ , is displayed.
683-
684671

685672

686673
.. image:: images/dbfeval-evaluation-ini.png
@@ -691,7 +678,7 @@ In case that Debrief evaluation was checked, **Actual status: (**\ |darr| **)**\
691678

692679
\newpage
693680

694-
Clicking **Actual status: (**\ |darr| **)**\ expanded real-time display appears.
681+
Clicking **Actual status: (**\ |darr| **)**\ shows an expanded real-time display.
695682

696683

697684
.. image:: images/dbfeval-evaluation-expanded.png
@@ -702,8 +689,6 @@ Clicking **Actual status: (**\ |darr| **)**\ expanded real-time display appears
702689

703690
Clicking **Actual status: (**\ |uarr| **)**\ collapses all items.
704691

705-
Once the activity has ended, the report file is created and a new window displays it.
706-
707692
.. image:: images/dbfeval-evaluation-ended.png
708693
:scale: 100%
709694
:align: center
@@ -713,6 +698,9 @@ Once the activity has ended, the report file is created and a new window display
713698

714699
\newpage
715700

701+
Once the activity has ended, as soon as the player views the Evaluation tab, a report file is
702+
created and shown in an editor window as follows.
703+
716704
This report is made up of several sections.
717705

718706
.. image:: images/dbfeval-report.png
@@ -721,15 +709,12 @@ This report is made up of several sections.
721709

722710
.. raw:: latex
723711

724-
\newpage
712+
The report file OpenRailsEvaluation.txt is saved alongside the log file OpenRailsLog.txt and
713+
the default location for this is the Windows Desktop.
725714

726-
Activity saves (F2) will save also the evaluation data, if the "Debrief evaluation"
727-
checkbox was checked.
728-
In such case the activity saves will have the "Eval" checkbox checked in the resume window.
715+
The Save Game (F2) command also copies any evaluation report alongside the save files so it can be
716+
kept and reviewed. This copy is deleted when the other files for that save are deleted.
729717

730-
.. image:: images/dbfeval-resume.png
731-
:scale: 100%
732-
:align: center
733718

734719
.. _driving-hud:
735720

Source/Documentation/Manual/options.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -514,15 +514,6 @@ pressing ``<F12>`` a file with the name dump.csv is generated in the
514514
configured Open Rails logging folder (placed on the Desktop by default).
515515
This file can be used for later analysis.
516516

517-
Evaluation Options
518-
==================
519-
520-
.. image:: images/options-evaluation.png
521-
522-
When data logging is started (see preceding paragraph), data selected in
523-
this panel are logged, allowing a later evaluation on how the activity was
524-
executed by the player.
525-
526517
.. _options-Content:
527518

528519
Content Options

Source/Documentation/Manual/start.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,20 @@ by that locomotive will appear.
122122
If you instead select a specific activity, you won't have to perform any
123123
further selections.
124124

125-
If you have selected an activity, the "Debrief evaluation" checkbox becomes
126-
checkable. If it is checked, during the activity run
127-
data about the activity run are stored and may be displayed in real time, and at
128-
the end of the activity a report file provides a complete compendium of information about
129-
the player skills as a train driver.
130-
Debrief evaluation is described :ref:`here <debriefeval>`.
125+
Activity Evaluation
126+
''''''''''''''''''
127+
128+
During the activity session, data about performance is stored and may be viewed as the activity progresses.
129+
At the end of the activity a report file is generated which provides a summary of
130+
the player's skills as a train driver.
131+
132+
Activity evaluation is described :ref:`here <debriefeval>`.
131133

132134
If you have selected the related Experimental Option, at runtime you can
133135
switch :ref:`Autopilot mode <driving-autopilot>` on or off, which allows you
134136
to watch OR driving your
135137
train, as if you were a trainspotter or a visitor in the cab.
136-
Autopilot mode is not operating in Explore mode.
138+
Autopilot mode is not available in Explore mode.
137139

138140
.. _start-timetable:
139141

Source/Menu/MainForm.Designer.cs

Lines changed: 2 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Menu/MainForm.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,6 @@ void comboBoxActivity_SelectedIndexChanged(object sender, EventArgs e)
395395
ShowStartAtList();
396396
ShowEnvironment();
397397
ShowDetails();
398-
//Debrief Activity Eval
399-
//0 = "- Explore route -"
400-
//1 = "+ Explore in Activity mode +"
401-
if (comboBoxActivity.SelectedIndex < 2)
402-
{ checkDebriefActivityEval.Checked = false; checkDebriefActivityEval.Enabled = false; }
403-
else
404-
{ checkDebriefActivityEval.Enabled = true; }
405398
}
406399
#endregion
407400

@@ -659,10 +652,6 @@ void LoadOptions()
659652
{
660653
checkBoxWarnings.Checked = Settings.Logging;
661654
checkBoxWindowed.Checked = !Settings.FullScreen;
662-
//Debrief activity evaluation
663-
checkDebriefActivityEval.Checked = Settings.DebriefActivityEval;
664-
//TO DO: Debrief TTactivity evaluation
665-
//checkDebriefTTActivityEval.Checked = Settings.DebriefTTActivityEval;
666655
radioButtonModeActivity.Checked = Settings.IsModeActivity;
667656
radioButtonModeTimetable.Checked = !Settings.IsModeActivity;
668657

@@ -675,10 +664,6 @@ void SaveOptions()
675664
Settings.Logging = checkBoxWarnings.Checked;
676665
Settings.FullScreen = !checkBoxWindowed.Checked;
677666
Settings.Multiplayer_User = textBoxMPUser.Text;
678-
//Debrief activity evaluation
679-
Settings.DebriefActivityEval = checkDebriefActivityEval.Checked;
680-
//TO DO: Debrief TTactivity evaluation
681-
//Settings.DebriefTTActivityEval = checkDebriefTTActivityEval.Checked;
682667
Settings.IsModeActivity = radioButtonModeActivity.Checked;
683668

684669
var mpHost = textBoxMPHost.Text.Split(':');

0 commit comments

Comments
 (0)