properly load techs

This commit is contained in:
jake 2020-10-26 00:01:05 -06:00
parent 3543cc5b5a
commit 174445c175

View File

@ -242,7 +242,7 @@ impl Into<CharacterEntity> for PgCharacter {
prop_y: self.prop_y, prop_y: self.prop_y,
}, },
techs: CharacterTechniques { techs: CharacterTechniques {
techs: self.techs.iter().enumerate().take(19).map(|(i, t)| (tech::Technique::from_value(i as u8), TechLevel(*t)) ).collect() techs: self.techs.iter().enumerate().take(19).filter(|(_, t)| **t != 0xFF).map(|(i, t)| (tech::Technique::from_value(i as u8), TechLevel(*t)) ).collect()
}, },
config: CharacterConfig { config: CharacterConfig {
raw_data: vec_to_array(self.config) raw_data: vec_to_array(self.config)