dcl-npc-toolkit-ai-version
Version:
A collection of tools for creating Non-Player-Characters (NPCs). These are capable of having conversations with the player, and play different animations. AI usage is added atop of it
1 lines • 1.41 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.httpie={})}(this,(function(t){const{request:e}=require("https"),{globalAgent:o}=require("http"),{parse:n,resolve:s}=require("url");function r(t,e,o){(o=o||new Error(e.statusMessage)).statusMessage=e.statusMessage,o.statusCode=e.statusCode,o.headers=e.headers,o.data=e.data,t(o)}function a(t,d,i={}){return new Promise((u,p)=>{let c,f,h="",{redirect:b=!0}=i;i.method=t,d&&d.toJSON&&(d=d.toJSON()),Object.assign(i,"string"==typeof d?n(d):d),i.agent="http:"===i.protocol?o:void 0,c=e(i,e=>{if(e.statusCode>300&&b&&e.headers.location)return i.path=s(i.path,e.headers.location),a(t,i.path.startsWith("/")?i:i.path,i).then(u,p);e.on("data",t=>{h+=t}),e.on("end",()=>{if(f=e.headers["content-type"],f&&h&&f.includes("application/json"))try{h=JSON.parse(h,i.reviver)}catch(t){return r(p,e,t)}e.data=h,e.statusCode>=400?r(p,e):u(e)})}),c.on("timeout",c.abort),c.on("error",t=>{t.timeout=c.aborted,p(t)}),i.body&&(f="object"==typeof i.body&&!Buffer.isBuffer(i.body),f&&c.setHeader("content-type","application/json"),f=f?JSON.stringify(i.body):i.body,c.setHeader("content-length",Buffer.byteLength(f)),c.write(f)),c.end()})}const d=a.bind(a,"GET"),i=a.bind(a,"POST"),u=a.bind(a,"PATCH"),p=a.bind(a,"DELETE"),c=a.bind(a,"PUT");t.del=p,t.get=d,t.patch=u,t.post=i,t.put=c,t.send=a}));