2017-10-20 02:00:49 +00:00
class ExtPerksContainer _Details extends KFGFxPerksContainer _Details ;
2020-11-28 20:12:58 +00:00
` define AddWeaponsInfo(InClassDef) if ( ` InClassDef != None ) AddWeaponInfo ( WeaponNames , WeaponSources , ` InClassDef.static.GetItemName(), ` InClassDef . static . GetImagePath ( ) )
2017-10-20 02:00:49 +00:00
2020-11-28 20:04:55 +00:00
final function ExUpdateDetails ( Ext _PerkBase PerkClass )
2017-10-20 02:00:49 +00:00
{
local GFxObject DetailsProvider ;
local KFPlayerController KFPC ;
local KFGameReplicationInfo KFGRI ;
local array < string > WeaponNames ;
local array < string > WeaponSources ;
local int i ;
2020-11-28 20:04:55 +00:00
DetailsProvider = CreateObject ( "Object" ) ;
2017-10-20 02:00:49 +00:00
2023-05-14 03:01:17 +00:00
KFPC = KFPlayerController ( GetPC ( ) ) ;
2017-10-20 02:00:49 +00:00
2020-11-28 20:04:55 +00:00
if ( KFPC != none )
2017-10-20 02:00:49 +00:00
{
KFGRI = KFGameReplicationInfo ( KFPC . WorldInfo . GRI ) ;
2023-05-14 03:01:17 +00:00
2020-11-28 20:04:55 +00:00
DetailsProvider . SetString ( "ExperienceMessage" , ExperienceString @ PerkClass . CurrentEXP ) ;
2017-10-20 02:00:49 +00:00
2020-11-28 20:12:58 +00:00
if ( KFGRI != none )
2017-10-20 02:00:49 +00:00
{
` AddWeaponsInfo(PerkClass.PrimaryWeaponDef);
` AddWeaponsInfo(PerkClass.SecondaryWeaponDef);
` AddWeaponsInfo(PerkClass.KnifeWeaponDef);
` AddWeaponsInfo(PerkClass.GrenadeWeaponDef);
}
for ( i = 0 ; i < WeaponNames . length ; i ++ )
{
2023-05-14 03:01:17 +00:00
DetailsProvider . SetString ( "WeaponName" $ i , WeaponNames [ i ] ) ;
DetailsProvider . SetString ( "WeaponImage" $ i , "img://" $WeaponSources [ i ] ) ;
2017-10-20 02:00:49 +00:00
}
2020-11-28 20:04:55 +00:00
DetailsProvider . SetString ( "EXPAction1" , "Kill zombies" ) ;
2023-05-14 03:01:17 +00:00
//DetailsProvider.SetString("EXPAction2", PerkClass.default.EXPAction2);
2017-10-20 02:00:49 +00:00
2020-11-28 20:04:55 +00:00
SetObject ( "detailsData" , DetailsProvider ) ;
2017-10-20 02:00:49 +00:00
}
}
2020-11-28 20:04:55 +00:00
final function ExUpdatePassives ( Ext _PerkBase PerkClass )
2017-10-20 02:00:49 +00:00
{
local GFxObject PassivesProvider ;
local GFxObject PassiveObject ;
local int i ;
PassivesProvider = CreateArray ( ) ;
2020-11-28 20:12:58 +00:00
for ( i = 0 ; i < PerkClass . PerkStats . Length ; ++ i )
2017-10-20 02:00:49 +00:00
{
2020-11-28 20:04:55 +00:00
PassiveObject = CreateObject ( "Object" ) ;
PassiveObject . SetString ( "PassiveTitle" , PerkClass . GetStatUIStr ( i ) ) ;
2023-05-14 03:01:17 +00:00
PassiveObject . SetString ( "PerkBonusModifier" , "" ) ;
2020-11-28 20:04:55 +00:00
PassiveObject . SetString ( "PerkBonusAmount" , "" ) ;
PassivesProvider . SetElementObject ( i , PassiveObject ) ;
2017-10-20 02:00:49 +00:00
}
2020-11-28 20:04:55 +00:00
SetObject ( "passivesData" , PassivesProvider ) ;
2017-10-20 02:00:49 +00:00
}