mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-07 22:32:27 +01:00
Tell apart the halves of a unit that share one skin
The ET42-026 dresses both halves in 112E-026 and the scenery tells them apart by the model. Textures were keyed by the skin alone, so the B half became a second A: not part of the set, and listed on its own. A shared skin now gets the model in its id, vehicles are looked up by skin and model, and the vehicle cache is rebuilt for the new ids.
This commit is contained in:
@@ -254,7 +254,7 @@ public partial class Depot : UserControl
|
||||
StarterNG.Infrastructure.StatsBar.Fill(trainStats, TrainsetDisplay.StatsFields(
|
||||
_consist.EditingTrainset,
|
||||
_info.PhysicsFor,
|
||||
car => _db.TextureForSkin(car.SkinFile) is { } t ? VehicleInfo.CategoryOf(t) : null,
|
||||
car => _db.TextureFor(car.SkinFile, car.MmdFile) is { } t ? VehicleInfo.CategoryOf(t) : null,
|
||||
AppServices.Current.LoadWeights.Table.WeightOf));
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ public partial class Depot : UserControl
|
||||
private void AddCopiesAfter(ConsistItem item, int count)
|
||||
{
|
||||
int index = _consist.IndexOf(item);
|
||||
if (index < 0 || item.Cars.Count == 0 || _db.TextureForSkin(item.Cars[0].SkinFile) is not { } texture)
|
||||
if (index < 0 || item.Cars.Count == 0 || _db.TextureFor(item.Cars[0].SkinFile, item.Cars[0].MmdFile) is not { } texture)
|
||||
return;
|
||||
|
||||
InsertTexturesAt(texture, index + 1, count);
|
||||
|
||||
Reference in New Issue
Block a user