From 46c7cef25f8b9cb6ed760c283bd652bdb02a5025 Mon Sep 17 00:00:00 2001 From: phyzical <5182053+phyzical@users.noreply.github.com> Date: Mon, 1 Aug 2022 16:43:38 +0800 Subject: [PATCH 1/3] remove redundant mds hotfix/test-fixes File List: markdown/bitburner.singularity.getcharacterinformation.md markdown/bitburner.singularity.getstats.md markdown/bitburner.tix.short.md --- ...ner.singularity.getcharacterinformation.md | 28 -------------- markdown/bitburner.singularity.getstats.md | 36 ------------------ markdown/bitburner.tix.short.md | 37 ------------------- 3 files changed, 101 deletions(-) delete mode 100644 markdown/bitburner.singularity.getcharacterinformation.md delete mode 100644 markdown/bitburner.singularity.getstats.md delete mode 100644 markdown/bitburner.tix.short.md diff --git a/markdown/bitburner.singularity.getcharacterinformation.md b/markdown/bitburner.singularity.getcharacterinformation.md deleted file mode 100644 index 4444cd2d0..000000000 --- a/markdown/bitburner.singularity.getcharacterinformation.md +++ /dev/null @@ -1,28 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [getCharacterInformation](./bitburner.singularity.getcharacterinformation.md) - -## Singularity.getCharacterInformation() method - -> Warning: This API is now obsolete. -> -> use getPlayer -> - -Returns an object with various information about your character. - -Signature: - -```typescript -getCharacterInformation(): CharacterInfo; -``` -Returns: - -[CharacterInfo](./bitburner.characterinfo.md) - -Object with various information about your character. - -## Remarks - -RAM cost: 0.5 GB \* 16/4/1 - diff --git a/markdown/bitburner.singularity.getstats.md b/markdown/bitburner.singularity.getstats.md deleted file mode 100644 index 2dfa56982..000000000 --- a/markdown/bitburner.singularity.getstats.md +++ /dev/null @@ -1,36 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [getStats](./bitburner.singularity.getstats.md) - -## Singularity.getStats() method - -> Warning: This API is now obsolete. -> -> use getPlayer -> - -Returns an object with the Player’s stats. - -Signature: - -```typescript -getStats(): PlayerSkills; -``` -Returns: - -[PlayerSkills](./bitburner.playerskills.md) - -Object with the Player’s stats. - -## Remarks - -RAM cost: 0.5 GB \* 16/4/1 - -## Example - - -```ts -res = getStats(); -print('My charisma level is: ' + res.charisma); -``` - diff --git a/markdown/bitburner.tix.short.md b/markdown/bitburner.tix.short.md deleted file mode 100644 index f4fb0a1af..000000000 --- a/markdown/bitburner.tix.short.md +++ /dev/null @@ -1,37 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [TIX](./bitburner.tix.md) > [short](./bitburner.tix.short.md) - -## TIX.short() method - -Short stocks. - -Signature: - -```typescript -short(sym: string, shares: number): number; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| sym | string | Stock symbol. | -| shares | number | Number of shares to short. Must be positive. Will be rounded to nearest integer. | - -Returns: - -number - -The stock price at which each share was purchased, otherwise 0 if the shares weren't purchased. - -## Remarks - -RAM cost: 2.5 GB Attempts to purchase a short position of a stock using a Market Order. - -The ability to short a stock is \*\*not\*\* immediately available to the player and must be unlocked later on in the game. - -If the player does not have enough money to purchase the specified number of shares, then no shares will be purchased. Remember that every transaction on the stock exchange costs a certain commission fee. - -If the purchase is successful, this function will return the stock price at which each share was purchased. Otherwise, it will return 0. - From 2be7029b5063a606b3bf50b786d33e35dcde77f2 Mon Sep 17 00:00:00 2001 From: phyzical <5182053+phyzical@users.noreply.github.com> Date: Mon, 1 Aug 2022 16:44:19 +0800 Subject: [PATCH 2/3] update mds, add missing deprecation notice hotfix/test-fixes File List: dist/bitburner.d.ts markdown/bitburner.singularity.md --- dist/bitburner.d.ts | 1 + markdown/bitburner.singularity.md | 108 +++++++++++++++--------------- 2 files changed, 54 insertions(+), 55 deletions(-) diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index bb5ed7885..06b71388a 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -6800,6 +6800,7 @@ export declare interface TIX { /** * Short stocks. * @remarks + * @deprecated use sellShort * RAM cost: 2.5 GB * Attempts to purchase a short position of a stock using a Market Order. * diff --git a/markdown/bitburner.singularity.md b/markdown/bitburner.singularity.md index 9b88a27e5..a1f73252a 100644 --- a/markdown/bitburner.singularity.md +++ b/markdown/bitburner.singularity.md @@ -9,7 +9,7 @@ Singularity API Signature: ```typescript -export interface Singularity +export interface Singularity ``` ## Remarks @@ -18,58 +18,56 @@ This API requires Source-File 4 to use. The RAM cost of all these functions is m ## Methods -| Method | Description | -| --- | --- | -| [applyToCompany(companyName, field)](./bitburner.singularity.applytocompany.md) | Apply for a job at a company. | -| [b1tflum3(nextBN, callbackScript)](./bitburner.singularity.b1tflum3.md) | b1t\_flum3 into a different BN. | -| [checkFactionInvitations()](./bitburner.singularity.checkfactioninvitations.md) | List all current faction invitations. | -| [commitCrime(crime)](./bitburner.singularity.commitcrime.md) | Commit a crime. | -| [connect(hostname)](./bitburner.singularity.connect.md) | Connect to a server. | -| [createProgram(program, focus)](./bitburner.singularity.createprogram.md) | Create a program. | -| [destroyW0r1dD43m0n(nextBN, callbackScript)](./bitburner.singularity.destroyw0r1dd43m0n.md) | Destroy the w0r1d\_d43m0n and move on to the next BN. | -| [donateToFaction(faction, amount)](./bitburner.singularity.donatetofaction.md) | Donate to a faction. | -| [getAugmentationCost(augName)](./bitburner.singularity.getaugmentationcost.md) | Get the price and reputation of an augmentation. | -| [getAugmentationPrereq(augName)](./bitburner.singularity.getaugmentationprereq.md) | Get the pre-requisite of an augmentation. | -| [getAugmentationPrice(augName)](./bitburner.singularity.getaugmentationprice.md) | Get price of an augmentation. | -| [getAugmentationRepReq(augName)](./bitburner.singularity.getaugmentationrepreq.md) | Get reputation requirement of an augmentation. | -| [getAugmentationsFromFaction(faction)](./bitburner.singularity.getaugmentationsfromfaction.md) | Get a list of augmentation available from a faction. | -| [getAugmentationStats(name)](./bitburner.singularity.getaugmentationstats.md) | Get the stats of an augmentation. | -| [getCharacterInformation()](./bitburner.singularity.getcharacterinformation.md) | Returns an object with various information about your character. | -| [getCompanyFavor(companyName)](./bitburner.singularity.getcompanyfavor.md) | Get company favor. | -| [getCompanyFavorGain(companyName)](./bitburner.singularity.getcompanyfavorgain.md) | Get company favor gain. | -| [getCompanyRep(companyName)](./bitburner.singularity.getcompanyrep.md) | Get company reputation. | -| [getCrimeChance(crime)](./bitburner.singularity.getcrimechance.md) | Get chance to successfully commit a crime. | -| [getCrimeStats(crime)](./bitburner.singularity.getcrimestats.md) | Get stats related to a crime. | -| [getCurrentServer()](./bitburner.singularity.getcurrentserver.md) | Get the current server. | -| [getDarkwebProgramCost(programName)](./bitburner.singularity.getdarkwebprogramcost.md) | Check the price of an exploit on the dark web | -| [getDarkwebPrograms()](./bitburner.singularity.getdarkwebprograms.md) | Get a list of programs offered on the dark web. | -| [getFactionFavor(faction)](./bitburner.singularity.getfactionfavor.md) | Get faction favor. | -| [getFactionFavorGain(faction)](./bitburner.singularity.getfactionfavorgain.md) | Get faction favor gain. | -| [getFactionRep(faction)](./bitburner.singularity.getfactionrep.md) | Get faction reputation. | -| [getOwnedAugmentations(purchased)](./bitburner.singularity.getownedaugmentations.md) | Get a list of owned augmentation. | -| [getStats()](./bitburner.singularity.getstats.md) | Returns an object with the Player’s stats. | -| [getUpgradeHomeCoresCost()](./bitburner.singularity.getupgradehomecorescost.md) | Get the price of upgrading home cores. | -| [getUpgradeHomeRamCost()](./bitburner.singularity.getupgradehomeramcost.md) | Get the price of upgrading home RAM. | -| [goToLocation(locationName)](./bitburner.singularity.gotolocation.md) | Go to a location. | -| [gymWorkout(gymName, stat, focus)](./bitburner.singularity.gymworkout.md) | Workout at the gym. | -| [hospitalize()](./bitburner.singularity.hospitalize.md) | Hospitalize the player. | -| [installAugmentations(cbScript)](./bitburner.singularity.installaugmentations.md) | Install your purchased augmentations. | -| [installBackdoor()](./bitburner.singularity.installbackdoor.md) | Run the backdoor command in the terminal. | -| [isBusy()](./bitburner.singularity.isbusy.md) | Check if the player is busy. | -| [isFocused()](./bitburner.singularity.isfocused.md) | Check if the player is focused. | -| [joinFaction(faction)](./bitburner.singularity.joinfaction.md) | Join a faction. | -| [manualHack()](./bitburner.singularity.manualhack.md) | Run the hack command in the terminal. | -| [purchaseAugmentation(faction, augmentation)](./bitburner.singularity.purchaseaugmentation.md) | Purchase an augmentation | -| [purchaseProgram(programName)](./bitburner.singularity.purchaseprogram.md) | Purchase a program from the dark web. | -| [purchaseTor()](./bitburner.singularity.purchasetor.md) | Purchase the TOR router. | -| [quitJob(companyName)](./bitburner.singularity.quitjob.md) | Quit jobs by company. | -| [setFocus(focus)](./bitburner.singularity.setfocus.md) | Set the players focus. | -| [softReset(cbScript)](./bitburner.singularity.softreset.md) | Soft reset the game. | -| [stopAction()](./bitburner.singularity.stopaction.md) | Stop the current action. | -| [travelToCity(city)](./bitburner.singularity.traveltocity.md) | Travel to another city. | -| [universityCourse(universityName, courseName, focus)](./bitburner.singularity.universitycourse.md) | Take university class. | -| [upgradeHomeCores()](./bitburner.singularity.upgradehomecores.md) | Upgrade home computer cores. | -| [upgradeHomeRam()](./bitburner.singularity.upgradehomeram.md) | Upgrade home computer RAM. | -| [workForCompany(companyName, focus)](./bitburner.singularity.workforcompany.md) | Work for a company. | -| [workForFaction(faction, workType, focus)](./bitburner.singularity.workforfaction.md) | Work for a faction. | +| Method | Description | +| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | +| [applyToCompany(companyName, field)](./bitburner.singularity.applytocompany.md) | Apply for a job at a company. | +| [b1tflum3(nextBN, callbackScript)](./bitburner.singularity.b1tflum3.md) | b1t\_flum3 into a different BN. | +| [checkFactionInvitations()](./bitburner.singularity.checkfactioninvitations.md) | List all current faction invitations. | +| [commitCrime(crime)](./bitburner.singularity.commitcrime.md) | Commit a crime. | +| [connect(hostname)](./bitburner.singularity.connect.md) | Connect to a server. | +| [createProgram(program, focus)](./bitburner.singularity.createprogram.md) | Create a program. | +| [destroyW0r1dD43m0n(nextBN, callbackScript)](./bitburner.singularity.destroyw0r1dd43m0n.md) | Destroy the w0r1d\_d43m0n and move on to the next BN. | +| [donateToFaction(faction, amount)](./bitburner.singularity.donatetofaction.md) | Donate to a faction. | +| [getAugmentationCost(augName)](./bitburner.singularity.getaugmentationcost.md) | Get the price and reputation of an augmentation. | +| [getAugmentationPrereq(augName)](./bitburner.singularity.getaugmentationprereq.md) | Get the pre-requisite of an augmentation. | +| [getAugmentationPrice(augName)](./bitburner.singularity.getaugmentationprice.md) | Get price of an augmentation. | +| [getAugmentationRepReq(augName)](./bitburner.singularity.getaugmentationrepreq.md) | Get reputation requirement of an augmentation. | +| [getAugmentationsFromFaction(faction)](./bitburner.singularity.getaugmentationsfromfaction.md) | Get a list of augmentation available from a faction. | +| [getAugmentationStats(name)](./bitburner.singularity.getaugmentationstats.md) | Get the stats of an augmentation. | +| [getCompanyFavor(companyName)](./bitburner.singularity.getcompanyfavor.md) | Get company favor. | +| [getCompanyFavorGain(companyName)](./bitburner.singularity.getcompanyfavorgain.md) | Get company favor gain. | +| [getCompanyRep(companyName)](./bitburner.singularity.getcompanyrep.md) | Get company reputation. | +| [getCrimeChance(crime)](./bitburner.singularity.getcrimechance.md) | Get chance to successfully commit a crime. | +| [getCrimeStats(crime)](./bitburner.singularity.getcrimestats.md) | Get stats related to a crime. | +| [getCurrentServer()](./bitburner.singularity.getcurrentserver.md) | Get the current server. | +| [getDarkwebProgramCost(programName)](./bitburner.singularity.getdarkwebprogramcost.md) | Check the price of an exploit on the dark web | +| [getDarkwebPrograms()](./bitburner.singularity.getdarkwebprograms.md) | Get a list of programs offered on the dark web. | +| [getFactionFavor(faction)](./bitburner.singularity.getfactionfavor.md) | Get faction favor. | +| [getFactionFavorGain(faction)](./bitburner.singularity.getfactionfavorgain.md) | Get faction favor gain. | +| [getFactionRep(faction)](./bitburner.singularity.getfactionrep.md) | Get faction reputation. | +| [getOwnedAugmentations(purchased)](./bitburner.singularity.getownedaugmentations.md) | Get a list of owned augmentation. | +| [getUpgradeHomeCoresCost()](./bitburner.singularity.getupgradehomecorescost.md) | Get the price of upgrading home cores. | +| [getUpgradeHomeRamCost()](./bitburner.singularity.getupgradehomeramcost.md) | Get the price of upgrading home RAM. | +| [goToLocation(locationName)](./bitburner.singularity.gotolocation.md) | Go to a location. | +| [gymWorkout(gymName, stat, focus)](./bitburner.singularity.gymworkout.md) | Workout at the gym. | +| [hospitalize()](./bitburner.singularity.hospitalize.md) | Hospitalize the player. | +| [installAugmentations(cbScript)](./bitburner.singularity.installaugmentations.md) | Install your purchased augmentations. | +| [installBackdoor()](./bitburner.singularity.installbackdoor.md) | Run the backdoor command in the terminal. | +| [isBusy()](./bitburner.singularity.isbusy.md) | Check if the player is busy. | +| [isFocused()](./bitburner.singularity.isfocused.md) | Check if the player is focused. | +| [joinFaction(faction)](./bitburner.singularity.joinfaction.md) | Join a faction. | +| [manualHack()](./bitburner.singularity.manualhack.md) | Run the hack command in the terminal. | +| [purchaseAugmentation(faction, augmentation)](./bitburner.singularity.purchaseaugmentation.md) | Purchase an augmentation | +| [purchaseProgram(programName)](./bitburner.singularity.purchaseprogram.md) | Purchase a program from the dark web. | +| [purchaseTor()](./bitburner.singularity.purchasetor.md) | Purchase the TOR router. | +| [quitJob(companyName)](./bitburner.singularity.quitjob.md) | Quit jobs by company. | +| [setFocus(focus)](./bitburner.singularity.setfocus.md) | Set the players focus. | +| [softReset(cbScript)](./bitburner.singularity.softreset.md) | Soft reset the game. | +| [stopAction()](./bitburner.singularity.stopaction.md) | Stop the current action. | +| [travelToCity(city)](./bitburner.singularity.traveltocity.md) | Travel to another city. | +| [universityCourse(universityName, courseName, focus)](./bitburner.singularity.universitycourse.md) | Take university class. | +| [upgradeHomeCores()](./bitburner.singularity.upgradehomecores.md) | Upgrade home computer cores. | +| [upgradeHomeRam()](./bitburner.singularity.upgradehomeram.md) | Upgrade home computer RAM. | +| [workForCompany(companyName, focus)](./bitburner.singularity.workforcompany.md) | Work for a company. | +| [workForFaction(faction, workType, focus)](./bitburner.singularity.workforfaction.md) | Work for a faction. | From 9b6b9a795b24d186c2c524b6879293a481474458 Mon Sep 17 00:00:00 2001 From: phyzical <5182053+phyzical@users.noreply.github.com> Date: Mon, 1 Aug 2022 16:44:49 +0800 Subject: [PATCH 3/3] remove redundant tests hotfix/test-fixes File List: test/jest/Netscript/DynamicRamCalculation.test.js test/jest/Netscript/StaticRamCalculation.test.js --- test/jest/Netscript/DynamicRamCalculation.test.js | 15 --------------- test/jest/Netscript/StaticRamCalculation.test.js | 15 --------------- 2 files changed, 30 deletions(-) diff --git a/test/jest/Netscript/DynamicRamCalculation.test.js b/test/jest/Netscript/DynamicRamCalculation.test.js index b34a99f87..48fcd2222 100644 --- a/test/jest/Netscript/DynamicRamCalculation.test.js +++ b/test/jest/Netscript/DynamicRamCalculation.test.js @@ -633,11 +633,6 @@ describe("Netscript Dynamic RAM Calculation/Generation Tests", function () { await testNonzeroDynamicRamCost(f); }); - it("stock.short()", async function () { - const f = ["stock", "short"]; - await testNonzeroDynamicRamCost(f); - }); - it("stock.sellShort()", async function () { const f = ["stock", "sellShort"]; await testNonzeroDynamicRamCost(f); @@ -705,11 +700,6 @@ describe("Netscript Dynamic RAM Calculation/Generation Tests", function () { await testNonzeroDynamicRamCost(f); }); - it("getStats()", async function () { - const f = ["singularity", "getStats"]; - await testNonzeroDynamicRamCost(f); - }); - it("getDarkwebProgramCost()", async function () { const f = ["singularity", "getDarkwebProgramCost"]; await testNonzeroDynamicRamCost(f); @@ -720,11 +710,6 @@ describe("Netscript Dynamic RAM Calculation/Generation Tests", function () { await testNonzeroDynamicRamCost(f); }); - it("getCharacterInformation()", async function () { - const f = ["singularity", "getCharacterInformation"]; - await testNonzeroDynamicRamCost(f); - }); - it("isBusy()", async function () { const f = ["singularity", "isBusy"]; await testNonzeroDynamicRamCost(f); diff --git a/test/jest/Netscript/StaticRamCalculation.test.js b/test/jest/Netscript/StaticRamCalculation.test.js index 2288cd2b1..9f40791e1 100644 --- a/test/jest/Netscript/StaticRamCalculation.test.js +++ b/test/jest/Netscript/StaticRamCalculation.test.js @@ -601,11 +601,6 @@ describe("Netscript Static RAM Calculation/Generation Tests", function () { await expectNonZeroRamCost(f); }); - it("stock.short()", async function () { - const f = ["stock", "short"]; - await expectNonZeroRamCost(f); - }); - it("stock.sellShort()", async function () { const f = ["stock", "sellShort"]; await expectNonZeroRamCost(f); @@ -673,16 +668,6 @@ describe("Netscript Static RAM Calculation/Generation Tests", function () { await expectNonZeroRamCost(f); }); - it("getStats()", async function () { - const f = ["getStats"]; - await expectNonZeroRamCost(f); - }); - - it("getCharacterInformation()", async function () { - const f = ["getCharacterInformation"]; - await expectNonZeroRamCost(f); - }); - it("isBusy()", async function () { const f = ["isBusy"]; await expectNonZeroRamCost(f);