Commit 742dd07
authored
Allow Display Name to be used in Kills Stats by Ship Class (#6791)
* Allow Display Name to be used in Kills Stats by Ship Class
Currently, the display that is shown for kills by ship type does not use display name of the ship class, which makes the ship classes look different than the other areas where they are displayed throughout the game. This PR fixes that by using display name when rendering the kill stats. Note, this PR does not edit the pilot file structure at all, it simply just tunes how the names are displayed/rendered.
Importantly though, display names do not have to be unique, while the ship class names do. Thus, this PR also consolidates the number of kills of ship classes with the same display name (For example, FotG uses classes like `X-wing#Red` and `X-wing#Blue`, but both have the same display name of `X-wing`, so this consolidation means FSO will simple display `X-wing` with the sum. Overall, mods not using display name will be unaffected, while mods that do use display name will now have it properly work in the barracks and debrief rendering.
Tested and works as expected.
* remove flag for now
* move assert
* use handy get_display_name1 parent f1a25ab commit 742dd07
2 files changed
Lines changed: 32 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
454 | 457 | | |
455 | 458 | | |
456 | 459 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
469 | 464 | | |
470 | 465 | | |
471 | 466 | | |
472 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
473 | 482 | | |
474 | 483 | | |
475 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1721 | 1721 | | |
1722 | 1722 | | |
1723 | 1723 | | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
1724 | 1727 | | |
1725 | 1728 | | |
1726 | 1729 | | |
| |||
1732 | 1735 | | |
1733 | 1736 | | |
1734 | 1737 | | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
1735 | 1742 | | |
| 1743 | + | |
| 1744 | + | |
1736 | 1745 | | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
| 1746 | + | |
| 1747 | + | |
1741 | 1748 | | |
1742 | 1749 | | |
1743 | 1750 | | |
| |||
0 commit comments