Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotVU committed Sep 4, 2024
1 parent 6454e59 commit 7dcefac
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/Core/Classes/UEnumDecompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,32 @@ public override string FormatHeader()

private string FormatNames()
{
var output = string.Empty;
string output = string.Empty;
UDecompilingState.AddTabs(1);
for (var index = 0; index < Names.Count; index++)

for (int index = 0; index < Names.Count; index++)
{
var enumName = Names[index];
output += "\r\n" + UDecompilingState.Tabs + enumName;
var enumTagName = Names[index];
string enumTagText = enumTagName.ToString();

if (index != Names.Count - 1)
{
output += ",";
enumTagText += ",";
}

if (!UnrealConfig.SuppressComments)
{
enumTagText = enumTagText.PadRight(32, ' ');
enumTagText += $"// {index}";
}

output += "\r\n" + UDecompilingState.Tabs + enumTagText;
}

UDecompilingState.RemoveTabs(1);

return output;
}
}
}
#endif
#endif

0 comments on commit 7dcefac

Please sign in to comment.