}
set_error_text(text) {
- this.chat.append(this.chat_element("chatroom-error", "«error»", message));
+ this.chat.append(this.chat_element("chatroom-error", "«error»", text));
}
take_action(user_action, initialising) {
this.svg.append(this.chat_control);
this.container.append(this.svg);
- for (const user_action of this.actions) {
- this.take_action(user_action);
- }
this.chatroom_container = document.createElement("div");
this.chatroom_container.classList.add("embedded-chatroom");
- this.chatroom = new Chatroom(this.chatroom_container, summary, actions, username, send);
+ this.chatroom = new Chatroom(this.chatroom_container, summary, [], username, send);
+
+ for (const user_action of this.actions) {
+ this.take_action(user_action);
+ }
this.container.append(this.chatroom_container);
}
set_error_text(text) {
+ this.chatroom.set_error_text(text);
this.set_text("game-error", text);
}
}
take_action(user_action) {
+ this.chatroom.take_action(user_action);
switch (user_action.action.action) {
case "Join":
this.seats.set(user_action.username, user_action.action.seat);