Skip to content

[TF2] Add thousands separators to various values #1330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/game/client/tf/player_vs_environment/c_tf_upgrades.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1175,10 +1175,7 @@ void CHudUpgradePanel::UpdateUpgradeButtons( void )
pUpgradeBuyPanel->m_pShortDescriptionLabel->SetText( pDescription );
}

locchar_t wzCost[64];
loc_sprintf_safe( wzCost, LOCCHAR( "%d" ), pUpgradeBuyPanel->m_nPrice );

pUpgradeBuyPanel->m_pPriceLabel->SetText( wzCost );
pUpgradeBuyPanel->m_pPriceLabel->SetText( V_AddThousandSeparators( pUpgradeBuyPanel->m_nPrice ) );
}
}
}
Expand Down Expand Up @@ -1781,9 +1778,7 @@ void CHudUpgradePanel::UpdateButtonStates( int nCurrentMoney, int nUpgrade /*= 0
}

// Credits count
wchar_t wzCount[10];
_snwprintf( wzCount, ARRAYSIZE( wzCount ), L"%d", nCurrentMoney );
m_pSelectWeaponPanel->SetDialogVariable( "credits", wzCount );
m_pSelectWeaponPanel->SetDialogVariable( "credits", V_AddThousandSeparators( nCurrentMoney ) );
}

void CHudUpgradePanel::UpdateItemStatsLabel( void )
Expand Down
54 changes: 16 additions & 38 deletions src/game/client/tf/tf_hud_mann_vs_machine_scoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,28 +246,6 @@ void CTFHudMannVsMachineScoreboard::InitPlayerList ( IScheme *pScheme )
m_pPlayerList->SetVisible( true );
}

//-----------------------------------------------------------------------------
char *ConvertScoreboardValueToString( int iValue )
{
static char szConversion[32];
szConversion[0] = '\0';

if ( iValue >= 1000000 )
{
V_sprintf_safe( szConversion, "%d%s%d%d%d%s%d%d%d", iValue / 1000000, ",", ( iValue % 1000000 ) / 100000, ( iValue % 100000 ) / 10000, ( iValue % 10000 ) / 1000, ",", ( iValue % 1000 ) / 100, ( iValue % 100 ) / 10, iValue % 10 );
}
else if ( iValue >= 1000 )
{
V_sprintf_safe( szConversion, "%d%s%d%d%d", iValue / 1000, ",", ( iValue % 1000 ) / 100, ( iValue % 100 ) / 10, iValue % 10 );
}
else if ( iValue >= 0 )
{
V_sprintf_safe( szConversion, "%d", iValue );
}

return szConversion;
}

//-----------------------------------------------------------------------------
void CTFHudMannVsMachineScoreboard::UpdatePlayerList ()
{
Expand Down Expand Up @@ -347,7 +325,7 @@ void CTFHudMannVsMachineScoreboard::UpdatePlayerList ()
}
else
{
pKeyValues->SetString( "ping", ConvertScoreboardValueToString( g_PR->GetPing( playerIndex ) ) );
pKeyValues->SetString( "ping", V_AddThousandSeparators( g_PR->GetPing( playerIndex ) ) );
}
}

Expand Down Expand Up @@ -398,7 +376,7 @@ void CTFHudMannVsMachineScoreboard::UpdatePlayerList ()

if ( nTourNo > 0 )
{
pKeyValues->SetString( "tour_no", ConvertScoreboardValueToString( nTourNo ) );
pKeyValues->SetString( "tour_no", V_AddThousandSeparators( nTourNo ) );
}
else
{
Expand All @@ -421,14 +399,14 @@ void CTFHudMannVsMachineScoreboard::UpdatePlayerList ()
g_TF_PR->GetDamageBlocked( playerIndex ) +
( g_TF_PR->GetBonusPoints( playerIndex ) * 25 );

pKeyValues->SetString( "score", ConvertScoreboardValueToString( g_TF_PR->GetTotalScore( playerIndex ) ) );
pKeyValues->SetString( "damage", ConvertScoreboardValueToString( g_TF_PR->GetDamage( playerIndex ) ) );
pKeyValues->SetString( "tank", ConvertScoreboardValueToString( g_TF_PR->GetDamageBoss( playerIndex ) ) );
pKeyValues->SetString( "healing", ConvertScoreboardValueToString( g_TF_PR->GetHealing( playerIndex ) ) );
pKeyValues->SetString( "support", ConvertScoreboardValueToString( nSupport ) );
//pKeyValues->SetString( "blocked", ConvertScoreboardValueToString( g_TF_PR->GetDamageBlocked( playerIndex ) ) );
//pKeyValues->SetString( "bonus", ConvertScoreboardValueToString( g_TF_PR->GetBonusPoints( playerIndex ) ) );
pKeyValues->SetString( "credits", ConvertScoreboardValueToString( g_TF_PR->GetCurrencyCollected( playerIndex ) ) );
pKeyValues->SetString( "score", V_AddThousandSeparators( g_TF_PR->GetTotalScore( playerIndex ) ) );
pKeyValues->SetString( "damage", V_AddThousandSeparators( g_TF_PR->GetDamage( playerIndex ) ) );
pKeyValues->SetString( "tank", V_AddThousandSeparators( g_TF_PR->GetDamageBoss( playerIndex ) ) );
pKeyValues->SetString( "healing", V_AddThousandSeparators( g_TF_PR->GetHealing( playerIndex ) ) );
pKeyValues->SetString( "support", V_AddThousandSeparators( nSupport ) );
//pKeyValues->SetString( "blocked", V_AddThousandSeparators( g_TF_PR->GetDamageBlocked( playerIndex ) ) );
//pKeyValues->SetString( "bonus", V_AddThousandSeparators( g_TF_PR->GetBonusPoints( playerIndex ) ) );
pKeyValues->SetString( "credits", V_AddThousandSeparators( g_TF_PR->GetCurrencyCollected( playerIndex ) ) );
}

int itemID = m_pPlayerList->AddItem( 0, pKeyValues );
Expand Down Expand Up @@ -586,9 +564,9 @@ void CTFHudMannVsMachineScoreboard::UpdateCreditStats()
//-----------------------------------------------------------------------------
void CTFHudMannVsMachineScoreboard::UpdateCreditPanel( CCreditDisplayPanel *panel, int nAcquired, int nMissed, int nBonus )
{
panel->SetDialogVariable( "creditscollected", nAcquired );
panel->SetDialogVariable( "creditsmissed", nMissed );
panel->SetDialogVariable( "creditbonus", nBonus );
panel->SetDialogVariable( "creditscollected", V_AddThousandSeparators( nAcquired ) );
panel->SetDialogVariable( "creditsmissed", V_AddThousandSeparators( nMissed ) );
panel->SetDialogVariable( "creditbonus", V_AddThousandSeparators( nBonus ) );

int nDropped = nAcquired + nMissed;

Expand Down Expand Up @@ -634,9 +612,9 @@ void CTFHudMannVsMachineScoreboard::UpdateCreditSpend ( CCreditSpendPanel *panel
{
if ( panel )
{
panel->SetDialogVariable( "upgrades", nUpgrades );
panel->SetDialogVariable( "buybacks", nBuybacks );
panel->SetDialogVariable( "bottles", nBottles );
panel->SetDialogVariable( "upgrades", V_AddThousandSeparators( nUpgrades ) );
panel->SetDialogVariable( "buybacks", V_AddThousandSeparators( nBuybacks ) );
panel->SetDialogVariable( "bottles", V_AddThousandSeparators( nBottles ) );
}
}
//-----------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions src/game/client/tf/tf_hud_mann_vs_machine_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ bool CCurrencyStatusPanel::UpdateHUD( void )
m_nCurrency += delta;

char szTmp[16];
Q_snprintf( szTmp, ARRAYSIZE( szTmp ), "$%d", m_nCurrency );
Q_snprintf( szTmp, ARRAYSIZE( szTmp ), "$%s", V_AddThousandSeparators( m_nCurrency ) );
SetDialogVariable( "currency", szTmp );

return true;
Expand Down Expand Up @@ -1157,7 +1157,7 @@ void CInWorldCurrencyStatus::OnTick( void )
}

char szTmp[16];
Q_snprintf( szTmp, ARRAYSIZE( szTmp ), "$%d", nWorldMoney );
Q_snprintf( szTmp, ARRAYSIZE( szTmp ), "$%s", V_AddThousandSeparators( nWorldMoney ) );
SetDialogVariable( "currency", szTmp );
}
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -1397,7 +1397,7 @@ bool CWaveCompleteSummaryPanel::StateUpdateValue( vgui::EditablePanel *parent, c

if ( parent )
{
parent->SetDialogVariable( field, (int)(endValue * fPercent) );
parent->SetDialogVariable( field, V_AddThousandSeparators( (int)( endValue * fPercent ) ) );
}

// transition to next state
Expand Down
36 changes: 18 additions & 18 deletions src/game/client/tf/vgui/tf_clientscoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ void CTFClientScoreBoardDialog::UpdatePlayerList()
pKeyValues->SetInt( "playerIndex", playerIndex );
pKeyValues->SetString( "name", g_TF_PR->GetPlayerName( playerIndex ) );
pKeyValues->SetInt( "dominating", iDominationIndex );
pKeyValues->SetInt( "score", g_TF_PR->GetTotalScore( playerIndex ) );
pKeyValues->SetString( "score", V_AddThousandSeparators( g_TF_PR->GetTotalScore( playerIndex ) ) );
pKeyValues->SetInt( "connected", 2 );

C_TFPlayer *pTFPlayer = ToTFPlayer( UTIL_PlayerByIndex( playerIndex ) );
Expand Down Expand Up @@ -1426,7 +1426,7 @@ void CTFClientScoreBoardDialog::UpdatePlayerList()
{
if ( tf_scoreboard_ping_as_text.GetBool() )
{
pKeyValues->SetInt( "ping", nPing );
pKeyValues->SetString( "ping", V_AddThousandSeparators( nPing ) );
}
else
{
Expand Down Expand Up @@ -1880,84 +1880,84 @@ void CTFClientScoreBoardDialog::UpdatePlayerDetails()
Color cGreen = Color( 0, 255, 0, 255 );
Color cWhite = Color( 255, 255, 255, 255 );

m_pLocalPlayerStatsPanel->SetDialogVariable( "kills", g_TF_PR->GetPlayerScore( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "kills", V_AddThousandSeparators( g_TF_PR->GetPlayerScore( playerIndex ) ) );
if ( m_pKillsLabel )
{
m_pKillsLabel->SetFgColor( g_TF_PR->GetPlayerScore( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "deaths", g_TF_PR->GetDeaths( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "deaths", V_AddThousandSeparators( g_TF_PR->GetDeaths( playerIndex ) ) );
if ( m_pDeathsLabel )
{
m_pDeathsLabel->SetFgColor( g_TF_PR->GetDeaths( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "assists", pSelectedPlayer->m_Shared.GetKillAssists( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "assists", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetKillAssists( playerIndex ) ) );
if ( m_pAssistLabel )
{
m_pAssistLabel->SetFgColor( pSelectedPlayer->m_Shared.GetKillAssists( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "destruction", pSelectedPlayer->m_Shared.GetBuildingsDestroyed( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "destruction", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetBuildingsDestroyed( playerIndex ) ) );
if ( m_pDestructionLabel )
{
m_pDestructionLabel->SetFgColor( pSelectedPlayer->m_Shared.GetBuildingsDestroyed( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "captures", pSelectedPlayer->m_Shared.GetCaptures( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "captures", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetCaptures( playerIndex ) ) );
if ( m_pCapturesLabel )
{
m_pCapturesLabel->SetFgColor( pSelectedPlayer->m_Shared.GetCaptures( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "defenses", pSelectedPlayer->m_Shared.GetDefenses( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "defenses", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetDefenses( playerIndex ) ) );
if ( m_pDefensesLabel )
{
m_pDefensesLabel->SetFgColor( pSelectedPlayer->m_Shared.GetDefenses( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "dominations", pSelectedPlayer->m_Shared.GetDominations( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "dominations", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetDominations( playerIndex ) ) );
if ( m_pDominationsLabel )
{
m_pDominationsLabel->SetFgColor( pSelectedPlayer->m_Shared.GetDominations( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "revenge", pSelectedPlayer->m_Shared.GetRevenge( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "revenge", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetRevenge( playerIndex ) ) );
if ( m_pRevengeLabel )
{
m_pRevengeLabel->SetFgColor( pSelectedPlayer->m_Shared.GetRevenge( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "healing", pSelectedPlayer->m_Shared.GetHealPoints( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "healing", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetHealPoints( playerIndex ) ) );
if ( m_pHealingLabel )
{
m_pHealingLabel->SetFgColor( pSelectedPlayer->m_Shared.GetHealPoints( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "invulns", pSelectedPlayer->m_Shared.GetInvulns( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "invulns", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetInvulns( playerIndex ) ) );
if ( m_pInvulnsLabel )
{
m_pInvulnsLabel->SetFgColor( pSelectedPlayer->m_Shared.GetInvulns( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "teleports", pSelectedPlayer->m_Shared.GetTeleports( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "teleports", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetTeleports( playerIndex ) ) );
if ( m_pTeleportsLabel )
{
m_pTeleportsLabel->SetFgColor( pSelectedPlayer->m_Shared.GetTeleports( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "headshots", pSelectedPlayer->m_Shared.GetHeadshots( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "headshots", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetHeadshots( playerIndex ) ) );
if ( m_pHeadshotsLabel )
{
m_pHeadshotsLabel->SetFgColor( pSelectedPlayer->m_Shared.GetHeadshots( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "backstabs", pSelectedPlayer->m_Shared.GetBackstabs( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "backstabs", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetBackstabs( playerIndex ) ) );
if ( m_pBackstabsLabel )
{
m_pBackstabsLabel->SetFgColor( pSelectedPlayer->m_Shared.GetBackstabs( playerIndex ) ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "bonus", pSelectedPlayer->m_Shared.GetBonusPoints( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "bonus", V_AddThousandSeparators( pSelectedPlayer->m_Shared.GetBonusPoints( playerIndex ) ) );
if ( m_pBonusLabel )
{
m_pBonusLabel->SetFgColor( pSelectedPlayer->m_Shared.GetBonusPoints( playerIndex ) ? cGreen : cWhite );
}

int nSupport = TFGameRules() ? TFGameRules()->CalcPlayerSupportScore( NULL, playerIndex ) : 0;
m_pLocalPlayerStatsPanel->SetDialogVariable( "support", nSupport );
m_pLocalPlayerStatsPanel->SetDialogVariable( "support", V_AddThousandSeparators( nSupport ) );
if ( m_pSupportLabel )
{
m_pSupportLabel->SetFgColor( nSupport ? cGreen : cWhite );
}
m_pLocalPlayerStatsPanel->SetDialogVariable( "damage", g_TF_PR->GetDamage( playerIndex ) );
m_pLocalPlayerStatsPanel->SetDialogVariable( "damage", V_AddThousandSeparators( g_TF_PR->GetDamage( playerIndex ) ) );
if ( m_pDamageLabel )
{
m_pDamageLabel->SetFgColor( g_TF_PR->GetDamage( playerIndex ) ? cGreen : cWhite );
Expand Down
12 changes: 6 additions & 6 deletions src/game/client/tf/vgui/tf_controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ using namespace vgui;
wchar_t* LocalizeNumberWithToken( const char* pszLocToken, int nValue )
{
static wchar_t wszOutString[ 256 ];
wchar_t wszCount[ 16 ];
_snwprintf( wszCount, ARRAYSIZE( wszCount ), L"%d", nValue );
wchar_t wszCount[ 24 ];
_snwprintf( wszCount, ARRAYSIZE( wszCount ), L"%S", V_AddThousandSeparators( nValue ) );
const wchar_t *wpszFormat = g_pVGuiLocalize->Find( pszLocToken );
g_pVGuiLocalize->ConstructString_safe( wszOutString, wpszFormat, 1, wszCount );

Expand All @@ -47,10 +47,10 @@ wchar_t* LocalizeNumberWithToken( const char* pszLocToken, int nValue )
wchar_t* LocalizeNumberWithToken( const char* pszLocToken, int nValue1, int nValue2 )
{
static wchar_t wszOutString[ 256 ];
wchar_t wszCount1[ 16 ];
wchar_t wszCount2[ 16 ];
_snwprintf( wszCount1, ARRAYSIZE( wszCount1 ), L"%d", nValue1 );
_snwprintf( wszCount2, ARRAYSIZE( wszCount2 ), L"%d", nValue2 );
wchar_t wszCount1[ 24 ];
wchar_t wszCount2[ 24 ];
_snwprintf( wszCount1, ARRAYSIZE( wszCount1 ), L"%S", V_AddThousandSeparators( nValue1 ) );
_snwprintf( wszCount2, ARRAYSIZE( wszCount2 ), L"%S", V_AddThousandSeparators( nValue2 ) );
const wchar_t *wpszFormat = g_pVGuiLocalize->Find( pszLocToken );
g_pVGuiLocalize->ConstructString_safe( wszOutString, wpszFormat, 2, wszCount1, wszCount2 );

Expand Down
2 changes: 1 addition & 1 deletion src/game/client/tf/vgui/tf_pvp_rank_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void CPvPRankPanel::UpdateRatingControls( uint32 nPreviousRating, uint32 nCurren
wchar_t wszRating[ 128 ];
auto lambdaRatingString = [ this, &wszRating ]( const char* pszToken, int nRating )
{
V_swprintf_safe( wszRating, L"%d %ls", nRating, g_pVGuiLocalize->Find( m_pProgressionDesc->GetRankUnitsLocToken() ) );
V_swprintf_safe( wszRating, L"%S %ls", V_AddThousandSeparators( nRating ), g_pVGuiLocalize->Find( m_pProgressionDesc->GetRankUnitsLocToken() ) );
return wszRating;
};

Expand Down
12 changes: 9 additions & 3 deletions src/game/shared/econ/econ_item_description.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,10 @@ bool CEconItemDescription::BGenerate_ItemLevelDesc_StrangeNameAndStats( const CL

const uint32 unKillEaterAltType = GetScoreTypeForKillEaterAttr( pEconItem, pKillEaterAltScoreTypeAttrDef );

wchar_t wStrangeScore[18];
g_pVGuiLocalize->ConvertANSIToUnicode( V_AddThousandSeparators( unKillEaterAltScore ), wStrangeScore, sizeof( wStrangeScore ) );
AddDescLine( CConstructLocalizedString( pLocalizationProvider->Find( "ItemTypeDescKillEaterAltv2" ),
unKillEaterAltScore,
wStrangeScore,
GetLocalizedStringForKillEaterTypeAttr( pLocalizationProvider, unKillEaterAltType ),
*CStrangeRestrictionAttrWrapper( pLocalizationProvider, GetLocalizedStringForStrangeRestrictionAttr( pLocalizationProvider, pEconItem, i ) ) ),
ATTRIB_COL_LEVEL,
Expand All @@ -1187,10 +1189,12 @@ bool CEconItemDescription::BGenerate_ItemLevelDesc_StrangeNameAndStats( const CL
static CSchemaAttributeDefHandle pAttrDef_LimitedQuantityItem( "limited quantity item" );
bLimitedQuantity = pEconItem->FindAttribute( pAttrDef_LimitedQuantityItem );

wchar_t wStrangeScore[18];
g_pVGuiLocalize->ConvertANSIToUnicode( V_AddThousandSeparators( RankGenerator.GetStrangeScore() ), wStrangeScore, sizeof( wStrangeScore ) );
AddDescLine( CConstructLocalizedString( pLocalizationProvider->Find( "ItemTypeDescKillEater" ),
RankGenerator.GetRankLocalized(),
locTypename ? locTypename : LOCCHAR(""),
RankGenerator.GetStrangeScore(),
wStrangeScore,
GetLocalizedStringForKillEaterTypeAttr( pLocalizationProvider, RankGenerator.GetStrangeType() ),
*CStrangeRestrictionAttrWrapper( pLocalizationProvider, GetLocalizedStringForStrangeRestrictionAttr( pLocalizationProvider, pEconItem, RankGenerator.GetUsedStrangeSlot() ) ),
RankGenerator.GetRankSecondaryLocalized() ? RankGenerator.GetRankSecondaryLocalized() : LOCCHAR(""),
Expand Down Expand Up @@ -1222,8 +1226,10 @@ bool CEconItemDescription::BGenerate_ItemLevelDesc_StrangeNameAndStats( const CL
if ( unKillEaterAltType == RankGenerator.GetStrangeType() )
continue;

wchar_t wStrangeScore[18];
g_pVGuiLocalize->ConvertANSIToUnicode( V_AddThousandSeparators( unKillEaterAltScore ), wStrangeScore, sizeof( wStrangeScore ) );
AddDescLine( CConstructLocalizedString( pLocalizationProvider->Find( "ItemTypeDescKillEaterAlt" ),
unKillEaterAltScore,
wStrangeScore,
GetLocalizedStringForKillEaterTypeAttr( pLocalizationProvider, unKillEaterAltType ),
*CStrangeRestrictionAttrWrapper( pLocalizationProvider, GetLocalizedStringForStrangeRestrictionAttr( pLocalizationProvider, pEconItem, i ) ) ),
ATTRIB_COL_LEVEL,
Expand Down
2 changes: 2 additions & 0 deletions src/public/tier1/strtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,8 @@ char *V_pretifymem( float value, int digitsafterdecimal = 2, bool usebinaryonek
// Prints out a pretified integer with comma separators (eg, 7,233,270,000)
char *V_pretifynum( int64 value );

char* V_AddThousandSeparators( int value );

int _V_UCS2ToUnicode( const ucs2 *pUCS2, OUT_Z_BYTECAP(cubDestSizeInBytes) wchar_t *pUnicode, int cubDestSizeInBytes );
template< typename T > inline int V_UCS2ToUnicode( const ucs2 *pUCS2, OUT_Z_BYTECAP(cubDestSizeInBytes) wchar_t *pUnicode, T cubDestSizeInBytes )
{
Expand Down
Loading