Files
realworld/internal/content/script/tape_insert.go
T
mr.zero 45dac473fd
ci/woodpecker/push/ebitengine Pipeline was successful
game skeleton
2026-08-29 19:16:40 +02:00

32 lines
1012 B
Go

package script
import (
inkwell "git.teletypegames.org/engines/inkwell"
"git.teletypegames.org/games/realworld/internal/names"
"git.teletypegames.org/games/realworld/internal/world"
)
// tapeInsert runs whenever a tape goes into slot 2: it activates the tape and
// makes Dex comment. The wiki calls the comment mandatory — Dex remarks on
// every newly loaded tape, without exception.
func tapeInsert(w *world.World) inkwell.Script {
return inkwell.Script{
Name: names.ScriptTapeInsert,
Actions: inkwell.Seq(
world.Fn(func(ctx *inkwell.Ctx) {
item := w.TakePending()
if item == "" {
return
}
w.SetSlot2(item)
ctx.Game.Inventory.Remove(item)
ctx.Game.State.SetVar(names.VarArmillaStrip, "SLOT2: READING")
}),
inkwell.Say(names.Paul, "Right. Let's see who you are."),
world.TapeSay(names.Dex, "Clicked in. Spinning. And now: nothing."),
world.TapeSay(names.Dex, "A stranger's tape in your own Armilla, Paul. I hope you know what you're doing."),
),
}
}