diff --git a/StarterNG/Classes/VehicleDatabase.cs b/StarterNG/Classes/VehicleDatabase.cs
index e9dd68b..34e8b3d 100644
--- a/StarterNG/Classes/VehicleDatabase.cs
+++ b/StarterNG/Classes/VehicleDatabase.cs
@@ -66,6 +66,9 @@ public class VehicleTexture
/// Group's "category" letter, or null when the group is unknown.
[JsonIgnore] public string? ResolvedCategory { get; internal set; }
+
+ /// True when the texture's group is marked archival (archived in JSON).
+ [JsonIgnore] public bool ResolvedArchived { get; internal set; }
}
/// Alternate mapping from a malformed multi-= legacy line.
@@ -297,9 +300,26 @@ public class VehicleDatabase
t.ResolvedCategory = category;
t.ResolvedClass = mini;
+ t.ResolvedArchived = g?.Archived ?? false;
}
}
+ ///
+ /// True when the texture is a non-leading member of an auto-consist set
+ /// (subsequent multi-unit cars that the depot browser should hide).
+ ///
+ public bool IsSetFollower(VehicleTexture texture)
+ {
+ if (string.IsNullOrEmpty(texture.Uuid)) return false;
+ if (!SetByTextureUuid.TryGetValue(texture.Uuid!, out var set) ||
+ set.TextureRefs is null || set.TextureRefs.Count < 2)
+ return false;
+
+ string? lead = set.TextureRefs.FirstOrDefault(r => !string.IsNullOrEmpty(r));
+ return lead != null &&
+ !string.Equals(lead, texture.Uuid, StringComparison.OrdinalIgnoreCase);
+ }
+
///
/// Miniature name for a texture: the texture_mini property, but if no .bmp
/// for it exists, falls back to the mini of the group it belongs to.
@@ -332,6 +352,31 @@ public class VehicleDatabase
return TextureBySkin.TryGetValue(key, out var tex) ? tex : null;
}
+ /// Lines for starter/bledy.txt (Pascal chLogExt / missing assets).
+ public List CollectMissingAssetLines()
+ {
+ var lines = new List();
+ foreach (var t in Textures)
+ {
+ string dir = Path.Combine(Directory.GetCurrentDirectory(), "dynamic",
+ t.Directory.Replace('/', Path.DirectorySeparatorChar).TrimEnd('\\', '/'));
+ string skin = Path.Combine(dir, t.Skinfile);
+ if (!string.IsNullOrEmpty(t.Skinfile) && !File.Exists(skin) &&
+ !File.Exists(Path.ChangeExtension(skin, ".mat")) &&
+ !File.Exists(Path.ChangeExtension(skin, ".bmp")))
+ lines.Add($"# no file: {t.Directory}{t.Skinfile}");
+
+ if (!string.IsNullOrEmpty(t.Model))
+ {
+ string model = Path.Combine(dir, t.Model!);
+ if (!File.Exists(model) && !File.Exists(Path.ChangeExtension(model, ".t3d")) &&
+ !File.Exists(Path.ChangeExtension(model, ".e3d")))
+ lines.Add($"# no model: {t.Directory}{t.Model}");
+ }
+ }
+ return lines;
+ }
+
/// Header label for the group a texture belongs to.
public string GroupHeader(string? groupId)
{