3 #[mt_derive(to = "clt", repr = "str")]
13 #[mt_derive(to = "clt")]
15 #[mt(const_before = "4u8")] // version
16 pub max_hp: u16, // player only
17 pub collide_with_nodes: bool,
18 pub weight: f32, // deprecated
19 pub collision_box: RangeInclusive<[f32; 3]>,
20 pub selection_box: RangeInclusive<[f32; 3]>,
22 pub visual: ObjVisual,
23 pub visual_size: [f32; 3],
24 pub textures: Vec<String>,
25 pub sprite_sheet_size: [i16; 2], // in sprites
26 pub sprite_pos: [i16; 2], // in sprite sheet
28 pub make_footstep_sounds: bool,
29 pub rotate_speed: f32, // in radians per second
31 pub colors: Vec<Color>,
32 pub collide_with_objs: bool,
34 pub face_rotate_dir: bool,
35 pub face_rotate_dir_off: f32, // in degrees
36 pub backface_cull: bool,
38 pub nametag_color: Color,
39 pub face_rotate_speed: f32, // in degrees per second
41 pub itemstring: String,
43 pub max_breath: u16, // player only
44 pub eye_height: f32, // player only
45 pub zoom_fov: f32, // in degrees. player only
46 pub use_texture_alpha: bool,
47 pub dmg_texture_mod: String, // suffix
49 pub show_on_minimap: bool,
50 pub nametag_bg: Color,
53 #[mt_derive(to = "clt")]
59 pub interpolate: bool,
61 pub update_interval: f32,
64 #[mt_derive(to = "clt")]
65 pub struct ObjSprite {
68 pub frame_duration: f32,
69 pub view_angle_frames: bool,
72 #[mt_derive(to = "clt")]
80 #[mt_derive(to = "clt")]
81 pub struct ObjBonePos {
86 #[mt_derive(to = "clt")]
87 pub struct ObjAttach {
92 pub force_visible: bool,
95 #[mt_derive(to = "clt")]
96 pub struct ObjPhysicsOverride {
100 // the following are player only
102 pub no_sneak_glitch: bool,
106 pub const GENERIC_CAO: u8 = 101;
108 #[mt_derive(to = "clt", repr = "u8", tag = "type", content = "data")]
110 Props(Box<ObjProps>) = 0,
113 #[serde(rename = "mod")]
121 armor: HashMap<String, u16>,
129 PhysicsOverride(ObjPhysicsOverride),
131 #[mt(const_after = "GENERIC_CAO")]
139 #[mt_derive(to = "clt")]
140 pub struct ObjIdMsg {
146 #[mt_derive(to = "clt")]
147 pub struct ObjInitMsg(#[mt(size = "u32")] pub ObjMsg);
149 #[mt_derive(to = "clt")]
150 pub struct ObjInitData {
151 #[mt(const_before = "1u8")] // version
159 pub msgs: Vec<ObjInitMsg>,
162 #[mt_derive(to = "clt")]
165 #[mt(const_before = "GENERIC_CAO")]
167 pub init_data: ObjInitData,