KF2-Server-Extension/ServerExt/Classes/Ext_TraitMachineGunner.uc

39 lines
846 B
Ucode
Raw Permalink Normal View History

Class Ext_TraitMachineGunner extends Ext_TraitBase;
var localized string GroupDescription;
function string GetPerkDescription()
{
local string S;
S = Super.GetPerkDescription();
S $= "|"$GroupDescription;
return S;
}
2020-11-28 20:04:55 +00:00
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
{
2020-11-28 20:12:58 +00:00
if (Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<2)
return false;
2023-05-14 03:01:17 +00:00
return true;
}
2020-11-28 20:04:55 +00:00
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkCommando(Perk).bUseMachineGunner = true;
}
2020-11-28 20:04:55 +00:00
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkCommando(Perk).bUseMachineGunner = false;
}
defaultproperties
{
SupportedPerk=class'Ext_PerkCommando'
TraitGroup=class'Ext_TGroupZEDTime'
NumLevels=1
DefLevelCosts(0)=60
DefMinLevel=55
}