Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions autopilot.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,10 @@ async function maybeInstallAugmentations(ns, player) {
setStatus(ns, `No singularity access, so you're on your own. You should manually work for factions and install augmentations!`);
return false; // Cannot automate augmentations or installs without singularity
}
const hasTixApiAccess = await getNsDataThroughFile(ns, 'ns.stock.hasTIXAPIAccess()');
if(!hasTixApiAccess) {
return false; //We cant liquidate
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be a bit aggressive - for example if we don't have TIXAPIAccess, but the user also just doesn't have any stocks, then we should be able to ascend normally because there's no fear of leaving stocks unsold / money unspent.

I think there's a separate API method that checks if we even have access to the stock market, so this could instead be something like:

if( hasStockMarketAccess && !hasTixApiAccess )
        setStatus(ns, `You have access to the stock market, but not the stock API! We will not ascend automatically, just in case you have some stock to sell...`);
        return false;

Also, the indentation is off here

// If we previously attempted to reserve money for an augmentation purchase order, do a fresh facman run to ensure it's still available
if (reservedPurchase && installCountdown <= Date.now()) {
log(ns, "INFO: Manually running faction-manager.js to ensure previously reserved purchase is still obtainable.");
Expand Down