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 "percent_first_man",
40 StatUnit::Percent,
41 self.first_man_pct(),
42 ));
43 visitor(ExportedStat::float(
44 "rotation",
45 "percent_second_man",
46 StatUnit::Percent,
47 self.second_man_pct(),
48 ));
49 visitor(ExportedStat::float(
50 "rotation",
51 "percent_third_man",
52 StatUnit::Percent,
53 self.third_man_pct(),
54 ));
55 visitor(ExportedStat::float(
56 "rotation",
57 "percent_ambiguous_role",
58 StatUnit::Percent,
59 self.ambiguous_role_pct(),
60 ));
61 visitor(ExportedStat::unsigned(
62 "rotation",
63 "first_man_stints",
64 StatUnit::Count,
65 self.first_man_stint_count,
66 ));
67 visitor(ExportedStat::float(
68 "rotation",
69 "longest_first_man_stint_time",
70 StatUnit::Seconds,
71 self.longest_first_man_stint_time,
72 ));
73 visitor(ExportedStat::float(
74 "rotation",
75 "avg_first_man_stint_time",
76 StatUnit::Seconds,
77 self.average_first_man_stint_time(),
78 ));
79 visitor(ExportedStat::unsigned(
80 "rotation",
81 "became_first_man",
82 StatUnit::Count,
83 self.became_first_man_count,
84 ));
85 visitor(ExportedStat::unsigned(
86 "rotation",
87 "lost_first_man",
88 StatUnit::Count,
89 self.lost_first_man_count,
90 ));
91 }
92}
93
94impl StatFieldProvider for RotationTeamStats {
95 fn visit_stat_fields(&self, visitor: &mut dyn FnMut(ExportedStat)) {
96 visitor(ExportedStat::unsigned(
97 "rotation",
98 "first_man_changes_for_team",
99 StatUnit::Count,
100 self.first_man_changes_for_team,
101 ));
102 visitor(ExportedStat::unsigned(
103 "rotation",
104 "rotation_count",
105 StatUnit::Count,
106 self.rotation_count,
107 ));
108 }
109}