subtr-actor 0.5.2

Rocket League replay transformer
Documentation
use crate::*;

use super::*;

impl StatFieldProvider for PositioningStats {
    fn visit_stat_fields(&self, visitor: &mut dyn FnMut(ExportedStat)) {
        visitor(ExportedStat::float(
            "positioning",
            "active_game_time",
            StatUnit::Seconds,
            self.active_game_time,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "avg_distance_to_ball",
            StatUnit::UnrealUnits,
            self.average_distance_to_ball(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "avg_distance_to_ball_possession",
            StatUnit::UnrealUnits,
            self.average_distance_to_ball_has_possession(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "avg_distance_to_ball_no_possession",
            StatUnit::UnrealUnits,
            self.average_distance_to_ball_no_possession(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "avg_distance_to_mates",
            StatUnit::UnrealUnits,
            self.average_distance_to_teammates(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_defensive_third",
            StatUnit::Seconds,
            self.time_defensive_zone,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_neutral_third",
            StatUnit::Seconds,
            self.time_neutral_zone,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_offensive_third",
            StatUnit::Seconds,
            self.time_offensive_zone,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_defensive_half",
            StatUnit::Seconds,
            self.time_defensive_half,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_offensive_half",
            StatUnit::Seconds,
            self.time_offensive_half,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_behind_ball",
            StatUnit::Seconds,
            self.time_behind_ball,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_level_with_ball",
            StatUnit::Seconds,
            self.time_level_with_ball,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_in_front_of_ball",
            StatUnit::Seconds,
            self.time_in_front_of_ball,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_demolished",
            StatUnit::Seconds,
            self.time_demolished,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_no_teammates",
            StatUnit::Seconds,
            self.time_no_teammates,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_most_back",
            StatUnit::Seconds,
            self.time_most_back,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_most_forward",
            StatUnit::Seconds,
            self.time_most_forward,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_mid_role",
            StatUnit::Seconds,
            self.time_mid_role,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_other_role",
            StatUnit::Seconds,
            self.time_other_role,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_closest_to_ball",
            StatUnit::Seconds,
            self.time_closest_to_ball,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "time_farthest_from_ball",
            StatUnit::Seconds,
            self.time_farthest_from_ball,
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_defensive_third",
            StatUnit::Percent,
            self.defensive_third_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_neutral_third",
            StatUnit::Percent,
            self.neutral_third_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_offensive_third",
            StatUnit::Percent,
            self.offensive_third_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_defensive_half",
            StatUnit::Percent,
            self.defensive_half_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_offensive_half",
            StatUnit::Percent,
            self.offensive_half_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_behind_ball",
            StatUnit::Percent,
            self.behind_ball_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_level_with_ball",
            StatUnit::Percent,
            self.level_with_ball_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_in_front_of_ball",
            StatUnit::Percent,
            self.in_front_of_ball_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_most_back",
            StatUnit::Percent,
            self.most_back_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_most_forward",
            StatUnit::Percent,
            self.most_forward_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_mid_role",
            StatUnit::Percent,
            self.mid_role_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_other_role",
            StatUnit::Percent,
            self.other_role_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_closest_to_ball",
            StatUnit::Percent,
            self.closest_to_ball_pct(),
        ));
        visitor(ExportedStat::float(
            "positioning",
            "percent_farthest_from_ball",
            StatUnit::Percent,
            self.farthest_from_ball_pct(),
        ));
        visitor(ExportedStat::unsigned(
            "positioning",
            "times_caught_ahead_of_play_on_conceded_goals",
            StatUnit::Count,
            self.times_caught_ahead_of_play_on_conceded_goals,
        ));
    }
}