Skip to content

Commit

Permalink
Fix /top10
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBang1112 committed Mar 28, 2024
1 parent 68c6e6c commit ff55b85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>2.5.4.2</Version>
<Version>2.5.4.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected override async Task BuildEmbedResponseAsync(MapModel map, EmbedBuilder
}
}

var isTMUF = map.Game.IsTMUF();
var isTMUF = map.Game.IsTMUF() || map.Game.IsTMN();

if (isTMUF)
{
Expand Down Expand Up @@ -136,6 +136,7 @@ private async Task<bool> CreateTop10EmbedContentAsync(MapModel map, EmbedBuilder
}
break;
case Game.TMUF:
case Game.TMN:
if (!await CreateTop10EmbedContentFromTmxAsync(map, builder))
{
return false;
Expand Down Expand Up @@ -193,7 +194,7 @@ private async Task<bool> CreateTop10EmbedContentFromTmxAsync(MapModel map, Embed
var top10records = GetTop10(recordSetTmx);
var miniRecords = GetMiniRecordsFromTmxReplays(top10records, map, formattable: true);

builder.Description = ConvertMiniRecordsToString(miniRecords, map.Game.IsTMUF(), map.IsStuntsMode());
builder.Description = ConvertMiniRecordsToString(miniRecords, map.Game.IsTMUF() || map.Game.IsTMN(), map.IsStuntsMode());

return true;
}
Expand All @@ -215,7 +216,7 @@ private async Task<bool> CreateTop10EmbedContentFromTM2Async(MapModel map, Embed
var loginDictionary = await FetchLoginModelsAsync(recordSet);
var miniRecords = GetMiniRecordsFromRecordSet(recordSet.Records, loginDictionary, escape: true);

builder.Description = ConvertMiniRecordsToString(miniRecords, map.Game.IsTMUF(), map.IsStuntsMode());
builder.Description = ConvertMiniRecordsToString(miniRecords, map.Game.IsTMUF() || map.Game.IsTMN(), map.IsStuntsMode());

return true;
}
Expand Down

0 comments on commit ff55b85

Please sign in to comment.