88f2c71e54
Fixed scoreboard avatars not working Added the ServerExt perk menu to the lobby Made the perk buttons look better (Reset, Unload, Prestige) Added a better damage popup system Added a better pet info hud system Made player info bars fade out with distance Added missing traits from most of the perks Made lobby menu support 12 players Medic Pistol from the trait can't be dropped, sold and has infinite ammo 9mm Pistol now has infinite ammo Pet sirens do not blow up grenades Unlocked all cosmetics and emotes Hide bad cosmetics that were debug Hans pet no longer forces the camera on his death Custom weapons in the trader now support the proper weapon names Updated character info system to support alot of added items
65 lines
1.4 KiB
Ucode
65 lines
1.4 KiB
Ucode
class ExtMenu_Inventory extends KFGFxMenu_Inventory;
|
|
|
|
function bool IsItemActive(int ItemDefinition)
|
|
{
|
|
local class<KFWeaponDefinition> WeaponDef;
|
|
local int ItemIndex;
|
|
|
|
ItemIndex = class'ExtWeaponSkinList'.default.Skins.Find('Id', ItemDefinition);
|
|
|
|
if(ItemIndex == INDEX_NONE)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
WeaponDef = class'ExtWeaponSkinList'.default.Skins[ItemIndex].WeaponDef;
|
|
|
|
if(WeaponDef != none)
|
|
{
|
|
return class'ExtWeaponSkinList'.Static.IsSkinEquip(WeaponDef, ItemDefinition, ExtPlayerController(KFPC));
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
function Callback_Equip( int ItemDefinition )
|
|
{
|
|
local class<KFWeaponDefinition> WeaponDef;
|
|
local int ItemIndex;
|
|
|
|
ItemIndex = class'ExtWeaponSkinList'.default.Skins.Find('Id', ItemDefinition);
|
|
|
|
if(ItemIndex == INDEX_NONE)
|
|
{
|
|
return;
|
|
}
|
|
|
|
WeaponDef = class'ExtWeaponSkinList'.default.Skins[ItemIndex].WeaponDef;
|
|
|
|
if(WeaponDef != none)
|
|
{
|
|
if(IsItemActive(ItemDefinition))
|
|
{
|
|
class'ExtWeaponSkinList'.Static.SaveWeaponSkin(WeaponDef, 0, ExtPlayerController(KFPC));
|
|
|
|
if(class'WorldInfo'.static.IsConsoleBuild( ))
|
|
{
|
|
Manager.CachedProfile.ClearWeaponSkin(WeaponDef.default.WeaponClassPath);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
class'ExtWeaponSkinList'.Static.SaveWeaponSkin(WeaponDef, ItemDefinition, ExtPlayerController(KFPC));
|
|
if(class'WorldInfo'.static.IsConsoleBuild( ))
|
|
{
|
|
Manager.CachedProfile.SaveWeaponSkin(WeaponDef.default.WeaponClassPath, ItemDefinition);
|
|
}
|
|
}
|
|
}
|
|
|
|
InitInventory();
|
|
}
|
|
|
|
defaultproperties
|
|
{
|
|
} |