2017-10-20 02:00:49 +00:00
|
|
|
Class Ext_TraitMedicPistol extends Ext_TraitBase;
|
|
|
|
|
|
|
|
static function AddDefaultInventory( KFPawn Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
|
|
|
{
|
2017-10-20 07:02:53 +00:00
|
|
|
Player.DefaultInventory.RemoveItem(class'ExtWeap_Pistol_9mm');
|
|
|
|
Player.DefaultInventory.AddItem(class'ExtWeap_Pistol_MedicS');
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
|
2020-07-07 14:29:42 +00:00
|
|
|
static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
|
|
|
{
|
|
|
|
local Inventory Inv;
|
|
|
|
|
|
|
|
Inv = Player.FindInventoryType(class'ExtWeap_Pistol_9mm');
|
|
|
|
if( Inv!=None )
|
|
|
|
Inv.Destroy();
|
|
|
|
|
|
|
|
if( Player.FindInventoryType(class'ExtWeap_Pistol_MedicS')==None )
|
|
|
|
{
|
|
|
|
Inv = Player.CreateInventory(class'ExtWeap_Pistol_MedicS',Player.Weapon!=None);
|
|
|
|
if ( KFWeapon(Inv)!=None )
|
|
|
|
KFWeapon(Inv).bGivenAtStart = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-20 02:00:49 +00:00
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
TraitName="Medic Pistol"
|
|
|
|
DefLevelCosts(0)=20
|
|
|
|
Description="Spawn with a medic pistol instead of standard 9mm."
|
|
|
|
}
|