mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Formatting stuffs.
This commit is contained in:
parent
914d78b4a9
commit
d3d4ee8bb0
@ -319,11 +319,10 @@ impl TryFrom<(&Item, &AbilityMap, &MaterialStatManifest)> for ItemConfig {
|
||||
tool_default.unwrap_or_default()
|
||||
}
|
||||
} else if let Some(set) = tool_default {
|
||||
set.modified_by_tool(&tool, msm, &item.components)
|
||||
set.modified_by_tool(&tool, msm, &item.components)
|
||||
} else {
|
||||
error!(
|
||||
"No ability set defined for tool: {:?}, falling back to default ability \
|
||||
set.",
|
||||
"No ability set defined for tool: {:?}, falling back to default ability set.",
|
||||
tool.kind
|
||||
);
|
||||
Default::default()
|
||||
|
@ -11,6 +11,7 @@ use std::f32::consts::PI;
|
||||
pub struct AlphaAnimation;
|
||||
|
||||
impl Animation for AlphaAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
|
@ -11,6 +11,7 @@ use std::f32::consts::PI;
|
||||
pub struct BetaAnimation;
|
||||
|
||||
impl Animation for BetaAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
|
@ -77,6 +77,7 @@ impl Animation for BlinkAnimation {
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
#[allow(clippy::single_match)]
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Staff) => {
|
||||
next.head.orientation =
|
||||
|
@ -187,6 +187,7 @@ impl Animation for ShootAnimation {
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
#[allow(clippy::single_match)]
|
||||
match spec.as_str() {
|
||||
"Wendigo Magic" => {
|
||||
let (move1base, _move2base, move3) = match stage_section {
|
||||
|
@ -80,6 +80,7 @@ impl Animation for SpinMeleeAnimation {
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
#[allow(clippy::single_match)]
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Staff) => {
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * -0.3 + move2 * 0.5);
|
||||
|
@ -11,6 +11,7 @@ use std::f32::consts::PI;
|
||||
pub struct StunnedAnimation;
|
||||
|
||||
impl Animation for StunnedAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
@ -25,7 +26,9 @@ impl Animation for StunnedAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_stunned")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
((active_tool_kind, active_tool_spec), velocity, acc_vel, stage_section): Self::Dependency<'a>,
|
||||
((active_tool_kind, active_tool_spec), velocity, acc_vel, stage_section): Self::Dependency<
|
||||
'a,
|
||||
>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -81,6 +81,7 @@ impl Animation for SummonAnimation {
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
#[allow(clippy::single_match)]
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Staff) => {
|
||||
next.head.orientation = Quaternion::rotation_x(0.0);
|
||||
|
@ -8,6 +8,7 @@ use std::{f32::consts::PI, ops::Mul};
|
||||
pub struct WieldAnimation;
|
||||
|
||||
impl Animation for WieldAnimation {
|
||||
#[allow(clippy::type_complexity)]
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
|
@ -51,6 +51,7 @@ impl Animation for BetaAnimation {
|
||||
* Quaternion::rotation_z((0.4 + move1 * 1.5 + move2 * -2.5) * pullback);
|
||||
next.head.orientation = Quaternion::rotation_z(-0.4 + move1 * -1.0 + move2 * 1.5);
|
||||
}
|
||||
#[allow(clippy::single_match)]
|
||||
match hands {
|
||||
(Some(Hands::Two), _) | (None, Some(Hands::Two)) => match ability_info
|
||||
.and_then(|a| a.tool)
|
||||
@ -80,6 +81,7 @@ impl Animation for BetaAnimation {
|
||||
};
|
||||
|
||||
match hands {
|
||||
#[allow(clippy::single_match)]
|
||||
(Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) {
|
||||
Some(ToolKind::Sword) => {
|
||||
next.control_l.position = Vec3::new(-12.0, 8.0, 2.0);
|
||||
@ -95,6 +97,7 @@ impl Animation for BetaAnimation {
|
||||
(_, _) => {},
|
||||
};
|
||||
match hands {
|
||||
#[allow(clippy::single_match)]
|
||||
(None | Some(Hands::One), Some(Hands::One)) => {
|
||||
match ability_info.and_then(|a| a.tool) {
|
||||
Some(ToolKind::Sword) => {
|
||||
|
@ -81,6 +81,7 @@ impl Animation for ChargeswingAnimation {
|
||||
}
|
||||
|
||||
match hands {
|
||||
#[allow(clippy::single_match)]
|
||||
(Some(Hands::Two), _) | (None, Some(Hands::Two)) => match ability_info
|
||||
.and_then(|a| a.tool)
|
||||
{
|
||||
@ -113,6 +114,7 @@ impl Animation for ChargeswingAnimation {
|
||||
};
|
||||
|
||||
match hands {
|
||||
#[allow(clippy::single_match)]
|
||||
(Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) {
|
||||
Some(ToolKind::Hammer) => {
|
||||
next.control_l.position = Vec3::new(
|
||||
@ -133,6 +135,7 @@ impl Animation for ChargeswingAnimation {
|
||||
};
|
||||
|
||||
match hands {
|
||||
#[allow(clippy::single_match)]
|
||||
(None | Some(Hands::One), Some(Hands::One)) => {
|
||||
match ability_info.and_then(|a| a.tool) {
|
||||
Some(ToolKind::Hammer) => {
|
||||
|
@ -18,7 +18,9 @@ impl Animation for TalkAnimation {
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_active_tool_kind, _second_tool_kind, _velocity, _global_time, look_dir): Self::Dependency<'a>,
|
||||
(_active_tool_kind, _second_tool_kind, _velocity, _global_time, look_dir): Self::Dependency<
|
||||
'a,
|
||||
>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
Loading…
Reference in New Issue
Block a user