From 0335d8bc70b81f6a93cdf726ed0266fb7a1820b7 Mon Sep 17 00:00:00 2001 From: Adam Weeden Date: Mon, 13 Oct 2025 11:57:19 -0400 Subject: [PATCH] STANEK: Add FragmentType to NS Enums (#2341) --- markdown/bitburner.fragment.md | 2 +- markdown/bitburner.fragment.type.md | 2 +- markdown/bitburner.nsenums.md | 3 ++- src/NetscriptFunctions.ts | 2 ++ src/ScriptEditor/NetscriptDefinitions.d.ts | 3 ++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/markdown/bitburner.fragment.md b/markdown/bitburner.fragment.md index 127780896..67e19f399 100644 --- a/markdown/bitburner.fragment.md +++ b/markdown/bitburner.fragment.md @@ -129,7 +129,7 @@ boolean\[\]\[\] -number +[FragmentType](./bitburner.fragmenttype.md) diff --git a/markdown/bitburner.fragment.type.md b/markdown/bitburner.fragment.type.md index a2c392fe1..626a54ce6 100644 --- a/markdown/bitburner.fragment.type.md +++ b/markdown/bitburner.fragment.type.md @@ -7,5 +7,5 @@ **Signature:** ```typescript -type: number; +type: FragmentType; ``` diff --git a/markdown/bitburner.nsenums.md b/markdown/bitburner.nsenums.md index e8a8161af..460e94e58 100644 --- a/markdown/bitburner.nsenums.md +++ b/markdown/bitburner.nsenums.md @@ -25,7 +25,8 @@ type NSEnums = { OrderType: OrderEnumType; BladeburnerActionType: BladeburnerActionEnumType; SpecialBladeburnerActionTypeForSleeve: SpecialBladeburnerActionEnumTypeForSleeve; + FragmentType: FragmentEnumType; }; ``` -**References:** [CityNameEnumType](./bitburner.citynameenumtype.md), [CrimeEnumType](./bitburner.crimeenumtype.md), [FactionWorkEnumType](./bitburner.factionworkenumtype.md), [GymEnumType](./bitburner.gymenumtype.md), [JobNameEnumType](./bitburner.jobnameenumtype.md), [JobFieldEnumType](./bitburner.jobfieldenumtype.md), [LocationNameEnumType](./bitburner.locationnameenumtype.md), [ToastVariantEnumType](./bitburner.toastvariantenumtype.md), [UniversityClassEnumType](./bitburner.universityclassenumtype.md), [CompanyNameEnumType](./bitburner.companynameenumtype.md), [FactionNameEnumType](./bitburner.factionnameenumtype.md), [CodingContractNameEnumType](./bitburner.codingcontractnameenumtype.md), [PositionEnumType](./bitburner.positionenumtype.md), [OrderEnumType](./bitburner.orderenumtype.md), [BladeburnerActionEnumType](./bitburner.bladeburneractionenumtype.md), [SpecialBladeburnerActionEnumTypeForSleeve](./bitburner.specialbladeburneractionenumtypeforsleeve.md) +**References:** [CityNameEnumType](./bitburner.citynameenumtype.md), [CrimeEnumType](./bitburner.crimeenumtype.md), [FactionWorkEnumType](./bitburner.factionworkenumtype.md), [GymEnumType](./bitburner.gymenumtype.md), [JobNameEnumType](./bitburner.jobnameenumtype.md), [JobFieldEnumType](./bitburner.jobfieldenumtype.md), [LocationNameEnumType](./bitburner.locationnameenumtype.md), [ToastVariantEnumType](./bitburner.toastvariantenumtype.md), [UniversityClassEnumType](./bitburner.universityclassenumtype.md), [CompanyNameEnumType](./bitburner.companynameenumtype.md), [FactionNameEnumType](./bitburner.factionnameenumtype.md), [CodingContractNameEnumType](./bitburner.codingcontractnameenumtype.md), [PositionEnumType](./bitburner.positionenumtype.md), [OrderEnumType](./bitburner.orderenumtype.md), [BladeburnerActionEnumType](./bitburner.bladeburneractionenumtype.md), [SpecialBladeburnerActionEnumTypeForSleeve](./bitburner.specialbladeburneractionenumtypeforsleeve.md), [FragmentEnumType](./bitburner.fragmentenumtype.md) diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 453129c33..1c110cf3b 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -117,6 +117,7 @@ import { isIPAddress } from "./Types/strings"; import { compile } from "./NetscriptJSEvaluator"; import { Script } from "./Script/Script"; import { NetscriptFormat } from "./NetscriptFunctions/Format"; +import { FragmentTypeEnum } from "./CotMG/FragmentType"; export const enums: NSEnums = { CityName, @@ -135,6 +136,7 @@ export const enums: NSEnums = { OrderType, BladeburnerActionType, SpecialBladeburnerActionTypeForSleeve, + FragmentType: FragmentTypeEnum, }; for (const val of Object.values(enums)) Object.freeze(val); Object.freeze(enums); diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 32ba6df49..c5b33b2af 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -5798,7 +5798,7 @@ type FragmentType = _ValueOf; interface Fragment { id: number; shape: boolean[][]; - type: number; + type: FragmentType; power: number; limit: number; effect: string; @@ -8868,6 +8868,7 @@ type NSEnums = { OrderType: OrderEnumType; BladeburnerActionType: BladeburnerActionEnumType; SpecialBladeburnerActionTypeForSleeve: SpecialBladeburnerActionEnumTypeForSleeve; + FragmentType: FragmentEnumType; }; /**