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:
10
src/App.vue
10
src/App.vue
@ -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 = []
|
||||
}
|
||||
|
Reference in New Issue
Block a user