factorio-types 1.2.57 → 1.2.59

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/dist/events.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 2.0.76
5
+ // Factorio version 2.1.7
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -41,7 +41,7 @@ interface CustomInputEvent {
41
41
  */
42
42
  input_name: string;
43
43
  /**
44
- * Identifier of the event
44
+ * Identifier of the event.
45
45
  */
46
46
  name: defines.events;
47
47
  /**
@@ -55,7 +55,7 @@ interface CustomInputEvent {
55
55
  /**
56
56
  * Tick the event was generated.
57
57
  */
58
- tick: uint32;
58
+ tick: MapTick;
59
59
  }
60
60
  /**
61
61
  * Called when an achievement is gained.
@@ -63,7 +63,7 @@ interface CustomInputEvent {
63
63
  interface on_achievement_gained {
64
64
  achievement: LuaAchievementPrototype;
65
65
  /**
66
- * Identifier of the event
66
+ * Identifier of the event.
67
67
  */
68
68
  name: defines.events;
69
69
  /**
@@ -73,21 +73,21 @@ interface on_achievement_gained {
73
73
  /**
74
74
  * Tick the event was generated.
75
75
  */
76
- tick: uint32;
76
+ tick: MapTick;
77
77
  }
78
78
  /**
79
79
  * Called when a unit/group completes a command.
80
80
  */
81
81
  interface on_ai_command_completed {
82
82
  /**
83
- * Identifier of the event
83
+ * Identifier of the event.
84
84
  */
85
85
  name: defines.events;
86
86
  result: defines.behavior_result;
87
87
  /**
88
88
  * Tick the event was generated.
89
89
  */
90
- tick: uint32;
90
+ tick: MapTick;
91
91
  /**
92
92
  * unit_number/group_number of the unit/group which just completed a command.
93
93
  */
@@ -110,7 +110,7 @@ interface on_area_cloned {
110
110
  destination_force?: LuaForce;
111
111
  destination_surface: LuaSurface;
112
112
  /**
113
- * Identifier of the event
113
+ * Identifier of the event.
114
114
  */
115
115
  name: defines.events;
116
116
  source_area: BoundingBox;
@@ -118,7 +118,7 @@ interface on_area_cloned {
118
118
  /**
119
119
  * Tick the event was generated.
120
120
  */
121
- tick: uint32;
121
+ tick: MapTick;
122
122
  }
123
123
  /**
124
124
  * Called when a biter migration builds a base.
@@ -131,13 +131,50 @@ interface on_biter_base_built {
131
131
  */
132
132
  entity: LuaEntity;
133
133
  /**
134
- * Identifier of the event
134
+ * Identifier of the event.
135
135
  */
136
136
  name: defines.events;
137
137
  /**
138
138
  * Tick the event was generated.
139
139
  */
140
- tick: uint32;
140
+ tick: MapTick;
141
+ }
142
+ /**
143
+ * Called when a blueprint entity is pasted over an existing entity or entity ghost.
144
+ *
145
+ * The entity's settings, rotation, mirroring, wire connections, etc. may have been updated. This event is raised even if no settings actually changed.
146
+ *
147
+ * Note this event is not raised when an entity is upgraded or marked for upgrade, when a new entity is created, or when an entity ghost is instantly revived. {@link on_built_entity | runtime:on_built_entity} is raised instead in those cases.
148
+ */
149
+ interface on_blueprint_settings_pasted {
150
+ /**
151
+ * The entity that was updated. Can be either an entity or an entity ghost.
152
+ */
153
+ entity: LuaEntity;
154
+ /**
155
+ * Whether the blueprint changed the entity's mirroring.
156
+ */
157
+ mirrored: boolean;
158
+ /**
159
+ * Identifier of the event.
160
+ */
161
+ name: defines.events;
162
+ /**
163
+ * The player who pasted the blueprint, if any. `nil` if pasted by script.
164
+ */
165
+ player_index?: uint32;
166
+ /**
167
+ * If the blueprint rotated the entity, provides the entity's direction before the rotation. Note: not provided for rotations due to superforce printing.
168
+ */
169
+ previous_direction?: defines.direction;
170
+ /**
171
+ * Tags from the source blueprint, if any. Only provided for non-ghost entities. For ghost entities, access tags via `entity.tags`.
172
+ */
173
+ tags?: Tags;
174
+ /**
175
+ * Tick the event was generated.
176
+ */
177
+ tick: MapTick;
141
178
  }
142
179
  /**
143
180
  * Called when a set of positions on the map is cloned.
@@ -152,7 +189,7 @@ interface on_brush_cloned {
152
189
  destination_offset: TilePosition;
153
190
  destination_surface: LuaSurface;
154
191
  /**
155
- * Identifier of the event
192
+ * Identifier of the event.
156
193
  */
157
194
  name: defines.events;
158
195
  source_offset: TilePosition;
@@ -161,7 +198,7 @@ interface on_brush_cloned {
161
198
  /**
162
199
  * Tick the event was generated.
163
200
  */
164
- tick: uint32;
201
+ tick: MapTick;
165
202
  }
166
203
  /**
167
204
  * Called when a {@link defines.command.build_base | runtime:defines.command.build_base} command reaches its destination, and before building starts.
@@ -172,13 +209,13 @@ interface on_build_base_arrived {
172
209
  */
173
210
  group?: LuaCommandable;
174
211
  /**
175
- * Identifier of the event
212
+ * Identifier of the event.
176
213
  */
177
214
  name: defines.events;
178
215
  /**
179
216
  * Tick the event was generated.
180
217
  */
181
- tick: uint32;
218
+ tick: MapTick;
182
219
  /**
183
220
  * The unit the command was assigned to.
184
221
  */
@@ -197,7 +234,7 @@ interface on_built_entity {
197
234
  */
198
235
  entity: LuaEntity;
199
236
  /**
200
- * Identifier of the event
237
+ * Identifier of the event.
201
238
  */
202
239
  name: defines.events;
203
240
  /**
@@ -211,7 +248,7 @@ interface on_built_entity {
211
248
  /**
212
249
  * Tick the event was generated.
213
250
  */
214
- tick: uint32;
251
+ tick: MapTick;
215
252
  }
216
253
  /**
217
254
  * Called when the deconstruction of an entity is canceled.
@@ -219,14 +256,14 @@ interface on_built_entity {
219
256
  interface on_cancelled_deconstruction {
220
257
  entity: LuaEntity;
221
258
  /**
222
- * Identifier of the event
259
+ * Identifier of the event.
223
260
  */
224
261
  name: defines.events;
225
262
  player_index?: uint32;
226
263
  /**
227
264
  * Tick the event was generated.
228
265
  */
229
- tick: uint32;
266
+ tick: MapTick;
230
267
  }
231
268
  /**
232
269
  * Called when the upgrade of an entity is canceled.
@@ -234,7 +271,7 @@ interface on_cancelled_deconstruction {
234
271
  interface on_cancelled_upgrade {
235
272
  entity: LuaEntity;
236
273
  /**
237
- * Identifier of the event
274
+ * Identifier of the event.
238
275
  */
239
276
  name: defines.events;
240
277
  player_index?: uint32;
@@ -243,7 +280,7 @@ interface on_cancelled_upgrade {
243
280
  /**
244
281
  * Tick the event was generated.
245
282
  */
246
- tick: uint32;
283
+ tick: MapTick;
247
284
  }
248
285
  /**
249
286
  * Called after a cargo pod has delivered its cargo.
@@ -251,7 +288,7 @@ interface on_cancelled_upgrade {
251
288
  interface on_cargo_pod_delivered_cargo {
252
289
  cargo_pod: LuaEntity;
253
290
  /**
254
- * Identifier of the event
291
+ * Identifier of the event.
255
292
  */
256
293
  name: defines.events;
257
294
  /**
@@ -261,7 +298,7 @@ interface on_cargo_pod_delivered_cargo {
261
298
  /**
262
299
  * Tick the event was generated.
263
300
  */
264
- tick: uint32;
301
+ tick: MapTick;
265
302
  }
266
303
  /**
267
304
  * Called when a cargo pod departs a surface.
@@ -273,7 +310,7 @@ interface on_cargo_pod_finished_ascending {
273
310
  */
274
311
  launched_by_rocket: boolean;
275
312
  /**
276
- * Identifier of the event
313
+ * Identifier of the event.
277
314
  */
278
315
  name: defines.events;
279
316
  /**
@@ -283,7 +320,7 @@ interface on_cargo_pod_finished_ascending {
283
320
  /**
284
321
  * Tick the event was generated.
285
322
  */
286
- tick: uint32;
323
+ tick: MapTick;
287
324
  }
288
325
  /**
289
326
  * Called when a cargo pods lands on a surface, either at a station or on the ground.
@@ -295,7 +332,7 @@ interface on_cargo_pod_finished_descending {
295
332
  */
296
333
  launched_by_rocket: boolean;
297
334
  /**
298
- * Identifier of the event
335
+ * Identifier of the event.
299
336
  */
300
337
  name: defines.events;
301
338
  /**
@@ -305,7 +342,7 @@ interface on_cargo_pod_finished_descending {
305
342
  /**
306
343
  * Tick the event was generated.
307
344
  */
308
- tick: uint32;
345
+ tick: MapTick;
309
346
  }
310
347
  /**
311
348
  * Called when a cargo pod departs from a space platform hub or by another method not attached to a rocket.
@@ -313,7 +350,7 @@ interface on_cargo_pod_finished_descending {
313
350
  interface on_cargo_pod_started_ascending {
314
351
  cargo_pod: LuaEntity;
315
352
  /**
316
- * Identifier of the event
353
+ * Identifier of the event.
317
354
  */
318
355
  name: defines.events;
319
356
  /**
@@ -323,7 +360,7 @@ interface on_cargo_pod_started_ascending {
323
360
  /**
324
361
  * Tick the event was generated.
325
362
  */
326
- tick: uint32;
363
+ tick: MapTick;
327
364
  }
328
365
  /**
329
366
  * Called when a character corpse expires due to timeout or all of the items being removed from it.
@@ -336,13 +373,13 @@ interface on_character_corpse_expired {
336
373
  */
337
374
  corpse: LuaEntity;
338
375
  /**
339
- * Identifier of the event
376
+ * Identifier of the event.
340
377
  */
341
378
  name: defines.events;
342
379
  /**
343
380
  * Tick the event was generated.
344
381
  */
345
- tick: uint32;
382
+ tick: MapTick;
346
383
  }
347
384
  /**
348
385
  * Called when a chart tag is created.
@@ -350,7 +387,7 @@ interface on_character_corpse_expired {
350
387
  interface on_chart_tag_added {
351
388
  force: LuaForce;
352
389
  /**
353
- * Identifier of the event
390
+ * Identifier of the event.
354
391
  */
355
392
  name: defines.events;
356
393
  player_index?: uint32;
@@ -358,7 +395,7 @@ interface on_chart_tag_added {
358
395
  /**
359
396
  * Tick the event was generated.
360
397
  */
361
- tick: uint32;
398
+ tick: MapTick;
362
399
  }
363
400
  /**
364
401
  * Called when a chart tag is modified by a player or by script.
@@ -366,7 +403,7 @@ interface on_chart_tag_added {
366
403
  interface on_chart_tag_modified {
367
404
  force: LuaForce;
368
405
  /**
369
- * Identifier of the event
406
+ * Identifier of the event.
370
407
  */
371
408
  name: defines.events;
372
409
  old_icon: SignalID;
@@ -379,7 +416,7 @@ interface on_chart_tag_modified {
379
416
  /**
380
417
  * Tick the event was generated.
381
418
  */
382
- tick: uint32;
419
+ tick: MapTick;
383
420
  }
384
421
  /**
385
422
  * Called just before a chart tag is deleted.
@@ -387,7 +424,7 @@ interface on_chart_tag_modified {
387
424
  interface on_chart_tag_removed {
388
425
  force: LuaForce;
389
426
  /**
390
- * Identifier of the event
427
+ * Identifier of the event.
391
428
  */
392
429
  name: defines.events;
393
430
  player_index?: uint32;
@@ -395,7 +432,7 @@ interface on_chart_tag_removed {
395
432
  /**
396
433
  * Tick the event was generated.
397
434
  */
398
- tick: uint32;
435
+ tick: MapTick;
399
436
  }
400
437
  /**
401
438
  * Called when a chunk is charted or re-charted.
@@ -407,7 +444,7 @@ interface on_chunk_charted {
407
444
  area: BoundingBox;
408
445
  force: LuaForce;
409
446
  /**
410
- * Identifier of the event
447
+ * Identifier of the event.
411
448
  */
412
449
  name: defines.events;
413
450
  position: ChunkPosition;
@@ -415,14 +452,14 @@ interface on_chunk_charted {
415
452
  /**
416
453
  * Tick the event was generated.
417
454
  */
418
- tick: uint32;
455
+ tick: MapTick;
419
456
  }
420
457
  /**
421
458
  * Called when one or more chunks are deleted using {@link LuaSurface::delete_chunk | runtime:LuaSurface::delete_chunk}.
422
459
  */
423
460
  interface on_chunk_deleted {
424
461
  /**
425
- * Identifier of the event
462
+ * Identifier of the event.
426
463
  */
427
464
  name: defines.events;
428
465
  /**
@@ -433,7 +470,7 @@ interface on_chunk_deleted {
433
470
  /**
434
471
  * Tick the event was generated.
435
472
  */
436
- tick: uint32;
473
+ tick: MapTick;
437
474
  }
438
475
  /**
439
476
  * Called when a chunk is generated.
@@ -444,7 +481,7 @@ interface on_chunk_generated {
444
481
  */
445
482
  area: BoundingBox;
446
483
  /**
447
- * Identifier of the event
484
+ * Identifier of the event.
448
485
  */
449
486
  name: defines.events;
450
487
  /**
@@ -458,14 +495,14 @@ interface on_chunk_generated {
458
495
  /**
459
496
  * Tick the event was generated.
460
497
  */
461
- tick: uint32;
498
+ tick: MapTick;
462
499
  }
463
500
  /**
464
501
  * Called when a combat robot expires through a lack of energy, or timeout.
465
502
  */
466
503
  interface on_combat_robot_expired {
467
504
  /**
468
- * Identifier of the event
505
+ * Identifier of the event.
469
506
  */
470
507
  name: defines.events;
471
508
  /**
@@ -476,7 +513,7 @@ interface on_combat_robot_expired {
476
513
  /**
477
514
  * Tick the event was generated.
478
515
  */
479
- tick: uint32;
516
+ tick: MapTick;
480
517
  }
481
518
  /**
482
519
  * Called when a message is sent to the in-game console, either by a player or through the server interface.
@@ -489,7 +526,7 @@ interface on_console_chat {
489
526
  */
490
527
  message: string;
491
528
  /**
492
- * Identifier of the event
529
+ * Identifier of the event.
493
530
  */
494
531
  name: defines.events;
495
532
  /**
@@ -499,7 +536,7 @@ interface on_console_chat {
499
536
  /**
500
537
  * Tick the event was generated.
501
538
  */
502
- tick: uint32;
539
+ tick: MapTick;
503
540
  }
504
541
  /**
505
542
  * Called when someone enters a command-like message regardless of it being a valid command.
@@ -510,7 +547,7 @@ interface on_console_command {
510
547
  */
511
548
  command: string;
512
549
  /**
513
- * Identifier of the event
550
+ * Identifier of the event.
514
551
  */
515
552
  name: defines.events;
516
553
  /**
@@ -524,14 +561,14 @@ interface on_console_command {
524
561
  /**
525
562
  * Tick the event was generated.
526
563
  */
527
- tick: uint32;
564
+ tick: MapTick;
528
565
  }
529
566
  /**
530
567
  * Called when a cutscene is cancelled by the player or by script.
531
568
  */
532
569
  interface on_cutscene_cancelled {
533
570
  /**
534
- * Identifier of the event
571
+ * Identifier of the event.
535
572
  */
536
573
  name: defines.events;
537
574
  /**
@@ -541,14 +578,14 @@ interface on_cutscene_cancelled {
541
578
  /**
542
579
  * Tick the event was generated.
543
580
  */
544
- tick: uint32;
581
+ tick: MapTick;
545
582
  }
546
583
  /**
547
584
  * Called when a cutscene finishes naturally (was not cancelled).
548
585
  */
549
586
  interface on_cutscene_finished {
550
587
  /**
551
- * Identifier of the event
588
+ * Identifier of the event.
552
589
  */
553
590
  name: defines.events;
554
591
  /**
@@ -558,14 +595,14 @@ interface on_cutscene_finished {
558
595
  /**
559
596
  * Tick the event was generated.
560
597
  */
561
- tick: uint32;
598
+ tick: MapTick;
562
599
  }
563
600
  /**
564
601
  * Called when a cutscene starts.
565
602
  */
566
603
  interface on_cutscene_started {
567
604
  /**
568
- * Identifier of the event
605
+ * Identifier of the event.
569
606
  */
570
607
  name: defines.events;
571
608
  /**
@@ -575,7 +612,7 @@ interface on_cutscene_started {
575
612
  /**
576
613
  * Tick the event was generated.
577
614
  */
578
- tick: uint32;
615
+ tick: MapTick;
579
616
  }
580
617
  /**
581
618
  * Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
@@ -584,7 +621,7 @@ interface on_cutscene_started {
584
621
  */
