aboutsummaryrefslogtreecommitdiff
path: root/server/src/interaction.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/interaction.rs')
-rw-r--r--server/src/interaction.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/src/interaction.rs b/server/src/interaction.rs
index 4630b536..2f58ed8f 100644
--- a/server/src/interaction.rs
+++ b/server/src/interaction.rs
@@ -1,3 +1,4 @@
+use hurrycurry_client_lib::{Involvement, Item};
/*
Hurry Curry! - a game about cooking
Copyright 2024 metamuffin
@@ -15,11 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-use crate::{
- data::Gamedata,
- game::{Involvement, Item},
-};
-use hurrycurry_protocol::{Recipe, Score, TileIndex};
+use hurrycurry_protocol::{Gamedata, Recipe, Score, TileIndex};
use log::info;
pub enum InteractEffect {
@@ -80,6 +77,7 @@ pub fn interact(
recipe: ri,
working: 1,
progress: 0.,
+ warn: false,
});
}
}
@@ -96,6 +94,7 @@ pub fn interact(
recipe: ri,
working: 1,
progress: 0.,
+ warn: false,
});
}
*this = Some(item);
@@ -180,11 +179,12 @@ pub fn tick_slot(
} else {
for (ri, recipe) in data.recipes() {
if recipe.supports_tile(tile) {
- if let Recipe::Passive { input, .. } = recipe {
+ if let Recipe::Passive { input, warn, .. } = recipe {
if *input == item.kind {
item.active = Some(Involvement {
recipe: ri,
progress: 0.,
+ warn: *warn,
working: 1,
});
return Some(TickEffect::Progress(recipe.warn()));