OnStart takes a script name, and OnFinale joins it
ci/woodpecker/push/woodpecker Pipeline was successful

The opening a game plays was the one piece of content that had to be
assembled in the wiring, because OnStart wanted an Action. It takes the
name of a registered Script now, so an opening is a Script like any
other, and Validate rejects a name that is not there.

OnFinale names the closing script and queues it straight after the start
one — what a "boot into the ending" debug flag wants.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-30 11:25:49 +02:00
co-authored by Claude Opus 5
parent 39af65f3c9
commit e26f7345c1
3 changed files with 42 additions and 8 deletions
+5 -2
View File
@@ -34,8 +34,11 @@ func Run(g *Game) error {
if s.OnEnter != nil {
seq = append(seq, s.OnEnter)
}
if g.onStart != nil {
seq = append(seq, g.onStart)
if g.onStart != "" {
seq = append(seq, RunScript(g.onStart))
}
if g.onFinale != "" {
seq = append(seq, RunScript(g.onFinale))
}
if len(seq) > 0 {
g.queueAction(Seq(seq...), "init")