import RoomBuilder from '../../engine/builders/room';

export default new RoomBuilder()
.withID("start")
.withTitle("The starting room")
.withFirstDescription(
`You set foot in your very first ever room.
You're not quite sure what you were supposed to expect, but it definitely wasn't this.
I mean who would expect a boring old room like this one? Ugh.
Just... make it stop. Please.`
)
.withDescription("The first room. Nothing special about it.")
.withExit("north", "tunnel_1")
.withExit("northwest", "tunnel_2")
.withEnterCallback(async function(context) {
    if (context.state.get("start.awoken")) return;
    const { output, wait } = context;
    context.enableCommandInput(false);
    output.say("You slowly wake up");
    await wait(5000);
    output.say("It's strange. You never used to be able to be conscious about the fact that you were waking up.");
    await wait(5000);
    output.say("Yet here we are.");
    context.enableCommandInput(true);
    context.state.set("start.awoken", true);
})
.withItem("stone")
.withItem("cup")
.withItem("torch")
.withAmbience("assets/cave1.wav")
.withMusic("assets/music1.wav")
.withImpulse("assets/Greek7EchoHall.wav")
.create();