horsegen: generate group -> skills relation

This commit is contained in:
2026-01-11 15:08:26 -05:00
parent 399f160718
commit be41389006
3 changed files with 278 additions and 3 deletions

View File

@@ -92,6 +92,13 @@ pub fip fun skill/order2(a: skill, b: skill): order2<skill>
pub fun skill/(==)(a: skill, b: skill): bool
a.skill-id == b.skill-id
// Get the skills in a skill group.
pub fun skill-group/skills(g: skill-group): list<skill>
match g
{{- range $g := $.Groups }}
{{ kkenum $g.Name }} -> [ {{- range $s := index $.Related $g.ID }}{{ kkenum $s.Name }}{{ if ne $s.InheritID 0 }}-Inherit{{ end }}, {{ end }}]
{{- end }}
// Get complete skill info.
pub fun skill/detail(^s: skill): skill-detail
match s