1
0
forked from noxious/server

Asset type enhancement

This commit is contained in:
2024-07-26 19:12:20 +02:00
parent 7e71ac3c09
commit 9273d877f8
2 changed files with 4 additions and 7 deletions

View File

@ -19,9 +19,8 @@ async function addHttpRoutes(app: Application) {
tiles.forEach((tile) => { tiles.forEach((tile) => {
assets.push({ assets.push({
key: tile.id, key: tile.id,
value: '/assets/tiles/' + tile.id + '.png', url: '/assets/tiles/' + tile.id + '.png',
group: 'tiles', group: 'tiles',
type: 'link'
}) })
}) })
@ -29,9 +28,8 @@ async function addHttpRoutes(app: Application) {
objects.forEach((object) => { objects.forEach((object) => {
assets.push({ assets.push({
key: object.id, key: object.id,
value: '/assets/objects/' + object.id + '.png', url: '/assets/objects/' + object.id + '.png',
group: 'objects', group: 'objects',
type: 'link'
}) })
}) })

View File

@ -25,7 +25,6 @@ export type TZoneCharacter = Character & {}
export type TAsset = { export type TAsset = {
key: string key: string
value: string url: string
group: 'tiles' | 'objects' | 'sound' | 'music' | 'ui' | 'font' | 'other' group: 'tiles' | 'objects' | 'sound' | 'music' | 'ui' | 'font' | 'other' | 'sprite'
type: 'base64' | 'link'
} }