subtr_actor/stats/export/
positioning.rs1use crate::*;
2
3use super::*;
4
5impl StatFieldProvider for PositioningStats {
6 fn visit_stat_fields(&self, visitor: &mut dyn FnMut(ExportedStat)) {
7 visitor(ExportedStat::float(
8 "positioning",
9 "active_game_time",
10 StatUnit::Seconds,
11 self.active_game_time,
12 ));
13 visitor(ExportedStat::float(
14 "positioning",
15 "avg_distance_to_ball",
16 StatUnit::UnrealUnits,
17 self.average_distance_to_ball(),
18 ));
19 visitor(ExportedStat::float(
20 "positioning",
21 "avg_distance_to_ball_possession",
22 StatUnit::UnrealUnits,
23 self.average_distance_to_ball_has_possession(),
24 ));
25 visitor(ExportedStat::float(
26 "positioning",
27 "avg_distance_to_ball_no_possession",
28 StatUnit::UnrealUnits,
29 self.average_distance_to_ball_no_possession(),
30 ));
31 visitor(ExportedStat::float(
32 "positioning",
33 "avg_distance_to_mates",
34 StatUnit::UnrealUnits,
35 self.average_distance_to_teammates(),
36 ));
37 visitor(ExportedStat::float(
38 "positioning",
39 "time_defensive_third",
40 StatUnit::Seconds,
41 self.time_defensive_zone,
42 ));
43 visitor(ExportedStat::float(
44 "positioning",
45 "time_neutral_third",
46 StatUnit::Seconds,
47 self.time_neutral_zone,
48 ));
49 visitor(ExportedStat::float(
50 "positioning",
51 "time_offensive_third",
52 StatUnit::Seconds,
53 self.time_offensive_zone,
54 ));
55 visitor(ExportedStat::float(
56 "positioning",
57 "time_defensive_half",
58 StatUnit::Seconds,
59 self.time_defensive_half,
60 ));
61 visitor(ExportedStat::float(
62 "positioning",
63 "time_offensive_half",
64 StatUnit::Seconds,
65 self.time_offensive_half,
66 ));
67 visitor(ExportedStat::float(
68 "positioning",
69 "time_behind_ball",
70 StatUnit::Seconds,
71 self.time_behind_ball,
72 ));
73 visitor(ExportedStat::float(
74 "positioning",
75 "time_in_front_of_ball",
76 StatUnit::Seconds,
77 self.time_in_front_of_ball,
78 ));
79 visitor(ExportedStat::float(
80 "positioning",
81 "time_demolished",
82 StatUnit::Seconds,
83 self.time_demolished,
84 ));
85 visitor(ExportedStat::float(
86 "positioning",
87 "time_no_teammates",
88 StatUnit::Seconds,
89 self.time_no_teammates,
90 ));
91 visitor(ExportedStat::float(
92 "positioning",
93 "time_most_back",
94 StatUnit::Seconds,
95 self.time_most_back,
96 ));
97 visitor(ExportedStat::float(
98 "positioning",
99 "time_most_forward",
100 StatUnit::Seconds,
101 self.time_most_forward,
102 ));
103 visitor(ExportedStat::float(
104 "positioning",
105 "time_mid_role",
106 StatUnit::Seconds,
107 self.time_mid_role,
108 ));
109 visitor(ExportedStat::float(
110 "positioning",
111 "time_other_role",
112 StatUnit::Seconds,
113 self.time_other_role,
114 ));
115 visitor(ExportedStat::float(
116 "positioning",
117 "time_closest_to_ball",
118 StatUnit::Seconds,
119 self.time_closest_to_ball,
120 ));
121 visitor(ExportedStat::float(
122 "positioning",
123 "time_farthest_from_ball",
124 StatUnit::Seconds,
125 self.time_farthest_from_ball,
126 ));
127 visitor(ExportedStat::float(
128 "positioning",
129 "percent_defensive_third",
130 StatUnit::Percent,
131 self.defensive_third_pct(),
132 ));
133 visitor(ExportedStat::float(
134 "positioning",
135 "percent_neutral_third",
136 StatUnit::Percent,
137 self.neutral_third_pct(),
138 ));
139 visitor(ExportedStat::float(
140 "positioning",
141 "percent_offensive_third",
142 StatUnit::Percent,
143 self.offensive_third_pct(),
144 ));
145 visitor(ExportedStat::float(
146 "positioning",
147 "percent_defensive_half",
148 StatUnit::Percent,
149 self.defensive_half_pct(),
150 ));
151 visitor(ExportedStat::float(
152 "positioning",
153 "percent_offensive_half",
154 StatUnit::Percent,
155 self.offensive_half_pct(),
156 ));
157 visitor(ExportedStat::float(
158 "positioning",
159 "percent_behind_ball",
160 StatUnit::Percent,
161 self.behind_ball_pct(),
162 ));
163 visitor(ExportedStat::float(
164 "positioning",
165 "percent_in_front_of_ball",
166 StatUnit::Percent,
167 self.in_front_of_ball_pct(),
168 ));
169 visitor(ExportedStat::float(
170 "positioning",
171 "percent_most_back",
172 StatUnit::Percent,
173 self.most_back_pct(),
174 ));
175 visitor(ExportedStat::float(
176 "positioning",
177 "percent_most_forward",
178 StatUnit::Percent,
179 self.most_forward_pct(),
180 ));
181 visitor(ExportedStat::float(
182 "positioning",
183 "percent_mid_role",
184 StatUnit::Percent,
185 self.mid_role_pct(),
186 ));
187 visitor(ExportedStat::float(
188 "positioning",
189 "percent_other_role",
190 StatUnit::Percent,
191 self.other_role_pct(),
192 ));
193 visitor(ExportedStat::float(
194 "positioning",
195 "percent_closest_to_ball",
196 StatUnit::Percent,
197 self.closest_to_ball_pct(),
198 ));
199 visitor(ExportedStat::float(
200 "positioning",
201 "percent_farthest_from_ball",
202 StatUnit::Percent,
203 self.farthest_from_ball_pct(),
204 ));
205 visitor(ExportedStat::unsigned(
206 "positioning",
207 "times_caught_ahead_of_play_on_conceded_goals",
208 StatUnit::Count,
209 self.times_caught_ahead_of_play_on_conceded_goals,
210 ));
211 }
212}