Allow selling Candygun spares if we own a Mortal Rifle.

This commit is contained in:
Mari the Deer 2022-09-20 22:51:17 +02:00
commit 4bb363928f
2 changed files with 4 additions and 4 deletions

View file

@ -100,8 +100,8 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
if ( !(gameinfo.gametype&GAME_DOOM) && (type is 'EBarrier') ) return true;
// no gravity/tether outside raven
if ( !(gameinfo.gametype&GAME_RAVEN) && ((type is 'GravitySuppressor') || (type is 'SafetyTether')) ) return true;
// can't sell candygun spares
if ( bSell && (type is 'CandyGunSpares') ) return true;
// can't sell candygun spares if we already own a Candy Gun
if ( bSell && (type is 'CandyGunSpares') && players[consoleplayer].mo.FindInventory("CandyGun") ) return true;
// skip items we don't own or are depleted if selling
if ( bSell && (!cur || (cur.Amount <= 0)) ) return true;
else if ( !bSell )