Merge pull request #3787 from Undeemiss/bladeburner-multi-upgrade

BLADEBURNER: Added bulk upgrades to upgradeSkill NS API
This commit is contained in:
hydroflame
2022-07-15 23:40:55 -04:00
committed by GitHub
20 changed files with 81 additions and 47 deletions
+6 -4
View File
@@ -3080,28 +3080,30 @@ export interface Bladeburner {
* @remarks
* RAM cost: 4 GB
*
* This function returns the number of skill points needed to upgrade the specified skill.
* This function returns the number of skill points needed to upgrade the specified skill the specified number of times.
*
* The function returns -1 if an invalid skill name is passed in.
*
* @param skillName - Name of skill. Case-sensitive and must be an exact match
* @param count - Number of times to upgrade the skill. Defaults to 1 if not specified.
* @returns Number of skill points needed to upgrade the specified skill.
*/
getSkillUpgradeCost(name: string): number;
getSkillUpgradeCost(name: string, count?: number): number;
/**
* Upgrade skill.
* @remarks
* RAM cost: 4 GB
*
* Attempts to upgrade the specified Bladeburner skill.
* Attempts to upgrade the specified Bladeburner skill the specified number of times.
*
* Returns true if the skill is successfully upgraded, and false otherwise.
*
* @param skillName - Name of skill to be upgraded. Case-sensitive and must be an exact match
* @param count - Number of times to upgrade the skill. Defaults to 1 if not specified.
* @returns true if the skill is successfully upgraded, and false otherwise.
*/
upgradeSkill(name: string): boolean;
upgradeSkill(name: string, count?: number): boolean;
/**
* Get team size.
+1 -1
View File
@@ -693,7 +693,7 @@ export function Root(props: IProps): React.ReactElement {
if (server === null) throw new Error(`Server '${closingScript.hostname}' should not be null, but it is.`);
const serverScriptIndex = server.scripts.findIndex((script) => script.filename === closingScript.fileName);
if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex ].code) {
if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex].code) {
PromptEvent.emit({
txt: `Do you want to save changes to ${closingScript.fileName} on ${closingScript.hostname}?`,
resolve: (result: boolean | string) => {