1#[derive(Protocol, Debug, Clone, PartialEq)]
2pub struct Units {
3 pub unit_size: u32,
4 #[protocol(length_prefix(elements(unit_size)))]
5 pub unit_headers: Vec<UnitHeaders>,
6}
7
8#[derive(Protocol, Debug, Clone, PartialEq)]
9pub struct UnitHeaders {
10 pub exists: bool,
11 #[protocol(skip_if("!exists"))]
12 pub tasks_size: Option<TaskList>,
13}
14
15#[derive(Protocol, Debug, Clone, PartialEq)]
16pub struct TaskList {
17 pub size: i16,
18 #[protocol(length_prefix(elements(size)))]
19 pub tasks: Vec<Task>,
20}
21
22#[derive(Protocol, Debug, Clone, PartialEq)]
23pub struct Task {
24 pub task_type: i16,
25 pub id: i16,
26 pub is_default: u8,
27 pub action_type: i16,
28 pub class_id: i16,
29 pub unit_id: i16,
30 pub terrain_id: i16,
31 pub resource_in: i16,
32 pub resource_multiplier: i16,
33 pub resource_out: i16,
34 pub unused_resource: i16,
35 pub work_value1: f32,
36 pub work_value2: f32,
37 pub work_range: f32,
38 pub auto_search_targets: u8,
39 pub search_wait_time: f32,
40 pub enable_targeting: u8,
41 pub combat_level_flag: u8,
42 pub gather_type: i16,
43 pub work_flag2: i16,
44 pub target_diplomacy: u8,
45 pub carry_check: u8,
46 pub pick_for_construction: u8,
47 pub moving_graphic_id: i16,
48 pub proceeding_graphic_id: i16,
49 pub working_graphic_id: i16,
50 pub carrying_graphic_id: i16,
51 pub resource_gathering_sound_id: i16,
52 pub resource_deposit_sound_id: i16,
53 pub wwise_resource_gathering_sound_id: u32,
54 pub wwise_resource_deposit_sound_id: u32,
55}