mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 08:42:53 +02:00
CODEBASE: Refactor Stanek's Gift UI code and change internal FragmentType enum (#2346)
This commit is contained in:
@@ -3,7 +3,7 @@ import { AugmentationName, FactionName } from "@enums";
|
||||
|
||||
import { canAcceptStaneksGift, staneksGift } from "../CotMG/Helper";
|
||||
import { Fragments, FragmentById } from "../CotMG/Fragment";
|
||||
import { FragmentType } from "../CotMG/FragmentType";
|
||||
import { FragmentTypeEnum } from "../CotMG/FragmentType";
|
||||
|
||||
import { Stanek as IStanek } from "@nsdefs";
|
||||
import { NetscriptContext, InternalAPI } from "../Netscript/APIWrapper";
|
||||
@@ -37,7 +37,7 @@ export function NetscriptStanek(): InternalAPI<IStanek> {
|
||||
const fragment = staneksGift.findFragment(rootX, rootY);
|
||||
//Check whether the selected fragment can ge charged
|
||||
if (!fragment) throw helpers.errorMessage(ctx, `No fragment with root (${rootX}, ${rootY}).`);
|
||||
if (fragment.fragment().type == FragmentType.Booster) {
|
||||
if (fragment.fragment().type == FragmentTypeEnum.Booster) {
|
||||
throw helpers.errorMessage(
|
||||
ctx,
|
||||
`The fragment with root (${rootX}, ${rootY}) is a Booster Fragment and thus cannot be charged.`,
|
||||
|
||||
Reference in New Issue
Block a user