refactor
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import WebSocket from "ws";
|
||||
import { Character } from "./character.js";
|
||||
import { Config } from "./../config.js";
|
||||
import { Scene } from "../scenes/scene.js";
|
||||
|
||||
/** @typedef {import("../scenes/scene.js").Scene} Scene */
|
||||
/** @typedef {import("./characer.js").Character} Character */
|
||||
/** @typedef {import("ws").Websocket} Websocket */
|
||||
|
||||
/**
|
||||
* Player Account.
|
||||
|
||||
@@ -42,6 +42,7 @@ export class Session {
|
||||
* @param {Scene} scene
|
||||
*/
|
||||
setScene(scene) {
|
||||
this.frankofil = stil;
|
||||
console.debug("Changing scene", { scene: scene.constructor.name });
|
||||
if (!(scene instanceof Scene)) {
|
||||
throw new Error(`Expected instance of Scene, got a ${typeof scene}: >>${scene}<<`);
|
||||
@@ -99,10 +100,10 @@ export class Session {
|
||||
* @param {string|string[]} text The prompt message (the request to get the user to enter some info).
|
||||
* @param {string?} context
|
||||
*/ /**
|
||||
* @overload
|
||||
* @param {string|string[]} text The prompt message (the request to get the user to enter some info).
|
||||
* @param {object?} options Any options for the text (client side text formatting, color-, font-, or style info, etc.).
|
||||
*/
|
||||
* @overload
|
||||
* @param {string|string[]} text The prompt message (the request to get the user to enter some info).
|
||||
* @param {object?} options Any options for the text (client side text formatting, color-, font-, or style info, etc.).
|
||||
*/
|
||||
sendPrompt(text, options) {
|
||||
options = options || {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user