mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
CODEBASE: Remove barrel imports in Bladeburner code (#2580)
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
// Barrel file for easier importing
|
||||
export { ActionClass } from "./Action";
|
||||
export { BlackOperation } from "./BlackOperation";
|
||||
export { Contract } from "./Contract";
|
||||
export { GeneralAction } from "./GeneralAction";
|
||||
export { Operation } from "./Operation";
|
||||
export { LevelableActionClass } from "./LevelableAction";
|
||||
@@ -1,5 +1,8 @@
|
||||
import type { PromisePair } from "../Types/Promises";
|
||||
import type { BlackOperation, Contract, GeneralAction, Operation } from "./Actions";
|
||||
import type { BlackOperation } from "./Actions/BlackOperation";
|
||||
import type { Contract } from "./Actions/Contract";
|
||||
import type { GeneralAction } from "./Actions/GeneralAction";
|
||||
import type { Operation } from "./Actions/Operation";
|
||||
import type { Action, ActionIdFor, ActionIdentifier, Attempt } from "./Types";
|
||||
import type { Person } from "../PersonObjects/Person";
|
||||
import type { Skills as PersonSkills } from "../PersonObjects/Skills";
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import type { BlackOperation, Contract, GeneralAction, Operation } from "./Actions";
|
||||
import type { BlackOperation } from "./Actions/BlackOperation";
|
||||
import type { Contract } from "./Actions/Contract";
|
||||
import type { GeneralAction } from "./Actions/GeneralAction";
|
||||
import type { Operation } from "./Actions/Operation";
|
||||
|
||||
export interface SuccessChanceParams {
|
||||
/** Whether the success chance should be based on estimated statistics */
|
||||
|
||||
@@ -10,7 +10,8 @@ import { StopButton } from "./StopButton";
|
||||
import { TeamSizeButton } from "./TeamSizeButton";
|
||||
|
||||
import { formatNumberNoSuffix } from "../../ui/formatNumber";
|
||||
import { BlackOperation, Operation } from "../Actions";
|
||||
import { BlackOperation } from "../Actions/BlackOperation";
|
||||
import { Operation } from "../Actions/Operation";
|
||||
import { BladeburnerConstants } from "../data/Constants";
|
||||
import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions";
|
||||
import WarningIcon from "@mui/icons-material/Warning";
|
||||
|
||||
@@ -7,7 +7,7 @@ import ArrowDropUpIcon from "@mui/icons-material/ArrowDropUp";
|
||||
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
|
||||
|
||||
import { BladeburnerConstants } from "../data/Constants";
|
||||
import { Contract } from "../Actions";
|
||||
import { Contract } from "../Actions/Contract";
|
||||
|
||||
interface ActionLevelProps {
|
||||
action: LevelableAction;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
import type { BlackOperation, Operation } from "../Actions";
|
||||
import type { BlackOperation } from "../Actions/BlackOperation";
|
||||
import type { Operation } from "../Actions/Operation";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { TeamSizeModal } from "./TeamSizeModal";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
import type { BlackOperation, Operation } from "../Actions";
|
||||
import type { BlackOperation } from "../Actions/BlackOperation";
|
||||
import type { Operation } from "../Actions/Operation";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { ActionIdentifier } from "../Types";
|
||||
import { BladeburnerActionType } from "@enums";
|
||||
import { BlackOperation, Contract, GeneralAction, Operation } from "../Actions";
|
||||
import { BlackOperation } from "../Actions/BlackOperation";
|
||||
import { Contract } from "../Actions/Contract";
|
||||
import { GeneralAction } from "../Actions/GeneralAction";
|
||||
import { Operation } from "../Actions/Operation";
|
||||
|
||||
const resolveActionIdentifierFromName = (name: unknown): ActionIdentifier | null => {
|
||||
if (Contract.IsAcceptedName(name)) return Contract.createId(name);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { Bladeburner } from "../../../src/Bladeburner/Bladeburner";
|
||||
import { PlayerObject } from "../../../src/PersonObjects/Player/PlayerObject";
|
||||
import { Player, setPlayer } from "@player";
|
||||
import { BlackOperation, Contract, GeneralAction, Operation } from "../../../src/Bladeburner/Actions";
|
||||
import { Contract } from "../../../src/Bladeburner/Actions/Contract";
|
||||
import { GeneralAction } from "../../../src/Bladeburner/Actions/GeneralAction";
|
||||
import { Operation } from "../../../src/Bladeburner/Actions/Operation";
|
||||
import {
|
||||
AugmentationName,
|
||||
BladeburnerActionType,
|
||||
@@ -336,7 +338,7 @@ describe("Bladeburner Actions", () => {
|
||||
const action = bb.getActionObject(id);
|
||||
if ("count" in action) action.count = 1;
|
||||
if (action.type === BladeburnerActionType.Operation) action.autoLevel = true;
|
||||
if (id.type === "Black Operations") bb.numBlackOpsComplete = (<BlackOperation>action).n;
|
||||
if (action.type === BladeburnerActionType.BlackOp) bb.numBlackOpsComplete = action.n;
|
||||
bb.startAction(id);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Bladeburner } from "../../../src/Bladeburner/Bladeburner";
|
||||
import { Player, setPlayer } from "@player";
|
||||
import { PlayerObject } from "../../../src/PersonObjects/Player/PlayerObject";
|
||||
import { BladeburnerContractName } from "@enums";
|
||||
import { Contract } from "../../../src/Bladeburner/Actions";
|
||||
import { Contract } from "../../../src/Bladeburner/Actions/Contract";
|
||||
|
||||
describe("Bladeburner Console", () => {
|
||||
let inst: Bladeburner;
|
||||
|
||||
@@ -2,7 +2,9 @@ import { Player, setPlayer } from "@player";
|
||||
import { FormatsNeedToChange } from "../../../src/ui/formatNumber";
|
||||
import type { ActionIdFor } from "../../../src/Bladeburner/Types";
|
||||
import type { Bladeburner } from "../../../src/Bladeburner/Bladeburner";
|
||||
import { BlackOperation, Contract, Operation } from "../../../src/Bladeburner/Actions";
|
||||
import { BlackOperation } from "../../../src/Bladeburner/Actions/BlackOperation";
|
||||
import { Contract } from "../../../src/Bladeburner/Actions/Contract";
|
||||
import { Operation } from "../../../src/Bladeburner/Actions/Operation";
|
||||
import { SleeveSupportWork } from "../../../src/PersonObjects/Sleeve/Work/SleeveSupportWork";
|
||||
import { BladeburnerBlackOpName, BladeburnerContractName, BladeburnerOperationName } from "@enums";
|
||||
import { PlayerObject } from "../../../src/PersonObjects/Player/PlayerObject";
|
||||
|
||||
Reference in New Issue
Block a user