@@ -9,24 +9,25 @@ namespace Limekuma.Render;
99public sealed class Drawer
1010{
1111 public async Task < Image > DrawBestsAsync ( CommonUser user , IList < CommonRecord > ever ,
12- IList < CommonRecord > current , int everTotal , int currentTotal , string prober , IList < string > tags ) =>
13- await DrawBestsAsync ( user , ever , current , everTotal , currentTotal , prober , tags , "./Resources/Layouts/bests.xml" ) ;
12+ IList < CommonRecord > current , int everTotal , int currentTotal , string ? condition , string prober , IList < string > tags ) =>
13+ await DrawBestsAsync ( user , ever , current , everTotal , currentTotal , condition , prober , tags , "./Resources/Layouts/bests.xml" ) ;
1414
1515 public async Task < Image > DrawBestsAsync ( CommonUser user , IList < CommonRecord > ever ,
16- IList < CommonRecord > current , int everTotal , int currentTotal , string prober , IList < string > tags , string xmlPath )
16+ IList < CommonRecord > current , int everTotal , int currentTotal , string ? condition , string prober , IList < string > tags , string xmlPath )
1717 {
1818 int everMax = ever . Count > 0 ? ever [ 0 ] . DXRating : 0 ;
1919 int everMin = ever . Count > 0 ? ever [ ^ 1 ] . DXRating : 0 ;
2020 int currentMax = current . Count > 0 ? current [ 0 ] . DXRating : 0 ;
2121 int currentMin = current . Count > 0 ? current [ ^ 1 ] . DXRating : 0 ;
2222 bool mayMask = ever . Any ( r => r . DXScore is 0 && ( r . DXStar > 0 || r . Rank > Ranks . A ) ) || current . Any ( r => r . DXScore is 0 && ( r . DXStar > 0 || r . Rank > Ranks . A ) ) ;
23- Dictionary < string , object > scope = new ( StringComparer . OrdinalIgnoreCase )
23+ Dictionary < string , object ? > scope = new ( StringComparer . OrdinalIgnoreCase )
2424 {
2525 [ "userInfo" ] = user ,
2626 [ "everRecords" ] = ever ,
2727 [ "currentRecords" ] = current ,
2828 [ "everRating" ] = everTotal ,
2929 [ "currentRating" ] = currentTotal ,
30+ [ "condition" ] = condition ,
3031 [ "proberName" ] = prober ,
3132 [ "tags" ] = tags ,
3233 [ "mayMask" ] = mayMask ,
@@ -48,7 +49,7 @@ public async Task<Image> DrawListAsync(CommonUser user, IList<CommonRecord> reco
4849 List < int > countList = [ .. counts ] ;
4950 int totalCount = counts . Count > 0 ? counts [ ^ 1 ] : 0 ;
5051 bool mayMask = records . Any ( r => r . DXScore is 0 && ( r . DXStar > 0 || r . Rank > Ranks . A ) ) ;
51- Dictionary < string , object > scope = new ( StringComparer . OrdinalIgnoreCase )
52+ Dictionary < string , object ? > scope = new ( StringComparer . OrdinalIgnoreCase )
5253 {
5354 [ "userInfo" ] = user ,
5455 [ "pageRecords" ] = records ,
@@ -66,7 +67,7 @@ public async Task<Image> DrawListAsync(CommonUser user, IList<CommonRecord> reco
6667 return await DrawAsync ( scope , xmlPath ) ;
6768 }
6869
69- private async Task < Image > DrawAsync ( IDictionary < string , object > scope , string xmlPath )
70+ private async Task < Image > DrawAsync ( IDictionary < string , object ? > scope , string xmlPath )
7071 {
7172 AsyncNCalcEngine expr = new ( ) ;
7273 RegisterFunctions ( expr ) ;
0 commit comments