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

Method constructor

src/actions/Video.ts:122–137  ·  view source on GitHub ↗
([show, type, name, mode = 'modal', ...props]: string[])

Source from the content-addressed store, hash-verified

120 classes: string[];
121
122 constructor([show, type, name, mode = 'modal', ...props]: string[]) {
123 super();
124 this.mode = mode;
125 this.name = name;
126 this.props = props;
127
128 if (typeof this.engine.asset('videos', name) !== 'undefined') {
129 this.src = this.engine.asset('videos', name);
130 }
131
132 if (typeof props !== 'undefined') {
133 this.classes = ['animated', ...props.filter((item) => item !== 'with')];
134 } else {
135 this.classes = [];
136 }
137 }
138
139 override async willApply(): Promise<void> {
140 if (Video._configuration.modes.indexOf(this.mode) === -1) {

Callers

nothing calls this directly

Calls 1

assetMethod · 0.80

Tested by

no test coverage detected