The opening is a script now, not a slice in the wiring
ci/woodpecker/push/ebitengine Pipeline was successful
ci/woodpecker/push/ebitengine Pipeline was successful
bootOpening built its actions in boot.go and appended the finale by hand, which made the one thing a player sees first the only content not authored as content. inkwell's OnStart takes a script name now, so the opening moves to script.opening.go and boot names it. The -finale flag becomes OnFinale, the engine's hook for a closing script queued after the start one, so the branch is a hook rather than a slice append. bootOpening's start parameter had been dead for a while; it goes with the function. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -173,6 +173,24 @@ derives the selector's pins by reading the exit graph backwards. And a manager
|
||||
swapped in this way must be in place before `inkwell.Run`, which is where the
|
||||
engine wires up the parts that hold a registry directly.
|
||||
|
||||
### What runs at boot
|
||||
|
||||
`New` names two scripts and nothing else — the opening a player sees is content
|
||||
like every other script, in `script.opening.go`, not a slice built in the
|
||||
wiring:
|
||||
|
||||
```go
|
||||
g.StartAt(start)
|
||||
g.OnStart(ScriptOpening)
|
||||
if o.Finale {
|
||||
g.OnFinale(ScriptFinale)
|
||||
}
|
||||
```
|
||||
|
||||
`OnFinale` is the engine's hook for a closing script, queued straight after the
|
||||
opening. Here it is what `-finale` uses to drop into the ending, which is why it
|
||||
is set from `Opts` rather than always.
|
||||
|
||||
## The world
|
||||
|
||||
There is exactly one game, so there is exactly one world: `World`, a
|
||||
|
||||
Reference in New Issue
Block a user