UNPKG

@drincs/nqtr

Version:

A complete system introducing the concepts of location, time and event, producing the framework of a not-quite-point-and-click adventure game.

2 lines 710 B
var r={};function u(t){try{let e=r[t];if(!e){console.error(`[NQTR] Quest ${t} not found`);return}return e}catch(e){console.error(`[NQTR] Error while getting Quest ${t}`,e);return}}var s=class{get quests(){return Object.values(r)}get startedQuests(){return this.quests.filter(e=>e.started)}get completedQuests(){return this.quests.filter(e=>e.completed)}get failedQuests(){return this.quests.filter(e=>e.failed)}get notStartedQuests(){return this.quests.filter(e=>!e.started)}find(e){return u(e)}startsStageMustBeStarted(e){Object.values(r).forEach(n=>{n.currentStageMustStart&&n.startCurrentStage(e);});}};export{s as default};//# sourceMappingURL=QuestManager.mjs.map //# sourceMappingURL=QuestManager.mjs.map