forked from noxious/client
Cleaned code; overwrite cache if newer results are found
This commit is contained in:
@ -15,11 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" async>
|
||||
import config from '@/application/config'
|
||||
import type { HttpResponse, MapObject } from '@/application/types'
|
||||
import type { BaseStorage } from '@/storage/baseStorage'
|
||||
import { CharacterHairStorage, CharacterTypeStorage, MapObjectStorage, MapStorage, SpriteStorage, TileStorage } from '@/storage/storages'
|
||||
// import type { Map } from '@/application/types'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import { ref } from 'vue'
|
||||
import { downloadCache } from '@/application/utilities'
|
||||
@ -29,14 +25,10 @@ const gameStore = useGameStore()
|
||||
const totalItems = ref(0)
|
||||
const currentItem = ref(0)
|
||||
|
||||
const tileStorage = new TileStorage()
|
||||
const mapStorage = new MapStorage()
|
||||
const mapObjectStorage = new MapObjectStorage()
|
||||
|
||||
Promise.all([
|
||||
downloadCache('tiles', tileStorage),
|
||||
downloadCache('maps', mapStorage),
|
||||
downloadCache('map_objects', mapObjectStorage),
|
||||
downloadCache('tiles', new TileStorage()),
|
||||
downloadCache('maps', new MapStorage()),
|
||||
downloadCache('map_objects', new MapObjectStorage()),
|
||||
downloadCache('sprites', new SpriteStorage()),
|
||||
downloadCache('character_types', new CharacterTypeStorage()),
|
||||
downloadCache('character_hair', new CharacterHairStorage())
|
||||
|
Reference in New Issue
Block a user