585
622
  interface on_cutscene_waypoint_reached {
586
623
  /**
587
- * Identifier of the event
624
+ * Identifier of the event.
588
625
  */
589
626
  name: defines.events;
590
627
  /**
@@ -594,7 +631,7 @@ interface on_cutscene_waypoint_reached {
594
631
  /**
595
632
  * Tick the event was generated.
596
633
  */
597
- tick: uint32;
634
+ tick: MapTick;
598
635
  /**
599
636
  * The index of the waypoint we just completed.
600
637
  */
@@ -606,14 +643,14 @@ interface on_cutscene_waypoint_reached {
606
643
  interface on_entity_cloned {
607
644
  destination: LuaEntity;
608
645
  /**
609
- * Identifier of the event
646
+ * Identifier of the event.
610
647
  */
611
648
  name: defines.events;
612
649
  source: LuaEntity;
613
650
  /**
614
651
  * Tick the event was generated.
615
652
  */
616
- tick: uint32;
653
+ tick: MapTick;
617
654
  }
618
655
  /**
619
656
  * Called after an entity has been recolored either by the player or through script.
@@ -626,13 +663,13 @@ interface on_entity_color_changed {
626
663
  */
627
664
  entity: LuaEntity;
628
665
  /**
629
- * Identifier of the event
666
+ * Identifier of the event.
630
667
  */
631
668
  name: defines.events;
632
669
  /**
633
670
  * Tick the event was generated.
634
671
  */
635
- tick: uint32;
672
+ tick: MapTick;
636
673
  }
637
674
  /**
638
675
  * Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
@@ -657,7 +694,7 @@ interface on_entity_damaged {
657
694
  */
658
695
  force?: LuaForce;
659
696
  /**
660
- * Identifier of the event
697
+ * Identifier of the event.
661
698
  */
662
699
  name: defines.events;
663
700
  /**
@@ -671,7 +708,7 @@ interface on_entity_damaged {
671
708
  /**
672
709
  * Tick the event was generated.
673
710
  */
674
- tick: uint32;
711
+ tick: MapTick;
675
712
  }
676
713
  /**
677
714
  * Called when an entity dies.
@@ -698,13 +735,13 @@ interface on_entity_died {
698
735
  */
699
736
  loot: LuaInventory;
700
737
  /**
701
- * Identifier of the event
738
+ * Identifier of the event.
702
739
  */
703
740
  name: defines.events;
704
741
  /**
705
742
  * Tick the event was generated.
706
743
  */
707
- tick: uint32;
744
+ tick: MapTick;
708
745
  }
709
746
  /**
710
747
  * Called when one of an entity's logistic slots changes.
@@ -715,7 +752,7 @@ interface on_entity_logistic_slot_changed {
715
752
  */
716
753
  entity: LuaEntity;
717
754
  /**
718
- * Identifier of the event
755
+ * Identifier of the event.
719
756
  */
720
757
  name: defines.events;
721
758
  /**
@@ -733,7 +770,7 @@ interface on_entity_logistic_slot_changed {
733
770
  /**
734
771
  * Tick the event was generated.
735
772
  */
736
- tick: uint32;
773
+ tick: MapTick;
737
774
  }
738
775
  /**
739
776
  * Called after an entity has been renamed either by the player or through script.
@@ -742,7 +779,7 @@ interface on_entity_renamed {
742
779
  by_script: boolean;
743
780
  entity: LuaEntity;
744
781
  /**
745
- * Identifier of the event
782
+ * Identifier of the event.
746
783
  */
747
784
  name: defines.events;
748
785
  old_name: string;
@@ -753,7 +790,7 @@ interface on_entity_renamed {
753
790
  /**
754
791
  * Tick the event was generated.
755
792
  */
756
- tick: uint32;
793
+ tick: MapTick;
757
794
  }
758
795
  /**
759
796
  * Called after entity copy-paste is done.
@@ -764,7 +801,7 @@ interface on_entity_settings_pasted {
764
801
  */
765
802
  destination: LuaEntity;
766
803
  /**
767
- * Identifier of the event
804
+ * Identifier of the event.
768
805
  */
769
806
  name: defines.events;
770
807
  player_index: uint32;
@@ -775,7 +812,7 @@ interface on_entity_settings_pasted {
775
812
  /**
776
813
  * Tick the event was generated.
777
814
  */
778
- tick: uint32;
815
+ tick: MapTick;
779
816
  }
780
817
  /**
781
818
  * Called when an entity is spawned by a EnemySpawner
@@ -783,14 +820,14 @@ interface on_entity_settings_pasted {
783
820
  interface on_entity_spawned {
784
821
  entity: LuaEntity;
785
822
  /**
786
- * Identifier of the event
823
+ * Identifier of the event.
787
824
  */
788
825
  name: defines.events;
789
826
  spawner: LuaEntity;
790
827
  /**
791
828
  * Tick the event was generated.
792
829
  */
793
- tick: uint32;
830
+ tick: MapTick;
794
831
  }
795
832
  /**
796
833
  * Called after equipment is inserted into an equipment grid.
@@ -805,13 +842,13 @@ interface on_equipment_inserted {
805
842
  */
806
843
  grid: LuaEquipmentGrid;
807
844
  /**
808
- * Identifier of the event
845
+ * Identifier of the event.
809
846
  */
810
847
  name: defines.events;
811
848
  /**
812
849
  * Tick the event was generated.
813
850
  */
814
- tick: uint32;
851
+ tick: MapTick;
815
852
  }
816
853
  /**
817
854
  * Called after equipment is removed from an equipment grid.
@@ -830,7 +867,7 @@ interface on_equipment_removed {
830
867
  */
831
868
  grid: LuaEquipmentGrid;
832
869
  /**
833
- * Identifier of the event
870
+ * Identifier of the event.
834
871
  */
835
872
  name: defines.events;
836
873
  /**
@@ -840,7 +877,7 @@ interface on_equipment_removed {
840
877
  /**
841
878
  * Tick the event was generated.
842
879
  */
843
- tick: uint32;
880
+ tick: MapTick;
844
881
  }
845
882
  /**
846
883
  * Called when the a forces cease fire values change.
@@ -855,7 +892,7 @@ interface on_force_cease_fire_changed {
855
892
  */
856
893
  force: LuaForce;
857
894
  /**
858
- * Identifier of the event
895
+ * Identifier of the event.
859
896
  */
860
897
  name: defines.events;
861
898
  /**
@@ -865,7 +902,7 @@ interface on_force_cease_fire_changed {
865
902
  /**
866
903
  * Tick the event was generated.
867
904
  */
868
- tick: uint32;
905
+ tick: MapTick;
869
906
  }
870
907
  /**
871
908
  * Called when a new force is created using `game.create_force()`
@@ -878,13 +915,13 @@ interface on_force_created {
878
915
  */
879
916
  force: LuaForce;
880
917
  /**
881
- * Identifier of the event
918
+ * Identifier of the event.
882
919
  */
883
920
  name: defines.events;
884
921
  /**
885
922
  * Tick the event was generated.
886
923
  */
887
- tick: uint32;
924
+ tick: MapTick;
888
925
  }
889
926
  /**
890
927
  * Called when the a forces friends change.
@@ -899,7 +936,7 @@ interface on_force_friends_changed {
899
936
  */
900
937
  force: LuaForce;
901
938
  /**
902
- * Identifier of the event
939
+ * Identifier of the event.
903
940
  */
904
941
  name: defines.events;
905
942
  /**
@@ -909,7 +946,7 @@ interface on_force_friends_changed {
909
946
  /**
910
947
  * Tick the event was generated.
911
948
  */
912
- tick: uint32;
949
+ tick: MapTick;
913
950
  }
914
951
  /**
915
952
  * Called when {@link LuaForce::reset | runtime:LuaForce::reset} is finished.
@@ -917,13 +954,13 @@ interface on_force_friends_changed {
917
954
  interface on_force_reset {
918
955
  force: LuaForce;
919
956
  /**
920
- * Identifier of the event
957
+ * Identifier of the event.
921
958
  */
922
959
  name: defines.events;
923
960
  /**
924
961
  * Tick the event was generated.
925
962
  */
926
- tick: uint32;
963
+ tick: MapTick;
927
964
  }
928
965
  /**
929
966
  * Called after two forces have been merged using `game.merge_forces()`.
@@ -936,7 +973,7 @@ interface on_forces_merged {
936
973
  */
937
974
  destination: LuaForce;
938
975
  /**
939
- * Identifier of the event
976
+ * Identifier of the event.
940
977
  */
941
978
  name: defines.events;
942
979
  /**
@@ -950,7 +987,7 @@ interface on_forces_merged {
950
987
  /**
951
988
  * Tick the event was generated.
952
989
  */
953
- tick: uint32;
990
+ tick: MapTick;
954
991
  }
955
992
  /**
956
993
  * Called when two forces are about to be merged using `game.merge_forces()`.
@@ -961,7 +998,7 @@ interface on_forces_merging {
961
998
  */
962
999
  destination: LuaForce;
963
1000
  /**
964
- * Identifier of the event
1001
+ * Identifier of the event.
965
1002
  */
966
1003
  name: defines.events;
967
1004
  /**
@@ -971,7 +1008,7 @@ interface on_forces_merging {
971
1008
  /**
972
1009
  * Tick the event was generated.
973
1010
  */
974
- tick: uint32;
1011
+ tick: MapTick;
975
1012
  }
976
1013
  /**
977
1014
  * Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data already includes it. In those cases however, {@link LuaBootstrap::on_init | runtime:LuaBootstrap::on_init} is not fired.
@@ -980,13 +1017,13 @@ interface on_forces_merging {
980
1017
  */
981
1018
  interface on_game_created_from_scenario {
982
1019
  /**
983
- * Identifier of the event
1020
+ * Identifier of the event.
984
1021
  */
985
1022
  name: defines.events;
986
1023
  /**
987
1024
  * Tick the event was generated.
988
1025
  */
989
- tick: uint32;
1026
+ tick: MapTick;
990
1027
  }
991
1028
  /**
992
1029
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
@@ -997,7 +1034,7 @@ interface on_gui_checked_state_changed {
997
1034
  */
998
1035
  element: LuaGuiElement;
999
1036
  /**
1000
- * Identifier of the event
1037
+ * Identifier of the event.
1001
1038
  */
1002
1039
  name: defines.events;
1003
1040
  /**
@@ -1007,7 +1044,7 @@ interface on_gui_checked_state_changed {
1007
1044
  /**
1008
1045
  * Tick the event was generated.
1009
1046
  */
1010
- tick: uint32;
1047
+ tick: MapTick;
1011
1048
  }
1012
1049
  /**
1013
1050
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} is clicked.
@@ -1034,7 +1071,7 @@ interface on_gui_click {
1034
1071
  */
1035
1072
  element: LuaGuiElement;
1036
1073
  /**
1037
- * Identifier of the event
1074
+ * Identifier of the event.
1038
1075
  */
1039
1076
  name: defines.events;
1040
1077
  /**
@@ -1048,7 +1085,7 @@ interface on_gui_click {
1048
1085
  /**
1049
1086
  * Tick the event was generated.
1050
1087
  */
1051
- tick: uint32;
1088
+ tick: MapTick;
1052
1089
  }
1053
1090
  /**
1054
1091
  * Called when the player closes the GUI they have open.
@@ -1083,7 +1120,7 @@ interface on_gui_closed {
1083
1120
  */
1084
1121
  item?: LuaItemStack;
1085
1122
  /**
1086
- * Identifier of the event
1123
+ * Identifier of the event.
1087
1124
  */
1088
1125
  name: defines.events;
1089
1126
  /**
@@ -1101,7 +1138,7 @@ interface on_gui_closed {
1101
1138
  /**
1102
1139
  * Tick the event was generated.
1103
1140
  */
1104
- tick: uint32;
1141
+ tick: MapTick;
1105
1142
  /**
1106
1143
  * The position of the tile whose GUI was closed.
1107
1144
  */
@@ -1124,7 +1161,7 @@ interface on_gui_confirmed {
1124
1161
  */
1125
1162
  element: LuaGuiElement;
1126
1163
  /**
1127
- * Identifier of the event
1164
+ * Identifier of the event.
1128
1165
  */
1129
1166
  name: defines.events;
1130
1167
  /**
@@ -1138,7 +1175,7 @@ interface on_gui_confirmed {
1138
1175
  /**
1139
1176
  * Tick the event was generated.
1140
1177
  */
1141
- tick: uint32;
1178
+ tick: MapTick;
1142
1179
  }
1143
1180
  /**
1144
1181
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} element value is changed (related to choose element buttons).
@@ -1149,7 +1186,7 @@ interface on_gui_elem_changed {
1149
1186
  */
1150
1187
  element: LuaGuiElement;
1151
1188
  /**
1152
- * Identifier of the event
1189
+ * Identifier of the event.
1153
1190
  */
1154
1191
  name: defines.events;
1155
1192
  /**
@@ -1159,7 +1196,7 @@ interface on_gui_elem_changed {
1159
1196
  /**
1160
1197
  * Tick the event was generated.
1161
1198
  */
1162
- tick: uint32;
1199
+ tick: MapTick;
1163
1200
  }
1164
1201
  /**
1165
1202
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} is hovered by the mouse.
@@ -1172,7 +1209,7 @@ interface on_gui_hover {
1172
1209
  */
1173
1210
  element: LuaGuiElement;
1174
1211
  /**
1175
- * Identifier of the event
1212
+ * Identifier of the event.
1176
1213
  */
1177
1214
  name: defines.events;
1178
1215
  /**
@@ -1182,7 +1219,64 @@ interface on_gui_hover {
1182
1219
  /**
1183
1220
  * Tick the event was generated.
1184
1221
  */
1185
- tick: uint32;
1222
+ tick: MapTick;
1223
+ }
1224
+ /**
1225
+ * Called when a player interacts with a custom inventory GUI.
1226
+ */
1227
+ interface on_gui_inventory_action {
1228
+ /**
1229
+ * The action performed.
1230
+ */
1231
+ action: defines.inventory_actions;
1232
+ /**
1233
+ * If alt was pressed.
1234
+ */
1235
+ alt: boolean;
1236
+ /**
1237
+ * The final mouse button used if any.
1238
+ */
1239
+ button: defines.mouse_button_type;
1240
+ /**
1241
+ * If control was pressed.
1242
+ */
1243
+ control: boolean;
1244
+ /**
1245
+ * The inventory element interacted with.
1246
+ */
1247
+ element: LuaGuiElement;
1248
+ /**
1249
+ * The item clicked on.
1250
+ */
1251
+ item?: LuaItemPrototype;
1252
+ /**
1253
+ * The item number clicked on (if it had one).
1254
+ */
1255
+ item_number?: uint32;
1256
+ /**
1257
+ * Identifier of the event.
1258
+ */
1259
+ name: defines.events;
1260
+ /**
1261
+ * The player doing the action.
1262
+ */
1263
+ player_index: uint32;
1264
+ /**
1265
+ * The item quality clicked on.
1266
+ */
1267
+ quality?: LuaQualityPrototype;
1268
+ /**
1269
+ * If shift was pressed.
1270
+ */
1271
+ shift: boolean;
1272
+ /**
1273
+ * The slot index that was interacted with.
1274
+ */
1275
+ slot: uint32;
1276
+ /**
1277
+ * Tick the event was generated.
1278
+ */
1279
+ tick: MapTick;
1186
1280
  }
1187
1281
  /**
1188
1282
  * Called when the player's cursor leaves a {@link LuaGuiElement | runtime:LuaGuiElement} that was previously hovered.
@@ -1195,7 +1289,7 @@ interface on_gui_leave {
1195
1289
  */
1196
1290
  element: LuaGuiElement;
1197
1291
  /**
1198
- * Identifier of the event
1292
+ * Identifier of the event.
1199
1293
  */
1200
1294
  name: defines.events;
1201
1295
  /**
@@ -1205,7 +1299,7 @@ interface on_gui_leave {
1205
1299
  /**
1206
1300
  * Tick the event was generated.
1207
1301
  */
1208
- tick: uint32;
1302
+ tick: MapTick;
1209
1303
  }
1210
1304
  /**
1211
1305
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
@@ -1216,7 +1310,7 @@ interface on_gui_location_changed {
1216
1310
  */
1217
1311
  element: LuaGuiElement;
1218
1312
  /**
1219
- * Identifier of the event
1313
+ * Identifier of the event.
1220
1314
  */
1221
1315
  name: defines.events;
1222
1316
  /**
@@ -1226,7 +1320,7 @@ interface on_gui_location_changed {
1226
1320
  /**
1227
1321
  * Tick the event was generated.
1228
1322
  */
1229
- tick: uint32;
1323
+ tick: MapTick;
1230
1324
  }
1231
1325
  /**
1232
1326
  * Called when the player opens a GUI.
@@ -1257,7 +1351,7 @@ interface on_gui_opened {
1257
1351
  */
1258
1352
  item?: LuaItemStack;
1259
1353
  /**
1260
- * Identifier of the event
1354
+ * Identifier of the event.
1261
1355
  */
1262
1356
  name: defines.events;
1263
1357
  /**
@@ -1265,7 +1359,7 @@ interface on_gui_opened {
1265
1359
  */
1266
1360
  other_player?: LuaPlayer;
1267
1361
  /**
1268
- * The player closing the GUI.
1362
+ * The player opening the GUI.
1269
1363
  */
1270
1364
  player_index: uint32;
1271
1365
  /**
@@ -1275,7 +1369,7 @@ interface on_gui_opened {
1275
1369
  /**
1276
1370
  * Tick the event was generated.
1277
1371
  */
1278
- tick: uint32;
1372
+ tick: MapTick;
1279
1373
  /**
1280
1374
  * The position of the tile whose GUI was opened.
1281
1375
  */
@@ -1290,7 +1384,7 @@ interface on_gui_selected_tab_changed {
1290
1384
  */
1291
1385
  element: LuaGuiElement;
1292
1386
  /**
1293
- * Identifier of the event
1387
+ * Identifier of the event.
1294
1388
  */
1295
1389
  name: defines.events;
1296
1390
  /**
@@ -1300,7 +1394,7 @@ interface on_gui_selected_tab_changed {
1300
1394
  /**
1301
1395
  * Tick the event was generated.
1302
1396
  */
1303
- tick: uint32;
1397
+ tick: MapTick;
1304
1398
  }
