Files
horse/horsegen/scenario.go.template

23 lines
511 B
Plaintext

{{- define "go-scenario" -}}
package {{ $.Region }}
// Automatically generated with horsegen; DO NOT EDIT
import . "git.sunturtle.xyz/zephyr/horse/horse"
const (
{{- range $s := $.Scenarios }}
Scenario{{ goenum $s.Name }} ScenarioID = {{ $s.ID }} // {{ $s.Name }}
{{- end }}
)
var AllScenarios = map[ScenarioID]Scenario{
{{- range $s := $.Scenarios }}
Scenario{{ goenum $s.Name }}: {
ID: {{ $s.ID }},
Name: {{ printf "%q" $s.Name }},
Title: {{ printf "%q" $s.Title }},
},
{{- end }}
}
{{ end }}