MCPcopy
hub / github.com/4ian/GDevelop / declareFakeOptionallyAsyncAction

Function declareFakeOptionallyAsyncAction

GDevelop.js/TestUtils/TestExtensions.js:210–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208 declareFakeObjectWithAsyncAction();
209
210 const declareFakeOptionallyAsyncAction = () => {
211 const extension = new gd.PlatformExtension();
212 extension.setExtensionInformation(
213 'FakeOptionallyAsyncAction',
214 'Fake optionally async action',
215 'Fake optionally async action',
216 '',
217 'MIT'
218 );
219
220 extension
221 .addAction(
222 'DoOptionallyAsyncAction',
223 'Some optionally async action',
224 'Some optionally async action.',
225 'Optionally async action with _PARAM0_',
226 '',
227 'res/icon.png',
228 'res/icon.png'
229 )
230 .addParameter('expression', 'Wait time', '', false)
231 .getCodeExtraInformation()
232 .setFunctionName('gdjs.evtTools.runtimeScene.noop')
233 .setAsyncFunctionName('gdjs.evtTools.runtimeScene.wait');
234
235 platform.addNewExtension(extension);
236 extension.delete(); // Release the extension as it was copied inside gd.JsPlatform
237 };
238 declareFakeOptionallyAsyncAction();
239
240 const declareFakeBehaviorWithSharedData = () => {

Callers 1

TestExtensions.jsFile · 0.85

Calls 1

deleteMethod · 0.65

Tested by

no test coverage detected