Plugin (not) work.

This commit is contained in:
PeekabooSteam
2023-09-12 19:04:52 +01:00
parent 803f9a7fd6
commit 6aaffe20d9
6 changed files with 29 additions and 15 deletions

View File

@@ -11,7 +11,6 @@ import { FeatureSwitches } from "./features/featureswitches";
import { LogPanel } from "./panels/logpanel";
import { getConfig, getPaused, setAddress, setCredentials, setPaused, startUpdate, toggleDemoEnabled } from "./server/server";
import { UnitDataTable } from "./atc/unitdatatable";
import { keyEventWasInInput } from "./other/utils";
import { Popup } from "./popups/popup";
import { Dropdown } from "./controls/dropdown";
import { HotgroupPanel } from "./panels/hotgrouppanel";
@@ -21,9 +20,9 @@ import { ServerStatusPanel } from "./panels/serverstatuspanel";
import { WeaponsManager } from "./weapon/weaponsmanager";
import { IndexApp } from "./indexapp";
import { ShortcutKeyboard } from "./shortcut/shortcut";
import { ShortcutManager } from "./shortcut/shortcutmanager";
import { OlympusApp } from "./olympusapp";
var map: Map;
var unitsManager: UnitsManager;
@@ -118,6 +117,8 @@ function setup() {
/* Setup event handlers */
setupEvents( indexApp );
indexApp.start();
}
function readConfig(config: any) {

View File

@@ -1,5 +1,4 @@
import { FeatureSwitches } from "./features/featureswitches";
import { Map } from "./map/map";
import { MissionHandler } from "./mission/missionhandler";
import { IOlympusApp, OlympusApp } from "./olympusapp";
import { ConnectionStatusPanel } from "./panels/connectionstatuspanel";
@@ -10,8 +9,6 @@ import { Panel } from "./panels/panel";
import { ServerStatusPanel } from "./panels/serverstatuspanel";
import { UnitControlPanel } from "./panels/unitcontrolpanel";
import { UnitInfoPanel } from "./panels/unitinfopanel";
import { PluginManager } from "./plugin/pluginmanager";
import { PluginHelloWorld } from "./plugins/helloworld/pluginhelloworld";
import { Popup } from "./popups/popup";
import { UnitsManager } from "./unit/unitsmanager";
@@ -35,8 +32,6 @@ export interface IIndexAppPanels {
export class IndexApp extends OlympusApp {
#pluginManager!: PluginManager;
constructor( config:IIndexApp ) {
super( config );
@@ -58,14 +53,6 @@ export class IndexApp extends OlympusApp {
Object.values( this.getPanelsManager().getAll() ).forEach( ( panel:Panel ) => {
panel.setOlympusApp( this );
});
// Plugins
this.#pluginManager = new PluginManager( this );
// Manual loading for now
this.getMap().whenReady( () => {
this.#pluginManager.add( "helloWorld", new PluginHelloWorld( this ) );
});
}

View File

@@ -6,6 +6,7 @@ import { PanelsManager } from "./panels/panelsmanager";
import { ShortcutManager } from "./shortcut/shortcutmanager";
import { UnitsManager } from "./unit/unitsmanager";
export interface IOlympusApp {
featureSwitches: FeatureSwitches;
map: Map,