Skip to content

Commit af9e9ae

Browse files
committed
Added TCS parameters file path in consist files (+ refactoring and code cleanup)
https://blueprints.launchpad.net/or/+spec/consist-tcs-parameters
1 parent feff309 commit af9e9ae

File tree

10 files changed

+827
-807
lines changed

10 files changed

+827
-807
lines changed

Source/Orts.Formats.Msts/ActivityFile.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,7 @@ public class TrainCfg {
12851285
public MaxVelocity MaxVelocity;
12861286
int NextWagonUID;
12871287
public float Durability = 1.0f; // Value assumed if attribute not found.
1288+
public string TcsParametersFileName = string.Empty;
12881289

12891290
public List<Wagon> WagonList = new List<Wagon>();
12901291

@@ -1299,6 +1300,7 @@ public TrainCfg(STFReader stf) {
12991300
new STFReader.TokenProcessor("durability", ()=>{ Durability = stf.ReadFloatBlock(STFReader.UNITS.None, null); }),
13001301
new STFReader.TokenProcessor("wagon", ()=>{ WagonList.Add(new Wagon(stf)); }),
13011302
new STFReader.TokenProcessor("engine", ()=>{ WagonList.Add(new Wagon(stf)); }),
1303+
new STFReader.TokenProcessor("ortstraincontrolsystemparameters", () => TcsParametersFileName = stf.ReadStringBlock(null)),
13021304
});
13031305
}
13041306
}

0 commit comments

Comments
 (0)