Renamed get to getById, map improvement

This commit is contained in:
2025-02-09 17:33:10 +01:00
parent 49dcd92a9e
commit a9cedba4e0
13 changed files with 44 additions and 26 deletions

View File

@ -36,7 +36,7 @@ gameStore.connection?.on('map:character:teleport', async (data: mapLoadData) =>
async function initialize() {
if (!mapStore.mapId) return
const map = await mapStorage.get(mapStore.mapId)
const map = await mapStorage.getById(mapStore.mapId)
if (!map) return
await loadTileTexturesFromMapTileArray(mapStore.mapId, scene)

View File

@ -22,7 +22,7 @@ const props = defineProps<{
onMounted(async () => {
if (!mapStore.mapId) return
const map = await mapStorage.get(mapStore.mapId)
const map = await mapStorage.getById(mapStore.mapId)
if (!map) return
await loadTileTexturesFromMapTileArray(mapStore.mapId, scene)

View File

@ -23,7 +23,7 @@ const items = ref<PlacedMapObjectT[]>([])
onMounted(async () => {
if (!mapStore.mapId) return
const map = await mapStorage.get(mapStore.mapId)
const map = await mapStorage.getById(mapStore.mapId)
if (!map) return
items.value = map.placedMapObjects

View File

@ -41,7 +41,7 @@ async function initialize() {
}
const mapObjectStorage = new MapObjectStorage()
const _mapObject = await mapObjectStorage.get(props.placedMapObject.mapObject as string)
const _mapObject = await mapObjectStorage.getById(props.placedMapObject.mapObject as string)
if (!_mapObject) return
mapObject.value = _mapObject