OnStart takes a script name, and OnFinale joins it
ci/woodpecker/push/woodpecker Pipeline was successful
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:
+5
-2
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user