From 1d27e05f7c1c61578a43819852b6bfeffa70c7ac Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sat, 24 Jul 2021 02:27:25 +0100 Subject: [PATCH] Rename DynmapPlayer to LiveAtlasPlayer, rename some fields, add uuid field --- src/components/Map.vue | 13 ++++----- src/components/map/marker/PlayerMarker.vue | 7 +++-- src/components/sidebar/FollowTarget.vue | 10 +++---- src/components/sidebar/PlayerList.vue | 2 +- src/components/sidebar/PlayerListItem.vue | 12 ++++---- src/dynmap.d.ts | 14 ++------- src/index.d.ts | 15 ++++++++-- src/leaflet/icon/PlayerIcon.ts | 12 ++++---- src/leaflet/marker/PlayerMarker.ts | 6 ++-- src/providers/DynmapMapProvider.ts | 11 ++++---- src/store/actions.ts | 12 ++++---- src/store/mutations.ts | 33 +++++++++++----------- src/store/state.ts | 9 +++--- src/util.ts | 6 ++-- 14 files changed, 80 insertions(+), 82 deletions(-) diff --git a/src/components/Map.vue b/src/components/Map.vue index f6ff591..26fd3d6 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -44,11 +44,10 @@ import LinkControl from "@/components/map/control/LinkControl.vue"; import ChatControl from "@/components/map/control/ChatControl.vue"; import LogoControl from "@/components/map/control/LogoControl.vue"; import {MutationTypes} from "@/store/mutation-types"; -import {DynmapPlayer} from "@/dynmap"; import LiveAtlasLeafletMap from "@/leaflet/LiveAtlasLeafletMap"; import {LoadingControl} from "@/leaflet/control/LoadingControl"; import MapContextMenu from "@/components/map/MapContextMenu.vue"; -import {Coordinate} from "@/index"; +import {Coordinate, LiveAtlasPlayer} from "@/index"; export default defineComponent({ components: { @@ -277,7 +276,7 @@ export default defineComponent({ this.leaflet.getContainer().focus(); } }, - updateFollow(player: DynmapPlayer, newFollow: boolean) { + updateFollow(player: LiveAtlasPlayer, newFollow: boolean) { const store = useStore(), followMapName = store.state.configuration.followMap, currentWorld = store.state.currentWorld; @@ -285,17 +284,17 @@ export default defineComponent({ let targetWorld = null; if(!this.leaflet) { - console.warn(`Cannot follow ${player.account}. Map not yet initialized.`); + console.warn(`Cannot follow ${player.name}. Map not yet initialized.`); return; } if(player.hidden) { - console.warn(`Cannot follow ${player.account}. Player is hidden from the map.`); + console.warn(`Cannot follow ${player.name}. Player is hidden from the map.`); return; } if(!player.location.world) { - console.warn(`Cannot follow ${player.account}. Player isn't in a known world.`); + console.warn(`Cannot follow ${player.name}. Player isn't in a known world.`); return; } @@ -306,7 +305,7 @@ export default defineComponent({ } if (!targetWorld) { - console.warn(`Cannot follow ${player.account}. Player isn't in a known world.`); + console.warn(`Cannot follow ${player.name}. Player isn't in a known world.`); return; } diff --git a/src/components/map/marker/PlayerMarker.vue b/src/components/map/marker/PlayerMarker.vue index 06935f9..431e567 100644 --- a/src/components/map/marker/PlayerMarker.vue +++ b/src/components/map/marker/PlayerMarker.vue @@ -17,15 +17,16 @@