import OutputPacket from '@lastres/output-packet'
import type { Location } from '@lastres/location'
export interface MoveToPacketInterface {
    location: string
    area: string
    super_area: string
    planet: string
}
export default class MoveToPacket extends OutputPacket {
    location: Location
    constructor (location: Location) {
        super()
        this.location = location
    }

    command (): string {
        return 'move_to'
    }

    data (): MoveToPacketInterface {
        return {
            location: this.location.location.identifier,
            area: this.location.area.identifier,
            super_area: this.location.super_area.identifier,
            planet: this.location.planet.identifier
        }
    }
}
