diff options
Diffstat (limited to 'server/src/entity/mod.rs')
-rw-r--r-- | server/src/entity/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index 044fccab..60f02d2a 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -23,6 +23,7 @@ pub mod customers; pub mod environment_effect; pub mod item_portal; pub mod player_portal; +pub mod tram; pub mod tutorial; use crate::{ @@ -45,6 +46,7 @@ use item_portal::ItemPortal; use player_portal::PlayerPortal; use serde::{Deserialize, Serialize}; use std::{any::Any, collections::VecDeque}; +use tram::Tram; pub type DynEntity = Box<dyn Entity + Send + Sync + 'static>; pub type Entities = Vec<DynEntity>; @@ -133,6 +135,11 @@ pub enum EntityDecl { location: Option<IVec2>, condition: GateCondition, }, + Tram { + length: usize, + character: Option<i32>, + points: Vec<Vec2>, + }, Book, } @@ -198,5 +205,10 @@ pub fn construct_entity( } EntityDecl::EnvironmentEffect(config) => Box::new(EnvironmentEffectController::new(config)), EntityDecl::Environment(names) => Box::new(EnvironmentController(names)), + EntityDecl::Tram { + length, + character, + points, + } => Box::new(Tram::new(character.unwrap_or(51), length, points)), }) } |