Speed up node limit increase
This commit is contained in:
		@@ -74,7 +74,7 @@ export async function main(ns) {
 | 
				
			|||||||
				// Apply the cheapest upgrade
 | 
									// Apply the cheapest upgrade
 | 
				
			||||||
				if(upgrades.length) {
 | 
									if(upgrades.length) {
 | 
				
			||||||
					if(args['autoLimit'] && nodeCount >= args['limit'] && upgrades[0].bestUpgrade.cost == Infinity) {
 | 
										if(args['autoLimit'] && nodeCount >= args['limit'] && upgrades[0].bestUpgrade.cost == Infinity) {
 | 
				
			||||||
						args['limit'] += 1;
 | 
											args['limit'] = Math.max(nodeCount, args['limit']) + 1;
 | 
				
			||||||
						logger.log(`Increasing node limit to ${args['limit']}`);
 | 
											logger.log(`Increasing node limit to ${args['limit']}`);
 | 
				
			||||||
					} else if(balance - upgrades[0].bestUpgrade.cost >= args['balance']) {
 | 
										} else if(balance - upgrades[0].bestUpgrade.cost >= args['balance']) {
 | 
				
			||||||
						const cost = Math.round(upgrades[0].bestUpgrade.cost * 100) / 100;
 | 
											const cost = Math.round(upgrades[0].bestUpgrade.cost * 100) / 100;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user