bve 0.0.1

Remaking OpenBVE using a modern architecture, using Unity and Rust.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use bve_derive::{FromKVPSection, FromKVPValue};

#[derive(Debug, Default, Clone, PartialEq, FromKVPSection)]
pub struct CarSection {
    #[kvp(rename = "object")]
    pub object_filename: Option<String>,
    pub length: f32,
    #[kvp(rename = "axles")]
    pub axle_positions: AxlePositions,
    pub reversed: bool,
    pub loading_sway: bool,
}

#[derive(Debug, Default, Clone, PartialEq, FromKVPValue)]
pub struct AxlePositions {
    pub rear: f32,
    pub front: f32,
}