diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-10-19 23:50:23 +0200 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-10-19 23:50:23 +0200 |
| commit | ab83f982601d93b2399102c4d030fd6e13c4c735 (patch) | |
| tree | c0536ca9e328707d6b4f4cfc7a2307713466a5be /server/src/entity/customers.rs | |
| parent | 231a5ce21fcee9195fcc504ee672e4464d627c47 (diff) | |
| download | hurrycurry-ab83f982601d93b2399102c4d030fd6e13c4c735.tar hurrycurry-ab83f982601d93b2399102c4d030fd6e13c4c735.tar.bz2 hurrycurry-ab83f982601d93b2399102c4d030fd6e13c4c735.tar.zst | |
Refactor and move interaction code
Diffstat (limited to 'server/src/entity/customers.rs')
| -rw-r--r-- | server/src/entity/customers.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/src/entity/customers.rs b/server/src/entity/customers.rs index 1e795ac5..36afe24a 100644 --- a/server/src/entity/customers.rs +++ b/server/src/entity/customers.rs @@ -1,7 +1,3 @@ -use std::random::random; - -use crate::random_float; - /* Hurry Curry! - a game about cooking Copyright (C) 2025 Hurry Curry! Contributors @@ -20,9 +16,12 @@ use crate::random_float; */ use super::{Entity, EntityContext, bot::BotDriver}; +use crate::random_float; use anyhow::Result; use hurrycurry_bot::algos::{Customer, CustomerConfig}; +use hurrycurry_locale::TrError; use hurrycurry_protocol::{Character, PlayerClass}; +use std::random::random; pub struct Customers { customers: Vec<BotDriver<Customer>>, @@ -43,7 +42,7 @@ impl Customers { } impl Entity for Customers { - fn tick(&mut self, c: EntityContext) -> Result<()> { + fn tick(&mut self, c: EntityContext) -> Result<(), TrError> { let chairs = *self.chair_count.get_or_insert_with(|| { c.game .tiles |