1305
1399
  /**
1306
1400
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
@@ -1311,7 +1405,7 @@ interface on_gui_selection_state_changed {
1311
1405
  */
1312
1406
  element: LuaGuiElement;
1313
1407
  /**
1314
- * Identifier of the event
1408
+ * Identifier of the event.
1315
1409
  */
1316
1410
  name: defines.events;
1317
1411
  /**
@@ -1321,7 +1415,7 @@ interface on_gui_selection_state_changed {
1321
1415
  /**
1322
1416
  * Tick the event was generated.
1323
1417
  */
1324
- tick: uint32;
1418
+ tick: MapTick;
1325
1419
  }
1326
1420
  /**
1327
1421
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} switch state is changed (related to switches).
@@ -1332,7 +1426,7 @@ interface on_gui_switch_state_changed {
1332
1426
  */
1333
1427
  element: LuaGuiElement;
1334
1428
  /**
1335
- * Identifier of the event
1429
+ * Identifier of the event.
1336
1430
  */
1337
1431
  name: defines.events;
1338
1432
  /**
@@ -1342,7 +1436,7 @@ interface on_gui_switch_state_changed {
1342
1436
  /**
1343
1437
  * Tick the event was generated.
1344
1438
  */
1345
- tick: uint32;
1439
+ tick: MapTick;
1346
1440
  }
1347
1441
  /**
1348
1442
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} text is changed by the player.
@@ -1353,7 +1447,7 @@ interface on_gui_text_changed {
1353
1447
  */
1354
1448
  element: LuaGuiElement;
1355
1449
  /**
1356
- * Identifier of the event
1450
+ * Identifier of the event.
1357
1451
  */
1358
1452
  name: defines.events;
1359
1453
  /**
@@ -1367,7 +1461,7 @@ interface on_gui_text_changed {
1367
1461
  /**
1368
1462
  * Tick the event was generated.
1369
1463
  */
1370
- tick: uint32;
1464
+ tick: MapTick;
1371
1465
  }
1372
1466
  /**
1373
1467
  * Called when {@link LuaGuiElement | runtime:LuaGuiElement} slider value is changed (related to the slider element).
@@ -1378,7 +1472,7 @@ interface on_gui_value_changed {
1378
1472
  */
1379
1473
  element: LuaGuiElement;
1380
1474
  /**
1381
- * Identifier of the event
1475
+ * Identifier of the event.
1382
1476
  */
1383
1477
  name: defines.events;
1384
1478
  /**
@@ -1388,7 +1482,7 @@ interface on_gui_value_changed {
1388
1482
  /**
1389
1483
  * Tick the event was generated.
1390
1484
  */
1391
- tick: uint32;
1485
+ tick: MapTick;
1392
1486
  }
1393
1487
  /**
1394
1488
  * Called when a land mine is armed.
@@ -1396,20 +1490,20 @@ interface on_gui_value_changed {
1396
1490
  interface on_land_mine_armed {
1397
1491
  mine: LuaEntity;
1398
1492
  /**
1399
- * Identifier of the event
1493
+ * Identifier of the event.
1400
1494
  */
1401
1495
  name: defines.events;
1402
1496
  /**
1403
1497
  * Tick the event was generated.
1404
1498
  */
1405
- tick: uint32;
1499
+ tick: MapTick;
1406
1500
  }
1407
1501
  /**
1408
1502
  * Called when a custom {@link Lua shortcut | prototype:ShortcutPrototype} is pressed.
1409
1503
  */
1410
1504
  interface on_lua_shortcut {
1411
1505
  /**
1412
- * Identifier of the event
1506
+ * Identifier of the event.
1413
1507
  */
1414
1508
  name: defines.events;
1415
1509
  player_index: uint32;
@@ -1420,7 +1514,7 @@ interface on_lua_shortcut {
1420
1514
  /**
1421
1515
  * Tick the event was generated.
1422
1516
  */
1423
- tick: uint32;
1517
+ tick: MapTick;
1424
1518
  }
1425
1519
  /**
1426
1520
  * Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
@@ -1428,14 +1522,14 @@ interface on_lua_shortcut {
1428
1522
  interface on_marked_for_deconstruction {
1429
1523
  entity: LuaEntity;
1430
1524
  /**
1431
- * Identifier of the event
1525
+ * Identifier of the event.
1432
1526
  */
1433
1527
  name: defines.events;
1434
1528
  player_index?: uint32;
1435
1529
  /**
1436
1530
  * Tick the event was generated.
1437
1531
  */
1438
- tick: uint32;
1532
+ tick: MapTick;
1439
1533
  }
1440
1534
  /**
1441
1535
  * Called when an entity is marked for upgrade with the upgrade planner or via script.
@@ -1443,7 +1537,7 @@ interface on_marked_for_deconstruction {
1443
1537
  interface on_marked_for_upgrade {
1444
1538
  entity: LuaEntity;
1445
1539
  /**
1446
- * Identifier of the event
1540
+ * Identifier of the event.
1447
1541
  */
1448
1542
  name: defines.events;
1449
1543
  player_index?: uint32;
@@ -1463,7 +1557,7 @@ interface on_marked_for_upgrade {
1463
1557
  /**
1464
1558
  * Tick the event was generated.
1465
1559
  */
1466
- tick: uint32;
1560
+ tick: MapTick;
1467
1561
  }
1468
1562
  /**
1469
1563
  * Called after a player purchases some offer from a `market` entity.
@@ -1478,7 +1572,7 @@ interface on_market_item_purchased {
1478
1572
  */
1479
1573
  market: LuaEntity;
1480
1574
  /**
1481
- * Identifier of the event
1575
+ * Identifier of the event.
1482
1576
  */
1483
1577
  name: defines.events;
1484
1578
  /**
@@ -1492,7 +1586,7 @@ interface on_market_item_purchased {
1492
1586
  /**
1493
1587
  * Tick the event was generated.
1494
1588
  */
1495
- tick: uint32;
1589
+ tick: MapTick;
1496
1590
  }
1497
1591
  /**
1498
1592
  * Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
@@ -1503,7 +1597,7 @@ interface on_mod_item_opened {
1503
1597
  */
1504
1598
  item: LuaItemPrototype;
1505
1599
  /**
1506
- * Identifier of the event
1600
+ * Identifier of the event.
1507
1601
  */
1508
1602
  name: defines.events;
1509
1603
  /**
@@ -1517,20 +1611,20 @@ interface on_mod_item_opened {
1517
1611
  /**
1518
1612
  * Tick the event was generated.
1519
1613
  */
1520
- tick: uint32;
1614
+ tick: MapTick;
1521
1615
  }
1522
1616
  /**
1523
1617
  * Called when {@link LuaGameScript::is_multiplayer | runtime:LuaGameScript::is_multiplayer} changes to true. May also be raised when it was already true but a game was loaded from a save file and with hosting.
1524
1618
  */
1525
1619
  interface on_multiplayer_init {
1526
1620
  /**
1527
- * Identifier of the event
1621
+ * Identifier of the event.
1528
1622
  */
1529
1623
  name: defines.events;
1530
1624
  /**
1531
1625
  * Tick the event was generated.
1532
1626
  */
1533
- tick: uint32;
1627
+ tick: MapTick;
1534
1628
  }
1535
1629
  /**
1536
1630
  * Called after an object is destroyed which was registered with {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed} previously.
@@ -1539,7 +1633,7 @@ interface on_multiplayer_init {
1539
1633
  */
1540
1634
  interface on_object_destroyed {
1541
1635
  /**
1542
- * Identifier of the event
1636
+ * Identifier of the event.
1543
1637
  */
1544
1638
  name: defines.events;
1545
1639
  /**
@@ -1549,13 +1643,13 @@ interface on_object_destroyed {
1549
1643
  /**
1550
1644
  * Tick the event was generated.
1551
1645
  */
1552
- tick: uint32;
1646
+ tick: MapTick;
1553
1647
  /**
1554
- * Type of the object that was destroyed. Same as third value returned by {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed}
1648
+ * Type of the object that was destroyed. Same as third value returned by {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed}.
1555
1649
  */
1556
1650
  type: defines.target_type;
1557
1651
  /**
1558
- * The {@link useful identifier | runtime:RegistrationTarget} of the object. Same as second value returned by {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed}
1652
+ * The {@link useful identifier | runtime:RegistrationTarget} of the object or `0` if the object does not have a useful id. Same as second value returned by {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed}.
1559
1653
  */
1560
1654
  useful_id: uint64;
1561
1655
  }
@@ -1568,7 +1662,7 @@ interface on_permission_group_added {
1568
1662
  */
1569
1663
  group: LuaPermissionGroup;
1570
1664
  /**
1571
- * Identifier of the event
1665
+ * Identifier of the event.
1572
1666
  */
1573
1667
  name: defines.events;
1574
1668
  /**
@@ -1578,7 +1672,7 @@ interface on_permission_group_added {
1578
1672
  /**
1579
1673
  * Tick the event was generated.
1580
1674
  */
1581
- tick: uint32;
1675
+ tick: MapTick;
1582
1676
  }
1583
1677
  /**
1584
1678
  * Called directly after a permission group is deleted.
@@ -1593,7 +1687,7 @@ interface on_permission_group_deleted {
1593
1687
  */
1594
1688
  id: uint32;
1595
1689
  /**
1596
- * Identifier of the event
1690
+ * Identifier of the event.
1597
1691
  */
1598
1692
  name: defines.events;
1599
1693
  /**
@@ -1603,7 +1697,7 @@ interface on_permission_group_deleted {
1603
1697
  /**
1604
1698
  * Tick the event was generated.
1605
1699
  */
1606
- tick: uint32;
1700
+ tick: MapTick;
1607
1701
  }
1608
1702
  /**
1609
1703
  * Called directly after a permission group is edited in some way.
@@ -1618,7 +1712,7 @@ interface on_permission_group_edited {
1618
1712
  */
1619
1713
  group: LuaPermissionGroup;
1620
1714
  /**
1621
- * Identifier of the event
1715
+ * Identifier of the event.
1622
1716
  */
1623
1717
  name: defines.events;
1624
1718
  /**
@@ -1640,7 +1734,7 @@ interface on_permission_group_edited {
1640
1734
  /**
1641
1735
  * Tick the event was generated.
1642
1736
  */
1643
- tick: uint32;
1737
+ tick: MapTick;
1644
1738
  /**
1645
1739
  * The edit type.
1646
1740
  */
@@ -1651,7 +1745,7 @@ interface on_permission_group_edited {
1651
1745
  */
1652
1746
  interface on_permission_string_imported {
1653
1747
  /**
1654
- * Identifier of the event
1748
+ * Identifier of the event.
1655
1749
  */
1656
1750
  name: defines.events;
1657
1751
  /**
@@ -1661,7 +1755,7 @@ interface on_permission_string_imported {
1661
1755
  /**
1662
1756
  * Tick the event was generated.
1663
1757
  */
1664
- tick: uint32;
1758
+ tick: MapTick;
1665
1759
  }
1666
1760
  /**
1667
1761
  * Called when a player picks up an item.
@@ -1669,14 +1763,14 @@ interface on_permission_string_imported {
1669
1763
  interface on_picked_up_item {
1670
1764
  item_stack: ItemWithQualityCount;
1671
1765
  /**
1672
- * Identifier of the event
1766
+ * Identifier of the event.
1673
1767
  */
1674
1768
  name: defines.events;
1675
1769
  player_index: uint32;
1676
1770
  /**
1677
1771
  * Tick the event was generated.
1678
1772
  */
1679
- tick: uint32;
1773
+ tick: MapTick;
1680
1774
  }
1681
1775
  /**
1682
1776
  * Called after a player alt-reverse-selects an area with a selection-tool item.
@@ -1695,7 +1789,7 @@ interface on_player_alt_reverse_selected_area {
1695
1789
  */
1696
1790
  item: string;
1697
1791
  /**
1698
- * Identifier of the event
1792
+ * Identifier of the event.
1699
1793
  */
1700
1794
  name: defines.events;
1701
1795
  /**
@@ -1709,7 +1803,7 @@ interface on_player_alt_reverse_selected_area {
1709
1803
  /**
1710
1804
  * Tick the event was generated.
1711
1805
  */
1712
- tick: uint32;
1806
+ tick: MapTick;
1713
1807
  /**
1714
1808
  * The tiles selected.
1715
1809
  */
@@ -1732,7 +1826,7 @@ interface on_player_alt_selected_area {
1732
1826
  */
1733
1827
  item: string;
1734
1828
  /**
1735
- * Identifier of the event
1829
+ * Identifier of the event.
1736
1830
  */
1737
1831
  name: defines.events;
1738
1832
  /**
@@ -1750,7 +1844,7 @@ interface on_player_alt_selected_area {
1750
1844
  /**
1751
1845
  * Tick the event was generated.
1752
1846
  */
1753
- tick: uint32;
1847
+ tick: MapTick;
1754
1848
  /**
1755
1849
  * The tiles selected.
1756
1850
  */
@@ -1761,28 +1855,28 @@ interface on_player_alt_selected_area {
1761
1855
  */
1762
1856
  interface on_player_ammo_inventory_changed {
1763
1857
  /**
1764
- * Identifier of the event
1858
+ * Identifier of the event.
1765
1859
  */
1766
1860
  name: defines.events;
1767
1861
  player_index: uint32;
1768
1862
  /**
1769
1863
  * Tick the event was generated.
1770
1864
  */
1771
- tick: uint32;
1865
+ tick: MapTick;
1772
1866
  }
1773
1867
  /**
1774
1868
  * Called after a players armor inventory changed in some way.
1775
1869
  */
1776
1870
  interface on_player_armor_inventory_changed {
1777
1871
  /**
1778
- * Identifier of the event
1872
+ * Identifier of the event.
1779
1873
  */
1780
1874
  name: defines.events;
1781
1875
  player_index: uint32;
1782
1876
  /**
1783
1877
  * Tick the event was generated.
1784
1878
  */
1785
- tick: uint32;
1879
+ tick: MapTick;
1786
1880
  }
1787
1881
  /**
1788
1882
  * Called when a player is banned.
@@ -1793,7 +1887,7 @@ interface on_player_banned {
1793
1887
  */
1794
1888
  by_player?: uint32;
1795
1889
  /**
1796
- * Identifier of the event
1890
+ * Identifier of the event.
1797
1891
  */
1798
1892
  name: defines.events;
1799
1893
  /**
@@ -1811,7 +1905,7 @@ interface on_player_banned {
1811
1905
  /**
1812
1906
  * Tick the event was generated.
1813
1907
  */
1814
- tick: uint32;
1908
+ tick: MapTick;
1815
1909
  }
1816
1910
  /**
1817
1911
  * Called after a player builds tiles.
@@ -1826,7 +1920,7 @@ interface on_player_built_tile {
1826
1920
  */
1827
1921
  item?: LuaItemPrototype;
1828
1922
  /**
1829
- * Identifier of the event
1923
+ * Identifier of the event.
1830
1924
  */
1831
1925
  name: defines.events;
1832
1926
  player_index: uint32;
@@ -1841,7 +1935,7 @@ interface on_player_built_tile {
1841
1935
  /**
1842
1936
  * Tick the event was generated.
1843
1937
  */
1844
- tick: uint32;
1938
+ tick: MapTick;
1845
1939
  /**
1846
1940
  * The tile prototype that was placed.
1847
1941
  */
@@ -1864,7 +1958,7 @@ interface on_player_cancelled_crafting {
1864
1958
  */
1865
1959
  items: LuaInventory;
1866
1960
  /**
1867
- * Identifier of the event
1961
+ * Identifier of the event.
1868
1962
  */
1869
1963
  name: defines.events;
1870
1964
  /**
@@ -1878,7 +1972,7 @@ interface on_player_cancelled_crafting {
1878
1972
  /**
1879
1973
  * Tick the event was generated.
1880
1974
  */
1881
- tick: uint32;
1975
+ tick: MapTick;
1882
1976
  }
1883
1977
  /**
1884
1978
  * Called after a player changes forces.
@@ -1889,7 +1983,7 @@ interface on_player_changed_force {
1889
1983
  */
1890
1984
  force: LuaForce;
1891
1985
  /**
1892
- * Identifier of the event
1986
+ * Identifier of the event.
1893
1987
  */
1894
1988
  name: defines.events;
1895
1989
  /**
@@ -1899,14 +1993,14 @@ interface on_player_changed_force {
1899
1993
  /**
1900
1994
  * Tick the event was generated.
1901
1995
  */
1902
- tick: uint32;
1996
+ tick: MapTick;
1903
1997
  }
1904
1998
  /**
1905
1999
  * Called when the tile position a player is located at changes.
1906
2000
  */
1907
2001
  interface on_player_changed_position {
1908
2002
  /**
1909
- * Identifier of the event
2003
+ * Identifier of the event.
1910
2004
  */
1911
2005
  name: defines.events;
1912
2006
  /**
@@ -1916,14 +2010,14 @@ interface on_player_changed_position {
1916
2010
  /**
1917
2011
  * Tick the event was generated.
1918
2012
  */
1919
- tick: uint32;
2013
+ tick: MapTick;
1920
2014
  }
1921
2015
  /**
1922
2016
  * Called after a player changes surfaces.
1923
2017
  */
1924
2018
  interface on_player_changed_surface {
1925
2019
  /**
1926
- * Identifier of the event
2020
+ * Identifier of the event.
1927
2021
  */
1928
2022
  name: defines.events;
1929
2023
  /**
@@ -1937,14 +2031,14 @@ interface on_player_changed_surface {
1937
2031
  /**
1938
2032
  * Tick the event was generated.
1939
2033
  */
1940
- tick: uint32;
2034
+ tick: MapTick;
1941
2035
  }
1942
2036
  /**
1943
2037
  * Called when cheat mode is disabled on a player.
1944
2038
  */
1945
2039
  interface on_player_cheat_mode_disabled {
1946
2040
  /**
1947
- * Identifier of the event
2041
+ * Identifier of the event.
1948
2042
  */
1949
2043
  name: defines.events;
1950
2044
  /**
@@ -1954,14 +2048,14 @@ interface on_player_cheat_mode_disabled {
1954
2048
  /**
1955
2049
  * Tick the event was generated.
1956
2050
  */
1957
- tick: uint32;
2051
+ tick: MapTick;
1958
2052
  }
1959
2053
  /**
1960
2054
  * Called when cheat mode is enabled on a player.
1961
2055
  */
1962
2056
  interface on_player_cheat_mode_enabled {
1963
2057
  /**
1964
- * Identifier of the event
2058
+ * Identifier of the event.
1965
2059
  */
1966
2060
  name: defines.events;
1967
2061
  /**
@@ -1971,14 +2065,14 @@ interface on_player_cheat_mode_enabled {
1971
2065
  /**
1972
2066
  * Tick the event was generated.
1973
2067
  */
1974
- tick: uint32;
2068
+ tick: MapTick;
1975
2069
  }
1976
2070
  /**
1977
2071
  * Called when a player clicks a gps tag
1978
2072
  */
1979
2073
  interface on_player_clicked_gps_tag {
1980
2074
  /**
1981
- * Identifier of the event
2075
+ * Identifier of the event.
1982
2076
  */
1983
2077
  name: defines.events;
1984
2078
  /**
@@ -1996,14 +2090,43 @@ interface on_player_clicked_gps_tag {
1996
2090
  /**
1997
2091
  * Tick the event was generated.
1998
2092
  */
1999
- tick: uint32;
2093
+ tick: MapTick;
2094
+ }
2095
+ /**
2096
+ * Called after a player's color changes.
2097
+ */
2098
+ interface on_player_color_changed {
2099
+ /**
2100
+ * If the change was done by script or the player.
2101
+ */
2102
+ by_script: boolean;
2103
+ /**
2104
+ * Identifier of the event.
2105
+ */
2106
+ name: defines.events;
2107
+ /**
2108
+ * The old chat color.
2109
+ */
2110
+ old_chat_color: Color;
2111
+ /**
2112
+ * The old color.
2113
+ */
2114
+ old_color: Color;
2115
+ /**
2116
+ * The player whose color changed.
2117
+ */
2118
+ player_index: uint32;
2119
+ /**
2120
+ * Tick the event was generated.
2121
+ */
2122
+ tick: MapTick;
2000
2123
  }
2001
2124
  /**
2002
2125
  * Called when a player clicks the "confirm" button in the configure Blueprint GUI.
2003
2126
  */
2004
2127
  interface on_player_configured_blueprint {
2005
2128
  /**
2006
- * Identifier of the event
2129
+ * Identifier of the event.
2007
2130
  */
2008
2131
  name: defines.events;
2009
2132
  /**
@@ -2013,14 +2136,14 @@ interface on_player_configured_blueprint {
2013
2136
  /**
2014
2137
  * Tick the event was generated.
2015
2138
  */
2016
- tick: uint32;
2139
+ tick: MapTick;
2017
2140
  }
2018
2141
  /**
2019
2142
  * Called after a player changes controller types.
2020
2143
  */
2021
2144
  interface on_player_controller_changed {
2022
2145
  /**
2023
- * Identifier of the event
2146
+ * Identifier of the event.
2024
2147
  */
2025
2148
  name: defines.events;
2026
2149
  /**
@@ -2034,7 +2157,7 @@ interface on_player_controller_changed {
2034
2157
  /**
2035
2158
  * Tick the event was generated.
2036
2159
  */
2037
- tick: uint32;
2160
+ tick: MapTick;
2038
2161
  }
2039
2162
  /**
2040
2163
  * Called when the player finishes crafting an item. This event fires just before the results are inserted into the player's inventory, not when the crafting is queued (see {@link on_pre_player_crafted_item | runtime:on_pre_player_crafted_item}).
@@ -2045,7 +2168,7 @@ interface on_player_crafted_item {
2045
2168
  */
2046
2169
  item_stack: LuaItemStack;
2047
2170
  /**
2048
- * Identifier of the event
2171
+ * Identifier of the event.
2049
2172
  */
2050
2173
  name: defines.events;
2051
2174
  /**
@@ -2059,21 +2182,21 @@ interface on_player_crafted_item {
2059
2182
  /**
2060
2183
  * Tick the event was generated.
2061
2184
  */
2062
- tick: uint32;
2185
+ tick: MapTick;
2063
2186
  }
