1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use crate::sim::materials::MaterialId; #[derive(Clone, Copy)] pub struct Cell { pub material: MaterialId, pub flags: u8, } impl Cell { pub fn void() -> Cell { Cell { material: MaterialId::Void, flags: 0, } } pub fn from_material(material: MaterialId) -> Cell { Cell { material, flags: 0 } } }