Fix unit tests

This commit is contained in:
Sam 2022-10-20 18:19:33 -04:00
parent 5674923a54
commit 273949369f
4 changed files with 8 additions and 7 deletions

View File

@ -36,7 +36,7 @@ fn main() {
};
for skill in skills {
let prerequisites = SKILL_PREREQUISITES
.get(&skill)
.get(skill)
.map_or(Vec::new(), |p| p.iter().collect::<Vec<_>>());
let out_node = add_node(&mut graph, *skill);

View File

@ -1288,7 +1288,6 @@ impl MovementDirection {
}
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct AbilityInfo {
pub tool: Option<ToolKind>,
pub hand: Option<HandInfo>,

View File

@ -4,7 +4,7 @@ use common::{
combat::DamageKind,
comp::{
inventory::loadout_builder::LoadoutBuilder, item::tool::ToolKind, melee,
CharacterAbilityType, CharacterState, InputKind, Item,
CharacterAbilityType, CharacterState, Item,
},
states,
};
@ -238,9 +238,10 @@ fn empty_ability_info() -> states::utils::AbilityInfo {
states::utils::AbilityInfo {
tool: None,
hand: None,
input: InputKind::Primary,
input: None,
input_attr: None,
ability_meta: Default::default(),
ability: None,
return_ability: None,
}
}

View File

@ -2,8 +2,8 @@ use super::*;
use crate::audio::sfx::SfxEvent;
use common::{
comp::{
bird_large, humanoid, quadruped_medium, quadruped_small, Body, CharacterState, InputKind,
Ori, PhysicsState,
bird_large, humanoid, quadruped_medium, quadruped_small, Body, CharacterState, Ori,
PhysicsState,
},
states,
terrain::{Block, BlockKind},
@ -291,9 +291,10 @@ fn empty_ability_info() -> states::utils::AbilityInfo {
states::utils::AbilityInfo {
tool: None,
hand: None,
input: InputKind::Primary,
input: None,
input_attr: None,
ability_meta: Default::default(),
ability: None,
return_ability: None,
}
}