2064
2187
  /**
2065
2188
  * Called after the player was created.
2066
2189
  */
2067
2190
  interface on_player_created {
2068
2191
  /**
2069
- * Identifier of the event
2192
+ * Identifier of the event.
2070
2193
  */
2071
2194
  name: defines.events;
2072
2195
  player_index: uint32;
2073
2196
  /**
2074
2197
  * Tick the event was generated.
2075
2198
  */
2076
- tick: uint32;
2199
+ tick: MapTick;
2077
2200
  }
2078
2201
  /**
2079
2202
  * Called after a player's {@link cursor stack | runtime:LuaControl::cursor_stack} changed in some way.
@@ -2082,14 +2205,14 @@ interface on_player_created {
2082
2205
  */
2083
2206
  interface on_player_cursor_stack_changed {
2084
2207
  /**
2085
- * Identifier of the event
2208
+ * Identifier of the event.
2086
2209
  */
2087
2210
  name: defines.events;
2088
2211
  player_index: uint32;
2089
2212
  /**
2090
2213
  * Tick the event was generated.
2091
2214
  */
2092
- tick: uint32;
2215
+ tick: MapTick;
2093
2216
  }
2094
2217
  /**
2095
2218
  * Called when a player selects an area with a deconstruction planner.
@@ -2108,7 +2231,7 @@ interface on_player_deconstructed_area {
2108
2231
  */
2109
2232
  item: string;
2110
2233
  /**
2111
- * Identifier of the event
2234
+ * Identifier of the event.
2112
2235
  */
2113
2236
  name: defines.events;
2114
2237
  /**
@@ -2134,14 +2257,14 @@ interface on_player_deconstructed_area {
2134
2257
  /**
2135
2258
  * Tick the event was generated.
2136
2259
  */
2137
- tick: uint32;
2260
+ tick: MapTick;
2138
2261
  }
2139
2262
  /**
2140
2263
  * Called when a player is demoted.
2141
2264
  */
2142
2265
  interface on_player_demoted {
2143
2266
  /**
2144
- * Identifier of the event
2267
+ * Identifier of the event.
2145
2268
  */
2146
2269
  name: defines.events;
2147
2270
  /**
@@ -2151,7 +2274,7 @@ interface on_player_demoted {
2151
2274
  /**
2152
2275
  * Tick the event was generated.
2153
2276
  */
2154
- tick: uint32;
2277
+ tick: MapTick;
2155
2278
  }
2156
2279
  /**
2157
2280
  * Called after a player dies.
@@ -2159,21 +2282,21 @@ interface on_player_demoted {
2159
2282
  interface on_player_died {
2160
2283
  cause?: LuaEntity;
2161
2284
  /**
2162
- * Identifier of the event
2285
+ * Identifier of the event.
2163
2286
  */
2164
2287
  name: defines.events;
2165
2288
  player_index: uint32;
2166
2289
  /**
2167
2290
  * Tick the event was generated.
2168
2291
  */
2169
- tick: uint32;
2292
+ tick: MapTick;
2170
2293
  }
2171
2294
  /**
2172
2295
  * Called when the display density scale changes for a given player. The display density scale is the scale value automatically applied based on the player's display DPI. This is only relevant on platforms that support high-density displays.
2173
2296
  */
2174
2297
  interface on_player_display_density_scale_changed {
2175
2298
  /**
2176
- * Identifier of the event
2299
+ * Identifier of the event.
2177
2300
  */
2178
2301
  name: defines.events;
2179
2302
  /**
@@ -2187,14 +2310,14 @@ interface on_player_display_density_scale_changed {
2187
2310
  /**
2188
2311
  * Tick the event was generated.
2189
2312
  */
2190
- tick: uint32;
2313
+ tick: MapTick;
2191
2314
  }
2192
2315
  /**
2193
2316
  * Called when the display resolution changes for a given player.
2194
2317
  */
2195
2318
  interface on_player_display_resolution_changed {
2196
2319
  /**
2197
- * Identifier of the event
2320
+ * Identifier of the event.
2198
2321
  */
2199
2322
  name: defines.events;
2200
2323
  /**
@@ -2208,14 +2331,14 @@ interface on_player_display_resolution_changed {
2208
2331
  /**
2209
2332
  * Tick the event was generated.
2210
2333
  */
2211
- tick: uint32;
2334
+ tick: MapTick;
2212
2335
  }
2213
2336
  /**
2214
2337
  * Called when the display scale changes for a given player.
2215
2338
  */
2216
2339
  interface on_player_display_scale_changed {
2217
2340
  /**
2218
- * Identifier of the event
2341
+ * Identifier of the event.
2219
2342
  */
2220
2343
  name: defines.events;
2221
2344
  /**
@@ -2229,7 +2352,7 @@ interface on_player_display_scale_changed {
2229
2352
  /**
2230
2353
  * Tick the event was generated.
2231
2354
  */
2232
- tick: uint32;
2355
+ tick: MapTick;
2233
2356
  }
2234
2357
  /**
2235
2358
  * Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
@@ -2242,14 +2365,14 @@ interface on_player_driving_changed_state {
2242
2365
  */
2243
2366
  entity?: LuaEntity;
2244
2367
  /**
2245
- * Identifier of the event
2368
+ * Identifier of the event.
2246
2369
  */
2247
2370
  name: defines.events;
2248
2371
  player_index: uint32;
2249
2372
  /**
2250
2373
  * Tick the event was generated.
2251
2374
  */
2252
- tick: uint32;
2375
+ tick: MapTick;
2253
2376
  }
2254
2377
  /**
2255
2378
  * Called when a player drops an item on the ground.
@@ -2260,14 +2383,14 @@ interface on_player_dropped_item {
2260
2383
  */
2261
2384
  entity: LuaEntity;
2262
2385
  /**
2263
- * Identifier of the event
2386
+ * Identifier of the event.
2264
2387
  */
2265
2388
  name: defines.events;
2266
2389
  player_index: uint32;
2267
2390
  /**
2268
2391
  * Tick the event was generated.
2269
2392
  */
2270
- tick: uint32;
2393
+ tick: MapTick;
2271
2394
  }
2272
2395
  /**
2273
2396
  * Called when a player drops a single item into an entity.
@@ -2278,14 +2401,14 @@ interface on_player_dropped_item_into_entity {
2278
2401
  */
2279
2402
  entity: LuaEntity;
2280
2403
  /**
2281
- * Identifier of the event
2404
+ * Identifier of the event.
2282
2405
  */
2283
2406
  name: defines.events;
2284
2407
  player_index: uint32;
2285
2408
  /**
2286
2409
  * Tick the event was generated.
2287
2410
  */
2288
- tick: uint32;
2411
+ tick: MapTick;
2289
2412
  }
2290
2413
  /**
2291
2414
  * Called when a player fast-transfers something to or from an entity.
@@ -2304,7 +2427,7 @@ interface on_player_fast_transferred {
2304
2427
  */
2305
2428
  is_split: boolean;
2306
2429
  /**
2307
- * Identifier of the event
2430
+ * Identifier of the event.
2308
2431
  */
2309
2432
  name: defines.events;
2310
2433
  /**
@@ -2314,7 +2437,7 @@ interface on_player_fast_transferred {
2314
2437
  /**
2315
2438
  * Tick the event was generated.
2316
2439
  */
2317
- tick: uint32;
2440
+ tick: MapTick;
2318
2441
  }
2319
2442
  /**
2320
2443
  * Called when the player flips an entity. This event is only fired when the entity actually changes its orientation or mirroring, so it won't be triggered when pressing the flip keys on an entity that can't be flipped.
@@ -2331,14 +2454,14 @@ interface on_player_flipped_entity {
2331
2454
  */
2332
2455
  horizontal: boolean;
2333
2456
  /**
2334
- * Identifier of the event
2457
+ * Identifier of the event.
2335
2458
  */
2336
2459
  name: defines.events;
2337
2460
  player_index: uint32;
2338
2461
  /**
2339
2462
  * Tick the event was generated.
2340
2463
  */
2341
- tick: uint32;
2464
+ tick: MapTick;
2342
2465
  }
2343
2466
  /**
2344
2467
  * Called after player flushed fluid
@@ -2357,7 +2480,7 @@ interface on_player_flushed_fluid {
2357
2480
  */
2358
2481
  fluid: string;
2359
2482
  /**
2360
- * Identifier of the event
2483
+ * Identifier of the event.
2361
2484
  */
2362
2485
  name: defines.events;
2363
2486
  /**
@@ -2371,28 +2494,28 @@ interface on_player_flushed_fluid {
2371
2494
  /**
2372
2495
  * Tick the event was generated.
2373
2496
  */
2374
- tick: uint32;
2497
+ tick: MapTick;
2375
2498
  }
2376
2499
  /**
2377
2500
  * Called after a players gun inventory changed in some way.
2378
2501
  */
2379
2502
  interface on_player_gun_inventory_changed {
2380
2503
  /**
2381
- * Identifier of the event
2504
+ * Identifier of the event.
2382
2505
  */
2383
2506
  name: defines.events;
2384
2507
  player_index: uint32;
2385
2508
  /**
2386
2509
  * Tick the event was generated.
2387
2510
  */
2388
- tick: uint32;
2511
+ tick: MapTick;
2389
2512
  }
2390
2513
  /**
2391
2514
  * Called when a player's input method changes. See {@link LuaPlayer::input_method | runtime:LuaPlayer::input_method}.
2392
2515
  */
2393
2516
  interface on_player_input_method_changed {
2394
2517
  /**
2395
- * Identifier of the event
2518
+ * Identifier of the event.
2396
2519
  */
2397
2520
  name: defines.events;
2398
2521
  /**
@@ -2402,21 +2525,21 @@ interface on_player_input_method_changed {
2402
2525
  /**
2403
2526
  * Tick the event was generated.
2404
2527
  */
2405
- tick: uint32;
2528
+ tick: MapTick;
2406
2529
  }
2407
2530
  /**
2408
2531
  * Called after a player joins the game. This is not called when loading a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
2409
2532
  */
2410
2533
  interface on_player_joined_game {
2411
2534
  /**
2412
- * Identifier of the event
2535
+ * Identifier of the event.
2413
2536
  */
2414
2537
  name: defines.events;
2415
2538
  player_index: uint32;
2416
2539
  /**
2417
2540
  * Tick the event was generated.
2418
2541
  */
2419
- tick: uint32;
2542
+ tick: MapTick;
2420
2543
  }
2421
2544
  /**
2422
2545
  * Called when a player is kicked.
@@ -2427,7 +2550,7 @@ interface on_player_kicked {
2427
2550
  */
2428
2551
  by_player?: uint32;
2429
2552
  /**
2430
- * Identifier of the event
2553
+ * Identifier of the event.
2431
2554
  */
2432
2555
  name: defines.events;
2433
2556
  /**
@@ -2441,14 +2564,14 @@ interface on_player_kicked {
2441
2564
  /**
2442
2565
  * Tick the event was generated.
2443
2566
  */
2444
- tick: uint32;
2567
+ tick: MapTick;
2445
2568
  }
2446
2569
  /**
2447
2570
  * Called after a player leaves the game. This is not called when closing a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
2448
2571
  */
2449
2572
  interface on_player_left_game {
2450
2573
  /**
2451
- * Identifier of the event
2574
+ * Identifier of the event.
2452
2575
  */
2453
2576
  name: defines.events;
2454
2577
  player_index: uint32;
@@ -2456,14 +2579,14 @@ interface on_player_left_game {
2456
2579
  /**
2457
2580
  * Tick the event was generated.
2458
2581
  */
2459
- tick: uint32;
2582
+ tick: MapTick;
2460
2583
  }
2461
2584
  /**
2462
2585
  * Called when a player's active locale changes. See {@link LuaPlayer::locale | runtime:LuaPlayer::locale}.
2463
2586
  */
2464
2587
  interface on_player_locale_changed {
2465
2588
  /**
2466
- * Identifier of the event
2589
+ * Identifier of the event.
2467
2590
  */
2468
2591
  name: defines.events;
2469
2592
  /**
@@ -2477,21 +2600,21 @@ interface on_player_locale_changed {
2477
2600
  /**
2478
2601
  * Tick the event was generated.
2479
2602
  */
2480
- tick: uint32;
2603
+ tick: MapTick;
2481
2604
  }
2482
2605
  /**
2483
2606
  * Called after a players main inventory changed in some way.
2484
2607
  */
2485
2608
  interface on_player_main_inventory_changed {
2486
2609
  /**
2487
- * Identifier of the event
2610
+ * Identifier of the event.
2488
2611
  */
2489
2612
  name: defines.events;
2490
2613
  player_index: uint32;
2491
2614
  /**
2492
2615
  * Tick the event was generated.
2493
2616
  */
2494
- tick: uint32;
2617
+ tick: MapTick;
2495
2618
  }
2496
2619
  /**
2497
2620
  * Called after the results of an entity being mined are collected just before the entity is destroyed.
@@ -2510,7 +2633,7 @@ interface on_player_mined_entity {
2510
2633
  */
2511
2634
  entity: LuaEntity;
2512
2635
  /**
2513
- * Identifier of the event
2636
+ * Identifier of the event.
2514
2637
  */
2515
2638
  name: defines.events;
2516
2639
  /**
@@ -2520,7 +2643,7 @@ interface on_player_mined_entity {
2520
2643
  /**
2521
2644
  * Tick the event was generated.
2522
2645
  */
2523
- tick: uint32;
2646
+ tick: MapTick;
2524
2647
  }
2525
2648
  /**
2526
2649
  * Called when the player mines something.
@@ -2531,21 +2654,21 @@ interface on_player_mined_item {
2531
2654
  */
2532
2655
  item_stack: ItemWithQualityCount;
2533
2656
  /**
2534
- * Identifier of the event
2657
+ * Identifier of the event.
2535
2658
  */
2536
2659
  name: defines.events;
2537
2660
  player_index: uint32;
2538
2661
  /**
2539
2662
  * Tick the event was generated.
2540
2663
  */
2541
- tick: uint32;
2664
+ tick: MapTick;
2542
2665
  }
2543
2666
  /**
2544
2667
  * Called after a player mines tiles.
2545
2668
  */
2546
2669
  interface on_player_mined_tile {
2547
2670
  /**
2548
- * Identifier of the event
2671
+ * Identifier of the event.
2549
2672
  */
2550
2673
  name: defines.events;
2551
2674
  player_index: uint32;
@@ -2556,18 +2679,35 @@ interface on_player_mined_tile {
2556
2679
  /**
2557
2680
  * Tick the event was generated.
2558
2681
  */
2559
- tick: uint32;
2682
+ tick: MapTick;
2560
2683
  /**
2561
2684
  * The position data.
2562
2685
  */
2563
2686
  tiles: OldTileAndPosition[];
2564
2687
  }
2688
+ /**
2689
+ * Called when a player's current music track (ambient sound) changes. This includes when the music track finishes playing.
2690
+ */
2691
+ interface on_player_music_changed {
2692
+ /**
2693
+ * Identifier of the event.
2694
+ */
2695
+ name: defines.events;
2696
+ /**
2697
+ * The player whose current music has changed.
2698
+ */
2699
+ player_index: uint32;
2700
+ /**
2701
+ * Tick the event was generated.
2702
+ */
2703
+ tick: MapTick;
2704
+ }
2565
2705
  /**
2566
2706
  * Called when a player is muted.
2567
2707
  */
2568
2708
  interface on_player_muted {
2569
2709
  /**
2570
- * Identifier of the event
2710
+ * Identifier of the event.
2571
2711
  */
2572
2712
  name: defines.events;
2573
2713
  /**
@@ -2577,7 +2717,7 @@ interface on_player_muted {
2577
2717
  /**
2578
2718
  * Tick the event was generated.
2579
2719
  */
2580
- tick: uint32;
2720
+ tick: MapTick;
2581
2721
  }
2582
2722
  /**
2583
2723
  * Called when a player invokes the "smart pipette" over an entity.
@@ -2588,7 +2728,7 @@ interface on_player_pipette {
2588
2728
  */
2589
2729
  item: LuaItemPrototype;
2590
2730
  /**
2591
- * Identifier of the event
2731
+ * Identifier of the event.
2592
2732
  */
2593
2733
  name: defines.events;
2594
2734
  /**
@@ -2602,7 +2742,7 @@ interface on_player_pipette {
2602
2742
  /**
2603
2743
  * Tick the event was generated.
2604
2744
  */
2605
- tick: uint32;
2745
+ tick: MapTick;
2606
2746
  /**
2607
2747
  * If cheat mode was used to give a free stack of the item.
2608
2748
  */
@@ -2621,21 +2761,21 @@ interface on_player_placed_equipment {
2621
2761
  */
2622
2762
  grid: LuaEquipmentGrid;
2623
2763
  /**
2624
- * Identifier of the event
2764
+ * Identifier of the event.
2625
2765
  */
2626
2766
  name: defines.events;
2627
2767
  player_index: uint32;
2628
2768
  /**
2629
2769
  * Tick the event was generated.
2630
2770
  */
2631
- tick: uint32;
2771
+ tick: MapTick;
2632
2772
  }
2633
2773
  /**
2634
2774
  * Called when a player is promoted.
2635
2775
  */
2636
2776
  interface on_player_promoted {
2637
2777
  /**
2638
- * Identifier of the event
2778
+ * Identifier of the event.
2639
2779
  */
2640
2780
  name: defines.events;
2641
2781
  /**
@@ -2645,14 +2785,14 @@ interface on_player_promoted {
2645
2785
  /**
2646
2786
  * Tick the event was generated.
2647
2787
  */
2648
- tick: uint32;
2788
+ tick: MapTick;
2649
2789
  }
2650
2790
  /**
2651
2791
  * Called when a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link leaving | runtime:on_player_left_game} the game, and instead behaves like the player never existed in the save file.
2652
2792
  */
2653
2793
  interface on_player_removed {
2654
2794
  /**
2655
- * Identifier of the event
2795
+ * Identifier of the event.
2656
2796
  */
2657
2797
  name: defines.events;
2658
2798
  /**
@@ -2662,7 +2802,7 @@ interface on_player_removed {
2662
2802
  /**
2663
2803
  * Tick the event was generated.
2664
2804
  */
2665
- tick: uint32;
2805
+ tick: MapTick;
2666
2806
  }
2667
2807
  /**
2668
2808
  * Called after the player removes equipment from an equipment grid
@@ -2681,7 +2821,7 @@ interface on_player_removed_equipment {
2681
2821
  */
2682
2822
  grid: LuaEquipmentGrid;
2683
2823
  /**
2684
- * Identifier of the event
2824
+ * Identifier of the event.
2685
2825
  */
2686
2826
  name: defines.events;
2687
2827
  player_index: uint32;
@@ -2692,7 +2832,7 @@ interface on_player_removed_equipment {
2692
2832
  /**
2693
2833
  * Tick the event was generated.
2694
2834
  */
2695
- tick: uint32;
2835
+ tick: MapTick;
2696
2836
  }
2697
2837
  /**
2698
2838
  * Called when a player repairs an entity.
@@ -2700,21 +2840,21 @@ interface on_player_removed_equipment {
2700
2840
  interface on_player_repaired_entity {
2701
2841
  entity: LuaEntity;
2702
2842
  /**
2703
- * Identifier of the event
2843
+ * Identifier of the event.
2704
2844
  */
2705
2845
  name: defines.events;
2706
2846
  player_index: uint32;
2707
2847
  /**
2708
2848
  * Tick the event was generated.
2709
2849
  */
2710
- tick: uint32;
2850
+ tick: MapTick;
2711
2851
  }
2712
2852
  /**
2713
2853
  * Called after a player respawns.
2714
2854
  */
2715
2855
  interface on_player_respawned {
2716
2856
  /**
2717
- * Identifier of the event
2857
+ * Identifier of the event.
2718
2858
  */
2719
2859
  name: defines.events;
2720
2860
  player_index: uint32;
@@ -2725,7 +2865,7 @@ interface on_player_respawned {
2725
2865
  /**
2726
2866
  * Tick the event was generated.
2727
2867
  */
2728
- tick: uint32;
2868
+ tick: MapTick;
2729
2869
  }
2730
2870
  /**
2731
2871
  * Called after a player reverse-selects an area with a selection-tool item.
@@ -2744,7 +2884,7 @@ interface on_player_reverse_selected_area {
2744
2884
  */
2745
2885
  item: string;
2746
2886
  /**
2747
- * Identifier of the event
2887
+ * Identifier of the event.
2748
2888
  */
2749
2889
  name: defines.events;
2750
2890
  /**
@@ -2758,7 +2898,7 @@ interface on_player_reverse_selected_area {
2758
2898
  /**
2759
2899
  * Tick the event was generated.
2760
2900
  */
2761
- tick: uint32;
2901
+ tick: MapTick;
2762
2902
  /**
2763
2903
  * The tiles selected.
2764
2904
  */
@@ -2775,7 +2915,7 @@ interface on_player_rotated_entity {
2775
2915
  */
2776
2916
  entity: LuaEntity;
2777
2917
  /**
2778
- * Identifier of the event
2918
+ * Identifier of the event.
2779
2919
  */
2780
2920
  name: defines.events;
2781
2921
  player_index: uint32;
@@ -2783,10 +2923,11 @@ interface on_player_rotated_entity {
2783
2923
  * The previous direction
2784
2924
  */
2785
2925
  previous_direction: defines.direction;
2926
+ previous_mirroring: boolean;
2786
2927
  /**
2787
2928
  * Tick the event was generated.
2788
2929
  */
2789
- tick: uint32;
2930
+ tick: MapTick;
2790
2931
  }
2791
2932
  /**
2792
2933
  * Called after a player selects an area with a selection-tool item.
@@ -2805,7 +2946,7 @@ interface on_player_selected_area {
2805
2946
  */
2806
2947
  item: string;
2807
2948
  /**
2808
- * Identifier of the event
2949
+ * Identifier of the event.
2809
2950
  */
2810
2951
  name: defines.events;
2811
2952
  /**
@@ -2823,7 +2964,7 @@ interface on_player_selected_area {
2823
2964
  /**
2824
2965
  * Tick the event was generated.
2825
2966
  */
2826
- tick: uint32;
2967
+ tick: MapTick;
2827
2968
  /**
2828
2969
  * The tiles selected.
2829
2970
  */
@@ -2834,14 +2975,14 @@ interface on_player_selected_area {
2834
2975
  */
2835
2976
  interface on_player_set_quick_bar_slot {
2836
2977
  /**
2837
- * Identifier of the event
2978
+ * Identifier of the event.
2838
2979
  */
2839
2980
  name: defines.events;
2840
2981
  player_index: uint32;
2841
2982
  /**
2842
2983
  * Tick the event was generated.
2843
2984
  */
2844
- tick: uint32;
2985
+ tick: MapTick;
2845
2986
  }
2846
2987
  /**
2847
2988
  * Called when a player selects an area with a blueprint.
@@ -2864,7 +3005,7 @@ interface on_player_setup_blueprint {
2864
3005
  */
2865
3006
  mapping: LuaLazyLoadedValue<LuaTable<uint32, LuaEntity>>;
2866
3007
  /**
2867
- * Identifier of the event
3008
+ * Identifier of the event.
2868
3009
  */
2869
3010
  name: defines.events;
2870
3011
  /**
@@ -2876,7 +3017,7 @@ interface on_player_setup_blueprint {
2876
3017
  */
2877
3018
  quality: string;
2878
3019
  /**
2879
- * The record that is being reassigned.
3020
+ * The record that is being reassigned. This blueprint record is writable even if it is in the "my blueprints" shelf.
2880
3021
  */
2881
3022
  record?: LuaRecord;
2882
3023
  /**
@@ -2890,7 +3031,7 @@ interface on_player_setup_blueprint {
2890
3031
  /**
2891
3032
  * Tick the event was generated.
2892
3033
  */
2893
- tick: uint32;
3034
+ tick: MapTick;
2894
3035
  }
2895
3036
  /**
2896
3037
  * Called when a player toggles alt mode, also known as "show entity info".
@@ -2901,42 +3042,42 @@ interface on_player_toggled_alt_mode {
2901
3042
  */
2902
3043
  alt_mode: boolean;
2903
3044
  /**
2904
- * Identifier of the event
3045
+ * Identifier of the event.
2905
3046
  */
2906
3047
  name: defines.events;
2907
3048
  player_index: uint32;
2908
3049
  /**
2909
3050
  * Tick the event was generated.
2910
3051
  */
2911
- tick: uint32;
3052
+ tick: MapTick;
2912
3053
  }
2913
3054
  /**
2914
3055
  * Called when a player toggles the map editor on or off.
2915
3056
  */
2916
3057
  interface on_player_toggled_map_editor {
2917
3058
  /**
2918
- * Identifier of the event
3059
+ * Identifier of the event.
2919
3060
  */
2920
3061
  name: defines.events;
2921
3062
  player_index: uint32;
2922
3063
  /**
2923
3064
  * Tick the event was generated.
2924
3065
  */
2925
- tick: uint32;
3066
+ tick: MapTick;
2926
3067
  }
2927
3068
  /**
2928
3069
  * Called after a players trash inventory changed in some way.
2929
3070
  */
2930
3071
  interface on_player_trash_inventory_changed {
2931
3072
  /**
2932
- * Identifier of the event
3073
+ * Identifier of the event.
2933
3074
  */
2934
3075
  name: defines.events;
2935
3076
  player_index: uint32;
2936
3077
  /**
2937
3078
  * Tick the event was generated.
2938
3079
  */
2939
- tick: uint32;
3080
+ tick: MapTick;
2940
3081
  }
2941
3082
  /**
2942
3083
  * Called when a player is un-banned.
@@ -2947,7 +3088,7 @@ interface on_player_unbanned {
2947
3088
  */
2948
3089
  by_player?: uint32;
2949
3090
  /**
2950
- * Identifier of the event
3091
+ * Identifier of the event.
2951
3092
  */
2952
3093
  name: defines.events;
2953
3094
  /**
@@ -2965,14 +3106,14 @@ interface on_player_unbanned {
2965
3106
  /**
2966
3107
  * Tick the event was generated.
2967
3108
  */
2968
- tick: uint32;
3109
+ tick: MapTick;
2969
3110
  }
2970
3111
  /**
2971
3112
  * Called when a player is unmuted.
2972
3113
  */
2973
3114
  interface on_player_unmuted {
2974
3115
  /**
2975
- * Identifier of the event
3116
+ * Identifier of the event.
2976
3117
  */
2977
3118
  name: defines.events;
2978
3119
  /**
@@ -2982,7 +3123,7 @@ interface on_player_unmuted {
2982
3123
  /**
2983
3124
  * Tick the event was generated.
2984
3125
  */
2985
- tick: uint32;
3126
+ tick: MapTick;
2986
3127
  }
2987
3128
  /**
2988
3129
  * Called when a player uses a capsule that results in some game action.
@@ -2993,7 +3134,7 @@ interface on_player_used_capsule {
2993
3134
  */
2994
3135
  item: LuaItemPrototype;
2995
3136
  /**
2996
- * Identifier of the event
3137
+ * Identifier of the event.
2997
3138
  */
2998
3139
  name: defines.events;
2999
3140
  /**
@@ -3011,14 +3152,14 @@ interface on_player_used_capsule {
3011
3152
  /**
3012
3153
  * Tick the event was generated.
3013
3154
  */
3014
- tick: uint32;
3155
+ tick: MapTick;
3015
3156
  }
3016
3157
  /**
3017
3158
  * Called when a player uses spidertron remote to send all selected units to a given position
3018
3159
  */
3019
3160
  interface on_player_used_spidertron_remote {
3020
3161
  /**
3021
- * Identifier of the event
3162
+ * Identifier of the event.
3022
3163
  */
3023
3164
  name: defines.events;
3024
3165
  /**
@@ -3032,7 +3173,7 @@ interface on_player_used_spidertron_remote {
3032
3173
  /**
3033
3174
  * Tick the event was generated.
3034
3175
  */
3035
- tick: uint32;
3176
+ tick: MapTick;
3036
3177
  }
3037
3178
  /**
3038
3179
  * Called after an entity dies.
@@ -3055,7 +3196,7 @@ interface on_post_entity_died {
3055
3196
  */
3056
3197
  ghost?: LuaEntity;
3057
3198
  /**
3058
- * Identifier of the event
3199
+ * Identifier of the event.
3059
3200
  */
3060
3201
  name: defines.events;
3061
3202
  /**
@@ -3077,7 +3218,7 @@ interface on_post_entity_died {
3077
3218
  /**
3078
3219
  * Tick the event was generated.
3079
3220
  */
3080
- tick: uint32;
3221
+ tick: MapTick;
3081
3222
  /**
3082
3223
  * The unit number the entity had if any.
3083
3224
  */
@@ -3096,7 +3237,7 @@ interface on_post_segmented_unit_died {
3096
3237
  */
3097
3238
  force?: LuaForce;
3098
3239
  /**
3099
- * Identifier of the event
3240
+ * Identifier of the event.
3100
3241
  */
3101
3242
  name: defines.events;
3102
3243
  /**
@@ -3118,7 +3259,7 @@ interface on_post_segmented_unit_died {
3118
3259
  /**
3119
3260
  * Tick the event was generated.
3120
3261
  */
3121
- tick: uint32;
3262
+ tick: MapTick;
3122
3263
  /**
3123
3264
  * The unit number of the unit that died.
3124
3265
  */
@@ -3153,7 +3294,7 @@ interface on_pre_build {
3153
3294
  */
3154
3295
  mirror: boolean;
3155
3296
  /**
3156
- * Identifier of the event
3297
+ * Identifier of the event.
3157
3298
  */
3158
3299
  name: defines.events;
3159
3300
  /**
@@ -3167,14 +3308,14 @@ interface on_pre_build {
3167
3308
  /**
3168
3309
  * Tick the event was generated.
3169
3310
  */
3170
- tick: uint32;
3311
+ tick: MapTick;
3171
3312
  }
3172
3313
  /**
3173
3314
  * Called before one or more chunks are deleted using {@link LuaSurface::delete_chunk | runtime:LuaSurface::delete_chunk}.
3174
3315
  */
3175
3316
  interface on_pre_chunk_deleted {
3176
3317
  /**
3177
- * Identifier of the event
3318
+ * Identifier of the event.
3178
3319
  */
3179
3320
  name: defines.events;
3180
3321
  /**
@@ -3185,7 +3326,7 @@ interface on_pre_chunk_deleted {
3185
3326
  /**
3186
3327
  * Tick the event was generated.
3187
3328
  */
3188
- tick: uint32;
3329
+ tick: MapTick;
3189
3330
  }
3190
3331
  /**
3191
3332
  * Called before entity copy-paste is done.
@@ -3196,7 +3337,7 @@ interface on_pre_entity_settings_pasted {
3196
3337
  */
3197
3338
  destination: LuaEntity;
3198
3339
  /**
3199
- * Identifier of the event
3340
+ * Identifier of the event.
3200
3341
  */
3201
3342
  name: defines.events;
3202
3343
  player_index: uint32;
@@ -3207,7 +3348,7 @@ interface on_pre_entity_settings_pasted {
3207
3348
  /**
3208
3349
  * Tick the event was generated.
3209
3350
  */
3210
- tick: uint32;
3351
+ tick: MapTick;
3211
3352
  }
3212
3353
  /**
3213
3354
  * Called before a ghost entity is destroyed as a result of being marked for deconstruction.
@@ -3217,7 +3358,7 @@ interface on_pre_entity_settings_pasted {
3217
3358
  interface on_pre_ghost_deconstructed {
3218
3359
  ghost: LuaEntity;
3219
3360
  /**
3220
- * Identifier of the event
3361
+ * Identifier of the event.
3221
3362
  */
3222
3363
  name: defines.events;
3223
3364
  /**
@@ -3227,7 +3368,7 @@ interface on_pre_ghost_deconstructed {
3227
3368
  /**
3228
3369
  * Tick the event was generated.
3229
3370
  */
3230
- tick: uint32;
3371
+ tick: MapTick;
3231
3372
  }
