2020-09-17 23:02:14 +00:00
|
|
|
use common::comp;
|
|
|
|
use serde::{Deserialize, Serialize};
|
2020-11-03 00:12:49 +00:00
|
|
|
use vek::Vec3;
|
2020-09-17 23:02:14 +00:00
|
|
|
|
|
|
|
#[derive(Serialize, Deserialize)]
|
|
|
|
pub struct HumanoidBody {
|
|
|
|
pub species: u8,
|
|
|
|
pub body_type: u8,
|
|
|
|
pub hair_style: u8,
|
|
|
|
pub beard: u8,
|
|
|
|
pub eyes: u8,
|
|
|
|
pub accessory: u8,
|
|
|
|
pub hair_color: u8,
|
|
|
|
pub skin: u8,
|
|
|
|
pub eye_color: u8,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<&comp::humanoid::Body> for HumanoidBody {
|
|
|
|
fn from(body: &comp::humanoid::Body) -> Self {
|
|
|
|
HumanoidBody {
|
|
|
|
species: body.species as u8,
|
|
|
|
body_type: body.body_type as u8,
|
|
|
|
hair_style: body.hair_style,
|
|
|
|
beard: body.beard,
|
|
|
|
eyes: body.eyes,
|
|
|
|
accessory: body.accessory,
|
|
|
|
hair_color: body.hair_color,
|
|
|
|
skin: body.skin,
|
|
|
|
eye_color: body.eye_color,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-11-03 00:12:49 +00:00
|
|
|
|
|
|
|
#[derive(Serialize, Deserialize)]
|
|
|
|
pub struct CharacterPosition {
|
|
|
|
pub waypoint: Vec3<f32>,
|
|
|
|
}
|