#366 : Add storage logic to asset manager

This commit is contained in:
2025-02-18 16:37:15 +01:00
parent d51fbc8030
commit 7097eb1580
9 changed files with 48 additions and 27 deletions

View File

@ -32,9 +32,10 @@ import TileList from '@/components/gameMaster/mapEditor/partials/TileList.vue'
import Toolbar from '@/components/gameMaster/mapEditor/partials/Toolbar.vue'
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
import { loadAllTileTextures } from '@/services/mapService'
import { MapStorage } from '@/storage/storages'
import {CharacterHairStorage, MapStorage} from '@/storage/storages'
import { Game, Scene } from 'phavuer'
import {ref, toRaw, useTemplateRef} from 'vue'
import { ref, toRaw, useTemplateRef } from 'vue'
import {downloadCache} from "@/application/utilities";
const mapStorage = new MapStorage()
const mapEditor = useMapEditorComposable()
@ -92,7 +93,8 @@ function save() {
}
socketManager.emit(SocketEvent.GM_MAP_UPDATE, data, (response: MapT) => {
mapStorage.update(response.id, response)
if (!response.id) return
downloadCache('maps', new MapStorage())
})
}