The opening is a script now, not a slice in the wiring
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:
2026-08-30 11:26:47 +02:00
co-authored by Claude Opus 5
parent 220985ec57
commit 258cbf85c0
7 changed files with 44 additions and 18 deletions
+4 -13
View File
@@ -50,18 +50,9 @@ func New(o Opts) *inkwell.Game {
registerUI()
g.StartAt(start)
g.OnStart(inkwell.Seq(bootOpening(start, o.Finale)...))
g.OnStart(ScriptOpening)
if o.Finale {
g.OnFinale(ScriptFinale)
}
return g
}
func bootOpening(start string, finale bool) []inkwell.Action {
acts := []inkwell.Action{
inkwell.SetFlag(FlagPoliceTip),
inkwell.Say(Paul, "Back alley. Just like the clerk said."),
TapeSay(Dex, "A government office tipped you off to remove something from a scene. That doesn't strike you as odd?"),
}
if finale {
acts = append(acts, inkwell.RunScript(ScriptFinale))
}
return acts
}
+1
View File
@@ -20,6 +20,7 @@ const (
)
const (
ScriptOpening = "opening"
ScriptTapeInsert = "tape_insert"
ScriptFinale = "awakening_finale"
)
+16
View File
@@ -0,0 +1,16 @@
package inc
import (
inkwell "git.teletypegames.org/engines/inkwell"
)
func init() {
ScriptManager.Register(Script{
Name: ScriptOpening,
Actions: inkwell.Seq(
inkwell.SetFlag(FlagPoliceTip),
inkwell.Say(Paul, "Back alley. Just like the clerk said."),
TapeSay(Dex, "A government office tipped you off to remove something from a scene. That doesn't strike you as odd?"),
),
})
}