33 lines
876 B
Plaintext
33 lines
876 B
Plaintext
{{- define "go-race" -}}
|
|
package {{ $.Region }}
|
|
|
|
// Automatically generated with horsegen; DO NOT EDIT
|
|
|
|
import . "git.sunturtle.xyz/zephyr/horse/horse"
|
|
|
|
const (
|
|
{{- range $r := $.Races }}
|
|
Race{{ goenum $r.Name }}{{ if $r.Alternate }}Alt{{ $r.ID }}{{ end }} RaceID = {{ $r.ID }} // {{ $r.Name }}
|
|
{{- end }}
|
|
)
|
|
|
|
var AllRaces = map[RaceID]Race{
|
|
{{- range $r := $.Races }}
|
|
Race{{ goenum $r.Name }}{{ if $r.Alternate }}Alt{{ $r.ID }}{{ end }}: {
|
|
ID: {{ $r.ID }},
|
|
Name: {{ printf "%q" $r.Name }}{{ if $r.Alternate }} + " (Alternate {{ $r.ID }})"{{ end }},
|
|
Thumbnail: {{ $r.ThumbnailID }},
|
|
{{- if ne $r.Primary $r.ID }}
|
|
Primary: {{ $r.Primary }},
|
|
{{- end }}
|
|
},
|
|
{{- end }}
|
|
}
|
|
|
|
var RaceNameToID = map[string]RaceID{
|
|
{{- range $r := $.Races }}
|
|
{{ printf "%q" $r.Name }}{{ if $r.Alternate }} + " (Alternate {{ $r.ID }})"{{ end }}: {{ $r.ID }},
|
|
{{- end }}
|
|
}
|
|
{{ end }}
|