TS improvements
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import config from '@/application/config'
|
||||
import type { AssetDataT, HttpResponse, Map as MapT } from '@/application/types'
|
||||
import type { AssetDataT, HttpResponse, UUID } from '@/application/types'
|
||||
import { loadTexture } from '@/composables/gameComposable'
|
||||
|
||||
import Tilemap = Phaser.Tilemaps.Tilemap
|
||||
@ -85,7 +85,7 @@ export function FlattenMapArray(tiles: string[][]) {
|
||||
return normalArray
|
||||
}
|
||||
|
||||
export async function loadMapTilesIntoScene(map_id: number, scene: Phaser.Scene) {
|
||||
export async function loadMapTilesIntoScene(map_id: UUID, scene: Phaser.Scene) {
|
||||
// Fetch the list of tiles from the server
|
||||
const tileArray: HttpResponse<AssetDataT[]> = await fetch(config.server_endpoint + '/assets/list_tiles/' + map_id).then((response) => response.json())
|
||||
|
||||
|
Reference in New Issue
Block a user