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:
+4
-13
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user