// createGlobalExits.js
(function () {
/* global AdventureJS A */
var p = AdventureJS.Game.prototype;
/**
* Create global exits.
* @memberOf AdventureJS.Game
* @method AdventureJS.Game#createGlobalExits
* @kind function
*/
p.createGlobalExits = function Game_createGlobalExits() {
for (var i = 0; i < A.AssetDefinitions.Exits.length; i++) {
var precursor = A.AssetDefinitions.Exits[i];
precursor.class = "Exit";
precursor.id = `global_${precursor.direction}`;
precursor.name = `non-existent ${precursor.direction} exit`;
var description =
precursor.descriptions?.look || precursor.description || "";
let asset = this.game.createAsset(precursor).set({
is: {
global: true,
known: true,
seen: true,
placeholder: true,
},
descriptions: { look: description },
exclude_from_disambiguation: true,
});
}
};
})();