diff --git a/src/App.vue b/src/App.vue index c42225c..898ff90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,6 +9,7 @@ import GmPanel from '@/components/gameMaster/GmPanel.vue' import Characters from '@/components/screens/Characters.vue' import Game from '@/components/screens/Game.vue' +import Loading from '@/components/screens/Loading.vue' import Login from '@/components/screens/Login.vue' import MapEditor from '@/components/screens/MapEditor.vue' import BackgroundImageLoader from '@/components/utilities/BackgroundImageLoader.vue' @@ -21,6 +22,7 @@ const gameStore = useGameStore() const mapEditorStore = useMapEditorStore() const currentScreen = computed(() => { + if (!gameStore.game.isLoaded) return Loading if (!gameStore.connection) return Login if (!gameStore.token) return Login if (!gameStore.character) return Characters @@ -37,6 +39,9 @@ watch( ) // #209: Play sound when a button is pressed +/** + * @TODO: Not all button-like elements will actually be a button, so we need to find a better way to do this + */ addEventListener('click', (event) => { if (!(event.target instanceof HTMLButtonElement)) { return diff --git a/src/application/types.ts b/src/application/types.ts index 9aba80c..f1f0998 100644 --- a/src/application/types.ts +++ b/src/application/types.ts @@ -12,9 +12,9 @@ export type HttpResponse = { data?: T } -export type AssetDataT = { +export type TextureData = { key: string - data: string + data: string // URL or Base64 encoded blob group: 'tiles' | 'map_objects' | 'sprites' | 'sprite_animations' | 'sound' | 'music' | 'ui' | 'font' | 'other' updatedAt: Date originX?: number diff --git a/src/components/game/map/Map.vue b/src/components/game/map/Map.vue index 3c77d6f..913c398 100644 --- a/src/components/game/map/Map.vue +++ b/src/components/game/map/Map.vue @@ -7,8 +7,8 @@ diff --git a/src/components/gameMaster/assetManager/partials/mapObject/MapObjectDetails.vue b/src/components/gameMaster/assetManager/partials/mapObject/MapObjectDetails.vue index c4698a9..9f4270f 100644 --- a/src/components/gameMaster/assetManager/partials/mapObject/MapObjectDetails.vue +++ b/src/components/gameMaster/assetManager/partials/mapObject/MapObjectDetails.vue @@ -1,7 +1,7 @@