MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / constructor

Method constructor

src/actions/ShowImage.ts:54–66  ·  view source on GitHub ↗
([show, type, asset, ...props]: string[])

Source from the content-addressed store, hash-verified

52 image: string;
53
54 constructor([show, type, asset, ...props]: string[]) {
55 super();
56 this.asset = asset;
57
58 this.classes = (' ' + props.join(' ')).replace(' at ', ' ').replace(' with ', ' ').trim().split(' ');
59
60 const assetPath = this.engine.asset('images', asset);
61 if (typeof assetPath !== 'undefined') {
62 this.image = assetPath;
63 } else {
64 this.image = asset;
65 }
66 }
67
68 override async apply(): Promise<void> {
69 const position = (this._statement as string).match(/at\s(\S*)/);

Callers

nothing calls this directly

Calls 2

replaceMethod · 0.80
assetMethod · 0.80

Tested by

no test coverage detected