Nuggets give 2 health / 5 armor.
Mag ammo can now be sold. Fix selling prices of bulk items. Fix rare case where mag ammo can be picked up without a parent. Fix alt hud crash when no weapon is selected. Various other adjustments.
This commit is contained in:
parent
f8ec71cf7f
commit
099d7fd55b
21 changed files with 78 additions and 53 deletions
|
|
@ -807,6 +807,7 @@ Class SilverBullets : MagAmmo
|
|||
//$Icon ammo
|
||||
Tag "$T_XSBBULLET";
|
||||
MagAmmo.PickupTag "XSBBULLET";
|
||||
Stamina -12000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_SilverBulletBullet.png";
|
||||
MagAmmo.ParentAmmo "SilverBulletAmmo";
|
||||
MagAmmo.ClipSize 5;
|
||||
|
|
@ -859,6 +860,7 @@ Class SilverBullets2 : MagAmmo
|
|||
//$Icon ammo
|
||||
Tag "$T_FCBBULLET";
|
||||
MagAmmo.PickupTag "FCBBULLET";
|
||||
Stamina -15000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_SilverBulletBullet2.png";
|
||||
MagAmmo.ParentAmmo "SilverBulletAmmo2";
|
||||
MagAmmo.ClipSize 5;
|
||||
|
|
@ -948,6 +950,7 @@ Class CandyGunBullets : MagAmmo
|
|||
//$Icon ammo
|
||||
Tag "$T_CANDYBULLET";
|
||||
MagAmmo.PickupTag "CANDYBULLET";
|
||||
Stamina -14000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_CandyBullet.png";
|
||||
MagAmmo.ParentAmmo "CandyGunAmmo";
|
||||
MagAmmo.ClipSize 7;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Class ArmorNugget : SWWMArmor
|
|||
Default
|
||||
{
|
||||
Inventory.Icon "graphics/HUD/Icons/I_ArmorNugget.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.Amount 5;
|
||||
Inventory.MaxAmount 200;
|
||||
Inventory.InterHubAmount 200;
|
||||
SWWMArmor.ArmorPriority 3;
|
||||
|
|
@ -52,7 +52,7 @@ Class ArmorNuggetItem : SWWMSpareArmor
|
|||
//$Sprite graphics/HUD/Icons/I_ArmorNugget.png
|
||||
//$Icon armour
|
||||
Tag "$T_NUGGETA";
|
||||
Stamina 400;
|
||||
Stamina 1200;
|
||||
Inventory.PickupMessage "$T_NUGGETA";
|
||||
Inventory.MaxAmount 0;
|
||||
Inventory.InterHubAmount 0;
|
||||
|
|
|
|||
|
|
@ -376,6 +376,17 @@ Class MagAmmo : Inventory abstract
|
|||
// drop excess mag ammo
|
||||
if ( (item is 'MagAmmo') && (MagAmmo(item).GetParentMagAmmo() == GetClass()) )
|
||||
{
|
||||
// can somehow happen
|
||||
if ( !pamo )
|
||||
{
|
||||
pamo = Ammo(Owner.FindInventory(ParentAmmo));
|
||||
if ( !pamo )
|
||||
{
|
||||
pamo = Ammo(Spawn(ParentAmmo));
|
||||
pamo.AttachToOwner(Owner);
|
||||
pamo.Amount = 0;
|
||||
}
|
||||
}
|
||||
if ( bUNDROPPABLE || bUNTOSSABLE )
|
||||
{
|
||||
// undroppable mag ammo only drops full mags.
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ Class SWWMSpareArmor : Inventory abstract
|
|||
override bool Use( bool pickup )
|
||||
{
|
||||
let cur = Owner.FindInventory(giveme);
|
||||
if ( !cur || (!pickup && (cur.Amount < cur.MaxAmount)) || (GetDefaultByType(giveme).Amount+cur.Amount <= cur.MaxAmount) )
|
||||
if ( !cur || (!pickup && (cur.Amount < cur.MaxAmount)) || (GetDefaultByType(giveme).Amount+cur.Amount <= cur.MaxAmount) || ((default.MaxAmount > 0) && (cur.Amount < cur.MaxAmount)) )
|
||||
{
|
||||
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
|
||||
Owner.GiveInventory(giveme,GetDefaultByType(giveme).Amount);
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ Class SWWMHealth : Inventory abstract
|
|||
override bool Use( bool pickup )
|
||||
{
|
||||
if ( Owner.Health >= GetDefaultByType(giveme).MaxAmount ) return false;
|
||||
// healing items won't get auto-used on pickup if their healing could "be wasted", unless they're powerup health (e.g. Refresher)
|
||||
if ( pickup && !bBIGPOWERUP && (Owner.Health+GetDefaultByType(giveme).Amount > GetDefaultByType(giveme).MaxAmount) ) return false;
|
||||
// healing items won't get auto-used on pickup if their healing could "be wasted", unless they're powerup health (e.g. Refresher) or bonus health
|
||||
if ( pickup && !bBIGPOWERUP && (default.MaxAmount > 0) && (Owner.Health+GetDefaultByType(giveme).Amount > GetDefaultByType(giveme).MaxAmount) ) return false;
|
||||
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
|
||||
SWWMHandler.HealthFlash(Owner.PlayerNumber());
|
||||
Owner.GiveInventory(giveme,GetDefaultByType(giveme).Amount);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Class HealthNugget : Health
|
|||
{
|
||||
Default
|
||||
{
|
||||
Inventory.Amount 1;
|
||||
Inventory.Amount 2;
|
||||
Inventory.MaxAmount 200;
|
||||
}
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ Class HealthNuggetItem : SWWMHealth
|
|||
//$Sprite graphics/HUD/Icons/I_HealthNugget.png
|
||||
//$Icon health
|
||||
Tag "$T_NUGGETH";
|
||||
Stamina 200;
|
||||
Stamina 500;
|
||||
Inventory.PickupMessage "$T_NUGGETH";
|
||||
Inventory.MaxAmount 0;
|
||||
Inventory.InterHubAmount 0;
|
||||
|
|
|
|||
|
|
@ -3020,9 +3020,9 @@ Class MykradvoX : GhostArtifactX
|
|||
Destroy();
|
||||
return;
|
||||
}
|
||||
prev = target.prev+(0,0,16);
|
||||
prev = target.prev;
|
||||
vel = target.vel;
|
||||
if ( (target.pos != pos+(0,0,16)) || (target.vel != (0,0,0)) ) SetOrigin(target.pos+(0,0,16)+vel,true);
|
||||
if ( (target.pos != pos) || (target.vel != (0,0,0)) ) SetOrigin(target.pos+vel,true);
|
||||
if ( angle != target.angle ) A_SetAngle(target.angle,SPF_INTERPOLATE);
|
||||
FloatBobPhase = target.FloatBobPhase;
|
||||
A_SetScale(.16+.01*sin(GetAge()*4));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue