Improvements to spliced name generation

This commit is contained in:
Flashfyre committed 2024-03-06 23:57:11 -05:00
1 parent 1861823673
commit 7efd8aa834
3 files changed
+22 -5

No files matched your search

+1 -1
View File
@@ -816,7 +816,7 @@ class PartySlot extends Phaser.GameObjects.Container {
let nameSizeTest = addTextObject(this.scene, 0, 0, displayName, TextStyle.PARTY);
nameTextWidth = nameSizeTest.displayWidth;
while (nameTextWidth > (this.slotIndex ? 52 : 80)) {
while (nameTextWidth > (this.slotIndex >= battlerCount ? 52 : (76 - (this.pokemon.fusionSpecies ? 8 : 0)))) {
displayName = `${displayName.slice(0, displayName.endsWith('.') ? -2 : -1).trimEnd()}.`;
nameSizeTest.setText(displayName);
nameTextWidth = nameSizeTest.displayWidth;