3232
3373
  /**
3233
3374
  * Called before a ghost entity is upgraded.
@@ -3235,7 +3376,7 @@ interface on_pre_ghost_deconstructed {
3235
3376
  interface on_pre_ghost_upgraded {
3236
3377
  ghost: LuaEntity;
3237
3378
  /**
3238
- * Identifier of the event
3379
+ * Identifier of the event.
3239
3380
  */
3240
3381
  name: defines.events;
3241
3382
  /**
@@ -3247,7 +3388,7 @@ interface on_pre_ghost_upgraded {
3247
3388
  /**
3248
3389
  * Tick the event was generated.
3249
3390
  */
3250
- tick: uint32;
3391
+ tick: MapTick;
3251
3392
  }
3252
3393
  /**
3253
3394
  * Called directly before a permission group is deleted.
@@ -3258,7 +3399,7 @@ interface on_pre_permission_group_deleted {
3258
3399
  */
3259
3400
  group: LuaPermissionGroup;
3260
3401
  /**
3261
- * Identifier of the event
3402
+ * Identifier of the event.
3262
3403
  */
3263
3404
  name: defines.events;
3264
3405
  /**
@@ -3268,14 +3409,14 @@ interface on_pre_permission_group_deleted {
3268
3409
  /**
3269
3410
  * Tick the event was generated.
3270
3411
  */
3271
- tick: uint32;
3412
+ tick: MapTick;
3272
3413
  }
3273
3414
  /**
3274
3415
  * Called directly before a permission string is imported.
3275
3416
  */
3276
3417
  interface on_pre_permission_string_imported {
3277
3418
  /**
3278
- * Identifier of the event
3419
+ * Identifier of the event.
3279
3420
  */
3280
3421
  name: defines.events;
3281
3422
  /**
@@ -3285,7 +3426,7 @@ interface on_pre_permission_string_imported {
3285
3426
  /**
3286
3427
  * Tick the event was generated.
3287
3428
  */
3288
- tick: uint32;
3429
+ tick: MapTick;
3289
3430
  }
3290
3431
  /**
3291
3432
  * Called when a player queues something to be crafted.
@@ -3296,7 +3437,7 @@ interface on_pre_player_crafted_item {
3296
3437
  */
3297
3438
  items: LuaInventory;
3298
3439
  /**
3299
- * Identifier of the event
3440
+ * Identifier of the event.
3300
3441
  */
3301
3442
  name: defines.events;
3302
3443
  /**
@@ -3314,7 +3455,7 @@ interface on_pre_player_crafted_item {
3314
3455
  /**
3315
3456
  * Tick the event was generated.
3316
3457
  */
3317
- tick: uint32;
3458
+ tick: MapTick;
3318
3459
  }
3319
3460
  /**
3320
3461
  * Called before a players dies.
@@ -3322,21 +3463,21 @@ interface on_pre_player_crafted_item {
3322
3463
  interface on_pre_player_died {
3323
3464
  cause?: LuaEntity;
3324
3465
  /**
3325
- * Identifier of the event
3466
+ * Identifier of the event.
3326
3467
  */
3327
3468
  name: defines.events;
3328
3469
  player_index: uint32;
3329
3470
  /**
3330
3471
  * Tick the event was generated.
3331
3472
  */
3332
- tick: uint32;
3473
+ tick: MapTick;
3333
3474
  }
3334
3475
  /**
3335
3476
  * Called before a player leaves the game.
3336
3477
  */
3337
3478
  interface on_pre_player_left_game {
3338
3479
  /**
3339
- * Identifier of the event
3480
+ * Identifier of the event.
3340
3481
  */
3341
3482
  name: defines.events;
3342
3483
  player_index: uint32;
@@ -3344,7 +3485,7 @@ interface on_pre_player_left_game {
3344
3485
  /**
3345
3486
  * Tick the event was generated.
3346
3487
  */
3347
- tick: uint32;
3488
+ tick: MapTick;
3348
3489
  }
3349
3490
  /**
3350
3491
  * Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed.
@@ -3355,21 +3496,21 @@ interface on_pre_player_mined_item {
3355
3496
  */
3356
3497
  entity: LuaEntity;
3357
3498
  /**
3358
- * Identifier of the event
3499
+ * Identifier of the event.
3359
3500
  */
3360
3501
  name: defines.events;
3361
3502
  player_index: uint32;
3362
3503
  /**
3363
3504
  * Tick the event was generated.
3364
3505
  */
3365
- tick: uint32;
3506
+ tick: MapTick;
3366
3507
  }
3367
3508
  /**
3368
3509
  * Called before a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link leaving | runtime:on_player_left_game} the game, and instead behaves like the player never existed in the save file.
3369
3510
  */
3370
3511
  interface on_pre_player_removed {
3371
3512
  /**
3372
- * Identifier of the event
3513
+ * Identifier of the event.
3373
3514
  */
3374
3515
  name: defines.events;
3375
3516
  /**
@@ -3379,21 +3520,21 @@ interface on_pre_player_removed {
3379
3520
  /**
3380
3521
  * Tick the event was generated.
3381
3522
  */
3382
- tick: uint32;
3523
+ tick: MapTick;
3383
3524
  }
3384
3525
  /**
3385
3526
  * Called before a player toggles the map editor on or off.
3386
3527
  */
3387
3528
  interface on_pre_player_toggled_map_editor {
3388
3529
  /**
3389
- * Identifier of the event
3530
+ * Identifier of the event.
3390
3531
  */
3391
3532
  name: defines.events;
3392
3533
  player_index: uint32;
3393
3534
  /**
3394
3535
  * Tick the event was generated.
3395
3536
  */
3396
- tick: uint32;
3537
+ tick: MapTick;
3397
3538
  }
3398
3539
  /**
3399
3540
  * Called directly before a robot explodes cliffs.
@@ -3405,7 +3546,7 @@ interface on_pre_robot_exploded_cliff {
3405
3546
  */
3406
3547
  item: LuaItemPrototype;
3407
3548
  /**
3408
- * Identifier of the event
3549
+ * Identifier of the event.
3409
3550
  */
3410
3551
  name: defines.events;
3411
3552
  /**
@@ -3416,14 +3557,14 @@ interface on_pre_robot_exploded_cliff {
3416
3557
  /**
3417
3558
  * Tick the event was generated.
3418
3559
  */
3419
- tick: uint32;
3560
+ tick: MapTick;
3420
3561
  }
3421
3562
  /**
3422
3563
  * Called just before the scenario finishes.
3423
3564
  */
3424
3565
  interface on_pre_scenario_finished {
3425
3566
  /**
3426
- * Identifier of the event
3567
+ * Identifier of the event.
3427
3568
  */
3428
3569
  name: defines.events;
3429
3570
  /**
@@ -3433,7 +3574,7 @@ interface on_pre_scenario_finished {
3433
3574
  /**
3434
3575
  * Tick the event was generated.
3435
3576
  */
3436
- tick: uint32;
3577
+ tick: MapTick;
3437
3578
  }
3438
3579
  /**
3439
3580
  * Called just before a script inventory is resized.
@@ -3445,7 +3586,7 @@ interface on_pre_script_inventory_resized {
3445
3586
  */
3446
3587
  mod: string;
3447
3588
  /**
3448
- * Identifier of the event
3589
+ * Identifier of the event.
3449
3590
  */
3450
3591
  name: defines.events;
3451
3592
  /**
@@ -3463,35 +3604,35 @@ interface on_pre_script_inventory_resized {
3463
3604
  /**
3464
3605
  * Tick the event was generated.
3465
3606
  */
3466
- tick: uint32;
3607
+ tick: MapTick;
3467
3608
  }
3468
3609
  /**
3469
3610
  * Called just before a surface is cleared (all entities removed and all chunks deleted).
3470
3611
  */
3471
3612
  interface on_pre_surface_cleared {
3472
3613
  /**
3473
- * Identifier of the event
3614
+ * Identifier of the event.
3474
3615
  */
3475
3616
  name: defines.events;
3476
3617
  surface_index: uint32;
3477
3618
  /**
3478
3619
  * Tick the event was generated.
3479
3620
  */
3480
- tick: uint32;
3621
+ tick: MapTick;
3481
3622
  }
3482
3623
  /**
3483
3624
  * Called just before a surface is deleted.
3484
3625
  */
3485
3626
  interface on_pre_surface_deleted {
3486
3627
  /**
3487
- * Identifier of the event
3628
+ * Identifier of the event.
3488
3629
  */
3489
3630
  name: defines.events;
3490
3631
  surface_index: uint32;
3491
3632
  /**
3492
3633
  * Tick the event was generated.
3493
3634
  */
3494
- tick: uint32;
3635
+ tick: MapTick;
3495
3636
  }
3496
3637
  /**
3497
3638
  * Called when the player triggers "redo".
@@ -3502,7 +3643,7 @@ interface on_redo_applied {
3502
3643
  */
3503
3644
  actions: UndoRedoAction[];
3504
3645
  /**
3505
- * Identifier of the event
3646
+ * Identifier of the event.
3506
3647
  */
3507
3648
  name: defines.events;
3508
3649
  /**
@@ -3512,7 +3653,7 @@ interface on_redo_applied {
3512
3653
  /**
3513
3654
  * Tick the event was generated.
3514
3655
  */
3515
- tick: uint32;
3656
+ tick: MapTick;
3516
3657
  }
3517
3658
  /**
3518
3659
  * Called when research is cancelled.
@@ -3523,7 +3664,7 @@ interface on_research_cancelled {
3523
3664
  */
3524
3665
  force: LuaForce;
3525
3666
  /**
3526
- * Identifier of the event
3667
+ * Identifier of the event.
3527
3668
  */
3528
3669
  name: defines.events;
3529
3670
  /**
@@ -3537,7 +3678,7 @@ interface on_research_cancelled {
3537
3678
  /**
3538
3679
  * Tick the event was generated.
3539
3680
  */
3540
- tick: uint32;
3681
+ tick: MapTick;
3541
3682
  }
3542
3683
  /**
3543
3684
  * Called when a research finishes.
@@ -3548,7 +3689,7 @@ interface on_research_finished {
3548
3689
  */
3549
3690
  by_script: boolean;
3550
3691
  /**
3551
- * Identifier of the event
3692
+ * Identifier of the event.
3552
3693
  */
3553
3694
  name: defines.events;
3554
3695
  /**
@@ -3558,7 +3699,7 @@ interface on_research_finished {
3558
3699
  /**
3559
3700
  * Tick the event was generated.
3560
3701
  */
3561
- tick: uint32;
3702
+ tick: MapTick;
3562
3703
  }
3563
3704
  /**
3564
3705
  * Called when research is moved forwards or backwards in the research queue.
@@ -3569,7 +3710,7 @@ interface on_research_moved {
3569
3710
  */
3570
3711
  force: LuaForce;
3571
3712
  /**
3572
- * Identifier of the event
3713
+ * Identifier of the event.
3573
3714
  */
3574
3715
  name: defines.events;
3575
3716
  /**
@@ -3579,7 +3720,7 @@ interface on_research_moved {
3579
3720
  /**
3580
3721
  * Tick the event was generated.
3581
3722
  */
3582
- tick: uint32;
3723
+ tick: MapTick;
3583
3724
  }
3584
3725
  /**
3585
3726
  * Called when research is queued.
@@ -3590,7 +3731,7 @@ interface on_research_queued {
3590
3731
  */
3591
3732
  force: LuaForce;
3592
3733
  /**
3593
- * Identifier of the event
3734
+ * Identifier of the event.
3594
3735
  */
3595
3736
  name: defines.events;
3596
3737
  /**
@@ -3604,7 +3745,7 @@ interface on_research_queued {
3604
3745
  /**
3605
3746
  * Tick the event was generated.
3606
3747
  */
3607
- tick: uint32;
3748
+ tick: MapTick;
3608
3749
  }
3609
3750
  /**
3610
3751
  * Called when a research is reversed (unresearched).
@@ -3615,7 +3756,7 @@ interface on_research_reversed {
3615
3756
  */
3616
3757
  by_script: boolean;
3617
3758
  /**
3618
- * Identifier of the event
3759
+ * Identifier of the event.
3619
3760
  */
3620
3761
  name: defines.events;
3621
3762
  /**
@@ -3625,7 +3766,7 @@ interface on_research_reversed {
3625
3766
  /**
3626
3767
  * Tick the event was generated.
3627
3768
  */
3628
- tick: uint32;
3769
+ tick: MapTick;
3629
3770
  }
3630
3771
  /**
3631
3772
  * Called when a technology research starts.
@@ -3633,7 +3774,7 @@ interface on_research_reversed {
3633
3774
  interface on_research_started {
3634
3775
  last_research?: LuaTechnology;
3635
3776
  /**
3636
- * Identifier of the event
3777
+ * Identifier of the event.
3637
3778
  */
3638
3779
  name: defines.events;
3639
3780
  /**
@@ -3643,7 +3784,7 @@ interface on_research_started {
3643
3784
  /**
3644
3785
  * Tick the event was generated.
3645
3786
  */
3646
- tick: uint32;
3787
+ tick: MapTick;
3647
3788
  }
3648
3789
  /**
3649
3790
  * Called when a resource entity reaches 0 or its minimum yield for infinite resources.
@@ -3651,13 +3792,13 @@ interface on_research_started {
3651
3792
  interface on_resource_depleted {
3652
3793
  entity: LuaEntity;
3653
3794
  /**
3654
- * Identifier of the event
3795
+ * Identifier of the event.
3655
3796
  */
3656
3797
  name: defines.events;
3657
3798
  /**
3658
3799
  * Tick the event was generated.
3659
3800
  */
3660
- tick: uint32;
3801
+ tick: MapTick;
3661
3802
  }
3662
3803
  /**
3663
3804
  * Called when a construction robot builds an entity.
@@ -3668,7 +3809,7 @@ interface on_robot_built_entity {
3668
3809
  */
3669
3810
  entity: LuaEntity;
3670
3811
  /**
3671
- * Identifier of the event
3812
+ * Identifier of the event.
3672
3813
  */
3673
3814
  name: defines.events;
3674
3815
  /**
@@ -3686,7 +3827,7 @@ interface on_robot_built_entity {
3686
3827
  /**
3687
3828
  * Tick the event was generated.
3688
3829
  */
3689
- tick: uint32;
3830
+ tick: MapTick;
3690
3831
  }
3691
3832
  /**
3692
3833
  * Called after a robot builds tiles.
@@ -3701,7 +3842,7 @@ interface on_robot_built_tile {
3701
3842
  */
3702
3843
  item: LuaItemPrototype;
3703
3844
  /**
3704
- * Identifier of the event
3845
+ * Identifier of the event.
3705
3846
  */
3706
3847
  name: defines.events;
3707
3848
  /**
@@ -3719,7 +3860,7 @@ interface on_robot_built_tile {
3719
3860
  /**
3720
3861
  * Tick the event was generated.
3721
3862
  */
3722
- tick: uint32;
3863
+ tick: MapTick;
3723
3864
  /**
3724
3865
  * The tile prototype that was placed.
3725
3866
  */
@@ -3738,7 +3879,7 @@ interface on_robot_exploded_cliff {
3738
3879
  */
3739
3880
  item: LuaItemPrototype;
3740
3881
  /**
3741
- * Identifier of the event
3882
+ * Identifier of the event.
3742
3883
  */
3743
3884
  name: defines.events;
3744
3885
  /**
@@ -3749,7 +3890,7 @@ interface on_robot_exploded_cliff {
3749
3890
  /**
3750
3891
  * Tick the event was generated.
3751
3892
  */
3752
- tick: uint32;
3893
+ tick: MapTick;
3753
3894
  }
3754
3895
  /**
3755
3896
  * Called when a robot mines an entity.
@@ -3760,7 +3901,7 @@ interface on_robot_mined {
3760
3901
  */
3761
3902
  item_stack: ItemWithQualityCount;
3762
3903
  /**
3763
- * Identifier of the event
3904
+ * Identifier of the event.
3764
3905
  */
3765
3906
  name: defines.events;
3766
3907
  /**
@@ -3770,7 +3911,7 @@ interface on_robot_mined {
3770
3911
  /**
3771
3912
  * Tick the event was generated.
3772
3913
  */
3773
- tick: uint32;
3914
+ tick: MapTick;
3774
3915
  }
