horsegen: generate alternate races/saddles with ids
This commit is contained in:
@@ -7,15 +7,15 @@ import . "git.sunturtle.xyz/zephyr/horse/horse"
|
||||
|
||||
const (
|
||||
{{- range $r := $.Races }}
|
||||
Race{{ goenum $r.Name }}{{ if ne $r.Primary $r.ID }}Alternate{{ end }} RaceID = {{ $r.ID }} // {{ $r.Name }}
|
||||
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 ne $r.Primary $r.ID }}Alternate{{ end }}: {
|
||||
Race{{ goenum $r.Name }}{{ if $r.Alternate }}Alt{{ $r.ID }}{{ end }}: {
|
||||
ID: {{ $r.ID }},
|
||||
Name: {{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} + " (Alternate)"{{ end }},
|
||||
Name: {{ printf "%q" $r.Name }}{{ if $r.Alternate }} + " (Alternate {{ $r.ID }})"{{ end }},
|
||||
Thumbnail: {{ $r.ThumbnailID }},
|
||||
{{- if ne $r.Primary $r.ID }}
|
||||
Primary: {{ $r.Primary }},
|
||||
@@ -26,7 +26,7 @@ var AllRaces = map[RaceID]Race{
|
||||
|
||||
var RaceNameToID = map[string]RaceID{
|
||||
{{- range $r := $.Races }}
|
||||
{{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} + " (Alternate)"{{ end }}: {{ $r.ID }},
|
||||
{{ printf "%q" $r.Name }}{{ if $r.Alternate }} + " (Alternate {{ $r.ID }})"{{ end }}: {{ $r.ID }},
|
||||
{{- end }}
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user