Skip to content

Commit

Permalink
Merge pull request #56 from HeDo88TH/master
Browse files Browse the repository at this point in the history
Minor improvements
  • Loading branch information
HeDo88TH authored Oct 30, 2023
2 parents bfdecb5 + 99591ef commit fbe5e64
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Obj2Tiles/Obj2Tiles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<AssemblyVersion>1.0.11</AssemblyVersion>
<FileVersion>1.0.11</FileVersion>
<AssemblyVersion>1.0.12</AssemblyVersion>
<FileVersion>1.0.12</FileVersion>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

Expand Down
24 changes: 13 additions & 11 deletions Obj2Tiles/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,74 +34,76 @@ private static IEnumerable<string> GetMtlDependencies(string mtlPath)
var mtlFile = File.ReadAllLines(mtlPath);

var dependencies = new List<string>();


foreach (var line in mtlFile)
{
if (line.Trim().StartsWith("map_Kd"))

var trimmedLine = line.Trim();

if (trimmedLine.StartsWith("map_Kd"))
{
dependencies.Add(line[7..].Trim());

continue;
}

if (line.Trim().StartsWith("map_Ka"))
if (trimmedLine.StartsWith("map_Ka"))
{
dependencies.Add(line[7..].Trim());

continue;
}

if (line.Trim().StartsWith("norm"))
if (trimmedLine.StartsWith("norm"))
{
dependencies.Add(line[5..].Trim());

continue;
}

if (line.Trim().StartsWith("map_Ks"))
if (trimmedLine.StartsWith("map_Ks"))
{
dependencies.Add(line[7..].Trim());

continue;
}

if (line.Trim().StartsWith("map_Bump"))
if (trimmedLine.StartsWith("map_Bump"))
{
dependencies.Add(line[8..].Trim());

continue;
}

if (line.Trim().StartsWith("map_d"))
if (trimmedLine.StartsWith("map_d"))
{
dependencies.Add(line[6..].Trim());

continue;
}

if (line.Trim().StartsWith("map_Ns"))
if (trimmedLine.StartsWith("map_Ns"))
{
dependencies.Add(line[7..].Trim());

continue;
}

if (line.Trim().StartsWith("bump"))
if (trimmedLine.StartsWith("bump"))
{
dependencies.Add(line[5..].Trim());

continue;
}

if (line.Trim().StartsWith("disp"))
if (trimmedLine.StartsWith("disp"))
{
dependencies.Add(line[5..].Trim());

continue;
}

if (line.Trim().StartsWith("decal"))
if (trimmedLine.StartsWith("decal"))
{
dependencies.Add(line[6..].Trim());

Expand Down

0 comments on commit fbe5e64

Please sign in to comment.