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:
Mari the Deer 2022-06-22 01:47:34 +02:00
commit 099d7fd55b
21 changed files with 78 additions and 53 deletions

View file

@ -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);