Let the player enter a callsign, choose a department, and confirm the connection. The selected choice is a string label, not a numeric index.
terminal.clear();
const callsign = (await terminal.input("Operator callsign:")).trim() || "UNKNOWN";
const department = await terminal.choose("Select department:", ["Archive", "Comms", "Security"]);
if (await terminal.confirm(`Connect ${callsign} to ${department}?`)) {
await terminal.typeLine(`CONNECTED: ${callsign} / ${department}`);
audio.cue("success");
} else {
terminal.writeLine("Connection cancelled.");
}
The controller answers three prompts in sequence. Everyone watching sees the prompts
and answers. Yes prints the connection and plays a success cue; No prints
Connection cancelled. An empty callsign becomes UNKNOWN.
Uses terminal.input, terminal.choose, terminal.confirm, terminal.typeLine, and audio.cue. Input is public gameplay data.