mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 09:42:53 +02:00
prettify, sorry for the big ass commit
This commit is contained in:
+18
-16
@@ -1,26 +1,28 @@
|
||||
export interface IPlayer {
|
||||
hacking_skill: number;
|
||||
sourceFiles: any[];
|
||||
hacking_skill: number;
|
||||
sourceFiles: any[];
|
||||
}
|
||||
|
||||
export interface IProgramCreate {
|
||||
level: number;
|
||||
req(p: IPlayer): boolean; // Function that indicates whether player meets requirements
|
||||
time: number;
|
||||
tooltip: string;
|
||||
level: number;
|
||||
req(p: IPlayer): boolean; // Function that indicates whether player meets requirements
|
||||
time: number;
|
||||
tooltip: string;
|
||||
}
|
||||
|
||||
export class Program {
|
||||
name = "";
|
||||
create: IProgramCreate | null;
|
||||
name = "";
|
||||
create: IProgramCreate | null;
|
||||
|
||||
constructor(name: string, create: IProgramCreate | null) {
|
||||
this.name = name;
|
||||
this.create = create;
|
||||
}
|
||||
constructor(name: string, create: IProgramCreate | null) {
|
||||
this.name = name;
|
||||
this.create = create;
|
||||
}
|
||||
|
||||
htmlID(): string {
|
||||
const name = this.name.endsWith('.exe') ? this.name.slice(0, -('.exe'.length)) : this.name;
|
||||
return "create-program-" + name;
|
||||
}
|
||||
htmlID(): string {
|
||||
const name = this.name.endsWith(".exe")
|
||||
? this.name.slice(0, -".exe".length)
|
||||
: this.name;
|
||||
return "create-program-" + name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user