Disable buying of nuggets (your ears will thank me).
This commit is contained in:
parent
b876515745
commit
7b1a87d8a5
4 changed files with 4 additions and 37 deletions
|
|
@ -107,9 +107,6 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
|
|||
{
|
||||
// skip maxed items if buying
|
||||
if ( cur && (cur.Amount >= cur.MaxAmount) ) return true;
|
||||
// nuggets are skipped if more can't be picked up
|
||||
if ( (type is 'HealthNuggetItem') && (players[consoleplayer].Health >= GetDefaultByType('HealthNugget').MaxAmount) ) return true;
|
||||
if ( (type is 'ArmorNuggetItem') && (players[consoleplayer].mo.CountInv('ArmorNugget') >= GetDefaultByType('ArmorNugget').MaxAmount) ) return true;
|
||||
// ignore ammo for weapons not owned if buying
|
||||
bool notownedammo = false;
|
||||
if ( type is 'Ammo' )
|
||||
|
|
@ -498,36 +495,6 @@ Class DemolitionistMenuStoreItem : DemolitionistMenuListItem
|
|||
}
|
||||
}
|
||||
}
|
||||
// nuggets can be bought in bulk
|
||||
else if ( inv is 'HealthNuggetItem' )
|
||||
{
|
||||
let def2 = GetDefaultByType(SWWMHealth(def).giveme);
|
||||
int maxamt = int(ceil((def2.MaxAmount-players[consoleplayer].Health)/double(def2.Amount)));
|
||||
for ( int j=5; j<=25; j+=5 )
|
||||
{
|
||||
int cprice = int(def.Stamina*(1.+.75*(j-1)));
|
||||
if ( (j <= maxamt) && SWWMCredits.CanTake(players[consoleplayer],cprice) )
|
||||
{
|
||||
price = cprice;
|
||||
amt = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( inv is 'ArmorNuggetItem' )
|
||||
{
|
||||
let def2 = GetDefaultByType(SWWMSpareArmor(def).giveme);
|
||||
let cur2 = players[consoleplayer].mo.FindInventory(SWWMSpareArmor(def).giveme);
|
||||
int maxamt = int(ceil((cur2?(cur2.MaxAmount-cur2.Amount):def2.MaxAmount)/double(def2.Amount)));
|
||||
for ( int j=5; j<=20; j+=5 )
|
||||
{
|
||||
int cprice = int(def.Stamina*(1.+.75*(j-1)));
|
||||
if ( (j <= maxamt) && SWWMCredits.CanTake(players[consoleplayer],cprice) )
|
||||
{
|
||||
price = cprice;
|
||||
amt = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( bSell && (inv is 'Weapon') )
|
||||
{
|
||||
let w = GetDefaultByType((Class<Weapon>)(inv));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue