// createGlobalWalls.js
(function () {
/*global adventurejs A*/
var p = adventurejs.Game.prototype;
/**
* Create global walls.
* @memberOf adventurejs.Game
* @method adventurejs.Game#createGlobalWalls
* @kind function
*/
p.createGlobalWalls = function Game_createGlobalWalls() {
//console.warn( "globalWalls", this.globalWalls );
for (var i = 0; i < A.GlobalAssets.Walls.length; i++) {
var precursor = A.GlobalAssets.Walls[i];
precursor.class = "Wall";
precursor.id = `global_${precursor.direction}_wall`;
precursor.name = precursor.direction + " wall";
var description =
precursor.descriptions?.look || precursor.description || "";
let asset = this.game.createAsset(precursor).set({
class: "Wall",
descriptions: { look: description },
enabled: precursor.enabled,
is: {
global: true,
known: true,
seen: true,
},
});
// console.warn("id", asset.id, "name", asset.name);
}
};
})();