Rework the depot, warehouse and vehicle base

A consist added to the warehouse gets a name there. The crew type stays through
loading a consist. The vehicle base window replaces the texture base. The depot
follows consists changed on the scenarios page, also with the warehouse tab
left open.
This commit is contained in:
maj00r
2026-11-01 16:06:16 +01:00
parent f152a020e3
commit 82429010d4
40 changed files with 3041 additions and 843 deletions

View File

@@ -1,3 +1,4 @@
using StarterNG.Application;
using StarterNG.Classes;
using StarterNG.Domain;
using StarterNG.Domain.Vehicles;
@@ -87,6 +88,25 @@ public class ConsistOrientationTests
Assert.All(consist, card => Assert.Equal(Consist.IsTurned(card.Cars[0]), card.Flipped));
}
[Fact]
public void A_turned_unit_comes_back_as_it_was_from_every_load()
{
AppServices.Initialize(_installation.Paths, _installation.Files, _installation.Clock, _installation.Environment);
var consist = NewConsist(out var unit);
consist.Flip(unit);
string[] turned = Describe(consist);
var trainset = new Trainset("trainset a tor 0 0\nendtrainset");
for (int load = 0; load < 3; load++)
{
trainset.Vehicles = consist.Flatten();
consist.LoadFrom(trainset);
Assert.True(Assert.Single(consist).Flipped);
Assert.Equal(turned, Describe(consist));
}
}
private Consist NewConsist(out ConsistItem unit)
{
var consist = new Consist(_catalog, new VehicleInfo(_catalog, _installation.Physics));