3775
3916
  /**
3776
3917
  * Called after the results of an entity being mined are collected just before the entity is destroyed.
@@ -3789,7 +3930,7 @@ interface on_robot_mined_entity {
3789
3930
  */
3790
3931
  entity: LuaEntity;
3791
3932
  /**
3792
- * Identifier of the event
3933
+ * Identifier of the event.
3793
3934
  */
3794
3935
  name: defines.events;
3795
3936
  /**
@@ -3799,14 +3940,14 @@ interface on_robot_mined_entity {
3799
3940
  /**
3800
3941
  * Tick the event was generated.
3801
3942
  */
3802
- tick: uint32;
3943
+ tick: MapTick;
3803
3944
  }
3804
3945
  /**
3805
3946
  * Called after a robot mines tiles.
3806
3947
  */
3807
3948
  interface on_robot_mined_tile {
3808
3949
  /**
3809
- * Identifier of the event
3950
+ * Identifier of the event.
3810
3951
  */
3811
3952
  name: defines.events;
3812
3953
  /**
@@ -3820,7 +3961,7 @@ interface on_robot_mined_tile {
3820
3961
  /**
3821
3962
  * Tick the event was generated.
3822
3963
  */
3823
- tick: uint32;
3964
+ tick: MapTick;
3824
3965
  /**
3825
3966
  * The position data.
3826
3967
  */
@@ -3835,7 +3976,7 @@ interface on_robot_pre_mined {
3835
3976
  */
3836
3977
  entity: LuaEntity;
3837
3978
  /**
3838
- * Identifier of the event
3979
+ * Identifier of the event.
3839
3980
  */
3840
3981
  name: defines.events;
3841
3982
  /**
@@ -3845,14 +3986,14 @@ interface on_robot_pre_mined {
3845
3986
  /**
3846
3987
  * Tick the event was generated.
3847
3988
  */
3848
- tick: uint32;
3989
+ tick: MapTick;
3849
3990
  }
3850
3991
  /**
3851
3992
  * Called when a rocket silo is ordered to be launched.
3852
3993
  */
3853
3994
  interface on_rocket_launch_ordered {
3854
3995
  /**
3855
- * Identifier of the event
3996
+ * Identifier of the event.
3856
3997
  */
3857
3998
  name: defines.events;
3858
3999
  /**
@@ -3864,14 +4005,14 @@ interface on_rocket_launch_ordered {
3864
4005
  /**
3865
4006
  * Tick the event was generated.
3866
4007
  */
3867
- tick: uint32;
4008
+ tick: MapTick;
3868
4009
  }
3869
4010
  /**
3870
4011
  * Called when a rocket finishes ascending. (Triggers listening for finished rocket launch past 2.0 have been moved to 'on_cargo_pod_finished_ascending' as rocket and cargo pod are two separate entities)
3871
4012
  */
3872
4013
  interface on_rocket_launched {
3873
4014
  /**
3874
- * Identifier of the event
4015
+ * Identifier of the event.
3875
4016
  */
3876
4017
  name: defines.events;
3877
4018
  rocket: LuaEntity;
@@ -3879,14 +4020,14 @@ interface on_rocket_launched {
3879
4020
  /**
3880
4021
  * Tick the event was generated.
3881
4022
  */
3882
- tick: uint32;
4023
+ tick: MapTick;
3883
4024
  }
3884
4025
  /**
3885
4026
  * Called when a runtime mod setting is changed by a player.
3886
4027
  */
3887
4028
  interface on_runtime_mod_setting_changed {
3888
4029
  /**
3889
- * Identifier of the event
4030
+ * Identifier of the event.
3890
4031
  */
3891
4032
  name: defines.events;
3892
4033
  /**
@@ -3901,7 +4042,7 @@ interface on_runtime_mod_setting_changed {
3901
4042
  /**
3902
4043
  * Tick the event was generated.
3903
4044
  */
3904
- tick: uint32;
4045
+ tick: MapTick;
3905
4046
  }
3906
4047
  /**
3907
4048
  * Called just after a script inventory is resized.
@@ -3913,7 +4054,7 @@ interface on_script_inventory_resized {
3913
4054
  */
3914
4055
  mod: string;
3915
4056
  /**
3916
- * Identifier of the event
4057
+ * Identifier of the event.
3917
4058
  */
3918
4059
  name: defines.events;
3919
4060
  /**
@@ -3935,7 +4076,7 @@ interface on_script_inventory_resized {
3935
4076
  /**
3936
4077
  * Tick the event was generated.
3937
4078
  */
3938
- tick: uint32;
4079
+ tick: MapTick;
3939
4080
  }
3940
4081
  /**
3941
4082
  * Called when a {@link LuaSurface::request_path | runtime:LuaSurface::request_path} call completes.
@@ -3946,7 +4087,7 @@ interface on_script_path_request_finished {
3946
4087
  */
3947
4088
  id: uint32;
3948
4089
  /**
3949
- * Identifier of the event
4090
+ * Identifier of the event.
3950
4091
  */
3951
4092
  name: defines.events;
3952
4093
  /**
@@ -3956,7 +4097,7 @@ interface on_script_path_request_finished {
3956
4097
  /**
3957
4098
  * Tick the event was generated.
3958
4099
  */
3959
- tick: uint32;
4100
+ tick: MapTick;
3960
4101
  /**
3961
4102
  * Indicates that the pathfinder failed because it is too busy, and that you can retry later.
3962
4103
  */
@@ -3975,7 +4116,7 @@ interface on_script_trigger_effect {
3975
4116
  */
3976
4117
  effect_id: string;
3977
4118
  /**
3978
- * Identifier of the event
4119
+ * Identifier of the event.
3979
4120
  */
3980
4121
  name: defines.events;
3981
4122
  quality?: string;
@@ -3990,7 +4131,7 @@ interface on_script_trigger_effect {
3990
4131
  /**
3991
4132
  * Tick the event was generated.
3992
4133
  */
3993
- tick: uint32;
4134
+ tick: MapTick;
3994
4135
  }
3995
4136
  /**
3996
4137
  * Called when an entity of type `radar` finishes scanning a sector.
@@ -4005,7 +4146,7 @@ interface on_sector_scanned {
4005
4146
  */
4006
4147
  chunk_position: ChunkPosition;
4007
4148
  /**
4008
- * Identifier of the event
4149
+ * Identifier of the event.
4009
4150
  */
4010
4151
  name: defines.events;
4011
4152
  /**
@@ -4015,7 +4156,7 @@ interface on_sector_scanned {
4015
4156
  /**
4016
4157
  * Tick the event was generated.
4017
4158
  */
4018
- tick: uint32;
4159
+ tick: MapTick;
4019
4160
  }
4020
4161
  /**
4021
4162
  * Called when an individual segment of a SegmentedUnit is created.
@@ -4023,13 +4164,13 @@ interface on_sector_scanned {
4023
4164
  interface on_segment_entity_created {
4024
4165
  entity: LuaEntity;
4025
4166
  /**
4026
- * Identifier of the event
4167
+ * Identifier of the event.
4027
4168
  */
4028
4169
  name: defines.events;
4029
4170
  /**
4030
4171
  * Tick the event was generated.
4031
4172
  */
4032
- tick: uint32;
4173
+ tick: MapTick;
4033
4174
  }
4034
4175
  /**
4035
4176
  * Called when a segmented unit is created for any reason.
@@ -4044,7 +4185,7 @@ interface on_segmented_unit_created {
4044
4185
  */
4045
4186
  clone_source?: LuaSegmentedUnit;
4046
4187
  /**
4047
- * Identifier of the event
4188
+ * Identifier of the event.
4048
4189
  */
4049
4190
  name: defines.events;
4050
4191
  /**
@@ -4054,7 +4195,7 @@ interface on_segmented_unit_created {
4054
4195
  /**
4055
4196
  * Tick the event was generated.
4056
4197
  */
4057
- tick: uint32;
4198
+ tick: MapTick;
4058
4199
  }
4059
4200
  /**
4060
4201
  * Called when a segmented unit is damaged. This is not called when a segmented unit's health is set directly by another mod.
@@ -4078,7 +4219,7 @@ interface on_segmented_unit_damaged {
4078
4219
  */
4079
4220
  force?: LuaForce;
4080
4221
  /**
4081
- * Identifier of the event
4222
+ * Identifier of the event.
4082
4223
  */
4083
4224
  name: defines.events;
4084
4225
  /**
@@ -4093,7 +4234,7 @@ interface on_segmented_unit_damaged {
4093
4234
  /**
4094
4235
  * Tick the event was generated.
4095
4236
  */
4096
- tick: uint32;
4237
+ tick: MapTick;
4097
4238
  }
4098
4239
  /**
4099
4240
  * Called when a segmented unit dies.
@@ -4112,7 +4253,7 @@ interface on_segmented_unit_died {
4112
4253
  */
4113
4254
  force?: LuaForce;
4114
4255
  /**
4115
- * Identifier of the event
4256
+ * Identifier of the event.
4116
4257
  */
4117
4258
  name: defines.events;
4118
4259
  /**
@@ -4122,7 +4263,7 @@ interface on_segmented_unit_died {
4122
4263
  /**
4123
4264
  * Tick the event was generated.
4124
4265
  */
4125
- tick: uint32;
4266
+ tick: MapTick;
4126
4267
  }
4127
4268
  /**
4128
4269
  * Called after the selected entity changes for a given player.
@@ -4133,7 +4274,7 @@ interface on_selected_entity_changed {
4133
4274
  */
4134
4275
  last_entity?: LuaEntity;
4135
4276
  /**
4136
- * Identifier of the event
4277
+ * Identifier of the event.
4137
4278
  */
4138
4279
  name: defines.events;
4139
4280
  /**
@@ -4143,20 +4284,20 @@ interface on_selected_entity_changed {
4143
4284
  /**
4144
4285
  * Tick the event was generated.
4145
4286
  */
4146
- tick: uint32;
4287
+ tick: MapTick;
4147
4288
  }
4148
4289
  /**
4149
4290
  * Called when {@link LuaGameScript::is_multiplayer | runtime:LuaGameScript::is_multiplayer} changes to false. May also be raised when it was already false but a game was loaded from a save file without hosting.
4150
4291
  */
4151
4292
  interface on_singleplayer_init {
4152
4293
  /**
4153
- * Identifier of the event
4294
+ * Identifier of the event.
4154
4295
  */
4155
4296
  name: defines.events;
4156
4297
  /**
4157
4298
  * Tick the event was generated.
4158
4299
  */
4159
- tick: uint32;
4300
+ tick: MapTick;
4160
4301
  }
4161
4302
  /**
4162
4303
  * Called when a space platform builds an entity.
@@ -4167,7 +4308,7 @@ interface on_space_platform_built_entity {
4167
4308
  */
4168
4309
  entity: LuaEntity;
4169
4310
  /**
4170
- * Identifier of the event
4311
+ * Identifier of the event.
4171
4312
  */
4172
4313
  name: defines.events;
4173
4314
  /**
@@ -4185,7 +4326,7 @@ interface on_space_platform_built_entity {
4185
4326
  /**
4186
4327
  * Tick the event was generated.
4187
4328
  */
4188
- tick: uint32;
4329
+ tick: MapTick;
4189
4330
  }
4190
4331
  /**
4191
4332
  * Called after a space platform builds tiles.
@@ -4200,7 +4341,7 @@ interface on_space_platform_built_tile {
4200
4341
  */
4201
4342
  item: LuaItemPrototype;
4202
4343
  /**
4203
- * Identifier of the event
4344
+ * Identifier of the event.
4204
4345
  */
4205
4346
  name: defines.events;
4206
4347
  /**
@@ -4218,7 +4359,7 @@ interface on_space_platform_built_tile {
4218
4359
  /**
4219
4360
  * Tick the event was generated.
4220
4361
  */
4221
- tick: uint32;
4362
+ tick: MapTick;
4222
4363
  /**
4223
4364
  * The tile prototype that was placed.
4224
4365
  */
@@ -4233,7 +4374,7 @@ interface on_space_platform_built_tile {
4233
4374
  */
4234
4375
  interface on_space_platform_changed_state {
4235
4376
  /**
4236
- * Identifier of the event
4377
+ * Identifier of the event.
4237
4378
  */
4238
4379
  name: defines.events;
4239
4380
  old_state: defines.space_platform_state;
@@ -4241,7 +4382,7 @@ interface on_space_platform_changed_state {
4241
4382
  /**
4242
4383
  * Tick the event was generated.
4243
4384
  */
4244
- tick: uint32;
4385
+ tick: MapTick;
4245
4386
  }
4246
4387
  /**
4247
4388
  * Called after the results of an entity being mined are collected just before the entity is destroyed.
@@ -4260,7 +4401,7 @@ interface on_space_platform_mined_entity {
4260
4401
  */
4261
4402
  entity: LuaEntity;
4262
4403
  /**
4263
- * Identifier of the event
4404
+ * Identifier of the event.
4264
4405
  */
4265
4406
  name: defines.events;
4266
4407
  /**
@@ -4270,7 +4411,7 @@ interface on_space_platform_mined_entity {
4270
4411
  /**
4271
4412
  * Tick the event was generated.
4272
4413
  */
4273
- tick: uint32;
4414
+ tick: MapTick;
4274
4415
  }
4275
4416
  /**
4276
4417
  * Called when a platform mines an entity.
@@ -4281,7 +4422,7 @@ interface on_space_platform_mined_item {
4281
4422
  */
4282
4423
  item_stack: ItemWithQualityCount;
4283
4424
  /**
4284
- * Identifier of the event
4425
+ * Identifier of the event.
4285
4426
  */
4286
4427
  name: defines.events;
4287
4428
  /**
@@ -4291,14 +4432,14 @@ interface on_space_platform_mined_item {
4291
4432
  /**
4292
4433
  * Tick the event was generated.
4293
4434
  */
4294
- tick: uint32;
4435
+ tick: MapTick;
4295
4436
  }
4296
4437
  /**
4297
4438
  * Called after a platform mines tiles.
4298
4439
  */
