Moved server code to dedicated ServerManager class

This commit is contained in:
Pax1601
2023-09-18 17:10:14 +02:00
parent 2f125e3d0e
commit 44332a2004
9 changed files with 558 additions and 561 deletions

View File

@@ -2,7 +2,6 @@ import { CustomMarker } from "./custommarker";
import { DivIcon, LatLng } from "leaflet";
import { SVGInjector } from "@tanem/svg-injector";
import { getMarkerCategoryByName, getUnitDatabaseByCategory } from "../../other/utils";
import { isCommandExecuted } from "../../server/server";
import { getApp } from "../..";
export class TemporaryUnitMarker extends CustomMarker {
@@ -25,7 +24,7 @@ export class TemporaryUnitMarker extends CustomMarker {
this.#commandHash = commandHash;
this.#timer = window.setInterval(() => {
if (this.#commandHash !== undefined) {
isCommandExecuted((res: any) => {
getApp().getServerManager().isCommandExecuted((res: any) => {
if (res.commandExecuted) {
this.removeFrom(getApp().getMap());
window.clearInterval(this.#timer);