diff --git a/src/components/utilities/Debug.vue b/src/components/utilities/Debug.vue index 51deee6..c7ee9f6 100644 --- a/src/components/utilities/Debug.vue +++ b/src/components/utilities/Debug.vue @@ -4,7 +4,10 @@ import { CharacterHairStorage, CharacterTypeStorage, MapObjectStorage, MapStorage, SoundStorage, SpriteStorage, TileStorage } from '@/storage/storages' import { TextureStorage } from '@/storage/textureStorage' import { onMounted, onUnmounted } from 'vue' +import {login} from "@/services/authenticationService"; +import {useGameStore} from "@/stores/gameStore"; +const gameStore = useGameStore() const mapStorage = new MapStorage() const tileStorage = new TileStorage() const mapObjectStorage = new MapObjectStorage() @@ -37,6 +40,16 @@ async function handleKeyPress(event: KeyboardEvent) { currentString = '' // Reset } + if (currentString.includes('11')) { + const response = await login('root', 'password') + + if (response.success === undefined) { + return + } + gameStore.setToken(response.token) + gameStore.initConnection() + } + // Reset string after a certain amount of time setTimeout(() => { currentString = ''