aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/mod.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-12-12 15:23:02 +0100
committermetamuffin <metamuffin@disroot.org>2025-12-12 15:23:05 +0100
commit6c9e1480978e839692fa73f7e28639c3f95a36ee (patch)
treefa9abe65eb77ba9d4a87d1c6e65d2bff3bdbc071 /server/src/entity/mod.rs
parentbddafa18ad005cd68a413355a2d7b1952eb71ee6 (diff)
downloadhurrycurry-6c9e1480978e839692fa73f7e28639c3f95a36ee.tar
hurrycurry-6c9e1480978e839692fa73f7e28639c3f95a36ee.tar.bz2
hurrycurry-6c9e1480978e839692fa73f7e28639c3f95a36ee.tar.zst
Customizable customer spawn delay (close #522)
Diffstat (limited to 'server/src/entity/mod.rs')
-rw-r--r--server/src/entity/mod.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs
index 2c46a017..279826a9 100644
--- a/server/src/entity/mod.rs
+++ b/server/src/entity/mod.rs
@@ -126,9 +126,14 @@ pub fn construct_entity(decl: &EntityDecl) -> DynEntity {
blocker_tile,
active: true,
}),
- EntityDecl::Customers { scaling_factor, .. } => {
- Box::new(Customers::new(scaling_factor.unwrap_or(0.5)))
- }
+ EntityDecl::Customers {
+ scaling_factor,
+ spawn_cooldown,
+ ..
+ } => Box::new(Customers::new(
+ scaling_factor.unwrap_or(0.5),
+ spawn_cooldown.unwrap_or(5.),
+ )),
EntityDecl::EnvironmentEffect(config) => Box::new(EnvironmentEffectController::new(config)),
EntityDecl::Environment(names) => Box::new(EnvironmentController(names)),
EntityDecl::Tram {