horsegen: generate scenarios since sparks use them
This commit is contained in:
23
horsegen/scenario.go.template
Normal file
23
horsegen/scenario.go.template
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- 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 }}
|
||||
Reference in New Issue
Block a user