This commit is contained in:
Snarling
2022-09-06 09:07:12 -04:00
parent cc2246213f
commit 83d357e758
203 changed files with 2263 additions and 3018 deletions
+3 -6
View File
@@ -1,11 +1,8 @@
import { BaseServer } from "../Server/BaseServer";
import { ITerminal } from "../Terminal/ITerminal";
import { IPlayer } from "../PersonObjects/IPlayer";
import { IRouter } from "../ui/Router";
export interface IProgramCreate {
level: number;
req(p: IPlayer): boolean; // Function that indicates whether player meets requirements
req(): boolean; // Function that indicates whether player meets requirements
time: number;
tooltip: string;
}
@@ -13,12 +10,12 @@ export interface IProgramCreate {
export class Program {
name = "";
create: IProgramCreate | null;
run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;
run: (args: string[], server: BaseServer) => void;
constructor(
name: string,
create: IProgramCreate | null,
run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void,
run: (args: string[], server: BaseServer) => void,
) {
this.name = name;
this.create = create;