1
0
forked from noxious/client

Renamed zone > map

This commit is contained in:
2025-01-02 17:31:31 +01:00
parent 736ddddc54
commit 40c87f0ee3
65 changed files with 762 additions and 762 deletions

View File

@ -10,27 +10,27 @@ import GmPanel from '@/components/gameMaster/GmPanel.vue'
import Characters from '@/components/screens/Characters.vue'
import Game from '@/components/screens/Game.vue'
import Login from '@/components/screens/Login.vue'
import ZoneEditor from '@/components/screens/ZoneEditor.vue'
import MapEditor from '@/components/screens/MapEditor.vue'
import BackgroundImageLoader from '@/components/utilities/BackgroundImageLoader.vue'
import Notifications from '@/components/utilities/Notifications.vue'
import { useGameStore } from '@/stores/gameStore'
import { useZoneEditorStore } from '@/stores/zoneEditorStore'
import { useMapEditorStore } from '@/stores/mapEditorStore'
import { computed, watch } from 'vue'
const gameStore = useGameStore()
const zoneEditorStore = useZoneEditorStore()
const mapEditorStore = useMapEditorStore()
const currentScreen = computed(() => {
if (!gameStore.connection) return Login
if (!gameStore.token) return Login
if (!gameStore.character) return Characters
if (zoneEditorStore.active) return ZoneEditor
if (mapEditorStore.active) return MapEditor
return Game
})
// Watch zoneEditorStore.active and empty gameStore.game.loadedAssets
// Watch mapEditorStore.active and empty gameStore.game.loadedAssets
watch(
() => zoneEditorStore.active,
() => mapEditorStore.active,
() => {
gameStore.game.loadedAssets = []
}