aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/tutorial.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/entity/tutorial.rs')
-rw-r--r--server/src/entity/tutorial.rs18
1 files changed, 9 insertions, 9 deletions
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) {