lib_curveball/map/
entity.rs1use crate::map::geometry::Brush;
6use crate::map::qmap::QEntity;
7use std::collections::HashMap;
8
9#[derive(Debug, Clone)]
11pub struct SimpleWorldspawn {
12 pub brushes: Vec<Brush>,
13}
14
15impl SimpleWorldspawn {
16 pub fn new(brushes: Vec<Brush>) -> Self {
17 Self { brushes }
18 }
19}
20
21impl From<SimpleWorldspawn> for QEntity {
22 fn from(item: SimpleWorldspawn) -> Self {
23 let mut parameters = HashMap::new();
24 parameters.insert(String::from("classname"), String::from("worldspawn"));
25 Self {
26 parameters,
27 brushes: item.brushes,
28 }
29 }
30}
31
32#[cfg(test)]
36mod tests {}