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:
@ -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
|
||||
|
@ -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;
|
||||
|
10
ServerExt/Classes/ExtWeapDef_9mm.uc
Normal file
10
ServerExt/Classes/ExtWeapDef_9mm.uc
Normal file
@ -0,0 +1,10 @@
|
||||
class ExtWeapDef_9mm extends KFWeapDef_9mm
|
||||
abstract;
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
// Set free ammo
|
||||
AmmoPricePerMag=0
|
||||
|
||||
WeaponClassPath="ServerExt.ExtWeap_Pistol_9mm"
|
||||
}
|
19
ServerExt/Classes/ExtWeapDef_MedicPistol.uc
Normal file
19
ServerExt/Classes/ExtWeapDef_MedicPistol.uc
Normal 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
|
||||
}
|
@ -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'
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
Reference in New Issue
Block a user