From da3e9b379b982265729459e780550b0ca0781bac Mon Sep 17 00:00:00 2001 From: Owen Date: Fri, 21 Jun 2024 10:02:43 +0100 Subject: [PATCH] Update GPS.ts --- src/api/GPS.ts | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/api/GPS.ts b/src/api/GPS.ts index 2f6734e..2c8bad0 100644 --- a/src/api/GPS.ts +++ b/src/api/GPS.ts @@ -14,34 +14,26 @@ import Mitt from '../helpers/EventEmitter.js' const NativeMap = globalThis.Map class GPS extends Mitt { - static readonly Routes = Routes - + #map: Dynmap #emittedUnderground = false - - get emittedUnderground() { - return this.#emittedUnderground - } - - protected set emittedUnderground(val: boolean) { - this.#emittedUnderground = val - } - #lastLoc: undefined | { x: number z: number } - get lastLoc() { - return this.#lastLoc + get map() { return this.#map } + + get emittedUnderground() { return this.#emittedUnderground } + protected set emittedUnderground(val: boolean) { + this.#emittedUnderground = val } + get lastLoc() { return this.#lastLoc } protected set lastLoc(val: { x: number, z: number }) { this.#lastLoc = val } - #map: Map - - get map() { return this.#map } + static readonly Routes = Routes constructor(map: Map) { super()