From c0b7131a5db1d6965b25a9b689ccf0d1a2f70f53 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 1 Oct 2024 17:52:41 +0200 Subject: customer scaling factor --- server/src/entity/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/src/entity/mod.rs') diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index 15e9b0d8..87656f0d 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -115,7 +115,9 @@ pub enum EntityDecl { from: Option, to: Vec2, }, - Customers {}, + Customers { + scaling_factor: Option, + }, Map { name: String, location: Option, @@ -185,9 +187,9 @@ pub fn construct_entity( blocker_tile: reg.register_tile("fence".to_string()), active: true, }), - EntityDecl::Customers {} => { + EntityDecl::Customers { scaling_factor } => { reg.register_item("unknown-order".to_owned()); - Box::new(Customers::new()?) + Box::new(Customers::new(scaling_factor.unwrap_or(0.5))?) } EntityDecl::EnvironmentEffect(config) => Box::new(EnvironmentEffectController::new(config)), EntityDecl::Environment(names) => Box::new(EnvironmentController(names)), -- cgit v1.2.3-70-g09d2