Skip to content

Commit

Permalink
Fix rarity sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
stdcall0 committed Apr 16, 2024
1 parent 883ee8c commit da25761
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/cs_casesim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ export class CSCaseSimPlugin extends Plugin {
let s = stat[this.e.user_id];

let msg = `总开箱数: ${s.totalCase}\n`;
msg += `稀有度统计: `;
for (const [rarity, count] of Object.entries(s.countByRarity)) {
msg += `- ${this.getRarityEmojiSquare(rarity as CS.Rarity)}${rarity}: ${count} `;
msg += `稀有度统计: \n`;
for (const rarity of [CS.Rarity.Gold, CS.Rarity.Red, CS.Rarity.Pink, CS.Rarity.Purple, CS.Rarity.Blue]) {
const count = s.countByRarity[rarity];
msg += `- ${this.getRarityEmojiSquare(rarity as CS.Rarity)}${rarity}: ${count}\n`;
}
msg += `\n开箱费用: ¥${s.totalCase * c.price}`;
msg += `\n总估值: ¥${s.totalValue}`;
Expand Down

0 comments on commit da25761

Please sign in to comment.