This commit is contained in:
Olivier Gagnon 2022-07-21 01:58:47 -04:00
parent 2772511525
commit d01fd55bde
9 changed files with 4 additions and 14 deletions

@ -794,7 +794,7 @@ export class Bladeburner implements IBladeburner {
let i = 0; let i = 0;
while (i < command.length) { while (i < command.length) {
const c = command.charAt(i); const c = command.charAt(i);
if ((c === '"')||(c === "'")) { if (c === '"' || c === "'") {
// Double quotes or Single quotes // Double quotes or Single quotes
const endQuote = command.indexOf(c, i + 1); const endQuote = command.indexOf(c, i + 1);
if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) { if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {

@ -177,7 +177,7 @@ function EmployeeCount(props: { num: number; next: number }): React.ReactElement
return ( return (
<Typography display="flex" alignItems="center" justifyContent="flex-end"> <Typography display="flex" alignItems="center" justifyContent="flex-end">
{props.num === props.next ? null : props.num} {props.num === props.next ? null : props.num}
{props.num === props.next ? null : <ArrowForwardIcon fontSize="inherit"/>} {props.num === props.next ? null : <ArrowForwardIcon fontSize="inherit" />}
{props.next} {props.next}
</Typography> </Typography>
); );

@ -82,12 +82,7 @@ export function BuybackSharesModal(props: IProps): React.ReactElement {
</Typography> </Typography>
<CostIndicator /> <CostIndicator />
<br /> <br />
<NumberInput <NumberInput autoFocus={true} placeholder="Shares to buyback" onChange={setShares} onKeyDown={onKeyDown} />
autoFocus={true}
placeholder="Shares to buyback"
onChange={setShares}
onKeyDown={onKeyDown}
/>
<Button disabled={disabled} onClick={buy}> <Button disabled={disabled} onClick={buy}>
Buy shares Buy shares
</Button> </Button>

@ -1,7 +1,6 @@
import { CONSTANTS } from "../Constants"; import { CONSTANTS } from "../Constants";
import { IPlayer } from "../PersonObjects/IPlayer"; import { IPlayer } from "../PersonObjects/IPlayer";
import { IPerson } from "../PersonObjects/IPerson"; import { IPerson } from "../PersonObjects/IPerson";
import { IRouter } from "../ui/Router";
import { WorkerScript } from "../Netscript/WorkerScript"; import { WorkerScript } from "../Netscript/WorkerScript";
import { CrimeType } from "../utils/WorkType"; import { CrimeType } from "../utils/WorkType";
import { CrimeWork } from "../Work/CrimeWork"; import { CrimeWork } from "../Work/CrimeWork";

@ -637,7 +637,6 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
}; };
const singularity = NetscriptSingularity(Player, workerScript); const singularity = NetscriptSingularity(Player, workerScript);
const base: InternalAPI<INS> = { const base: InternalAPI<INS> = {
args: workerScript.args as unknown as any, args: workerScript.args as unknown as any,
enums: { enums: {

@ -12,7 +12,6 @@ import { RamCalculationErrorCode } from "./RamCalculationErrorCodes";
import { RamCosts, RamCostConstants } from "../Netscript/RamCostGenerator"; import { RamCosts, RamCostConstants } from "../Netscript/RamCostGenerator";
import { Script } from "./Script"; import { Script } from "./Script";
import { WorkerScript } from "../Netscript/WorkerScript";
import { areImportsEquals } from "../Terminal/DirectoryHelpers"; import { areImportsEquals } from "../Terminal/DirectoryHelpers";
import { IPlayer } from "../PersonObjects/IPlayer"; import { IPlayer } from "../PersonObjects/IPlayer";
import { Node } from "../NetscriptJSEvaluator"; import { Node } from "../NetscriptJSEvaluator";

@ -58,7 +58,7 @@ interface IProps {
let symbolsLoaded = false; let symbolsLoaded = false;
let symbols: string[] = []; let symbols: string[] = [];
export function SetupTextEditor(): void { export function SetupTextEditor(): void {
const ns = NetscriptFunctions({} as WorkerScript); const ns = NetscriptFunctions({ args: [] } as unknown as WorkerScript);
// Populates symbols for text editor // Populates symbols for text editor
function populate(ns: any): string[] { function populate(ns: any): string[] {

@ -1,4 +1,3 @@
import React from "react";
import { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver"; import { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver";
import { Crime } from "../Crime/Crime"; import { Crime } from "../Crime/Crime";
import { CONSTANTS } from "../Constants"; import { CONSTANTS } from "../Constants";

@ -8,7 +8,6 @@ import { saveObject } from "../SaveObject";
import { onExport } from "../ExportBonus"; import { onExport } from "../ExportBonus";
import { LocationName } from "../Locations/data/LocationNames"; import { LocationName } from "../Locations/data/LocationNames";
import { Location } from "../Locations/Location"; import { Location } from "../Locations/Location";
import { Locations } from "../Locations/Locations";
import { ITutorial, iTutorialStart } from "../InteractiveTutorial"; import { ITutorial, iTutorialStart } from "../InteractiveTutorial";
import { InteractiveTutorialRoot } from "./InteractiveTutorial/InteractiveTutorialRoot"; import { InteractiveTutorialRoot } from "./InteractiveTutorial/InteractiveTutorialRoot";
import { ITutorialEvents } from "./InteractiveTutorial/ITutorialEvents"; import { ITutorialEvents } from "./InteractiveTutorial/ITutorialEvents";