mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 09:13:07 +02:00
REFACTORING: ScriptEditor (#560)
This commit is contained in:
committed by
GitHub
parent
886f402a43
commit
99954ebd1e
@@ -0,0 +1,24 @@
|
||||
import * as monaco from "monaco-editor";
|
||||
|
||||
import { ContentFilePath } from "src/Paths/ContentFile";
|
||||
|
||||
type ITextModel = monaco.editor.ITextModel;
|
||||
|
||||
// Holds all the data for a open script
|
||||
export class OpenScript {
|
||||
path: ContentFilePath;
|
||||
code: string;
|
||||
hostname: string;
|
||||
lastPosition: monaco.Position;
|
||||
model: ITextModel;
|
||||
isTxt: boolean;
|
||||
|
||||
constructor(path: ContentFilePath, code: string, hostname: string, lastPosition: monaco.Position, model: ITextModel) {
|
||||
this.path = path;
|
||||
this.code = code;
|
||||
this.hostname = hostname;
|
||||
this.lastPosition = lastPosition;
|
||||
this.model = model;
|
||||
this.isTxt = path.endsWith(".txt");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user