|
|
@ -2,8 +2,8 @@ use std::convert::{From, Into}; |
|
|
|
use std::collections::HashMap;
|
|
|
|
use serde::{Serialize, Deserialize};
|
|
|
|
|
|
|
|
use libpso::packet::ship::{UpdateConfig, WriteInfoboard};
|
|
|
|
use libpso::character::character::{DEFAULT_PALETTE_CONFIG, DEFAULT_TECH_MENU};
|
|
|
|
use libpso::packet::ship::{UpdateConfig, WriteInfoboard, KeyboardConfig};
|
|
|
|
use libpso::character::character::{DEFAULT_PALETTE_CONFIG, DEFAULT_TECH_MENU, DEFAULT_KEYBOARD_CONFIG1};
|
|
|
|
use crate::entity::item::tech::Technique;
|
|
|
|
use crate::entity::account::UserAccountId;
|
|
|
|
|
|
|
@ -264,6 +264,28 @@ pub struct CharacterMaterials { |
|
|
|
pub tp: u32,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
pub struct CharacterKeyboardConfig {
|
|
|
|
pub keyboard: [u8; 0x16C],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl CharacterKeyboardConfig {
|
|
|
|
fn new() -> CharacterKeyboardConfig {
|
|
|
|
CharacterKeyboardConfig {
|
|
|
|
keyboard: DEFAULT_KEYBOARD_CONFIG1,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn update(&mut self, new_config: &KeyboardConfig) {
|
|
|
|
self.keyboard = new_config.keyboard_config;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn as_bytes(&self) -> [u8; 0x16C] {
|
|
|
|
self.keyboard
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Default, derive_more::Display)]
|
|
|
|
pub struct CharacterEntityId(pub u32);
|
|
|
|
|
|
|
|