First commit

This commit is contained in:
PeekabooSteam
2023-09-03 12:08:35 +01:00
parent a338e5fa26
commit 4d863bb894
22 changed files with 421 additions and 18 deletions

View File

@@ -0,0 +1,32 @@
import { OlympusApp } from "../olympusapp";
export interface PluginInterface {
}
export abstract class Plugin {
#olympusApp!:OlympusApp;
protected name = "";
constructor( olympusApp:OlympusApp, pluginName:string ) {
const regex = "^[a-zA-Z][a-zA-Z\d]{4,}"
if ( new RegExp( regex ).test( pluginName ) === false ) {
throw new Error( `Plugin names must match regex: ${regex}` );
}
this.name = pluginName;
this.#olympusApp = olympusApp;
}
getName() {
return this.name;
}
getOlympusApp() {
return this.#olympusApp;
}
}

View File

@@ -0,0 +1,13 @@
import { OlympusApp } from "../olympusapp";
import { Manager } from "../other/manager";
export class PluginManager extends Manager {
constructor( olympusApp:OlympusApp ) {
super( olympusApp );
}
}