4299
4440
  interface on_space_platform_mined_tile {
4300
4441
  /**
4301
- * Identifier of the event
4442
+ * Identifier of the event.
4302
4443
  */
4303
4444
  name: defines.events;
4304
4445
  /**
@@ -4312,7 +4453,7 @@ interface on_space_platform_mined_tile {
4312
4453
  /**
4313
4454
  * Tick the event was generated.
4314
4455
  */
4315
- tick: uint32;
4456
+ tick: MapTick;
4316
4457
  /**
4317
4458
  * The position data.
4318
4459
  */
@@ -4327,7 +4468,7 @@ interface on_space_platform_pre_mined {
4327
4468
  */
4328
4469
  entity: LuaEntity;
4329
4470
  /**
4330
- * Identifier of the event
4471
+ * Identifier of the event.
4331
4472
  */
4332
4473
  name: defines.events;
4333
4474
  /**
@@ -4337,20 +4478,20 @@ interface on_space_platform_pre_mined {
4337
4478
  /**
4338
4479
  * Tick the event was generated.
4339
4480
  */
4340
- tick: uint32;
4481
+ tick: MapTick;
4341
4482
  }
4342
4483
  /**
4343
4484
  * Called when a spider finishes moving to its autopilot position.
4344
4485
  */
4345
4486
  interface on_spider_command_completed {
4346
4487
  /**
4347
- * Identifier of the event
4488
+ * Identifier of the event.
4348
4489
  */
4349
4490
  name: defines.events;
4350
4491
  /**
4351
4492
  * Tick the event was generated.
4352
4493
  */
4353
- tick: uint32;
4494
+ tick: MapTick;
4354
4495
  /**
4355
4496
  * Spider vehicle which was requested to move.
4356
4497
  */
@@ -4369,7 +4510,7 @@ interface on_string_translated {
4369
4510
  */
4370
4511
  localised_string: LocalisedString;
4371
4512
  /**
4372
- * Identifier of the event
4513
+ * Identifier of the event.
4373
4514
  */
4374
4515
  name: defines.events;
4375
4516
  /**
@@ -4383,7 +4524,7 @@ interface on_string_translated {
4383
4524
  /**
4384
4525
  * Tick the event was generated.
4385
4526
  */
4386
- tick: uint32;
4527
+ tick: MapTick;
4387
4528
  /**
4388
4529
  * Whether the requested localised string was valid and could be translated.
4389
4530
  */
@@ -4394,14 +4535,14 @@ interface on_string_translated {
4394
4535
  */
4395
4536
  interface on_surface_cleared {
4396
4537
  /**
4397
- * Identifier of the event
4538
+ * Identifier of the event.
4398
4539
  */
4399
4540
  name: defines.events;
4400
4541
  surface_index: uint32;
4401
4542
  /**
4402
4543
  * Tick the event was generated.
4403
4544
  */
4404
- tick: uint32;
4545
+ tick: MapTick;
4405
4546
  }
4406
4547
  /**
4407
4548
  * Called when a surface is created.
@@ -4410,35 +4551,35 @@ interface on_surface_cleared {
4410
4551
  */
4411
4552
  interface on_surface_created {
4412
4553
  /**
4413
- * Identifier of the event
4554
+ * Identifier of the event.
4414
4555
  */
4415
4556
  name: defines.events;
4416
4557
  surface_index: uint32;
4417
4558
  /**
4418
4559
  * Tick the event was generated.
4419
4560
  */
4420
- tick: uint32;
4561
+ tick: MapTick;
4421
4562
  }
4422
4563
  /**
4423
4564
  * Called after a surface is deleted.
4424
4565
  */
4425
4566
  interface on_surface_deleted {
4426
4567
  /**
4427
- * Identifier of the event
4568
+ * Identifier of the event.
4428
4569
  */
4429
4570
  name: defines.events;
4430
4571
  surface_index: uint32;
4431
4572
  /**
4432
4573
  * Tick the event was generated.
4433
4574
  */
4434
- tick: uint32;
4575
+ tick: MapTick;
4435
4576
  }
4436
4577
  /**
4437
4578
  * Called after a surface is imported via the map editor.
4438
4579
  */
4439
4580
  interface on_surface_imported {
4440
4581
  /**
4441
- * Identifier of the event
4582
+ * Identifier of the event.
4442
4583
  */
4443
4584
  name: defines.events;
4444
4585
  /**
@@ -4449,14 +4590,14 @@ interface on_surface_imported {
4449
4590
  /**
4450
4591
  * Tick the event was generated.
4451
4592
  */
4452
- tick: uint32;
4593
+ tick: MapTick;
4453
4594
  }
4454
4595
  /**
4455
4596
  * Called when a surface is renamed.
4456
4597
  */
4457
4598
  interface on_surface_renamed {
4458
4599
  /**
4459
- * Identifier of the event
4600
+ * Identifier of the event.
4460
4601
  */
4461
4602
  name: defines.events;
4462
4603
  new_name: string;
@@ -4465,7 +4606,7 @@ interface on_surface_renamed {
4465
4606
  /**
4466
4607
  * Tick the event was generated.
4467
4608
  */
4468
- tick: uint32;
4609
+ tick: MapTick;
4469
4610
  }
4470
4611
  /**
4471
4612
  * Called when {@link LuaForce::reset_technology_effects | runtime:LuaForce::reset_technology_effects} is finished.
@@ -4473,13 +4614,13 @@ interface on_surface_renamed {
4473
4614
  interface on_technology_effects_reset {
4474
4615
  force: LuaForce;
4475
4616
  /**
4476
- * Identifier of the event
4617
+ * Identifier of the event.
4477
4618
  */
4478
4619
  name: defines.events;
4479
4620
  /**
4480
4621
  * Tick the event was generated.
4481
4622
  */
4482
- tick: uint32;
4623
+ tick: MapTick;
4483
4624
  }
4484
4625
  /**
4485
4626
  * Called when a territory is created for any reason.
@@ -4490,7 +4631,7 @@ interface on_territory_created {
4490
4631
  */
4491
4632
  cause: defines.territory_created_cause;
4492
4633
  /**
4493
- * Identifier of the event
4634
+ * Identifier of the event.
4494
4635
  */
4495
4636
  name: defines.events;
4496
4637
  /**
@@ -4500,14 +4641,14 @@ interface on_territory_created {
4500
4641
  /**
4501
4642
  * Tick the event was generated.
4502
4643
  */
4503
- tick: uint32;
4644
+ tick: MapTick;
4504
4645
  }
4505
4646
  /**
4506
4647
  * Called when a territory is destroyed from a surface.
4507
4648
  */
4508
4649
  interface on_territory_destroyed {
4509
4650
  /**
4510
- * Identifier of the event
4651
+ * Identifier of the event.
4511
4652
  */
4512
4653
  name: defines.events;
4513
4654
  /**
@@ -4517,20 +4658,20 @@ interface on_territory_destroyed {
4517
4658
  /**
4518
4659
  * Tick the event was generated.
4519
4660
  */
4520
- tick: uint32;
4661
+ tick: MapTick;
4521
4662
  }
4522
4663
  /**
4523
4664
  * It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
4524
4665
  */
4525
4666
  interface on_tick {
4526
4667
  /**
4527
- * Identifier of the event
4668
+ * Identifier of the event.
4528
4669
  */
4529
4670
  name: defines.events;
4530
4671
  /**
4531
4672
  * Tick the event was generated.
4532
4673
  */
4533
- tick: uint32;
4674
+ tick: MapTick;
4534
4675
  }
4535
4676
  /**
4536
4677
  * Called after the results of an entity being mined are collected just before the entity is destroyed.
@@ -4545,7 +4686,7 @@ interface on_tower_mined_plant {
4545
4686
  */
4546
4687
  buffer: LuaInventory;
4547
4688
  /**
4548
- * Identifier of the event
4689
+ * Identifier of the event.
4549
4690
  */
4550
4691
  name: defines.events;
4551
4692
  /**
@@ -4555,7 +4696,7 @@ interface on_tower_mined_plant {
4555
4696
  /**
4556
4697
  * Tick the event was generated.
4557
4698
  */
4558
- tick: uint32;
4699
+ tick: MapTick;
4559
4700
  /**
4560
4701
  * The tower doing the mining.
4561
4702
  */
@@ -4566,7 +4707,7 @@ interface on_tower_mined_plant {
4566
4707
  */
4567
4708
  interface on_tower_planted_seed {
4568
4709
  /**
4569
- * Identifier of the event
4710
+ * Identifier of the event.
4570
4711
  */
4571
4712
  name: defines.events;
4572
4713
  /**
@@ -4580,7 +4721,7 @@ interface on_tower_planted_seed {
4580
4721
  /**
4581
4722
  * Tick the event was generated.
4582
4723
  */
4583
- tick: uint32;
4724
+ tick: MapTick;
4584
4725
  /**
4585
4726
  * The tower that did the planting.
4586
4727
  */
@@ -4591,7 +4732,7 @@ interface on_tower_planted_seed {
4591
4732
  */
4592
4733
  interface on_tower_pre_mined_plant {
4593
4734
  /**
4594
- * Identifier of the event
4735
+ * Identifier of the event.
4595
4736
  */
4596
4737
  name: defines.events;
4597
4738
  /**
@@ -4601,7 +4742,7 @@ interface on_tower_pre_mined_plant {
4601
4742
  /**
4602
4743
  * Tick the event was generated.
4603
4744
  */
4604
- tick: uint32;
4745
+ tick: MapTick;
4605
4746
  /**
4606
4747
  * The tower that is about to do the mining.
4607
4748
  */
@@ -4612,14 +4753,14 @@ interface on_tower_pre_mined_plant {
4612
4753
  */
4613
4754
  interface on_train_changed_state {
4614
4755
  /**
4615
- * Identifier of the event
4756
+ * Identifier of the event.
4616
4757
  */
4617
4758
  name: defines.events;
4618
4759
  old_state: defines.train_state;
4619
4760
  /**
4620
4761
  * Tick the event was generated.
4621
4762
  */
4622
- tick: uint32;
4763
+ tick: MapTick;
4623
4764
  train: LuaTrain;
4624
4765
  }
4625
4766
  /**
@@ -4627,7 +4768,7 @@ interface on_train_changed_state {
4627
4768
  */
4628
4769
  interface on_train_created {
4629
4770
  /**
4630
- * Identifier of the event
4771
+ * Identifier of the event.
4631
4772
  */
4632
4773
  name: defines.events;
4633
4774
  /**
@@ -4641,7 +4782,7 @@ interface on_train_created {
4641
4782
  /**
4642
4783
  * Tick the event was generated.
4643
4784
  */
4644
- tick: uint32;
4785
+ tick: MapTick;
4645
4786
  train: LuaTrain;
4646
4787
  }
4647
4788
  /**
@@ -4649,7 +4790,7 @@ interface on_train_created {
4649
4790
  */
4650
4791
  interface on_train_schedule_changed {
4651
4792
  /**
4652
- * Identifier of the event
4793
+ * Identifier of the event.
4653
4794
  */
4654
4795
  name: defines.events;
4655
4796
  /**
@@ -4659,7 +4800,7 @@ interface on_train_schedule_changed {
4659
4800
  /**
4660
4801
  * Tick the event was generated.
4661
4802
  */
4662
- tick: uint32;
4803
+ tick: MapTick;
4663
4804
  train: LuaTrain;
4664
4805
  }
4665
4806
  /**
@@ -4668,14 +4809,14 @@ interface on_train_schedule_changed {
4668
4809
  interface on_trigger_created_entity {
4669
4810
  entity: LuaEntity;
4670
4811
  /**
4671
- * Identifier of the event
4812
+ * Identifier of the event.
4672
4813
  */
4673
4814
  name: defines.events;
4674
4815
  source?: LuaEntity;
4675
4816
  /**
4676
4817
  * Tick the event was generated.
4677
4818
  */
4678
- tick: uint32;
4819
+ tick: MapTick;
4679
4820
  }
4680
4821
  /**
4681
4822
  * Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=true`.
@@ -4683,21 +4824,21 @@ interface on_trigger_created_entity {
4683
4824
  interface on_trigger_fired_artillery {
4684
4825
  entity: LuaEntity;
4685
4826
  /**
4686
- * Identifier of the event
4827
+ * Identifier of the event.
4687
4828
  */
4688
4829
  name: defines.events;
4689
4830
  source?: LuaEntity;
4690
4831
  /**
4691
4832
  * Tick the event was generated.
4692
4833
  */
4693
- tick: uint32;
4834
+ tick: MapTick;
4694
4835
  }
4695
4836
  /**
4696
4837
  * Called when new packets are processed by {@link LuaHelpers::recv_udp | runtime:LuaHelpers::recv_udp}.
4697
4838
  */
4698
4839
  interface on_udp_packet_received {
4699
4840
  /**
4700
- * Identifier of the event
4841
+ * Identifier of the event.
4701
4842
  */
4702
4843
  name: defines.events;
4703
4844
  /**
@@ -4715,7 +4856,7 @@ interface on_udp_packet_received {
4715
4856
  /**
4716
4857
  * Tick the event was generated.
4717
4858
  */
4718
- tick: uint32;
4859
+ tick: MapTick;
4719
4860
  }
4720
4861
  /**
4721
4862
  * Called when the player triggers "undo".
@@ -4726,7 +4867,7 @@ interface on_undo_applied {
4726
4867
  */
4727
4868
  actions: UndoRedoAction[];
4728
4869
  /**
4729
- * Identifier of the event
4870
+ * Identifier of the event.
4730
4871
  */
4731
4872
  name: defines.events;
4732
4873
  /**
@@ -4736,7 +4877,7 @@ interface on_undo_applied {
4736
4877
  /**
4737
4878
  * Tick the event was generated.
4738
4879
  */
4739
- tick: uint32;
4880
+ tick: MapTick;
4740
4881
  }
4741
4882
  /**
4742
4883
  * Called when a unit is added to a unit group.
@@ -4744,13 +4885,13 @@ interface on_undo_applied {
4744
4885
  interface on_unit_added_to_group {
4745
4886
  group: LuaCommandable;
4746
4887
  /**
4747
- * Identifier of the event
4888
+ * Identifier of the event.
4748
4889
  */
4749
4890
  name: defines.events;
4750
4891
  /**
4751
4892
  * Tick the event was generated.
4752
4893
  */
4753
- tick: uint32;
4894
+ tick: MapTick;
4754
4895
  unit: LuaEntity;
4755
4896
  }
4756
4897
  /**
@@ -4759,13 +4900,13 @@ interface on_unit_added_to_group {
4759
4900
  interface on_unit_group_created {
4760
4901
  group: LuaCommandable;
4761
4902
  /**
4762
- * Identifier of the event
4903
+ * Identifier of the event.
4763
4904
  */
4764
4905
  name: defines.events;
4765
4906
  /**
4766
4907
  * Tick the event was generated.
4767
4908
  */
4768
- tick: uint32;
4909
+ tick: MapTick;
4769
4910
  }
4770
4911
  /**
4771
4912
  * Called when a unit group finishes gathering and starts executing its command.
@@ -4773,13 +4914,13 @@ interface on_unit_group_created {
4773
4914
  interface on_unit_group_finished_gathering {
4774
4915
  group: LuaCommandable;
4775
4916
  /**
4776
- * Identifier of the event
4917
+ * Identifier of the event.
4777
4918
  */
4778
4919
  name: defines.events;
4779
4920
  /**
4780
4921
  * Tick the event was generated.
4781
4922
  */
4782
- tick: uint32;
4923
+ tick: MapTick;
4783
4924
  }
4784
4925
  /**
4785
4926
  * Called when a unit is removed from a unit group.
@@ -4787,13 +4928,13 @@ interface on_unit_group_finished_gathering {
4787
4928
  interface on_unit_removed_from_group {
4788
4929
  group: LuaCommandable;
4789
4930
  /**
4790
- * Identifier of the event
4931
+ * Identifier of the event.
4791
4932
  */
4792
4933
  name: defines.events;
4793
4934
  /**
4794
4935
  * Tick the event was generated.
4795
4936
  */
4796
- tick: uint32;
4937
+ tick: MapTick;
4797
4938
  unit: LuaEntity;
4798
4939
  }
4799
4940
  /**
@@ -4801,14 +4942,14 @@ interface on_unit_removed_from_group {
4801
4942
  */
4802
4943
  interface on_worker_robot_expired {
4803
4944
  /**
4804
- * Identifier of the event
4945
+ * Identifier of the event.
4805
4946
  */
4806
4947
  name: defines.events;
4807
4948
  robot: LuaEntity;
4808
4949
  /**
4809
4950
  * Tick the event was generated.
4810
4951
  */
4811
- tick: uint32;
4952
+ tick: MapTick;
4812
4953
  }
4813
4954
  /**
4814
4955
  * A static event mods can use to tell other mods they built something by script. This event is only raised if a mod does so with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event} or {@link LuaBootstrap::raise_script_built | runtime:LuaBootstrap::raise_script_built}, or when `raise_built` is passed to {@link LuaSurface::create_entity | runtime:LuaSurface::create_entity}.
@@ -4819,13 +4960,13 @@ interface script_raised_built {
4819
4960
  */
4820
4961
  entity: LuaEntity;
4821
4962
  /**
4822
- * Identifier of the event
4963
+ * Identifier of the event.
4823
4964
  */
4824
4965
  name: defines.events;
4825
4966
  /**
4826
4967
  * Tick the event was generated.
4827
4968
  */
4828
- tick: uint32;
4969
+ tick: MapTick;
4829
4970
  }
4830
4971
  /**
4831
4972
  * A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod does so with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event} or {@link LuaBootstrap::raise_script_destroy | runtime:LuaBootstrap::raise_script_destroy}, or when `raise_destroy` is passed to {@link LuaEntity::destroy | runtime:LuaEntity::destroy}.
@@ -4836,20 +4977,20 @@ interface script_raised_destroy {
4836
4977
  */
4837
4978
  entity: LuaEntity;
4838
4979
  /**
4839
- * Identifier of the event
4980
+ * Identifier of the event.
4840
4981
  */
4841
4982
  name: defines.events;
4842
4983
  /**
4843
4984
  * Tick the event was generated.
4844
4985
  */
4845
- tick: uint32;
4986
+ tick: MapTick;
4846
4987
  }
4847
4988
  /**
4848
4989
  * A static event that mods can use to tell other mods they destroyed a segmented unit by script. This event is only raised if a mod does so with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event}, or {@link LuaBootstrap::raise_script_destroy_segmented_unit | runtime:LuaBootstrap::raise_script_destroy_segmented_unit}, or when `raise_destroy` is passed to {@link LuaSegmentedUnit::destroy | runtime:LuaSegmentedUnit::destroy}.
4849
4990
  */
4850
4991
  interface script_raised_destroy_segmented_unit {
4851
4992
  /**
4852
- * Identifier of the event
4993
+ * Identifier of the event.
4853
4994
  */
4854
4995
  name: defines.events;
4855
4996
  /**
@@ -4859,7 +5000,7 @@ interface script_raised_destroy_segmented_unit {
4859
5000
  /**
4860
5001
  * Tick the event was generated.
4861
5002
  */
4862
- tick: uint32;
5003
+ tick: MapTick;
4863
5004
  }
4864
5005
  /**
4865
5006
  * A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event} or {@link LuaBootstrap::raise_script_revive | runtime:LuaBootstrap::raise_script_revive}, or when `raise_revive` is passed to {@link LuaEntity::revive | runtime:LuaEntity::revive}.
@@ -4870,7 +5011,7 @@ interface script_raised_revive {
4870
5011
  */
4871
5012
  entity: LuaEntity;
4872
5013
  /**
4873
- * Identifier of the event
5014
+ * Identifier of the event.
4874
5015
  */
4875
5016
  name: defines.events;
4876
5017
  /**
@@ -4880,14 +5021,14 @@ interface script_raised_revive {
4880
5021
  /**
4881
5022
  * Tick the event was generated.
4882
5023
  */
4883
- tick: uint32;
5024
+ tick: MapTick;
4884
5025
  }
4885
5026
  /**
4886
5027
  * A static event mods can use to tell other mods they changed tiles on a surface by script. This event is only raised if a mod does so with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event} or {@link LuaBootstrap::raise_script_set_tiles | runtime:LuaBootstrap::raise_script_set_tiles}, or when `raise_event` is passed to {@link LuaSurface::set_tiles | runtime:LuaSurface::set_tiles}.
4887
5028
  */
4888
5029
  interface script_raised_set_tiles {
4889
5030
  /**
4890
- * Identifier of the event
5031
+ * Identifier of the event.
4891
5032
  */
4892
5033
  name: defines.events;
4893
5034
  /**
@@ -4897,7 +5038,7 @@ interface script_raised_set_tiles {
4897
5038
  /**
4898
5039
  * Tick the event was generated.
4899
5040
  */
4900
- tick: uint32;
5041
+ tick: MapTick;
4901
5042
  /**
4902
5043
  * The tiles that were changed.
4903
5044
  */
@@ -4912,7 +5053,7 @@ interface script_raised_teleported {
4912
5053
  */
4913
5054
  entity: LuaEntity;
4914
5055
  /**
4915
- * Identifier of the event
5056
+ * Identifier of the event.
4916
5057
  */
4917
5058
  name: defines.events;
4918
5059
  /**
@@ -4926,7 +5067,7 @@ interface script_raised_teleported {
4926
5067
  /**
4927
5068
  * Tick the event was generated.
4928
5069
  */
4929
- tick: uint32;
5070
+ tick: MapTick;
4930
5071
  }
4931
5072
 
4932
5073
  }