forked from noxious/client
Walk improvement
This commit is contained in:
@ -41,12 +41,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Map as MapT, MapObject, PlacedMapObject } from '@/application/types'
|
||||
import type { MapObject, Map as MapT, PlacedMapObject } from '@/application/types'
|
||||
import Modal from '@/components/utilities/Modal.vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
|
||||
import { MapObjectStorage } from '@/storage/storages'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
placedMapObject: PlacedMapObject
|
||||
@ -77,7 +77,7 @@ const handleDelete = () => {
|
||||
emit('delete', props.placedMapObject.id, props.map)
|
||||
}
|
||||
|
||||
async function handleUpdate () {
|
||||
async function handleUpdate() {
|
||||
if (!mapObject.value) return
|
||||
|
||||
gameStore.connection?.emit(
|
||||
@ -86,8 +86,9 @@ async function handleUpdate () {
|
||||
id: props.placedMapObject.mapObject as string,
|
||||
name: mapObjectName.value,
|
||||
originX: mapObjectOriginX.value,
|
||||
originY: mapObjectOriginY.value,
|
||||
}, async (response: boolean) => {
|
||||
originY: mapObjectOriginY.value
|
||||
},
|
||||
async (response: boolean) => {
|
||||
if (!response) return
|
||||
// Update mapObject in storage
|
||||
await mapObjectStorage.update(mapObject.value!.id, {
|
||||
|
Reference in New Issue
Block a user