mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-09 14:57:33 +01:00
convert to ts
This commit is contained in:
parent
2e05f14c0d
commit
4f219a3214
3
src/RedPill.d.ts
vendored
3
src/RedPill.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
export declare let redPillFlag: boolean;
|
||||
export declare function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number);
|
||||
export declare function setRedPillFlag(b: boolean): void;
|
@ -8,14 +8,15 @@ import { SourceFileFlags } from "./SourceFile/SourceFileFlags";
|
||||
import { SourceFiles } from "./SourceFile/SourceFiles";
|
||||
|
||||
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||
import { IRouter } from "./ui/Router";
|
||||
|
||||
export let redPillFlag = false;
|
||||
|
||||
export function setRedPillFlag(b) {
|
||||
export function setRedPillFlag(b: boolean): void {
|
||||
redPillFlag = b;
|
||||
}
|
||||
|
||||
function giveSourceFile(bitNodeNumber) {
|
||||
function giveSourceFile(bitNodeNumber: number): void {
|
||||
var sourceFileKey = "SourceFile" + bitNodeNumber.toString();
|
||||
var sourceFile = SourceFiles[sourceFileKey];
|
||||
if (sourceFile == null) {
|
||||
@ -62,7 +63,7 @@ function giveSourceFile(bitNodeNumber) {
|
||||
}
|
||||
}
|
||||
|
||||
export function enterBitNode(router, flume, destroyedBitNode, newBitNode) {
|
||||
export function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number): void {
|
||||
if (!flume) {
|
||||
giveSourceFile(destroyedBitNode);
|
||||
} else {
|
Loading…
Reference in New Issue
Block a user