forked from noxious/client
Showing placed map object works in both game and map editor, updated types, cleaned some logic
This commit is contained in:
@ -26,7 +26,7 @@ export type TextureData = {
|
||||
}
|
||||
|
||||
export type Tile = {
|
||||
id: UUID
|
||||
id: string
|
||||
name: string
|
||||
tags: any | null
|
||||
createdAt: Date
|
||||
@ -34,7 +34,7 @@ export type Tile = {
|
||||
}
|
||||
|
||||
export type MapObject = {
|
||||
id: UUID
|
||||
id: string
|
||||
name: string
|
||||
tags: any | null
|
||||
originX: number
|
||||
@ -47,7 +47,7 @@ export type MapObject = {
|
||||
}
|
||||
|
||||
export type Item = {
|
||||
id: UUID
|
||||
id: string
|
||||
name: string
|
||||
description: string | null
|
||||
itemType: ItemType
|
||||
@ -62,7 +62,7 @@ export type ItemType = 'WEAPON' | 'HELMET' | 'CHEST' | 'LEGS' | 'BOOTS' | 'GLOVE
|
||||
export type ItemRarity = 'COMMON' | 'UNCOMMON' | 'RARE' | 'EPIC' | 'LEGENDARY'
|
||||
|
||||
export type Map = {
|
||||
id: UUID
|
||||
id: string
|
||||
name: string
|
||||
width: number
|
||||
height: number
|
||||
@ -78,17 +78,15 @@ export type Map = {
|
||||
}
|
||||
|
||||
export type MapEffect = {
|
||||
id: UUID
|
||||
id: string
|
||||
map: Map
|
||||
effect: string
|
||||
strength: number
|
||||
}
|
||||
|
||||
export type PlacedMapObject = {
|
||||
id: UUID
|
||||
map: Map
|
||||
mapObject: MapObject
|
||||
depth: number
|
||||
id: string
|
||||
mapObject: MapObject | string
|
||||
isRotated: boolean
|
||||
positionX: number
|
||||
positionY: number
|
||||
@ -102,8 +100,8 @@ export enum MapEventTileType {
|
||||
}
|
||||
|
||||
export type MapEventTile = {
|
||||
id: UUID
|
||||
mapId: UUID
|
||||
id: string
|
||||
mapid: string
|
||||
type: MapEventTileType
|
||||
positionX: number
|
||||
positionY: number
|
||||
@ -111,7 +109,7 @@ export type MapEventTile = {
|
||||
}
|
||||
|
||||
export type MapEventTileTeleport = {
|
||||
id: UUID
|
||||
id: string
|
||||
mapEventTile: MapEventTile
|
||||
toMap: Map
|
||||
toPositionX: number
|
||||
@ -120,7 +118,7 @@ export type MapEventTileTeleport = {
|
||||
}
|
||||
|
||||
export type User = {
|
||||
id: UUID
|
||||
id: string
|
||||
username: string
|
||||
password: string
|
||||
characters: Character[]
|
||||
@ -140,7 +138,7 @@ export enum CharacterRace {
|
||||
}
|
||||
|
||||
export type CharacterType = {
|
||||
id: UUID
|
||||
id: string
|
||||
name: string
|
||||
gender: CharacterGender
|
||||
race: CharacterRace
|
||||
@ -151,7 +149,7 @@ export type CharacterType = {
|
||||
}
|
||||
|
||||
export type CharacterHair = {
|
||||
id: UUID
|
||||
id: string
|
||||
name: string
|
||||
sprite?: Sprite
|
||||
gender: CharacterGender
|
||||
@ -159,8 +157,8 @@ export type CharacterHair = {
|
||||
}
|
||||
|
||||
export type Character = {
|
||||
id: UUID
|
||||
userId: UUID
|
||||
id: string
|
||||
userid: string
|
||||
user: User
|
||||
name: string
|
||||
hitpoints: number
|
||||
@ -187,14 +185,14 @@ export type MapCharacter = {
|
||||
}
|
||||
|
||||
export type CharacterItem = {
|
||||
id: UUID
|
||||
id: string
|
||||
character: Character
|
||||
item: Item
|
||||
quantity: number
|
||||
}
|
||||
|
||||
export type CharacterEquipment = {
|
||||
id: UUID
|
||||
id: string
|
||||
slot: CharacterEquipmentSlotType
|
||||
characterItem: CharacterItem
|
||||
}
|
||||
@ -209,7 +207,7 @@ export enum CharacterEquipmentSlotType {
|
||||
}
|
||||
|
||||
export type Sprite = {
|
||||
id: UUID
|
||||
id: string
|
||||
name: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
@ -256,6 +254,6 @@ export type WeatherState = {
|
||||
}
|
||||
|
||||
export type mapLoadData = {
|
||||
mapId: UUID
|
||||
mapId: string
|
||||
characters: MapCharacter[]
|
||||
}
|
||||
|
Reference in New Issue
Block a user