diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-06 17:42:18 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-06 17:42:21 +0200 |
commit | b7a59798ea69b403b14de128bc505d9bcb29fa4c (patch) | |
tree | b6da1e5dbe2dd36680847ba3e23d7a959d871e70 /server/src/entity/mod.rs | |
parent | acaed50d58e28e4af2933c0666bb890c58046818 (diff) | |
download | hurrycurry-b7a59798ea69b403b14de128bc505d9bcb29fa4c.tar hurrycurry-b7a59798ea69b403b14de128bc505d9bcb29fa4c.tar.bz2 hurrycurry-b7a59798ea69b403b14de128bc505d9bcb29fa4c.tar.zst |
add tram entity, works badly
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)), }) } |