From 4137a0e5223ee58c3405de5178bccf6f867b67f9 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:57:19 +0700 Subject: [PATCH] DOCUMENTATION: Clarify isBusy and stopAction Singularity APIs (#1822) --- markdown/bitburner.singularity.isbusy.md | 22 +++++++- markdown/bitburner.singularity.stopaction.md | 18 +++++-- src/ScriptEditor/NetscriptDefinitions.d.ts | 53 ++++++++++++++------ 3 files changed, 72 insertions(+), 21 deletions(-) diff --git a/markdown/bitburner.singularity.isbusy.md b/markdown/bitburner.singularity.isbusy.md index 31ff3c46d7..e489f79bf0 100644 --- a/markdown/bitburner.singularity.isbusy.md +++ b/markdown/bitburner.singularity.isbusy.md @@ -15,11 +15,29 @@ isBusy(): boolean; boolean -True if the player is currently performing an ‘action’, false otherwise. +True if the player is currently performing an action, false otherwise. ## Remarks RAM cost: 0.5 GB \* 16/4/1 -Returns a boolean indicating whether or not the player is currently performing an ‘action’. These actions include working for a company/faction, studying at a university, working out at a gym, creating a program, committing a crime, etc. +Returns a boolean indicating if the player is currently performing an action. These actions include: + +- Studying at a university + +- Working out at a gym + +- Working for a company/faction + +- Creating a program + +- Committing a crime + +- Grafting an augmentation + +Note: + +- This function returns true when the UI is showing the infiltration UI or the BitVerse. + +- This function does not take Bladeburner actions into account. You can use [getCurrentAction](./bitburner.bladeburner.getcurrentaction.md) to check if you are performing a Bladeburner action. diff --git a/markdown/bitburner.singularity.stopaction.md b/markdown/bitburner.singularity.stopaction.md index 35ea8c1e1a..0667fb5e6a 100644 --- a/markdown/bitburner.singularity.stopaction.md +++ b/markdown/bitburner.singularity.stopaction.md @@ -15,17 +15,27 @@ stopAction(): boolean; boolean -True if the player’s action was ended, false if the player was not performing an action. +True if the player’s action is stopped, false if the player is not performing an action. ## Remarks RAM cost: 1 GB \* 16/4/1 -This function is used to end whatever ‘action’ the player is currently performing. The player will receive whatever money/experience/etc. he has earned from that action. +This function stops the action the player is currently performing. The player will receive rewards (money, experience, etc.) they have earned from that action. The actions that can be stopped with this function are: -\* Studying at a university \* Working out at a gym \* Working for a company/faction \* Creating a program \* Committing a crime +- Studying at a university -This function will return true if the player’s action was ended. It will return false if the player was not performing an action when this function was called. +- Working out at a gym + +- Working for a company/faction + +- Creating a program + +- Committing a crime + +- Grafting an augmentation + +This function will return true if the player's action is stopped. It will return false if the player is not performing an action when this function is called. diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 5d65280152..4e38919a92 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -1924,39 +1924,62 @@ export interface Singularity { /** * Check if the player is busy. + * * @remarks * RAM cost: 0.5 GB * 16/4/1 * + * Returns a boolean indicating if the player is currently performing an action. These actions include: + * + * - Studying at a university + * + * - Working out at a gym + * + * - Working for a company/faction + * + * - Creating a program + * + * - Committing a crime + * + * - Grafting an augmentation + * + * Note: * - * Returns a boolean indicating whether or not the player is currently performing an - * ‘action’. These actions include working for a company/faction, studying at a university, - * working out at a gym, creating a program, committing a crime, etc. + * - This function returns true when the UI is showing the infiltration UI or the BitVerse. * - * @returns True if the player is currently performing an ‘action’, false otherwise. + * - This function does not take Bladeburner actions into account. You can use {@link Bladeburner.getCurrentAction | getCurrentAction} + * to check if you are performing a Bladeburner action. + * + * @returns True if the player is currently performing an action, false otherwise. */ isBusy(): boolean; /** * Stop the current action. + * * @remarks * RAM cost: 1 GB * 16/4/1 * - * - * This function is used to end whatever ‘action’ the player is currently performing. - * The player will receive whatever money/experience/etc. he has earned from that action. + * This function stops the action the player is currently performing. The player will receive rewards (money, + * experience, etc.) they have earned from that action. * * The actions that can be stopped with this function are: * - * * Studying at a university - * * Working out at a gym - * * Working for a company/faction - * * Creating a program - * * Committing a crime + * - Studying at a university + * + * - Working out at a gym + * + * - Working for a company/faction + * + * - Creating a program + * + * - Committing a crime + * + * - Grafting an augmentation * - * This function will return true if the player’s action was ended. - * It will return false if the player was not performing an action when this function was called. + * This function will return true if the player's action is stopped. It will return false if the player is not + * performing an action when this function is called. * - * @returns True if the player’s action was ended, false if the player was not performing an action. + * @returns True if the player’s action is stopped, false if the player is not performing an action. */ stopAction(): boolean;