MISC: Disable effect of SF7.3 and SF10 if player disables them with advanced options (#2019)

* MISC: Disable effect of SF7.3 and SF10 if player disables them with advanced options

* Update based on feedback
This commit is contained in:
catloversg
2025-03-18 06:04:36 +07:00
committed by GitHub
parent 19f859ae87
commit e8f9882e2d
5 changed files with 16 additions and 3 deletions
+5 -1
View File
@@ -17,7 +17,11 @@ import { SleeveWorkType } from "../PersonObjects/Sleeve/Work/Work";
import { canAccessBitNodeFeature } from "../BitNode/BitNodeUtils";
export const checkSleeveAPIAccess = function (ctx: NetscriptContext) {
if (Player.bitNodeN !== 10 && !Player.sourceFileLvl(10)) {
/**
* Don't change sourceFileLvl to activeSourceFileLvl. The ability to control Sleeves (via both UI and APIs) is a
* permanent benefit.
*/
if (Player.bitNodeN !== 10 && Player.sourceFileLvl(10) <= 0) {
throw helpers.errorMessage(
ctx,
"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10",