MCPcopy Index your code
hub / github.com/jabbany/CommentCoreLibrary / CCLScripter

Class CCLScripter

src/scripting/host/Host.ts:9–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7import { BridgedSandbox } from './BridgedSandbox.ts';
8
9export class CCLScripter implements IScripter {
10 public backendVersion:string = 'KagerouEngine/v1';
11 public frontendVersion:string = 'KagerouHost/v1';
12 public workerUrl:string;
13
14 /** Setup default logger **/
15 public logger:Logger = {
16 log:(msg:any) => { console.log(msg); },
17 error:(msg:any) => { console.error(msg); },
18 warn:(msg:any) => { console.warn(msg); }
19 };
20
21 constructor(url:string) {
22 this.workerUrl = url;
23 }
24
25 public getWorker():Worker {
26 return new Worker(this.workerUrl);
27 }
28
29 public getSandbox(stage:StageElement, player:IPlayer):BridgedSandbox {
30 return new BridgedSandbox(this, stage, player);
31 }
32}

Callers

nothing calls this directly

Calls 3

logMethod · 0.80
errorMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected