diff options
author | metamuffin <metamuffin@noreply.codeberg.org> | 2024-12-25 19:05:05 +0000 |
---|---|---|
committer | metamuffin <metamuffin@noreply.codeberg.org> | 2024-12-25 19:05:05 +0000 |
commit | cc6b50debb9d5b740adbe6f803755413c972659a (patch) | |
tree | b34a0a5669707992f1334f88a1959d5b1e120415 /server/src/entity/tutorial.rs | |
parent | 2ceeea0e5fc245602618ec47f6ff1f91a094e130 (diff) | |
parent | 53cf167c08986caf346957d1f357cefaee1bd6b5 (diff) | |
download | hurrycurry-cc6b50debb9d5b740adbe6f803755413c972659a.tar hurrycurry-cc6b50debb9d5b740adbe6f803755413c972659a.tar.bz2 hurrycurry-cc6b50debb9d5b740adbe6f803755413c972659a.tar.zst |
Merge pull request 'Two-handed players' (#236) from two-handed into master
Reviewed-on: https://codeberg.org/hurrycurry/hurrycurry/pulls/236
Diffstat (limited to 'server/src/entity/tutorial.rs')
-rw-r--r-- | server/src/entity/tutorial.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/entity/tutorial.rs b/server/src/entity/tutorial.rs index 44244862..33c0e507 100644 --- a/server/src/entity/tutorial.rs +++ b/server/src/entity/tutorial.rs @@ -144,7 +144,7 @@ impl StepContext<'_> { .game .players .get(&self.player) - .is_some_and(|p| p.item.as_ref().is_some_and(|i| i.kind == item)) + .is_some_and(|p| p.items.iter().flatten().any(|i| i.kind == item)) } pub fn find_demand(&self, item: ItemIndex) -> Option<IVec2> { self.ent @@ -228,7 +228,7 @@ impl StepContext<'_> { .game .players .get(&self.player) - .is_some_and(|p| p.item.as_ref().is_some_and(|i| i.kind == item)) + .is_some_and(|p| p.items.iter().flatten().any(|i| i.kind == item)) { if let Some(pos) = self.find_demand(item) { Err((Some(pos), trm!("s.tutorial.serve"))) |