factorio-types 0.0.50 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -3
- package/dist/classes.d.ts +4785 -1
- package/dist/core.d.ts +4 -4
- package/dist/defines.d.ts +816 -816
- package/dist/prototypes.d.ts +1 -1
- package/index.d.ts +1 -0
- package/package.json +13 -6
- package/tsconfig.base.json +15 -0
package/dist/classes.d.ts
CHANGED
|
@@ -269,6 +269,4790 @@ interface LuaBootstrap {
|
|
|
269
269
|
on_configuration_changed(this: void,
|
|
270
270
|
handler: (this: void, arg0: ConfigurationChangedData) => any | null): void
|
|
271
271
|
|
|
272
|
+
/**
|
|
273
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
274
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
275
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
276
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
277
|
+
* @example
|
|
278
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
279
|
+
* ```
|
|
280
|
+
* script.on_event(defines.events.on_tick,
|
|
281
|
+
* function(event) game.print(event.tick) end)
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
286
|
+
* ```
|
|
287
|
+
* script.on_event(defines.events.on_built_entity,
|
|
288
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
289
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
290
|
+
* ```
|
|
291
|
+
*
|
|
292
|
+
*/
|
|
293
|
+
on_event(this: void,
|
|
294
|
+
event: defines.events.on_ai_command_completed,
|
|
295
|
+
handler: (this: void, arg0: runtime.on_ai_command_completed) => any | null,
|
|
296
|
+
filters?: EventFilter): void
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
300
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
301
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
302
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
303
|
+
* @example
|
|
304
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
305
|
+
* ```
|
|
306
|
+
* script.on_event(defines.events.on_tick,
|
|
307
|
+
* function(event) game.print(event.tick) end)
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
312
|
+
* ```
|
|
313
|
+
* script.on_event(defines.events.on_built_entity,
|
|
314
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
315
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
316
|
+
* ```
|
|
317
|
+
*
|
|
318
|
+
*/
|
|
319
|
+
on_event(this: void,
|
|
320
|
+
event: defines.events.on_area_cloned,
|
|
321
|
+
handler: (this: void, arg0: runtime.on_area_cloned) => any | null,
|
|
322
|
+
filters?: EventFilter): void
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
326
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
327
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
328
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
329
|
+
* @example
|
|
330
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
331
|
+
* ```
|
|
332
|
+
* script.on_event(defines.events.on_tick,
|
|
333
|
+
* function(event) game.print(event.tick) end)
|
|
334
|
+
* ```
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
338
|
+
* ```
|
|
339
|
+
* script.on_event(defines.events.on_built_entity,
|
|
340
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
341
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
342
|
+
* ```
|
|
343
|
+
*
|
|
344
|
+
*/
|
|
345
|
+
on_event(this: void,
|
|
346
|
+
event: defines.events.on_biter_base_built,
|
|
347
|
+
handler: (this: void, arg0: runtime.on_biter_base_built) => any | null,
|
|
348
|
+
filters?: EventFilter): void
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
352
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
353
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
354
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
355
|
+
* @example
|
|
356
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
357
|
+
* ```
|
|
358
|
+
* script.on_event(defines.events.on_tick,
|
|
359
|
+
* function(event) game.print(event.tick) end)
|
|
360
|
+
* ```
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
364
|
+
* ```
|
|
365
|
+
* script.on_event(defines.events.on_built_entity,
|
|
366
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
367
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
368
|
+
* ```
|
|
369
|
+
*
|
|
370
|
+
*/
|
|
371
|
+
on_event(this: void,
|
|
372
|
+
event: defines.events.on_brush_cloned,
|
|
373
|
+
handler: (this: void, arg0: runtime.on_brush_cloned) => any | null,
|
|
374
|
+
filters?: EventFilter): void
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
378
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
379
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
380
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
381
|
+
* @example
|
|
382
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
383
|
+
* ```
|
|
384
|
+
* script.on_event(defines.events.on_tick,
|
|
385
|
+
* function(event) game.print(event.tick) end)
|
|
386
|
+
* ```
|
|
387
|
+
*
|
|
388
|
+
* @example
|
|
389
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
390
|
+
* ```
|
|
391
|
+
* script.on_event(defines.events.on_built_entity,
|
|
392
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
393
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
394
|
+
* ```
|
|
395
|
+
*
|
|
396
|
+
*/
|
|
397
|
+
on_event(this: void,
|
|
398
|
+
event: defines.events.on_build_base_arrived,
|
|
399
|
+
handler: (this: void, arg0: runtime.on_build_base_arrived) => any | null,
|
|
400
|
+
filters?: EventFilter): void
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
404
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
405
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
406
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
407
|
+
* @example
|
|
408
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
409
|
+
* ```
|
|
410
|
+
* script.on_event(defines.events.on_tick,
|
|
411
|
+
* function(event) game.print(event.tick) end)
|
|
412
|
+
* ```
|
|
413
|
+
*
|
|
414
|
+
* @example
|
|
415
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
416
|
+
* ```
|
|
417
|
+
* script.on_event(defines.events.on_built_entity,
|
|
418
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
419
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
420
|
+
* ```
|
|
421
|
+
*
|
|
422
|
+
*/
|
|
423
|
+
on_event(this: void,
|
|
424
|
+
event: defines.events.on_built_entity,
|
|
425
|
+
handler: (this: void, arg0: runtime.on_built_entity) => any | null,
|
|
426
|
+
filters?: EventFilter): void
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
430
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
431
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
432
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
433
|
+
* @example
|
|
434
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
435
|
+
* ```
|
|
436
|
+
* script.on_event(defines.events.on_tick,
|
|
437
|
+
* function(event) game.print(event.tick) end)
|
|
438
|
+
* ```
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
442
|
+
* ```
|
|
443
|
+
* script.on_event(defines.events.on_built_entity,
|
|
444
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
445
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
446
|
+
* ```
|
|
447
|
+
*
|
|
448
|
+
*/
|
|
449
|
+
on_event(this: void,
|
|
450
|
+
event: defines.events.on_cancelled_deconstruction,
|
|
451
|
+
handler: (this: void, arg0: runtime.on_cancelled_deconstruction) => any | null,
|
|
452
|
+
filters?: EventFilter): void
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
456
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
457
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
458
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
459
|
+
* @example
|
|
460
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
461
|
+
* ```
|
|
462
|
+
* script.on_event(defines.events.on_tick,
|
|
463
|
+
* function(event) game.print(event.tick) end)
|
|
464
|
+
* ```
|
|
465
|
+
*
|
|
466
|
+
* @example
|
|
467
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
468
|
+
* ```
|
|
469
|
+
* script.on_event(defines.events.on_built_entity,
|
|
470
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
471
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
472
|
+
* ```
|
|
473
|
+
*
|
|
474
|
+
*/
|
|
475
|
+
on_event(this: void,
|
|
476
|
+
event: defines.events.on_cancelled_upgrade,
|
|
477
|
+
handler: (this: void, arg0: runtime.on_cancelled_upgrade) => any | null,
|
|
478
|
+
filters?: EventFilter): void
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
482
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
483
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
484
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
485
|
+
* @example
|
|
486
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
487
|
+
* ```
|
|
488
|
+
* script.on_event(defines.events.on_tick,
|
|
489
|
+
* function(event) game.print(event.tick) end)
|
|
490
|
+
* ```
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
494
|
+
* ```
|
|
495
|
+
* script.on_event(defines.events.on_built_entity,
|
|
496
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
497
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
498
|
+
* ```
|
|
499
|
+
*
|
|
500
|
+
*/
|
|
501
|
+
on_event(this: void,
|
|
502
|
+
event: defines.events.on_character_corpse_expired,
|
|
503
|
+
handler: (this: void, arg0: runtime.on_character_corpse_expired) => any | null,
|
|
504
|
+
filters?: EventFilter): void
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
508
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
509
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
510
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
511
|
+
* @example
|
|
512
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
513
|
+
* ```
|
|
514
|
+
* script.on_event(defines.events.on_tick,
|
|
515
|
+
* function(event) game.print(event.tick) end)
|
|
516
|
+
* ```
|
|
517
|
+
*
|
|
518
|
+
* @example
|
|
519
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
520
|
+
* ```
|
|
521
|
+
* script.on_event(defines.events.on_built_entity,
|
|
522
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
523
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
524
|
+
* ```
|
|
525
|
+
*
|
|
526
|
+
*/
|
|
527
|
+
on_event(this: void,
|
|
528
|
+
event: defines.events.on_chart_tag_added,
|
|
529
|
+
handler: (this: void, arg0: runtime.on_chart_tag_added) => any | null,
|
|
530
|
+
filters?: EventFilter): void
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
534
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
535
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
536
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
537
|
+
* @example
|
|
538
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
539
|
+
* ```
|
|
540
|
+
* script.on_event(defines.events.on_tick,
|
|
541
|
+
* function(event) game.print(event.tick) end)
|
|
542
|
+
* ```
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
546
|
+
* ```
|
|
547
|
+
* script.on_event(defines.events.on_built_entity,
|
|
548
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
549
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
550
|
+
* ```
|
|
551
|
+
*
|
|
552
|
+
*/
|
|
553
|
+
on_event(this: void,
|
|
554
|
+
event: defines.events.on_chart_tag_modified,
|
|
555
|
+
handler: (this: void, arg0: runtime.on_chart_tag_modified) => any | null,
|
|
556
|
+
filters?: EventFilter): void
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
560
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
561
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
562
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
563
|
+
* @example
|
|
564
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
565
|
+
* ```
|
|
566
|
+
* script.on_event(defines.events.on_tick,
|
|
567
|
+
* function(event) game.print(event.tick) end)
|
|
568
|
+
* ```
|
|
569
|
+
*
|
|
570
|
+
* @example
|
|
571
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
572
|
+
* ```
|
|
573
|
+
* script.on_event(defines.events.on_built_entity,
|
|
574
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
575
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
576
|
+
* ```
|
|
577
|
+
*
|
|
578
|
+
*/
|
|
579
|
+
on_event(this: void,
|
|
580
|
+
event: defines.events.on_chart_tag_removed,
|
|
581
|
+
handler: (this: void, arg0: runtime.on_chart_tag_removed) => any | null,
|
|
582
|
+
filters?: EventFilter): void
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
586
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
587
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
588
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
589
|
+
* @example
|
|
590
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
591
|
+
* ```
|
|
592
|
+
* script.on_event(defines.events.on_tick,
|
|
593
|
+
* function(event) game.print(event.tick) end)
|
|
594
|
+
* ```
|
|
595
|
+
*
|
|
596
|
+
* @example
|
|
597
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
598
|
+
* ```
|
|
599
|
+
* script.on_event(defines.events.on_built_entity,
|
|
600
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
601
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
602
|
+
* ```
|
|
603
|
+
*
|
|
604
|
+
*/
|
|
605
|
+
on_event(this: void,
|
|
606
|
+
event: defines.events.on_chunk_charted,
|
|
607
|
+
handler: (this: void, arg0: runtime.on_chunk_charted) => any | null,
|
|
608
|
+
filters?: EventFilter): void
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
612
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
613
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
614
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
615
|
+
* @example
|
|
616
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
617
|
+
* ```
|
|
618
|
+
* script.on_event(defines.events.on_tick,
|
|
619
|
+
* function(event) game.print(event.tick) end)
|
|
620
|
+
* ```
|
|
621
|
+
*
|
|
622
|
+
* @example
|
|
623
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
624
|
+
* ```
|
|
625
|
+
* script.on_event(defines.events.on_built_entity,
|
|
626
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
627
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
628
|
+
* ```
|
|
629
|
+
*
|
|
630
|
+
*/
|
|
631
|
+
on_event(this: void,
|
|
632
|
+
event: defines.events.on_chunk_deleted,
|
|
633
|
+
handler: (this: void, arg0: runtime.on_chunk_deleted) => any | null,
|
|
634
|
+
filters?: EventFilter): void
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
638
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
639
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
640
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
641
|
+
* @example
|
|
642
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
643
|
+
* ```
|
|
644
|
+
* script.on_event(defines.events.on_tick,
|
|
645
|
+
* function(event) game.print(event.tick) end)
|
|
646
|
+
* ```
|
|
647
|
+
*
|
|
648
|
+
* @example
|
|
649
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
650
|
+
* ```
|
|
651
|
+
* script.on_event(defines.events.on_built_entity,
|
|
652
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
653
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
654
|
+
* ```
|
|
655
|
+
*
|
|
656
|
+
*/
|
|
657
|
+
on_event(this: void,
|
|
658
|
+
event: defines.events.on_chunk_generated,
|
|
659
|
+
handler: (this: void, arg0: runtime.on_chunk_generated) => any | null,
|
|
660
|
+
filters?: EventFilter): void
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
664
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
665
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
666
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
667
|
+
* @example
|
|
668
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
669
|
+
* ```
|
|
670
|
+
* script.on_event(defines.events.on_tick,
|
|
671
|
+
* function(event) game.print(event.tick) end)
|
|
672
|
+
* ```
|
|
673
|
+
*
|
|
674
|
+
* @example
|
|
675
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
676
|
+
* ```
|
|
677
|
+
* script.on_event(defines.events.on_built_entity,
|
|
678
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
679
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
680
|
+
* ```
|
|
681
|
+
*
|
|
682
|
+
*/
|
|
683
|
+
on_event(this: void,
|
|
684
|
+
event: defines.events.on_combat_robot_expired,
|
|
685
|
+
handler: (this: void, arg0: runtime.on_combat_robot_expired) => any | null,
|
|
686
|
+
filters?: EventFilter): void
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
690
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
691
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
692
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
693
|
+
* @example
|
|
694
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
695
|
+
* ```
|
|
696
|
+
* script.on_event(defines.events.on_tick,
|
|
697
|
+
* function(event) game.print(event.tick) end)
|
|
698
|
+
* ```
|
|
699
|
+
*
|
|
700
|
+
* @example
|
|
701
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
702
|
+
* ```
|
|
703
|
+
* script.on_event(defines.events.on_built_entity,
|
|
704
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
705
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
706
|
+
* ```
|
|
707
|
+
*
|
|
708
|
+
*/
|
|
709
|
+
on_event(this: void,
|
|
710
|
+
event: defines.events.on_console_chat,
|
|
711
|
+
handler: (this: void, arg0: runtime.on_console_chat) => any | null,
|
|
712
|
+
filters?: EventFilter): void
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
716
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
717
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
718
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
719
|
+
* @example
|
|
720
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
721
|
+
* ```
|
|
722
|
+
* script.on_event(defines.events.on_tick,
|
|
723
|
+
* function(event) game.print(event.tick) end)
|
|
724
|
+
* ```
|
|
725
|
+
*
|
|
726
|
+
* @example
|
|
727
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
728
|
+
* ```
|
|
729
|
+
* script.on_event(defines.events.on_built_entity,
|
|
730
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
731
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
732
|
+
* ```
|
|
733
|
+
*
|
|
734
|
+
*/
|
|
735
|
+
on_event(this: void,
|
|
736
|
+
event: defines.events.on_console_command,
|
|
737
|
+
handler: (this: void, arg0: runtime.on_console_command) => any | null,
|
|
738
|
+
filters?: EventFilter): void
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
742
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
743
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
744
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
745
|
+
* @example
|
|
746
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
747
|
+
* ```
|
|
748
|
+
* script.on_event(defines.events.on_tick,
|
|
749
|
+
* function(event) game.print(event.tick) end)
|
|
750
|
+
* ```
|
|
751
|
+
*
|
|
752
|
+
* @example
|
|
753
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
754
|
+
* ```
|
|
755
|
+
* script.on_event(defines.events.on_built_entity,
|
|
756
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
757
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
758
|
+
* ```
|
|
759
|
+
*
|
|
760
|
+
*/
|
|
761
|
+
on_event(this: void,
|
|
762
|
+
event: defines.events.on_cutscene_cancelled,
|
|
763
|
+
handler: (this: void, arg0: runtime.on_cutscene_cancelled) => any | null,
|
|
764
|
+
filters?: EventFilter): void
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
768
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
769
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
770
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
771
|
+
* @example
|
|
772
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
773
|
+
* ```
|
|
774
|
+
* script.on_event(defines.events.on_tick,
|
|
775
|
+
* function(event) game.print(event.tick) end)
|
|
776
|
+
* ```
|
|
777
|
+
*
|
|
778
|
+
* @example
|
|
779
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
780
|
+
* ```
|
|
781
|
+
* script.on_event(defines.events.on_built_entity,
|
|
782
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
783
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
784
|
+
* ```
|
|
785
|
+
*
|
|
786
|
+
*/
|
|
787
|
+
on_event(this: void,
|
|
788
|
+
event: defines.events.on_cutscene_finished,
|
|
789
|
+
handler: (this: void, arg0: runtime.on_cutscene_finished) => any | null,
|
|
790
|
+
filters?: EventFilter): void
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
794
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
795
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
796
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
797
|
+
* @example
|
|
798
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
799
|
+
* ```
|
|
800
|
+
* script.on_event(defines.events.on_tick,
|
|
801
|
+
* function(event) game.print(event.tick) end)
|
|
802
|
+
* ```
|
|
803
|
+
*
|
|
804
|
+
* @example
|
|
805
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
806
|
+
* ```
|
|
807
|
+
* script.on_event(defines.events.on_built_entity,
|
|
808
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
809
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
810
|
+
* ```
|
|
811
|
+
*
|
|
812
|
+
*/
|
|
813
|
+
on_event(this: void,
|
|
814
|
+
event: defines.events.on_cutscene_started,
|
|
815
|
+
handler: (this: void, arg0: runtime.on_cutscene_started) => any | null,
|
|
816
|
+
filters?: EventFilter): void
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
820
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
821
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
822
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
823
|
+
* @example
|
|
824
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
825
|
+
* ```
|
|
826
|
+
* script.on_event(defines.events.on_tick,
|
|
827
|
+
* function(event) game.print(event.tick) end)
|
|
828
|
+
* ```
|
|
829
|
+
*
|
|
830
|
+
* @example
|
|
831
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
832
|
+
* ```
|
|
833
|
+
* script.on_event(defines.events.on_built_entity,
|
|
834
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
835
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
836
|
+
* ```
|
|
837
|
+
*
|
|
838
|
+
*/
|
|
839
|
+
on_event(this: void,
|
|
840
|
+
event: defines.events.on_cutscene_waypoint_reached,
|
|
841
|
+
handler: (this: void, arg0: runtime.on_cutscene_waypoint_reached) => any | null,
|
|
842
|
+
filters?: EventFilter): void
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
846
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
847
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
848
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
849
|
+
* @example
|
|
850
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
851
|
+
* ```
|
|
852
|
+
* script.on_event(defines.events.on_tick,
|
|
853
|
+
* function(event) game.print(event.tick) end)
|
|
854
|
+
* ```
|
|
855
|
+
*
|
|
856
|
+
* @example
|
|
857
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
858
|
+
* ```
|
|
859
|
+
* script.on_event(defines.events.on_built_entity,
|
|
860
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
861
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
862
|
+
* ```
|
|
863
|
+
*
|
|
864
|
+
*/
|
|
865
|
+
on_event(this: void,
|
|
866
|
+
event: defines.events.on_difficulty_settings_changed,
|
|
867
|
+
handler: (this: void, arg0: runtime.on_difficulty_settings_changed) => any | null,
|
|
868
|
+
filters?: EventFilter): void
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
872
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
873
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
874
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
875
|
+
* @example
|
|
876
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
877
|
+
* ```
|
|
878
|
+
* script.on_event(defines.events.on_tick,
|
|
879
|
+
* function(event) game.print(event.tick) end)
|
|
880
|
+
* ```
|
|
881
|
+
*
|
|
882
|
+
* @example
|
|
883
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
884
|
+
* ```
|
|
885
|
+
* script.on_event(defines.events.on_built_entity,
|
|
886
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
887
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
888
|
+
* ```
|
|
889
|
+
*
|
|
890
|
+
*/
|
|
891
|
+
on_event(this: void,
|
|
892
|
+
event: defines.events.on_entity_cloned,
|
|
893
|
+
handler: (this: void, arg0: runtime.on_entity_cloned) => any | null,
|
|
894
|
+
filters?: EventFilter): void
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
898
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
899
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
900
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
901
|
+
* @example
|
|
902
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
903
|
+
* ```
|
|
904
|
+
* script.on_event(defines.events.on_tick,
|
|
905
|
+
* function(event) game.print(event.tick) end)
|
|
906
|
+
* ```
|
|
907
|
+
*
|
|
908
|
+
* @example
|
|
909
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
910
|
+
* ```
|
|
911
|
+
* script.on_event(defines.events.on_built_entity,
|
|
912
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
913
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
914
|
+
* ```
|
|
915
|
+
*
|
|
916
|
+
*/
|
|
917
|
+
on_event(this: void,
|
|
918
|
+
event: defines.events.on_entity_color_changed,
|
|
919
|
+
handler: (this: void, arg0: runtime.on_entity_color_changed) => any | null,
|
|
920
|
+
filters?: EventFilter): void
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
924
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
925
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
926
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
927
|
+
* @example
|
|
928
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
929
|
+
* ```
|
|
930
|
+
* script.on_event(defines.events.on_tick,
|
|
931
|
+
* function(event) game.print(event.tick) end)
|
|
932
|
+
* ```
|
|
933
|
+
*
|
|
934
|
+
* @example
|
|
935
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
936
|
+
* ```
|
|
937
|
+
* script.on_event(defines.events.on_built_entity,
|
|
938
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
939
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
940
|
+
* ```
|
|
941
|
+
*
|
|
942
|
+
*/
|
|
943
|
+
on_event(this: void,
|
|
944
|
+
event: defines.events.on_entity_damaged,
|
|
945
|
+
handler: (this: void, arg0: runtime.on_entity_damaged) => any | null,
|
|
946
|
+
filters?: EventFilter): void
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
950
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
951
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
952
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
953
|
+
* @example
|
|
954
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
955
|
+
* ```
|
|
956
|
+
* script.on_event(defines.events.on_tick,
|
|
957
|
+
* function(event) game.print(event.tick) end)
|
|
958
|
+
* ```
|
|
959
|
+
*
|
|
960
|
+
* @example
|
|
961
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
962
|
+
* ```
|
|
963
|
+
* script.on_event(defines.events.on_built_entity,
|
|
964
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
965
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
966
|
+
* ```
|
|
967
|
+
*
|
|
968
|
+
*/
|
|
969
|
+
on_event(this: void,
|
|
970
|
+
event: defines.events.on_entity_destroyed,
|
|
971
|
+
handler: (this: void, arg0: runtime.on_entity_destroyed) => any | null,
|
|
972
|
+
filters?: EventFilter): void
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
976
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
977
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
978
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
979
|
+
* @example
|
|
980
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
981
|
+
* ```
|
|
982
|
+
* script.on_event(defines.events.on_tick,
|
|
983
|
+
* function(event) game.print(event.tick) end)
|
|
984
|
+
* ```
|
|
985
|
+
*
|
|
986
|
+
* @example
|
|
987
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
988
|
+
* ```
|
|
989
|
+
* script.on_event(defines.events.on_built_entity,
|
|
990
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
991
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
992
|
+
* ```
|
|
993
|
+
*
|
|
994
|
+
*/
|
|
995
|
+
on_event(this: void,
|
|
996
|
+
event: defines.events.on_entity_died,
|
|
997
|
+
handler: (this: void, arg0: runtime.on_entity_died) => any | null,
|
|
998
|
+
filters?: EventFilter): void
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1002
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1003
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1004
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1005
|
+
* @example
|
|
1006
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1007
|
+
* ```
|
|
1008
|
+
* script.on_event(defines.events.on_tick,
|
|
1009
|
+
* function(event) game.print(event.tick) end)
|
|
1010
|
+
* ```
|
|
1011
|
+
*
|
|
1012
|
+
* @example
|
|
1013
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1014
|
+
* ```
|
|
1015
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1016
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1017
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1018
|
+
* ```
|
|
1019
|
+
*
|
|
1020
|
+
*/
|
|
1021
|
+
on_event(this: void,
|
|
1022
|
+
event: defines.events.on_entity_logistic_slot_changed,
|
|
1023
|
+
handler: (this: void, arg0: runtime.on_entity_logistic_slot_changed) => any | null,
|
|
1024
|
+
filters?: EventFilter): void
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1028
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1029
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1030
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1031
|
+
* @example
|
|
1032
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1033
|
+
* ```
|
|
1034
|
+
* script.on_event(defines.events.on_tick,
|
|
1035
|
+
* function(event) game.print(event.tick) end)
|
|
1036
|
+
* ```
|
|
1037
|
+
*
|
|
1038
|
+
* @example
|
|
1039
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1040
|
+
* ```
|
|
1041
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1042
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1043
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1044
|
+
* ```
|
|
1045
|
+
*
|
|
1046
|
+
*/
|
|
1047
|
+
on_event(this: void,
|
|
1048
|
+
event: defines.events.on_entity_renamed,
|
|
1049
|
+
handler: (this: void, arg0: runtime.on_entity_renamed) => any | null,
|
|
1050
|
+
filters?: EventFilter): void
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1054
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1055
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1056
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1057
|
+
* @example
|
|
1058
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1059
|
+
* ```
|
|
1060
|
+
* script.on_event(defines.events.on_tick,
|
|
1061
|
+
* function(event) game.print(event.tick) end)
|
|
1062
|
+
* ```
|
|
1063
|
+
*
|
|
1064
|
+
* @example
|
|
1065
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1066
|
+
* ```
|
|
1067
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1068
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1069
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1070
|
+
* ```
|
|
1071
|
+
*
|
|
1072
|
+
*/
|
|
1073
|
+
on_event(this: void,
|
|
1074
|
+
event: defines.events.on_entity_settings_pasted,
|
|
1075
|
+
handler: (this: void, arg0: runtime.on_entity_settings_pasted) => any | null,
|
|
1076
|
+
filters?: EventFilter): void
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1080
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1081
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1082
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1083
|
+
* @example
|
|
1084
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1085
|
+
* ```
|
|
1086
|
+
* script.on_event(defines.events.on_tick,
|
|
1087
|
+
* function(event) game.print(event.tick) end)
|
|
1088
|
+
* ```
|
|
1089
|
+
*
|
|
1090
|
+
* @example
|
|
1091
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1092
|
+
* ```
|
|
1093
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1094
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1095
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1096
|
+
* ```
|
|
1097
|
+
*
|
|
1098
|
+
*/
|
|
1099
|
+
on_event(this: void,
|
|
1100
|
+
event: defines.events.on_entity_spawned,
|
|
1101
|
+
handler: (this: void, arg0: runtime.on_entity_spawned) => any | null,
|
|
1102
|
+
filters?: EventFilter): void
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1106
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1107
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1108
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1109
|
+
* @example
|
|
1110
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1111
|
+
* ```
|
|
1112
|
+
* script.on_event(defines.events.on_tick,
|
|
1113
|
+
* function(event) game.print(event.tick) end)
|
|
1114
|
+
* ```
|
|
1115
|
+
*
|
|
1116
|
+
* @example
|
|
1117
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1118
|
+
* ```
|
|
1119
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1120
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1121
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1122
|
+
* ```
|
|
1123
|
+
*
|
|
1124
|
+
*/
|
|
1125
|
+
on_event(this: void,
|
|
1126
|
+
event: defines.events.on_equipment_inserted,
|
|
1127
|
+
handler: (this: void, arg0: runtime.on_equipment_inserted) => any | null,
|
|
1128
|
+
filters?: EventFilter): void
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1132
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1133
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1134
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1135
|
+
* @example
|
|
1136
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1137
|
+
* ```
|
|
1138
|
+
* script.on_event(defines.events.on_tick,
|
|
1139
|
+
* function(event) game.print(event.tick) end)
|
|
1140
|
+
* ```
|
|
1141
|
+
*
|
|
1142
|
+
* @example
|
|
1143
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1144
|
+
* ```
|
|
1145
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1146
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1147
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1148
|
+
* ```
|
|
1149
|
+
*
|
|
1150
|
+
*/
|
|
1151
|
+
on_event(this: void,
|
|
1152
|
+
event: defines.events.on_equipment_removed,
|
|
1153
|
+
handler: (this: void, arg0: runtime.on_equipment_removed) => any | null,
|
|
1154
|
+
filters?: EventFilter): void
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1158
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1159
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1160
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1161
|
+
* @example
|
|
1162
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1163
|
+
* ```
|
|
1164
|
+
* script.on_event(defines.events.on_tick,
|
|
1165
|
+
* function(event) game.print(event.tick) end)
|
|
1166
|
+
* ```
|
|
1167
|
+
*
|
|
1168
|
+
* @example
|
|
1169
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1170
|
+
* ```
|
|
1171
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1172
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1173
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1174
|
+
* ```
|
|
1175
|
+
*
|
|
1176
|
+
*/
|
|
1177
|
+
on_event(this: void,
|
|
1178
|
+
event: defines.events.on_force_cease_fire_changed,
|
|
1179
|
+
handler: (this: void, arg0: runtime.on_force_cease_fire_changed) => any | null,
|
|
1180
|
+
filters?: EventFilter): void
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1184
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1185
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1186
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1187
|
+
* @example
|
|
1188
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1189
|
+
* ```
|
|
1190
|
+
* script.on_event(defines.events.on_tick,
|
|
1191
|
+
* function(event) game.print(event.tick) end)
|
|
1192
|
+
* ```
|
|
1193
|
+
*
|
|
1194
|
+
* @example
|
|
1195
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1196
|
+
* ```
|
|
1197
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1198
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1199
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1200
|
+
* ```
|
|
1201
|
+
*
|
|
1202
|
+
*/
|
|
1203
|
+
on_event(this: void,
|
|
1204
|
+
event: defines.events.on_force_created,
|
|
1205
|
+
handler: (this: void, arg0: runtime.on_force_created) => any | null,
|
|
1206
|
+
filters?: EventFilter): void
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1210
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1211
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1212
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1213
|
+
* @example
|
|
1214
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1215
|
+
* ```
|
|
1216
|
+
* script.on_event(defines.events.on_tick,
|
|
1217
|
+
* function(event) game.print(event.tick) end)
|
|
1218
|
+
* ```
|
|
1219
|
+
*
|
|
1220
|
+
* @example
|
|
1221
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1222
|
+
* ```
|
|
1223
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1224
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1225
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1226
|
+
* ```
|
|
1227
|
+
*
|
|
1228
|
+
*/
|
|
1229
|
+
on_event(this: void,
|
|
1230
|
+
event: defines.events.on_force_friends_changed,
|
|
1231
|
+
handler: (this: void, arg0: runtime.on_force_friends_changed) => any | null,
|
|
1232
|
+
filters?: EventFilter): void
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1236
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1237
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1238
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1239
|
+
* @example
|
|
1240
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1241
|
+
* ```
|
|
1242
|
+
* script.on_event(defines.events.on_tick,
|
|
1243
|
+
* function(event) game.print(event.tick) end)
|
|
1244
|
+
* ```
|
|
1245
|
+
*
|
|
1246
|
+
* @example
|
|
1247
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1248
|
+
* ```
|
|
1249
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1250
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1251
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1252
|
+
* ```
|
|
1253
|
+
*
|
|
1254
|
+
*/
|
|
1255
|
+
on_event(this: void,
|
|
1256
|
+
event: defines.events.on_force_reset,
|
|
1257
|
+
handler: (this: void, arg0: runtime.on_force_reset) => any | null,
|
|
1258
|
+
filters?: EventFilter): void
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1262
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1263
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1264
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1265
|
+
* @example
|
|
1266
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1267
|
+
* ```
|
|
1268
|
+
* script.on_event(defines.events.on_tick,
|
|
1269
|
+
* function(event) game.print(event.tick) end)
|
|
1270
|
+
* ```
|
|
1271
|
+
*
|
|
1272
|
+
* @example
|
|
1273
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1274
|
+
* ```
|
|
1275
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1276
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1277
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1278
|
+
* ```
|
|
1279
|
+
*
|
|
1280
|
+
*/
|
|
1281
|
+
on_event(this: void,
|
|
1282
|
+
event: defines.events.on_forces_merged,
|
|
1283
|
+
handler: (this: void, arg0: runtime.on_forces_merged) => any | null,
|
|
1284
|
+
filters?: EventFilter): void
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1288
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1289
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1290
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1291
|
+
* @example
|
|
1292
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1293
|
+
* ```
|
|
1294
|
+
* script.on_event(defines.events.on_tick,
|
|
1295
|
+
* function(event) game.print(event.tick) end)
|
|
1296
|
+
* ```
|
|
1297
|
+
*
|
|
1298
|
+
* @example
|
|
1299
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1300
|
+
* ```
|
|
1301
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1302
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1303
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1304
|
+
* ```
|
|
1305
|
+
*
|
|
1306
|
+
*/
|
|
1307
|
+
on_event(this: void,
|
|
1308
|
+
event: defines.events.on_forces_merging,
|
|
1309
|
+
handler: (this: void, arg0: runtime.on_forces_merging) => any | null,
|
|
1310
|
+
filters?: EventFilter): void
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1314
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1315
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1316
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1317
|
+
* @example
|
|
1318
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1319
|
+
* ```
|
|
1320
|
+
* script.on_event(defines.events.on_tick,
|
|
1321
|
+
* function(event) game.print(event.tick) end)
|
|
1322
|
+
* ```
|
|
1323
|
+
*
|
|
1324
|
+
* @example
|
|
1325
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1326
|
+
* ```
|
|
1327
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1328
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1329
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1330
|
+
* ```
|
|
1331
|
+
*
|
|
1332
|
+
*/
|
|
1333
|
+
on_event(this: void,
|
|
1334
|
+
event: defines.events.on_game_created_from_scenario,
|
|
1335
|
+
handler: (this: void, arg0: runtime.on_game_created_from_scenario) => any | null,
|
|
1336
|
+
filters?: EventFilter): void
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1340
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1341
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1342
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1343
|
+
* @example
|
|
1344
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1345
|
+
* ```
|
|
1346
|
+
* script.on_event(defines.events.on_tick,
|
|
1347
|
+
* function(event) game.print(event.tick) end)
|
|
1348
|
+
* ```
|
|
1349
|
+
*
|
|
1350
|
+
* @example
|
|
1351
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1352
|
+
* ```
|
|
1353
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1354
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1355
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1356
|
+
* ```
|
|
1357
|
+
*
|
|
1358
|
+
*/
|
|
1359
|
+
on_event(this: void,
|
|
1360
|
+
event: defines.events.on_gui_checked_state_changed,
|
|
1361
|
+
handler: (this: void, arg0: runtime.on_gui_checked_state_changed) => any | null,
|
|
1362
|
+
filters?: EventFilter): void
|
|
1363
|
+
|
|
1364
|
+
/**
|
|
1365
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1366
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1367
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1368
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1369
|
+
* @example
|
|
1370
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1371
|
+
* ```
|
|
1372
|
+
* script.on_event(defines.events.on_tick,
|
|
1373
|
+
* function(event) game.print(event.tick) end)
|
|
1374
|
+
* ```
|
|
1375
|
+
*
|
|
1376
|
+
* @example
|
|
1377
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1378
|
+
* ```
|
|
1379
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1380
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1381
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1382
|
+
* ```
|
|
1383
|
+
*
|
|
1384
|
+
*/
|
|
1385
|
+
on_event(this: void,
|
|
1386
|
+
event: defines.events.on_gui_click,
|
|
1387
|
+
handler: (this: void, arg0: runtime.on_gui_click) => any | null,
|
|
1388
|
+
filters?: EventFilter): void
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1392
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1393
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1394
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1395
|
+
* @example
|
|
1396
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1397
|
+
* ```
|
|
1398
|
+
* script.on_event(defines.events.on_tick,
|
|
1399
|
+
* function(event) game.print(event.tick) end)
|
|
1400
|
+
* ```
|
|
1401
|
+
*
|
|
1402
|
+
* @example
|
|
1403
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1404
|
+
* ```
|
|
1405
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1406
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1407
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1408
|
+
* ```
|
|
1409
|
+
*
|
|
1410
|
+
*/
|
|
1411
|
+
on_event(this: void,
|
|
1412
|
+
event: defines.events.on_gui_closed,
|
|
1413
|
+
handler: (this: void, arg0: runtime.on_gui_closed) => any | null,
|
|
1414
|
+
filters?: EventFilter): void
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1418
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1419
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1420
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1421
|
+
* @example
|
|
1422
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1423
|
+
* ```
|
|
1424
|
+
* script.on_event(defines.events.on_tick,
|
|
1425
|
+
* function(event) game.print(event.tick) end)
|
|
1426
|
+
* ```
|
|
1427
|
+
*
|
|
1428
|
+
* @example
|
|
1429
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1430
|
+
* ```
|
|
1431
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1432
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1433
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1434
|
+
* ```
|
|
1435
|
+
*
|
|
1436
|
+
*/
|
|
1437
|
+
on_event(this: void,
|
|
1438
|
+
event: defines.events.on_gui_confirmed,
|
|
1439
|
+
handler: (this: void, arg0: runtime.on_gui_confirmed) => any | null,
|
|
1440
|
+
filters?: EventFilter): void
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1444
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1445
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1446
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1447
|
+
* @example
|
|
1448
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1449
|
+
* ```
|
|
1450
|
+
* script.on_event(defines.events.on_tick,
|
|
1451
|
+
* function(event) game.print(event.tick) end)
|
|
1452
|
+
* ```
|
|
1453
|
+
*
|
|
1454
|
+
* @example
|
|
1455
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1456
|
+
* ```
|
|
1457
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1458
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1459
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1460
|
+
* ```
|
|
1461
|
+
*
|
|
1462
|
+
*/
|
|
1463
|
+
on_event(this: void,
|
|
1464
|
+
event: defines.events.on_gui_elem_changed,
|
|
1465
|
+
handler: (this: void, arg0: runtime.on_gui_elem_changed) => any | null,
|
|
1466
|
+
filters?: EventFilter): void
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1470
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1471
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1472
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1473
|
+
* @example
|
|
1474
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1475
|
+
* ```
|
|
1476
|
+
* script.on_event(defines.events.on_tick,
|
|
1477
|
+
* function(event) game.print(event.tick) end)
|
|
1478
|
+
* ```
|
|
1479
|
+
*
|
|
1480
|
+
* @example
|
|
1481
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1482
|
+
* ```
|
|
1483
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1484
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1485
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1486
|
+
* ```
|
|
1487
|
+
*
|
|
1488
|
+
*/
|
|
1489
|
+
on_event(this: void,
|
|
1490
|
+
event: defines.events.on_gui_hover,
|
|
1491
|
+
handler: (this: void, arg0: runtime.on_gui_hover) => any | null,
|
|
1492
|
+
filters?: EventFilter): void
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1496
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1497
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1498
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1499
|
+
* @example
|
|
1500
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1501
|
+
* ```
|
|
1502
|
+
* script.on_event(defines.events.on_tick,
|
|
1503
|
+
* function(event) game.print(event.tick) end)
|
|
1504
|
+
* ```
|
|
1505
|
+
*
|
|
1506
|
+
* @example
|
|
1507
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1508
|
+
* ```
|
|
1509
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1510
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1511
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1512
|
+
* ```
|
|
1513
|
+
*
|
|
1514
|
+
*/
|
|
1515
|
+
on_event(this: void,
|
|
1516
|
+
event: defines.events.on_gui_leave,
|
|
1517
|
+
handler: (this: void, arg0: runtime.on_gui_leave) => any | null,
|
|
1518
|
+
filters?: EventFilter): void
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1522
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1523
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1524
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1525
|
+
* @example
|
|
1526
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1527
|
+
* ```
|
|
1528
|
+
* script.on_event(defines.events.on_tick,
|
|
1529
|
+
* function(event) game.print(event.tick) end)
|
|
1530
|
+
* ```
|
|
1531
|
+
*
|
|
1532
|
+
* @example
|
|
1533
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1534
|
+
* ```
|
|
1535
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1536
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1537
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1538
|
+
* ```
|
|
1539
|
+
*
|
|
1540
|
+
*/
|
|
1541
|
+
on_event(this: void,
|
|
1542
|
+
event: defines.events.on_gui_location_changed,
|
|
1543
|
+
handler: (this: void, arg0: runtime.on_gui_location_changed) => any | null,
|
|
1544
|
+
filters?: EventFilter): void
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1548
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1549
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1550
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1551
|
+
* @example
|
|
1552
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1553
|
+
* ```
|
|
1554
|
+
* script.on_event(defines.events.on_tick,
|
|
1555
|
+
* function(event) game.print(event.tick) end)
|
|
1556
|
+
* ```
|
|
1557
|
+
*
|
|
1558
|
+
* @example
|
|
1559
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1560
|
+
* ```
|
|
1561
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1562
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1563
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1564
|
+
* ```
|
|
1565
|
+
*
|
|
1566
|
+
*/
|
|
1567
|
+
on_event(this: void,
|
|
1568
|
+
event: defines.events.on_gui_opened,
|
|
1569
|
+
handler: (this: void, arg0: runtime.on_gui_opened) => any | null,
|
|
1570
|
+
filters?: EventFilter): void
|
|
1571
|
+
|
|
1572
|
+
/**
|
|
1573
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1574
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1575
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1576
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1577
|
+
* @example
|
|
1578
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1579
|
+
* ```
|
|
1580
|
+
* script.on_event(defines.events.on_tick,
|
|
1581
|
+
* function(event) game.print(event.tick) end)
|
|
1582
|
+
* ```
|
|
1583
|
+
*
|
|
1584
|
+
* @example
|
|
1585
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1586
|
+
* ```
|
|
1587
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1588
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1589
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1590
|
+
* ```
|
|
1591
|
+
*
|
|
1592
|
+
*/
|
|
1593
|
+
on_event(this: void,
|
|
1594
|
+
event: defines.events.on_gui_selected_tab_changed,
|
|
1595
|
+
handler: (this: void, arg0: runtime.on_gui_selected_tab_changed) => any | null,
|
|
1596
|
+
filters?: EventFilter): void
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1600
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1601
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1602
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1603
|
+
* @example
|
|
1604
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1605
|
+
* ```
|
|
1606
|
+
* script.on_event(defines.events.on_tick,
|
|
1607
|
+
* function(event) game.print(event.tick) end)
|
|
1608
|
+
* ```
|
|
1609
|
+
*
|
|
1610
|
+
* @example
|
|
1611
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1612
|
+
* ```
|
|
1613
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1614
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1615
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1616
|
+
* ```
|
|
1617
|
+
*
|
|
1618
|
+
*/
|
|
1619
|
+
on_event(this: void,
|
|
1620
|
+
event: defines.events.on_gui_selection_state_changed,
|
|
1621
|
+
handler: (this: void, arg0: runtime.on_gui_selection_state_changed) => any | null,
|
|
1622
|
+
filters?: EventFilter): void
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1626
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1627
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1628
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1629
|
+
* @example
|
|
1630
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1631
|
+
* ```
|
|
1632
|
+
* script.on_event(defines.events.on_tick,
|
|
1633
|
+
* function(event) game.print(event.tick) end)
|
|
1634
|
+
* ```
|
|
1635
|
+
*
|
|
1636
|
+
* @example
|
|
1637
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1638
|
+
* ```
|
|
1639
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1640
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1641
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1642
|
+
* ```
|
|
1643
|
+
*
|
|
1644
|
+
*/
|
|
1645
|
+
on_event(this: void,
|
|
1646
|
+
event: defines.events.on_gui_switch_state_changed,
|
|
1647
|
+
handler: (this: void, arg0: runtime.on_gui_switch_state_changed) => any | null,
|
|
1648
|
+
filters?: EventFilter): void
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1652
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1653
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1654
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1655
|
+
* @example
|
|
1656
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1657
|
+
* ```
|
|
1658
|
+
* script.on_event(defines.events.on_tick,
|
|
1659
|
+
* function(event) game.print(event.tick) end)
|
|
1660
|
+
* ```
|
|
1661
|
+
*
|
|
1662
|
+
* @example
|
|
1663
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1664
|
+
* ```
|
|
1665
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1666
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1667
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1668
|
+
* ```
|
|
1669
|
+
*
|
|
1670
|
+
*/
|
|
1671
|
+
on_event(this: void,
|
|
1672
|
+
event: defines.events.on_gui_text_changed,
|
|
1673
|
+
handler: (this: void, arg0: runtime.on_gui_text_changed) => any | null,
|
|
1674
|
+
filters?: EventFilter): void
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1678
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1679
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1680
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1681
|
+
* @example
|
|
1682
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1683
|
+
* ```
|
|
1684
|
+
* script.on_event(defines.events.on_tick,
|
|
1685
|
+
* function(event) game.print(event.tick) end)
|
|
1686
|
+
* ```
|
|
1687
|
+
*
|
|
1688
|
+
* @example
|
|
1689
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1690
|
+
* ```
|
|
1691
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1692
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1693
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1694
|
+
* ```
|
|
1695
|
+
*
|
|
1696
|
+
*/
|
|
1697
|
+
on_event(this: void,
|
|
1698
|
+
event: defines.events.on_gui_value_changed,
|
|
1699
|
+
handler: (this: void, arg0: runtime.on_gui_value_changed) => any | null,
|
|
1700
|
+
filters?: EventFilter): void
|
|
1701
|
+
|
|
1702
|
+
/**
|
|
1703
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1704
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1705
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1706
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1707
|
+
* @example
|
|
1708
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1709
|
+
* ```
|
|
1710
|
+
* script.on_event(defines.events.on_tick,
|
|
1711
|
+
* function(event) game.print(event.tick) end)
|
|
1712
|
+
* ```
|
|
1713
|
+
*
|
|
1714
|
+
* @example
|
|
1715
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1716
|
+
* ```
|
|
1717
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1718
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1719
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1720
|
+
* ```
|
|
1721
|
+
*
|
|
1722
|
+
*/
|
|
1723
|
+
on_event(this: void,
|
|
1724
|
+
event: defines.events.on_land_mine_armed,
|
|
1725
|
+
handler: (this: void, arg0: runtime.on_land_mine_armed) => any | null,
|
|
1726
|
+
filters?: EventFilter): void
|
|
1727
|
+
|
|
1728
|
+
/**
|
|
1729
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1730
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1731
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1732
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1733
|
+
* @example
|
|
1734
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1735
|
+
* ```
|
|
1736
|
+
* script.on_event(defines.events.on_tick,
|
|
1737
|
+
* function(event) game.print(event.tick) end)
|
|
1738
|
+
* ```
|
|
1739
|
+
*
|
|
1740
|
+
* @example
|
|
1741
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1742
|
+
* ```
|
|
1743
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1744
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1745
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1746
|
+
* ```
|
|
1747
|
+
*
|
|
1748
|
+
*/
|
|
1749
|
+
on_event(this: void,
|
|
1750
|
+
event: defines.events.on_lua_shortcut,
|
|
1751
|
+
handler: (this: void, arg0: runtime.on_lua_shortcut) => any | null,
|
|
1752
|
+
filters?: EventFilter): void
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1756
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1757
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1758
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1759
|
+
* @example
|
|
1760
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1761
|
+
* ```
|
|
1762
|
+
* script.on_event(defines.events.on_tick,
|
|
1763
|
+
* function(event) game.print(event.tick) end)
|
|
1764
|
+
* ```
|
|
1765
|
+
*
|
|
1766
|
+
* @example
|
|
1767
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1768
|
+
* ```
|
|
1769
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1770
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1771
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1772
|
+
* ```
|
|
1773
|
+
*
|
|
1774
|
+
*/
|
|
1775
|
+
on_event(this: void,
|
|
1776
|
+
event: defines.events.on_marked_for_deconstruction,
|
|
1777
|
+
handler: (this: void, arg0: runtime.on_marked_for_deconstruction) => any | null,
|
|
1778
|
+
filters?: EventFilter): void
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1782
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1783
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1784
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1785
|
+
* @example
|
|
1786
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1787
|
+
* ```
|
|
1788
|
+
* script.on_event(defines.events.on_tick,
|
|
1789
|
+
* function(event) game.print(event.tick) end)
|
|
1790
|
+
* ```
|
|
1791
|
+
*
|
|
1792
|
+
* @example
|
|
1793
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1794
|
+
* ```
|
|
1795
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1796
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1797
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1798
|
+
* ```
|
|
1799
|
+
*
|
|
1800
|
+
*/
|
|
1801
|
+
on_event(this: void,
|
|
1802
|
+
event: defines.events.on_marked_for_upgrade,
|
|
1803
|
+
handler: (this: void, arg0: runtime.on_marked_for_upgrade) => any | null,
|
|
1804
|
+
filters?: EventFilter): void
|
|
1805
|
+
|
|
1806
|
+
/**
|
|
1807
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1808
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1809
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1810
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1811
|
+
* @example
|
|
1812
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1813
|
+
* ```
|
|
1814
|
+
* script.on_event(defines.events.on_tick,
|
|
1815
|
+
* function(event) game.print(event.tick) end)
|
|
1816
|
+
* ```
|
|
1817
|
+
*
|
|
1818
|
+
* @example
|
|
1819
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1820
|
+
* ```
|
|
1821
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1822
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1823
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1824
|
+
* ```
|
|
1825
|
+
*
|
|
1826
|
+
*/
|
|
1827
|
+
on_event(this: void,
|
|
1828
|
+
event: defines.events.on_market_item_purchased,
|
|
1829
|
+
handler: (this: void, arg0: runtime.on_market_item_purchased) => any | null,
|
|
1830
|
+
filters?: EventFilter): void
|
|
1831
|
+
|
|
1832
|
+
/**
|
|
1833
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1834
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1835
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1836
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1837
|
+
* @example
|
|
1838
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1839
|
+
* ```
|
|
1840
|
+
* script.on_event(defines.events.on_tick,
|
|
1841
|
+
* function(event) game.print(event.tick) end)
|
|
1842
|
+
* ```
|
|
1843
|
+
*
|
|
1844
|
+
* @example
|
|
1845
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1846
|
+
* ```
|
|
1847
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1848
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1849
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1850
|
+
* ```
|
|
1851
|
+
*
|
|
1852
|
+
*/
|
|
1853
|
+
on_event(this: void,
|
|
1854
|
+
event: defines.events.on_mod_item_opened,
|
|
1855
|
+
handler: (this: void, arg0: runtime.on_mod_item_opened) => any | null,
|
|
1856
|
+
filters?: EventFilter): void
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1860
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1861
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1862
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1863
|
+
* @example
|
|
1864
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1865
|
+
* ```
|
|
1866
|
+
* script.on_event(defines.events.on_tick,
|
|
1867
|
+
* function(event) game.print(event.tick) end)
|
|
1868
|
+
* ```
|
|
1869
|
+
*
|
|
1870
|
+
* @example
|
|
1871
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1872
|
+
* ```
|
|
1873
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1874
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1875
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1876
|
+
* ```
|
|
1877
|
+
*
|
|
1878
|
+
*/
|
|
1879
|
+
on_event(this: void,
|
|
1880
|
+
event: defines.events.on_permission_group_added,
|
|
1881
|
+
handler: (this: void, arg0: runtime.on_permission_group_added) => any | null,
|
|
1882
|
+
filters?: EventFilter): void
|
|
1883
|
+
|
|
1884
|
+
/**
|
|
1885
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1886
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1887
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1888
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1889
|
+
* @example
|
|
1890
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1891
|
+
* ```
|
|
1892
|
+
* script.on_event(defines.events.on_tick,
|
|
1893
|
+
* function(event) game.print(event.tick) end)
|
|
1894
|
+
* ```
|
|
1895
|
+
*
|
|
1896
|
+
* @example
|
|
1897
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1898
|
+
* ```
|
|
1899
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1900
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1901
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1902
|
+
* ```
|
|
1903
|
+
*
|
|
1904
|
+
*/
|
|
1905
|
+
on_event(this: void,
|
|
1906
|
+
event: defines.events.on_permission_group_deleted,
|
|
1907
|
+
handler: (this: void, arg0: runtime.on_permission_group_deleted) => any | null,
|
|
1908
|
+
filters?: EventFilter): void
|
|
1909
|
+
|
|
1910
|
+
/**
|
|
1911
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1912
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1913
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1914
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1915
|
+
* @example
|
|
1916
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1917
|
+
* ```
|
|
1918
|
+
* script.on_event(defines.events.on_tick,
|
|
1919
|
+
* function(event) game.print(event.tick) end)
|
|
1920
|
+
* ```
|
|
1921
|
+
*
|
|
1922
|
+
* @example
|
|
1923
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1924
|
+
* ```
|
|
1925
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1926
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1927
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1928
|
+
* ```
|
|
1929
|
+
*
|
|
1930
|
+
*/
|
|
1931
|
+
on_event(this: void,
|
|
1932
|
+
event: defines.events.on_permission_group_edited,
|
|
1933
|
+
handler: (this: void, arg0: runtime.on_permission_group_edited) => any | null,
|
|
1934
|
+
filters?: EventFilter): void
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1938
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1939
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1940
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1941
|
+
* @example
|
|
1942
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1943
|
+
* ```
|
|
1944
|
+
* script.on_event(defines.events.on_tick,
|
|
1945
|
+
* function(event) game.print(event.tick) end)
|
|
1946
|
+
* ```
|
|
1947
|
+
*
|
|
1948
|
+
* @example
|
|
1949
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1950
|
+
* ```
|
|
1951
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1952
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1953
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1954
|
+
* ```
|
|
1955
|
+
*
|
|
1956
|
+
*/
|
|
1957
|
+
on_event(this: void,
|
|
1958
|
+
event: defines.events.on_permission_string_imported,
|
|
1959
|
+
handler: (this: void, arg0: runtime.on_permission_string_imported) => any | null,
|
|
1960
|
+
filters?: EventFilter): void
|
|
1961
|
+
|
|
1962
|
+
/**
|
|
1963
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1964
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1965
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1966
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1967
|
+
* @example
|
|
1968
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1969
|
+
* ```
|
|
1970
|
+
* script.on_event(defines.events.on_tick,
|
|
1971
|
+
* function(event) game.print(event.tick) end)
|
|
1972
|
+
* ```
|
|
1973
|
+
*
|
|
1974
|
+
* @example
|
|
1975
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
1976
|
+
* ```
|
|
1977
|
+
* script.on_event(defines.events.on_built_entity,
|
|
1978
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
1979
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
1980
|
+
* ```
|
|
1981
|
+
*
|
|
1982
|
+
*/
|
|
1983
|
+
on_event(this: void,
|
|
1984
|
+
event: defines.events.on_picked_up_item,
|
|
1985
|
+
handler: (this: void, arg0: runtime.on_picked_up_item) => any | null,
|
|
1986
|
+
filters?: EventFilter): void
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1990
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
1991
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
1992
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
1993
|
+
* @example
|
|
1994
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
1995
|
+
* ```
|
|
1996
|
+
* script.on_event(defines.events.on_tick,
|
|
1997
|
+
* function(event) game.print(event.tick) end)
|
|
1998
|
+
* ```
|
|
1999
|
+
*
|
|
2000
|
+
* @example
|
|
2001
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2002
|
+
* ```
|
|
2003
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2004
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2005
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2006
|
+
* ```
|
|
2007
|
+
*
|
|
2008
|
+
*/
|
|
2009
|
+
on_event(this: void,
|
|
2010
|
+
event: defines.events.on_player_alt_reverse_selected_area,
|
|
2011
|
+
handler: (this: void, arg0: runtime.on_player_alt_reverse_selected_area) => any | null,
|
|
2012
|
+
filters?: EventFilter): void
|
|
2013
|
+
|
|
2014
|
+
/**
|
|
2015
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2016
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2017
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2018
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2019
|
+
* @example
|
|
2020
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2021
|
+
* ```
|
|
2022
|
+
* script.on_event(defines.events.on_tick,
|
|
2023
|
+
* function(event) game.print(event.tick) end)
|
|
2024
|
+
* ```
|
|
2025
|
+
*
|
|
2026
|
+
* @example
|
|
2027
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2028
|
+
* ```
|
|
2029
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2030
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2031
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2032
|
+
* ```
|
|
2033
|
+
*
|
|
2034
|
+
*/
|
|
2035
|
+
on_event(this: void,
|
|
2036
|
+
event: defines.events.on_player_alt_selected_area,
|
|
2037
|
+
handler: (this: void, arg0: runtime.on_player_alt_selected_area) => any | null,
|
|
2038
|
+
filters?: EventFilter): void
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2042
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2043
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2044
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2045
|
+
* @example
|
|
2046
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2047
|
+
* ```
|
|
2048
|
+
* script.on_event(defines.events.on_tick,
|
|
2049
|
+
* function(event) game.print(event.tick) end)
|
|
2050
|
+
* ```
|
|
2051
|
+
*
|
|
2052
|
+
* @example
|
|
2053
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2054
|
+
* ```
|
|
2055
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2056
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2057
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2058
|
+
* ```
|
|
2059
|
+
*
|
|
2060
|
+
*/
|
|
2061
|
+
on_event(this: void,
|
|
2062
|
+
event: defines.events.on_player_ammo_inventory_changed,
|
|
2063
|
+
handler: (this: void, arg0: runtime.on_player_ammo_inventory_changed) => any | null,
|
|
2064
|
+
filters?: EventFilter): void
|
|
2065
|
+
|
|
2066
|
+
/**
|
|
2067
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2068
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2069
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2070
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2071
|
+
* @example
|
|
2072
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2073
|
+
* ```
|
|
2074
|
+
* script.on_event(defines.events.on_tick,
|
|
2075
|
+
* function(event) game.print(event.tick) end)
|
|
2076
|
+
* ```
|
|
2077
|
+
*
|
|
2078
|
+
* @example
|
|
2079
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2080
|
+
* ```
|
|
2081
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2082
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2083
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2084
|
+
* ```
|
|
2085
|
+
*
|
|
2086
|
+
*/
|
|
2087
|
+
on_event(this: void,
|
|
2088
|
+
event: defines.events.on_player_armor_inventory_changed,
|
|
2089
|
+
handler: (this: void, arg0: runtime.on_player_armor_inventory_changed) => any | null,
|
|
2090
|
+
filters?: EventFilter): void
|
|
2091
|
+
|
|
2092
|
+
/**
|
|
2093
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2094
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2095
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2096
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2097
|
+
* @example
|
|
2098
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2099
|
+
* ```
|
|
2100
|
+
* script.on_event(defines.events.on_tick,
|
|
2101
|
+
* function(event) game.print(event.tick) end)
|
|
2102
|
+
* ```
|
|
2103
|
+
*
|
|
2104
|
+
* @example
|
|
2105
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2106
|
+
* ```
|
|
2107
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2108
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2109
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2110
|
+
* ```
|
|
2111
|
+
*
|
|
2112
|
+
*/
|
|
2113
|
+
on_event(this: void,
|
|
2114
|
+
event: defines.events.on_player_banned,
|
|
2115
|
+
handler: (this: void, arg0: runtime.on_player_banned) => any | null,
|
|
2116
|
+
filters?: EventFilter): void
|
|
2117
|
+
|
|
2118
|
+
/**
|
|
2119
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2120
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2121
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2122
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2123
|
+
* @example
|
|
2124
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2125
|
+
* ```
|
|
2126
|
+
* script.on_event(defines.events.on_tick,
|
|
2127
|
+
* function(event) game.print(event.tick) end)
|
|
2128
|
+
* ```
|
|
2129
|
+
*
|
|
2130
|
+
* @example
|
|
2131
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2132
|
+
* ```
|
|
2133
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2134
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2135
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2136
|
+
* ```
|
|
2137
|
+
*
|
|
2138
|
+
*/
|
|
2139
|
+
on_event(this: void,
|
|
2140
|
+
event: defines.events.on_player_built_tile,
|
|
2141
|
+
handler: (this: void, arg0: runtime.on_player_built_tile) => any | null,
|
|
2142
|
+
filters?: EventFilter): void
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2146
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2147
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2148
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2149
|
+
* @example
|
|
2150
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2151
|
+
* ```
|
|
2152
|
+
* script.on_event(defines.events.on_tick,
|
|
2153
|
+
* function(event) game.print(event.tick) end)
|
|
2154
|
+
* ```
|
|
2155
|
+
*
|
|
2156
|
+
* @example
|
|
2157
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2158
|
+
* ```
|
|
2159
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2160
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2161
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2162
|
+
* ```
|
|
2163
|
+
*
|
|
2164
|
+
*/
|
|
2165
|
+
on_event(this: void,
|
|
2166
|
+
event: defines.events.on_player_cancelled_crafting,
|
|
2167
|
+
handler: (this: void, arg0: runtime.on_player_cancelled_crafting) => any | null,
|
|
2168
|
+
filters?: EventFilter): void
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2172
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2173
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2174
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2175
|
+
* @example
|
|
2176
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2177
|
+
* ```
|
|
2178
|
+
* script.on_event(defines.events.on_tick,
|
|
2179
|
+
* function(event) game.print(event.tick) end)
|
|
2180
|
+
* ```
|
|
2181
|
+
*
|
|
2182
|
+
* @example
|
|
2183
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2184
|
+
* ```
|
|
2185
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2186
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2187
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2188
|
+
* ```
|
|
2189
|
+
*
|
|
2190
|
+
*/
|
|
2191
|
+
on_event(this: void,
|
|
2192
|
+
event: defines.events.on_player_changed_force,
|
|
2193
|
+
handler: (this: void, arg0: runtime.on_player_changed_force) => any | null,
|
|
2194
|
+
filters?: EventFilter): void
|
|
2195
|
+
|
|
2196
|
+
/**
|
|
2197
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2198
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2199
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2200
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2201
|
+
* @example
|
|
2202
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2203
|
+
* ```
|
|
2204
|
+
* script.on_event(defines.events.on_tick,
|
|
2205
|
+
* function(event) game.print(event.tick) end)
|
|
2206
|
+
* ```
|
|
2207
|
+
*
|
|
2208
|
+
* @example
|
|
2209
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2210
|
+
* ```
|
|
2211
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2212
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2213
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2214
|
+
* ```
|
|
2215
|
+
*
|
|
2216
|
+
*/
|
|
2217
|
+
on_event(this: void,
|
|
2218
|
+
event: defines.events.on_player_changed_position,
|
|
2219
|
+
handler: (this: void, arg0: runtime.on_player_changed_position) => any | null,
|
|
2220
|
+
filters?: EventFilter): void
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2224
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2225
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2226
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2227
|
+
* @example
|
|
2228
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2229
|
+
* ```
|
|
2230
|
+
* script.on_event(defines.events.on_tick,
|
|
2231
|
+
* function(event) game.print(event.tick) end)
|
|
2232
|
+
* ```
|
|
2233
|
+
*
|
|
2234
|
+
* @example
|
|
2235
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2236
|
+
* ```
|
|
2237
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2238
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2239
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2240
|
+
* ```
|
|
2241
|
+
*
|
|
2242
|
+
*/
|
|
2243
|
+
on_event(this: void,
|
|
2244
|
+
event: defines.events.on_player_changed_surface,
|
|
2245
|
+
handler: (this: void, arg0: runtime.on_player_changed_surface) => any | null,
|
|
2246
|
+
filters?: EventFilter): void
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2250
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2251
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2252
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2253
|
+
* @example
|
|
2254
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2255
|
+
* ```
|
|
2256
|
+
* script.on_event(defines.events.on_tick,
|
|
2257
|
+
* function(event) game.print(event.tick) end)
|
|
2258
|
+
* ```
|
|
2259
|
+
*
|
|
2260
|
+
* @example
|
|
2261
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2262
|
+
* ```
|
|
2263
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2264
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2265
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2266
|
+
* ```
|
|
2267
|
+
*
|
|
2268
|
+
*/
|
|
2269
|
+
on_event(this: void,
|
|
2270
|
+
event: defines.events.on_player_cheat_mode_disabled,
|
|
2271
|
+
handler: (this: void, arg0: runtime.on_player_cheat_mode_disabled) => any | null,
|
|
2272
|
+
filters?: EventFilter): void
|
|
2273
|
+
|
|
2274
|
+
/**
|
|
2275
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2276
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2277
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2278
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2279
|
+
* @example
|
|
2280
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2281
|
+
* ```
|
|
2282
|
+
* script.on_event(defines.events.on_tick,
|
|
2283
|
+
* function(event) game.print(event.tick) end)
|
|
2284
|
+
* ```
|
|
2285
|
+
*
|
|
2286
|
+
* @example
|
|
2287
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2288
|
+
* ```
|
|
2289
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2290
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2291
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2292
|
+
* ```
|
|
2293
|
+
*
|
|
2294
|
+
*/
|
|
2295
|
+
on_event(this: void,
|
|
2296
|
+
event: defines.events.on_player_cheat_mode_enabled,
|
|
2297
|
+
handler: (this: void, arg0: runtime.on_player_cheat_mode_enabled) => any | null,
|
|
2298
|
+
filters?: EventFilter): void
|
|
2299
|
+
|
|
2300
|
+
/**
|
|
2301
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2302
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2303
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2304
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2305
|
+
* @example
|
|
2306
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2307
|
+
* ```
|
|
2308
|
+
* script.on_event(defines.events.on_tick,
|
|
2309
|
+
* function(event) game.print(event.tick) end)
|
|
2310
|
+
* ```
|
|
2311
|
+
*
|
|
2312
|
+
* @example
|
|
2313
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2314
|
+
* ```
|
|
2315
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2316
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2317
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2318
|
+
* ```
|
|
2319
|
+
*
|
|
2320
|
+
*/
|
|
2321
|
+
on_event(this: void,
|
|
2322
|
+
event: defines.events.on_player_clicked_gps_tag,
|
|
2323
|
+
handler: (this: void, arg0: runtime.on_player_clicked_gps_tag) => any | null,
|
|
2324
|
+
filters?: EventFilter): void
|
|
2325
|
+
|
|
2326
|
+
/**
|
|
2327
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2328
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2329
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2330
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2331
|
+
* @example
|
|
2332
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2333
|
+
* ```
|
|
2334
|
+
* script.on_event(defines.events.on_tick,
|
|
2335
|
+
* function(event) game.print(event.tick) end)
|
|
2336
|
+
* ```
|
|
2337
|
+
*
|
|
2338
|
+
* @example
|
|
2339
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2340
|
+
* ```
|
|
2341
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2342
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2343
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2344
|
+
* ```
|
|
2345
|
+
*
|
|
2346
|
+
*/
|
|
2347
|
+
on_event(this: void,
|
|
2348
|
+
event: defines.events.on_player_configured_blueprint,
|
|
2349
|
+
handler: (this: void, arg0: runtime.on_player_configured_blueprint) => any | null,
|
|
2350
|
+
filters?: EventFilter): void
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2354
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2355
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2356
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2357
|
+
* @example
|
|
2358
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2359
|
+
* ```
|
|
2360
|
+
* script.on_event(defines.events.on_tick,
|
|
2361
|
+
* function(event) game.print(event.tick) end)
|
|
2362
|
+
* ```
|
|
2363
|
+
*
|
|
2364
|
+
* @example
|
|
2365
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2366
|
+
* ```
|
|
2367
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2368
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2369
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2370
|
+
* ```
|
|
2371
|
+
*
|
|
2372
|
+
*/
|
|
2373
|
+
on_event(this: void,
|
|
2374
|
+
event: defines.events.on_player_configured_spider_remote,
|
|
2375
|
+
handler: (this: void, arg0: runtime.on_player_configured_spider_remote) => any | null,
|
|
2376
|
+
filters?: EventFilter): void
|
|
2377
|
+
|
|
2378
|
+
/**
|
|
2379
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2380
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2381
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2382
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2383
|
+
* @example
|
|
2384
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2385
|
+
* ```
|
|
2386
|
+
* script.on_event(defines.events.on_tick,
|
|
2387
|
+
* function(event) game.print(event.tick) end)
|
|
2388
|
+
* ```
|
|
2389
|
+
*
|
|
2390
|
+
* @example
|
|
2391
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2392
|
+
* ```
|
|
2393
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2394
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2395
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2396
|
+
* ```
|
|
2397
|
+
*
|
|
2398
|
+
*/
|
|
2399
|
+
on_event(this: void,
|
|
2400
|
+
event: defines.events.on_player_crafted_item,
|
|
2401
|
+
handler: (this: void, arg0: runtime.on_player_crafted_item) => any | null,
|
|
2402
|
+
filters?: EventFilter): void
|
|
2403
|
+
|
|
2404
|
+
/**
|
|
2405
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2406
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2407
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2408
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2409
|
+
* @example
|
|
2410
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2411
|
+
* ```
|
|
2412
|
+
* script.on_event(defines.events.on_tick,
|
|
2413
|
+
* function(event) game.print(event.tick) end)
|
|
2414
|
+
* ```
|
|
2415
|
+
*
|
|
2416
|
+
* @example
|
|
2417
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2418
|
+
* ```
|
|
2419
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2420
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2421
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2422
|
+
* ```
|
|
2423
|
+
*
|
|
2424
|
+
*/
|
|
2425
|
+
on_event(this: void,
|
|
2426
|
+
event: defines.events.on_player_created,
|
|
2427
|
+
handler: (this: void, arg0: runtime.on_player_created) => any | null,
|
|
2428
|
+
filters?: EventFilter): void
|
|
2429
|
+
|
|
2430
|
+
/**
|
|
2431
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2432
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2433
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2434
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2435
|
+
* @example
|
|
2436
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2437
|
+
* ```
|
|
2438
|
+
* script.on_event(defines.events.on_tick,
|
|
2439
|
+
* function(event) game.print(event.tick) end)
|
|
2440
|
+
* ```
|
|
2441
|
+
*
|
|
2442
|
+
* @example
|
|
2443
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2444
|
+
* ```
|
|
2445
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2446
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2447
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2448
|
+
* ```
|
|
2449
|
+
*
|
|
2450
|
+
*/
|
|
2451
|
+
on_event(this: void,
|
|
2452
|
+
event: defines.events.on_player_cursor_stack_changed,
|
|
2453
|
+
handler: (this: void, arg0: runtime.on_player_cursor_stack_changed) => any | null,
|
|
2454
|
+
filters?: EventFilter): void
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2458
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2459
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2460
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2461
|
+
* @example
|
|
2462
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2463
|
+
* ```
|
|
2464
|
+
* script.on_event(defines.events.on_tick,
|
|
2465
|
+
* function(event) game.print(event.tick) end)
|
|
2466
|
+
* ```
|
|
2467
|
+
*
|
|
2468
|
+
* @example
|
|
2469
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2470
|
+
* ```
|
|
2471
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2472
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2473
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2474
|
+
* ```
|
|
2475
|
+
*
|
|
2476
|
+
*/
|
|
2477
|
+
on_event(this: void,
|
|
2478
|
+
event: defines.events.on_player_deconstructed_area,
|
|
2479
|
+
handler: (this: void, arg0: runtime.on_player_deconstructed_area) => any | null,
|
|
2480
|
+
filters?: EventFilter): void
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2484
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2485
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2486
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2487
|
+
* @example
|
|
2488
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2489
|
+
* ```
|
|
2490
|
+
* script.on_event(defines.events.on_tick,
|
|
2491
|
+
* function(event) game.print(event.tick) end)
|
|
2492
|
+
* ```
|
|
2493
|
+
*
|
|
2494
|
+
* @example
|
|
2495
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2496
|
+
* ```
|
|
2497
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2498
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2499
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2500
|
+
* ```
|
|
2501
|
+
*
|
|
2502
|
+
*/
|
|
2503
|
+
on_event(this: void,
|
|
2504
|
+
event: defines.events.on_player_demoted,
|
|
2505
|
+
handler: (this: void, arg0: runtime.on_player_demoted) => any | null,
|
|
2506
|
+
filters?: EventFilter): void
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2510
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2511
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2512
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2513
|
+
* @example
|
|
2514
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2515
|
+
* ```
|
|
2516
|
+
* script.on_event(defines.events.on_tick,
|
|
2517
|
+
* function(event) game.print(event.tick) end)
|
|
2518
|
+
* ```
|
|
2519
|
+
*
|
|
2520
|
+
* @example
|
|
2521
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2522
|
+
* ```
|
|
2523
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2524
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2525
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2526
|
+
* ```
|
|
2527
|
+
*
|
|
2528
|
+
*/
|
|
2529
|
+
on_event(this: void,
|
|
2530
|
+
event: defines.events.on_player_died,
|
|
2531
|
+
handler: (this: void, arg0: runtime.on_player_died) => any | null,
|
|
2532
|
+
filters?: EventFilter): void
|
|
2533
|
+
|
|
2534
|
+
/**
|
|
2535
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2536
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2537
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2538
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2539
|
+
* @example
|
|
2540
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2541
|
+
* ```
|
|
2542
|
+
* script.on_event(defines.events.on_tick,
|
|
2543
|
+
* function(event) game.print(event.tick) end)
|
|
2544
|
+
* ```
|
|
2545
|
+
*
|
|
2546
|
+
* @example
|
|
2547
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2548
|
+
* ```
|
|
2549
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2550
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2551
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2552
|
+
* ```
|
|
2553
|
+
*
|
|
2554
|
+
*/
|
|
2555
|
+
on_event(this: void,
|
|
2556
|
+
event: defines.events.on_player_display_resolution_changed,
|
|
2557
|
+
handler: (this: void, arg0: runtime.on_player_display_resolution_changed) => any | null,
|
|
2558
|
+
filters?: EventFilter): void
|
|
2559
|
+
|
|
2560
|
+
/**
|
|
2561
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2562
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2563
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2564
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2565
|
+
* @example
|
|
2566
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2567
|
+
* ```
|
|
2568
|
+
* script.on_event(defines.events.on_tick,
|
|
2569
|
+
* function(event) game.print(event.tick) end)
|
|
2570
|
+
* ```
|
|
2571
|
+
*
|
|
2572
|
+
* @example
|
|
2573
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2574
|
+
* ```
|
|
2575
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2576
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2577
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2578
|
+
* ```
|
|
2579
|
+
*
|
|
2580
|
+
*/
|
|
2581
|
+
on_event(this: void,
|
|
2582
|
+
event: defines.events.on_player_display_scale_changed,
|
|
2583
|
+
handler: (this: void, arg0: runtime.on_player_display_scale_changed) => any | null,
|
|
2584
|
+
filters?: EventFilter): void
|
|
2585
|
+
|
|
2586
|
+
/**
|
|
2587
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2588
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2589
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2590
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2591
|
+
* @example
|
|
2592
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2593
|
+
* ```
|
|
2594
|
+
* script.on_event(defines.events.on_tick,
|
|
2595
|
+
* function(event) game.print(event.tick) end)
|
|
2596
|
+
* ```
|
|
2597
|
+
*
|
|
2598
|
+
* @example
|
|
2599
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2600
|
+
* ```
|
|
2601
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2602
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2603
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2604
|
+
* ```
|
|
2605
|
+
*
|
|
2606
|
+
*/
|
|
2607
|
+
on_event(this: void,
|
|
2608
|
+
event: defines.events.on_player_driving_changed_state,
|
|
2609
|
+
handler: (this: void, arg0: runtime.on_player_driving_changed_state) => any | null,
|
|
2610
|
+
filters?: EventFilter): void
|
|
2611
|
+
|
|
2612
|
+
/**
|
|
2613
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2614
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2615
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2616
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2617
|
+
* @example
|
|
2618
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2619
|
+
* ```
|
|
2620
|
+
* script.on_event(defines.events.on_tick,
|
|
2621
|
+
* function(event) game.print(event.tick) end)
|
|
2622
|
+
* ```
|
|
2623
|
+
*
|
|
2624
|
+
* @example
|
|
2625
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2626
|
+
* ```
|
|
2627
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2628
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2629
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2630
|
+
* ```
|
|
2631
|
+
*
|
|
2632
|
+
*/
|
|
2633
|
+
on_event(this: void,
|
|
2634
|
+
event: defines.events.on_player_dropped_item,
|
|
2635
|
+
handler: (this: void, arg0: runtime.on_player_dropped_item) => any | null,
|
|
2636
|
+
filters?: EventFilter): void
|
|
2637
|
+
|
|
2638
|
+
/**
|
|
2639
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2640
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2641
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2642
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2643
|
+
* @example
|
|
2644
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2645
|
+
* ```
|
|
2646
|
+
* script.on_event(defines.events.on_tick,
|
|
2647
|
+
* function(event) game.print(event.tick) end)
|
|
2648
|
+
* ```
|
|
2649
|
+
*
|
|
2650
|
+
* @example
|
|
2651
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2652
|
+
* ```
|
|
2653
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2654
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2655
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2656
|
+
* ```
|
|
2657
|
+
*
|
|
2658
|
+
*/
|
|
2659
|
+
on_event(this: void,
|
|
2660
|
+
event: defines.events.on_player_fast_transferred,
|
|
2661
|
+
handler: (this: void, arg0: runtime.on_player_fast_transferred) => any | null,
|
|
2662
|
+
filters?: EventFilter): void
|
|
2663
|
+
|
|
2664
|
+
/**
|
|
2665
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2666
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2667
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2668
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2669
|
+
* @example
|
|
2670
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2671
|
+
* ```
|
|
2672
|
+
* script.on_event(defines.events.on_tick,
|
|
2673
|
+
* function(event) game.print(event.tick) end)
|
|
2674
|
+
* ```
|
|
2675
|
+
*
|
|
2676
|
+
* @example
|
|
2677
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2678
|
+
* ```
|
|
2679
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2680
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2681
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2682
|
+
* ```
|
|
2683
|
+
*
|
|
2684
|
+
*/
|
|
2685
|
+
on_event(this: void,
|
|
2686
|
+
event: defines.events.on_player_flushed_fluid,
|
|
2687
|
+
handler: (this: void, arg0: runtime.on_player_flushed_fluid) => any | null,
|
|
2688
|
+
filters?: EventFilter): void
|
|
2689
|
+
|
|
2690
|
+
/**
|
|
2691
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2692
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2693
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2694
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2695
|
+
* @example
|
|
2696
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2697
|
+
* ```
|
|
2698
|
+
* script.on_event(defines.events.on_tick,
|
|
2699
|
+
* function(event) game.print(event.tick) end)
|
|
2700
|
+
* ```
|
|
2701
|
+
*
|
|
2702
|
+
* @example
|
|
2703
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2704
|
+
* ```
|
|
2705
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2706
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2707
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2708
|
+
* ```
|
|
2709
|
+
*
|
|
2710
|
+
*/
|
|
2711
|
+
on_event(this: void,
|
|
2712
|
+
event: defines.events.on_player_gun_inventory_changed,
|
|
2713
|
+
handler: (this: void, arg0: runtime.on_player_gun_inventory_changed) => any | null,
|
|
2714
|
+
filters?: EventFilter): void
|
|
2715
|
+
|
|
2716
|
+
/**
|
|
2717
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2718
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2719
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2720
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2721
|
+
* @example
|
|
2722
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2723
|
+
* ```
|
|
2724
|
+
* script.on_event(defines.events.on_tick,
|
|
2725
|
+
* function(event) game.print(event.tick) end)
|
|
2726
|
+
* ```
|
|
2727
|
+
*
|
|
2728
|
+
* @example
|
|
2729
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2730
|
+
* ```
|
|
2731
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2732
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2733
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2734
|
+
* ```
|
|
2735
|
+
*
|
|
2736
|
+
*/
|
|
2737
|
+
on_event(this: void,
|
|
2738
|
+
event: defines.events.on_player_input_method_changed,
|
|
2739
|
+
handler: (this: void, arg0: runtime.on_player_input_method_changed) => any | null,
|
|
2740
|
+
filters?: EventFilter): void
|
|
2741
|
+
|
|
2742
|
+
/**
|
|
2743
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2744
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2745
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2746
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2747
|
+
* @example
|
|
2748
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2749
|
+
* ```
|
|
2750
|
+
* script.on_event(defines.events.on_tick,
|
|
2751
|
+
* function(event) game.print(event.tick) end)
|
|
2752
|
+
* ```
|
|
2753
|
+
*
|
|
2754
|
+
* @example
|
|
2755
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2756
|
+
* ```
|
|
2757
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2758
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2759
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2760
|
+
* ```
|
|
2761
|
+
*
|
|
2762
|
+
*/
|
|
2763
|
+
on_event(this: void,
|
|
2764
|
+
event: defines.events.on_player_joined_game,
|
|
2765
|
+
handler: (this: void, arg0: runtime.on_player_joined_game) => any | null,
|
|
2766
|
+
filters?: EventFilter): void
|
|
2767
|
+
|
|
2768
|
+
/**
|
|
2769
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2770
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2771
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2772
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2773
|
+
* @example
|
|
2774
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2775
|
+
* ```
|
|
2776
|
+
* script.on_event(defines.events.on_tick,
|
|
2777
|
+
* function(event) game.print(event.tick) end)
|
|
2778
|
+
* ```
|
|
2779
|
+
*
|
|
2780
|
+
* @example
|
|
2781
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2782
|
+
* ```
|
|
2783
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2784
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2785
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2786
|
+
* ```
|
|
2787
|
+
*
|
|
2788
|
+
*/
|
|
2789
|
+
on_event(this: void,
|
|
2790
|
+
event: defines.events.on_player_kicked,
|
|
2791
|
+
handler: (this: void, arg0: runtime.on_player_kicked) => any | null,
|
|
2792
|
+
filters?: EventFilter): void
|
|
2793
|
+
|
|
2794
|
+
/**
|
|
2795
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2796
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2797
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2798
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2799
|
+
* @example
|
|
2800
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2801
|
+
* ```
|
|
2802
|
+
* script.on_event(defines.events.on_tick,
|
|
2803
|
+
* function(event) game.print(event.tick) end)
|
|
2804
|
+
* ```
|
|
2805
|
+
*
|
|
2806
|
+
* @example
|
|
2807
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2808
|
+
* ```
|
|
2809
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2810
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2811
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2812
|
+
* ```
|
|
2813
|
+
*
|
|
2814
|
+
*/
|
|
2815
|
+
on_event(this: void,
|
|
2816
|
+
event: defines.events.on_player_left_game,
|
|
2817
|
+
handler: (this: void, arg0: runtime.on_player_left_game) => any | null,
|
|
2818
|
+
filters?: EventFilter): void
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2822
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2823
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2824
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2825
|
+
* @example
|
|
2826
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2827
|
+
* ```
|
|
2828
|
+
* script.on_event(defines.events.on_tick,
|
|
2829
|
+
* function(event) game.print(event.tick) end)
|
|
2830
|
+
* ```
|
|
2831
|
+
*
|
|
2832
|
+
* @example
|
|
2833
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2834
|
+
* ```
|
|
2835
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2836
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2837
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2838
|
+
* ```
|
|
2839
|
+
*
|
|
2840
|
+
*/
|
|
2841
|
+
on_event(this: void,
|
|
2842
|
+
event: defines.events.on_player_main_inventory_changed,
|
|
2843
|
+
handler: (this: void, arg0: runtime.on_player_main_inventory_changed) => any | null,
|
|
2844
|
+
filters?: EventFilter): void
|
|
2845
|
+
|
|
2846
|
+
/**
|
|
2847
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2848
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2849
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2850
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2851
|
+
* @example
|
|
2852
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2853
|
+
* ```
|
|
2854
|
+
* script.on_event(defines.events.on_tick,
|
|
2855
|
+
* function(event) game.print(event.tick) end)
|
|
2856
|
+
* ```
|
|
2857
|
+
*
|
|
2858
|
+
* @example
|
|
2859
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2860
|
+
* ```
|
|
2861
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2862
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2863
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2864
|
+
* ```
|
|
2865
|
+
*
|
|
2866
|
+
*/
|
|
2867
|
+
on_event(this: void,
|
|
2868
|
+
event: defines.events.on_player_mined_entity,
|
|
2869
|
+
handler: (this: void, arg0: runtime.on_player_mined_entity) => any | null,
|
|
2870
|
+
filters?: EventFilter): void
|
|
2871
|
+
|
|
2872
|
+
/**
|
|
2873
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2874
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2875
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2876
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2877
|
+
* @example
|
|
2878
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2879
|
+
* ```
|
|
2880
|
+
* script.on_event(defines.events.on_tick,
|
|
2881
|
+
* function(event) game.print(event.tick) end)
|
|
2882
|
+
* ```
|
|
2883
|
+
*
|
|
2884
|
+
* @example
|
|
2885
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2886
|
+
* ```
|
|
2887
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2888
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2889
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2890
|
+
* ```
|
|
2891
|
+
*
|
|
2892
|
+
*/
|
|
2893
|
+
on_event(this: void,
|
|
2894
|
+
event: defines.events.on_player_mined_item,
|
|
2895
|
+
handler: (this: void, arg0: runtime.on_player_mined_item) => any | null,
|
|
2896
|
+
filters?: EventFilter): void
|
|
2897
|
+
|
|
2898
|
+
/**
|
|
2899
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2900
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2901
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2902
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2903
|
+
* @example
|
|
2904
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2905
|
+
* ```
|
|
2906
|
+
* script.on_event(defines.events.on_tick,
|
|
2907
|
+
* function(event) game.print(event.tick) end)
|
|
2908
|
+
* ```
|
|
2909
|
+
*
|
|
2910
|
+
* @example
|
|
2911
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2912
|
+
* ```
|
|
2913
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2914
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2915
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2916
|
+
* ```
|
|
2917
|
+
*
|
|
2918
|
+
*/
|
|
2919
|
+
on_event(this: void,
|
|
2920
|
+
event: defines.events.on_player_mined_tile,
|
|
2921
|
+
handler: (this: void, arg0: runtime.on_player_mined_tile) => any | null,
|
|
2922
|
+
filters?: EventFilter): void
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2926
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2927
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2928
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2929
|
+
* @example
|
|
2930
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2931
|
+
* ```
|
|
2932
|
+
* script.on_event(defines.events.on_tick,
|
|
2933
|
+
* function(event) game.print(event.tick) end)
|
|
2934
|
+
* ```
|
|
2935
|
+
*
|
|
2936
|
+
* @example
|
|
2937
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2938
|
+
* ```
|
|
2939
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2940
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2941
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2942
|
+
* ```
|
|
2943
|
+
*
|
|
2944
|
+
*/
|
|
2945
|
+
on_event(this: void,
|
|
2946
|
+
event: defines.events.on_player_muted,
|
|
2947
|
+
handler: (this: void, arg0: runtime.on_player_muted) => any | null,
|
|
2948
|
+
filters?: EventFilter): void
|
|
2949
|
+
|
|
2950
|
+
/**
|
|
2951
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2952
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2953
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2954
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2955
|
+
* @example
|
|
2956
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2957
|
+
* ```
|
|
2958
|
+
* script.on_event(defines.events.on_tick,
|
|
2959
|
+
* function(event) game.print(event.tick) end)
|
|
2960
|
+
* ```
|
|
2961
|
+
*
|
|
2962
|
+
* @example
|
|
2963
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2964
|
+
* ```
|
|
2965
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2966
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2967
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2968
|
+
* ```
|
|
2969
|
+
*
|
|
2970
|
+
*/
|
|
2971
|
+
on_event(this: void,
|
|
2972
|
+
event: defines.events.on_player_pipette,
|
|
2973
|
+
handler: (this: void, arg0: runtime.on_player_pipette) => any | null,
|
|
2974
|
+
filters?: EventFilter): void
|
|
2975
|
+
|
|
2976
|
+
/**
|
|
2977
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2978
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
2979
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
2980
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
2981
|
+
* @example
|
|
2982
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
2983
|
+
* ```
|
|
2984
|
+
* script.on_event(defines.events.on_tick,
|
|
2985
|
+
* function(event) game.print(event.tick) end)
|
|
2986
|
+
* ```
|
|
2987
|
+
*
|
|
2988
|
+
* @example
|
|
2989
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
2990
|
+
* ```
|
|
2991
|
+
* script.on_event(defines.events.on_built_entity,
|
|
2992
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
2993
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
2994
|
+
* ```
|
|
2995
|
+
*
|
|
2996
|
+
*/
|
|
2997
|
+
on_event(this: void,
|
|
2998
|
+
event: defines.events.on_player_placed_equipment,
|
|
2999
|
+
handler: (this: void, arg0: runtime.on_player_placed_equipment) => any | null,
|
|
3000
|
+
filters?: EventFilter): void
|
|
3001
|
+
|
|
3002
|
+
/**
|
|
3003
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3004
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3005
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3006
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3007
|
+
* @example
|
|
3008
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3009
|
+
* ```
|
|
3010
|
+
* script.on_event(defines.events.on_tick,
|
|
3011
|
+
* function(event) game.print(event.tick) end)
|
|
3012
|
+
* ```
|
|
3013
|
+
*
|
|
3014
|
+
* @example
|
|
3015
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3016
|
+
* ```
|
|
3017
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3018
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3019
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3020
|
+
* ```
|
|
3021
|
+
*
|
|
3022
|
+
*/
|
|
3023
|
+
on_event(this: void,
|
|
3024
|
+
event: defines.events.on_player_promoted,
|
|
3025
|
+
handler: (this: void, arg0: runtime.on_player_promoted) => any | null,
|
|
3026
|
+
filters?: EventFilter): void
|
|
3027
|
+
|
|
3028
|
+
/**
|
|
3029
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3030
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3031
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3032
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3033
|
+
* @example
|
|
3034
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3035
|
+
* ```
|
|
3036
|
+
* script.on_event(defines.events.on_tick,
|
|
3037
|
+
* function(event) game.print(event.tick) end)
|
|
3038
|
+
* ```
|
|
3039
|
+
*
|
|
3040
|
+
* @example
|
|
3041
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3042
|
+
* ```
|
|
3043
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3044
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3045
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3046
|
+
* ```
|
|
3047
|
+
*
|
|
3048
|
+
*/
|
|
3049
|
+
on_event(this: void,
|
|
3050
|
+
event: defines.events.on_player_removed,
|
|
3051
|
+
handler: (this: void, arg0: runtime.on_player_removed) => any | null,
|
|
3052
|
+
filters?: EventFilter): void
|
|
3053
|
+
|
|
3054
|
+
/**
|
|
3055
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3056
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3057
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3058
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3059
|
+
* @example
|
|
3060
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3061
|
+
* ```
|
|
3062
|
+
* script.on_event(defines.events.on_tick,
|
|
3063
|
+
* function(event) game.print(event.tick) end)
|
|
3064
|
+
* ```
|
|
3065
|
+
*
|
|
3066
|
+
* @example
|
|
3067
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3068
|
+
* ```
|
|
3069
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3070
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3071
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3072
|
+
* ```
|
|
3073
|
+
*
|
|
3074
|
+
*/
|
|
3075
|
+
on_event(this: void,
|
|
3076
|
+
event: defines.events.on_player_removed_equipment,
|
|
3077
|
+
handler: (this: void, arg0: runtime.on_player_removed_equipment) => any | null,
|
|
3078
|
+
filters?: EventFilter): void
|
|
3079
|
+
|
|
3080
|
+
/**
|
|
3081
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3082
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3083
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3084
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3085
|
+
* @example
|
|
3086
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3087
|
+
* ```
|
|
3088
|
+
* script.on_event(defines.events.on_tick,
|
|
3089
|
+
* function(event) game.print(event.tick) end)
|
|
3090
|
+
* ```
|
|
3091
|
+
*
|
|
3092
|
+
* @example
|
|
3093
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3094
|
+
* ```
|
|
3095
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3096
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3097
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3098
|
+
* ```
|
|
3099
|
+
*
|
|
3100
|
+
*/
|
|
3101
|
+
on_event(this: void,
|
|
3102
|
+
event: defines.events.on_player_repaired_entity,
|
|
3103
|
+
handler: (this: void, arg0: runtime.on_player_repaired_entity) => any | null,
|
|
3104
|
+
filters?: EventFilter): void
|
|
3105
|
+
|
|
3106
|
+
/**
|
|
3107
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3108
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3109
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3110
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3111
|
+
* @example
|
|
3112
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3113
|
+
* ```
|
|
3114
|
+
* script.on_event(defines.events.on_tick,
|
|
3115
|
+
* function(event) game.print(event.tick) end)
|
|
3116
|
+
* ```
|
|
3117
|
+
*
|
|
3118
|
+
* @example
|
|
3119
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3120
|
+
* ```
|
|
3121
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3122
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3123
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3124
|
+
* ```
|
|
3125
|
+
*
|
|
3126
|
+
*/
|
|
3127
|
+
on_event(this: void,
|
|
3128
|
+
event: defines.events.on_player_respawned,
|
|
3129
|
+
handler: (this: void, arg0: runtime.on_player_respawned) => any | null,
|
|
3130
|
+
filters?: EventFilter): void
|
|
3131
|
+
|
|
3132
|
+
/**
|
|
3133
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3134
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3135
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3136
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3137
|
+
* @example
|
|
3138
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3139
|
+
* ```
|
|
3140
|
+
* script.on_event(defines.events.on_tick,
|
|
3141
|
+
* function(event) game.print(event.tick) end)
|
|
3142
|
+
* ```
|
|
3143
|
+
*
|
|
3144
|
+
* @example
|
|
3145
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3146
|
+
* ```
|
|
3147
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3148
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3149
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3150
|
+
* ```
|
|
3151
|
+
*
|
|
3152
|
+
*/
|
|
3153
|
+
on_event(this: void,
|
|
3154
|
+
event: defines.events.on_player_reverse_selected_area,
|
|
3155
|
+
handler: (this: void, arg0: runtime.on_player_reverse_selected_area) => any | null,
|
|
3156
|
+
filters?: EventFilter): void
|
|
3157
|
+
|
|
3158
|
+
/**
|
|
3159
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3160
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3161
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3162
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3163
|
+
* @example
|
|
3164
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3165
|
+
* ```
|
|
3166
|
+
* script.on_event(defines.events.on_tick,
|
|
3167
|
+
* function(event) game.print(event.tick) end)
|
|
3168
|
+
* ```
|
|
3169
|
+
*
|
|
3170
|
+
* @example
|
|
3171
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3172
|
+
* ```
|
|
3173
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3174
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3175
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3176
|
+
* ```
|
|
3177
|
+
*
|
|
3178
|
+
*/
|
|
3179
|
+
on_event(this: void,
|
|
3180
|
+
event: defines.events.on_player_rotated_entity,
|
|
3181
|
+
handler: (this: void, arg0: runtime.on_player_rotated_entity) => any | null,
|
|
3182
|
+
filters?: EventFilter): void
|
|
3183
|
+
|
|
3184
|
+
/**
|
|
3185
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3186
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3187
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3188
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3189
|
+
* @example
|
|
3190
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3191
|
+
* ```
|
|
3192
|
+
* script.on_event(defines.events.on_tick,
|
|
3193
|
+
* function(event) game.print(event.tick) end)
|
|
3194
|
+
* ```
|
|
3195
|
+
*
|
|
3196
|
+
* @example
|
|
3197
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3198
|
+
* ```
|
|
3199
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3200
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3201
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3202
|
+
* ```
|
|
3203
|
+
*
|
|
3204
|
+
*/
|
|
3205
|
+
on_event(this: void,
|
|
3206
|
+
event: defines.events.on_player_selected_area,
|
|
3207
|
+
handler: (this: void, arg0: runtime.on_player_selected_area) => any | null,
|
|
3208
|
+
filters?: EventFilter): void
|
|
3209
|
+
|
|
3210
|
+
/**
|
|
3211
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3212
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3213
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3214
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3215
|
+
* @example
|
|
3216
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3217
|
+
* ```
|
|
3218
|
+
* script.on_event(defines.events.on_tick,
|
|
3219
|
+
* function(event) game.print(event.tick) end)
|
|
3220
|
+
* ```
|
|
3221
|
+
*
|
|
3222
|
+
* @example
|
|
3223
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3224
|
+
* ```
|
|
3225
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3226
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3227
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3228
|
+
* ```
|
|
3229
|
+
*
|
|
3230
|
+
*/
|
|
3231
|
+
on_event(this: void,
|
|
3232
|
+
event: defines.events.on_player_set_quick_bar_slot,
|
|
3233
|
+
handler: (this: void, arg0: runtime.on_player_set_quick_bar_slot) => any | null,
|
|
3234
|
+
filters?: EventFilter): void
|
|
3235
|
+
|
|
3236
|
+
/**
|
|
3237
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3238
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3239
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3240
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3241
|
+
* @example
|
|
3242
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3243
|
+
* ```
|
|
3244
|
+
* script.on_event(defines.events.on_tick,
|
|
3245
|
+
* function(event) game.print(event.tick) end)
|
|
3246
|
+
* ```
|
|
3247
|
+
*
|
|
3248
|
+
* @example
|
|
3249
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3250
|
+
* ```
|
|
3251
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3252
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3253
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3254
|
+
* ```
|
|
3255
|
+
*
|
|
3256
|
+
*/
|
|
3257
|
+
on_event(this: void,
|
|
3258
|
+
event: defines.events.on_player_setup_blueprint,
|
|
3259
|
+
handler: (this: void, arg0: runtime.on_player_setup_blueprint) => any | null,
|
|
3260
|
+
filters?: EventFilter): void
|
|
3261
|
+
|
|
3262
|
+
/**
|
|
3263
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3264
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3265
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3266
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3267
|
+
* @example
|
|
3268
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3269
|
+
* ```
|
|
3270
|
+
* script.on_event(defines.events.on_tick,
|
|
3271
|
+
* function(event) game.print(event.tick) end)
|
|
3272
|
+
* ```
|
|
3273
|
+
*
|
|
3274
|
+
* @example
|
|
3275
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3276
|
+
* ```
|
|
3277
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3278
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3279
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3280
|
+
* ```
|
|
3281
|
+
*
|
|
3282
|
+
*/
|
|
3283
|
+
on_event(this: void,
|
|
3284
|
+
event: defines.events.on_player_toggled_alt_mode,
|
|
3285
|
+
handler: (this: void, arg0: runtime.on_player_toggled_alt_mode) => any | null,
|
|
3286
|
+
filters?: EventFilter): void
|
|
3287
|
+
|
|
3288
|
+
/**
|
|
3289
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3290
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3291
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3292
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3293
|
+
* @example
|
|
3294
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3295
|
+
* ```
|
|
3296
|
+
* script.on_event(defines.events.on_tick,
|
|
3297
|
+
* function(event) game.print(event.tick) end)
|
|
3298
|
+
* ```
|
|
3299
|
+
*
|
|
3300
|
+
* @example
|
|
3301
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3302
|
+
* ```
|
|
3303
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3304
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3305
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3306
|
+
* ```
|
|
3307
|
+
*
|
|
3308
|
+
*/
|
|
3309
|
+
on_event(this: void,
|
|
3310
|
+
event: defines.events.on_player_toggled_map_editor,
|
|
3311
|
+
handler: (this: void, arg0: runtime.on_player_toggled_map_editor) => any | null,
|
|
3312
|
+
filters?: EventFilter): void
|
|
3313
|
+
|
|
3314
|
+
/**
|
|
3315
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3316
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3317
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3318
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3319
|
+
* @example
|
|
3320
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3321
|
+
* ```
|
|
3322
|
+
* script.on_event(defines.events.on_tick,
|
|
3323
|
+
* function(event) game.print(event.tick) end)
|
|
3324
|
+
* ```
|
|
3325
|
+
*
|
|
3326
|
+
* @example
|
|
3327
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3328
|
+
* ```
|
|
3329
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3330
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3331
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3332
|
+
* ```
|
|
3333
|
+
*
|
|
3334
|
+
*/
|
|
3335
|
+
on_event(this: void,
|
|
3336
|
+
event: defines.events.on_player_trash_inventory_changed,
|
|
3337
|
+
handler: (this: void, arg0: runtime.on_player_trash_inventory_changed) => any | null,
|
|
3338
|
+
filters?: EventFilter): void
|
|
3339
|
+
|
|
3340
|
+
/**
|
|
3341
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3342
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3343
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3344
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3345
|
+
* @example
|
|
3346
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3347
|
+
* ```
|
|
3348
|
+
* script.on_event(defines.events.on_tick,
|
|
3349
|
+
* function(event) game.print(event.tick) end)
|
|
3350
|
+
* ```
|
|
3351
|
+
*
|
|
3352
|
+
* @example
|
|
3353
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3354
|
+
* ```
|
|
3355
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3356
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3357
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3358
|
+
* ```
|
|
3359
|
+
*
|
|
3360
|
+
*/
|
|
3361
|
+
on_event(this: void,
|
|
3362
|
+
event: defines.events.on_player_unbanned,
|
|
3363
|
+
handler: (this: void, arg0: runtime.on_player_unbanned) => any | null,
|
|
3364
|
+
filters?: EventFilter): void
|
|
3365
|
+
|
|
3366
|
+
/**
|
|
3367
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3368
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3369
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3370
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3371
|
+
* @example
|
|
3372
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3373
|
+
* ```
|
|
3374
|
+
* script.on_event(defines.events.on_tick,
|
|
3375
|
+
* function(event) game.print(event.tick) end)
|
|
3376
|
+
* ```
|
|
3377
|
+
*
|
|
3378
|
+
* @example
|
|
3379
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3380
|
+
* ```
|
|
3381
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3382
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3383
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3384
|
+
* ```
|
|
3385
|
+
*
|
|
3386
|
+
*/
|
|
3387
|
+
on_event(this: void,
|
|
3388
|
+
event: defines.events.on_player_unmuted,
|
|
3389
|
+
handler: (this: void, arg0: runtime.on_player_unmuted) => any | null,
|
|
3390
|
+
filters?: EventFilter): void
|
|
3391
|
+
|
|
3392
|
+
/**
|
|
3393
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3394
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3395
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3396
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3397
|
+
* @example
|
|
3398
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3399
|
+
* ```
|
|
3400
|
+
* script.on_event(defines.events.on_tick,
|
|
3401
|
+
* function(event) game.print(event.tick) end)
|
|
3402
|
+
* ```
|
|
3403
|
+
*
|
|
3404
|
+
* @example
|
|
3405
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3406
|
+
* ```
|
|
3407
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3408
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3409
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3410
|
+
* ```
|
|
3411
|
+
*
|
|
3412
|
+
*/
|
|
3413
|
+
on_event(this: void,
|
|
3414
|
+
event: defines.events.on_player_used_capsule,
|
|
3415
|
+
handler: (this: void, arg0: runtime.on_player_used_capsule) => any | null,
|
|
3416
|
+
filters?: EventFilter): void
|
|
3417
|
+
|
|
3418
|
+
/**
|
|
3419
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3420
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3421
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3422
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3423
|
+
* @example
|
|
3424
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3425
|
+
* ```
|
|
3426
|
+
* script.on_event(defines.events.on_tick,
|
|
3427
|
+
* function(event) game.print(event.tick) end)
|
|
3428
|
+
* ```
|
|
3429
|
+
*
|
|
3430
|
+
* @example
|
|
3431
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3432
|
+
* ```
|
|
3433
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3434
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3435
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3436
|
+
* ```
|
|
3437
|
+
*
|
|
3438
|
+
*/
|
|
3439
|
+
on_event(this: void,
|
|
3440
|
+
event: defines.events.on_player_used_spider_remote,
|
|
3441
|
+
handler: (this: void, arg0: runtime.on_player_used_spider_remote) => any | null,
|
|
3442
|
+
filters?: EventFilter): void
|
|
3443
|
+
|
|
3444
|
+
/**
|
|
3445
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3446
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3447
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3448
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3449
|
+
* @example
|
|
3450
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3451
|
+
* ```
|
|
3452
|
+
* script.on_event(defines.events.on_tick,
|
|
3453
|
+
* function(event) game.print(event.tick) end)
|
|
3454
|
+
* ```
|
|
3455
|
+
*
|
|
3456
|
+
* @example
|
|
3457
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3458
|
+
* ```
|
|
3459
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3460
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3461
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3462
|
+
* ```
|
|
3463
|
+
*
|
|
3464
|
+
*/
|
|
3465
|
+
on_event(this: void,
|
|
3466
|
+
event: defines.events.on_post_entity_died,
|
|
3467
|
+
handler: (this: void, arg0: runtime.on_post_entity_died) => any | null,
|
|
3468
|
+
filters?: EventFilter): void
|
|
3469
|
+
|
|
3470
|
+
/**
|
|
3471
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3472
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3473
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3474
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3475
|
+
* @example
|
|
3476
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3477
|
+
* ```
|
|
3478
|
+
* script.on_event(defines.events.on_tick,
|
|
3479
|
+
* function(event) game.print(event.tick) end)
|
|
3480
|
+
* ```
|
|
3481
|
+
*
|
|
3482
|
+
* @example
|
|
3483
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3484
|
+
* ```
|
|
3485
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3486
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3487
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3488
|
+
* ```
|
|
3489
|
+
*
|
|
3490
|
+
*/
|
|
3491
|
+
on_event(this: void,
|
|
3492
|
+
event: defines.events.on_pre_build,
|
|
3493
|
+
handler: (this: void, arg0: runtime.on_pre_build) => any | null,
|
|
3494
|
+
filters?: EventFilter): void
|
|
3495
|
+
|
|
3496
|
+
/**
|
|
3497
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3498
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3499
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3500
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3501
|
+
* @example
|
|
3502
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3503
|
+
* ```
|
|
3504
|
+
* script.on_event(defines.events.on_tick,
|
|
3505
|
+
* function(event) game.print(event.tick) end)
|
|
3506
|
+
* ```
|
|
3507
|
+
*
|
|
3508
|
+
* @example
|
|
3509
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3510
|
+
* ```
|
|
3511
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3512
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3513
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3514
|
+
* ```
|
|
3515
|
+
*
|
|
3516
|
+
*/
|
|
3517
|
+
on_event(this: void,
|
|
3518
|
+
event: defines.events.on_pre_chunk_deleted,
|
|
3519
|
+
handler: (this: void, arg0: runtime.on_pre_chunk_deleted) => any | null,
|
|
3520
|
+
filters?: EventFilter): void
|
|
3521
|
+
|
|
3522
|
+
/**
|
|
3523
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3524
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3525
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3526
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3527
|
+
* @example
|
|
3528
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3529
|
+
* ```
|
|
3530
|
+
* script.on_event(defines.events.on_tick,
|
|
3531
|
+
* function(event) game.print(event.tick) end)
|
|
3532
|
+
* ```
|
|
3533
|
+
*
|
|
3534
|
+
* @example
|
|
3535
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3536
|
+
* ```
|
|
3537
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3538
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3539
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3540
|
+
* ```
|
|
3541
|
+
*
|
|
3542
|
+
*/
|
|
3543
|
+
on_event(this: void,
|
|
3544
|
+
event: defines.events.on_pre_entity_settings_pasted,
|
|
3545
|
+
handler: (this: void, arg0: runtime.on_pre_entity_settings_pasted) => any | null,
|
|
3546
|
+
filters?: EventFilter): void
|
|
3547
|
+
|
|
3548
|
+
/**
|
|
3549
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3550
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3551
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3552
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3553
|
+
* @example
|
|
3554
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3555
|
+
* ```
|
|
3556
|
+
* script.on_event(defines.events.on_tick,
|
|
3557
|
+
* function(event) game.print(event.tick) end)
|
|
3558
|
+
* ```
|
|
3559
|
+
*
|
|
3560
|
+
* @example
|
|
3561
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3562
|
+
* ```
|
|
3563
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3564
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3565
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3566
|
+
* ```
|
|
3567
|
+
*
|
|
3568
|
+
*/
|
|
3569
|
+
on_event(this: void,
|
|
3570
|
+
event: defines.events.on_pre_ghost_deconstructed,
|
|
3571
|
+
handler: (this: void, arg0: runtime.on_pre_ghost_deconstructed) => any | null,
|
|
3572
|
+
filters?: EventFilter): void
|
|
3573
|
+
|
|
3574
|
+
/**
|
|
3575
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3576
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3577
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3578
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3579
|
+
* @example
|
|
3580
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3581
|
+
* ```
|
|
3582
|
+
* script.on_event(defines.events.on_tick,
|
|
3583
|
+
* function(event) game.print(event.tick) end)
|
|
3584
|
+
* ```
|
|
3585
|
+
*
|
|
3586
|
+
* @example
|
|
3587
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3588
|
+
* ```
|
|
3589
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3590
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3591
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3592
|
+
* ```
|
|
3593
|
+
*
|
|
3594
|
+
*/
|
|
3595
|
+
on_event(this: void,
|
|
3596
|
+
event: defines.events.on_pre_ghost_upgraded,
|
|
3597
|
+
handler: (this: void, arg0: runtime.on_pre_ghost_upgraded) => any | null,
|
|
3598
|
+
filters?: EventFilter): void
|
|
3599
|
+
|
|
3600
|
+
/**
|
|
3601
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3602
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3603
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3604
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3605
|
+
* @example
|
|
3606
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3607
|
+
* ```
|
|
3608
|
+
* script.on_event(defines.events.on_tick,
|
|
3609
|
+
* function(event) game.print(event.tick) end)
|
|
3610
|
+
* ```
|
|
3611
|
+
*
|
|
3612
|
+
* @example
|
|
3613
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3614
|
+
* ```
|
|
3615
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3616
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3617
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3618
|
+
* ```
|
|
3619
|
+
*
|
|
3620
|
+
*/
|
|
3621
|
+
on_event(this: void,
|
|
3622
|
+
event: defines.events.on_pre_permission_group_deleted,
|
|
3623
|
+
handler: (this: void, arg0: runtime.on_pre_permission_group_deleted) => any | null,
|
|
3624
|
+
filters?: EventFilter): void
|
|
3625
|
+
|
|
3626
|
+
/**
|
|
3627
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3628
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3629
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3630
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3631
|
+
* @example
|
|
3632
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3633
|
+
* ```
|
|
3634
|
+
* script.on_event(defines.events.on_tick,
|
|
3635
|
+
* function(event) game.print(event.tick) end)
|
|
3636
|
+
* ```
|
|
3637
|
+
*
|
|
3638
|
+
* @example
|
|
3639
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3640
|
+
* ```
|
|
3641
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3642
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3643
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3644
|
+
* ```
|
|
3645
|
+
*
|
|
3646
|
+
*/
|
|
3647
|
+
on_event(this: void,
|
|
3648
|
+
event: defines.events.on_pre_permission_string_imported,
|
|
3649
|
+
handler: (this: void, arg0: runtime.on_pre_permission_string_imported) => any | null,
|
|
3650
|
+
filters?: EventFilter): void
|
|
3651
|
+
|
|
3652
|
+
/**
|
|
3653
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3654
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3655
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3656
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3657
|
+
* @example
|
|
3658
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3659
|
+
* ```
|
|
3660
|
+
* script.on_event(defines.events.on_tick,
|
|
3661
|
+
* function(event) game.print(event.tick) end)
|
|
3662
|
+
* ```
|
|
3663
|
+
*
|
|
3664
|
+
* @example
|
|
3665
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3666
|
+
* ```
|
|
3667
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3668
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3669
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3670
|
+
* ```
|
|
3671
|
+
*
|
|
3672
|
+
*/
|
|
3673
|
+
on_event(this: void,
|
|
3674
|
+
event: defines.events.on_pre_player_crafted_item,
|
|
3675
|
+
handler: (this: void, arg0: runtime.on_pre_player_crafted_item) => any | null,
|
|
3676
|
+
filters?: EventFilter): void
|
|
3677
|
+
|
|
3678
|
+
/**
|
|
3679
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3680
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3681
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3682
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3683
|
+
* @example
|
|
3684
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3685
|
+
* ```
|
|
3686
|
+
* script.on_event(defines.events.on_tick,
|
|
3687
|
+
* function(event) game.print(event.tick) end)
|
|
3688
|
+
* ```
|
|
3689
|
+
*
|
|
3690
|
+
* @example
|
|
3691
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3692
|
+
* ```
|
|
3693
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3694
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3695
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3696
|
+
* ```
|
|
3697
|
+
*
|
|
3698
|
+
*/
|
|
3699
|
+
on_event(this: void,
|
|
3700
|
+
event: defines.events.on_pre_player_died,
|
|
3701
|
+
handler: (this: void, arg0: runtime.on_pre_player_died) => any | null,
|
|
3702
|
+
filters?: EventFilter): void
|
|
3703
|
+
|
|
3704
|
+
/**
|
|
3705
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3706
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3707
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3708
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3709
|
+
* @example
|
|
3710
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3711
|
+
* ```
|
|
3712
|
+
* script.on_event(defines.events.on_tick,
|
|
3713
|
+
* function(event) game.print(event.tick) end)
|
|
3714
|
+
* ```
|
|
3715
|
+
*
|
|
3716
|
+
* @example
|
|
3717
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3718
|
+
* ```
|
|
3719
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3720
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3721
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3722
|
+
* ```
|
|
3723
|
+
*
|
|
3724
|
+
*/
|
|
3725
|
+
on_event(this: void,
|
|
3726
|
+
event: defines.events.on_pre_player_left_game,
|
|
3727
|
+
handler: (this: void, arg0: runtime.on_pre_player_left_game) => any | null,
|
|
3728
|
+
filters?: EventFilter): void
|
|
3729
|
+
|
|
3730
|
+
/**
|
|
3731
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3732
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3733
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3734
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3735
|
+
* @example
|
|
3736
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3737
|
+
* ```
|
|
3738
|
+
* script.on_event(defines.events.on_tick,
|
|
3739
|
+
* function(event) game.print(event.tick) end)
|
|
3740
|
+
* ```
|
|
3741
|
+
*
|
|
3742
|
+
* @example
|
|
3743
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3744
|
+
* ```
|
|
3745
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3746
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3747
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3748
|
+
* ```
|
|
3749
|
+
*
|
|
3750
|
+
*/
|
|
3751
|
+
on_event(this: void,
|
|
3752
|
+
event: defines.events.on_pre_player_mined_item,
|
|
3753
|
+
handler: (this: void, arg0: runtime.on_pre_player_mined_item) => any | null,
|
|
3754
|
+
filters?: EventFilter): void
|
|
3755
|
+
|
|
3756
|
+
/**
|
|
3757
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3758
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3759
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3760
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3761
|
+
* @example
|
|
3762
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3763
|
+
* ```
|
|
3764
|
+
* script.on_event(defines.events.on_tick,
|
|
3765
|
+
* function(event) game.print(event.tick) end)
|
|
3766
|
+
* ```
|
|
3767
|
+
*
|
|
3768
|
+
* @example
|
|
3769
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3770
|
+
* ```
|
|
3771
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3772
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3773
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3774
|
+
* ```
|
|
3775
|
+
*
|
|
3776
|
+
*/
|
|
3777
|
+
on_event(this: void,
|
|
3778
|
+
event: defines.events.on_pre_player_removed,
|
|
3779
|
+
handler: (this: void, arg0: runtime.on_pre_player_removed) => any | null,
|
|
3780
|
+
filters?: EventFilter): void
|
|
3781
|
+
|
|
3782
|
+
/**
|
|
3783
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3784
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3785
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3786
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3787
|
+
* @example
|
|
3788
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3789
|
+
* ```
|
|
3790
|
+
* script.on_event(defines.events.on_tick,
|
|
3791
|
+
* function(event) game.print(event.tick) end)
|
|
3792
|
+
* ```
|
|
3793
|
+
*
|
|
3794
|
+
* @example
|
|
3795
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3796
|
+
* ```
|
|
3797
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3798
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3799
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3800
|
+
* ```
|
|
3801
|
+
*
|
|
3802
|
+
*/
|
|
3803
|
+
on_event(this: void,
|
|
3804
|
+
event: defines.events.on_pre_player_toggled_map_editor,
|
|
3805
|
+
handler: (this: void, arg0: runtime.on_pre_player_toggled_map_editor) => any | null,
|
|
3806
|
+
filters?: EventFilter): void
|
|
3807
|
+
|
|
3808
|
+
/**
|
|
3809
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3810
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3811
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3812
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3813
|
+
* @example
|
|
3814
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3815
|
+
* ```
|
|
3816
|
+
* script.on_event(defines.events.on_tick,
|
|
3817
|
+
* function(event) game.print(event.tick) end)
|
|
3818
|
+
* ```
|
|
3819
|
+
*
|
|
3820
|
+
* @example
|
|
3821
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3822
|
+
* ```
|
|
3823
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3824
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3825
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3826
|
+
* ```
|
|
3827
|
+
*
|
|
3828
|
+
*/
|
|
3829
|
+
on_event(this: void,
|
|
3830
|
+
event: defines.events.on_pre_robot_exploded_cliff,
|
|
3831
|
+
handler: (this: void, arg0: runtime.on_pre_robot_exploded_cliff) => any | null,
|
|
3832
|
+
filters?: EventFilter): void
|
|
3833
|
+
|
|
3834
|
+
/**
|
|
3835
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3836
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3837
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3838
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3839
|
+
* @example
|
|
3840
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3841
|
+
* ```
|
|
3842
|
+
* script.on_event(defines.events.on_tick,
|
|
3843
|
+
* function(event) game.print(event.tick) end)
|
|
3844
|
+
* ```
|
|
3845
|
+
*
|
|
3846
|
+
* @example
|
|
3847
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3848
|
+
* ```
|
|
3849
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3850
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3851
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3852
|
+
* ```
|
|
3853
|
+
*
|
|
3854
|
+
*/
|
|
3855
|
+
on_event(this: void,
|
|
3856
|
+
event: defines.events.on_pre_script_inventory_resized,
|
|
3857
|
+
handler: (this: void, arg0: runtime.on_pre_script_inventory_resized) => any | null,
|
|
3858
|
+
filters?: EventFilter): void
|
|
3859
|
+
|
|
3860
|
+
/**
|
|
3861
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3862
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3863
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3864
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3865
|
+
* @example
|
|
3866
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3867
|
+
* ```
|
|
3868
|
+
* script.on_event(defines.events.on_tick,
|
|
3869
|
+
* function(event) game.print(event.tick) end)
|
|
3870
|
+
* ```
|
|
3871
|
+
*
|
|
3872
|
+
* @example
|
|
3873
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3874
|
+
* ```
|
|
3875
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3876
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3877
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3878
|
+
* ```
|
|
3879
|
+
*
|
|
3880
|
+
*/
|
|
3881
|
+
on_event(this: void,
|
|
3882
|
+
event: defines.events.on_pre_surface_cleared,
|
|
3883
|
+
handler: (this: void, arg0: runtime.on_pre_surface_cleared) => any | null,
|
|
3884
|
+
filters?: EventFilter): void
|
|
3885
|
+
|
|
3886
|
+
/**
|
|
3887
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3888
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3889
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3890
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3891
|
+
* @example
|
|
3892
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3893
|
+
* ```
|
|
3894
|
+
* script.on_event(defines.events.on_tick,
|
|
3895
|
+
* function(event) game.print(event.tick) end)
|
|
3896
|
+
* ```
|
|
3897
|
+
*
|
|
3898
|
+
* @example
|
|
3899
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3900
|
+
* ```
|
|
3901
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3902
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3903
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3904
|
+
* ```
|
|
3905
|
+
*
|
|
3906
|
+
*/
|
|
3907
|
+
on_event(this: void,
|
|
3908
|
+
event: defines.events.on_pre_surface_deleted,
|
|
3909
|
+
handler: (this: void, arg0: runtime.on_pre_surface_deleted) => any | null,
|
|
3910
|
+
filters?: EventFilter): void
|
|
3911
|
+
|
|
3912
|
+
/**
|
|
3913
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3914
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3915
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3916
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3917
|
+
* @example
|
|
3918
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3919
|
+
* ```
|
|
3920
|
+
* script.on_event(defines.events.on_tick,
|
|
3921
|
+
* function(event) game.print(event.tick) end)
|
|
3922
|
+
* ```
|
|
3923
|
+
*
|
|
3924
|
+
* @example
|
|
3925
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3926
|
+
* ```
|
|
3927
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3928
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3929
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3930
|
+
* ```
|
|
3931
|
+
*
|
|
3932
|
+
*/
|
|
3933
|
+
on_event(this: void,
|
|
3934
|
+
event: defines.events.on_research_cancelled,
|
|
3935
|
+
handler: (this: void, arg0: runtime.on_research_cancelled) => any | null,
|
|
3936
|
+
filters?: EventFilter): void
|
|
3937
|
+
|
|
3938
|
+
/**
|
|
3939
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3940
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3941
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3942
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3943
|
+
* @example
|
|
3944
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3945
|
+
* ```
|
|
3946
|
+
* script.on_event(defines.events.on_tick,
|
|
3947
|
+
* function(event) game.print(event.tick) end)
|
|
3948
|
+
* ```
|
|
3949
|
+
*
|
|
3950
|
+
* @example
|
|
3951
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3952
|
+
* ```
|
|
3953
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3954
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3955
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3956
|
+
* ```
|
|
3957
|
+
*
|
|
3958
|
+
*/
|
|
3959
|
+
on_event(this: void,
|
|
3960
|
+
event: defines.events.on_research_finished,
|
|
3961
|
+
handler: (this: void, arg0: runtime.on_research_finished) => any | null,
|
|
3962
|
+
filters?: EventFilter): void
|
|
3963
|
+
|
|
3964
|
+
/**
|
|
3965
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3966
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3967
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3968
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3969
|
+
* @example
|
|
3970
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3971
|
+
* ```
|
|
3972
|
+
* script.on_event(defines.events.on_tick,
|
|
3973
|
+
* function(event) game.print(event.tick) end)
|
|
3974
|
+
* ```
|
|
3975
|
+
*
|
|
3976
|
+
* @example
|
|
3977
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
3978
|
+
* ```
|
|
3979
|
+
* script.on_event(defines.events.on_built_entity,
|
|
3980
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
3981
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
3982
|
+
* ```
|
|
3983
|
+
*
|
|
3984
|
+
*/
|
|
3985
|
+
on_event(this: void,
|
|
3986
|
+
event: defines.events.on_research_reversed,
|
|
3987
|
+
handler: (this: void, arg0: runtime.on_research_reversed) => any | null,
|
|
3988
|
+
filters?: EventFilter): void
|
|
3989
|
+
|
|
3990
|
+
/**
|
|
3991
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
3992
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
3993
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
3994
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
3995
|
+
* @example
|
|
3996
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
3997
|
+
* ```
|
|
3998
|
+
* script.on_event(defines.events.on_tick,
|
|
3999
|
+
* function(event) game.print(event.tick) end)
|
|
4000
|
+
* ```
|
|
4001
|
+
*
|
|
4002
|
+
* @example
|
|
4003
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4004
|
+
* ```
|
|
4005
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4006
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4007
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4008
|
+
* ```
|
|
4009
|
+
*
|
|
4010
|
+
*/
|
|
4011
|
+
on_event(this: void,
|
|
4012
|
+
event: defines.events.on_research_started,
|
|
4013
|
+
handler: (this: void, arg0: runtime.on_research_started) => any | null,
|
|
4014
|
+
filters?: EventFilter): void
|
|
4015
|
+
|
|
4016
|
+
/**
|
|
4017
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4018
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4019
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4020
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4021
|
+
* @example
|
|
4022
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4023
|
+
* ```
|
|
4024
|
+
* script.on_event(defines.events.on_tick,
|
|
4025
|
+
* function(event) game.print(event.tick) end)
|
|
4026
|
+
* ```
|
|
4027
|
+
*
|
|
4028
|
+
* @example
|
|
4029
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4030
|
+
* ```
|
|
4031
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4032
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4033
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4034
|
+
* ```
|
|
4035
|
+
*
|
|
4036
|
+
*/
|
|
4037
|
+
on_event(this: void,
|
|
4038
|
+
event: defines.events.on_resource_depleted,
|
|
4039
|
+
handler: (this: void, arg0: runtime.on_resource_depleted) => any | null,
|
|
4040
|
+
filters?: EventFilter): void
|
|
4041
|
+
|
|
4042
|
+
/**
|
|
4043
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4044
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4045
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4046
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4047
|
+
* @example
|
|
4048
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4049
|
+
* ```
|
|
4050
|
+
* script.on_event(defines.events.on_tick,
|
|
4051
|
+
* function(event) game.print(event.tick) end)
|
|
4052
|
+
* ```
|
|
4053
|
+
*
|
|
4054
|
+
* @example
|
|
4055
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4056
|
+
* ```
|
|
4057
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4058
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4059
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4060
|
+
* ```
|
|
4061
|
+
*
|
|
4062
|
+
*/
|
|
4063
|
+
on_event(this: void,
|
|
4064
|
+
event: defines.events.on_robot_built_entity,
|
|
4065
|
+
handler: (this: void, arg0: runtime.on_robot_built_entity) => any | null,
|
|
4066
|
+
filters?: EventFilter): void
|
|
4067
|
+
|
|
4068
|
+
/**
|
|
4069
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4070
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4071
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4072
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4073
|
+
* @example
|
|
4074
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4075
|
+
* ```
|
|
4076
|
+
* script.on_event(defines.events.on_tick,
|
|
4077
|
+
* function(event) game.print(event.tick) end)
|
|
4078
|
+
* ```
|
|
4079
|
+
*
|
|
4080
|
+
* @example
|
|
4081
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4082
|
+
* ```
|
|
4083
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4084
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4085
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4086
|
+
* ```
|
|
4087
|
+
*
|
|
4088
|
+
*/
|
|
4089
|
+
on_event(this: void,
|
|
4090
|
+
event: defines.events.on_robot_built_tile,
|
|
4091
|
+
handler: (this: void, arg0: runtime.on_robot_built_tile) => any | null,
|
|
4092
|
+
filters?: EventFilter): void
|
|
4093
|
+
|
|
4094
|
+
/**
|
|
4095
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4096
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4097
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4098
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4099
|
+
* @example
|
|
4100
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4101
|
+
* ```
|
|
4102
|
+
* script.on_event(defines.events.on_tick,
|
|
4103
|
+
* function(event) game.print(event.tick) end)
|
|
4104
|
+
* ```
|
|
4105
|
+
*
|
|
4106
|
+
* @example
|
|
4107
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4108
|
+
* ```
|
|
4109
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4110
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4111
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4112
|
+
* ```
|
|
4113
|
+
*
|
|
4114
|
+
*/
|
|
4115
|
+
on_event(this: void,
|
|
4116
|
+
event: defines.events.on_robot_exploded_cliff,
|
|
4117
|
+
handler: (this: void, arg0: runtime.on_robot_exploded_cliff) => any | null,
|
|
4118
|
+
filters?: EventFilter): void
|
|
4119
|
+
|
|
4120
|
+
/**
|
|
4121
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4122
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4123
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4124
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4125
|
+
* @example
|
|
4126
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4127
|
+
* ```
|
|
4128
|
+
* script.on_event(defines.events.on_tick,
|
|
4129
|
+
* function(event) game.print(event.tick) end)
|
|
4130
|
+
* ```
|
|
4131
|
+
*
|
|
4132
|
+
* @example
|
|
4133
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4134
|
+
* ```
|
|
4135
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4136
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4137
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4138
|
+
* ```
|
|
4139
|
+
*
|
|
4140
|
+
*/
|
|
4141
|
+
on_event(this: void,
|
|
4142
|
+
event: defines.events.on_robot_mined,
|
|
4143
|
+
handler: (this: void, arg0: runtime.on_robot_mined) => any | null,
|
|
4144
|
+
filters?: EventFilter): void
|
|
4145
|
+
|
|
4146
|
+
/**
|
|
4147
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4148
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4149
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4150
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4151
|
+
* @example
|
|
4152
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4153
|
+
* ```
|
|
4154
|
+
* script.on_event(defines.events.on_tick,
|
|
4155
|
+
* function(event) game.print(event.tick) end)
|
|
4156
|
+
* ```
|
|
4157
|
+
*
|
|
4158
|
+
* @example
|
|
4159
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4160
|
+
* ```
|
|
4161
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4162
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4163
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4164
|
+
* ```
|
|
4165
|
+
*
|
|
4166
|
+
*/
|
|
4167
|
+
on_event(this: void,
|
|
4168
|
+
event: defines.events.on_robot_mined_entity,
|
|
4169
|
+
handler: (this: void, arg0: runtime.on_robot_mined_entity) => any | null,
|
|
4170
|
+
filters?: EventFilter): void
|
|
4171
|
+
|
|
4172
|
+
/**
|
|
4173
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4174
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4175
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4176
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4177
|
+
* @example
|
|
4178
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4179
|
+
* ```
|
|
4180
|
+
* script.on_event(defines.events.on_tick,
|
|
4181
|
+
* function(event) game.print(event.tick) end)
|
|
4182
|
+
* ```
|
|
4183
|
+
*
|
|
4184
|
+
* @example
|
|
4185
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4186
|
+
* ```
|
|
4187
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4188
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4189
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4190
|
+
* ```
|
|
4191
|
+
*
|
|
4192
|
+
*/
|
|
4193
|
+
on_event(this: void,
|
|
4194
|
+
event: defines.events.on_robot_mined_tile,
|
|
4195
|
+
handler: (this: void, arg0: runtime.on_robot_mined_tile) => any | null,
|
|
4196
|
+
filters?: EventFilter): void
|
|
4197
|
+
|
|
4198
|
+
/**
|
|
4199
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4200
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4201
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4202
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4203
|
+
* @example
|
|
4204
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4205
|
+
* ```
|
|
4206
|
+
* script.on_event(defines.events.on_tick,
|
|
4207
|
+
* function(event) game.print(event.tick) end)
|
|
4208
|
+
* ```
|
|
4209
|
+
*
|
|
4210
|
+
* @example
|
|
4211
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4212
|
+
* ```
|
|
4213
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4214
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4215
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4216
|
+
* ```
|
|
4217
|
+
*
|
|
4218
|
+
*/
|
|
4219
|
+
on_event(this: void,
|
|
4220
|
+
event: defines.events.on_robot_pre_mined,
|
|
4221
|
+
handler: (this: void, arg0: runtime.on_robot_pre_mined) => any | null,
|
|
4222
|
+
filters?: EventFilter): void
|
|
4223
|
+
|
|
4224
|
+
/**
|
|
4225
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4226
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4227
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4228
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4229
|
+
* @example
|
|
4230
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4231
|
+
* ```
|
|
4232
|
+
* script.on_event(defines.events.on_tick,
|
|
4233
|
+
* function(event) game.print(event.tick) end)
|
|
4234
|
+
* ```
|
|
4235
|
+
*
|
|
4236
|
+
* @example
|
|
4237
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4238
|
+
* ```
|
|
4239
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4240
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4241
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4242
|
+
* ```
|
|
4243
|
+
*
|
|
4244
|
+
*/
|
|
4245
|
+
on_event(this: void,
|
|
4246
|
+
event: defines.events.on_rocket_launch_ordered,
|
|
4247
|
+
handler: (this: void, arg0: runtime.on_rocket_launch_ordered) => any | null,
|
|
4248
|
+
filters?: EventFilter): void
|
|
4249
|
+
|
|
4250
|
+
/**
|
|
4251
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4252
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4253
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4254
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4255
|
+
* @example
|
|
4256
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4257
|
+
* ```
|
|
4258
|
+
* script.on_event(defines.events.on_tick,
|
|
4259
|
+
* function(event) game.print(event.tick) end)
|
|
4260
|
+
* ```
|
|
4261
|
+
*
|
|
4262
|
+
* @example
|
|
4263
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4264
|
+
* ```
|
|
4265
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4266
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4267
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4268
|
+
* ```
|
|
4269
|
+
*
|
|
4270
|
+
*/
|
|
4271
|
+
on_event(this: void,
|
|
4272
|
+
event: defines.events.on_rocket_launched,
|
|
4273
|
+
handler: (this: void, arg0: runtime.on_rocket_launched) => any | null,
|
|
4274
|
+
filters?: EventFilter): void
|
|
4275
|
+
|
|
4276
|
+
/**
|
|
4277
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4278
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4279
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4280
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4281
|
+
* @example
|
|
4282
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4283
|
+
* ```
|
|
4284
|
+
* script.on_event(defines.events.on_tick,
|
|
4285
|
+
* function(event) game.print(event.tick) end)
|
|
4286
|
+
* ```
|
|
4287
|
+
*
|
|
4288
|
+
* @example
|
|
4289
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4290
|
+
* ```
|
|
4291
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4292
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4293
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4294
|
+
* ```
|
|
4295
|
+
*
|
|
4296
|
+
*/
|
|
4297
|
+
on_event(this: void,
|
|
4298
|
+
event: defines.events.on_runtime_mod_setting_changed,
|
|
4299
|
+
handler: (this: void, arg0: runtime.on_runtime_mod_setting_changed) => any | null,
|
|
4300
|
+
filters?: EventFilter): void
|
|
4301
|
+
|
|
4302
|
+
/**
|
|
4303
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4304
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4305
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4306
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4307
|
+
* @example
|
|
4308
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4309
|
+
* ```
|
|
4310
|
+
* script.on_event(defines.events.on_tick,
|
|
4311
|
+
* function(event) game.print(event.tick) end)
|
|
4312
|
+
* ```
|
|
4313
|
+
*
|
|
4314
|
+
* @example
|
|
4315
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4316
|
+
* ```
|
|
4317
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4318
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4319
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4320
|
+
* ```
|
|
4321
|
+
*
|
|
4322
|
+
*/
|
|
4323
|
+
on_event(this: void,
|
|
4324
|
+
event: defines.events.on_script_inventory_resized,
|
|
4325
|
+
handler: (this: void, arg0: runtime.on_script_inventory_resized) => any | null,
|
|
4326
|
+
filters?: EventFilter): void
|
|
4327
|
+
|
|
4328
|
+
/**
|
|
4329
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4330
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4331
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4332
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4333
|
+
* @example
|
|
4334
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4335
|
+
* ```
|
|
4336
|
+
* script.on_event(defines.events.on_tick,
|
|
4337
|
+
* function(event) game.print(event.tick) end)
|
|
4338
|
+
* ```
|
|
4339
|
+
*
|
|
4340
|
+
* @example
|
|
4341
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4342
|
+
* ```
|
|
4343
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4344
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4345
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4346
|
+
* ```
|
|
4347
|
+
*
|
|
4348
|
+
*/
|
|
4349
|
+
on_event(this: void,
|
|
4350
|
+
event: defines.events.on_script_path_request_finished,
|
|
4351
|
+
handler: (this: void, arg0: runtime.on_script_path_request_finished) => any | null,
|
|
4352
|
+
filters?: EventFilter): void
|
|
4353
|
+
|
|
4354
|
+
/**
|
|
4355
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4356
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4357
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4358
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4359
|
+
* @example
|
|
4360
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4361
|
+
* ```
|
|
4362
|
+
* script.on_event(defines.events.on_tick,
|
|
4363
|
+
* function(event) game.print(event.tick) end)
|
|
4364
|
+
* ```
|
|
4365
|
+
*
|
|
4366
|
+
* @example
|
|
4367
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4368
|
+
* ```
|
|
4369
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4370
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4371
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4372
|
+
* ```
|
|
4373
|
+
*
|
|
4374
|
+
*/
|
|
4375
|
+
on_event(this: void,
|
|
4376
|
+
event: defines.events.on_script_trigger_effect,
|
|
4377
|
+
handler: (this: void, arg0: runtime.on_script_trigger_effect) => any | null,
|
|
4378
|
+
filters?: EventFilter): void
|
|
4379
|
+
|
|
4380
|
+
/**
|
|
4381
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4382
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4383
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4384
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4385
|
+
* @example
|
|
4386
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4387
|
+
* ```
|
|
4388
|
+
* script.on_event(defines.events.on_tick,
|
|
4389
|
+
* function(event) game.print(event.tick) end)
|
|
4390
|
+
* ```
|
|
4391
|
+
*
|
|
4392
|
+
* @example
|
|
4393
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4394
|
+
* ```
|
|
4395
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4396
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4397
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4398
|
+
* ```
|
|
4399
|
+
*
|
|
4400
|
+
*/
|
|
4401
|
+
on_event(this: void,
|
|
4402
|
+
event: defines.events.on_sector_scanned,
|
|
4403
|
+
handler: (this: void, arg0: runtime.on_sector_scanned) => any | null,
|
|
4404
|
+
filters?: EventFilter): void
|
|
4405
|
+
|
|
4406
|
+
/**
|
|
4407
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4408
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4409
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4410
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4411
|
+
* @example
|
|
4412
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4413
|
+
* ```
|
|
4414
|
+
* script.on_event(defines.events.on_tick,
|
|
4415
|
+
* function(event) game.print(event.tick) end)
|
|
4416
|
+
* ```
|
|
4417
|
+
*
|
|
4418
|
+
* @example
|
|
4419
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4420
|
+
* ```
|
|
4421
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4422
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4423
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4424
|
+
* ```
|
|
4425
|
+
*
|
|
4426
|
+
*/
|
|
4427
|
+
on_event(this: void,
|
|
4428
|
+
event: defines.events.on_selected_entity_changed,
|
|
4429
|
+
handler: (this: void, arg0: runtime.on_selected_entity_changed) => any | null,
|
|
4430
|
+
filters?: EventFilter): void
|
|
4431
|
+
|
|
4432
|
+
/**
|
|
4433
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4434
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4435
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4436
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4437
|
+
* @example
|
|
4438
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4439
|
+
* ```
|
|
4440
|
+
* script.on_event(defines.events.on_tick,
|
|
4441
|
+
* function(event) game.print(event.tick) end)
|
|
4442
|
+
* ```
|
|
4443
|
+
*
|
|
4444
|
+
* @example
|
|
4445
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4446
|
+
* ```
|
|
4447
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4448
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4449
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4450
|
+
* ```
|
|
4451
|
+
*
|
|
4452
|
+
*/
|
|
4453
|
+
on_event(this: void,
|
|
4454
|
+
event: defines.events.on_spider_command_completed,
|
|
4455
|
+
handler: (this: void, arg0: runtime.on_spider_command_completed) => any | null,
|
|
4456
|
+
filters?: EventFilter): void
|
|
4457
|
+
|
|
4458
|
+
/**
|
|
4459
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4460
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4461
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4462
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4463
|
+
* @example
|
|
4464
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4465
|
+
* ```
|
|
4466
|
+
* script.on_event(defines.events.on_tick,
|
|
4467
|
+
* function(event) game.print(event.tick) end)
|
|
4468
|
+
* ```
|
|
4469
|
+
*
|
|
4470
|
+
* @example
|
|
4471
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4472
|
+
* ```
|
|
4473
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4474
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4475
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4476
|
+
* ```
|
|
4477
|
+
*
|
|
4478
|
+
*/
|
|
4479
|
+
on_event(this: void,
|
|
4480
|
+
event: defines.events.on_string_translated,
|
|
4481
|
+
handler: (this: void, arg0: runtime.on_string_translated) => any | null,
|
|
4482
|
+
filters?: EventFilter): void
|
|
4483
|
+
|
|
4484
|
+
/**
|
|
4485
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4486
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4487
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4488
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4489
|
+
* @example
|
|
4490
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4491
|
+
* ```
|
|
4492
|
+
* script.on_event(defines.events.on_tick,
|
|
4493
|
+
* function(event) game.print(event.tick) end)
|
|
4494
|
+
* ```
|
|
4495
|
+
*
|
|
4496
|
+
* @example
|
|
4497
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4498
|
+
* ```
|
|
4499
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4500
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4501
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4502
|
+
* ```
|
|
4503
|
+
*
|
|
4504
|
+
*/
|
|
4505
|
+
on_event(this: void,
|
|
4506
|
+
event: defines.events.on_surface_cleared,
|
|
4507
|
+
handler: (this: void, arg0: runtime.on_surface_cleared) => any | null,
|
|
4508
|
+
filters?: EventFilter): void
|
|
4509
|
+
|
|
4510
|
+
/**
|
|
4511
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4512
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4513
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4514
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4515
|
+
* @example
|
|
4516
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4517
|
+
* ```
|
|
4518
|
+
* script.on_event(defines.events.on_tick,
|
|
4519
|
+
* function(event) game.print(event.tick) end)
|
|
4520
|
+
* ```
|
|
4521
|
+
*
|
|
4522
|
+
* @example
|
|
4523
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4524
|
+
* ```
|
|
4525
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4526
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4527
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4528
|
+
* ```
|
|
4529
|
+
*
|
|
4530
|
+
*/
|
|
4531
|
+
on_event(this: void,
|
|
4532
|
+
event: defines.events.on_surface_created,
|
|
4533
|
+
handler: (this: void, arg0: runtime.on_surface_created) => any | null,
|
|
4534
|
+
filters?: EventFilter): void
|
|
4535
|
+
|
|
4536
|
+
/**
|
|
4537
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4538
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4539
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4540
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4541
|
+
* @example
|
|
4542
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4543
|
+
* ```
|
|
4544
|
+
* script.on_event(defines.events.on_tick,
|
|
4545
|
+
* function(event) game.print(event.tick) end)
|
|
4546
|
+
* ```
|
|
4547
|
+
*
|
|
4548
|
+
* @example
|
|
4549
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4550
|
+
* ```
|
|
4551
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4552
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4553
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4554
|
+
* ```
|
|
4555
|
+
*
|
|
4556
|
+
*/
|
|
4557
|
+
on_event(this: void,
|
|
4558
|
+
event: defines.events.on_surface_deleted,
|
|
4559
|
+
handler: (this: void, arg0: runtime.on_surface_deleted) => any | null,
|
|
4560
|
+
filters?: EventFilter): void
|
|
4561
|
+
|
|
4562
|
+
/**
|
|
4563
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4564
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4565
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4566
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4567
|
+
* @example
|
|
4568
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4569
|
+
* ```
|
|
4570
|
+
* script.on_event(defines.events.on_tick,
|
|
4571
|
+
* function(event) game.print(event.tick) end)
|
|
4572
|
+
* ```
|
|
4573
|
+
*
|
|
4574
|
+
* @example
|
|
4575
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4576
|
+
* ```
|
|
4577
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4578
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4579
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4580
|
+
* ```
|
|
4581
|
+
*
|
|
4582
|
+
*/
|
|
4583
|
+
on_event(this: void,
|
|
4584
|
+
event: defines.events.on_surface_imported,
|
|
4585
|
+
handler: (this: void, arg0: runtime.on_surface_imported) => any | null,
|
|
4586
|
+
filters?: EventFilter): void
|
|
4587
|
+
|
|
4588
|
+
/**
|
|
4589
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4590
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4591
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4592
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4593
|
+
* @example
|
|
4594
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4595
|
+
* ```
|
|
4596
|
+
* script.on_event(defines.events.on_tick,
|
|
4597
|
+
* function(event) game.print(event.tick) end)
|
|
4598
|
+
* ```
|
|
4599
|
+
*
|
|
4600
|
+
* @example
|
|
4601
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4602
|
+
* ```
|
|
4603
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4604
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4605
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4606
|
+
* ```
|
|
4607
|
+
*
|
|
4608
|
+
*/
|
|
4609
|
+
on_event(this: void,
|
|
4610
|
+
event: defines.events.on_surface_renamed,
|
|
4611
|
+
handler: (this: void, arg0: runtime.on_surface_renamed) => any | null,
|
|
4612
|
+
filters?: EventFilter): void
|
|
4613
|
+
|
|
4614
|
+
/**
|
|
4615
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4616
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4617
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4618
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4619
|
+
* @example
|
|
4620
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4621
|
+
* ```
|
|
4622
|
+
* script.on_event(defines.events.on_tick,
|
|
4623
|
+
* function(event) game.print(event.tick) end)
|
|
4624
|
+
* ```
|
|
4625
|
+
*
|
|
4626
|
+
* @example
|
|
4627
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4628
|
+
* ```
|
|
4629
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4630
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4631
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4632
|
+
* ```
|
|
4633
|
+
*
|
|
4634
|
+
*/
|
|
4635
|
+
on_event(this: void,
|
|
4636
|
+
event: defines.events.on_technology_effects_reset,
|
|
4637
|
+
handler: (this: void, arg0: runtime.on_technology_effects_reset) => any | null,
|
|
4638
|
+
filters?: EventFilter): void
|
|
4639
|
+
|
|
4640
|
+
/**
|
|
4641
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4642
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4643
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4644
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4645
|
+
* @example
|
|
4646
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4647
|
+
* ```
|
|
4648
|
+
* script.on_event(defines.events.on_tick,
|
|
4649
|
+
* function(event) game.print(event.tick) end)
|
|
4650
|
+
* ```
|
|
4651
|
+
*
|
|
4652
|
+
* @example
|
|
4653
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4654
|
+
* ```
|
|
4655
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4656
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4657
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4658
|
+
* ```
|
|
4659
|
+
*
|
|
4660
|
+
*/
|
|
4661
|
+
on_event(this: void,
|
|
4662
|
+
event: defines.events.on_tick,
|
|
4663
|
+
handler: (this: void, arg0: runtime.on_tick) => any | null,
|
|
4664
|
+
filters?: EventFilter): void
|
|
4665
|
+
|
|
4666
|
+
/**
|
|
4667
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4668
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4669
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4670
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4671
|
+
* @example
|
|
4672
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4673
|
+
* ```
|
|
4674
|
+
* script.on_event(defines.events.on_tick,
|
|
4675
|
+
* function(event) game.print(event.tick) end)
|
|
4676
|
+
* ```
|
|
4677
|
+
*
|
|
4678
|
+
* @example
|
|
4679
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4680
|
+
* ```
|
|
4681
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4682
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4683
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4684
|
+
* ```
|
|
4685
|
+
*
|
|
4686
|
+
*/
|
|
4687
|
+
on_event(this: void,
|
|
4688
|
+
event: defines.events.on_train_changed_state,
|
|
4689
|
+
handler: (this: void, arg0: runtime.on_train_changed_state) => any | null,
|
|
4690
|
+
filters?: EventFilter): void
|
|
4691
|
+
|
|
4692
|
+
/**
|
|
4693
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4694
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4695
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4696
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4697
|
+
* @example
|
|
4698
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4699
|
+
* ```
|
|
4700
|
+
* script.on_event(defines.events.on_tick,
|
|
4701
|
+
* function(event) game.print(event.tick) end)
|
|
4702
|
+
* ```
|
|
4703
|
+
*
|
|
4704
|
+
* @example
|
|
4705
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4706
|
+
* ```
|
|
4707
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4708
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4709
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4710
|
+
* ```
|
|
4711
|
+
*
|
|
4712
|
+
*/
|
|
4713
|
+
on_event(this: void,
|
|
4714
|
+
event: defines.events.on_train_created,
|
|
4715
|
+
handler: (this: void, arg0: runtime.on_train_created) => any | null,
|
|
4716
|
+
filters?: EventFilter): void
|
|
4717
|
+
|
|
4718
|
+
/**
|
|
4719
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4720
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4721
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4722
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4723
|
+
* @example
|
|
4724
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4725
|
+
* ```
|
|
4726
|
+
* script.on_event(defines.events.on_tick,
|
|
4727
|
+
* function(event) game.print(event.tick) end)
|
|
4728
|
+
* ```
|
|
4729
|
+
*
|
|
4730
|
+
* @example
|
|
4731
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4732
|
+
* ```
|
|
4733
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4734
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4735
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4736
|
+
* ```
|
|
4737
|
+
*
|
|
4738
|
+
*/
|
|
4739
|
+
on_event(this: void,
|
|
4740
|
+
event: defines.events.on_train_schedule_changed,
|
|
4741
|
+
handler: (this: void, arg0: runtime.on_train_schedule_changed) => any | null,
|
|
4742
|
+
filters?: EventFilter): void
|
|
4743
|
+
|
|
4744
|
+
/**
|
|
4745
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4746
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4747
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4748
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4749
|
+
* @example
|
|
4750
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4751
|
+
* ```
|
|
4752
|
+
* script.on_event(defines.events.on_tick,
|
|
4753
|
+
* function(event) game.print(event.tick) end)
|
|
4754
|
+
* ```
|
|
4755
|
+
*
|
|
4756
|
+
* @example
|
|
4757
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4758
|
+
* ```
|
|
4759
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4760
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4761
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4762
|
+
* ```
|
|
4763
|
+
*
|
|
4764
|
+
*/
|
|
4765
|
+
on_event(this: void,
|
|
4766
|
+
event: defines.events.on_trigger_created_entity,
|
|
4767
|
+
handler: (this: void, arg0: runtime.on_trigger_created_entity) => any | null,
|
|
4768
|
+
filters?: EventFilter): void
|
|
4769
|
+
|
|
4770
|
+
/**
|
|
4771
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4772
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4773
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4774
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4775
|
+
* @example
|
|
4776
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4777
|
+
* ```
|
|
4778
|
+
* script.on_event(defines.events.on_tick,
|
|
4779
|
+
* function(event) game.print(event.tick) end)
|
|
4780
|
+
* ```
|
|
4781
|
+
*
|
|
4782
|
+
* @example
|
|
4783
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4784
|
+
* ```
|
|
4785
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4786
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4787
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4788
|
+
* ```
|
|
4789
|
+
*
|
|
4790
|
+
*/
|
|
4791
|
+
on_event(this: void,
|
|
4792
|
+
event: defines.events.on_trigger_fired_artillery,
|
|
4793
|
+
handler: (this: void, arg0: runtime.on_trigger_fired_artillery) => any | null,
|
|
4794
|
+
filters?: EventFilter): void
|
|
4795
|
+
|
|
4796
|
+
/**
|
|
4797
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4798
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4799
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4800
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4801
|
+
* @example
|
|
4802
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4803
|
+
* ```
|
|
4804
|
+
* script.on_event(defines.events.on_tick,
|
|
4805
|
+
* function(event) game.print(event.tick) end)
|
|
4806
|
+
* ```
|
|
4807
|
+
*
|
|
4808
|
+
* @example
|
|
4809
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4810
|
+
* ```
|
|
4811
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4812
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4813
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4814
|
+
* ```
|
|
4815
|
+
*
|
|
4816
|
+
*/
|
|
4817
|
+
on_event(this: void,
|
|
4818
|
+
event: defines.events.on_unit_added_to_group,
|
|
4819
|
+
handler: (this: void, arg0: runtime.on_unit_added_to_group) => any | null,
|
|
4820
|
+
filters?: EventFilter): void
|
|
4821
|
+
|
|
4822
|
+
/**
|
|
4823
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4824
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4825
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4826
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4827
|
+
* @example
|
|
4828
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4829
|
+
* ```
|
|
4830
|
+
* script.on_event(defines.events.on_tick,
|
|
4831
|
+
* function(event) game.print(event.tick) end)
|
|
4832
|
+
* ```
|
|
4833
|
+
*
|
|
4834
|
+
* @example
|
|
4835
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4836
|
+
* ```
|
|
4837
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4838
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4839
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4840
|
+
* ```
|
|
4841
|
+
*
|
|
4842
|
+
*/
|
|
4843
|
+
on_event(this: void,
|
|
4844
|
+
event: defines.events.on_unit_group_created,
|
|
4845
|
+
handler: (this: void, arg0: runtime.on_unit_group_created) => any | null,
|
|
4846
|
+
filters?: EventFilter): void
|
|
4847
|
+
|
|
4848
|
+
/**
|
|
4849
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4850
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4851
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4852
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4853
|
+
* @example
|
|
4854
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4855
|
+
* ```
|
|
4856
|
+
* script.on_event(defines.events.on_tick,
|
|
4857
|
+
* function(event) game.print(event.tick) end)
|
|
4858
|
+
* ```
|
|
4859
|
+
*
|
|
4860
|
+
* @example
|
|
4861
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4862
|
+
* ```
|
|
4863
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4864
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4865
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4866
|
+
* ```
|
|
4867
|
+
*
|
|
4868
|
+
*/
|
|
4869
|
+
on_event(this: void,
|
|
4870
|
+
event: defines.events.on_unit_group_finished_gathering,
|
|
4871
|
+
handler: (this: void, arg0: runtime.on_unit_group_finished_gathering) => any | null,
|
|
4872
|
+
filters?: EventFilter): void
|
|
4873
|
+
|
|
4874
|
+
/**
|
|
4875
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4876
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4877
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4878
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4879
|
+
* @example
|
|
4880
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4881
|
+
* ```
|
|
4882
|
+
* script.on_event(defines.events.on_tick,
|
|
4883
|
+
* function(event) game.print(event.tick) end)
|
|
4884
|
+
* ```
|
|
4885
|
+
*
|
|
4886
|
+
* @example
|
|
4887
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4888
|
+
* ```
|
|
4889
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4890
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4891
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4892
|
+
* ```
|
|
4893
|
+
*
|
|
4894
|
+
*/
|
|
4895
|
+
on_event(this: void,
|
|
4896
|
+
event: defines.events.on_unit_removed_from_group,
|
|
4897
|
+
handler: (this: void, arg0: runtime.on_unit_removed_from_group) => any | null,
|
|
4898
|
+
filters?: EventFilter): void
|
|
4899
|
+
|
|
4900
|
+
/**
|
|
4901
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4902
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4903
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4904
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4905
|
+
* @example
|
|
4906
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4907
|
+
* ```
|
|
4908
|
+
* script.on_event(defines.events.on_tick,
|
|
4909
|
+
* function(event) game.print(event.tick) end)
|
|
4910
|
+
* ```
|
|
4911
|
+
*
|
|
4912
|
+
* @example
|
|
4913
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4914
|
+
* ```
|
|
4915
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4916
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4917
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4918
|
+
* ```
|
|
4919
|
+
*
|
|
4920
|
+
*/
|
|
4921
|
+
on_event(this: void,
|
|
4922
|
+
event: defines.events.on_worker_robot_expired,
|
|
4923
|
+
handler: (this: void, arg0: runtime.on_worker_robot_expired) => any | null,
|
|
4924
|
+
filters?: EventFilter): void
|
|
4925
|
+
|
|
4926
|
+
/**
|
|
4927
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4928
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4929
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4930
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4931
|
+
* @example
|
|
4932
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4933
|
+
* ```
|
|
4934
|
+
* script.on_event(defines.events.on_tick,
|
|
4935
|
+
* function(event) game.print(event.tick) end)
|
|
4936
|
+
* ```
|
|
4937
|
+
*
|
|
4938
|
+
* @example
|
|
4939
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4940
|
+
* ```
|
|
4941
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4942
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4943
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4944
|
+
* ```
|
|
4945
|
+
*
|
|
4946
|
+
*/
|
|
4947
|
+
on_event(this: void,
|
|
4948
|
+
event: defines.events.script_raised_built,
|
|
4949
|
+
handler: (this: void, arg0: runtime.script_raised_built) => any | null,
|
|
4950
|
+
filters?: EventFilter): void
|
|
4951
|
+
|
|
4952
|
+
/**
|
|
4953
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4954
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4955
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4956
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4957
|
+
* @example
|
|
4958
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4959
|
+
* ```
|
|
4960
|
+
* script.on_event(defines.events.on_tick,
|
|
4961
|
+
* function(event) game.print(event.tick) end)
|
|
4962
|
+
* ```
|
|
4963
|
+
*
|
|
4964
|
+
* @example
|
|
4965
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4966
|
+
* ```
|
|
4967
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4968
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4969
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4970
|
+
* ```
|
|
4971
|
+
*
|
|
4972
|
+
*/
|
|
4973
|
+
on_event(this: void,
|
|
4974
|
+
event: defines.events.script_raised_destroy,
|
|
4975
|
+
handler: (this: void, arg0: runtime.script_raised_destroy) => any | null,
|
|
4976
|
+
filters?: EventFilter): void
|
|
4977
|
+
|
|
4978
|
+
/**
|
|
4979
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
4980
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
4981
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
4982
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
4983
|
+
* @example
|
|
4984
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
4985
|
+
* ```
|
|
4986
|
+
* script.on_event(defines.events.on_tick,
|
|
4987
|
+
* function(event) game.print(event.tick) end)
|
|
4988
|
+
* ```
|
|
4989
|
+
*
|
|
4990
|
+
* @example
|
|
4991
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
4992
|
+
* ```
|
|
4993
|
+
* script.on_event(defines.events.on_built_entity,
|
|
4994
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
4995
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
4996
|
+
* ```
|
|
4997
|
+
*
|
|
4998
|
+
*/
|
|
4999
|
+
on_event(this: void,
|
|
5000
|
+
event: defines.events.script_raised_revive,
|
|
5001
|
+
handler: (this: void, arg0: runtime.script_raised_revive) => any | null,
|
|
5002
|
+
filters?: EventFilter): void
|
|
5003
|
+
|
|
5004
|
+
/**
|
|
5005
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
5006
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
5007
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
5008
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
5009
|
+
* @example
|
|
5010
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
5011
|
+
* ```
|
|
5012
|
+
* script.on_event(defines.events.on_tick,
|
|
5013
|
+
* function(event) game.print(event.tick) end)
|
|
5014
|
+
* ```
|
|
5015
|
+
*
|
|
5016
|
+
* @example
|
|
5017
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
5018
|
+
* ```
|
|
5019
|
+
* script.on_event(defines.events.on_built_entity,
|
|
5020
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
5021
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
5022
|
+
* ```
|
|
5023
|
+
*
|
|
5024
|
+
*/
|
|
5025
|
+
on_event(this: void,
|
|
5026
|
+
event: defines.events.script_raised_set_tiles,
|
|
5027
|
+
handler: (this: void, arg0: runtime.script_raised_set_tiles) => any | null,
|
|
5028
|
+
filters?: EventFilter): void
|
|
5029
|
+
|
|
5030
|
+
/**
|
|
5031
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
5032
|
+
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
5033
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
5034
|
+
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
5035
|
+
* @example
|
|
5036
|
+
* Register for the [on_tick](runtime:on_tick) event to print the current tick to console each tick.
|
|
5037
|
+
* ```
|
|
5038
|
+
* script.on_event(defines.events.on_tick,
|
|
5039
|
+
* function(event) game.print(event.tick) end)
|
|
5040
|
+
* ```
|
|
5041
|
+
*
|
|
5042
|
+
* @example
|
|
5043
|
+
* Register for the [on_built_entity](runtime:on_built_entity) event, limiting it to only be received when a `"fast-inserter"` is built.
|
|
5044
|
+
* ```
|
|
5045
|
+
* script.on_event(defines.events.on_built_entity,
|
|
5046
|
+
* function(event) game.print("Gotta go fast!") end,
|
|
5047
|
+
* {{filter = "name", name = "fast-inserter"}})
|
|
5048
|
+
* ```
|
|
5049
|
+
*
|
|
5050
|
+
*/
|
|
5051
|
+
on_event(this: void,
|
|
5052
|
+
event: defines.events.script_raised_teleported,
|
|
5053
|
+
handler: (this: void, arg0: runtime.script_raised_teleported) => any | null,
|
|
5054
|
+
filters?: EventFilter): void
|
|
5055
|
+
|
|
272
5056
|
/**
|
|
273
5057
|
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
274
5058
|
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
@@ -290,7 +5074,7 @@ interface LuaBootstrap {
|
|
|
290
5074
|
* ```
|
|
291
5075
|
*
|
|
292
5076
|
*/
|
|
293
|
-
on_event
|
|
5077
|
+
on_event(this: void,
|
|
294
5078
|
event: defines.events | string | Array<defines.events | string>,
|
|
295
5079
|
handler: (this: void, arg0: EventData) => any | null,
|
|
296
5080
|
filters?: EventFilter): void
|