@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.
1 lines • 3.56 kB
JavaScript
import {CachedMap}from'@drincs/pixi-vn';var o;(i=>(i.log=(r,...t)=>console.log(`[NQTR] ${r}`,...t),i.warn=(r,...t)=>console.warn(`[NQTR] ${r}`,...t),i.error=(r,...t)=>console.error(`[NQTR] ${r}`,...t),i.info=(r,...t)=>console.info(`[NQTR] ${r}`,...t)))(o||={});var f=new CachedMap({cacheSize:20}),h;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);continue}f.set(e.id,e);}}r.add=n;function a(t){try{let e=f.get(t);if(!e){console.warn(`[NQTR] Activity ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Activity ${t}`,e);return}}r.get=a;function c(){return Array.from(f.values())}r.values=c;function s(t){return f.has(t)}r.has=s;function i(){f.clear();}r.clear=i;})(h||={});var T=h;var m=new CachedMap({cacheSize:20}),A=new CachedMap({cacheSize:20}),R;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}m.set(e.id,e);}}r.add=n;function a(t){try{let e=m.get(t);if(!e){console.warn(`[NQTR] Commitment ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Commitment ${t}`,e);return}}r.get=a;function c(){return Array.from(m.values())}r.values=c;function s(t){return m.has(t)}r.has=s;function i(){m.clear(),A.clear();}r.clear=i;})(R||={});var $=R;var u=new CachedMap({cacheSize:20}),Q;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}u.set(e.id,e);}}r.add=n;function a(t){try{let e=u.get(t);if(!e){console.warn(`[NQTR] Location ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Location ${t}`,e);return}}r.get=a;function c(){return Array.from(u.values())}r.values=c;function s(t){return u.has(t)}r.has=s;function i(){u.clear();}r.clear=i;})(Q||={});var l=Q;var p=new CachedMap({cacheSize:20}),w;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}p.set(e.id,e);}}r.add=n;function a(t){try{let e=p.get(t);if(!e){console.warn(`[NQTR] Map ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Map ${t}`,e);return}}r.get=a;function c(){return Array.from(p.values())}r.values=c;function s(t){return p.has(t)}r.has=s;function i(){p.clear();}r.clear=i;})(w||={});var y=w;var d=new CachedMap({cacheSize:5}),C;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}d.set(e.id,e);}}r.add=n;function a(t){try{let e=d.get(t);if(!e){console.warn(`[NQTR] Quest ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Quest ${t}`,e);return}}r.get=a;function c(){return Array.from(d.values())}r.values=c;function s(t){return d.has(t)}r.has=s;function i(){d.clear();}r.clear=i;})(C||={});var S=C;var g=new CachedMap({cacheSize:20}),M;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}g.set(e.id,e);let x=e.location;l.add(x);let I=x?.map;I&&y.add(I);}}r.add=n;function a(t){try{let e=g.get(t);if(!e){console.warn(`[NQTR] Room ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Room ${t}`,e);return}}r.get=a;function c(){return Array.from(g.values())}r.values=c;function s(t){return g.has(t)}r.has=s;function i(){g.clear();}r.clear=i;})(M||={});var E=M;export{T as RegisteredActivities,$ as RegisteredCommitments,l as RegisteredLocations,y as RegisteredMaps,S as RegisteredQuests,E as RegisteredRooms,A as fixedCommitments,f as registeredActivities,m as registeredCommitments,u as registeredLocations,p as registeredMaps,d as registeredQuests,g as registeredRooms};