summaryrefslogtreecommitdiff
path: root/server/src/entity/customers.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-25 15:30:09 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-25 15:55:00 +0200
commit9587d6b4d4389f6108e2be0ff5c0f4a495ff842d (patch)
tree3cc2ea9a93de6dd39acd5396fddfbadafef471cf /server/src/entity/customers.rs
parent64564a25db65d7a578fee537a0cf91db1a7dbc60 (diff)
downloadhurrycurry-9587d6b4d4389f6108e2be0ff5c0f4a495ff842d.tar
hurrycurry-9587d6b4d4389f6108e2be0ff5c0f4a495ff842d.tar.bz2
hurrycurry-9587d6b4d4389f6108e2be0ff5c0f4a495ff842d.tar.zst
player class decoupled from character id
Diffstat (limited to 'server/src/entity/customers.rs')
-rw-r--r--server/src/entity/customers.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/entity/customers.rs b/server/src/entity/customers.rs
index aaf6995f..388f7b26 100644
--- a/server/src/entity/customers.rs
+++ b/server/src/entity/customers.rs
@@ -18,6 +18,7 @@
use super::{bot::BotDriver, Entity, EntityContext};
use anyhow::Result;
use hurrycurry_bot::algos::Customer;
+use hurrycurry_protocol::PlayerClass;
use rand::random;
pub struct Customers {
@@ -53,7 +54,8 @@ impl Entity for Customers {
self.spawn_cooldown = 10. + random::<f32>() * 10.;
let bot = BotDriver::new(
"".to_string(),
- -1 - (random::<u16>() as i32),
+ random::<u16>() as i32,
+ PlayerClass::Customer,
Customer::default(),
);
self.customers.push(bot)