3 #[mt_derive(to = "clt")]
5 #[mt(const8 = 4)] // version
6 pub max_hp: u16, // player only
7 pub collide_with_nodes: bool,
8 pub weight: f32, // deprecated
9 pub collision_box: ([f32; 3], [f32; 3]),
10 pub selection_box: ([f32; 3], [f32; 3]),
13 pub visual_size: [f32; 3],
14 pub textures: Vec<String>,
15 pub sprite_sheet_size: [i16; 2], // in sprites
16 pub sprite_pos: [i16; 2], // in sprite sheet
18 pub make_footstep_sounds: bool,
19 pub rotate_speed: f32, // in radians per second
21 pub colors: Vec<Color>,
22 pub collide_with_objs: bool,
24 pub face_rotate_dir: bool,
25 pub face_rotate_dir_off: f32, // in degrees
26 pub backface_cull: bool,
28 pub nametag_color: Color,
29 pub face_rotate_speed: f32, // in degrees per second
31 pub itemstring: String,
33 pub max_breath: u16, // player only
34 pub eye_height: f32, // player only
35 pub zoom_fov: f32, // in degrees. player only
36 pub use_texture_alpha: bool,
37 pub dmg_texture_mod: String, // suffix
39 pub show_on_minimap: bool,
40 pub nametag_bg: Color,
43 #[mt_derive(to = "clt")]
49 pub interpolate: bool,
51 pub update_interval: f32,
54 #[mt_derive(to = "clt")]
55 pub struct ObjSprite {
58 pub frame_duration: f32,
59 pub view_angle_frames: bool,
62 #[mt_derive(to = "clt")]
70 #[mt_derive(to = "clt")]
71 pub struct ObjBonePos {
76 #[mt_derive(to = "clt")]
77 pub struct ObjAttach {
82 pub force_visible: bool,
85 #[mt_derive(to = "clt")]
86 pub struct ObjPhysicsOverride {
90 // the following are player only
92 pub no_sneak_glitch: bool,
96 #[mt_derive(to = "clt", repr = "u8", tag = "type", content = "data")]
101 #[serde(rename = "mod")]
109 armor: HashMap<String, u16>,
117 PhysicsOverride(ObjPhysicsOverride),
120 #[mt(const8 = 101)] // GenericCAO
128 #[mt_derive(to = "clt")]
129 pub struct ObjIdMsg {
135 #[mt_derive(to = "clt")]
136 pub struct ObjInitMsg(#[mt(size32)] ObjMsg);
138 #[mt_derive(to = "clt")]
139 pub struct ObjInitData {
140 #[mt(const8 = 1)] // version
148 pub msgs: Vec<ObjInitMsg>,
151 #[mt_derive(to = "clt")]
154 #[mt(const8 = 101)] // GenericCAO
156 pub init_data: ObjInitData,
159 #[mt_derive(to = "clt", repr = "u8", enumset)]
160 pub enum MapBlockFlag {
167 pub const ALWAYS_LIT_FROM: u16 = 0xf000;
169 pub const CONTENT_UNKNOWN: u16 = 125;
170 pub const CONTENT_AIR: u16 = 126;
171 pub const CONTENT_IGNORE: u16 = 127;
173 #[mt_derive(to = "clt")]
174 pub struct MapBlock {
175 pub flags: EnumSet<MapBlockFlag>,
184 pub param12_size: (),
186 #[serde(with = "serde_arrays")]
187 pub param_0: [u16; 4096],
188 #[serde(with = "serde_arrays")]
189 pub param_1: [u8; 4096],
190 #[serde(with = "serde_arrays")]
191 pub param_2: [u8; 4096],
193 pub node_metas: HashMap<u16, NodeMeta>,