Skip to content

Commit

Permalink
Automatic merge of X1.3.1-195-g6502efe3d and 8 pull requests
Browse files Browse the repository at this point in the history
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 633793b: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
  • Loading branch information
openrails-bot committed Jul 24, 2020
10 parents 24fa173 + 6502efe + e81861b + 7d9f14b + 927a49c + 26983e9 + 6ec1539 + 72c0146 + 633793b + 3ac34fe commit 649cc5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Contrib/ContentManager/Models/Consist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private static IEnumerable<Item> GetOrtsItems(TrainFile file)
/// </summary>
/// <param name="file">The consist structure to query.</param>
/// <returns>An iterator of items.</returns>
private static IEnumerable<Item> GetMstsItems(Orts.Formats.Msts.ConsistFile file) => file.Train.TrainCfg.WagonList
private static IEnumerable<Item> GetMstsItems(ConsistFile file) => file.Train.TrainCfg.WagonList
.Select((Wagon wagon) => new MstsCar(wagon));

public enum Direction{
Expand Down
5 changes: 3 additions & 2 deletions Source/ORTS.Menu/Consists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using System.Linq;
using GNU.Gettext;
using Orts.Formats.Msts;
using Orts.Formats.OR;
using ORTS.Common;

namespace ORTS.Menu
Expand Down Expand Up @@ -65,9 +66,9 @@ private static ITrainFile LoadConsist(string filePath)
switch (System.IO.Path.GetExtension(filePath).ToLowerInvariant())
{
case ".train-or":
return Orts.Formats.OR.TrainFile.LoadFrom(filePath);
return TrainFile.LoadFrom(filePath);
case ".con":
return new Orts.Formats.Msts.ConsistFile(filePath);
return new ConsistFile(filePath);
default:
throw new InvalidDataException("Unknown train format");
}
Expand Down

0 comments on commit 649cc5c

Please sign in to comment.