1
0
forked from noxious/client

Changes to mapeditorcomposable, fix pencil and fill tool for tiles

Locked in, made mapeditor my bi-
This commit is contained in:
2025-01-26 23:28:15 +01:00
parent cfac1d508b
commit 14aa696197
15 changed files with 206 additions and 101 deletions

View File

@ -17,24 +17,24 @@ import BackgroundImageLoader from '@/components/utilities/BackgroundImageLoader.
import Debug from '@/components/utilities/Debug.vue'
import Notifications from '@/components/utilities/Notifications.vue'
import { useGameStore } from '@/stores/gameStore'
import { useMapEditorStore } from '@/stores/mapEditorStore'
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
import { computed, watch } from 'vue'
const gameStore = useGameStore()
const mapEditorStore = useMapEditorStore()
const mapEditor = useMapEditorComposable()
const currentScreen = computed(() => {
if (!gameStore.game.isLoaded) return Loading
if (!gameStore.connection) return Login
if (!gameStore.token) return Login
if (!gameStore.character) return Characters
if (mapEditorStore.active) return MapEditor
if (mapEditor.active.value) return MapEditor
return Game
})
// Watch mapEditorStore.active and empty gameStore.game.loadedAssets
// Watch mapEditor.active and empty gameStore.game.loadedAssets
watch(
() => mapEditorStore.active,
() => mapEditor.active.value,
() => {
gameStore.game.loadedTextures = []
}