subtr_actor/stats/export/
rotation.rs1use crate::*;
2
3use super::*;
4
5impl StatFieldProvider for RotationPlayerStats {
6 fn visit_stat_fields(&self, visitor: &mut dyn FnMut(ExportedStat)) {
7 visitor(ExportedStat::float(
8 "rotation",
9 "active_game_time",
10 StatUnit::Seconds,
11 self.active_game_time,
12 ));
13 visitor(ExportedStat::float(
14 "rotation",
15 "time_first_man",
16 StatUnit::Seconds,
17 self.time_first_man,
18 ));
19 visitor(ExportedStat::float(
20 "rotation",
21 "time_second_man",
22 StatUnit::Seconds,
23 self.time_second_man,
24 ));
25 visitor(ExportedStat::float(
26 "rotation",
27 "time_third_man",
28 StatUnit::Seconds,
29 self.time_third_man,
30 ));
31 visitor(ExportedStat::float(
32 "rotation",
33 "time_ambiguous_role",
34 StatUnit::Seconds,
35 self.time_ambiguous_role,
36 ));
37 visitor(ExportedStat::float(
38 "rotation",
39 "time_behind_play",
40 StatUnit::Seconds,
41 self.time_behind_play,
42 ));
43 visitor(ExportedStat::float(
44 "rotation",
45 "time_level_with_play",
46 StatUnit::Seconds,
47 self.time_level_with_play,
48 ));
49 visitor(ExportedStat::float(
50 "rotation",
51 "time_ahead_of_play",
52 StatUnit::Seconds,
53 self.time_ahead_of_play,
54 ));
55 visitor(ExportedStat::float(
56 "rotation",
57 "percent_first_man",
58 StatUnit::Percent,
59 self.first_man_pct(),
60 ));
61 visitor(ExportedStat::float(
62 "rotation",
63 "percent_second_man",
64 StatUnit::Percent,
65 self.second_man_pct(),
66 ));
67 visitor(ExportedStat::float(
68 "rotation",
69 "percent_third_man",
70 StatUnit::Percent,
71 self.third_man_pct(),
72 ));
73 visitor(ExportedStat::float(
74 "rotation",
75 "percent_ambiguous_role",
76 StatUnit::Percent,
77 self.ambiguous_role_pct(),
78 ));
79 visitor(ExportedStat::float(
80 "rotation",
81 "percent_behind_play",
82 StatUnit::Percent,
83 self.behind_play_pct(),
84 ));
85 visitor(ExportedStat::float(
86 "rotation",
87 "percent_level_with_play",
88 StatUnit::Percent,
89 self.level_with_play_pct(),
90 ));
91 visitor(ExportedStat::float(
92 "rotation",
93 "percent_ahead_of_play",
94 StatUnit::Percent,
95 self.ahead_of_play_pct(),
96 ));
97 visitor(ExportedStat::unsigned(
98 "rotation",
99 "became_first_man",
100 StatUnit::Count,
101 self.became_first_man_count,
102 ));
103 visitor(ExportedStat::unsigned(
104 "rotation",
105 "lost_first_man",
106 StatUnit::Count,
107 self.lost_first_man_count,
108 ));
109 }
110}
111
112impl StatFieldProvider for RotationTeamStats {
113 fn visit_stat_fields(&self, visitor: &mut dyn FnMut(ExportedStat)) {
114 visitor(ExportedStat::unsigned(
115 "rotation",
116 "first_man_changes_for_team",
117 StatUnit::Count,
118 self.first_man_changes_for_team,
119 ));
120 visitor(ExportedStat::unsigned(
121 "rotation",
122 "rotation_count",
123 StatUnit::Count,
124 self.rotation_count,
125 ));
126 }
127}