Cut the comments from the refactored code

Three survive: why AppServices is hand-wired, the cp1250 registration trap, and
the IsDieselEngine note carried over from Physics.cs.
This commit is contained in:
maj00r
2026-09-04 22:24:54 +02:00
parent 7849ef9729
commit df21ec104f
60 changed files with 3 additions and 875 deletions

View File

@@ -8,10 +8,6 @@ using StarterNG.Infrastructure.Adapters;
namespace StarterNG.Infrastructure.Vehicles;
/// <summary>
/// Loads the catalogue from the dynamic/&lt;maker&gt;/&lt;vehicle&gt;/textures.txt
/// files an installation ships.
/// </summary>
public sealed class TexturesTxtVehicleRepository : IVehicleRepository
{
private const string TexturesFileName = "textures.txt";
@@ -55,8 +51,6 @@ public sealed class TexturesTxtVehicleRepository : IVehicleRepository
{
try
{
// Read as text so the code page survives: the credit lines carry
// Polish characters that ReadAllLines' default encoding would mangle.
string[] lines = _files.ReadAllText(path, _encoding).Split('\n');
return _parser.Parse(RelativeDirectory(path), lines);
}
@@ -67,10 +61,6 @@ public sealed class TexturesTxtVehicleRepository : IVehicleRepository
}
}
/// <summary>
/// Rolling stock sits exactly two levels below dynamic/: a maker folder and a
/// vehicle folder.
/// </summary>
private IEnumerable<string> TexturesFiles()
{
foreach (string maker in _files.GetDirectories(_paths.Dynamic))
@@ -82,10 +72,6 @@ public sealed class TexturesTxtVehicleRepository : IVehicleRepository
}
}
/// <summary>
/// The folder as the scenery format spells it: relative to dynamic/, forward
/// slashes, trailing slash.
/// </summary>
private string RelativeDirectory(string texturesPath)
{
string directory = Path.GetDirectoryName(texturesPath) ?? "";
@@ -98,5 +84,4 @@ public sealed class TexturesTxtVehicleRepository : IVehicleRepository
return relative.Replace('\\', '/').TrimEnd('/') + "/";
}
}