bl_save/data.rs
1/// A single brick in a save file, including extended attributes.
2#[derive(Debug, Clone)]
3pub struct Brick<S = String> {
4 /// Basic brick data excluding extended attributes.
5 pub base: BrickBase<S>,
6 /// Extra brick data associated with this brick but not supported by the
7 /// library.
8 pub unknown_extra: Vec<S>,
9}
10
11/// Basic brick data excluding extended attributes such as owner, events, etc.
12#[derive(Debug, Clone)]
13pub struct BrickBase<S = String> {
14 /// The `uiName` of the `fxDTSBrickData` datablock used by the brick.
15 pub ui_name: S,
16 /// The position of the brick.
17 pub position: (f32, f32, f32),
18 /// The rotation of the brick.
19 /// Valid values range from `0` through `3`.
20 pub angle: u8,
21 /// Whether the `fxDTSBrickData` datablock is a baseplate.
22 pub is_baseplate: bool,
23 /// Index into the colorset.
24 /// Valid values range from `0` through `63`.
25 pub color_index: u8,
26 /// Name of the print to use for print bricks. "" represents none.
27 pub print: S,
28 /// Color effect (such as glow, rainbow).
29 pub color_fx: u8,
30 /// Shape effect (such as undulo, water).
31 pub shape_fx: u8,
32 /// Whether the brick can be raycasted against.
33 pub raycasting: bool,
34 /// Whether objects collide with the brick.
35 pub collision: bool,
36 /// Whether the brick is visible.
37 pub rendering: bool,
38}