diff options
Diffstat (limited to 'server/src/entity')
| -rw-r--r-- | server/src/entity/book.rs | 2 | ||||
| -rw-r--r-- | server/src/entity/campaign.rs | 4 | ||||
| -rw-r--r-- | server/src/entity/conveyor.rs | 4 | ||||
| -rw-r--r-- | server/src/entity/item_portal.rs | 4 | ||||
| -rw-r--r-- | server/src/entity/player_portal.rs | 4 | ||||
| -rw-r--r-- | server/src/entity/tutorial.rs | 18 |
6 files changed, 18 insertions, 18 deletions
diff --git a/server/src/entity/book.rs b/server/src/entity/book.rs index 4b87aa44..8daec972 100644 --- a/server/src/entity/book.rs +++ b/server/src/entity/book.rs @@ -18,7 +18,7 @@ use super::{Entity, EntityContext}; use anyhow::Result; use hurrycurry_locale::TrError; -use hurrycurry_protocol::{glam::IVec2, Menu, PacketC, PlayerID}; +use hurrycurry_protocol::{Menu, PacketC, PlayerID, glam::IVec2}; #[derive(Debug, Clone)] pub struct Book(pub IVec2); diff --git a/server/src/entity/campaign.rs b/server/src/entity/campaign.rs index fdc169d1..33baf631 100644 --- a/server/src/entity/campaign.rs +++ b/server/src/entity/campaign.rs @@ -19,10 +19,10 @@ use super::{Entity, EntityContext}; use crate::{scoreboard::ScoreboardStore, server::GameServerExt}; use anyhow::Result; use hurrycurry_data::entities::GateCondition; -use hurrycurry_locale::{trm, TrError}; +use hurrycurry_locale::{TrError, trm}; use hurrycurry_protocol::{ - glam::{IVec2, Vec2}, Message, PacketC, PlayerID, TileIndex, + glam::{IVec2, Vec2}, }; #[derive(Debug, Default, Clone)] diff --git a/server/src/entity/conveyor.rs b/server/src/entity/conveyor.rs index e31410e3..9534b045 100644 --- a/server/src/entity/conveyor.rs +++ b/server/src/entity/conveyor.rs @@ -17,8 +17,8 @@ */ use super::{Entity, EntityContext}; use crate::interaction::interact; -use anyhow::{anyhow, bail, Result}; -use hurrycurry_protocol::{glam::IVec2, ItemLocation}; +use anyhow::{Result, anyhow, bail}; +use hurrycurry_protocol::{ItemLocation, glam::IVec2}; #[derive(Debug, Clone)] pub struct Conveyor { diff --git a/server/src/entity/item_portal.rs b/server/src/entity/item_portal.rs index 6035331b..f0472802 100644 --- a/server/src/entity/item_portal.rs +++ b/server/src/entity/item_portal.rs @@ -17,8 +17,8 @@ */ use super::{Entity, EntityContext}; use crate::interaction::interact; -use anyhow::{bail, Result}; -use hurrycurry_protocol::{glam::IVec2, ItemLocation}; +use anyhow::{Result, bail}; +use hurrycurry_protocol::{ItemLocation, glam::IVec2}; #[derive(Debug, Default, Clone)] pub struct ItemPortal { diff --git a/server/src/entity/player_portal.rs b/server/src/entity/player_portal.rs index f70a2f95..1717002a 100644 --- a/server/src/entity/player_portal.rs +++ b/server/src/entity/player_portal.rs @@ -16,8 +16,8 @@ */ use super::{Entity, EntityContext}; -use anyhow::{anyhow, Result}; -use hurrycurry_protocol::{glam::Vec2, PacketC}; +use anyhow::{Result, anyhow}; +use hurrycurry_protocol::{PacketC, glam::Vec2}; #[derive(Debug, Default, Clone)] pub struct PlayerPortal { diff --git a/server/src/entity/tutorial.rs b/server/src/entity/tutorial.rs index bc4e3e7d..69086165 100644 --- a/server/src/entity/tutorial.rs +++ b/server/src/entity/tutorial.rs @@ -19,7 +19,7 @@ use super::{Entity, EntityContext}; use anyhow::Result; use hurrycurry_locale::{TrError, trm}; use hurrycurry_protocol::{ - glam::IVec2, ItemIndex, Message, PacketC, PlayerID, Recipe, RecipeIndex, TileIndex, + ItemIndex, Message, PacketC, PlayerID, Recipe, RecipeIndex, TileIndex, glam::IVec2, }; use log::{debug, warn}; @@ -297,10 +297,10 @@ impl StepContext<'_> { .. } => { for (pos, tile) in self.ent.game.tiles.iter().filter(|(_, t)| t.kind == *tile) { - if let Some(item) = &tile.item { - if item.kind == *input { - return Err((Some(*pos), trm!("s.tutorial.hold_interact"))); - } + if let Some(item) = &tile.item + && item.kind == *input + { + return Err((Some(*pos), trm!("s.tutorial.hold_interact"))); } } if let Some(pos) = self.find_tile(*tile) { @@ -322,10 +322,10 @@ impl StepContext<'_> { } => { for (_pos, tile) in self.ent.game.tiles.iter().filter(|(_, t)| t.kind == *tile) { - if let Some(item) = &tile.item { - if item.kind == *input { - return Err((None, trm!("s.tutorial.wait_finish"))); - } + if let Some(item) = &tile.item + && item.kind == *input + { + return Err((None, trm!("s.tutorial.wait_finish"))); } } if let Some(pos) = self.find_tile(*tile) { |