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
This commit is contained in:
inklesspen1scripter
2020-06-23 15:48:24 +03:00
parent 2c78db14c2
commit ac0be53289
7 changed files with 128 additions and 25 deletions

View File

@ -63,6 +63,7 @@ simulated function SetWeaponGroupList(out array<KFWeapon> WeaponList, byte Group
TempObj.SetString( "texturePath", "img://"$PathName(WeaponList[i].WeaponSelectTexture));
}
TempObj.SetInt("weaponTier", WeaponList[i].CurrentWeaponUpgradeIndex);
TempObj.SetInt( "ammoCount", WeaponList[i].AmmoCount[0]);
TempObj.SetInt( "spareAmmoCount", WeaponList[i].SpareAmmoCount[0]);
//secondary ammo shenanigans

View File

@ -236,17 +236,16 @@ simulated reliable client function ClientAddTraderItem( int Index, FCustomTrader
if( CustomList==None )
{
CustomList = CreateNewList();
CustomList = CreateNewList(KFGameInfo(WorldInfo.Game).MyKFGRI.TraderItems);
RecheckGRI();
}
CustomItems.AddItem(Item);
SetWeaponInfo(false,Index,Item,CustomList);
}
simulated static final function KFGFxObject_TraderItems CreateNewList()
simulated static final function KFGFxObject_TraderItems CreateNewList(KFGFxObject_TraderItems B)
{
local KFGFxObject_TraderItems L,B;
local KFGFxObject_TraderItems L;
B = class'KFGameReplicationInfo'.Default.TraderItems;
L = new(B) class'KFGFxObject_TraderItems'; // Make clone of list.
L.SaleItems = B.SaleItems;
L.ArmorPrice = B.ArmorPrice;

View File

@ -0,0 +1,10 @@
class ExtWeapDef_9mm extends KFWeapDef_9mm
abstract;
DefaultProperties
{
// Set free ammo
AmmoPricePerMag=0
WeaponClassPath="ServerExt.ExtWeap_Pistol_9mm"
}

View File

@ -0,0 +1,19 @@
class ExtWeapDef_MedicPistol extends KFWeapDef_MedicPistol
abstract;
DefaultProperties
{
// Unsellable weapon
BuyPrice=0
// Free ammo
AmmoPricePerMag=0
WeaponClassPath="ServerExt.ExtWeap_Pistol_MedicS"
// Unsellable upgrades
UpgradeSellPrice[0] = 0
UpgradeSellPrice[1] = 0
UpgradeSellPrice[2] = 0
UpgradeSellPrice[3] = 0
}

View File

@ -7,7 +7,7 @@ defaultproperties
bInfiniteSpareAmmo=True
DualClass=class'ExtWeap_Pistol_Dual9mm'
// DualClass=class'ServerExt.ExtWeap_Pistol_MedicS'
InstantHitDamageTypes(DEFAULT_FIREMODE)=class'ExtDT_Ballistic_9mm'
}

View File

@ -6,9 +6,11 @@ defaultproperties
SpareAmmoCapacity[0]=-1
InitialSpareMags[0]=0
bInfiniteSpareAmmo=True
// Remove weight bcs of replacing 9mm
InventorySize=0
InstantHitDamageTypes(DEFAULT_FIREMODE)=class'ExtDT_Ballistic_Pistol_Medic'
}
@ -29,4 +31,11 @@ simulated static event class<KFPerk> GetWeaponPerkClass( class<KFPerk> Instigato
return InstigatorPerkClass;
return default.AssociatedPerkClasses[0];
}
simulated function KFPerk GetPerk()
{
if(KFPlayer != None)
return KFPlayer.GetPerk();
return super.GetPerk();
}