KF2-Server-Extension/ServerExt/Classes/ExtWeap_Pistol_MedicS.uc
inklesspen1scripter ac0be53289 Fixes and changes
Fixed upgrades in WeaponSelectWidget
Fixed original weapons in CustomTrader
Removed dual 9mm and medpistol from trader
MedicPistol: replaced GetPerk function just for fun
CustomTrader is always active now
Custom 9mm and medpistol added to trader for upgrades
Removed 9mm and medpistol from PickupFactory (weapons that placed on map)

Known bug: custom 9mm and medpistol haven't localization, i dont know how to fix that
2020-06-23 15:48:24 +03:00

41 lines
829 B
Ucode

class ExtWeap_Pistol_MedicS extends KFWeap_Pistol_Medic;
defaultproperties
{
bCanThrow=false
SpareAmmoCapacity[0]=-1
InitialSpareMags[0]=0
bInfiniteSpareAmmo=True
// Remove weight bcs of replacing 9mm
InventorySize=0
InstantHitDamageTypes(DEFAULT_FIREMODE)=class'ExtDT_Ballistic_Pistol_Medic'
}
simulated static function bool AllowedForAllPerks()
{
return true;
}
simulated function ConsumeAmmo( byte FireModeNum )
{
if(FireModeNum == ALTFIRE_FIREMODE)
super.ConsumeAmmo(FireModeNum);
}
simulated static event class<KFPerk> GetWeaponPerkClass( class<KFPerk> InstigatorPerkClass )
{
if(InstigatorPerkClass != None)
return InstigatorPerkClass;
return default.AssociatedPerkClasses[0];
}
simulated function KFPerk GetPerk()
{
if(KFPlayer != None)
return KFPlayer.GetPerk();
return super.GetPerk();
}