Actually split on new lines
parent
90d7fe9a81
commit
dd066f0aa3
|
@ -9,7 +9,10 @@ export default class Output {
|
||||||
|
|
||||||
say(string) {
|
say(string) {
|
||||||
const node = document.createElement("p");
|
const node = document.createElement("p");
|
||||||
node.appendChild(document.createTextNode(string));
|
string.split("\n").forEach((line) => {
|
||||||
|
node.appendChild(document.createTextNode(line));
|
||||||
|
node.appendChild(document.createElement("br"));
|
||||||
|
});
|
||||||
this.history.appendChild(node);
|
this.history.appendChild(node);
|
||||||
// this.tts.speak(string);
|
// this.tts.speak(string);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,12 @@ import RoomBuilder from '../../engine/builders/room';
|
||||||
export default new RoomBuilder()
|
export default new RoomBuilder()
|
||||||
.withID("start")
|
.withID("start")
|
||||||
.withTitle("The starting room")
|
.withTitle("The starting room")
|
||||||
.withFirstDescription("You set foot in your very first 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.")
|
.withDescription("The first room. Nothing special about it.")
|
||||||
.withExit("north", "tunnel_1")
|
.withExit("north", "tunnel_1")
|
||||||
.withEnterCallback(async function(context) {
|
.withEnterCallback(async function(context) {
|
||||||
|
|
Loading…
Reference in New Issue