diff --git a/src/entity/character.rs b/src/entity/character.rs index 599e01b..b47acc0 100644 --- a/src/entity/character.rs +++ b/src/entity/character.rs @@ -264,11 +264,19 @@ pub struct CharacterMaterials { pub tp: u32, } -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct CharacterKeyboardConfig { pub keyboard_config: [u8; 0x16C], } +impl Default for CharacterKeyboardConfig { + fn default() -> CharacterKeyboardConfig { + CharacterKeyboardConfig { + keyboard_config: DEFAULT_KEYBOARD_CONFIG1, + } + } +} + impl CharacterKeyboardConfig { fn new(preset: usize) -> CharacterKeyboardConfig { match preset { @@ -309,7 +317,7 @@ impl CharacterKeyboardConfig { } } -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct CharacterGamepadConfig { pub gamepad_config: [u8; 0x38], } diff --git a/src/ship/character.rs b/src/ship/character.rs index d4676c9..39064aa 100644 --- a/src/ship/character.rs +++ b/src/ship/character.rs @@ -82,7 +82,6 @@ impl<'a> CharacterBytesBuilder<'a> { } } - #[derive(Default)] pub struct FullCharacterBytesBuilder<'a> { character: Option<&'a CharacterEntity>, @@ -98,24 +97,6 @@ pub struct FullCharacterBytesBuilder<'a> { option_flags: Option, } -impl<'a> Default for FullCharacterBytesBuilder<'a> { - fn default() -> FullCharacterBytesBuilder<'a> { - FullCharacterBytesBuilder { - character: None, - stats: None, - level: None, - inventory: None, - bank: None, - keyboard_config: None, - gamepad_config: None, - symbol_chat: None, - tech_menu: None, - option_flags: None, - } - } -} - - impl<'a> FullCharacterBytesBuilder<'a> { #[must_use] pub fn character(self, character: &'a CharacterEntity) -> FullCharacterBytesBuilder<'a> {