typed-factorio 3.26.0 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ declare module "factorio:runtime" {
13
13
  * script.on_event("my-potato-control", function(event)
14
14
  * game.print("Keyboard shortcut pressed on tick: " ..tostring(event.tick))
15
15
  * end)
16
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#CustomInputEvent Online documentation}
16
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#CustomInputEvent Online documentation}
17
17
  */
18
18
  interface CustomInputEvent extends EventData {
19
19
  /**
@@ -55,7 +55,7 @@ declare module "factorio:runtime" {
55
55
  }
56
56
  /**
57
57
  * Called when an achievement is gained.
58
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_achievement_gained Online documentation}
58
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_achievement_gained Online documentation}
59
59
  */
60
60
  interface OnAchievementGainedEvent extends EventData {
61
61
  /**
@@ -74,7 +74,7 @@ declare module "factorio:runtime" {
74
74
  }
75
75
  /**
76
76
  * Called when a unit/group completes a command.
77
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_ai_command_completed Online documentation}
77
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_ai_command_completed Online documentation}
78
78
  */
79
79
  interface OnAiCommandCompletedEvent extends EventData {
80
80
  /**
@@ -97,7 +97,7 @@ declare module "factorio:runtime" {
97
97
  }
98
98
  /**
99
99
  * Called when an area of the map is cloned.
100
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_area_cloned Online documentation}
100
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_area_cloned Online documentation}
101
101
  */
102
102
  interface OnAreaClonedEvent extends EventData {
103
103
  readonly source_surface: LuaSurface
@@ -123,7 +123,7 @@ declare module "factorio:runtime" {
123
123
  * Called when a biter migration builds a base.
124
124
  *
125
125
  * This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
126
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_biter_base_built Online documentation}
126
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_biter_base_built Online documentation}
127
127
  */
128
128
  interface OnBiterBaseBuiltEvent extends EventData {
129
129
  /**
@@ -141,7 +141,7 @@ declare module "factorio:runtime" {
141
141
  }
142
142
  /**
143
143
  * Called when a set of positions on the map is cloned.
144
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_brush_cloned Online documentation}
144
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_brush_cloned Online documentation}
145
145
  */
146
146
  interface OnBrushClonedEvent extends EventData {
147
147
  readonly source_offset: TilePosition
@@ -166,7 +166,7 @@ declare module "factorio:runtime" {
166
166
  }
167
167
  /**
168
168
  * Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
169
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_build_base_arrived Online documentation}
169
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_build_base_arrived Online documentation}
170
170
  */
171
171
  interface OnBuildBaseArrivedEvent extends EventData {
172
172
  /**
@@ -190,7 +190,7 @@ declare module "factorio:runtime" {
190
190
  * Called when player builds something.
191
191
  *
192
192
  * Event filter: [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter]
193
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_built_entity Online documentation}
193
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_built_entity Online documentation}
194
194
  */
195
195
  interface OnBuiltEntityEvent extends EventData {
196
196
  /**
@@ -222,7 +222,7 @@ declare module "factorio:runtime" {
222
222
  * Called when the deconstruction of an entity is canceled.
223
223
  *
224
224
  * Event filter: [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter]
225
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cancelled_deconstruction Online documentation}
225
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cancelled_deconstruction Online documentation}
226
226
  */
227
227
  interface OnCancelledDeconstructionEvent extends EventData {
228
228
  readonly entity: LuaEntity
@@ -240,7 +240,7 @@ declare module "factorio:runtime" {
240
240
  * Called when the upgrade of an entity is canceled.
241
241
  *
242
242
  * Event filter: [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter]
243
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cancelled_upgrade Online documentation}
243
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cancelled_upgrade Online documentation}
244
244
  */
245
245
  interface OnCancelledUpgradeEvent extends EventData {
246
246
  readonly entity: LuaEntity
@@ -258,7 +258,7 @@ declare module "factorio:runtime" {
258
258
  }
259
259
  /**
260
260
  * Called after a cargo pod has delivered its cargo.
261
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cargo_pod_delivered_cargo Online documentation}
261
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cargo_pod_delivered_cargo Online documentation}
262
262
  */
263
263
  interface OnCargoPodDeliveredCargoEvent extends EventData {
264
264
  readonly cargo_pod: LuaEntity
@@ -277,7 +277,7 @@ declare module "factorio:runtime" {
277
277
  }
278
278
  /**
279
279
  * Called when a cargo pod departs a surface.
280
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cargo_pod_finished_ascending Online documentation}
280
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cargo_pod_finished_ascending Online documentation}
281
281
  */
282
282
  interface OnCargoPodFinishedAscendingEvent extends EventData {
283
283
  readonly cargo_pod: LuaEntity
@@ -300,7 +300,7 @@ declare module "factorio:runtime" {
300
300
  }
301
301
  /**
302
302
  * Called when a cargo pods lands on a surface, either at a station or on the ground.
303
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cargo_pod_finished_descending Online documentation}
303
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cargo_pod_finished_descending Online documentation}
304
304
  */
305
305
  interface OnCargoPodFinishedDescendingEvent extends EventData {
306
306
  readonly cargo_pod: LuaEntity
@@ -325,7 +325,7 @@ declare module "factorio:runtime" {
325
325
  * Called when a character corpse expires due to timeout or all of the items being removed from it.
326
326
  *
327
327
  * this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
328
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_character_corpse_expired Online documentation}
328
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_character_corpse_expired Online documentation}
329
329
  */
330
330
  interface OnCharacterCorpseExpiredEvent extends EventData {
331
331
  /**
@@ -343,7 +343,7 @@ declare module "factorio:runtime" {
343
343
  }
344
344
  /**
345
345
  * Called when a chart tag is created.
346
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_chart_tag_added Online documentation}
346
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_chart_tag_added Online documentation}
347
347
  */
348
348
  interface OnChartTagAddedEvent extends EventData {
349
349
  readonly tag: LuaCustomChartTag
@@ -360,7 +360,7 @@ declare module "factorio:runtime" {
360
360
  }
361
361
  /**
362
362
  * Called when a chart tag is modified by a player.
363
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_chart_tag_modified Online documentation}
363
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_chart_tag_modified Online documentation}
364
364
  */
365
365
  interface OnChartTagModifiedEvent extends EventData {
366
366
  readonly tag: LuaCustomChartTag
@@ -382,7 +382,7 @@ declare module "factorio:runtime" {
382
382
  }
383
383
  /**
384
384
  * Called just before a chart tag is deleted.
385
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_chart_tag_removed Online documentation}
385
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_chart_tag_removed Online documentation}
386
386
  */
387
387
  interface OnChartTagRemovedEvent extends EventData {
388
388
  readonly tag: LuaCustomChartTag
@@ -399,7 +399,7 @@ declare module "factorio:runtime" {
399
399
  }
400
400
  /**
401
401
  * Called when a chunk is charted or re-charted.
402
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_chunk_charted Online documentation}
402
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_chunk_charted Online documentation}
403
403
  */
404
404
  interface OnChunkChartedEvent extends EventData {
405
405
  readonly surface_index: SurfaceIndex
@@ -420,7 +420,7 @@ declare module "factorio:runtime" {
420
420
  }
421
421
  /**
422
422
  * Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
423
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_chunk_deleted Online documentation}
423
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_chunk_deleted Online documentation}
424
424
  */
425
425
  interface OnChunkDeletedEvent extends EventData {
426
426
  readonly surface_index: SurfaceIndex
@@ -439,7 +439,7 @@ declare module "factorio:runtime" {
439
439
  }
440
440
  /**
441
441
  * Called when a chunk is generated.
442
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_chunk_generated Online documentation}
442
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_chunk_generated Online documentation}
443
443
  */
444
444
  interface OnChunkGeneratedEvent extends EventData {
445
445
  /**
@@ -465,7 +465,7 @@ declare module "factorio:runtime" {
465
465
  }
466
466
  /**
467
467
  * Called when a combat robot expires through a lack of energy, or timeout.
468
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_combat_robot_expired Online documentation}
468
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_combat_robot_expired Online documentation}
469
469
  */
470
470
  interface OnCombatRobotExpiredEvent extends EventData {
471
471
  readonly robot: LuaEntity
@@ -486,7 +486,7 @@ declare module "factorio:runtime" {
486
486
  * Called when a message is sent to the in-game console, either by a player or through the server interface.
487
487
  *
488
488
  * This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
489
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_console_chat Online documentation}
489
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_console_chat Online documentation}
490
490
  */
491
491
  interface OnConsoleChatEvent extends EventData {
492
492
  /**
@@ -508,7 +508,7 @@ declare module "factorio:runtime" {
508
508
  }
509
509
  /**
510
510
  * Called when someone enters a command-like message regardless of it being a valid command.
511
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_console_command Online documentation}
511
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_console_command Online documentation}
512
512
  */
513
513
  interface OnConsoleCommandEvent extends EventData {
514
514
  /**
@@ -534,7 +534,7 @@ declare module "factorio:runtime" {
534
534
  }
535
535
  /**
536
536
  * Called when a cutscene is cancelled by the player or by script.
537
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cutscene_cancelled Online documentation}
537
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cutscene_cancelled Online documentation}
538
538
  */
539
539
  interface OnCutsceneCancelledEvent extends EventData {
540
540
  /**
@@ -552,7 +552,7 @@ declare module "factorio:runtime" {
552
552
  }
553
553
  /**
554
554
  * Called when a cutscene finishes naturally (was not cancelled).
555
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cutscene_finished Online documentation}
555
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cutscene_finished Online documentation}
556
556
  */
557
557
  interface OnCutsceneFinishedEvent extends EventData {
558
558
  /**
@@ -570,7 +570,7 @@ declare module "factorio:runtime" {
570
570
  }
571
571
  /**
572
572
  * Called when a cutscene starts.
573
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cutscene_started Online documentation}
573
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cutscene_started Online documentation}
574
574
  */
575
575
  interface OnCutsceneStartedEvent extends EventData {
576
576
  /**
@@ -590,7 +590,7 @@ declare module "factorio:runtime" {
590
590
  * Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
591
591
  *
592
592
  * This refers to an index in the table previously passed to set_controller which started the cutscene.
593
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_cutscene_waypoint_reached Online documentation}
593
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_cutscene_waypoint_reached Online documentation}
594
594
  */
595
595
  interface OnCutsceneWaypointReachedEvent extends EventData {
596
596
  /**
@@ -614,7 +614,7 @@ declare module "factorio:runtime" {
614
614
  * Called when an entity is cloned. The filter applies to the source entity.
615
615
  *
616
616
  * Event filter: [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter]
617
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_entity_cloned Online documentation}
617
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_entity_cloned Online documentation}
618
618
  */
619
619
  interface OnEntityClonedEvent extends EventData {
620
620
  readonly source: LuaEntity
@@ -632,7 +632,7 @@ declare module "factorio:runtime" {
632
632
  * Called after an entity has been recolored either by the player or through script.
633
633
  *
634
634
  * Automatic recoloring due to {@link LuaPlayer#color LuaPlayer::color} will not raise events, as that is a separate mechanism.
635
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_entity_color_changed Online documentation}
635
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_entity_color_changed Online documentation}
636
636
  */
637
637
  interface OnEntityColorChangedEvent extends EventData {
638
638
  /**
@@ -652,7 +652,7 @@ declare module "factorio:runtime" {
652
652
  * Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
653
653
  *
654
654
  * Event filter: [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter]
655
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_entity_damaged Online documentation}
655
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_entity_damaged Online documentation}
656
656
  */
657
657
  interface OnEntityDamagedEvent extends EventData {
658
658
  readonly entity: LuaEntity
@@ -694,7 +694,7 @@ declare module "factorio:runtime" {
694
694
  * Called when an entity dies.
695
695
  *
696
696
  * Event filter: [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter]
697
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_entity_died Online documentation}
697
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_entity_died Online documentation}
698
698
  */
699
699
  interface OnEntityDiedEvent extends EventData {
700
700
  /**
@@ -728,7 +728,7 @@ declare module "factorio:runtime" {
728
728
  }
729
729
  /**
730
730
  * Called when one of an entity's logistic slots changes.
731
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_entity_logistic_slot_changed Online documentation}
731
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_entity_logistic_slot_changed Online documentation}
732
732
  */
733
733
  interface OnEntityLogisticSlotChangedEvent extends EventData {
734
734
  /**
@@ -758,7 +758,7 @@ declare module "factorio:runtime" {
758
758
  }
759
759
  /**
760
760
  * Called after an entity has been renamed either by the player or through script.
761
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_entity_renamed Online documentation}
761
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_entity_renamed Online documentation}
762
762
  */
763
763
  interface OnEntityRenamedEvent extends EventData {
764
764
  /**
@@ -779,7 +779,7 @@ declare module "factorio:runtime" {
779
779
  }
780
780
  /**
781
781
  * Called after entity copy-paste is done.
782
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_entity_settings_pasted Online documentation}
782
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_entity_settings_pasted Online documentation}
783
783
  */
784
784
  interface OnEntitySettingsPastedEvent extends EventData {
785
785
  readonly player_index: PlayerIndex
@@ -802,7 +802,7 @@ declare module "factorio:runtime" {
802
802
  }
803
803
  /**
804
804
  * Called when an entity is spawned by a EnemySpawner
805
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_entity_spawned Online documentation}
805
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_entity_spawned Online documentation}
806
806
  */
807
807
  interface OnEntitySpawnedEvent extends EventData {
808
808
  readonly spawner: LuaEntity
@@ -818,7 +818,7 @@ declare module "factorio:runtime" {
818
818
  }
819
819
  /**
820
820
  * Called after equipment is inserted into an equipment grid.
821
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_equipment_inserted Online documentation}
821
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_equipment_inserted Online documentation}
822
822
  */
823
823
  interface OnEquipmentInsertedEvent extends EventData {
824
824
  /**
@@ -840,7 +840,7 @@ declare module "factorio:runtime" {
840
840
  }
841
841
  /**
842
842
  * Called after equipment is removed from an equipment grid.
843
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_equipment_removed Online documentation}
843
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_equipment_removed Online documentation}
844
844
  */
845
845
  interface OnEquipmentRemovedEvent extends EventData {
846
846
  /**
@@ -870,7 +870,7 @@ declare module "factorio:runtime" {
870
870
  }
871
871
  /**
872
872
  * Called when the a forces cease fire values change.
873
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_force_cease_fire_changed Online documentation}
873
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_force_cease_fire_changed Online documentation}
874
874
  */
875
875
  interface OnForceCeaseFireChangedEvent extends EventData {
876
876
  /**
@@ -898,7 +898,7 @@ declare module "factorio:runtime" {
898
898
  * Called when a new force is created using `game.create_force()`
899
899
  *
900
900
  * This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
901
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_force_created Online documentation}
901
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_force_created Online documentation}
902
902
  */
903
903
  interface OnForceCreatedEvent extends EventData {
904
904
  /**
@@ -916,7 +916,7 @@ declare module "factorio:runtime" {
916
916
  }
917
917
  /**
918
918
  * Called when the a forces friends change.
919
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_force_friends_changed Online documentation}
919
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_force_friends_changed Online documentation}
920
920
  */
921
921
  interface OnForceFriendsChangedEvent extends EventData {
922
922
  /**
@@ -942,7 +942,7 @@ declare module "factorio:runtime" {
942
942
  }
943
943
  /**
944
944
  * Called when {@link LuaForce#reset LuaForce::reset} is finished.
945
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_force_reset Online documentation}
945
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_force_reset Online documentation}
946
946
  */
947
947
  interface OnForceResetEvent extends EventData {
948
948
  readonly force: LuaForce
@@ -959,7 +959,7 @@ declare module "factorio:runtime" {
959
959
  * Called after two forces have been merged using `game.merge_forces()`.
960
960
  *
961
961
  * The source force is invalidated before this event is called and the name can be re-used in this event if desired.
962
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_forces_merged Online documentation}
962
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_forces_merged Online documentation}
963
963
  */
964
964
  interface OnForcesMergedEvent extends EventData {
965
965
  /**
@@ -985,7 +985,7 @@ declare module "factorio:runtime" {
985
985
  }
986
986
  /**
987
987
  * Called when two forces are about to be merged using `game.merge_forces()`.
988
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_forces_merging Online documentation}
988
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_forces_merging Online documentation}
989
989
  */
990
990
  interface OnForcesMergingEvent extends EventData {
991
991
  /**
@@ -1009,7 +1009,7 @@ declare module "factorio:runtime" {
1009
1009
  * 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 LuaBootstrap::on_init} is not fired.
1010
1010
  *
1011
1011
  * This event is not fired when the scenario is loaded via the map editor.
1012
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_game_created_from_scenario Online documentation}
1012
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_game_created_from_scenario Online documentation}
1013
1013
  */
1014
1014
  interface OnGameCreatedFromScenarioEvent extends EventData {
1015
1015
  /**
@@ -1023,7 +1023,7 @@ declare module "factorio:runtime" {
1023
1023
  }
1024
1024
  /**
1025
1025
  * Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
1026
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_checked_state_changed Online documentation}
1026
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_checked_state_changed Online documentation}
1027
1027
  */
1028
1028
  interface OnGuiCheckedStateChangedEvent extends EventData {
1029
1029
  /**
@@ -1045,7 +1045,7 @@ declare module "factorio:runtime" {
1045
1045
  }
1046
1046
  /**
1047
1047
  * Called when {@link LuaGuiElement} is clicked.
1048
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_click Online documentation}
1048
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_click Online documentation}
1049
1049
  */
1050
1050
  interface OnGuiClickEvent extends EventData {
1051
1051
  /**
@@ -1091,47 +1091,47 @@ declare module "factorio:runtime" {
1091
1091
  * This can only be raised when the GUI's player controller is still valid. If a GUI is thus closed due to the player disconnecting, dying, or becoming a spectator in other ways, it won't cause this event to be raised.
1092
1092
  *
1093
1093
  * It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.
1094
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_closed Online documentation}
1094
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_closed Online documentation}
1095
1095
  */
1096
1096
  interface OnGuiClosedEvent extends EventData {
1097
1097
  /**
1098
- * The player.
1098
+ * The player closing the GUI.
1099
1099
  */
1100
1100
  readonly player_index: PlayerIndex
1101
1101
  /**
1102
- * The GUI type that was open.
1102
+ * The type of GUI that was closed.
1103
1103
  */
1104
1104
  readonly gui_type: defines.gui_type
1105
1105
  /**
1106
- * The entity that was open
1106
+ * The position of the tile whose GUI was closed.
1107
1107
  */
1108
- readonly entity?: LuaEntity
1108
+ readonly tile_position?: TilePosition
1109
1109
  /**
1110
- * The item that was open
1110
+ * The equipment whose GUI was closed.
1111
1111
  */
1112
- readonly item?: LuaItemStack
1112
+ readonly equipment?: LuaEquipment
1113
1113
  /**
1114
- * The equipment that was open
1114
+ * The entity or entity grid whose GUI was closed.
1115
1115
  */
1116
- readonly equipment?: LuaEquipment
1116
+ readonly entity?: LuaEntity
1117
1117
  /**
1118
- * The other player that was open
1118
+ * The item whose GUI was closed.
1119
1119
  */
1120
- readonly other_player?: LuaPlayer
1120
+ readonly item?: LuaItemStack
1121
1121
  /**
1122
- * The custom GUI element that was open
1122
+ * The other player whose GUI was closed.
1123
1123
  */
1124
- readonly element?: LuaGuiElement
1124
+ readonly other_player?: LuaPlayer
1125
1125
  /**
1126
- * The technology that was automatically selected when opening the research GUI
1126
+ * The custom GUI element that was closed.
1127
1127
  */
1128
- readonly technology?: LuaTechnology
1128
+ readonly element?: LuaGuiElement
1129
1129
  /**
1130
- * The tile position that was open
1130
+ * The surface index of the global electric network whose GUI was closed.
1131
1131
  */
1132
- readonly tile_position?: TilePosition
1132
+ readonly surface_index?: SurfaceIndex
1133
1133
  /**
1134
- * The script inventory that was open
1134
+ * The script inventory whose GUI was closed.
1135
1135
  */
1136
1136
  readonly inventory?: LuaInventory
1137
1137
  /**
@@ -1145,7 +1145,7 @@ declare module "factorio:runtime" {
1145
1145
  }
1146
1146
  /**
1147
1147
  * Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
1148
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_confirmed Online documentation}
1148
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_confirmed Online documentation}
1149
1149
  */
1150
1150
  interface OnGuiConfirmedEvent extends EventData {
1151
1151
  /**
@@ -1179,7 +1179,7 @@ declare module "factorio:runtime" {
1179
1179
  }
1180
1180
  /**
1181
1181
  * Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
1182
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_elem_changed Online documentation}
1182
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_elem_changed Online documentation}
1183
1183
  */
1184
1184
  interface OnGuiElemChangedEvent extends EventData {
1185
1185
  /**
@@ -1203,7 +1203,7 @@ declare module "factorio:runtime" {
1203
1203
  * Called when {@link LuaGuiElement} is hovered by the mouse.
1204
1204
  *
1205
1205
  * Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
1206
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_hover Online documentation}
1206
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_hover Online documentation}
1207
1207
  */
1208
1208
  interface OnGuiHoverEvent extends EventData {
1209
1209
  /**
@@ -1227,7 +1227,7 @@ declare module "factorio:runtime" {
1227
1227
  * Called when the player's cursor leaves a {@link LuaGuiElement} that was previously hovered.
1228
1228
  *
1229
1229
  * Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
1230
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_leave Online documentation}
1230
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_leave Online documentation}
1231
1231
  */
1232
1232
  interface OnGuiLeaveEvent extends EventData {
1233
1233
  /**
@@ -1249,7 +1249,7 @@ declare module "factorio:runtime" {
1249
1249
  }
1250
1250
  /**
1251
1251
  * Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
1252
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_location_changed Online documentation}
1252
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_location_changed Online documentation}
1253
1253
  */
1254
1254
  interface OnGuiLocationChangedEvent extends EventData {
1255
1255
  /**
@@ -1271,39 +1271,47 @@ declare module "factorio:runtime" {
1271
1271
  }
1272
1272
  /**
1273
1273
  * Called when the player opens a GUI.
1274
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_opened Online documentation}
1274
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_opened Online documentation}
1275
1275
  */
1276
1276
  interface OnGuiOpenedEvent extends EventData {
1277
1277
  /**
1278
- * The player.
1278
+ * The player closing the GUI.
1279
1279
  */
1280
1280
  readonly player_index: PlayerIndex
1281
1281
  /**
1282
- * The GUI type that was opened.
1282
+ * The type of GUI that was opened.
1283
1283
  */
1284
1284
  readonly gui_type: defines.gui_type
1285
1285
  /**
1286
- * The entity that was opened
1286
+ * The position of the tile whose GUI was opened.
1287
1287
  */
1288
- readonly entity?: LuaEntity
1288
+ readonly tile_position?: TilePosition
1289
1289
  /**
1290
- * The item that was opened
1290
+ * The equipment whose GUI was opened.
1291
1291
  */
1292
- readonly item?: LuaItemStack
1292
+ readonly equipment?: LuaEquipment
1293
1293
  /**
1294
- * The equipment that was opened
1294
+ * The entity or entity grid whose GUI was opened.
1295
1295
  */
1296
- readonly equipment?: LuaEquipment
1296
+ readonly entity?: LuaEntity
1297
+ /**
1298
+ * The item whose GUI was opened.
1299
+ */
1300
+ readonly item?: LuaItemStack
1297
1301
  /**
1298
- * The other player that was opened
1302
+ * The other player whose GUI was opened.
1299
1303
  */
1300
1304
  readonly other_player?: LuaPlayer
1301
1305
  /**
1302
- * The custom GUI element that was opened
1306
+ * The custom GUI element that was opened.
1303
1307
  */
1304
1308
  readonly element?: LuaGuiElement
1305
1309
  /**
1306
- * The script inventory that was opened
1310
+ * The surface index of the global electric network whose GUI was opened.
1311
+ */
1312
+ readonly surface_index?: SurfaceIndex
1313
+ /**
1314
+ * The script inventory whose GUI was opened.
1307
1315
  */
1308
1316
  readonly inventory?: LuaInventory
1309
1317
  /**
@@ -1317,7 +1325,7 @@ declare module "factorio:runtime" {
1317
1325
  }
1318
1326
  /**
1319
1327
  * Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
1320
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_selected_tab_changed Online documentation}
1328
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_selected_tab_changed Online documentation}
1321
1329
  */
1322
1330
  interface OnGuiSelectedTabChangedEvent extends EventData {
1323
1331
  /**
@@ -1339,7 +1347,7 @@ declare module "factorio:runtime" {
1339
1347
  }
1340
1348
  /**
1341
1349
  * Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
1342
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_selection_state_changed Online documentation}
1350
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_selection_state_changed Online documentation}
1343
1351
  */
1344
1352
  interface OnGuiSelectionStateChangedEvent extends EventData {
1345
1353
  /**
@@ -1361,7 +1369,7 @@ declare module "factorio:runtime" {
1361
1369
  }
1362
1370
  /**
1363
1371
  * Called when {@link LuaGuiElement} switch state is changed (related to switches).
1364
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_switch_state_changed Online documentation}
1372
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_switch_state_changed Online documentation}
1365
1373
  */
1366
1374
  interface OnGuiSwitchStateChangedEvent extends EventData {
1367
1375
  /**
@@ -1383,7 +1391,7 @@ declare module "factorio:runtime" {
1383
1391
  }
1384
1392
  /**
1385
1393
  * Called when {@link LuaGuiElement} text is changed by the player.
1386
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_text_changed Online documentation}
1394
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_text_changed Online documentation}
1387
1395
  */
1388
1396
  interface OnGuiTextChangedEvent extends EventData {
1389
1397
  /**
@@ -1409,7 +1417,7 @@ declare module "factorio:runtime" {
1409
1417
  }
1410
1418
  /**
1411
1419
  * Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
1412
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_gui_value_changed Online documentation}
1420
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_gui_value_changed Online documentation}
1413
1421
  */
1414
1422
  interface OnGuiValueChangedEvent extends EventData {
1415
1423
  /**
@@ -1431,7 +1439,7 @@ declare module "factorio:runtime" {
1431
1439
  }
1432
1440
  /**
1433
1441
  * Called when a land mine is armed.
1434
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_land_mine_armed Online documentation}
1442
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_land_mine_armed Online documentation}
1435
1443
  */
1436
1444
  interface OnLandMineArmedEvent extends EventData {
1437
1445
  readonly mine: LuaEntity
@@ -1446,7 +1454,7 @@ declare module "factorio:runtime" {
1446
1454
  }
1447
1455
  /**
1448
1456
  * Called when a custom {@link import("factorio:prototype").ShortcutPrototype Lua shortcut} is pressed.
1449
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_lua_shortcut Online documentation}
1457
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_lua_shortcut Online documentation}
1450
1458
  */
1451
1459
  interface OnLuaShortcutEvent extends EventData {
1452
1460
  readonly player_index: PlayerIndex
@@ -1467,7 +1475,7 @@ declare module "factorio:runtime" {
1467
1475
  * Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
1468
1476
  *
1469
1477
  * Event filter: [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter]
1470
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_marked_for_deconstruction Online documentation}
1478
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_marked_for_deconstruction Online documentation}
1471
1479
  */
1472
1480
  interface OnMarkedForDeconstructionEvent extends EventData {
1473
1481
  readonly entity: LuaEntity
@@ -1485,7 +1493,7 @@ declare module "factorio:runtime" {
1485
1493
  * Called when an entity is marked for upgrade with the Upgrade planner or via script.
1486
1494
  *
1487
1495
  * Event filter: [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter]
1488
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_marked_for_upgrade Online documentation}
1496
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_marked_for_upgrade Online documentation}
1489
1497
  */
1490
1498
  interface OnMarkedForUpgradeEvent extends EventData {
1491
1499
  readonly player_index?: PlayerIndex
@@ -1503,7 +1511,7 @@ declare module "factorio:runtime" {
1503
1511
  }
1504
1512
  /**
1505
1513
  * Called after a player purchases some offer from a `market` entity.
1506
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_market_item_purchased Online documentation}
1514
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_market_item_purchased Online documentation}
1507
1515
  */
1508
1516
  interface OnMarketItemPurchasedEvent extends EventData {
1509
1517
  /**
@@ -1533,7 +1541,7 @@ declare module "factorio:runtime" {
1533
1541
  }
1534
1542
  /**
1535
1543
  * Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
1536
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_mod_item_opened Online documentation}
1544
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_mod_item_opened Online documentation}
1537
1545
  */
1538
1546
  interface OnModItemOpenedEvent extends EventData {
1539
1547
  /**
@@ -1559,7 +1567,7 @@ declare module "factorio:runtime" {
1559
1567
  }
1560
1568
  /**
1561
1569
  * Called when {@link LuaGameScript#is_multiplayer 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.
1562
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_multiplayer_init Online documentation}
1570
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_multiplayer_init Online documentation}
1563
1571
  */
1564
1572
  interface OnMultiplayerInitEvent extends EventData {
1565
1573
  /**
@@ -1575,7 +1583,7 @@ declare module "factorio:runtime" {
1575
1583
  * Called after an object is destroyed which was registered with {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed} previously.
1576
1584
  *
1577
1585
  * Depending on when a given object is destroyed, this event will be fired at the end of the current tick or at the end of the next tick. The event's timing is independent of the in-world object being destroyed.
1578
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_object_destroyed Online documentation}
1586
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_object_destroyed Online documentation}
1579
1587
  */
1580
1588
  interface OnObjectDestroyedEvent extends EventData {
1581
1589
  /**
@@ -1601,7 +1609,7 @@ declare module "factorio:runtime" {
1601
1609
  }
1602
1610
  /**
1603
1611
  * Called directly after a permission group is added.
1604
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_permission_group_added Online documentation}
1612
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_permission_group_added Online documentation}
1605
1613
  */
1606
1614
  interface OnPermissionGroupAddedEvent extends EventData {
1607
1615
  /**
@@ -1623,7 +1631,7 @@ declare module "factorio:runtime" {
1623
1631
  }
1624
1632
  /**
1625
1633
  * Called directly after a permission group is deleted.
1626
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_permission_group_deleted Online documentation}
1634
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_permission_group_deleted Online documentation}
1627
1635
  */
1628
1636
  interface OnPermissionGroupDeletedEvent extends EventData {
1629
1637
  /**
@@ -1649,7 +1657,7 @@ declare module "factorio:runtime" {
1649
1657
  }
1650
1658
  /**
1651
1659
  * Called directly after a permission group is edited in some way.
1652
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_permission_group_edited Online documentation}
1660
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_permission_group_edited Online documentation}
1653
1661
  */
1654
1662
  interface OnPermissionGroupEditedEvent extends EventData {
1655
1663
  /**
@@ -1698,7 +1706,7 @@ declare module "factorio:runtime" {
1698
1706
  }
1699
1707
  /**
1700
1708
  * Called directly after a permission string is imported.
1701
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_permission_string_imported Online documentation}
1709
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_permission_string_imported Online documentation}
1702
1710
  */
1703
1711
  interface OnPermissionStringImportedEvent extends EventData {
1704
1712
  /**
@@ -1716,10 +1724,10 @@ declare module "factorio:runtime" {
1716
1724
  }
1717
1725
  /**
1718
1726
  * Called when a player picks up an item.
1719
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_picked_up_item Online documentation}
1727
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_picked_up_item Online documentation}
1720
1728
  */
1721
1729
  interface OnPickedUpItemEvent extends EventData {
1722
- readonly item_stack: SimpleItemStack
1730
+ readonly item_stack: ItemWithQualityCount
1723
1731
  readonly player_index: PlayerIndex
1724
1732
  /**
1725
1733
  * Identifier of the event
@@ -1732,7 +1740,7 @@ declare module "factorio:runtime" {
1732
1740
  }
1733
1741
  /**
1734
1742
  * Called after a player alt-reverse-selects an area with a selection-tool item.
1735
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_alt_reverse_selected_area Online documentation}
1743
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_alt_reverse_selected_area Online documentation}
1736
1744
  */
1737
1745
  interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
1738
1746
  /**
@@ -1770,7 +1778,7 @@ declare module "factorio:runtime" {
1770
1778
  }
1771
1779
  /**
1772
1780
  * Called after a player alt-selects an area with a selection-tool item.
1773
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_alt_selected_area Online documentation}
1781
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_alt_selected_area Online documentation}
1774
1782
  */
1775
1783
  interface OnPlayerAltSelectedAreaEvent extends EventData {
1776
1784
  /**
@@ -1812,7 +1820,7 @@ declare module "factorio:runtime" {
1812
1820
  }
1813
1821
  /**
1814
1822
  * Called after a players ammo inventory changed in some way.
1815
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_ammo_inventory_changed Online documentation}
1823
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_ammo_inventory_changed Online documentation}
1816
1824
  */
1817
1825
  interface OnPlayerAmmoInventoryChangedEvent extends EventData {
1818
1826
  readonly player_index: PlayerIndex
@@ -1827,7 +1835,7 @@ declare module "factorio:runtime" {
1827
1835
  }
1828
1836
  /**
1829
1837
  * Called after a players armor inventory changed in some way.
1830
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_armor_inventory_changed Online documentation}
1838
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_armor_inventory_changed Online documentation}
1831
1839
  */
1832
1840
  interface OnPlayerArmorInventoryChangedEvent extends EventData {
1833
1841
  readonly player_index: PlayerIndex
@@ -1842,7 +1850,7 @@ declare module "factorio:runtime" {
1842
1850
  }
1843
1851
  /**
1844
1852
  * Called when a player is banned.
1845
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_banned Online documentation}
1853
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_banned Online documentation}
1846
1854
  */
1847
1855
  interface OnPlayerBannedEvent extends EventData {
1848
1856
  /**
@@ -1872,7 +1880,7 @@ declare module "factorio:runtime" {
1872
1880
  }
1873
1881
  /**
1874
1882
  * Called after a player builds tiles.
1875
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_built_tile Online documentation}
1883
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_built_tile Online documentation}
1876
1884
  */
1877
1885
  interface OnPlayerBuiltTileEvent extends EventData {
1878
1886
  readonly player_index: PlayerIndex
@@ -1911,7 +1919,7 @@ declare module "factorio:runtime" {
1911
1919
  }
1912
1920
  /**
1913
1921
  * Called when a player cancels crafting.
1914
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_cancelled_crafting Online documentation}
1922
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_cancelled_crafting Online documentation}
1915
1923
  */
1916
1924
  interface OnPlayerCancelledCraftingEvent extends EventData {
1917
1925
  /**
@@ -1941,7 +1949,7 @@ declare module "factorio:runtime" {
1941
1949
  }
1942
1950
  /**
1943
1951
  * Called after a player changes forces.
1944
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_changed_force Online documentation}
1952
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_changed_force Online documentation}
1945
1953
  */
1946
1954
  interface OnPlayerChangedForceEvent extends EventData {
1947
1955
  /**
@@ -1963,7 +1971,7 @@ declare module "factorio:runtime" {
1963
1971
  }
1964
1972
  /**
1965
1973
  * Called when the tile position a player is located at changes.
1966
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_changed_position Online documentation}
1974
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_changed_position Online documentation}
1967
1975
  */
1968
1976
  interface OnPlayerChangedPositionEvent extends EventData {
1969
1977
  /**
@@ -1981,7 +1989,7 @@ declare module "factorio:runtime" {
1981
1989
  }
1982
1990
  /**
1983
1991
  * Called after a player changes surfaces.
1984
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_changed_surface Online documentation}
1992
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_changed_surface Online documentation}
1985
1993
  */
1986
1994
  interface OnPlayerChangedSurfaceEvent extends EventData {
1987
1995
  /**
@@ -2003,7 +2011,7 @@ declare module "factorio:runtime" {
2003
2011
  }
2004
2012
  /**
2005
2013
  * Called when cheat mode is disabled on a player.
2006
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_cheat_mode_disabled Online documentation}
2014
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_cheat_mode_disabled Online documentation}
2007
2015
  */
2008
2016
  interface OnPlayerCheatModeDisabledEvent extends EventData {
2009
2017
  /**
@@ -2021,7 +2029,7 @@ declare module "factorio:runtime" {
2021
2029
  }
2022
2030
  /**
2023
2031
  * Called when cheat mode is enabled on a player.
2024
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_cheat_mode_enabled Online documentation}
2032
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_cheat_mode_enabled Online documentation}
2025
2033
  */
2026
2034
  interface OnPlayerCheatModeEnabledEvent extends EventData {
2027
2035
  /**
@@ -2039,7 +2047,7 @@ declare module "factorio:runtime" {
2039
2047
  }
2040
2048
  /**
2041
2049
  * Called when a player clicks a gps tag
2042
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_clicked_gps_tag Online documentation}
2050
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_clicked_gps_tag Online documentation}
2043
2051
  */
2044
2052
  interface OnPlayerClickedGpsTagEvent extends EventData {
2045
2053
  /**
@@ -2065,7 +2073,7 @@ declare module "factorio:runtime" {
2065
2073
  }
2066
2074
  /**
2067
2075
  * Called when a player clicks the "confirm" button in the configure Blueprint GUI.
2068
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_configured_blueprint Online documentation}
2076
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_configured_blueprint Online documentation}
2069
2077
  */
2070
2078
  interface OnPlayerConfiguredBlueprintEvent extends EventData {
2071
2079
  /**
@@ -2083,7 +2091,7 @@ declare module "factorio:runtime" {
2083
2091
  }
2084
2092
  /**
2085
2093
  * Called after a player changes controller types.
2086
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_controller_changed Online documentation}
2094
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_controller_changed Online documentation}
2087
2095
  */
2088
2096
  interface OnPlayerControllerChangedEvent extends EventData {
2089
2097
  /**
@@ -2105,7 +2113,7 @@ declare module "factorio:runtime" {
2105
2113
  }
2106
2114
  /**
2107
2115
  * 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 OnPrePlayerCraftedItemEvent on_pre_player_crafted_item}).
2108
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_crafted_item Online documentation}
2116
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_crafted_item Online documentation}
2109
2117
  */
2110
2118
  interface OnPlayerCraftedItemEvent extends EventData {
2111
2119
  /**
@@ -2131,7 +2139,7 @@ declare module "factorio:runtime" {
2131
2139
  }
2132
2140
  /**
2133
2141
  * Called after the player was created.
2134
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_created Online documentation}
2142
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_created Online documentation}
2135
2143
  */
2136
2144
  interface OnPlayerCreatedEvent extends EventData {
2137
2145
  readonly player_index: PlayerIndex
@@ -2148,7 +2156,7 @@ declare module "factorio:runtime" {
2148
2156
  * Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
2149
2157
  *
2150
2158
  * This is fired in the same tick that the change happens, but not instantly.
2151
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_cursor_stack_changed Online documentation}
2159
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_cursor_stack_changed Online documentation}
2152
2160
  */
2153
2161
  interface OnPlayerCursorStackChangedEvent extends EventData {
2154
2162
  readonly player_index: PlayerIndex
@@ -2163,7 +2171,7 @@ declare module "factorio:runtime" {
2163
2171
  }
2164
2172
  /**
2165
2173
  * Called when a player selects an area with a deconstruction planner.
2166
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_deconstructed_area Online documentation}
2174
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_deconstructed_area Online documentation}
2167
2175
  */
2168
2176
  interface OnPlayerDeconstructedAreaEvent extends EventData {
2169
2177
  /**
@@ -2209,7 +2217,7 @@ declare module "factorio:runtime" {
2209
2217
  }
2210
2218
  /**
2211
2219
  * Called when a player is demoted.
2212
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_demoted Online documentation}
2220
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_demoted Online documentation}
2213
2221
  */
2214
2222
  interface OnPlayerDemotedEvent extends EventData {
2215
2223
  /**
@@ -2227,7 +2235,7 @@ declare module "factorio:runtime" {
2227
2235
  }
2228
2236
  /**
2229
2237
  * Called after a player dies.
2230
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_died Online documentation}
2238
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_died Online documentation}
2231
2239
  */
2232
2240
  interface OnPlayerDiedEvent extends EventData {
2233
2241
  readonly player_index: PlayerIndex
@@ -2243,7 +2251,7 @@ declare module "factorio:runtime" {
2243
2251
  }
2244
2252
  /**
2245
2253
  * 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.
2246
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_display_density_scale_changed Online documentation}
2254
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_display_density_scale_changed Online documentation}
2247
2255
  */
2248
2256
  interface OnPlayerDisplayDensityScaleChangedEvent extends EventData {
2249
2257
  /**
@@ -2265,7 +2273,7 @@ declare module "factorio:runtime" {
2265
2273
  }
2266
2274
  /**
2267
2275
  * Called when the display resolution changes for a given player.
2268
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_display_resolution_changed Online documentation}
2276
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_display_resolution_changed Online documentation}
2269
2277
  */
2270
2278
  interface OnPlayerDisplayResolutionChangedEvent extends EventData {
2271
2279
  /**
@@ -2287,7 +2295,7 @@ declare module "factorio:runtime" {
2287
2295
  }
2288
2296
  /**
2289
2297
  * Called when the display scale changes for a given player.
2290
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_display_scale_changed Online documentation}
2298
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_display_scale_changed Online documentation}
2291
2299
  */
2292
2300
  interface OnPlayerDisplayScaleChangedEvent extends EventData {
2293
2301
  /**
@@ -2311,7 +2319,7 @@ declare module "factorio:runtime" {
2311
2319
  * Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
2312
2320
  *
2313
2321
  * This event is not raised when the player is ejected from a vehicle due to it being destroyed.
2314
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_driving_changed_state Online documentation}
2322
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_driving_changed_state Online documentation}
2315
2323
  */
2316
2324
  interface OnPlayerDrivingChangedStateEvent extends EventData {
2317
2325
  readonly player_index: PlayerIndex
@@ -2330,7 +2338,7 @@ declare module "factorio:runtime" {
2330
2338
  }
2331
2339
  /**
2332
2340
  * Called when a player drops an item on the ground.
2333
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_dropped_item Online documentation}
2341
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_dropped_item Online documentation}
2334
2342
  */
2335
2343
  interface OnPlayerDroppedItemEvent extends EventData {
2336
2344
  readonly player_index: PlayerIndex
@@ -2349,7 +2357,7 @@ declare module "factorio:runtime" {
2349
2357
  }
2350
2358
  /**
2351
2359
  * Called when a player fast-transfers something to or from an entity.
2352
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_fast_transferred Online documentation}
2360
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_fast_transferred Online documentation}
2353
2361
  */
2354
2362
  interface OnPlayerFastTransferredEvent extends EventData {
2355
2363
  /**
@@ -2381,7 +2389,7 @@ declare module "factorio:runtime" {
2381
2389
  * 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.
2382
2390
  *
2383
2391
  * This event reflects a change in the {@link LuaEntity#mirroring LuaEntity::mirroring} property.
2384
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_flipped_entity Online documentation}
2392
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_flipped_entity Online documentation}
2385
2393
  */
2386
2394
  interface OnPlayerFlippedEntityEvent extends EventData {
2387
2395
  /**
@@ -2404,7 +2412,7 @@ declare module "factorio:runtime" {
2404
2412
  }
2405
2413
  /**
2406
2414
  * Called after player flushed fluid
2407
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_flushed_fluid Online documentation}
2415
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_flushed_fluid Online documentation}
2408
2416
  */
2409
2417
  interface OnPlayerFlushedFluidEvent extends EventData {
2410
2418
  /**
@@ -2438,7 +2446,7 @@ declare module "factorio:runtime" {
2438
2446
  }
2439
2447
  /**
2440
2448
  * Called after a players gun inventory changed in some way.
2441
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_gun_inventory_changed Online documentation}
2449
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_gun_inventory_changed Online documentation}
2442
2450
  */
2443
2451
  interface OnPlayerGunInventoryChangedEvent extends EventData {
2444
2452
  readonly player_index: PlayerIndex
@@ -2453,7 +2461,7 @@ declare module "factorio:runtime" {
2453
2461
  }
2454
2462
  /**
2455
2463
  * Called when a player's input method changes. See {@link LuaPlayer#input_method LuaPlayer::input_method}.
2456
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_input_method_changed Online documentation}
2464
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_input_method_changed Online documentation}
2457
2465
  */
2458
2466
  interface OnPlayerInputMethodChangedEvent extends EventData {
2459
2467
  /**
@@ -2471,7 +2479,7 @@ declare module "factorio:runtime" {
2471
2479
  }
2472
2480
  /**
2473
2481
  * 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.
2474
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_joined_game Online documentation}
2482
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_joined_game Online documentation}
2475
2483
  */
2476
2484
  interface OnPlayerJoinedGameEvent extends EventData {
2477
2485
  readonly player_index: PlayerIndex
@@ -2486,7 +2494,7 @@ declare module "factorio:runtime" {
2486
2494
  }
2487
2495
  /**
2488
2496
  * Called when a player is kicked.
2489
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_kicked Online documentation}
2497
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_kicked Online documentation}
2490
2498
  */
2491
2499
  interface OnPlayerKickedEvent extends EventData {
2492
2500
  /**
@@ -2512,7 +2520,7 @@ declare module "factorio:runtime" {
2512
2520
  }
2513
2521
  /**
2514
2522
  * 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.
2515
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_left_game Online documentation}
2523
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_left_game Online documentation}
2516
2524
  */
2517
2525
  interface OnPlayerLeftGameEvent extends EventData {
2518
2526
  readonly player_index: PlayerIndex
@@ -2528,7 +2536,7 @@ declare module "factorio:runtime" {
2528
2536
  }
2529
2537
  /**
2530
2538
  * Called when a player's active locale changes. See {@link LuaPlayer#locale LuaPlayer::locale}.
2531
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_locale_changed Online documentation}
2539
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_locale_changed Online documentation}
2532
2540
  */
2533
2541
  interface OnPlayerLocaleChangedEvent extends EventData {
2534
2542
  /**
@@ -2550,7 +2558,7 @@ declare module "factorio:runtime" {
2550
2558
  }
2551
2559
  /**
2552
2560
  * Called after a players main inventory changed in some way.
2553
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_main_inventory_changed Online documentation}
2561
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_main_inventory_changed Online documentation}
2554
2562
  */
2555
2563
  interface OnPlayerMainInventoryChangedEvent extends EventData {
2556
2564
  readonly player_index: PlayerIndex
@@ -2571,7 +2579,7 @@ declare module "factorio:runtime" {
2571
2579
  * The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
2572
2580
  *
2573
2581
  * Event filter: [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter]
2574
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_mined_entity Online documentation}
2582
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_mined_entity Online documentation}
2575
2583
  */
2576
2584
  interface OnPlayerMinedEntityEvent extends EventData {
2577
2585
  /**
@@ -2597,13 +2605,13 @@ declare module "factorio:runtime" {
2597
2605
  }
2598
2606
  /**
2599
2607
  * Called when the player mines something.
2600
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_mined_item Online documentation}
2608
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_mined_item Online documentation}
2601
2609
  */
2602
2610
  interface OnPlayerMinedItemEvent extends EventData {
2603
2611
  /**
2604
2612
  * The item given to the player
2605
2613
  */
2606
- readonly item_stack: SimpleItemStack
2614
+ readonly item_stack: ItemWithQualityCount
2607
2615
  readonly player_index: PlayerIndex
2608
2616
  /**
2609
2617
  * Identifier of the event
@@ -2616,7 +2624,7 @@ declare module "factorio:runtime" {
2616
2624
  }
2617
2625
  /**
2618
2626
  * Called after a player mines tiles.
2619
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_mined_tile Online documentation}
2627
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_mined_tile Online documentation}
2620
2628
  */
2621
2629
  interface OnPlayerMinedTileEvent extends EventData {
2622
2630
  readonly player_index: PlayerIndex
@@ -2639,7 +2647,7 @@ declare module "factorio:runtime" {
2639
2647
  }
2640
2648
  /**
2641
2649
  * Called when a player is muted.
2642
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_muted Online documentation}
2650
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_muted Online documentation}
2643
2651
  */
2644
2652
  interface OnPlayerMutedEvent extends EventData {
2645
2653
  /**
@@ -2657,7 +2665,7 @@ declare module "factorio:runtime" {
2657
2665
  }
2658
2666
  /**
2659
2667
  * Called when a player invokes the "smart pipette" over an entity.
2660
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_pipette Online documentation}
2668
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_pipette Online documentation}
2661
2669
  */
2662
2670
  interface OnPlayerPipetteEvent extends EventData {
2663
2671
  /**
@@ -2687,7 +2695,7 @@ declare module "factorio:runtime" {
2687
2695
  }
2688
2696
  /**
2689
2697
  * Called after the player puts equipment in an equipment grid
2690
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_placed_equipment Online documentation}
2698
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_placed_equipment Online documentation}
2691
2699
  */
2692
2700
  interface OnPlayerPlacedEquipmentEvent extends EventData {
2693
2701
  readonly player_index: PlayerIndex
@@ -2710,7 +2718,7 @@ declare module "factorio:runtime" {
2710
2718
  }
2711
2719
  /**
2712
2720
  * Called when a player is promoted.
2713
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_promoted Online documentation}
2721
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_promoted Online documentation}
2714
2722
  */
2715
2723
  interface OnPlayerPromotedEvent extends EventData {
2716
2724
  /**
@@ -2728,7 +2736,7 @@ declare module "factorio:runtime" {
2728
2736
  }
2729
2737
  /**
2730
2738
  * Called when a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link OnPlayerLeftGameEvent leaving} the game, and instead behaves like the player never existed in the save file.
2731
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_removed Online documentation}
2739
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_removed Online documentation}
2732
2740
  */
2733
2741
  interface OnPlayerRemovedEvent extends EventData {
2734
2742
  /**
@@ -2746,7 +2754,7 @@ declare module "factorio:runtime" {
2746
2754
  }
2747
2755
  /**
2748
2756
  * Called after the player removes equipment from an equipment grid
2749
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_removed_equipment Online documentation}
2757
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_removed_equipment Online documentation}
2750
2758
  */
2751
2759
  interface OnPlayerRemovedEquipmentEvent extends EventData {
2752
2760
  readonly player_index: PlayerIndex
@@ -2779,7 +2787,7 @@ declare module "factorio:runtime" {
2779
2787
  * Called when a player repairs an entity.
2780
2788
  *
2781
2789
  * Event filter: [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter]
2782
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_repaired_entity Online documentation}
2790
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_repaired_entity Online documentation}
2783
2791
  */
2784
2792
  interface OnPlayerRepairedEntityEvent extends EventData {
2785
2793
  readonly player_index: PlayerIndex
@@ -2795,7 +2803,7 @@ declare module "factorio:runtime" {
2795
2803
  }
2796
2804
  /**
2797
2805
  * Called after a player respawns.
2798
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_respawned Online documentation}
2806
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_respawned Online documentation}
2799
2807
  */
2800
2808
  interface OnPlayerRespawnedEvent extends EventData {
2801
2809
  readonly player_index: PlayerIndex
@@ -2814,7 +2822,7 @@ declare module "factorio:runtime" {
2814
2822
  }
2815
2823
  /**
2816
2824
  * Called after a player reverse-selects an area with a selection-tool item.
2817
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_reverse_selected_area Online documentation}
2825
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_reverse_selected_area Online documentation}
2818
2826
  */
2819
2827
  interface OnPlayerReverseSelectedAreaEvent extends EventData {
2820
2828
  /**
@@ -2854,7 +2862,7 @@ declare module "factorio:runtime" {
2854
2862
  * Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event.
2855
2863
  *
2856
2864
  * Entities being flipped will not fire this event, even if the flip involves rotating. See {@link OnPlayerFlippedEntityEvent on_player_flipped_entity}.
2857
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_rotated_entity Online documentation}
2865
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_rotated_entity Online documentation}
2858
2866
  */
2859
2867
  interface OnPlayerRotatedEntityEvent extends EventData {
2860
2868
  /**
@@ -2877,7 +2885,7 @@ declare module "factorio:runtime" {
2877
2885
  }
2878
2886
  /**
2879
2887
  * Called after a player selects an area with a selection-tool item.
2880
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_selected_area Online documentation}
2888
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_selected_area Online documentation}
2881
2889
  */
2882
2890
  interface OnPlayerSelectedAreaEvent extends EventData {
2883
2891
  /**
@@ -2919,7 +2927,7 @@ declare module "factorio:runtime" {
2919
2927
  }
2920
2928
  /**
2921
2929
  * Called when a player sets a quickbar slot to anything (new value, or set to empty).
2922
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_set_quick_bar_slot Online documentation}
2930
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_set_quick_bar_slot Online documentation}
2923
2931
  */
2924
2932
  interface OnPlayerSetQuickBarSlotEvent extends EventData {
2925
2933
  readonly player_index: PlayerIndex
@@ -2934,7 +2942,7 @@ declare module "factorio:runtime" {
2934
2942
  }
2935
2943
  /**
2936
2944
  * Called when a player selects an area with a blueprint.
2937
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_setup_blueprint Online documentation}
2945
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_setup_blueprint Online documentation}
2938
2946
  */
2939
2947
  interface OnPlayerSetupBlueprintEvent extends EventData {
2940
2948
  /**
@@ -2984,7 +2992,7 @@ declare module "factorio:runtime" {
2984
2992
  }
2985
2993
  /**
2986
2994
  * Called when a player toggles alt mode, also known as "show entity info".
2987
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_toggled_alt_mode Online documentation}
2995
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_toggled_alt_mode Online documentation}
2988
2996
  */
2989
2997
  interface OnPlayerToggledAltModeEvent extends EventData {
2990
2998
  readonly player_index: PlayerIndex
@@ -3003,7 +3011,7 @@ declare module "factorio:runtime" {
3003
3011
  }
3004
3012
  /**
3005
3013
  * Called when a player toggles the map editor on or off.
3006
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_toggled_map_editor Online documentation}
3014
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_toggled_map_editor Online documentation}
3007
3015
  */
3008
3016
  interface OnPlayerToggledMapEditorEvent extends EventData {
3009
3017
  readonly player_index: PlayerIndex
@@ -3018,7 +3026,7 @@ declare module "factorio:runtime" {
3018
3026
  }
3019
3027
  /**
3020
3028
  * Called after a players trash inventory changed in some way.
3021
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_trash_inventory_changed Online documentation}
3029
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_trash_inventory_changed Online documentation}
3022
3030
  */
3023
3031
  interface OnPlayerTrashInventoryChangedEvent extends EventData {
3024
3032
  readonly player_index: PlayerIndex
@@ -3033,7 +3041,7 @@ declare module "factorio:runtime" {
3033
3041
  }
3034
3042
  /**
3035
3043
  * Called when a player is un-banned.
3036
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_unbanned Online documentation}
3044
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_unbanned Online documentation}
3037
3045
  */
3038
3046
  interface OnPlayerUnbannedEvent extends EventData {
3039
3047
  /**
@@ -3063,7 +3071,7 @@ declare module "factorio:runtime" {
3063
3071
  }
3064
3072
  /**
3065
3073
  * Called when a player is unmuted.
3066
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_unmuted Online documentation}
3074
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_unmuted Online documentation}
3067
3075
  */
3068
3076
  interface OnPlayerUnmutedEvent extends EventData {
3069
3077
  /**
@@ -3081,7 +3089,7 @@ declare module "factorio:runtime" {
3081
3089
  }
3082
3090
  /**
3083
3091
  * Called when a player uses a capsule that results in some game action.
3084
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_used_capsule Online documentation}
3092
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_used_capsule Online documentation}
3085
3093
  */
3086
3094
  interface OnPlayerUsedCapsuleEvent extends EventData {
3087
3095
  /**
@@ -3111,7 +3119,7 @@ declare module "factorio:runtime" {
3111
3119
  }
3112
3120
  /**
3113
3121
  * Called when a player uses spidertron remote to send all selected units to a given position
3114
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_player_used_spidertron_remote Online documentation}
3122
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_player_used_spidertron_remote Online documentation}
3115
3123
  */
3116
3124
  interface OnPlayerUsedSpidertronRemoteEvent extends EventData {
3117
3125
  /**
@@ -3135,7 +3143,7 @@ declare module "factorio:runtime" {
3135
3143
  * Called after an entity dies.
3136
3144
  *
3137
3145
  * Event filter: [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter]
3138
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_post_entity_died Online documentation}
3146
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_post_entity_died Online documentation}
3139
3147
  */
3140
3148
  interface OnPostEntityDiedEvent extends EventData {
3141
3149
  /**
@@ -3183,9 +3191,53 @@ declare module "factorio:runtime" {
3183
3191
  */
3184
3192
  readonly tick: uint
3185
3193
  }
3194
+ /**
3195
+ * Called after a segmented unit dies.
3196
+ *
3197
+ * Event filter: [LuaPostSegmentedUnitDiedEventFilter](LuaPostSegmentedUnitDiedEventFilter]
3198
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_post_segmented_unit_died Online documentation}
3199
+ */
3200
+ interface OnPostSegmentedUnitDiedEvent extends EventData {
3201
+ /**
3202
+ * The force that did the killing if any.
3203
+ */
3204
+ readonly force?: LuaForce
3205
+ /**
3206
+ * Information about each of the unit's individual segments when it died.
3207
+ */
3208
+ readonly segments: PostSegmentDiedData
3209
+ /**
3210
+ * The prototype of the unit that died.
3211
+ */
3212
+ readonly prototype: LuaEntityPrototype
3213
+ /**
3214
+ * The quality of the unit that died.
3215
+ */
3216
+ readonly quality: LuaQualityPrototype
3217
+ /**
3218
+ * The damage type that did the killing if any.
3219
+ */
3220
+ readonly damage_type?: LuaDamagePrototype
3221
+ /**
3222
+ * The surface the entity was on.
3223
+ */
3224
+ readonly surface_index: SurfaceIndex
3225
+ /**
3226
+ * The unit number of the unit that died.
3227
+ */
3228
+ readonly unit_number: UnitNumber
3229
+ /**
3230
+ * Identifier of the event
3231
+ */
3232
+ readonly name: typeof defines.events.on_post_segmented_unit_died
3233
+ /**
3234
+ * Tick the event was generated.
3235
+ */
3236
+ readonly tick: uint
3237
+ }
3186
3238
  /**
3187
3239
  * Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
3188
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_build Online documentation}
3240
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_build Online documentation}
3189
3241
  */
3190
3242
  interface OnPreBuildEvent extends EventData {
3191
3243
  /**
@@ -3231,7 +3283,7 @@ declare module "factorio:runtime" {
3231
3283
  }
3232
3284
  /**
3233
3285
  * Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
3234
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_chunk_deleted Online documentation}
3286
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_chunk_deleted Online documentation}
3235
3287
  */
3236
3288
  interface OnPreChunkDeletedEvent extends EventData {
3237
3289
  readonly surface_index: SurfaceIndex
@@ -3250,7 +3302,7 @@ declare module "factorio:runtime" {
3250
3302
  }
3251
3303
  /**
3252
3304
  * Called before entity copy-paste is done.
3253
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_entity_settings_pasted Online documentation}
3305
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_entity_settings_pasted Online documentation}
3254
3306
  */
3255
3307
  interface OnPreEntitySettingsPastedEvent extends EventData {
3256
3308
  readonly player_index: PlayerIndex
@@ -3277,7 +3329,7 @@ declare module "factorio:runtime" {
3277
3329
  * Also called for item request proxies before they are destroyed as a result of being marked for deconstruction.
3278
3330
  *
3279
3331
  * Event filter: [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter]
3280
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_ghost_deconstructed Online documentation}
3332
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_ghost_deconstructed Online documentation}
3281
3333
  */
3282
3334
  interface OnPreGhostDeconstructedEvent extends EventData {
3283
3335
  /**
@@ -3298,7 +3350,7 @@ declare module "factorio:runtime" {
3298
3350
  * Called before a ghost entity is upgraded.
3299
3351
  *
3300
3352
  * Event filter: [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter]
3301
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_ghost_upgraded Online documentation}
3353
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_ghost_upgraded Online documentation}
3302
3354
  */
3303
3355
  interface OnPreGhostUpgradedEvent extends EventData {
3304
3356
  /**
@@ -3319,7 +3371,7 @@ declare module "factorio:runtime" {
3319
3371
  }
3320
3372
  /**
3321
3373
  * Called directly before a permission group is deleted.
3322
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_permission_group_deleted Online documentation}
3374
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_permission_group_deleted Online documentation}
3323
3375
  */
3324
3376
  interface OnPrePermissionGroupDeletedEvent extends EventData {
3325
3377
  /**
@@ -3341,7 +3393,7 @@ declare module "factorio:runtime" {
3341
3393
  }
3342
3394
  /**
3343
3395
  * Called directly before a permission string is imported.
3344
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_permission_string_imported Online documentation}
3396
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_permission_string_imported Online documentation}
3345
3397
  */
3346
3398
  interface OnPrePermissionStringImportedEvent extends EventData {
3347
3399
  /**
@@ -3359,7 +3411,7 @@ declare module "factorio:runtime" {
3359
3411
  }
3360
3412
  /**
3361
3413
  * Called when a player queues something to be crafted.
3362
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_player_crafted_item Online documentation}
3414
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_player_crafted_item Online documentation}
3363
3415
  */
3364
3416
  interface OnPrePlayerCraftedItemEvent extends EventData {
3365
3417
  /**
@@ -3389,7 +3441,7 @@ declare module "factorio:runtime" {
3389
3441
  }
3390
3442
  /**
3391
3443
  * Called before a players dies.
3392
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_player_died Online documentation}
3444
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_player_died Online documentation}
3393
3445
  */
3394
3446
  interface OnPrePlayerDiedEvent extends EventData {
3395
3447
  readonly player_index: PlayerIndex
@@ -3405,7 +3457,7 @@ declare module "factorio:runtime" {
3405
3457
  }
3406
3458
  /**
3407
3459
  * Called before a player leaves the game.
3408
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_player_left_game Online documentation}
3460
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_player_left_game Online documentation}
3409
3461
  */
3410
3462
  interface OnPrePlayerLeftGameEvent extends EventData {
3411
3463
  readonly player_index: PlayerIndex
@@ -3423,7 +3475,7 @@ declare module "factorio:runtime" {
3423
3475
  * 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.
3424
3476
  *
3425
3477
  * Event filter: [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter]
3426
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_player_mined_item Online documentation}
3478
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_player_mined_item Online documentation}
3427
3479
  */
3428
3480
  interface OnPrePlayerMinedItemEvent extends EventData {
3429
3481
  /**
@@ -3442,7 +3494,7 @@ declare module "factorio:runtime" {
3442
3494
  }
3443
3495
  /**
3444
3496
  * Called before a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link OnPlayerLeftGameEvent leaving} the game, and instead behaves like the player never existed in the save file.
3445
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_player_removed Online documentation}
3497
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_player_removed Online documentation}
3446
3498
  */
3447
3499
  interface OnPrePlayerRemovedEvent extends EventData {
3448
3500
  /**
@@ -3460,7 +3512,7 @@ declare module "factorio:runtime" {
3460
3512
  }
3461
3513
  /**
3462
3514
  * Called before a player toggles the map editor on or off.
3463
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_player_toggled_map_editor Online documentation}
3515
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_player_toggled_map_editor Online documentation}
3464
3516
  */
3465
3517
  interface OnPrePlayerToggledMapEditorEvent extends EventData {
3466
3518
  readonly player_index: PlayerIndex
@@ -3475,7 +3527,7 @@ declare module "factorio:runtime" {
3475
3527
  }
3476
3528
  /**
3477
3529
  * Called directly before a robot explodes cliffs.
3478
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_robot_exploded_cliff Online documentation}
3530
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_robot_exploded_cliff Online documentation}
3479
3531
  */
3480
3532
  interface OnPreRobotExplodedCliffEvent extends EventData {
3481
3533
  readonly robot: LuaEntity
@@ -3499,7 +3551,7 @@ declare module "factorio:runtime" {
3499
3551
  }
3500
3552
  /**
3501
3553
  * Called just before the scenario finishes.
3502
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_scenario_finished Online documentation}
3554
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_scenario_finished Online documentation}
3503
3555
  */
3504
3556
  interface OnPreScenarioFinishedEvent extends EventData {
3505
3557
  /**
@@ -3517,7 +3569,7 @@ declare module "factorio:runtime" {
3517
3569
  }
3518
3570
  /**
3519
3571
  * Called just before a script inventory is resized.
3520
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_script_inventory_resized Online documentation}
3572
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_script_inventory_resized Online documentation}
3521
3573
  */
3522
3574
  interface OnPreScriptInventoryResizedEvent extends EventData {
3523
3575
  /**
@@ -3548,7 +3600,7 @@ declare module "factorio:runtime" {
3548
3600
  }
3549
3601
  /**
3550
3602
  * Called just before a surface is cleared (all entities removed and all chunks deleted).
3551
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_surface_cleared Online documentation}
3603
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_surface_cleared Online documentation}
3552
3604
  */
3553
3605
  interface OnPreSurfaceClearedEvent extends EventData {
3554
3606
  readonly surface_index: SurfaceIndex
@@ -3563,7 +3615,7 @@ declare module "factorio:runtime" {
3563
3615
  }
3564
3616
  /**
3565
3617
  * Called just before a surface is deleted.
3566
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_pre_surface_deleted Online documentation}
3618
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_pre_surface_deleted Online documentation}
3567
3619
  */
3568
3620
  interface OnPreSurfaceDeletedEvent extends EventData {
3569
3621
  readonly surface_index: SurfaceIndex
@@ -3578,7 +3630,7 @@ declare module "factorio:runtime" {
3578
3630
  }
3579
3631
  /**
3580
3632
  * Called when the player triggers "redo".
3581
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_redo_applied Online documentation}
3633
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_redo_applied Online documentation}
3582
3634
  */
3583
3635
  interface OnRedoAppliedEvent extends EventData {
3584
3636
  /**
@@ -3600,7 +3652,7 @@ declare module "factorio:runtime" {
3600
3652
  }
3601
3653
  /**
3602
3654
  * Called when research is cancelled.
3603
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_research_cancelled Online documentation}
3655
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_research_cancelled Online documentation}
3604
3656
  */
3605
3657
  interface OnResearchCancelledEvent extends EventData {
3606
3658
  /**
@@ -3626,7 +3678,7 @@ declare module "factorio:runtime" {
3626
3678
  }
3627
3679
  /**
3628
3680
  * Called when a research finishes.
3629
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_research_finished Online documentation}
3681
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_research_finished Online documentation}
3630
3682
  */
3631
3683
  interface OnResearchFinishedEvent extends EventData {
3632
3684
  /**
@@ -3648,7 +3700,7 @@ declare module "factorio:runtime" {
3648
3700
  }
3649
3701
  /**
3650
3702
  * Called when research is moved forwards or backwards in the research queue.
3651
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_research_moved Online documentation}
3703
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_research_moved Online documentation}
3652
3704
  */
3653
3705
  interface OnResearchMovedEvent extends EventData {
3654
3706
  /**
@@ -3670,7 +3722,7 @@ declare module "factorio:runtime" {
3670
3722
  }
3671
3723
  /**
3672
3724
  * Called when research is queued.
3673
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_research_queued Online documentation}
3725
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_research_queued Online documentation}
3674
3726
  */
3675
3727
  interface OnResearchQueuedEvent extends EventData {
3676
3728
  /**
@@ -3696,7 +3748,7 @@ declare module "factorio:runtime" {
3696
3748
  }
3697
3749
  /**
3698
3750
  * Called when a research is reversed (unresearched).
3699
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_research_reversed Online documentation}
3751
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_research_reversed Online documentation}
3700
3752
  */
3701
3753
  interface OnResearchReversedEvent extends EventData {
3702
3754
  /**
@@ -3718,7 +3770,7 @@ declare module "factorio:runtime" {
3718
3770
  }
3719
3771
  /**
3720
3772
  * Called when a technology research starts.
3721
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_research_started Online documentation}
3773
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_research_started Online documentation}
3722
3774
  */
3723
3775
  interface OnResearchStartedEvent extends EventData {
3724
3776
  /**
@@ -3737,7 +3789,7 @@ declare module "factorio:runtime" {
3737
3789
  }
3738
3790
  /**
3739
3791
  * Called when a resource entity reaches 0 or its minimum yield for infinite resources.
3740
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_resource_depleted Online documentation}
3792
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_resource_depleted Online documentation}
3741
3793
  */
3742
3794
  interface OnResourceDepletedEvent extends EventData {
3743
3795
  readonly entity: LuaEntity
@@ -3754,7 +3806,7 @@ declare module "factorio:runtime" {
3754
3806
  * Called when a construction robot builds an entity.
3755
3807
  *
3756
3808
  * Event filter: [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter]
3757
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_robot_built_entity Online documentation}
3809
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_robot_built_entity Online documentation}
3758
3810
  */
3759
3811
  interface OnRobotBuiltEntityEvent extends EventData {
3760
3812
  /**
@@ -3784,7 +3836,7 @@ declare module "factorio:runtime" {
3784
3836
  }
3785
3837
  /**
3786
3838
  * Called after a robot builds tiles.
3787
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_robot_built_tile Online documentation}
3839
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_robot_built_tile Online documentation}
3788
3840
  */
3789
3841
  interface OnRobotBuiltTileEvent extends EventData {
3790
3842
  /**
@@ -3826,7 +3878,7 @@ declare module "factorio:runtime" {
3826
3878
  }
3827
3879
  /**
3828
3880
  * Called directly after a robot explodes cliffs.
3829
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_robot_exploded_cliff Online documentation}
3881
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_robot_exploded_cliff Online documentation}
3830
3882
  */
3831
3883
  interface OnRobotExplodedCliffEvent extends EventData {
3832
3884
  readonly robot: LuaEntity
@@ -3849,7 +3901,7 @@ declare module "factorio:runtime" {
3849
3901
  }
3850
3902
  /**
3851
3903
  * Called when a robot mines an entity.
3852
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_robot_mined Online documentation}
3904
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_robot_mined Online documentation}
3853
3905
  */
3854
3906
  interface OnRobotMinedEvent extends EventData {
3855
3907
  /**
@@ -3859,7 +3911,7 @@ declare module "factorio:runtime" {
3859
3911
  /**
3860
3912
  * The entity the robot just picked up.
3861
3913
  */
3862
- readonly item_stack: SimpleItemStack
3914
+ readonly item_stack: ItemWithQualityCount
3863
3915
  /**
3864
3916
  * Identifier of the event
3865
3917
  */
@@ -3877,7 +3929,7 @@ declare module "factorio:runtime" {
3877
3929
  * The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
3878
3930
  *
3879
3931
  * Event filter: [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter]
3880
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_robot_mined_entity Online documentation}
3932
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_robot_mined_entity Online documentation}
3881
3933
  */
3882
3934
  interface OnRobotMinedEntityEvent extends EventData {
3883
3935
  /**
@@ -3903,7 +3955,7 @@ declare module "factorio:runtime" {
3903
3955
  }
3904
3956
  /**
3905
3957
  * Called after a robot mines tiles.
3906
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_robot_mined_tile Online documentation}
3958
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_robot_mined_tile Online documentation}
3907
3959
  */
3908
3960
  interface OnRobotMinedTileEvent extends EventData {
3909
3961
  /**
@@ -3931,7 +3983,7 @@ declare module "factorio:runtime" {
3931
3983
  * Called before a robot mines an entity.
3932
3984
  *
3933
3985
  * Event filter: [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter]
3934
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_robot_pre_mined Online documentation}
3986
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_robot_pre_mined Online documentation}
3935
3987
  */
3936
3988
  interface OnRobotPreMinedEvent extends EventData {
3937
3989
  /**
@@ -3953,7 +4005,7 @@ declare module "factorio:runtime" {
3953
4005
  }
3954
4006
  /**
3955
4007
  * Called when a rocket silo is ordered to be launched.
3956
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_rocket_launch_ordered Online documentation}
4008
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_rocket_launch_ordered Online documentation}
3957
4009
  */
3958
4010
  interface OnRocketLaunchOrderedEvent extends EventData {
3959
4011
  readonly rocket: LuaEntity
@@ -3973,7 +4025,7 @@ declare module "factorio:runtime" {
3973
4025
  }
3974
4026
  /**
3975
4027
  * 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)
3976
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_rocket_launched Online documentation}
4028
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_rocket_launched Online documentation}
3977
4029
  */
3978
4030
  interface OnRocketLaunchedEvent extends EventData {
3979
4031
  readonly rocket: LuaEntity
@@ -3989,7 +4041,7 @@ declare module "factorio:runtime" {
3989
4041
  }
3990
4042
  /**
3991
4043
  * Called when a runtime mod setting is changed by a player.
3992
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_runtime_mod_setting_changed Online documentation}
4044
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_runtime_mod_setting_changed Online documentation}
3993
4045
  */
3994
4046
  interface OnRuntimeModSettingChangedEvent extends EventData {
3995
4047
  /**
@@ -4012,7 +4064,7 @@ declare module "factorio:runtime" {
4012
4064
  }
4013
4065
  /**
4014
4066
  * Called just after a script inventory is resized.
4015
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_script_inventory_resized Online documentation}
4067
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_script_inventory_resized Online documentation}
4016
4068
  */
4017
4069
  interface OnScriptInventoryResizedEvent extends EventData {
4018
4070
  /**
@@ -4047,7 +4099,7 @@ declare module "factorio:runtime" {
4047
4099
  }
4048
4100
  /**
4049
4101
  * Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
4050
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_script_path_request_finished Online documentation}
4102
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_script_path_request_finished Online documentation}
4051
4103
  */
4052
4104
  interface OnScriptPathRequestFinishedEvent extends EventData {
4053
4105
  /**
@@ -4073,7 +4125,7 @@ declare module "factorio:runtime" {
4073
4125
  }
4074
4126
  /**
4075
4127
  * Called when a script trigger effect is triggered.
4076
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_script_trigger_effect Online documentation}
4128
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_script_trigger_effect Online documentation}
4077
4129
  */
4078
4130
  interface OnScriptTriggerEffectEvent extends EventData {
4079
4131
  /**
@@ -4106,7 +4158,7 @@ declare module "factorio:runtime" {
4106
4158
  * Called when an entity of type `radar` finishes scanning a sector.
4107
4159
  *
4108
4160
  * Event filter: [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter]
4109
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_sector_scanned Online documentation}
4161
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_sector_scanned Online documentation}
4110
4162
  */
4111
4163
  interface OnSectorScannedEvent extends EventData {
4112
4164
  /**
@@ -4132,7 +4184,7 @@ declare module "factorio:runtime" {
4132
4184
  }
4133
4185
  /**
4134
4186
  * Called when an individual segment of a SegmentedUnit is created.
4135
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_segment_entity_created Online documentation}
4187
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_segment_entity_created Online documentation}
4136
4188
  */
4137
4189
  interface OnSegmentEntityCreatedEvent extends EventData {
4138
4190
  readonly entity: LuaEntity
@@ -4145,9 +4197,111 @@ declare module "factorio:runtime" {
4145
4197
  */
4146
4198
  readonly tick: uint
4147
4199
  }
4200
+ /**
4201
+ * Called when a segmented unit is created for any reason.
4202
+ *
4203
+ * Event filter: [LuaSegmentedUnitCreatedEventFilter](LuaSegmentedUnitCreatedEventFilter]
4204
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_segmented_unit_created Online documentation}
4205
+ */
4206
+ interface OnSegmentedUnitCreatedEvent extends EventData {
4207
+ /**
4208
+ * The reason that the segmented unit was created.
4209
+ */
4210
+ readonly cause: defines.segmented_unit_created_cause
4211
+ /**
4212
+ * The segmented unit that was created.
4213
+ */
4214
+ readonly segmented_unit: LuaSegmentedUnit
4215
+ /**
4216
+ * If the new segmented unit was cloned, the segmented unit from which the new unit was cloned.
4217
+ */
4218
+ readonly clone_source?: LuaSegmentedUnit
4219
+ /**
4220
+ * Identifier of the event
4221
+ */
4222
+ readonly name: typeof defines.events.on_segmented_unit_created
4223
+ /**
4224
+ * Tick the event was generated.
4225
+ */
4226
+ readonly tick: uint
4227
+ }
4228
+ /**
4229
+ * Called when a segmented unit is damaged. This is not called when a segmented unit's health is set directly by another mod.
4230
+ *
4231
+ * Event filter: [LuaSegmentedUnitDamagedEventFilter](LuaSegmentedUnitDamagedEventFilter]
4232
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_segmented_unit_damaged Online documentation}
4233
+ */
4234
+ interface OnSegmentedUnitDamagedEvent extends EventData {
4235
+ readonly segmented_unit: LuaSegmentedUnit
4236
+ readonly damage_type: LuaDamagePrototype
4237
+ /**
4238
+ * The damage amount before resistances.
4239
+ */
4240
+ readonly original_damage_amount: float
4241
+ /**
4242
+ * The damage amount after resistances.
4243
+ */
4244
+ readonly final_damage_amount: float
4245
+ /**
4246
+ * The health of the unit after the damage was applied.
4247
+ */
4248
+ readonly final_health: float
4249
+ /**
4250
+ * The entity that originally triggered the events that led to this damage, if available (e.g. the character, turret, etc. that pulled the trigger).
4251
+ */
4252
+ readonly cause?: LuaEntity
4253
+ /**
4254
+ * The entity that is directly dealing the damage, if available (e.g. the projectile, flame, sticker, grenade, laser beam, etc.).
4255
+ */
4256
+ readonly source?: LuaEntity
4257
+ /**
4258
+ * The force that did the attacking.
4259
+ */
4260
+ readonly force?: LuaForce
4261
+ /**
4262
+ * Identifier of the event
4263
+ */
4264
+ readonly name: typeof defines.events.on_segmented_unit_damaged
4265
+ /**
4266
+ * Tick the event was generated.
4267
+ */
4268
+ readonly tick: uint
4269
+ }
4270
+ /**
4271
+ * Called when a segmented unit dies.
4272
+ *
4273
+ * Event filter: [LuaSegmentedUnitDiedEventFilter](LuaSegmentedUnitDiedEventFilter]
4274
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_segmented_unit_died Online documentation}
4275
+ */
4276
+ interface OnSegmentedUnitDiedEvent extends EventData {
4277
+ /**
4278
+ * The unit that died.
4279
+ */
4280
+ readonly segmented_unit: LuaSegmentedUnit
4281
+ /**
4282
+ * The entity that did the killing if available.
4283
+ */
4284
+ readonly cause?: LuaEntity
4285
+ /**
4286
+ * The force that did the killing if any.
4287
+ */
4288
+ readonly force?: LuaForce
4289
+ /**
4290
+ * The damage type if any.
4291
+ */
4292
+ readonly damage_type?: LuaDamagePrototype
4293
+ /**
4294
+ * Identifier of the event
4295
+ */
4296
+ readonly name: typeof defines.events.on_segmented_unit_died
4297
+ /**
4298
+ * Tick the event was generated.
4299
+ */
4300
+ readonly tick: uint
4301
+ }
4148
4302
  /**
4149
4303
  * Called after the selected entity changes for a given player.
4150
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_selected_entity_changed Online documentation}
4304
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_selected_entity_changed Online documentation}
4151
4305
  */
4152
4306
  interface OnSelectedEntityChangedEvent extends EventData {
4153
4307
  /**
@@ -4169,7 +4323,7 @@ declare module "factorio:runtime" {
4169
4323
  }
4170
4324
  /**
4171
4325
  * Called when {@link LuaGameScript#is_multiplayer 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.
4172
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_singleplayer_init Online documentation}
4326
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_singleplayer_init Online documentation}
4173
4327
  */
4174
4328
  interface OnSingleplayerInitEvent extends EventData {
4175
4329
  /**
@@ -4185,7 +4339,7 @@ declare module "factorio:runtime" {
4185
4339
  * Called when a space platform builds an entity.
4186
4340
  *
4187
4341
  * Event filter: [LuaPlatformBuiltEntityEventFilter](LuaPlatformBuiltEntityEventFilter]
4188
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_space_platform_built_entity Online documentation}
4342
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_space_platform_built_entity Online documentation}
4189
4343
  */
4190
4344
  interface OnSpacePlatformBuiltEntityEvent extends EventData {
4191
4345
  /**
@@ -4215,7 +4369,7 @@ declare module "factorio:runtime" {
4215
4369
  }
4216
4370
  /**
4217
4371
  * Called after a space platform builds tiles.
4218
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_space_platform_built_tile Online documentation}
4372
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_space_platform_built_tile Online documentation}
4219
4373
  */
4220
4374
  interface OnSpacePlatformBuiltTileEvent extends EventData {
4221
4375
  /**
@@ -4257,7 +4411,7 @@ declare module "factorio:runtime" {
4257
4411
  }
4258
4412
  /**
4259
4413
  * Called when a space platform changes state
4260
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_space_platform_changed_state Online documentation}
4414
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_space_platform_changed_state Online documentation}
4261
4415
  */
4262
4416
  interface OnSpacePlatformChangedStateEvent extends EventData {
4263
4417
  readonly platform: LuaSpacePlatform
@@ -4279,7 +4433,7 @@ declare module "factorio:runtime" {
4279
4433
  * The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
4280
4434
  *
4281
4435
  * Event filter: [LuaPlatformMinedEntityEventFilter](LuaPlatformMinedEntityEventFilter]
4282
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_space_platform_mined_entity Online documentation}
4436
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_space_platform_mined_entity Online documentation}
4283
4437
  */
4284
4438
  interface OnSpacePlatformMinedEntityEvent extends EventData {
4285
4439
  /**
@@ -4305,7 +4459,7 @@ declare module "factorio:runtime" {
4305
4459
  }
4306
4460
  /**
4307
4461
  * Called when a platform mines an entity.
4308
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_space_platform_mined_item Online documentation}
4462
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_space_platform_mined_item Online documentation}
4309
4463
  */
4310
4464
  interface OnSpacePlatformMinedItemEvent extends EventData {
4311
4465
  /**
@@ -4315,7 +4469,7 @@ declare module "factorio:runtime" {
4315
4469
  /**
4316
4470
  * The entity the platform just picked up.
4317
4471
  */
4318
- readonly item_stack: SimpleItemStack
4472
+ readonly item_stack: ItemWithQualityCount
4319
4473
  /**
4320
4474
  * Identifier of the event
4321
4475
  */
@@ -4327,7 +4481,7 @@ declare module "factorio:runtime" {
4327
4481
  }
4328
4482
  /**
4329
4483
  * Called after a platform mines tiles.
4330
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_space_platform_mined_tile Online documentation}
4484
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_space_platform_mined_tile Online documentation}
4331
4485
  */
4332
4486
  interface OnSpacePlatformMinedTileEvent extends EventData {
4333
4487
  /**
@@ -4355,7 +4509,7 @@ declare module "factorio:runtime" {
4355
4509
  * Called before a platform mines an entity.
4356
4510
  *
4357
4511
  * Event filter: [LuaPrePlatformMinedEntityEventFilter](LuaPrePlatformMinedEntityEventFilter]
4358
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_space_platform_pre_mined Online documentation}
4512
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_space_platform_pre_mined Online documentation}
4359
4513
  */
4360
4514
  interface OnSpacePlatformPreMinedEvent extends EventData {
4361
4515
  /**
@@ -4377,7 +4531,7 @@ declare module "factorio:runtime" {
4377
4531
  }
4378
4532
  /**
4379
4533
  * Called when a spider finishes moving to its autopilot position.
4380
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_spider_command_completed Online documentation}
4534
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_spider_command_completed Online documentation}
4381
4535
  */
4382
4536
  interface OnSpiderCommandCompletedEvent extends EventData {
4383
4537
  /**
@@ -4395,7 +4549,7 @@ declare module "factorio:runtime" {
4395
4549
  }
4396
4550
  /**
4397
4551
  * Called when a translation request generated through {@link LuaPlayer#request_translation LuaPlayer::request_translation} or {@link LuaPlayer#request_translations LuaPlayer::request_translations} has been completed.
4398
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_string_translated Online documentation}
4552
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_string_translated Online documentation}
4399
4553
  */
4400
4554
  interface OnStringTranslatedEvent extends EventData {
4401
4555
  /**
@@ -4429,7 +4583,7 @@ declare module "factorio:runtime" {
4429
4583
  }
4430
4584
  /**
4431
4585
  * Called just after a surface is cleared (all entities removed and all chunks deleted).
4432
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_surface_cleared Online documentation}
4586
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_surface_cleared Online documentation}
4433
4587
  */
4434
4588
  interface OnSurfaceClearedEvent extends EventData {
4435
4589
  readonly surface_index: SurfaceIndex
@@ -4446,7 +4600,7 @@ declare module "factorio:runtime" {
4446
4600
  * Called when a surface is created.
4447
4601
  *
4448
4602
  * This is not called when the default surface is created as it will always exist.
4449
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_surface_created Online documentation}
4603
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_surface_created Online documentation}
4450
4604
  */
4451
4605
  interface OnSurfaceCreatedEvent extends EventData {
4452
4606
  readonly surface_index: SurfaceIndex
@@ -4461,7 +4615,7 @@ declare module "factorio:runtime" {
4461
4615
  }
4462
4616
  /**
4463
4617
  * Called after a surface is deleted.
4464
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_surface_deleted Online documentation}
4618
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_surface_deleted Online documentation}
4465
4619
  */
4466
4620
  interface OnSurfaceDeletedEvent extends EventData {
4467
4621
  readonly surface_index: SurfaceIndex
@@ -4476,7 +4630,7 @@ declare module "factorio:runtime" {
4476
4630
  }
4477
4631
  /**
4478
4632
  * Called after a surface is imported via the map editor.
4479
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_surface_imported Online documentation}
4633
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_surface_imported Online documentation}
4480
4634
  */
4481
4635
  interface OnSurfaceImportedEvent extends EventData {
4482
4636
  readonly surface_index: SurfaceIndex
@@ -4495,7 +4649,7 @@ declare module "factorio:runtime" {
4495
4649
  }
4496
4650
  /**
4497
4651
  * Called when a surface is renamed.
4498
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_surface_renamed Online documentation}
4652
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_surface_renamed Online documentation}
4499
4653
  */
4500
4654
  interface OnSurfaceRenamedEvent extends EventData {
4501
4655
  readonly surface_index: SurfaceIndex
@@ -4512,7 +4666,7 @@ declare module "factorio:runtime" {
4512
4666
  }
4513
4667
  /**
4514
4668
  * Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
4515
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_technology_effects_reset Online documentation}
4669
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_technology_effects_reset Online documentation}
4516
4670
  */
4517
4671
  interface OnTechnologyEffectsResetEvent extends EventData {
4518
4672
  readonly force: LuaForce
@@ -4525,9 +4679,49 @@ declare module "factorio:runtime" {
4525
4679
  */
4526
4680
  readonly tick: uint
4527
4681
  }
4682
+ /**
4683
+ * Called when a territory is created for any reason.
4684
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_territory_created Online documentation}
4685
+ */
4686
+ interface OnTerritoryCreatedEvent extends EventData {
4687
+ /**
4688
+ * The reason the territory was created.
4689
+ */
4690
+ readonly cause: defines.territory_created_cause
4691
+ /**
4692
+ * The territory that was created.
4693
+ */
4694
+ readonly territory: LuaTerritory
4695
+ /**
4696
+ * Identifier of the event
4697
+ */
4698
+ readonly name: typeof defines.events.on_territory_created
4699
+ /**
4700
+ * Tick the event was generated.
4701
+ */
4702
+ readonly tick: uint
4703
+ }
4704
+ /**
4705
+ * Called when a territory is destroyed from a surface.
4706
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_territory_destroyed Online documentation}
4707
+ */
4708
+ interface OnTerritoryDestroyedEvent extends EventData {
4709
+ /**
4710
+ * The territory that will be destroyed. This object will be valid so that you can still read and modify its properties before it is finally destroyed.
4711
+ */
4712
+ readonly territory: LuaTerritory
4713
+ /**
4714
+ * Identifier of the event
4715
+ */
4716
+ readonly name: typeof defines.events.on_territory_destroyed
4717
+ /**
4718
+ * Tick the event was generated.
4719
+ */
4720
+ readonly tick: uint
4721
+ }
4528
4722
  /**
4529
4723
  * It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
4530
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_tick Online documentation}
4724
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_tick Online documentation}
4531
4725
  */
4532
4726
  interface OnTickEvent extends EventData {
4533
4727
  /**
@@ -4539,9 +4733,87 @@ declare module "factorio:runtime" {
4539
4733
  */
4540
4734
  readonly tick: uint
4541
4735
  }
4736
+ /**
4737
+ * Called after the results of an entity being mined are collected just before the entity is destroyed.
4738
+ *
4739
+ * After this event any items in the buffer will be transferred into the tower as if they came from mining the entity.
4740
+ *
4741
+ * The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
4742
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_tower_mined_plant Online documentation}
4743
+ */
4744
+ interface OnTowerMinedPlantEvent extends EventData {
4745
+ /**
4746
+ * The tower doing the mining.
4747
+ */
4748
+ readonly tower: LuaEntity
4749
+ /**
4750
+ * The entity that has been mined.
4751
+ */
4752
+ readonly plant: LuaEntity
4753
+ /**
4754
+ * The temporary inventory that holds the result of mining the entity.
4755
+ */
4756
+ readonly buffer: LuaInventory
4757
+ /**
4758
+ * Identifier of the event
4759
+ */
4760
+ readonly name: typeof defines.events.on_tower_mined_plant
4761
+ /**
4762
+ * Tick the event was generated.
4763
+ */
4764
+ readonly tick: uint
4765
+ }
4766
+ /**
4767
+ * Called before an agricultural tower planets a seed.
4768
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_tower_planted_seed Online documentation}
4769
+ */
4770
+ interface OnTowerPlantedSeedEvent extends EventData {
4771
+ /**
4772
+ * The tower that's did the planting.
4773
+ */
4774
+ readonly tower: LuaEntity
4775
+ /**
4776
+ * The plant which was planted.
4777
+ */
4778
+ readonly plant: LuaEntity
4779
+ /**
4780
+ * The seed that was used.
4781
+ */
4782
+ readonly seed: ItemIDAndQualityIDPair
4783
+ /**
4784
+ * Identifier of the event
4785
+ */
4786
+ readonly name: typeof defines.events.on_tower_planted_seed
4787
+ /**
4788
+ * Tick the event was generated.
4789
+ */
4790
+ readonly tick: uint
4791
+ }
4792
+ /**
4793
+ * Called before an agricultural tower mines a plant.
4794
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_tower_pre_mined_plant Online documentation}
4795
+ */
4796
+ interface OnTowerPreMinedPlantEvent extends EventData {
4797
+ /**
4798
+ * The tower that's about to do the mining.
4799
+ */
4800
+ readonly tower: LuaEntity
4801
+ /**
4802
+ * The plant which is about to be mined.
4803
+ */
4804
+ readonly plant: LuaEntity
4805
+ /**
4806
+ * Identifier of the event
4807
+ */
4808
+ readonly name: typeof defines.events.on_tower_pre_mined_plant
4809
+ /**
4810
+ * Tick the event was generated.
4811
+ */
4812
+ readonly tick: uint
4813
+ }
4542
4814
  /**
4543
4815
  * Called when a train changes state (started to stopped and vice versa)
4544
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_train_changed_state Online documentation}
4816
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_train_changed_state Online documentation}
4545
4817
  */
4546
4818
  interface OnTrainChangedStateEvent extends EventData {
4547
4819
  readonly train: LuaTrain
@@ -4557,7 +4829,7 @@ declare module "factorio:runtime" {
4557
4829
  }
4558
4830
  /**
4559
4831
  * Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
4560
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_train_created Online documentation}
4832
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_train_created Online documentation}
4561
4833
  */
4562
4834
  interface OnTrainCreatedEvent extends EventData {
4563
4835
  readonly train: LuaTrain
@@ -4580,7 +4852,7 @@ declare module "factorio:runtime" {
4580
4852
  }
4581
4853
  /**
4582
4854
  * Called when a trains schedule is changed either by the player or through script.
4583
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_train_schedule_changed Online documentation}
4855
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_train_schedule_changed Online documentation}
4584
4856
  */
4585
4857
  interface OnTrainScheduleChangedEvent extends EventData {
4586
4858
  readonly train: LuaTrain
@@ -4599,7 +4871,7 @@ declare module "factorio:runtime" {
4599
4871
  }
4600
4872
  /**
4601
4873
  * Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.
4602
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_trigger_created_entity Online documentation}
4874
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_trigger_created_entity Online documentation}
4603
4875
  */
4604
4876
  interface OnTriggerCreatedEntityEvent extends EventData {
4605
4877
  readonly entity: LuaEntity
@@ -4615,7 +4887,7 @@ declare module "factorio:runtime" {
4615
4887
  }
4616
4888
  /**
4617
4889
  * Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=true`.
4618
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_trigger_fired_artillery Online documentation}
4890
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_trigger_fired_artillery Online documentation}
4619
4891
  */
4620
4892
  interface OnTriggerFiredArtilleryEvent extends EventData {
4621
4893
  readonly entity: LuaEntity
@@ -4629,9 +4901,35 @@ declare module "factorio:runtime" {
4629
4901
  */
4630
4902
  readonly tick: uint
4631
4903
  }
4904
+ /**
4905
+ * Called when new packets are processed by {@link LuaHelpers#recv_udp LuaHelpers::recv_udp}.
4906
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_udp_packet_received Online documentation}
4907
+ */
4908
+ interface OnUdpPacketReceivedEvent extends EventData {
4909
+ /**
4910
+ * The packet data
4911
+ */
4912
+ readonly payload: string
4913
+ /**
4914
+ * The source port the packet was received from
4915
+ */
4916
+ readonly source_port: uint16
4917
+ /**
4918
+ * The player index whose instance received this packet, or 0 if received on the server
4919
+ */
4920
+ readonly player_index: PlayerIndex
4921
+ /**
4922
+ * Identifier of the event
4923
+ */
4924
+ readonly name: typeof defines.events.on_udp_packet_received
4925
+ /**
4926
+ * Tick the event was generated.
4927
+ */
4928
+ readonly tick: uint
4929
+ }
4632
4930
  /**
4633
4931
  * Called when the player triggers "undo".
4634
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_undo_applied Online documentation}
4932
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_undo_applied Online documentation}
4635
4933
  */
4636
4934
  interface OnUndoAppliedEvent extends EventData {
4637
4935
  /**
@@ -4653,7 +4951,7 @@ declare module "factorio:runtime" {
4653
4951
  }
4654
4952
  /**
4655
4953
  * Called when a unit is added to a unit group.
4656
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_unit_added_to_group Online documentation}
4954
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_unit_added_to_group Online documentation}
4657
4955
  */
4658
4956
  interface OnUnitAddedToGroupEvent extends EventData {
4659
4957
  readonly unit: LuaEntity
@@ -4669,7 +4967,7 @@ declare module "factorio:runtime" {
4669
4967
  }
4670
4968
  /**
4671
4969
  * Called when a new unit group is created, before any members are added to it.
4672
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_unit_group_created Online documentation}
4970
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_unit_group_created Online documentation}
4673
4971
  */
4674
4972
  interface OnUnitGroupCreatedEvent extends EventData {
4675
4973
  readonly group: LuaCommandable
@@ -4684,7 +4982,7 @@ declare module "factorio:runtime" {
4684
4982
  }
4685
4983
  /**
4686
4984
  * Called when a unit group finishes gathering and starts executing its command.
4687
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_unit_group_finished_gathering Online documentation}
4985
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_unit_group_finished_gathering Online documentation}
4688
4986
  */
4689
4987
  interface OnUnitGroupFinishedGatheringEvent extends EventData {
4690
4988
  readonly group: LuaCommandable
@@ -4699,7 +4997,7 @@ declare module "factorio:runtime" {
4699
4997
  }
4700
4998
  /**
4701
4999
  * Called when a unit is removed from a unit group.
4702
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_unit_removed_from_group Online documentation}
5000
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_unit_removed_from_group Online documentation}
4703
5001
  */
4704
5002
  interface OnUnitRemovedFromGroupEvent extends EventData {
4705
5003
  readonly unit: LuaEntity
@@ -4715,7 +5013,7 @@ declare module "factorio:runtime" {
4715
5013
  }
4716
5014
  /**
4717
5015
  * Called when a worker (construction or logistic) robot expires through a lack of energy.
4718
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#on_worker_robot_expired Online documentation}
5016
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#on_worker_robot_expired Online documentation}
4719
5017
  */
4720
5018
  interface OnWorkerRobotExpiredEvent extends EventData {
4721
5019
  readonly robot: LuaEntity
@@ -4732,7 +5030,7 @@ declare module "factorio:runtime" {
4732
5030
  * 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 LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_built LuaBootstrap::raise_script_built}, or when `raise_built` is passed to {@link LuaSurface#create_entity LuaSurface::create_entity}.
4733
5031
  *
4734
5032
  * Event filter: [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter]
4735
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#script_raised_built Online documentation}
5033
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#script_raised_built Online documentation}
4736
5034
  */
4737
5035
  interface ScriptRaisedBuiltEvent extends EventData {
4738
5036
  /**
@@ -4752,7 +5050,7 @@ declare module "factorio:runtime" {
4752
5050
  * 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 LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_destroy LuaBootstrap::raise_script_destroy}, or when `raise_destroy` is passed to {@link LuaEntity#destroy LuaEntity::destroy}.
4753
5051
  *
4754
5052
  * Event filter: [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter]
4755
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#script_raised_destroy Online documentation}
5053
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#script_raised_destroy Online documentation}
4756
5054
  */
4757
5055
  interface ScriptRaisedDestroyEvent extends EventData {
4758
5056
  /**
@@ -4768,11 +5066,31 @@ declare module "factorio:runtime" {
4768
5066
  */
4769
5067
  readonly tick: uint
4770
5068
  }
5069
+ /**
5070
+ * 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 LuaBootstrap::raise_event}, or {@link LuaBootstrap#raise_script_destroy_segmented_unit LuaBootstrap::raise_script_destroy_segmented_unit}, or when `raise_destroy` is passed to {@link LuaSegmentedUnit#destroy LuaSegmentedUnit::destroy}.
5071
+ *
5072
+ * Event filter: [LuaScriptRaisedDestroySegmentedUnitEventFilter](LuaScriptRaisedDestroySegmentedUnitEventFilter]
5073
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#script_raised_destroy_segmented_unit Online documentation}
5074
+ */
5075
+ interface ScriptRaisedDestroySegmentedUnitEvent extends EventData {
5076
+ /**
5077
+ * The segmented unit that was destroyed.
5078
+ */
5079
+ readonly segmented_unit: LuaSegmentedUnit
5080
+ /**
5081
+ * Identifier of the event
5082
+ */
5083
+ readonly name: typeof defines.events.script_raised_destroy_segmented_unit
5084
+ /**
5085
+ * Tick the event was generated.
5086
+ */
5087
+ readonly tick: uint
5088
+ }
4771
5089
  /**
4772
5090
  * 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 LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_revive LuaBootstrap::raise_script_revive}, or when `raise_revive` is passed to {@link LuaEntity#revive LuaEntity::revive}.
4773
5091
  *
4774
5092
  * Event filter: [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter]
4775
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#script_raised_revive Online documentation}
5093
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#script_raised_revive Online documentation}
4776
5094
  */
4777
5095
  interface ScriptRaisedReviveEvent extends EventData {
4778
5096
  /**
@@ -4794,7 +5112,7 @@ declare module "factorio:runtime" {
4794
5112
  }
4795
5113
  /**
4796
5114
  * 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 LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_set_tiles LuaBootstrap::raise_script_set_tiles}, or when `raise_event` is passed to {@link LuaSurface#set_tiles LuaSurface::set_tiles}.
4797
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#script_raised_set_tiles Online documentation}
5115
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#script_raised_set_tiles Online documentation}
4798
5116
  */
4799
5117
  interface ScriptRaisedSetTilesEvent extends EventData {
4800
5118
  /**
@@ -4818,7 +5136,7 @@ declare module "factorio:runtime" {
4818
5136
  * A static event mods can use to tell other mods they teleported something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_teleported LuaBootstrap::raise_script_teleported}, or when `raise_teleported` is passed to {@link LuaControl#teleport LuaControl::teleport}.
4819
5137
  *
4820
5138
  * Event filter: [LuaScriptRaisedTeleportedEventFilter](LuaScriptRaisedTeleportedEventFilter]
4821
- * @see {@link https://lua-api.factorio.com/2.0.58/events.html#script_raised_teleported Online documentation}
5139
+ * @see {@link https://lua-api.factorio.com/2.0.64/events.html#script_raised_teleported Online documentation}
4822
5140
  */
4823
5141
  interface ScriptRaisedTeleportedEvent extends EventData {
4824
5142
  /**