rearrage_stuff

This commit is contained in:
Kim Ravn Hansen
2025-09-16 11:26:40 +02:00
parent 40e8c5e0ab
commit 3f11ebe6dc
4937 changed files with 1146031 additions and 134 deletions

45
models/location.js Executable file
View File

@@ -0,0 +1,45 @@
import { Portal } from "./portal";
/**
* Location in the world.
*
* Can contain characters, quests, monsters, loot, NPCs and more.
*
* Can contain mundane portals (such as doors or pathways) to adjacent rooms/locations,
* or magical portals to distant locations.
*/
export class Location {
/** @protected @type string */
_id;
get id() {
return this._id;
}
/** @protected @type string */
_name;
get name() {
return this._name;
}
/** @protected @type string */
_description;
get description() {
return this._description;
}
/** @protected @type {Map<string,Portal>} */
_portals = new Map();
get portals() {
return this._portals;
}
/**
*/
constructor(id, name, description) {
this._id = id;
this._name = name;
this._description = description;
}
}
const l = new Location("foo", "bar", "baz");