aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-26 14:16:54 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-26 14:16:54 +0200
commit00c54b4594cd58504a7c93ac953ae6fe9f13c19a (patch)
tree1d0cd194d8a7ff6080fa6a12a387aa0b30c2bc66
parentaf1221c3e3ba55f99d3a5dc0983c67f3bdda525f (diff)
downloadhurrycurry-00c54b4594cd58504a7c93ac953ae6fe9f13c19a.tar
hurrycurry-00c54b4594cd58504a7c93ac953ae6fe9f13c19a.tar.bz2
hurrycurry-00c54b4594cd58504a7c93ac953ae6fe9f13c19a.tar.zst
random customer names
-rw-r--r--Cargo.lock17
-rw-r--r--server/Cargo.toml1
-rw-r--r--server/src/customer/mod.rs3
3 files changed, 20 insertions, 1 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c5f45322..256e5864 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -213,6 +213,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
[[package]]
+name = "deunicode"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00"
+
+[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -252,6 +258,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
+name = "fake"
+version = "2.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c25829bde82205da46e1823b2259db6273379f626fc211f126f65654a2669be"
+dependencies = [
+ "deunicode",
+ "rand 0.8.5",
+]
+
+[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -848,6 +864,7 @@ dependencies = [
"anyhow",
"clap",
"env_logger",
+ "fake",
"futures-util",
"glam",
"log",
diff --git a/server/Cargo.toml b/server/Cargo.toml
index 9b954908..f09bdf4e 100644
--- a/server/Cargo.toml
+++ b/server/Cargo.toml
@@ -18,3 +18,4 @@ serde_yaml = "0.9.34+deprecated"
rand = "0.9.0-alpha.1"
shlex = "1.3.0"
clap = { version = "4.5.7", features = ["derive"] }
+fake = "2.9.2"
diff --git a/server/src/customer/mod.rs b/server/src/customer/mod.rs
index 0b300b6e..7f32b094 100644
--- a/server/src/customer/mod.rs
+++ b/server/src/customer/mod.rs
@@ -25,6 +25,7 @@ use crate::{
state::State,
};
use anyhow::{anyhow, Result};
+use fake::{faker, Fake};
use glam::{IVec2, Vec2};
use log::{debug, error, warn};
use movement::MovementBase;
@@ -193,7 +194,7 @@ impl CustomerManager {
packets_out.push((
id,
PacketS::Join {
- name: "George".to_string(),
+ name: faker::name::fr_fr::Name().fake(),
character: -2,
},
));