{{/* gotype: github.com/JustaPenguin/assetto-server-manager.resultsViewTemplateVars */}} {{ define "title" }} {{ prettify $.Result.TrackName false }} {{ with $.Result.TrackConfig }} - {{ prettify . true }} {{ end }} Results ({{ $.Result.GetDate }}) {{ end }} {{ define "content" }}
{{ $sessionResults := .Result }} {{ $account := .Account }} {{ $useMPH := .UseMPH }}

{{ prettify $sessionResults.TrackName false }} {{ with $sessionResults.TrackConfig }} - {{ prettify . true }} {{ end }}

{{ if $sessionResults.IsTimeAttack }}Time Attack - {{ end }}{{ $sessionResults.GetDate }}
Back to Results
Overview
{{ with $sessionResults.ChampionshipID }} View Championship {{ end }} {{ with $sessionResults.RaceWeekendID }} View Race Weekend {{ end }} Open in Simresults Download as JSON
{{ template "session-overall" dict "sessionResults" $sessionResults "account" $account }}
{{ if gt (len $sessionResults.Events) 0 }}
{{ range $pos, $event := $sessionResults.Events }} {{ if $useMPH }} {{ else }} {{ end }} {{ end }}
# Driver Other Driver Type Impact Speed Relative Position World Position Show on Map
{{ add $pos 1 }} {{ if eq $event.Type "COLLISION_WITH_ENV" }} Collision with environment {{ else }} Collision with car {{ end }} {{ printf "%.1f" (multiplyFloats $event.ImpactSpeed 0.621371) }} MPH{{ printf "%.1f" $event.ImpactSpeed }} Km/h{{ $event.GetRelPosition }} {{ $event.GetWorldPosition }}
Car Env Rel
{{ $sessionResults.TrackName }} {{ $sessionResults.TrackName }} collisions
{{ else }}

There were no collisions in this session.

{{ end }}
{{ if WriteAccess }}

You can use this form to edit the names of the drivers in the results file. Note that the original results file will be overwritten.

{{ range $index, $car := $sessionResults.Result }}
{{ end }}
{{ end }}
{{ range $i, $sessionResult := .Result.Result }}
{{ add $i 1 }}{{ ordinal (add $i 1) }} {{ driverName $sessionResult.DriverName }} {{ if eq $sessionResult.DriverGUID "76561198256908075" }} (Ey up you Southern twit){{ end }} in {{ prettify $sessionResult.CarModel true }}
Best: {{ $bestLap := $sessionResults.GetTime $sessionResult.BestLap $sessionResult.DriverGUID $sessionResult.CarModel false }} {{ formatDuration $bestLap true }}, Potential: {{formatDuration ( $sessionResults.GetPotentialLap $sessionResult.DriverGUID $sessionResult.CarModel ) true }}
{{ if eq "RACE" $sessionResults.Type.OriginalString }} {{ end }} {{ range $z, $null := $sessionResults.GetNumSectors }} {{ end }} {{ $lapCount := 0}} {{ $averageLapTime := $sessionResults.GetAverageLapTime $sessionResult.DriverGUID $sessionResult.CarModel }} {{ range $y, $sessionLap := $sessionResults.Laps }} {{ if and (eq $sessionLap.DriverGUID $sessionResult.DriverGUID) (eq $sessionLap.CarModel $sessionResult.CarModel) }} {{ $lapCount = add $lapCount 1 }} {{ if eq "RACE" $sessionResults.Type.OriginalString }} {{ end }} {{ range $x, $null := $sessionResults.GetNumSectors }} {{ end }} {{ end }} {{ end }}
Lap #Race PositionLap TimeSector {{ add $z 1 }}Cuts Tyre
{{ $lapCount }}{{ $sessionResults.GetPosForLap $sessionResult.DriverGUID $sessionResult.CarModel $lapCount }} {{ formatDuration $sessionLap.GetLapTime true }} {{ if $sessionResults.IsFastestLap $sessionLap.LapTime $sessionLap.Cuts }}
L
{{ end }} {{ if $sessionResults.IsDriversFastestLap $sessionLap.DriverGUID $sessionLap.CarModel $sessionLap.LapTime $sessionLap.Cuts }}
L
{{ end }} {{ if $sessionLap.DidCheat $averageLapTime }}
C
{{ end }}
{{ formatDuration ($sessionLap.GetSector $x) true }} {{ if $sessionResults.IsFastestSector $x (index $sessionLap.Sectors $x) $sessionLap.Cuts }}
S
{{ end }} {{ if $sessionResults.IsDriversFastestSector $sessionLap.DriverGUID $sessionLap.CarModel $x (index $sessionLap.Sectors $x) $sessionLap.Cuts }}
S
{{ end }}
{{ $sessionLap.Cuts }} {{ $sessionLap.Tyre }}
{{ end }}
{{ end }}