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
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r227 \cu(Thu 28 Jul 21:01:08 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r227 \cu(2022-07-28 21:01:08)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r228 \cu(Thu 28 Jul 23:42:57 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r228 \cu(2022-07-28 23:42:57)\c-";
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Class ArmorNuggetItem : SWWMSpareArmor
|
|||
Default
|
||||
{
|
||||
Tag "$T_NUGGETA";
|
||||
Stamina 1200;
|
||||
Stamina -1200;
|
||||
Inventory.PickupMessage "$T_NUGGETA";
|
||||
Inventory.MaxAmount 0;
|
||||
Inventory.InterHubAmount 0;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ Class HealthNuggetItem : SWWMHealth
|
|||
Default
|
||||
{
|
||||
Tag "$T_NUGGETH";
|
||||
Stamina 500;
|
||||
Stamina -500;
|
||||
Inventory.PickupMessage "$T_NUGGETH";
|
||||
Inventory.MaxAmount 0;
|
||||
Inventory.InterHubAmount 0;
|
||||
|
|
|
|||
|
|
@ -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