forked from noxious/client
Added characterChest component for chest equipment, moved some files
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { ref } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import type { Tile, Object, Sprite, CharacterType, CharacterHair, Item } from '@/types'
|
||||
import type { Tile, Object, Sprite, CharacterType, CharacterHair, Item } from '@/application/types'
|
||||
|
||||
export const useAssetManagerStore = defineStore('assetManager', () => {
|
||||
const tileList = ref<Tile[]>([])
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { io, Socket } from 'socket.io-client'
|
||||
import type { AssetDataT, Character, Notification, User, WorldSettings } from '@/types'
|
||||
import config from '@/config'
|
||||
import type { AssetDataT, Character, Notification, User, WorldSettings } from '@/application/types'
|
||||
import config from '@/application/config'
|
||||
import { useCookies } from '@vueuse/integrations/useCookies'
|
||||
import { getDomain } from '@/utilities'
|
||||
import { getDomain } from '@/application/utilities'
|
||||
|
||||
export const useGameStore = defineStore('game', {
|
||||
state: () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import type { Zone, Object, Tile, ZoneEffect, ZoneObject } from '@/types'
|
||||
import type { Zone, Object, Tile, ZoneEffect, ZoneObject } from '@/application/types'
|
||||
|
||||
export type TeleportSettings = {
|
||||
toZoneId: number
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import type { ZoneCharacter, Zone } from '@/types'
|
||||
import type { ZoneCharacter, Zone } from '@/application/types'
|
||||
|
||||
export const useZoneStore = defineStore('zone', {
|
||||
state: () => {
|
||||
@ -40,6 +40,15 @@ export const useZoneStore = defineStore('zone', {
|
||||
setCharacterLoaded(loaded: boolean) {
|
||||
this.characterLoaded = loaded
|
||||
},
|
||||
updateCharacterPosition(data: { id: number, positionX: number, positionY: number, rotation: number, isMoving: boolean }) {
|
||||
const character = this.characters.find(char => char.character.id === data.id)
|
||||
if (character) {
|
||||
character.character.positionX= data.positionX
|
||||
character.character.positionY = data.positionY
|
||||
character.character.rotation = data.rotation
|
||||
character.isMoving = data.isMoving
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.zone = null
|
||||
this.characters = []
|
||||
|
Reference in New Issue
Block a user