Proper handling of charge redistribution on multi-copy items (fixes infinitely replenishable charge exploit). More preparation code for other items.
62 lines
1.1 KiB
Text
62 lines
1.1 KiB
Text
Class UTranslocatorAmmo : Ammo
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Icon "I_Tele";
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 2;
|
|
Ammo.BackpackAmount 0;
|
|
Ammo.BackpackMaxAmount 2;
|
|
+INVENTORY.IGNORESKILL;
|
|
}
|
|
override void Tick()
|
|
{
|
|
Super.Tick();
|
|
if ( sting_telegun ) return;
|
|
if ( Owner ) Owner.RemoveInventory(self);
|
|
Destroy();
|
|
}
|
|
}
|
|
|
|
Class UTranslocatorModule : Actor
|
|
{
|
|
}
|
|
|
|
Class UTranslocator : UnrealWeapon
|
|
{
|
|
override bool TryPickup( in out Actor toucher )
|
|
{
|
|
if ( !sting_telegun ) return false; // not allowed
|
|
return Super.TryPickup(toucher);
|
|
}
|
|
override void Tick()
|
|
{
|
|
Super.Tick();
|
|
if ( sting_telegun ) return;
|
|
if ( Owner ) Owner.RemoveInventory(self);
|
|
Destroy();
|
|
}
|
|
Default
|
|
{
|
|
Tag "$T_TELEGUN";
|
|
Inventory.PickupMessage "$I_TELEGUN";
|
|
Weapon.SlotNumber 9;
|
|
Weapon.SelectionOrder 10;
|
|
Weapon.AmmoType1 "UTranslocatorAmmo";
|
|
Weapon.AmmoUse1 1;
|
|
Weapon.AmmoType2 "UTranslocatorAmmo";
|
|
Weapon.AmmoUse2 1;
|
|
Weapon.AmmoGive 2;
|
|
UTWeapon.DropAmmo 2;
|
|
+WEAPON.NO_AUTO_SWITCH;
|
|
+WEAPON.CHEATNOTWEAPON;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
TLCP A -1;
|
|
Stop;
|
|
TLCP B -1;
|
|
Stop;
|
|
}
|
|
}
|