Money with abbreviated form (#1222)

This commit is contained in:
Frederico Santos 2024-05-22 06:54:44 +01:00 committed by GitHub
parent c1c464b07a
commit ae03b9cb20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -1199,7 +1199,7 @@ export default class BattleScene extends SceneBase {
} }
updateMoneyText(): void { updateMoneyText(): void {
this.moneyText.setText(`${this.money.toLocaleString('en-US')}`); this.moneyText.setText(`${Utils.formatLargeNumber(this.money, 100)}`);
this.moneyText.setVisible(true); this.moneyText.setVisible(true);
} }

View File

@ -188,6 +188,12 @@ export function formatLargeNumber(count: integer, threshold: integer): string {
case 3: case 3:
suffix = 'B'; suffix = 'B';
break; break;
case 4:
suffix = 'T';
break;
case 5:
suffix = 'q';
break;
default: default:
return '?'; return '?';
} }