1
0
forked from noxious/client

Removed placedMapObject depth field, cleaned package.json, creating & deleting maps now works with mapStorage

This commit is contained in:
2025-01-23 00:47:34 +01:00
parent ebd6d96e54
commit 5e2781b265
11 changed files with 82 additions and 1528 deletions

View File

@ -5,13 +5,10 @@
<div v-if="!isLoaded" class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-white text-3xl font-ui">Loading...</div>
<div v-else>
<Map :key="mapEditorStore.mapId" />
<Toolbar @save="save" @clear="clear" />
<MapList />
<TileList />
<ObjectList />
<MapSettings />
<TeleportModal />
</div>
@ -23,6 +20,7 @@
<script setup lang="ts">
import config from '@/application/config'
import 'phaser'
import type { Map as MapT } from '@/application/types'
import Map from '@/components/gameMaster/mapEditor/Map.vue'
import MapList from '@/components/gameMaster/mapEditor/partials/MapList.vue'
import ObjectList from '@/components/gameMaster/mapEditor/partials/MapObjectList.vue'
@ -35,7 +33,6 @@ import { useGameStore } from '@/stores/gameStore'
import { useMapEditorStore } from '@/stores/mapEditorStore'
import { Game, Scene } from 'phavuer'
import { ref } from 'vue'
import type { Map as MapT } from '@/application/types'
const gameStore = useGameStore()
const mapEditorStore = useMapEditorStore()
@ -65,8 +62,10 @@ const preloadScene = async (scene: Phaser.Scene) => {
scene.load.image('blank_tile', '/assets/map/blank_tile.png')
scene.load.image('waypoint', '/assets/waypoint.png')
// Get all tiles from IndexedDB and load them into the scene
await loadAllTilesIntoScene(scene)
// Wait for all assets to be loaded before continuing
await new Promise<void>((resolve) => {
scene.load.on(Phaser.Loader.Events.COMPLETE, () => {
resolve()