Renamed get to getById, map improvement
This commit is contained in:
@ -48,7 +48,7 @@ onMounted(async () => {
|
||||
|
||||
hairSpriteId.value = spriteId
|
||||
const spriteStorage = new SpriteStorage()
|
||||
sprite.value = await spriteStorage.get(spriteId)
|
||||
sprite.value = await spriteStorage.getById(spriteId)
|
||||
await loadSpriteTextures(scene, spriteId)
|
||||
})
|
||||
</script>
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -103,7 +103,7 @@ async function handleUpdate() {
|
||||
onMounted(async () => {
|
||||
if (!props.placedMapObject.mapObject) return
|
||||
|
||||
mapObject.value = await mapObjectStorage.get(props.placedMapObject.mapObject as string)
|
||||
mapObject.value = await mapObjectStorage.getById(props.placedMapObject.mapObject as string)
|
||||
if (!mapObject.value) return
|
||||
|
||||
mapObjectName.value = mapObject.value.name
|
||||
|
@ -169,7 +169,7 @@ function loginWithCharacter() {
|
||||
function createCharacter() {
|
||||
gameStore.connection?.emit('character:create', { name: newCharacterName.value }, (success: boolean) => {
|
||||
if (success) return
|
||||
isCreateNewCharacterModalOpen.value = false
|
||||
isCreateNewCharacterModalOpen.value = false
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user