horsegen: generate koka id lists as public

This commit is contained in:
2026-02-26 19:15:43 -05:00
parent 7972bab46c
commit cf814c6c72
14 changed files with 14 additions and 15 deletions

View File

@@ -91,5 +91,4 @@ val global/trio-table = global/create-trio-table()
// Base affinity for a trio using the global ruleset.
pub fun global/trio-affinity(a: character-id, b: character-id, c: character-id): int
global/trio-table.at(a.index * {{ $.CharaCount }} * {{ $.CharaCount }} + b.index * {{ $.CharaCount }} + c.index).default(0)
{{- end }}
{{ end }}

View File

@@ -14,7 +14,7 @@ extern create-id-table(): vector<int>
c inline "int32_t arr[] = { {{- range $r := $.Races }}{{ $r.ID }},{{ end -}} };\nkk_vector_from_cint32array(arr, (kk_ssize_t){{ $.RaceCount }}, kk_context())"
js inline "[{{ range $r := $.Races }}{{ $r.ID }},{{ end }}]"
// Vector of all race IDs in order for easy iterating.
val all = once(create-id-table)
pub val all = once(create-id-table)
val name2id = once()
var m: rbmap<string, int> := empty()

View File

@@ -14,7 +14,7 @@ extern create-id-table(): vector<int>
c inline "int32_t arr[] = { {{- range $s := $.Saddles }}{{ $s.ID }},{{ end -}} };\nkk_vector_from_cint32array(arr, (kk_ssize_t){{ $.SaddleCount }}, kk_context())"
js inline "[{{ range $s := $.Saddles }}{{ $s.ID }},{{ end }}]"
// Vector of all saddle IDs in order for easy iterating.
val all = once(create-id-table)
pub val all = once(create-id-table)
// Get the name for a saddle.
// Alternate versions of saddles have an indication of their ID in their names.

View File

@@ -12,7 +12,7 @@ extern create-id-table(): vector<int>
c inline "int32_t arr[] = { {{- range $s := $.Scenarios }}{{ $s.ID }},{{ end -}} };\nkk_vector_from_cint32array(arr, (kk_ssize_t){{ $.ScenarioCount }}, kk_context())"
js inline "[{{ range $s := $.Scenarios }}{{ $s.ID }},{{ end }}]"
// Vector of all scenario IDs in order for easy iterating.
val all = once(create-id-table)
pub val all = once(create-id-table)
// Get the name for a scenario.
// If no scenario matches the ID, the result contains the numeric ID.

View File

@@ -16,7 +16,7 @@ extern create-id-table(): vector<int>
c inline "int32_t arr[] = { {{- range $s := $.Skills }}{{ $s.ID }},{{ end -}} };\nkk_vector_from_cint32array(arr, (kk_ssize_t){{ $.SkillCount }}, kk_context())"
js inline "[{{ range $s := $.Skills }}{{ $s.ID }},{{ end }}]"
// Vector of all skill ID values in order for easy iterating.
val all = once(create-id-table)
pub val all = once(create-id-table)
val name2id = once()
var m: rbmap<string, int> := empty()

View File

@@ -13,7 +13,7 @@ extern create-id-table(): vector<int>
c inline "int32_t arr[] = { {{- range $s := $.Sparks }}{{ $s.ID }},{{ end -}} };\nkk_vector_from_cint32array(arr, (kk_ssize_t){{ $.SparkCount }}, kk_context())"
js inline "[{{ range $s := $.Sparks }}{{ $s.ID }},{{ end }}]"
// Vector of all spark IDs in order for easy iterating.
val all = once(create-id-table)
pub val all = once(create-id-table)
// Get the name for a spark.
// The name does not indicate the spark level.

View File

@@ -14,7 +14,7 @@ extern create-id-table(): vector<int>
c inline "int32_t arr[] = { {{- range $uma := $.Umas }}{{ $uma.ID }},{{ end -}} };\nkk_vector_from_cint32array(arr, (kk_ssize_t){{ $.UmaCount }}, kk_context())"
js inline "[{{ range $uma := $.Umas }}{{ $uma.ID }},{{ end }}]"
// Vector of all Uma IDs in order for easy iterating.
val vall = once(create-id-table)
pub val all = once(create-id-table)
// Get the name for an Uma.
// The name includes the costume variant, e.g. `[Special Dreamer] Special Week`.