Merge branch 'master' into localization
Conflicts (fixed): ServerExt/Classes/UI_MidGameMenu.uc
This commit is contained in:
commit
84abe621c2
@ -1,3 +1,9 @@
|
||||
class ExtDT_Ballistic_9mm extends KFDT_Ballistic_9mm
|
||||
abstract
|
||||
hidedropdown;
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
ModifierPerkList(0) = class'KFPerk_Sharpshooter'
|
||||
ModifierPerkList(1) = class'KFPerk_Gunslinger'
|
||||
}
|
@ -1,3 +1,9 @@
|
||||
class ExtDT_Ballistic_Pistol_Medic extends KFDT_Ballistic_Pistol_Medic
|
||||
abstract
|
||||
hidedropdown;
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
ModifierPerkList(0) = class'KFPerk_Sharpshooter'
|
||||
ModifierPerkList(1) = class'KFPerk_Gunslinger'
|
||||
}
|
@ -257,6 +257,7 @@ simulated static final function KFGFxObject_TraderItems CreateNewList()
|
||||
simulated static final function SetWeaponInfo( bool bDedicated, int Index, FCustomTraderItem Item, KFGFxObject_TraderItems List )
|
||||
{
|
||||
local array<STraderItemWeaponStats> S;
|
||||
local int i;
|
||||
|
||||
if( List.SaleItems.Length<=Index )
|
||||
List.SaleItems.Length = Index+1;
|
||||
@ -268,16 +269,24 @@ simulated static final function SetWeaponInfo( bool bDedicated, int Index, FCust
|
||||
else List.SaleItems[Index].SingleClassName = '';
|
||||
List.SaleItems[Index].DualClassName = Item.WeaponClass.Default.DualClass!=None ? Item.WeaponClass.Default.DualClass.Name : '';
|
||||
List.SaleItems[Index].AssociatedPerkClasses = Item.WeaponClass.Static.GetAssociatedPerkClasses();
|
||||
List.SaleItems[Index].MaxSpareAmmo = Item.WeaponClass.Default.SpareAmmoCapacity[0];
|
||||
List.SaleItems[Index].MagazineCapacity = Item.WeaponClass.Default.MagazineCapacity[0];
|
||||
List.SaleItems[Index].InitialSpareMags = Item.WeaponClass.Default.InitialSpareMags[0];
|
||||
List.SaleItems[Index].MaxSpareAmmo = Item.WeaponClass.Default.SpareAmmoCapacity[0];
|
||||
List.SaleItems[Index].MaxSecondaryAmmo = Item.WeaponClass.Default.MagazineCapacity[1] * Item.WeaponClass.Default.SpareAmmoCapacity[1];
|
||||
List.SaleItems[Index].BlocksRequired = Item.WeaponClass.Default.InventorySize;
|
||||
List.SaleItems[Index].ItemID = Index;
|
||||
|
||||
List.SaleItems[Index].InitialSecondaryAmmo = Item.WeaponClass.Default.InitialSpareMags[1];
|
||||
List.SaleItems[Index].WeaponUpgradeDmgMultiplier[0] = 1.0;
|
||||
for(i = 0;i<Min(Item.WeaponClass.Default.WeaponUpgrades.Length, 5);i++)
|
||||
{
|
||||
List.SaleItems[Index].WeaponUpgradeWeight[i+1] = Item.WeaponClass.Static.GetUpgradeStatAdd(EWUS_Weight, i+1);
|
||||
List.SaleItems[Index].WeaponUpgradeDmgMultiplier[i+1] = Item.WeaponClass.Static.GetUpgradeStatScale(EWUS_Damage0, i+1);
|
||||
}
|
||||
|
||||
if( !bDedicated )
|
||||
{
|
||||
List.SaleItems[Index].SecondaryAmmoImagePath = Item.WeaponClass.Default.SecondaryAmmoTexture!=None ? "img://"$PathName(Item.WeaponClass.Default.SecondaryAmmoTexture) : "";
|
||||
List.SaleItems[Index].SecondaryAmmoImagePath = Item.WeaponClass.Default.SecondaryAmmoTexture!=None ? PathName(Item.WeaponClass.Default.SecondaryAmmoTexture) : "UI_SecondaryAmmo_TEX.GasTank";
|
||||
List.SaleItems[Index].TraderFilter = Item.WeaponClass.Static.GetTraderFilter();
|
||||
List.SaleItems[Index].InventoryGroup = Item.WeaponClass.Default.InventoryGroup;
|
||||
List.SaleItems[Index].GroupPriority = Item.WeaponClass.Default.GroupPriority;
|
||||
@ -296,10 +305,14 @@ simulated function RecheckGRI()
|
||||
{
|
||||
KFGameReplicationInfo(WorldInfo.GRI).TraderItems = CustomList;
|
||||
foreach LocalPlayerControllers(class'ExtPlayerController',PC)
|
||||
{
|
||||
if( PC.PurchaseHelper!=None )
|
||||
{
|
||||
PC.PurchaseHelper.TraderItems = CustomList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
simulated final function bool ShowAdminName()
|
||||
{
|
||||
|
@ -12,6 +12,11 @@ defaultproperties
|
||||
InventorySize=0
|
||||
|
||||
InstantHitDamageTypes(DEFAULT_FIREMODE)=class'ExtDT_Ballistic_Pistol_Medic'
|
||||
|
||||
WeaponUpgrades[1]=(Stats=((Stat=EWUS_Damage0, Scale=1.7f), (Stat=EWUS_HealFullRecharge, Scale=0.9f)))
|
||||
WeaponUpgrades[2]=(Stats=((Stat=EWUS_Damage0, Scale=2.0f), (Stat=EWUS_HealFullRecharge, Scale=0.8f)))
|
||||
WeaponUpgrades[3]=(Stats=((Stat=EWUS_Damage0, Scale=2.55f), (Stat=EWUS_HealFullRecharge, Scale=0.7f)))
|
||||
WeaponUpgrades[4]=(Stats=((Stat=EWUS_Damage0, Scale=3.0f), (Stat=EWUS_HealFullRecharge, Scale=0.6f)))
|
||||
}
|
||||
|
||||
simulated static function bool AllowedForAllPerks()
|
||||
|
@ -34,7 +34,8 @@ var config int FirstLevelExp, // How much EXP needed for first level.
|
||||
StarPointsPerLevel,
|
||||
MinLevelForPrestige, // Minimum level required for perk prestige.
|
||||
PrestigeSPIncrease, // Starpoint increase per prestige levelup.
|
||||
MaxPrestige; // Maximum prestige level.
|
||||
MaxPrestige,
|
||||
MinimalDataLevel; // Maximum prestige level.
|
||||
var config float PrestigeXPReduce; // Amount of XP cost is reduced for each prestige.
|
||||
var config array<string> TraitClasses;
|
||||
|
||||
@ -405,6 +406,12 @@ function LoadData( ExtSaveDataBase Data )
|
||||
local string S;
|
||||
|
||||
CurrentEXP = Data.ReadInt(3);
|
||||
// if(MinimalDataLevel > 0)
|
||||
// {
|
||||
// i = GetNeededExp(MinimalDataLevel-1)
|
||||
// if(i > CurrentEXP)
|
||||
// CurrentEXP = i
|
||||
// }
|
||||
|
||||
if( Data.GetArVer()>=1 )
|
||||
CurrentPrestige = Data.ReadInt(3);
|
||||
@ -465,6 +472,13 @@ function SetInitialLevel()
|
||||
local int i,a,b;
|
||||
local byte MT,j;
|
||||
|
||||
if(MinimalDataLevel > 0)
|
||||
{
|
||||
i = GetNeededExp(MinimalDataLevel-1);
|
||||
if(i > CurrentEXP)
|
||||
CurrentEXP = i;
|
||||
}
|
||||
|
||||
// Set to initial level player is on after configures has loaded.
|
||||
CurrentLevel = CalcLevelForExp(CurrentEXP);
|
||||
CurrentSP = CurrentLevel*(StarPointsPerLevel+CurrentPrestige*PrestigeSPIncrease);
|
||||
@ -605,6 +619,7 @@ static function UpdateConfigs( int OldVer )
|
||||
Default.MinLevelForPrestige = 140;
|
||||
Default.PrestigeSPIncrease = 1;
|
||||
Default.MaxPrestige = 20;
|
||||
Default.MinimalDataLevel = 0;
|
||||
Default.PrestigeXPReduce = 0.05;
|
||||
|
||||
Default.PerkStats.Length = 0;
|
||||
@ -635,6 +650,8 @@ static function UpdateConfigs( int OldVer )
|
||||
AddStatsCfg(16); // Add sonic/fire damage.
|
||||
else if( OldVer<=12 )
|
||||
AddStatsCfg(18); // Add all damage.
|
||||
else if( OldVer<=13 )
|
||||
AddStatsCfg(19); // Add HeadDamage and HealRecharge
|
||||
if( OldVer<=5 )
|
||||
{
|
||||
// Add prestige
|
||||
@ -707,6 +724,8 @@ static function string GetValue( name PropName, int ElementIndex )
|
||||
return string(Default.MinLevelForPrestige);
|
||||
case 'PrestigeSPIncrease':
|
||||
return string(Default.PrestigeSPIncrease);
|
||||
case 'MinimalDataLevel':
|
||||
return string(Default.MinimalDataLevel);
|
||||
case 'MaxPrestige':
|
||||
return string(Default.MaxPrestige);
|
||||
case 'PrestigeXPReduce':
|
||||
@ -721,6 +740,8 @@ static function ApplyValue( name PropName, int ElementIndex, string Value )
|
||||
Default.FirstLevelExp = int(Value); break;
|
||||
case 'LevelUpExpCost':
|
||||
Default.LevelUpExpCost = int(Value); break;
|
||||
case 'MinimalDataLevel':
|
||||
Default.MinimalDataLevel = int(Value); break;
|
||||
case 'LevelUpIncCost':
|
||||
Default.LevelUpIncCost = int(Value); break;
|
||||
case 'MinimumLevel':
|
||||
@ -1143,6 +1164,12 @@ simulated function float ApplyEffect( name Type, float Value, float Progress )
|
||||
case 'AllDmg':
|
||||
Modifiers[18] = 1.f / (1.f+Value*Progress);
|
||||
break;
|
||||
case 'HeadDamage':
|
||||
Modifiers[19] = Value*Progress;
|
||||
break;
|
||||
case 'HealRecharge':
|
||||
Modifiers[20] = 1.f / (1.f+Value*Progress);
|
||||
break;
|
||||
}
|
||||
return (Value*Progress);
|
||||
}
|
||||
@ -1150,7 +1177,12 @@ simulated function float ApplyEffect( name Type, float Value, float Progress )
|
||||
simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
||||
{
|
||||
if( BasePerk==None || (DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || (KFWeapon(DamageCauser)!=None && IsWeaponOnPerk(KFWeapon(DamageCauser))) )
|
||||
{
|
||||
if(HitZoneIdx == 0)
|
||||
InDamage *= (Modifiers[1] + Modifiers[19]);
|
||||
else
|
||||
InDamage *= Modifiers[1];
|
||||
}
|
||||
else if( DamageType==None || DamageType.Name!='KFDT_SuicideExplosive' )
|
||||
InDamage *= Modifiers[12];
|
||||
}
|
||||
@ -1265,7 +1297,10 @@ final function UpdateAmmoStatus( InventoryManager Inv )
|
||||
}
|
||||
}
|
||||
|
||||
simulated function ModifyHealerRechargeTime( out float RechargeRate );
|
||||
simulated function ModifyHealerRechargeTime( out float RechargeRate )
|
||||
{
|
||||
RechargeRate *= Modifiers[20];
|
||||
}
|
||||
|
||||
simulated function DrawSpecialPerkHUD(Canvas C)
|
||||
{
|
||||
@ -1362,7 +1397,7 @@ simulated function float GetZedTimeExtensions( byte Level )
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
CurrentConfigVer=13
|
||||
CurrentConfigVer=14
|
||||
bOnlyRelevantToOwner=true
|
||||
bCanBeGrabbed=true
|
||||
NetUpdateFrequency=1
|
||||
@ -1410,12 +1445,13 @@ defaultproperties
|
||||
WebConfigs.Add((PropType=0,PropName="PrestigeSPIncrease",UIName="Prestige SP Increase",UIDesc="Star points increase per level for every prestige"))
|
||||
WebConfigs.Add((PropType=0,PropName="MaxPrestige",UIName="Max Prestige",UIDesc="Maximum prestige level"))
|
||||
WebConfigs.Add((PropType=0,PropName="PrestigeXPReduce",UIName="Prestige XP Reduce",UIDesc="Percent amount of XP cost is reduced for each prestige (1.0 = 1/2, or 50 % of XP)"))
|
||||
// WebConfigs.Add((PropType=0,PropName="MinimalDataLevel",UIName="Minimal Real Level",UIDesc="Minimal level for new players or who loads from saves"))
|
||||
|
||||
// TODO: localize
|
||||
DefPerkStats(0)=(MaxValue=50,CostPerValue=1,StatType="Speed",UIName="Movement Speed (+&%)",Progress=0.4)
|
||||
DefPerkStats(1)=(MaxValue=1000,CostPerValue=1,StatType="Damage",UIName="Perk Damage (+&%)",Progress=0.5)
|
||||
DefPerkStats(2)=(MaxValue=90,CostPerValue=1,StatType="Recoil",UIName="Fire Recoil (-&%)",Progress=1)
|
||||
DefPerkStats(3)=(MaxValue=80,CostPerValue=1,StatType="Spread",UIName="Fire Spread (-&%)",Progress=0.75)
|
||||
DefPerkStats(2)=(MaxValue=90,CostPerValue=1,StatType="Recoil",UIName="Fire Recoil Reduce (+&%)",Progress=1)
|
||||
DefPerkStats(3)=(MaxValue=80,CostPerValue=1,StatType="Spread",UIName="Fire Spread Reduce (+&%)",Progress=0.75)
|
||||
DefPerkStats(4)=(MaxValue=1000,CostPerValue=1,StatType="Rate",UIName="Perk Rate of Fire (+&%)",Progress=0.5)
|
||||
DefPerkStats(5)=(MaxValue=1000,CostPerValue=1,StatType="Reload",UIName="Perk Reload Time (-&%)",Progress=0.5)
|
||||
DefPerkStats(6)=(MaxValue=150,CostPerValue=1,StatType="Health",UIName="Health (+&HP)",Progress=1)
|
||||
@ -1431,6 +1467,8 @@ defaultproperties
|
||||
DefPerkStats(16)=(MaxValue=1000,CostPerValue=1,StatType="SonicDmg",UIName="Sonic Resistance (+&%)",Progress=1.5,bHiddenConfig=true)
|
||||
DefPerkStats(17)=(MaxValue=1000,CostPerValue=1,StatType="FireDmg",UIName="Fire Resistance (+&%)",Progress=1.5,bHiddenConfig=true)
|
||||
DefPerkStats(18)=(MaxValue=500,CostPerValue=1,StatType="AllDmg",UIName="Zed Damage Reduction (+&%)",Progress=0.25)
|
||||
DefPerkStats(19)=(MaxValue=500,CostPerValue=1,StatType="HeadDamage",UIName="Perk Head Damage (+&%)",Progress=1,bHiddenConfig=true)
|
||||
DefPerkStats(20)=(MaxValue=200,CostPerValue=1,StatType="HealRecharge",UIName="Syringe Recharge Rate (+&%)",Progress=0.5,bHiddenConfig=true)
|
||||
|
||||
Modifiers.Add(1.f)
|
||||
Modifiers.Add(1.f)
|
||||
@ -1451,6 +1489,8 @@ defaultproperties
|
||||
Modifiers.Add(1.f)
|
||||
Modifiers.Add(1.f)
|
||||
Modifiers.Add(1.f)
|
||||
Modifiers.Add(0.f)
|
||||
Modifiers.Add(1.f)
|
||||
|
||||
EnemyDistDraw.Add(500)
|
||||
EnemyDistDraw.Add(700)
|
||||
|
@ -52,10 +52,13 @@ function bool ModifyHealAmount( out float HealAmount )
|
||||
HealAmount*=Modifiers[9];
|
||||
return (RepairArmorRate>0);
|
||||
}
|
||||
simulated function ModifyHealerRechargeTime( out float RechargeRate )
|
||||
{
|
||||
RechargeRate /= Clamp(Modifiers[9] * 2, 1.f, 3.f);
|
||||
}
|
||||
|
||||
// Di
|
||||
// simulated function ModifyHealerRechargeTime( out float RechargeRate )
|
||||
// {
|
||||
// super.ModifyHealerRechargeTime(RechargeRate)
|
||||
// RechargeRate /= Clamp(Modifiers[9] * 2, 1.f, 3.f);
|
||||
// }
|
||||
|
||||
function CheckForAirborneAgent( KFPawn HealTarget, class<DamageType> DamType, int HealAmount )
|
||||
{
|
||||
@ -112,6 +115,15 @@ simulated function float GetSnarePower( optional class<DamageType> DamageType, o
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
function AddDefaultInventory( KFPawn P )
|
||||
{
|
||||
local int i;
|
||||
i = P.DefaultInventory.Find(class'ExtWeap_Pistol_9mm');
|
||||
if(i != -1)
|
||||
P.DefaultInventory[i] = class'ExtWeap_Pistol_MedicS';
|
||||
super.AddDefaultInventory(P);
|
||||
}
|
||||
|
||||
simulated function bool GetHealingSpeedBoostActive()
|
||||
{
|
||||
return bHealingBoost;
|
||||
@ -203,15 +215,17 @@ defaultproperties
|
||||
DefPerkStats(15)=(bHiddenConfig=false) // Toxic resistance
|
||||
DefPerkStats(16)=(bHiddenConfig=false) // Sonic resistance
|
||||
DefPerkStats(17)=(bHiddenConfig=false) // Fire resistance
|
||||
DefPerkStats(20)=(bHiddenConfig=false) // Heal recharge
|
||||
|
||||
PrimaryMelee=class'KFWeap_Knife_FieldMedic'
|
||||
PrimaryWeapon=class'KFWeap_Pistol_Medic'
|
||||
PrimaryWeapon=None
|
||||
PerkGrenade=class'KFProj_MedicGrenade'
|
||||
SuperGrenade=class'ExtProj_SUPERMedGrenade'
|
||||
SecondaryWeaponDef=class'ExtWeapDef_MedicPistol'
|
||||
|
||||
PrimaryWeaponDef=class'KFWeapDef_MedicPistol'
|
||||
PrimaryWeaponDef=None
|
||||
KnifeWeaponDef=class'KFWeapDef_Knife_Medic'
|
||||
GrenadeWeaponDef=class'KFWeapDef_Grenade_Medic'
|
||||
|
||||
AutoBuyLoadOutPath=(class'KFWeapDef_MedicPistol', class'KFWeapDef_MedicSMG', class'KFWeapDef_MedicShotgun', class'KFWeapDef_MedicRifle')
|
||||
AutoBuyLoadOutPath=(class'KFWeapDef_MedicSMG', class'KFWeapDef_MedicShotgun', class'KFWeapDef_MedicRifle')
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
Class Ext_PerkRhythmPerkBase extends Ext_PerkBase;
|
||||
|
||||
var byte HeadShotComboCount,MaxRhythmCombo,MissComboCount;
|
||||
var byte HeadShotComboCount,MaxRhythmCombo;
|
||||
var float RhythmComboDmg;
|
||||
var private const float HeadShotCountdownIntervall;
|
||||
|
||||
simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
||||
{
|
||||
@ -19,59 +20,51 @@ final function ResetRhythm()
|
||||
MaxRhythmCombo = 0;
|
||||
HeadShotComboCount = 0;
|
||||
RhythmComboDmg = 0;
|
||||
MissComboCount = 0;
|
||||
HeadShotMessage(0,true,1);
|
||||
}
|
||||
|
||||
function SubstractHeadShotCombo()
|
||||
{
|
||||
if( HeadShotComboCount > 0 )
|
||||
UpdateDmgScale(false);
|
||||
else
|
||||
ClearTimer( nameOf( SubstractHeadShotCombo ) );
|
||||
}
|
||||
|
||||
final function UpdateDmgScale( bool bUp )
|
||||
{
|
||||
if( bUp )
|
||||
{
|
||||
MissComboCount = 0;
|
||||
HeadShotComboCount = Min(HeadShotComboCount+1,255);
|
||||
HeadShotComboCount = Min(HeadShotComboCount+1,MaxRhythmCombo);
|
||||
HeadShotMessage(HeadShotComboCount,false,MaxRhythmCombo);
|
||||
SetTimer( HeadShotCountdownIntervall, true, nameOf( SubstractHeadShotCombo ) );
|
||||
}
|
||||
else if( HeadShotComboCount>0 && ++MissComboCount==3 )
|
||||
else if( HeadShotComboCount>0)
|
||||
{
|
||||
--HeadShotComboCount;
|
||||
HeadShotMessage(HeadShotComboCount,true,MaxRhythmCombo);
|
||||
MissComboCount = 0;
|
||||
}
|
||||
else return;
|
||||
RhythmComboDmg = FMin(HeadShotComboCount,MaxRhythmCombo)*0.075;
|
||||
RhythmComboDmg = HeadShotComboCount*0.075;
|
||||
}
|
||||
|
||||
function UpdatePerkHeadShots( ImpactInfo Impact, class<DamageType> DamageType, int NumHit )
|
||||
{
|
||||
local int HitZoneIdx;
|
||||
local KFPawn_Monster KFPM;
|
||||
|
||||
// `log("RACKEMUP" @ GetScriptTrace());
|
||||
|
||||
if( MaxRhythmCombo<=0 )
|
||||
return;
|
||||
KFPM = KFPawn_Monster(Impact.HitActor);
|
||||
if( KFPM==none || KFPM.GetTeamNum()==0 )
|
||||
{
|
||||
if( NumHit < 1 && HeadShotComboCount>0 )
|
||||
UpdateDmgScale(false);
|
||||
return;
|
||||
}
|
||||
|
||||
HitZoneIdx = KFPM.HitZones.Find('ZoneName', Impact.HitInfo.BoneName);
|
||||
if( HitZoneIdx == HZI_Head && KFPM.IsAliveAndWell() )
|
||||
{
|
||||
if( class<KFDamageType>(DamageType)!=None
|
||||
&& (class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0
|
||||
|| DamageType == class'ExtDT_Ballistic_9mm'
|
||||
|| DamageType == class'ExtDT_Ballistic_Pistol_Medic'
|
||||
|| DamageType == class'KFDT_Ballistic_9mm'
|
||||
|| DamageType == class'KFDT_Ballistic_Pistol_Medic'))
|
||||
if( class<KFDamageType>(DamageType)!=None && (class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0))
|
||||
UpdateDmgScale(true);
|
||||
else if( HeadShotComboCount>0 )
|
||||
UpdateDmgScale(false);
|
||||
}
|
||||
else if( NumHit < 1 && HeadShotComboCount>0 )
|
||||
UpdateDmgScale(false);
|
||||
}
|
||||
reliable client function HeadShotMessage( byte HeadShotNum, bool bMissed, byte MaxHits )
|
||||
{
|
||||
@ -110,4 +103,5 @@ reliable client function HeadShotMessage( byte HeadShotNum, bool bMissed, byte M
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
HeadShotCountdownIntervall=2.f
|
||||
}
|
@ -27,11 +27,12 @@ defaultproperties
|
||||
{
|
||||
PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Sharpshooter'
|
||||
DefTraitList.Add(class'Ext_TraitWPSharp')
|
||||
DefTraitList.Add(class'Ext_TraitRackEmUp')
|
||||
DefTraitList.Add(class'Ext_TraitRanger')
|
||||
DefTraitList.Add(class'Ext_TraitDireReload')
|
||||
DefTraitList.Add(class'Ext_TraitEliteReload')
|
||||
BasePerk=class'KFPerk_Sharpshooter'
|
||||
DefPerkStats(1)=(Progress=0.25)
|
||||
DefPerkStats(19)=(bHiddenConfig=false)
|
||||
|
||||
PrimaryMelee=class'KFWeap_Knife_Sharpshooter'
|
||||
PrimaryWeapon=class'KFWeap_Rifle_Winchester1894'
|
||||
|
@ -2,8 +2,26 @@ Class Ext_TraitMedicPistol extends Ext_TraitBase;
|
||||
|
||||
static function AddDefaultInventory( KFPawn Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
|
||||
{
|
||||
Player.DefaultInventory.RemoveItem(class'ExtWeap_Pistol_9mm');
|
||||
Player.DefaultInventory.AddItem(class'ExtWeap_Pistol_MedicS');
|
||||
local int i;
|
||||
i = Player.DefaultInventory.Find(class'ExtWeap_Pistol_9mm');
|
||||
if(i != -1)
|
||||
Player.DefaultInventory[i] = class'ExtWeap_Pistol_MedicS';
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
|
@ -5,7 +5,7 @@ var KFGUI_NumericBox StatCountBox;
|
||||
var KFGUI_Button AddButton;
|
||||
|
||||
var Ext_PerkBase MyPerk;
|
||||
var int StatIndex,OldValue,CurrentCost;
|
||||
var int StatIndex,OldValue,CurrentCost,MaxStatValue;
|
||||
var string ProgressStr;
|
||||
var bool bCostDirty;
|
||||
|
||||
@ -42,7 +42,10 @@ function Timer()
|
||||
{
|
||||
bCostDirty = false;
|
||||
OldValue = MyPerk.PerkStats[StatIndex].CurrentValue;
|
||||
InfoText.SetText(MyPerk.GetStatUIStr(StatIndex)$" ["$OldValue$", Cost "$CurrentCost$", "$ProgressStr$"%]:");
|
||||
if(CurrentCost != 0)
|
||||
InfoText.SetText(MyPerk.GetStatUIStr(StatIndex)$" ["$OldValue$"/"$MaxStatValue$", Cost "$CurrentCost$", "$ProgressStr$"%]:");
|
||||
else
|
||||
InfoText.SetText(MyPerk.GetStatUIStr(StatIndex)$" ["$OldValue$"/"$MaxStatValue$", "$ProgressStr$"%]:");
|
||||
}
|
||||
}
|
||||
function BuyStatPoint( KFGUI_Button Sender )
|
||||
@ -51,8 +54,13 @@ function BuyStatPoint( KFGUI_Button Sender )
|
||||
}
|
||||
function EditBoxChange( KFGUI_EditBox Sender )
|
||||
{
|
||||
if(MyPerk.PerkStats[StatIndex].CostPerValue > 1)
|
||||
CurrentCost = StatCountBox.GetValueInt()*MyPerk.PerkStats[StatIndex].CostPerValue;
|
||||
else
|
||||
CurrentCost = 0;
|
||||
MaxStatValue = MyPerk.PerkStats[StatIndex].MaxValue;
|
||||
ProgressStr = ChopExtraDigits(MyPerk.PerkStats[StatIndex].Progress * StatCountBox.GetValueInt());
|
||||
MaxStatValue = MyPerk.PerkStats[StatIndex].MaxValue;
|
||||
bCostDirty = true;
|
||||
Timer();
|
||||
}
|
||||
@ -68,8 +76,12 @@ final function CheckBuyLimit()
|
||||
|
||||
// Make the value clamped.
|
||||
StatCountBox.ChangeValue(StatCountBox.Value);
|
||||
if(MyPerk.PerkStats[StatIndex].CostPerValue > 1)
|
||||
CurrentCost = StatCountBox.GetValueInt()*MyPerk.PerkStats[StatIndex].CostPerValue;
|
||||
else
|
||||
CurrentCost = 0;
|
||||
ProgressStr = ChopExtraDigits(MyPerk.PerkStats[StatIndex].Progress * StatCountBox.GetValueInt());
|
||||
MaxStatValue = MyPerk.PerkStats[StatIndex].MaxValue;
|
||||
|
||||
// Disable button if can not buy anymore.
|
||||
AddButton.SetDisabled(i==0);
|
||||
|
@ -3,11 +3,11 @@ Class UI_MidGameMenu extends KFGUI_FloatingWindow;
|
||||
var KFGUI_SwitchMenuBar PageSwitcher;
|
||||
var array< class<KFGUI_Base> > Pages;
|
||||
|
||||
var KFGUI_Button AdminButton,SpectateButton;
|
||||
var KFGUI_Button AdminButton,SpectateButton,SkipTraderButton;
|
||||
|
||||
var transient KFGUI_Button PrevButton;
|
||||
var transient int NumButtons,NumButtonRows;
|
||||
var transient bool bInitSpectate,bOldSpectate;
|
||||
var transient bool bInitSpectate,bOldSpectate,bInitSkipTrader;
|
||||
|
||||
function InitMenu()
|
||||
{
|
||||
@ -20,10 +20,11 @@ function InitMenu()
|
||||
// TODO: localize
|
||||
AddMenuButton('Mapvote',"Map Vote","Show mapvote menu");
|
||||
AddMenuButton('Settings',"Settings","Enter the game settings");
|
||||
AddMenuButton('Disconnect',"Disconnect","Disconnect from this server");
|
||||
SkipTraderButton = AddMenuButton('SkipTrader',"Skip Trader","start voting for skip trader");
|
||||
SpectateButton = AddMenuButton('Spectate',"","");
|
||||
AddMenuButton('Close',"Close","Close this menu");
|
||||
//AddMenuButton('Exit',"Exit","Exit this game");
|
||||
AddMenuButton('Disconnect',"Disconnect","Disconnect from this server");
|
||||
AddMenuButton('Exit',"Exit","Exit this game");
|
||||
|
||||
for( i=0; i<Pages.Length; ++i )
|
||||
{
|
||||
@ -41,6 +42,7 @@ function Timer()
|
||||
if( PRI==None )
|
||||
return;
|
||||
AdminButton.SetDisabled(!PRI.bAdmin && PRI.WorldInfo.NetMode==NM_Client);
|
||||
SkipTraderButton.SetDisabled(!SkipTraderIsAviable(PRI));
|
||||
if( !bInitSpectate || bOldSpectate!=PRI.bOnlySpectator )
|
||||
{
|
||||
bInitSpectate = true;
|
||||
@ -50,10 +52,32 @@ function Timer()
|
||||
}
|
||||
}
|
||||
|
||||
function bool SkipTraderIsAviable(PlayerReplicationInfo PRI)
|
||||
{
|
||||
local KFGameReplicationInfo KFGRI;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
|
||||
KFPRI = KFPlayerReplicationInfo(PRI);
|
||||
if (KFPRI == none)
|
||||
return false;
|
||||
|
||||
KFGRI = KFGameReplicationInfo(KFPRI.WorldInfo.GRI);
|
||||
if (KFGRI.bMatchHasBegun && KFGRI.bTraderIsOpen && KFPRI.bHasSpawnedIn)
|
||||
{
|
||||
return !bInitSkipTrader;
|
||||
}
|
||||
else
|
||||
{
|
||||
bInitSkipTrader=false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function ShowMenu()
|
||||
{
|
||||
Super.ShowMenu();
|
||||
AdminButton.SetDisabled(true);
|
||||
SkipTraderButton.SetDisabled(false);
|
||||
if( GetPlayer().WorldInfo.GRI!=None )
|
||||
WindowTitle = GetPlayer().WorldInfo.GRI.ServerName;
|
||||
//KFGFxHudWrapper(GetPlayer().MyHUD).SetVisible(false);
|
||||
@ -91,6 +115,11 @@ function ButtonClicked( KFGUI_Button Sender )
|
||||
ExtPlayerController(GetPlayer()).ChangeSpectateMode(!bOldSpectate);
|
||||
DoClose();
|
||||
break;
|
||||
case 'SkipTrader':
|
||||
KFPlayerController(GetPlayer()).RequestSkipTrader();
|
||||
bInitSkipTrader=true;
|
||||
SkipTraderButton.SetDisabled(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
final function OpenUpMapvote()
|
||||
@ -143,6 +172,7 @@ defaultproperties
|
||||
Pages.Add(Class'UIP_AdminMenu')
|
||||
Pages.Add(Class'UIP_About')
|
||||
Pages.Add(Class'UIP_MiniGame')
|
||||
bInitSkipTrader=false
|
||||
|
||||
Begin Object Class=KFGUI_SwitchMenuBar Name=MultiPager
|
||||
ID="Pager"
|
||||
|
@ -10,6 +10,14 @@ struct FInventory
|
||||
var class<Inventory> ItemClass;
|
||||
var int Values[4];
|
||||
};
|
||||
struct CFGCustomZedXP
|
||||
{
|
||||
var string zed; // zed name
|
||||
var float XP1; // normal
|
||||
var float XP2; // hard
|
||||
var float XP3; // suicidal
|
||||
var float XP4; // hoe
|
||||
};
|
||||
struct FSavedInvEntry
|
||||
{
|
||||
var Controller OwnerPlayer;
|
||||
@ -19,6 +27,7 @@ struct FSavedInvEntry
|
||||
var array<FSavedInvEntry> PlayerInv;
|
||||
|
||||
var config array<string> PerkClasses,CustomChars,AdminCommands,CustomItems,BonusGameSongs,BonusGameFX;
|
||||
var config array<CFGCustomZedXP> CustomZedXP;
|
||||
var array< class<Ext_PerkBase> > LoadedPerks;
|
||||
var array<FCustomCharEntry> CustomCharList;
|
||||
var ExtPlayerStat ServerStatLoader;
|
||||
@ -55,6 +64,14 @@ var config bool bDontUseOriginalWeaponry;
|
||||
var config bool bAllowStandartPistolUpgrade;
|
||||
var config bool bDisableCustomTrader;
|
||||
|
||||
//Custom XP lightly array
|
||||
struct CustomZedXPStruct
|
||||
{
|
||||
var class<KFPawn_Monster> zedclass;
|
||||
var float XPValues[4];
|
||||
};
|
||||
var array<CustomZedXPStruct> CustomZedXPArray;
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
local xVotingHandler MV;
|
||||
@ -66,7 +83,6 @@ function PostBeginPlay()
|
||||
local Object O;
|
||||
local string S;
|
||||
local bool bLock;
|
||||
local KFPickupFactory_Item ItemFactory;
|
||||
|
||||
Super.PostBeginPlay();
|
||||
if( WorldInfo.Game.BaseMutator==None )
|
||||
@ -243,21 +259,53 @@ function PostBeginPlay()
|
||||
if( bDumpXMLStats )
|
||||
FileOutput = Spawn(class'ExtXMLOutput');
|
||||
|
||||
// Disable 9mm and medpistol in all PickupFactories
|
||||
foreach AllActors(class'KFPickupFactory_Item', ItemFactory)
|
||||
UpdateCustomZedXPArray();
|
||||
// Causes bugs
|
||||
// SetTimer(0.1,'CheckPickupFactories')
|
||||
}
|
||||
|
||||
function UpdateCustomZedXPArray()
|
||||
{
|
||||
for(i=0;i<ItemFactory.ItemPickups.Length;i++)
|
||||
local int i;
|
||||
local CustomZedXPStruct zedxp;
|
||||
CustomZedXPArray.Length = 0;
|
||||
// Custom XP for custom zeds
|
||||
for(i=0;i<CustomZedXP.Length;i++)
|
||||
{
|
||||
if(ItemFactory.ItemPickups[i].ItemClass == class'KFGameContent.KFWeap_Pistol_9mm'
|
||||
|| ItemFactory.ItemPickups[i].ItemClass == class'KFGameContent.KFWeap_Pistol_Medic')
|
||||
zedxp.zedclass = class<KFPawn_Monster>(DynamicLoadObject(CustomZedXP[i].zed,Class'Class'));
|
||||
if(zedxp.zedclass == none)
|
||||
{
|
||||
ItemFactory.ItemPickups.Remove(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
`log("Error loading"@CustomZedXP[i].zed);
|
||||
continue;
|
||||
}
|
||||
zedxp.XPValues[0] = CustomZedXP[i].XP1;
|
||||
zedxp.XPValues[1] = CustomZedXP[i].XP2;
|
||||
zedxp.XPValues[2] = CustomZedXP[i].XP3;
|
||||
zedxp.XPValues[3] = CustomZedXP[i].XP4;
|
||||
CustomZedXPArray.AddItem(zedxp);
|
||||
`log("CustomXP: Loaded"@PathName(zedxp.zedclass));
|
||||
}
|
||||
}
|
||||
|
||||
// function CheckPickupFactories()
|
||||
// {
|
||||
// local KFPickupFactory_Item ItemFactory;
|
||||
|
||||
// // Disable 9mm and medpistol in all PickupFactories
|
||||
// foreach AllActors(class'KFPickupFactory_Item', ItemFactory)
|
||||
// {
|
||||
// for(i=0;i<ItemFactory.ItemPickups.Length;i++)
|
||||
// {
|
||||
// if(ItemFactory.ItemPickups[i].ItemClass == class'KFGameContent.KFWeap_Pistol_9mm'
|
||||
// || ItemFactory.ItemPickups[i].ItemClass == class'KFGameContent.KFWeap_Pistol_Medic')
|
||||
// {
|
||||
// ItemFactory.ItemPickups.Remove(i, 1);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
function EditTraiderItems()
|
||||
{
|
||||
local int i;
|
||||
@ -266,7 +314,6 @@ function EditTraiderItems()
|
||||
// local STraderItem SI;
|
||||
// var config bool bDLCWeaponsForFree;
|
||||
// var config bool bDontUseOriginalWeaponry;
|
||||
|
||||
if(!bDontUseOriginalWeaponry)
|
||||
{
|
||||
Trad = KFGameReplicationInfo(WorldInfo.GRI).TraderItems;
|
||||
@ -418,6 +465,7 @@ function CheckWave()
|
||||
function NotifyWaveChange()
|
||||
{
|
||||
local ExtPlayerController ExtPC;
|
||||
local KFProj_RicochetStickBullet KFBolt;
|
||||
|
||||
if( bRespawnCheck )
|
||||
{
|
||||
@ -437,6 +485,13 @@ function NotifyWaveChange()
|
||||
foreach WorldInfo.AllControllers(class'ExtPlayerController',ExtPC)
|
||||
ExtPC.bSetPerk = false;
|
||||
}
|
||||
|
||||
foreach WorldInfo.AllActors(class'KFProj_RicochetStickBullet', KFBolt)
|
||||
{
|
||||
if(KFProj_Bolt_CompoundBowSharp(KFBolt) != none ||
|
||||
KFProj_Bolt_Crossbow(KFBolt) != none)
|
||||
KFBolt.Destroy();
|
||||
}
|
||||
}
|
||||
function SetupWebAdmin()
|
||||
{
|
||||
@ -551,14 +606,28 @@ function ScoreKill(Controller Killer, Controller Killed)
|
||||
KFPC = KFPlayerController(DamagerKFPRI.Owner);
|
||||
if( KFPC != none )
|
||||
{
|
||||
`log("ScoreKill:"@PathName(KFM));
|
||||
|
||||
XP = 0;
|
||||
for(j=0;j<CustomZedXPArray.Length;j++)
|
||||
{
|
||||
if(KFM.Class == CustomZedXPArray[j].zedclass)
|
||||
{
|
||||
XP = CustomZedXPArray[j].XPValues[MyKFGI.GameDifficulty];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(XP == 0)
|
||||
XP = KFM.static.GetXPValue(MyKFGI.GameDifficulty);
|
||||
|
||||
InstigatorPerk = KFPC.GetPerk();
|
||||
if( InstigatorPerk.ShouldGetAllTheXP() )
|
||||
{
|
||||
KFPC.OnPlayerXPAdded(KFM.static.GetXPValue(MyKFGI.GameDifficulty), InstigatorPerk.Class);
|
||||
KFPC.OnPlayerXPAdded(XP, InstigatorPerk.Class);
|
||||
continue;
|
||||
}
|
||||
|
||||
XP = KFM.static.GetXPValue(MyKFGI.GameDifficulty) / KFM.DamageHistory[i].DamagePerks.Length;
|
||||
XP /= KFM.DamageHistory[i].DamagePerks.Length;
|
||||
|
||||
for( j = 0; j < KFM.DamageHistory[i].DamagePerks.Length; j++ )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user