|
+[chargedEffect](./bitburner.activefragment.chargedeffect.md)
+
+
+ |
+
+
+ |
+
+number
+
+
+ |
+
+This is the raw value of the modifier used to calculate the effect on your multipliers. It may not be a multiplier.
+
+With fragments that increase a multiplier, this value is a multiplier. For example, with "+x% hacknet production" fragment, a value of 1.25 will multiply the "hacknet\_node\_money" multiplier by 1.25. The UI will show "+25% hacknet production".
+
+With fragments that decrease a multiplier, you need to invert this value. For example, with "-x% cheaper hacknet costs" fragment, a value of 1.25 means the "hacknet\_node\_purchase\_cost" (and other relevant cost multipliers) will be multiplied by 0.8 (1 / 1.25). The UI will show "20% cheaper hacknet costs".
+
+With booster fragments, this value is always 1. Booster fragments only boost non-booster fragments. They don't directly boost your multipliers.
+
+
+ |
+|
+
[highestCharge](./bitburner.activefragment.highestcharge.md)
diff --git a/src/Documentation/pages.ts b/src/Documentation/pages.ts
index 0c68af11d..8d1ce9335 100644
--- a/src/Documentation/pages.ts
+++ b/src/Documentation/pages.ts
@@ -68,6 +68,7 @@ import file65 from "./doc/en/programming/remote_api.md?raw";
import file66 from "./doc/en/programming/typescript_react.md?raw";
import nsDoc_bitburner__valueof_md from "../../markdown/bitburner._valueof.md?raw";
+import nsDoc_bitburner_activefragment_chargedeffect_md from "../../markdown/bitburner.activefragment.chargedeffect.md?raw";
import nsDoc_bitburner_activefragment_highestcharge_md from "../../markdown/bitburner.activefragment.highestcharge.md?raw";
import nsDoc_bitburner_activefragment_md from "../../markdown/bitburner.activefragment.md?raw";
import nsDoc_bitburner_activefragment_numcharge_md from "../../markdown/bitburner.activefragment.numcharge.md?raw";
@@ -1663,6 +1664,7 @@ AllPages["en/programming/remote_api.md"] = file65;
AllPages["en/programming/typescript_react.md"] = file66;
AllPages["nsDoc/bitburner._valueof.md"] = nsDoc_bitburner__valueof_md;
+AllPages["nsDoc/bitburner.activefragment.chargedeffect.md"] = nsDoc_bitburner_activefragment_chargedeffect_md;
AllPages["nsDoc/bitburner.activefragment.highestcharge.md"] = nsDoc_bitburner_activefragment_highestcharge_md;
AllPages["nsDoc/bitburner.activefragment.md"] = nsDoc_bitburner_activefragment_md;
AllPages["nsDoc/bitburner.activefragment.numcharge.md"] = nsDoc_bitburner_activefragment_numcharge_md;
diff --git a/src/NetscriptFunctions/Stanek.ts b/src/NetscriptFunctions/Stanek.ts
index f8a7d5180..e40e58cb2 100644
--- a/src/NetscriptFunctions/Stanek.ts
+++ b/src/NetscriptFunctions/Stanek.ts
@@ -64,7 +64,11 @@ export function NetscriptStanek(): InternalAPI {
checkStanekAPIAccess(ctx);
helpers.log(ctx, () => `Returned ${staneksGift.fragments.length} fragments`);
return staneksGift.fragments.map((activeFragment) => {
- return { ...activeFragment.copy(), ...activeFragment.fragment().copy() };
+ return {
+ ...activeFragment.copy(),
+ ...activeFragment.fragment().copy(),
+ chargedEffect: staneksGift.effect(activeFragment),
+ };
}) satisfies ReturnType;
},
clearGift: (ctx) => () => {
@@ -99,9 +103,11 @@ export function NetscriptStanek(): InternalAPI {
checkStanekAPIAccess(ctx);
const activeFragment = staneksGift.findFragment(rootX, rootY);
if (activeFragment !== undefined) {
- return { ...activeFragment.copy(), ...activeFragment.fragment().copy() } satisfies ReturnType<
- IStanek["getFragment"]
- >;
+ return {
+ ...activeFragment.copy(),
+ ...activeFragment.fragment().copy(),
+ chargedEffect: staneksGift.effect(activeFragment),
+ } satisfies ReturnType;
}
return undefined;
},
diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts
index c83433f3b..3101312d3 100644
--- a/src/ScriptEditor/NetscriptDefinitions.d.ts
+++ b/src/ScriptEditor/NetscriptDefinitions.d.ts
@@ -6586,6 +6586,21 @@ interface ActiveFragment extends Fragment {
rotation: number;
x: number;
y: number;
+ /**
+ * This is the raw value of the modifier used to calculate the effect on your multipliers. It may not be a multiplier.
+ *
+ * With fragments that increase a multiplier, this value is a multiplier. For example, with "+x% hacknet production"
+ * fragment, a value of 1.25 will multiply the "hacknet_node_money" multiplier by 1.25. The UI will show "+25% hacknet
+ * production".
+ *
+ * With fragments that decrease a multiplier, you need to invert this value. For example, with "-x% cheaper hacknet
+ * costs" fragment, a value of 1.25 means the "hacknet_node_purchase_cost" (and other relevant cost multipliers) will
+ * be multiplied by 0.8 (1 / 1.25). The UI will show "20% cheaper hacknet costs".
+ *
+ * With booster fragments, this value is always 1. Booster fragments only boost non-booster fragments. They don't
+ * directly boost your multipliers.
+ */
+ chargedEffect: number;
}
/**
|