typed-factorio 3.25.0 → 3.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/prototype/generated/prototypes.d.ts +2574 -2214
- package/prototype/generated/types.d.ts +2248 -2161
- package/runtime/generated/classes.d.ts +5923 -4081
- package/runtime/generated/concepts.d.ts +5089 -2605
- package/runtime/generated/defines.d.ts +346 -201
- package/runtime/generated/events.d.ts +593 -237
- package/runtime/generated/global-functions.d.ts +3 -3
- package/runtime/generated/global-objects.d.ts +7 -7
@@ -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.
|
16
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#CustomInputEvent Online documentation}
|
17
17
|
*/
|
18
18
|
interface CustomInputEvent extends EventData {
|
19
19
|
/**
|
@@ -40,6 +40,10 @@ declare module "factorio:runtime" {
|
|
40
40
|
* Information about the prototype that is selected when the custom input is used. Needs to be enabled on the custom input's prototype. `nil` if none is selected.
|
41
41
|
*/
|
42
42
|
readonly selected_prototype?: SelectedPrototypeData
|
43
|
+
/**
|
44
|
+
* The GUI element under the cursor when the custom input was activated.
|
45
|
+
*/
|
46
|
+
readonly element?: LuaGuiElement
|
43
47
|
/**
|
44
48
|
* Identifier of the event
|
45
49
|
*/
|
@@ -51,7 +55,7 @@ declare module "factorio:runtime" {
|
|
51
55
|
}
|
52
56
|
/**
|
53
57
|
* Called when an achievement is gained.
|
54
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
58
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_achievement_gained Online documentation}
|
55
59
|
*/
|
56
60
|
interface OnAchievementGainedEvent extends EventData {
|
57
61
|
/**
|
@@ -70,7 +74,7 @@ declare module "factorio:runtime" {
|
|
70
74
|
}
|
71
75
|
/**
|
72
76
|
* Called when a unit/group completes a command.
|
73
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
77
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_ai_command_completed Online documentation}
|
74
78
|
*/
|
75
79
|
interface OnAiCommandCompletedEvent extends EventData {
|
76
80
|
/**
|
@@ -93,7 +97,7 @@ declare module "factorio:runtime" {
|
|
93
97
|
}
|
94
98
|
/**
|
95
99
|
* Called when an area of the map is cloned.
|
96
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
100
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_area_cloned Online documentation}
|
97
101
|
*/
|
98
102
|
interface OnAreaClonedEvent extends EventData {
|
99
103
|
readonly source_surface: LuaSurface
|
@@ -119,7 +123,7 @@ declare module "factorio:runtime" {
|
|
119
123
|
* Called when a biter migration builds a base.
|
120
124
|
*
|
121
125
|
* This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
122
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
126
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_biter_base_built Online documentation}
|
123
127
|
*/
|
124
128
|
interface OnBiterBaseBuiltEvent extends EventData {
|
125
129
|
/**
|
@@ -137,7 +141,7 @@ declare module "factorio:runtime" {
|
|
137
141
|
}
|
138
142
|
/**
|
139
143
|
* Called when a set of positions on the map is cloned.
|
140
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
144
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_brush_cloned Online documentation}
|
141
145
|
*/
|
142
146
|
interface OnBrushClonedEvent extends EventData {
|
143
147
|
readonly source_offset: TilePosition
|
@@ -162,7 +166,7 @@ declare module "factorio:runtime" {
|
|
162
166
|
}
|
163
167
|
/**
|
164
168
|
* Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
|
165
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
169
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_build_base_arrived Online documentation}
|
166
170
|
*/
|
167
171
|
interface OnBuildBaseArrivedEvent extends EventData {
|
168
172
|
/**
|
@@ -186,7 +190,7 @@ declare module "factorio:runtime" {
|
|
186
190
|
* Called when player builds something.
|
187
191
|
*
|
188
192
|
* Event filter: [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter]
|
189
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
193
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_built_entity Online documentation}
|
190
194
|
*/
|
191
195
|
interface OnBuiltEntityEvent extends EventData {
|
192
196
|
/**
|
@@ -218,7 +222,7 @@ declare module "factorio:runtime" {
|
|
218
222
|
* Called when the deconstruction of an entity is canceled.
|
219
223
|
*
|
220
224
|
* Event filter: [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter]
|
221
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
225
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cancelled_deconstruction Online documentation}
|
222
226
|
*/
|
223
227
|
interface OnCancelledDeconstructionEvent extends EventData {
|
224
228
|
readonly entity: LuaEntity
|
@@ -236,7 +240,7 @@ declare module "factorio:runtime" {
|
|
236
240
|
* Called when the upgrade of an entity is canceled.
|
237
241
|
*
|
238
242
|
* Event filter: [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter]
|
239
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
243
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cancelled_upgrade Online documentation}
|
240
244
|
*/
|
241
245
|
interface OnCancelledUpgradeEvent extends EventData {
|
242
246
|
readonly entity: LuaEntity
|
@@ -254,7 +258,7 @@ declare module "factorio:runtime" {
|
|
254
258
|
}
|
255
259
|
/**
|
256
260
|
* Called after a cargo pod has delivered its cargo.
|
257
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
261
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cargo_pod_delivered_cargo Online documentation}
|
258
262
|
*/
|
259
263
|
interface OnCargoPodDeliveredCargoEvent extends EventData {
|
260
264
|
readonly cargo_pod: LuaEntity
|
@@ -273,7 +277,7 @@ declare module "factorio:runtime" {
|
|
273
277
|
}
|
274
278
|
/**
|
275
279
|
* Called when a cargo pod departs a surface.
|
276
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
280
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cargo_pod_finished_ascending Online documentation}
|
277
281
|
*/
|
278
282
|
interface OnCargoPodFinishedAscendingEvent extends EventData {
|
279
283
|
readonly cargo_pod: LuaEntity
|
@@ -296,7 +300,7 @@ declare module "factorio:runtime" {
|
|
296
300
|
}
|
297
301
|
/**
|
298
302
|
* Called when a cargo pods lands on a surface, either at a station or on the ground.
|
299
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
303
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cargo_pod_finished_descending Online documentation}
|
300
304
|
*/
|
301
305
|
interface OnCargoPodFinishedDescendingEvent extends EventData {
|
302
306
|
readonly cargo_pod: LuaEntity
|
@@ -321,7 +325,7 @@ declare module "factorio:runtime" {
|
|
321
325
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
322
326
|
*
|
323
327
|
* this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
324
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
328
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_character_corpse_expired Online documentation}
|
325
329
|
*/
|
326
330
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
327
331
|
/**
|
@@ -339,7 +343,7 @@ declare module "factorio:runtime" {
|
|
339
343
|
}
|
340
344
|
/**
|
341
345
|
* Called when a chart tag is created.
|
342
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
346
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_chart_tag_added Online documentation}
|
343
347
|
*/
|
344
348
|
interface OnChartTagAddedEvent extends EventData {
|
345
349
|
readonly tag: LuaCustomChartTag
|
@@ -356,7 +360,7 @@ declare module "factorio:runtime" {
|
|
356
360
|
}
|
357
361
|
/**
|
358
362
|
* Called when a chart tag is modified by a player.
|
359
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
363
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_chart_tag_modified Online documentation}
|
360
364
|
*/
|
361
365
|
interface OnChartTagModifiedEvent extends EventData {
|
362
366
|
readonly tag: LuaCustomChartTag
|
@@ -378,7 +382,7 @@ declare module "factorio:runtime" {
|
|
378
382
|
}
|
379
383
|
/**
|
380
384
|
* Called just before a chart tag is deleted.
|
381
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
385
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_chart_tag_removed Online documentation}
|
382
386
|
*/
|
383
387
|
interface OnChartTagRemovedEvent extends EventData {
|
384
388
|
readonly tag: LuaCustomChartTag
|
@@ -395,7 +399,7 @@ declare module "factorio:runtime" {
|
|
395
399
|
}
|
396
400
|
/**
|
397
401
|
* Called when a chunk is charted or re-charted.
|
398
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
402
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_chunk_charted Online documentation}
|
399
403
|
*/
|
400
404
|
interface OnChunkChartedEvent extends EventData {
|
401
405
|
readonly surface_index: SurfaceIndex
|
@@ -416,7 +420,7 @@ declare module "factorio:runtime" {
|
|
416
420
|
}
|
417
421
|
/**
|
418
422
|
* Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
419
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
423
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_chunk_deleted Online documentation}
|
420
424
|
*/
|
421
425
|
interface OnChunkDeletedEvent extends EventData {
|
422
426
|
readonly surface_index: SurfaceIndex
|
@@ -435,7 +439,7 @@ declare module "factorio:runtime" {
|
|
435
439
|
}
|
436
440
|
/**
|
437
441
|
* Called when a chunk is generated.
|
438
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
442
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_chunk_generated Online documentation}
|
439
443
|
*/
|
440
444
|
interface OnChunkGeneratedEvent extends EventData {
|
441
445
|
/**
|
@@ -461,7 +465,7 @@ declare module "factorio:runtime" {
|
|
461
465
|
}
|
462
466
|
/**
|
463
467
|
* Called when a combat robot expires through a lack of energy, or timeout.
|
464
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
468
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_combat_robot_expired Online documentation}
|
465
469
|
*/
|
466
470
|
interface OnCombatRobotExpiredEvent extends EventData {
|
467
471
|
readonly robot: LuaEntity
|
@@ -482,7 +486,7 @@ declare module "factorio:runtime" {
|
|
482
486
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
483
487
|
*
|
484
488
|
* This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
485
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
489
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_console_chat Online documentation}
|
486
490
|
*/
|
487
491
|
interface OnConsoleChatEvent extends EventData {
|
488
492
|
/**
|
@@ -504,7 +508,7 @@ declare module "factorio:runtime" {
|
|
504
508
|
}
|
505
509
|
/**
|
506
510
|
* Called when someone enters a command-like message regardless of it being a valid command.
|
507
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
511
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_console_command Online documentation}
|
508
512
|
*/
|
509
513
|
interface OnConsoleCommandEvent extends EventData {
|
510
514
|
/**
|
@@ -530,7 +534,7 @@ declare module "factorio:runtime" {
|
|
530
534
|
}
|
531
535
|
/**
|
532
536
|
* Called when a cutscene is cancelled by the player or by script.
|
533
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
537
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cutscene_cancelled Online documentation}
|
534
538
|
*/
|
535
539
|
interface OnCutsceneCancelledEvent extends EventData {
|
536
540
|
/**
|
@@ -548,7 +552,7 @@ declare module "factorio:runtime" {
|
|
548
552
|
}
|
549
553
|
/**
|
550
554
|
* Called when a cutscene finishes naturally (was not cancelled).
|
551
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
555
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cutscene_finished Online documentation}
|
552
556
|
*/
|
553
557
|
interface OnCutsceneFinishedEvent extends EventData {
|
554
558
|
/**
|
@@ -566,7 +570,7 @@ declare module "factorio:runtime" {
|
|
566
570
|
}
|
567
571
|
/**
|
568
572
|
* Called when a cutscene starts.
|
569
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
573
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cutscene_started Online documentation}
|
570
574
|
*/
|
571
575
|
interface OnCutsceneStartedEvent extends EventData {
|
572
576
|
/**
|
@@ -586,7 +590,7 @@ declare module "factorio:runtime" {
|
|
586
590
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
587
591
|
*
|
588
592
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
589
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
593
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_cutscene_waypoint_reached Online documentation}
|
590
594
|
*/
|
591
595
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
592
596
|
/**
|
@@ -610,7 +614,7 @@ declare module "factorio:runtime" {
|
|
610
614
|
* Called when an entity is cloned. The filter applies to the source entity.
|
611
615
|
*
|
612
616
|
* Event filter: [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter]
|
613
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
617
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_entity_cloned Online documentation}
|
614
618
|
*/
|
615
619
|
interface OnEntityClonedEvent extends EventData {
|
616
620
|
readonly source: LuaEntity
|
@@ -628,7 +632,7 @@ declare module "factorio:runtime" {
|
|
628
632
|
* Called after an entity has been recolored either by the player or through script.
|
629
633
|
*
|
630
634
|
* Automatic recoloring due to {@link LuaPlayer#color LuaPlayer::color} will not raise events, as that is a separate mechanism.
|
631
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
635
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_entity_color_changed Online documentation}
|
632
636
|
*/
|
633
637
|
interface OnEntityColorChangedEvent extends EventData {
|
634
638
|
/**
|
@@ -648,7 +652,7 @@ declare module "factorio:runtime" {
|
|
648
652
|
* Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
|
649
653
|
*
|
650
654
|
* Event filter: [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter]
|
651
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
655
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_entity_damaged Online documentation}
|
652
656
|
*/
|
653
657
|
interface OnEntityDamagedEvent extends EventData {
|
654
658
|
readonly entity: LuaEntity
|
@@ -690,7 +694,7 @@ declare module "factorio:runtime" {
|
|
690
694
|
* Called when an entity dies.
|
691
695
|
*
|
692
696
|
* Event filter: [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter]
|
693
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
697
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_entity_died Online documentation}
|
694
698
|
*/
|
695
699
|
interface OnEntityDiedEvent extends EventData {
|
696
700
|
/**
|
@@ -724,7 +728,7 @@ declare module "factorio:runtime" {
|
|
724
728
|
}
|
725
729
|
/**
|
726
730
|
* Called when one of an entity's logistic slots changes.
|
727
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
731
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_entity_logistic_slot_changed Online documentation}
|
728
732
|
*/
|
729
733
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
730
734
|
/**
|
@@ -754,7 +758,7 @@ declare module "factorio:runtime" {
|
|
754
758
|
}
|
755
759
|
/**
|
756
760
|
* Called after an entity has been renamed either by the player or through script.
|
757
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
761
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_entity_renamed Online documentation}
|
758
762
|
*/
|
759
763
|
interface OnEntityRenamedEvent extends EventData {
|
760
764
|
/**
|
@@ -775,7 +779,7 @@ declare module "factorio:runtime" {
|
|
775
779
|
}
|
776
780
|
/**
|
777
781
|
* Called after entity copy-paste is done.
|
778
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
782
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_entity_settings_pasted Online documentation}
|
779
783
|
*/
|
780
784
|
interface OnEntitySettingsPastedEvent extends EventData {
|
781
785
|
readonly player_index: PlayerIndex
|
@@ -798,7 +802,7 @@ declare module "factorio:runtime" {
|
|
798
802
|
}
|
799
803
|
/**
|
800
804
|
* Called when an entity is spawned by a EnemySpawner
|
801
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
805
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_entity_spawned Online documentation}
|
802
806
|
*/
|
803
807
|
interface OnEntitySpawnedEvent extends EventData {
|
804
808
|
readonly spawner: LuaEntity
|
@@ -814,7 +818,7 @@ declare module "factorio:runtime" {
|
|
814
818
|
}
|
815
819
|
/**
|
816
820
|
* Called after equipment is inserted into an equipment grid.
|
817
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
821
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_equipment_inserted Online documentation}
|
818
822
|
*/
|
819
823
|
interface OnEquipmentInsertedEvent extends EventData {
|
820
824
|
/**
|
@@ -836,7 +840,7 @@ declare module "factorio:runtime" {
|
|
836
840
|
}
|
837
841
|
/**
|
838
842
|
* Called after equipment is removed from an equipment grid.
|
839
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
843
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_equipment_removed Online documentation}
|
840
844
|
*/
|
841
845
|
interface OnEquipmentRemovedEvent extends EventData {
|
842
846
|
/**
|
@@ -866,7 +870,7 @@ declare module "factorio:runtime" {
|
|
866
870
|
}
|
867
871
|
/**
|
868
872
|
* Called when the a forces cease fire values change.
|
869
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
873
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_force_cease_fire_changed Online documentation}
|
870
874
|
*/
|
871
875
|
interface OnForceCeaseFireChangedEvent extends EventData {
|
872
876
|
/**
|
@@ -894,7 +898,7 @@ declare module "factorio:runtime" {
|
|
894
898
|
* Called when a new force is created using `game.create_force()`
|
895
899
|
*
|
896
900
|
* This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
897
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
901
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_force_created Online documentation}
|
898
902
|
*/
|
899
903
|
interface OnForceCreatedEvent extends EventData {
|
900
904
|
/**
|
@@ -912,7 +916,7 @@ declare module "factorio:runtime" {
|
|
912
916
|
}
|
913
917
|
/**
|
914
918
|
* Called when the a forces friends change.
|
915
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
919
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_force_friends_changed Online documentation}
|
916
920
|
*/
|
917
921
|
interface OnForceFriendsChangedEvent extends EventData {
|
918
922
|
/**
|
@@ -938,7 +942,7 @@ declare module "factorio:runtime" {
|
|
938
942
|
}
|
939
943
|
/**
|
940
944
|
* Called when {@link LuaForce#reset LuaForce::reset} is finished.
|
941
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
945
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_force_reset Online documentation}
|
942
946
|
*/
|
943
947
|
interface OnForceResetEvent extends EventData {
|
944
948
|
readonly force: LuaForce
|
@@ -955,7 +959,7 @@ declare module "factorio:runtime" {
|
|
955
959
|
* Called after two forces have been merged using `game.merge_forces()`.
|
956
960
|
*
|
957
961
|
* The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
958
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
962
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_forces_merged Online documentation}
|
959
963
|
*/
|
960
964
|
interface OnForcesMergedEvent extends EventData {
|
961
965
|
/**
|
@@ -981,7 +985,7 @@ declare module "factorio:runtime" {
|
|
981
985
|
}
|
982
986
|
/**
|
983
987
|
* Called when two forces are about to be merged using `game.merge_forces()`.
|
984
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
988
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_forces_merging Online documentation}
|
985
989
|
*/
|
986
990
|
interface OnForcesMergingEvent extends EventData {
|
987
991
|
/**
|
@@ -1005,7 +1009,7 @@ declare module "factorio:runtime" {
|
|
1005
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.
|
1006
1010
|
*
|
1007
1011
|
* This event is not fired when the scenario is loaded via the map editor.
|
1008
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1012
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_game_created_from_scenario Online documentation}
|
1009
1013
|
*/
|
1010
1014
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
1011
1015
|
/**
|
@@ -1019,7 +1023,7 @@ declare module "factorio:runtime" {
|
|
1019
1023
|
}
|
1020
1024
|
/**
|
1021
1025
|
* Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
|
1022
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1026
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_checked_state_changed Online documentation}
|
1023
1027
|
*/
|
1024
1028
|
interface OnGuiCheckedStateChangedEvent extends EventData {
|
1025
1029
|
/**
|
@@ -1041,7 +1045,7 @@ declare module "factorio:runtime" {
|
|
1041
1045
|
}
|
1042
1046
|
/**
|
1043
1047
|
* Called when {@link LuaGuiElement} is clicked.
|
1044
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1048
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_click Online documentation}
|
1045
1049
|
*/
|
1046
1050
|
interface OnGuiClickEvent extends EventData {
|
1047
1051
|
/**
|
@@ -1087,47 +1091,47 @@ declare module "factorio:runtime" {
|
|
1087
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.
|
1088
1092
|
*
|
1089
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.
|
1090
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1094
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_closed Online documentation}
|
1091
1095
|
*/
|
1092
1096
|
interface OnGuiClosedEvent extends EventData {
|
1093
1097
|
/**
|
1094
|
-
* The player.
|
1098
|
+
* The player closing the GUI.
|
1095
1099
|
*/
|
1096
1100
|
readonly player_index: PlayerIndex
|
1097
1101
|
/**
|
1098
|
-
* The GUI
|
1102
|
+
* The type of GUI that was closed.
|
1099
1103
|
*/
|
1100
1104
|
readonly gui_type: defines.gui_type
|
1101
1105
|
/**
|
1102
|
-
* The
|
1106
|
+
* The position of the tile whose GUI was closed.
|
1103
1107
|
*/
|
1104
|
-
readonly
|
1108
|
+
readonly tile_position?: TilePosition
|
1105
1109
|
/**
|
1106
|
-
* The
|
1110
|
+
* The equipment whose GUI was closed.
|
1107
1111
|
*/
|
1108
|
-
readonly
|
1112
|
+
readonly equipment?: LuaEquipment
|
1109
1113
|
/**
|
1110
|
-
* The
|
1114
|
+
* The entity or entity grid whose GUI was closed.
|
1111
1115
|
*/
|
1112
|
-
readonly
|
1116
|
+
readonly entity?: LuaEntity
|
1113
1117
|
/**
|
1114
|
-
* The
|
1118
|
+
* The item whose GUI was closed.
|
1115
1119
|
*/
|
1116
|
-
readonly
|
1120
|
+
readonly item?: LuaItemStack
|
1117
1121
|
/**
|
1118
|
-
* The
|
1122
|
+
* The other player whose GUI was closed.
|
1119
1123
|
*/
|
1120
|
-
readonly
|
1124
|
+
readonly other_player?: LuaPlayer
|
1121
1125
|
/**
|
1122
|
-
* The
|
1126
|
+
* The custom GUI element that was closed.
|
1123
1127
|
*/
|
1124
|
-
readonly
|
1128
|
+
readonly element?: LuaGuiElement
|
1125
1129
|
/**
|
1126
|
-
* The
|
1130
|
+
* The surface index of the global electric network whose GUI was closed.
|
1127
1131
|
*/
|
1128
|
-
readonly
|
1132
|
+
readonly surface_index?: SurfaceIndex
|
1129
1133
|
/**
|
1130
|
-
* The script inventory
|
1134
|
+
* The script inventory whose GUI was closed.
|
1131
1135
|
*/
|
1132
1136
|
readonly inventory?: LuaInventory
|
1133
1137
|
/**
|
@@ -1141,7 +1145,7 @@ declare module "factorio:runtime" {
|
|
1141
1145
|
}
|
1142
1146
|
/**
|
1143
1147
|
* Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
|
1144
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1148
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_confirmed Online documentation}
|
1145
1149
|
*/
|
1146
1150
|
interface OnGuiConfirmedEvent extends EventData {
|
1147
1151
|
/**
|
@@ -1175,7 +1179,7 @@ declare module "factorio:runtime" {
|
|
1175
1179
|
}
|
1176
1180
|
/**
|
1177
1181
|
* Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
|
1178
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1182
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_elem_changed Online documentation}
|
1179
1183
|
*/
|
1180
1184
|
interface OnGuiElemChangedEvent extends EventData {
|
1181
1185
|
/**
|
@@ -1199,7 +1203,7 @@ declare module "factorio:runtime" {
|
|
1199
1203
|
* Called when {@link LuaGuiElement} is hovered by the mouse.
|
1200
1204
|
*
|
1201
1205
|
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
1202
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1206
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_hover Online documentation}
|
1203
1207
|
*/
|
1204
1208
|
interface OnGuiHoverEvent extends EventData {
|
1205
1209
|
/**
|
@@ -1223,7 +1227,7 @@ declare module "factorio:runtime" {
|
|
1223
1227
|
* Called when the player's cursor leaves a {@link LuaGuiElement} that was previously hovered.
|
1224
1228
|
*
|
1225
1229
|
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
1226
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1230
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_leave Online documentation}
|
1227
1231
|
*/
|
1228
1232
|
interface OnGuiLeaveEvent extends EventData {
|
1229
1233
|
/**
|
@@ -1245,7 +1249,7 @@ declare module "factorio:runtime" {
|
|
1245
1249
|
}
|
1246
1250
|
/**
|
1247
1251
|
* Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
|
1248
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1252
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_location_changed Online documentation}
|
1249
1253
|
*/
|
1250
1254
|
interface OnGuiLocationChangedEvent extends EventData {
|
1251
1255
|
/**
|
@@ -1267,39 +1271,47 @@ declare module "factorio:runtime" {
|
|
1267
1271
|
}
|
1268
1272
|
/**
|
1269
1273
|
* Called when the player opens a GUI.
|
1270
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1274
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_opened Online documentation}
|
1271
1275
|
*/
|
1272
1276
|
interface OnGuiOpenedEvent extends EventData {
|
1273
1277
|
/**
|
1274
|
-
* The player.
|
1278
|
+
* The player closing the GUI.
|
1275
1279
|
*/
|
1276
1280
|
readonly player_index: PlayerIndex
|
1277
1281
|
/**
|
1278
|
-
* The GUI
|
1282
|
+
* The type of GUI that was opened.
|
1279
1283
|
*/
|
1280
1284
|
readonly gui_type: defines.gui_type
|
1281
1285
|
/**
|
1282
|
-
* The
|
1286
|
+
* The position of the tile whose GUI was opened.
|
1283
1287
|
*/
|
1284
|
-
readonly
|
1288
|
+
readonly tile_position?: TilePosition
|
1285
1289
|
/**
|
1286
|
-
* The
|
1290
|
+
* The equipment whose GUI was opened.
|
1287
1291
|
*/
|
1288
|
-
readonly
|
1292
|
+
readonly equipment?: LuaEquipment
|
1289
1293
|
/**
|
1290
|
-
* The
|
1294
|
+
* The entity or entity grid whose GUI was opened.
|
1291
1295
|
*/
|
1292
|
-
readonly
|
1296
|
+
readonly entity?: LuaEntity
|
1297
|
+
/**
|
1298
|
+
* The item whose GUI was opened.
|
1299
|
+
*/
|
1300
|
+
readonly item?: LuaItemStack
|
1293
1301
|
/**
|
1294
|
-
* The other player
|
1302
|
+
* The other player whose GUI was opened.
|
1295
1303
|
*/
|
1296
1304
|
readonly other_player?: LuaPlayer
|
1297
1305
|
/**
|
1298
|
-
* The custom GUI element that was opened
|
1306
|
+
* The custom GUI element that was opened.
|
1299
1307
|
*/
|
1300
1308
|
readonly element?: LuaGuiElement
|
1301
1309
|
/**
|
1302
|
-
* The
|
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.
|
1303
1315
|
*/
|
1304
1316
|
readonly inventory?: LuaInventory
|
1305
1317
|
/**
|
@@ -1313,7 +1325,7 @@ declare module "factorio:runtime" {
|
|
1313
1325
|
}
|
1314
1326
|
/**
|
1315
1327
|
* Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
|
1316
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1328
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_selected_tab_changed Online documentation}
|
1317
1329
|
*/
|
1318
1330
|
interface OnGuiSelectedTabChangedEvent extends EventData {
|
1319
1331
|
/**
|
@@ -1335,7 +1347,7 @@ declare module "factorio:runtime" {
|
|
1335
1347
|
}
|
1336
1348
|
/**
|
1337
1349
|
* Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
|
1338
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1350
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_selection_state_changed Online documentation}
|
1339
1351
|
*/
|
1340
1352
|
interface OnGuiSelectionStateChangedEvent extends EventData {
|
1341
1353
|
/**
|
@@ -1357,7 +1369,7 @@ declare module "factorio:runtime" {
|
|
1357
1369
|
}
|
1358
1370
|
/**
|
1359
1371
|
* Called when {@link LuaGuiElement} switch state is changed (related to switches).
|
1360
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1372
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_switch_state_changed Online documentation}
|
1361
1373
|
*/
|
1362
1374
|
interface OnGuiSwitchStateChangedEvent extends EventData {
|
1363
1375
|
/**
|
@@ -1379,7 +1391,7 @@ declare module "factorio:runtime" {
|
|
1379
1391
|
}
|
1380
1392
|
/**
|
1381
1393
|
* Called when {@link LuaGuiElement} text is changed by the player.
|
1382
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1394
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_text_changed Online documentation}
|
1383
1395
|
*/
|
1384
1396
|
interface OnGuiTextChangedEvent extends EventData {
|
1385
1397
|
/**
|
@@ -1405,7 +1417,7 @@ declare module "factorio:runtime" {
|
|
1405
1417
|
}
|
1406
1418
|
/**
|
1407
1419
|
* Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
|
1408
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1420
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_gui_value_changed Online documentation}
|
1409
1421
|
*/
|
1410
1422
|
interface OnGuiValueChangedEvent extends EventData {
|
1411
1423
|
/**
|
@@ -1427,7 +1439,7 @@ declare module "factorio:runtime" {
|
|
1427
1439
|
}
|
1428
1440
|
/**
|
1429
1441
|
* Called when a land mine is armed.
|
1430
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1442
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_land_mine_armed Online documentation}
|
1431
1443
|
*/
|
1432
1444
|
interface OnLandMineArmedEvent extends EventData {
|
1433
1445
|
readonly mine: LuaEntity
|
@@ -1442,7 +1454,7 @@ declare module "factorio:runtime" {
|
|
1442
1454
|
}
|
1443
1455
|
/**
|
1444
1456
|
* Called when a custom {@link import("factorio:prototype").ShortcutPrototype Lua shortcut} is pressed.
|
1445
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1457
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_lua_shortcut Online documentation}
|
1446
1458
|
*/
|
1447
1459
|
interface OnLuaShortcutEvent extends EventData {
|
1448
1460
|
readonly player_index: PlayerIndex
|
@@ -1463,7 +1475,7 @@ declare module "factorio:runtime" {
|
|
1463
1475
|
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
|
1464
1476
|
*
|
1465
1477
|
* Event filter: [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter]
|
1466
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1478
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_marked_for_deconstruction Online documentation}
|
1467
1479
|
*/
|
1468
1480
|
interface OnMarkedForDeconstructionEvent extends EventData {
|
1469
1481
|
readonly entity: LuaEntity
|
@@ -1481,7 +1493,7 @@ declare module "factorio:runtime" {
|
|
1481
1493
|
* Called when an entity is marked for upgrade with the Upgrade planner or via script.
|
1482
1494
|
*
|
1483
1495
|
* Event filter: [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter]
|
1484
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1496
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_marked_for_upgrade Online documentation}
|
1485
1497
|
*/
|
1486
1498
|
interface OnMarkedForUpgradeEvent extends EventData {
|
1487
1499
|
readonly player_index?: PlayerIndex
|
@@ -1499,7 +1511,7 @@ declare module "factorio:runtime" {
|
|
1499
1511
|
}
|
1500
1512
|
/**
|
1501
1513
|
* Called after a player purchases some offer from a `market` entity.
|
1502
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1514
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_market_item_purchased Online documentation}
|
1503
1515
|
*/
|
1504
1516
|
interface OnMarketItemPurchasedEvent extends EventData {
|
1505
1517
|
/**
|
@@ -1529,7 +1541,7 @@ declare module "factorio:runtime" {
|
|
1529
1541
|
}
|
1530
1542
|
/**
|
1531
1543
|
* Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
|
1532
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1544
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_mod_item_opened Online documentation}
|
1533
1545
|
*/
|
1534
1546
|
interface OnModItemOpenedEvent extends EventData {
|
1535
1547
|
/**
|
@@ -1555,7 +1567,7 @@ declare module "factorio:runtime" {
|
|
1555
1567
|
}
|
1556
1568
|
/**
|
1557
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.
|
1558
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1570
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_multiplayer_init Online documentation}
|
1559
1571
|
*/
|
1560
1572
|
interface OnMultiplayerInitEvent extends EventData {
|
1561
1573
|
/**
|
@@ -1571,7 +1583,7 @@ declare module "factorio:runtime" {
|
|
1571
1583
|
* Called after an object is destroyed which was registered with {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed} previously.
|
1572
1584
|
*
|
1573
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.
|
1574
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1586
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_object_destroyed Online documentation}
|
1575
1587
|
*/
|
1576
1588
|
interface OnObjectDestroyedEvent extends EventData {
|
1577
1589
|
/**
|
@@ -1597,7 +1609,7 @@ declare module "factorio:runtime" {
|
|
1597
1609
|
}
|
1598
1610
|
/**
|
1599
1611
|
* Called directly after a permission group is added.
|
1600
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1612
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_permission_group_added Online documentation}
|
1601
1613
|
*/
|
1602
1614
|
interface OnPermissionGroupAddedEvent extends EventData {
|
1603
1615
|
/**
|
@@ -1619,7 +1631,7 @@ declare module "factorio:runtime" {
|
|
1619
1631
|
}
|
1620
1632
|
/**
|
1621
1633
|
* Called directly after a permission group is deleted.
|
1622
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1634
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_permission_group_deleted Online documentation}
|
1623
1635
|
*/
|
1624
1636
|
interface OnPermissionGroupDeletedEvent extends EventData {
|
1625
1637
|
/**
|
@@ -1645,7 +1657,7 @@ declare module "factorio:runtime" {
|
|
1645
1657
|
}
|
1646
1658
|
/**
|
1647
1659
|
* Called directly after a permission group is edited in some way.
|
1648
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1660
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_permission_group_edited Online documentation}
|
1649
1661
|
*/
|
1650
1662
|
interface OnPermissionGroupEditedEvent extends EventData {
|
1651
1663
|
/**
|
@@ -1694,7 +1706,7 @@ declare module "factorio:runtime" {
|
|
1694
1706
|
}
|
1695
1707
|
/**
|
1696
1708
|
* Called directly after a permission string is imported.
|
1697
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1709
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_permission_string_imported Online documentation}
|
1698
1710
|
*/
|
1699
1711
|
interface OnPermissionStringImportedEvent extends EventData {
|
1700
1712
|
/**
|
@@ -1712,10 +1724,10 @@ declare module "factorio:runtime" {
|
|
1712
1724
|
}
|
1713
1725
|
/**
|
1714
1726
|
* Called when a player picks up an item.
|
1715
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1727
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_picked_up_item Online documentation}
|
1716
1728
|
*/
|
1717
1729
|
interface OnPickedUpItemEvent extends EventData {
|
1718
|
-
readonly item_stack:
|
1730
|
+
readonly item_stack: ItemWithQualityCount
|
1719
1731
|
readonly player_index: PlayerIndex
|
1720
1732
|
/**
|
1721
1733
|
* Identifier of the event
|
@@ -1728,7 +1740,7 @@ declare module "factorio:runtime" {
|
|
1728
1740
|
}
|
1729
1741
|
/**
|
1730
1742
|
* Called after a player alt-reverse-selects an area with a selection-tool item.
|
1731
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1743
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_alt_reverse_selected_area Online documentation}
|
1732
1744
|
*/
|
1733
1745
|
interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
|
1734
1746
|
/**
|
@@ -1766,7 +1778,7 @@ declare module "factorio:runtime" {
|
|
1766
1778
|
}
|
1767
1779
|
/**
|
1768
1780
|
* Called after a player alt-selects an area with a selection-tool item.
|
1769
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1781
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_alt_selected_area Online documentation}
|
1770
1782
|
*/
|
1771
1783
|
interface OnPlayerAltSelectedAreaEvent extends EventData {
|
1772
1784
|
/**
|
@@ -1808,7 +1820,7 @@ declare module "factorio:runtime" {
|
|
1808
1820
|
}
|
1809
1821
|
/**
|
1810
1822
|
* Called after a players ammo inventory changed in some way.
|
1811
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1823
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_ammo_inventory_changed Online documentation}
|
1812
1824
|
*/
|
1813
1825
|
interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
1814
1826
|
readonly player_index: PlayerIndex
|
@@ -1823,7 +1835,7 @@ declare module "factorio:runtime" {
|
|
1823
1835
|
}
|
1824
1836
|
/**
|
1825
1837
|
* Called after a players armor inventory changed in some way.
|
1826
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1838
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_armor_inventory_changed Online documentation}
|
1827
1839
|
*/
|
1828
1840
|
interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
1829
1841
|
readonly player_index: PlayerIndex
|
@@ -1838,7 +1850,7 @@ declare module "factorio:runtime" {
|
|
1838
1850
|
}
|
1839
1851
|
/**
|
1840
1852
|
* Called when a player is banned.
|
1841
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1853
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_banned Online documentation}
|
1842
1854
|
*/
|
1843
1855
|
interface OnPlayerBannedEvent extends EventData {
|
1844
1856
|
/**
|
@@ -1868,7 +1880,7 @@ declare module "factorio:runtime" {
|
|
1868
1880
|
}
|
1869
1881
|
/**
|
1870
1882
|
* Called after a player builds tiles.
|
1871
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1883
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_built_tile Online documentation}
|
1872
1884
|
*/
|
1873
1885
|
interface OnPlayerBuiltTileEvent extends EventData {
|
1874
1886
|
readonly player_index: PlayerIndex
|
@@ -1907,7 +1919,7 @@ declare module "factorio:runtime" {
|
|
1907
1919
|
}
|
1908
1920
|
/**
|
1909
1921
|
* Called when a player cancels crafting.
|
1910
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1922
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_cancelled_crafting Online documentation}
|
1911
1923
|
*/
|
1912
1924
|
interface OnPlayerCancelledCraftingEvent extends EventData {
|
1913
1925
|
/**
|
@@ -1937,7 +1949,7 @@ declare module "factorio:runtime" {
|
|
1937
1949
|
}
|
1938
1950
|
/**
|
1939
1951
|
* Called after a player changes forces.
|
1940
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1952
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_changed_force Online documentation}
|
1941
1953
|
*/
|
1942
1954
|
interface OnPlayerChangedForceEvent extends EventData {
|
1943
1955
|
/**
|
@@ -1959,7 +1971,7 @@ declare module "factorio:runtime" {
|
|
1959
1971
|
}
|
1960
1972
|
/**
|
1961
1973
|
* Called when the tile position a player is located at changes.
|
1962
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1974
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_changed_position Online documentation}
|
1963
1975
|
*/
|
1964
1976
|
interface OnPlayerChangedPositionEvent extends EventData {
|
1965
1977
|
/**
|
@@ -1977,7 +1989,7 @@ declare module "factorio:runtime" {
|
|
1977
1989
|
}
|
1978
1990
|
/**
|
1979
1991
|
* Called after a player changes surfaces.
|
1980
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
1992
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_changed_surface Online documentation}
|
1981
1993
|
*/
|
1982
1994
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
1983
1995
|
/**
|
@@ -1999,7 +2011,7 @@ declare module "factorio:runtime" {
|
|
1999
2011
|
}
|
2000
2012
|
/**
|
2001
2013
|
* Called when cheat mode is disabled on a player.
|
2002
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2014
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_cheat_mode_disabled Online documentation}
|
2003
2015
|
*/
|
2004
2016
|
interface OnPlayerCheatModeDisabledEvent extends EventData {
|
2005
2017
|
/**
|
@@ -2017,7 +2029,7 @@ declare module "factorio:runtime" {
|
|
2017
2029
|
}
|
2018
2030
|
/**
|
2019
2031
|
* Called when cheat mode is enabled on a player.
|
2020
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2032
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_cheat_mode_enabled Online documentation}
|
2021
2033
|
*/
|
2022
2034
|
interface OnPlayerCheatModeEnabledEvent extends EventData {
|
2023
2035
|
/**
|
@@ -2035,7 +2047,7 @@ declare module "factorio:runtime" {
|
|
2035
2047
|
}
|
2036
2048
|
/**
|
2037
2049
|
* Called when a player clicks a gps tag
|
2038
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2050
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_clicked_gps_tag Online documentation}
|
2039
2051
|
*/
|
2040
2052
|
interface OnPlayerClickedGpsTagEvent extends EventData {
|
2041
2053
|
/**
|
@@ -2061,7 +2073,7 @@ declare module "factorio:runtime" {
|
|
2061
2073
|
}
|
2062
2074
|
/**
|
2063
2075
|
* Called when a player clicks the "confirm" button in the configure Blueprint GUI.
|
2064
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2076
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_configured_blueprint Online documentation}
|
2065
2077
|
*/
|
2066
2078
|
interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
2067
2079
|
/**
|
@@ -2079,7 +2091,7 @@ declare module "factorio:runtime" {
|
|
2079
2091
|
}
|
2080
2092
|
/**
|
2081
2093
|
* Called after a player changes controller types.
|
2082
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2094
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_controller_changed Online documentation}
|
2083
2095
|
*/
|
2084
2096
|
interface OnPlayerControllerChangedEvent extends EventData {
|
2085
2097
|
/**
|
@@ -2101,7 +2113,7 @@ declare module "factorio:runtime" {
|
|
2101
2113
|
}
|
2102
2114
|
/**
|
2103
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}).
|
2104
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2116
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_crafted_item Online documentation}
|
2105
2117
|
*/
|
2106
2118
|
interface OnPlayerCraftedItemEvent extends EventData {
|
2107
2119
|
/**
|
@@ -2127,7 +2139,7 @@ declare module "factorio:runtime" {
|
|
2127
2139
|
}
|
2128
2140
|
/**
|
2129
2141
|
* Called after the player was created.
|
2130
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2142
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_created Online documentation}
|
2131
2143
|
*/
|
2132
2144
|
interface OnPlayerCreatedEvent extends EventData {
|
2133
2145
|
readonly player_index: PlayerIndex
|
@@ -2144,7 +2156,7 @@ declare module "factorio:runtime" {
|
|
2144
2156
|
* Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
|
2145
2157
|
*
|
2146
2158
|
* This is fired in the same tick that the change happens, but not instantly.
|
2147
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2159
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_cursor_stack_changed Online documentation}
|
2148
2160
|
*/
|
2149
2161
|
interface OnPlayerCursorStackChangedEvent extends EventData {
|
2150
2162
|
readonly player_index: PlayerIndex
|
@@ -2159,7 +2171,7 @@ declare module "factorio:runtime" {
|
|
2159
2171
|
}
|
2160
2172
|
/**
|
2161
2173
|
* Called when a player selects an area with a deconstruction planner.
|
2162
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2174
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_deconstructed_area Online documentation}
|
2163
2175
|
*/
|
2164
2176
|
interface OnPlayerDeconstructedAreaEvent extends EventData {
|
2165
2177
|
/**
|
@@ -2205,7 +2217,7 @@ declare module "factorio:runtime" {
|
|
2205
2217
|
}
|
2206
2218
|
/**
|
2207
2219
|
* Called when a player is demoted.
|
2208
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2220
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_demoted Online documentation}
|
2209
2221
|
*/
|
2210
2222
|
interface OnPlayerDemotedEvent extends EventData {
|
2211
2223
|
/**
|
@@ -2223,7 +2235,7 @@ declare module "factorio:runtime" {
|
|
2223
2235
|
}
|
2224
2236
|
/**
|
2225
2237
|
* Called after a player dies.
|
2226
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2238
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_died Online documentation}
|
2227
2239
|
*/
|
2228
2240
|
interface OnPlayerDiedEvent extends EventData {
|
2229
2241
|
readonly player_index: PlayerIndex
|
@@ -2239,7 +2251,7 @@ declare module "factorio:runtime" {
|
|
2239
2251
|
}
|
2240
2252
|
/**
|
2241
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.
|
2242
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2254
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_display_density_scale_changed Online documentation}
|
2243
2255
|
*/
|
2244
2256
|
interface OnPlayerDisplayDensityScaleChangedEvent extends EventData {
|
2245
2257
|
/**
|
@@ -2261,7 +2273,7 @@ declare module "factorio:runtime" {
|
|
2261
2273
|
}
|
2262
2274
|
/**
|
2263
2275
|
* Called when the display resolution changes for a given player.
|
2264
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2276
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_display_resolution_changed Online documentation}
|
2265
2277
|
*/
|
2266
2278
|
interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
2267
2279
|
/**
|
@@ -2283,7 +2295,7 @@ declare module "factorio:runtime" {
|
|
2283
2295
|
}
|
2284
2296
|
/**
|
2285
2297
|
* Called when the display scale changes for a given player.
|
2286
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2298
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_display_scale_changed Online documentation}
|
2287
2299
|
*/
|
2288
2300
|
interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
2289
2301
|
/**
|
@@ -2307,7 +2319,7 @@ declare module "factorio:runtime" {
|
|
2307
2319
|
* Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
|
2308
2320
|
*
|
2309
2321
|
* This event is not raised when the player is ejected from a vehicle due to it being destroyed.
|
2310
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2322
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_driving_changed_state Online documentation}
|
2311
2323
|
*/
|
2312
2324
|
interface OnPlayerDrivingChangedStateEvent extends EventData {
|
2313
2325
|
readonly player_index: PlayerIndex
|
@@ -2326,7 +2338,7 @@ declare module "factorio:runtime" {
|
|
2326
2338
|
}
|
2327
2339
|
/**
|
2328
2340
|
* Called when a player drops an item on the ground.
|
2329
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2341
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_dropped_item Online documentation}
|
2330
2342
|
*/
|
2331
2343
|
interface OnPlayerDroppedItemEvent extends EventData {
|
2332
2344
|
readonly player_index: PlayerIndex
|
@@ -2345,7 +2357,7 @@ declare module "factorio:runtime" {
|
|
2345
2357
|
}
|
2346
2358
|
/**
|
2347
2359
|
* Called when a player fast-transfers something to or from an entity.
|
2348
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2360
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_fast_transferred Online documentation}
|
2349
2361
|
*/
|
2350
2362
|
interface OnPlayerFastTransferredEvent extends EventData {
|
2351
2363
|
/**
|
@@ -2377,7 +2389,7 @@ declare module "factorio:runtime" {
|
|
2377
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.
|
2378
2390
|
*
|
2379
2391
|
* This event reflects a change in the {@link LuaEntity#mirroring LuaEntity::mirroring} property.
|
2380
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2392
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_flipped_entity Online documentation}
|
2381
2393
|
*/
|
2382
2394
|
interface OnPlayerFlippedEntityEvent extends EventData {
|
2383
2395
|
/**
|
@@ -2400,7 +2412,7 @@ declare module "factorio:runtime" {
|
|
2400
2412
|
}
|
2401
2413
|
/**
|
2402
2414
|
* Called after player flushed fluid
|
2403
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2415
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_flushed_fluid Online documentation}
|
2404
2416
|
*/
|
2405
2417
|
interface OnPlayerFlushedFluidEvent extends EventData {
|
2406
2418
|
/**
|
@@ -2434,7 +2446,7 @@ declare module "factorio:runtime" {
|
|
2434
2446
|
}
|
2435
2447
|
/**
|
2436
2448
|
* Called after a players gun inventory changed in some way.
|
2437
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2449
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_gun_inventory_changed Online documentation}
|
2438
2450
|
*/
|
2439
2451
|
interface OnPlayerGunInventoryChangedEvent extends EventData {
|
2440
2452
|
readonly player_index: PlayerIndex
|
@@ -2449,7 +2461,7 @@ declare module "factorio:runtime" {
|
|
2449
2461
|
}
|
2450
2462
|
/**
|
2451
2463
|
* Called when a player's input method changes. See {@link LuaPlayer#input_method LuaPlayer::input_method}.
|
2452
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2464
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_input_method_changed Online documentation}
|
2453
2465
|
*/
|
2454
2466
|
interface OnPlayerInputMethodChangedEvent extends EventData {
|
2455
2467
|
/**
|
@@ -2467,7 +2479,7 @@ declare module "factorio:runtime" {
|
|
2467
2479
|
}
|
2468
2480
|
/**
|
2469
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.
|
2470
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2482
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_joined_game Online documentation}
|
2471
2483
|
*/
|
2472
2484
|
interface OnPlayerJoinedGameEvent extends EventData {
|
2473
2485
|
readonly player_index: PlayerIndex
|
@@ -2482,7 +2494,7 @@ declare module "factorio:runtime" {
|
|
2482
2494
|
}
|
2483
2495
|
/**
|
2484
2496
|
* Called when a player is kicked.
|
2485
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2497
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_kicked Online documentation}
|
2486
2498
|
*/
|
2487
2499
|
interface OnPlayerKickedEvent extends EventData {
|
2488
2500
|
/**
|
@@ -2508,7 +2520,7 @@ declare module "factorio:runtime" {
|
|
2508
2520
|
}
|
2509
2521
|
/**
|
2510
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.
|
2511
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2523
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_left_game Online documentation}
|
2512
2524
|
*/
|
2513
2525
|
interface OnPlayerLeftGameEvent extends EventData {
|
2514
2526
|
readonly player_index: PlayerIndex
|
@@ -2524,7 +2536,7 @@ declare module "factorio:runtime" {
|
|
2524
2536
|
}
|
2525
2537
|
/**
|
2526
2538
|
* Called when a player's active locale changes. See {@link LuaPlayer#locale LuaPlayer::locale}.
|
2527
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2539
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_locale_changed Online documentation}
|
2528
2540
|
*/
|
2529
2541
|
interface OnPlayerLocaleChangedEvent extends EventData {
|
2530
2542
|
/**
|
@@ -2546,7 +2558,7 @@ declare module "factorio:runtime" {
|
|
2546
2558
|
}
|
2547
2559
|
/**
|
2548
2560
|
* Called after a players main inventory changed in some way.
|
2549
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2561
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_main_inventory_changed Online documentation}
|
2550
2562
|
*/
|
2551
2563
|
interface OnPlayerMainInventoryChangedEvent extends EventData {
|
2552
2564
|
readonly player_index: PlayerIndex
|
@@ -2567,7 +2579,7 @@ declare module "factorio:runtime" {
|
|
2567
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.
|
2568
2580
|
*
|
2569
2581
|
* Event filter: [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter]
|
2570
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2582
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_mined_entity Online documentation}
|
2571
2583
|
*/
|
2572
2584
|
interface OnPlayerMinedEntityEvent extends EventData {
|
2573
2585
|
/**
|
@@ -2593,13 +2605,13 @@ declare module "factorio:runtime" {
|
|
2593
2605
|
}
|
2594
2606
|
/**
|
2595
2607
|
* Called when the player mines something.
|
2596
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2608
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_mined_item Online documentation}
|
2597
2609
|
*/
|
2598
2610
|
interface OnPlayerMinedItemEvent extends EventData {
|
2599
2611
|
/**
|
2600
2612
|
* The item given to the player
|
2601
2613
|
*/
|
2602
|
-
readonly item_stack:
|
2614
|
+
readonly item_stack: ItemWithQualityCount
|
2603
2615
|
readonly player_index: PlayerIndex
|
2604
2616
|
/**
|
2605
2617
|
* Identifier of the event
|
@@ -2612,7 +2624,7 @@ declare module "factorio:runtime" {
|
|
2612
2624
|
}
|
2613
2625
|
/**
|
2614
2626
|
* Called after a player mines tiles.
|
2615
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2627
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_mined_tile Online documentation}
|
2616
2628
|
*/
|
2617
2629
|
interface OnPlayerMinedTileEvent extends EventData {
|
2618
2630
|
readonly player_index: PlayerIndex
|
@@ -2635,7 +2647,7 @@ declare module "factorio:runtime" {
|
|
2635
2647
|
}
|
2636
2648
|
/**
|
2637
2649
|
* Called when a player is muted.
|
2638
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2650
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_muted Online documentation}
|
2639
2651
|
*/
|
2640
2652
|
interface OnPlayerMutedEvent extends EventData {
|
2641
2653
|
/**
|
@@ -2653,7 +2665,7 @@ declare module "factorio:runtime" {
|
|
2653
2665
|
}
|
2654
2666
|
/**
|
2655
2667
|
* Called when a player invokes the "smart pipette" over an entity.
|
2656
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2668
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_pipette Online documentation}
|
2657
2669
|
*/
|
2658
2670
|
interface OnPlayerPipetteEvent extends EventData {
|
2659
2671
|
/**
|
@@ -2683,7 +2695,7 @@ declare module "factorio:runtime" {
|
|
2683
2695
|
}
|
2684
2696
|
/**
|
2685
2697
|
* Called after the player puts equipment in an equipment grid
|
2686
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2698
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_placed_equipment Online documentation}
|
2687
2699
|
*/
|
2688
2700
|
interface OnPlayerPlacedEquipmentEvent extends EventData {
|
2689
2701
|
readonly player_index: PlayerIndex
|
@@ -2706,7 +2718,7 @@ declare module "factorio:runtime" {
|
|
2706
2718
|
}
|
2707
2719
|
/**
|
2708
2720
|
* Called when a player is promoted.
|
2709
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2721
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_promoted Online documentation}
|
2710
2722
|
*/
|
2711
2723
|
interface OnPlayerPromotedEvent extends EventData {
|
2712
2724
|
/**
|
@@ -2724,7 +2736,7 @@ declare module "factorio:runtime" {
|
|
2724
2736
|
}
|
2725
2737
|
/**
|
2726
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.
|
2727
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2739
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_removed Online documentation}
|
2728
2740
|
*/
|
2729
2741
|
interface OnPlayerRemovedEvent extends EventData {
|
2730
2742
|
/**
|
@@ -2742,7 +2754,7 @@ declare module "factorio:runtime" {
|
|
2742
2754
|
}
|
2743
2755
|
/**
|
2744
2756
|
* Called after the player removes equipment from an equipment grid
|
2745
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2757
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_removed_equipment Online documentation}
|
2746
2758
|
*/
|
2747
2759
|
interface OnPlayerRemovedEquipmentEvent extends EventData {
|
2748
2760
|
readonly player_index: PlayerIndex
|
@@ -2775,7 +2787,7 @@ declare module "factorio:runtime" {
|
|
2775
2787
|
* Called when a player repairs an entity.
|
2776
2788
|
*
|
2777
2789
|
* Event filter: [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter]
|
2778
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2790
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_repaired_entity Online documentation}
|
2779
2791
|
*/
|
2780
2792
|
interface OnPlayerRepairedEntityEvent extends EventData {
|
2781
2793
|
readonly player_index: PlayerIndex
|
@@ -2791,7 +2803,7 @@ declare module "factorio:runtime" {
|
|
2791
2803
|
}
|
2792
2804
|
/**
|
2793
2805
|
* Called after a player respawns.
|
2794
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2806
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_respawned Online documentation}
|
2795
2807
|
*/
|
2796
2808
|
interface OnPlayerRespawnedEvent extends EventData {
|
2797
2809
|
readonly player_index: PlayerIndex
|
@@ -2810,7 +2822,7 @@ declare module "factorio:runtime" {
|
|
2810
2822
|
}
|
2811
2823
|
/**
|
2812
2824
|
* Called after a player reverse-selects an area with a selection-tool item.
|
2813
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2825
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_reverse_selected_area Online documentation}
|
2814
2826
|
*/
|
2815
2827
|
interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
2816
2828
|
/**
|
@@ -2850,7 +2862,7 @@ declare module "factorio:runtime" {
|
|
2850
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.
|
2851
2863
|
*
|
2852
2864
|
* Entities being flipped will not fire this event, even if the flip involves rotating. See {@link OnPlayerFlippedEntityEvent on_player_flipped_entity}.
|
2853
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2865
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_rotated_entity Online documentation}
|
2854
2866
|
*/
|
2855
2867
|
interface OnPlayerRotatedEntityEvent extends EventData {
|
2856
2868
|
/**
|
@@ -2873,7 +2885,7 @@ declare module "factorio:runtime" {
|
|
2873
2885
|
}
|
2874
2886
|
/**
|
2875
2887
|
* Called after a player selects an area with a selection-tool item.
|
2876
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2888
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_selected_area Online documentation}
|
2877
2889
|
*/
|
2878
2890
|
interface OnPlayerSelectedAreaEvent extends EventData {
|
2879
2891
|
/**
|
@@ -2915,7 +2927,7 @@ declare module "factorio:runtime" {
|
|
2915
2927
|
}
|
2916
2928
|
/**
|
2917
2929
|
* Called when a player sets a quickbar slot to anything (new value, or set to empty).
|
2918
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2930
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_set_quick_bar_slot Online documentation}
|
2919
2931
|
*/
|
2920
2932
|
interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
2921
2933
|
readonly player_index: PlayerIndex
|
@@ -2930,7 +2942,7 @@ declare module "factorio:runtime" {
|
|
2930
2942
|
}
|
2931
2943
|
/**
|
2932
2944
|
* Called when a player selects an area with a blueprint.
|
2933
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2945
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_setup_blueprint Online documentation}
|
2934
2946
|
*/
|
2935
2947
|
interface OnPlayerSetupBlueprintEvent extends EventData {
|
2936
2948
|
/**
|
@@ -2980,7 +2992,7 @@ declare module "factorio:runtime" {
|
|
2980
2992
|
}
|
2981
2993
|
/**
|
2982
2994
|
* Called when a player toggles alt mode, also known as "show entity info".
|
2983
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
2995
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_toggled_alt_mode Online documentation}
|
2984
2996
|
*/
|
2985
2997
|
interface OnPlayerToggledAltModeEvent extends EventData {
|
2986
2998
|
readonly player_index: PlayerIndex
|
@@ -2999,7 +3011,7 @@ declare module "factorio:runtime" {
|
|
2999
3011
|
}
|
3000
3012
|
/**
|
3001
3013
|
* Called when a player toggles the map editor on or off.
|
3002
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3014
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_toggled_map_editor Online documentation}
|
3003
3015
|
*/
|
3004
3016
|
interface OnPlayerToggledMapEditorEvent extends EventData {
|
3005
3017
|
readonly player_index: PlayerIndex
|
@@ -3014,7 +3026,7 @@ declare module "factorio:runtime" {
|
|
3014
3026
|
}
|
3015
3027
|
/**
|
3016
3028
|
* Called after a players trash inventory changed in some way.
|
3017
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3029
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_trash_inventory_changed Online documentation}
|
3018
3030
|
*/
|
3019
3031
|
interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
3020
3032
|
readonly player_index: PlayerIndex
|
@@ -3029,7 +3041,7 @@ declare module "factorio:runtime" {
|
|
3029
3041
|
}
|
3030
3042
|
/**
|
3031
3043
|
* Called when a player is un-banned.
|
3032
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3044
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_unbanned Online documentation}
|
3033
3045
|
*/
|
3034
3046
|
interface OnPlayerUnbannedEvent extends EventData {
|
3035
3047
|
/**
|
@@ -3059,7 +3071,7 @@ declare module "factorio:runtime" {
|
|
3059
3071
|
}
|
3060
3072
|
/**
|
3061
3073
|
* Called when a player is unmuted.
|
3062
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3074
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_unmuted Online documentation}
|
3063
3075
|
*/
|
3064
3076
|
interface OnPlayerUnmutedEvent extends EventData {
|
3065
3077
|
/**
|
@@ -3077,7 +3089,7 @@ declare module "factorio:runtime" {
|
|
3077
3089
|
}
|
3078
3090
|
/**
|
3079
3091
|
* Called when a player uses a capsule that results in some game action.
|
3080
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3092
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_used_capsule Online documentation}
|
3081
3093
|
*/
|
3082
3094
|
interface OnPlayerUsedCapsuleEvent extends EventData {
|
3083
3095
|
/**
|
@@ -3107,7 +3119,7 @@ declare module "factorio:runtime" {
|
|
3107
3119
|
}
|
3108
3120
|
/**
|
3109
3121
|
* Called when a player uses spidertron remote to send all selected units to a given position
|
3110
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3122
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_player_used_spidertron_remote Online documentation}
|
3111
3123
|
*/
|
3112
3124
|
interface OnPlayerUsedSpidertronRemoteEvent extends EventData {
|
3113
3125
|
/**
|
@@ -3131,7 +3143,7 @@ declare module "factorio:runtime" {
|
|
3131
3143
|
* Called after an entity dies.
|
3132
3144
|
*
|
3133
3145
|
* Event filter: [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter]
|
3134
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3146
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_post_entity_died Online documentation}
|
3135
3147
|
*/
|
3136
3148
|
interface OnPostEntityDiedEvent extends EventData {
|
3137
3149
|
/**
|
@@ -3179,9 +3191,53 @@ declare module "factorio:runtime" {
|
|
3179
3191
|
*/
|
3180
3192
|
readonly tick: uint
|
3181
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.62/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
|
+
}
|
3182
3238
|
/**
|
3183
3239
|
* Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
|
3184
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3240
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_build Online documentation}
|
3185
3241
|
*/
|
3186
3242
|
interface OnPreBuildEvent extends EventData {
|
3187
3243
|
/**
|
@@ -3227,7 +3283,7 @@ declare module "factorio:runtime" {
|
|
3227
3283
|
}
|
3228
3284
|
/**
|
3229
3285
|
* Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
3230
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3286
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_chunk_deleted Online documentation}
|
3231
3287
|
*/
|
3232
3288
|
interface OnPreChunkDeletedEvent extends EventData {
|
3233
3289
|
readonly surface_index: SurfaceIndex
|
@@ -3246,7 +3302,7 @@ declare module "factorio:runtime" {
|
|
3246
3302
|
}
|
3247
3303
|
/**
|
3248
3304
|
* Called before entity copy-paste is done.
|
3249
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3305
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_entity_settings_pasted Online documentation}
|
3250
3306
|
*/
|
3251
3307
|
interface OnPreEntitySettingsPastedEvent extends EventData {
|
3252
3308
|
readonly player_index: PlayerIndex
|
@@ -3273,7 +3329,7 @@ declare module "factorio:runtime" {
|
|
3273
3329
|
* Also called for item request proxies before they are destroyed as a result of being marked for deconstruction.
|
3274
3330
|
*
|
3275
3331
|
* Event filter: [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter]
|
3276
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3332
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_ghost_deconstructed Online documentation}
|
3277
3333
|
*/
|
3278
3334
|
interface OnPreGhostDeconstructedEvent extends EventData {
|
3279
3335
|
/**
|
@@ -3294,7 +3350,7 @@ declare module "factorio:runtime" {
|
|
3294
3350
|
* Called before a ghost entity is upgraded.
|
3295
3351
|
*
|
3296
3352
|
* Event filter: [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter]
|
3297
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3353
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_ghost_upgraded Online documentation}
|
3298
3354
|
*/
|
3299
3355
|
interface OnPreGhostUpgradedEvent extends EventData {
|
3300
3356
|
/**
|
@@ -3315,7 +3371,7 @@ declare module "factorio:runtime" {
|
|
3315
3371
|
}
|
3316
3372
|
/**
|
3317
3373
|
* Called directly before a permission group is deleted.
|
3318
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3374
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_permission_group_deleted Online documentation}
|
3319
3375
|
*/
|
3320
3376
|
interface OnPrePermissionGroupDeletedEvent extends EventData {
|
3321
3377
|
/**
|
@@ -3337,7 +3393,7 @@ declare module "factorio:runtime" {
|
|
3337
3393
|
}
|
3338
3394
|
/**
|
3339
3395
|
* Called directly before a permission string is imported.
|
3340
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3396
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_permission_string_imported Online documentation}
|
3341
3397
|
*/
|
3342
3398
|
interface OnPrePermissionStringImportedEvent extends EventData {
|
3343
3399
|
/**
|
@@ -3355,7 +3411,7 @@ declare module "factorio:runtime" {
|
|
3355
3411
|
}
|
3356
3412
|
/**
|
3357
3413
|
* Called when a player queues something to be crafted.
|
3358
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3414
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_player_crafted_item Online documentation}
|
3359
3415
|
*/
|
3360
3416
|
interface OnPrePlayerCraftedItemEvent extends EventData {
|
3361
3417
|
/**
|
@@ -3385,7 +3441,7 @@ declare module "factorio:runtime" {
|
|
3385
3441
|
}
|
3386
3442
|
/**
|
3387
3443
|
* Called before a players dies.
|
3388
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3444
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_player_died Online documentation}
|
3389
3445
|
*/
|
3390
3446
|
interface OnPrePlayerDiedEvent extends EventData {
|
3391
3447
|
readonly player_index: PlayerIndex
|
@@ -3401,7 +3457,7 @@ declare module "factorio:runtime" {
|
|
3401
3457
|
}
|
3402
3458
|
/**
|
3403
3459
|
* Called before a player leaves the game.
|
3404
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3460
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_player_left_game Online documentation}
|
3405
3461
|
*/
|
3406
3462
|
interface OnPrePlayerLeftGameEvent extends EventData {
|
3407
3463
|
readonly player_index: PlayerIndex
|
@@ -3419,7 +3475,7 @@ declare module "factorio:runtime" {
|
|
3419
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.
|
3420
3476
|
*
|
3421
3477
|
* Event filter: [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter]
|
3422
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3478
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_player_mined_item Online documentation}
|
3423
3479
|
*/
|
3424
3480
|
interface OnPrePlayerMinedItemEvent extends EventData {
|
3425
3481
|
/**
|
@@ -3438,7 +3494,7 @@ declare module "factorio:runtime" {
|
|
3438
3494
|
}
|
3439
3495
|
/**
|
3440
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.
|
3441
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3497
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_player_removed Online documentation}
|
3442
3498
|
*/
|
3443
3499
|
interface OnPrePlayerRemovedEvent extends EventData {
|
3444
3500
|
/**
|
@@ -3456,7 +3512,7 @@ declare module "factorio:runtime" {
|
|
3456
3512
|
}
|
3457
3513
|
/**
|
3458
3514
|
* Called before a player toggles the map editor on or off.
|
3459
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3515
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_player_toggled_map_editor Online documentation}
|
3460
3516
|
*/
|
3461
3517
|
interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
3462
3518
|
readonly player_index: PlayerIndex
|
@@ -3471,7 +3527,7 @@ declare module "factorio:runtime" {
|
|
3471
3527
|
}
|
3472
3528
|
/**
|
3473
3529
|
* Called directly before a robot explodes cliffs.
|
3474
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3530
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_robot_exploded_cliff Online documentation}
|
3475
3531
|
*/
|
3476
3532
|
interface OnPreRobotExplodedCliffEvent extends EventData {
|
3477
3533
|
readonly robot: LuaEntity
|
@@ -3495,7 +3551,7 @@ declare module "factorio:runtime" {
|
|
3495
3551
|
}
|
3496
3552
|
/**
|
3497
3553
|
* Called just before the scenario finishes.
|
3498
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3554
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_scenario_finished Online documentation}
|
3499
3555
|
*/
|
3500
3556
|
interface OnPreScenarioFinishedEvent extends EventData {
|
3501
3557
|
/**
|
@@ -3513,7 +3569,7 @@ declare module "factorio:runtime" {
|
|
3513
3569
|
}
|
3514
3570
|
/**
|
3515
3571
|
* Called just before a script inventory is resized.
|
3516
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3572
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_script_inventory_resized Online documentation}
|
3517
3573
|
*/
|
3518
3574
|
interface OnPreScriptInventoryResizedEvent extends EventData {
|
3519
3575
|
/**
|
@@ -3544,7 +3600,7 @@ declare module "factorio:runtime" {
|
|
3544
3600
|
}
|
3545
3601
|
/**
|
3546
3602
|
* Called just before a surface is cleared (all entities removed and all chunks deleted).
|
3547
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3603
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_surface_cleared Online documentation}
|
3548
3604
|
*/
|
3549
3605
|
interface OnPreSurfaceClearedEvent extends EventData {
|
3550
3606
|
readonly surface_index: SurfaceIndex
|
@@ -3559,7 +3615,7 @@ declare module "factorio:runtime" {
|
|
3559
3615
|
}
|
3560
3616
|
/**
|
3561
3617
|
* Called just before a surface is deleted.
|
3562
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3618
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_pre_surface_deleted Online documentation}
|
3563
3619
|
*/
|
3564
3620
|
interface OnPreSurfaceDeletedEvent extends EventData {
|
3565
3621
|
readonly surface_index: SurfaceIndex
|
@@ -3574,7 +3630,7 @@ declare module "factorio:runtime" {
|
|
3574
3630
|
}
|
3575
3631
|
/**
|
3576
3632
|
* Called when the player triggers "redo".
|
3577
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3633
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_redo_applied Online documentation}
|
3578
3634
|
*/
|
3579
3635
|
interface OnRedoAppliedEvent extends EventData {
|
3580
3636
|
/**
|
@@ -3596,7 +3652,7 @@ declare module "factorio:runtime" {
|
|
3596
3652
|
}
|
3597
3653
|
/**
|
3598
3654
|
* Called when research is cancelled.
|
3599
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3655
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_research_cancelled Online documentation}
|
3600
3656
|
*/
|
3601
3657
|
interface OnResearchCancelledEvent extends EventData {
|
3602
3658
|
/**
|
@@ -3607,6 +3663,10 @@ declare module "factorio:runtime" {
|
|
3607
3663
|
* The force whose research was cancelled.
|
3608
3664
|
*/
|
3609
3665
|
readonly force: LuaForce
|
3666
|
+
/**
|
3667
|
+
* The player who cancelled the research if any.
|
3668
|
+
*/
|
3669
|
+
readonly player_index?: PlayerIndex
|
3610
3670
|
/**
|
3611
3671
|
* Identifier of the event
|
3612
3672
|
*/
|
@@ -3618,7 +3678,7 @@ declare module "factorio:runtime" {
|
|
3618
3678
|
}
|
3619
3679
|
/**
|
3620
3680
|
* Called when a research finishes.
|
3621
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3681
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_research_finished Online documentation}
|
3622
3682
|
*/
|
3623
3683
|
interface OnResearchFinishedEvent extends EventData {
|
3624
3684
|
/**
|
@@ -3640,13 +3700,17 @@ declare module "factorio:runtime" {
|
|
3640
3700
|
}
|
3641
3701
|
/**
|
3642
3702
|
* Called when research is moved forwards or backwards in the research queue.
|
3643
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3703
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_research_moved Online documentation}
|
3644
3704
|
*/
|
3645
3705
|
interface OnResearchMovedEvent extends EventData {
|
3646
3706
|
/**
|
3647
3707
|
* The force whose research was re-arranged.
|
3648
3708
|
*/
|
3649
3709
|
readonly force: LuaForce
|
3710
|
+
/**
|
3711
|
+
* The player who did the re-arranging if any.
|
3712
|
+
*/
|
3713
|
+
readonly player_index?: PlayerIndex
|
3650
3714
|
/**
|
3651
3715
|
* Identifier of the event
|
3652
3716
|
*/
|
@@ -3656,9 +3720,35 @@ declare module "factorio:runtime" {
|
|
3656
3720
|
*/
|
3657
3721
|
readonly tick: uint
|
3658
3722
|
}
|
3723
|
+
/**
|
3724
|
+
* Called when research is queued.
|
3725
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_research_queued Online documentation}
|
3726
|
+
*/
|
3727
|
+
interface OnResearchQueuedEvent extends EventData {
|
3728
|
+
/**
|
3729
|
+
* The technology queued
|
3730
|
+
*/
|
3731
|
+
readonly research: LuaTechnology
|
3732
|
+
/**
|
3733
|
+
* The force whose research was queued.
|
3734
|
+
*/
|
3735
|
+
readonly force: LuaForce
|
3736
|
+
/**
|
3737
|
+
* The player who queued the research if any.
|
3738
|
+
*/
|
3739
|
+
readonly player_index?: PlayerIndex
|
3740
|
+
/**
|
3741
|
+
* Identifier of the event
|
3742
|
+
*/
|
3743
|
+
readonly name: typeof defines.events.on_research_queued
|
3744
|
+
/**
|
3745
|
+
* Tick the event was generated.
|
3746
|
+
*/
|
3747
|
+
readonly tick: uint
|
3748
|
+
}
|
3659
3749
|
/**
|
3660
3750
|
* Called when a research is reversed (unresearched).
|
3661
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3751
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_research_reversed Online documentation}
|
3662
3752
|
*/
|
3663
3753
|
interface OnResearchReversedEvent extends EventData {
|
3664
3754
|
/**
|
@@ -3680,7 +3770,7 @@ declare module "factorio:runtime" {
|
|
3680
3770
|
}
|
3681
3771
|
/**
|
3682
3772
|
* Called when a technology research starts.
|
3683
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3773
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_research_started Online documentation}
|
3684
3774
|
*/
|
3685
3775
|
interface OnResearchStartedEvent extends EventData {
|
3686
3776
|
/**
|
@@ -3699,7 +3789,7 @@ declare module "factorio:runtime" {
|
|
3699
3789
|
}
|
3700
3790
|
/**
|
3701
3791
|
* Called when a resource entity reaches 0 or its minimum yield for infinite resources.
|
3702
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3792
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_resource_depleted Online documentation}
|
3703
3793
|
*/
|
3704
3794
|
interface OnResourceDepletedEvent extends EventData {
|
3705
3795
|
readonly entity: LuaEntity
|
@@ -3716,7 +3806,7 @@ declare module "factorio:runtime" {
|
|
3716
3806
|
* Called when a construction robot builds an entity.
|
3717
3807
|
*
|
3718
3808
|
* Event filter: [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter]
|
3719
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3809
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_robot_built_entity Online documentation}
|
3720
3810
|
*/
|
3721
3811
|
interface OnRobotBuiltEntityEvent extends EventData {
|
3722
3812
|
/**
|
@@ -3746,7 +3836,7 @@ declare module "factorio:runtime" {
|
|
3746
3836
|
}
|
3747
3837
|
/**
|
3748
3838
|
* Called after a robot builds tiles.
|
3749
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3839
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_robot_built_tile Online documentation}
|
3750
3840
|
*/
|
3751
3841
|
interface OnRobotBuiltTileEvent extends EventData {
|
3752
3842
|
/**
|
@@ -3788,7 +3878,7 @@ declare module "factorio:runtime" {
|
|
3788
3878
|
}
|
3789
3879
|
/**
|
3790
3880
|
* Called directly after a robot explodes cliffs.
|
3791
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3881
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_robot_exploded_cliff Online documentation}
|
3792
3882
|
*/
|
3793
3883
|
interface OnRobotExplodedCliffEvent extends EventData {
|
3794
3884
|
readonly robot: LuaEntity
|
@@ -3811,7 +3901,7 @@ declare module "factorio:runtime" {
|
|
3811
3901
|
}
|
3812
3902
|
/**
|
3813
3903
|
* Called when a robot mines an entity.
|
3814
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3904
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_robot_mined Online documentation}
|
3815
3905
|
*/
|
3816
3906
|
interface OnRobotMinedEvent extends EventData {
|
3817
3907
|
/**
|
@@ -3821,7 +3911,7 @@ declare module "factorio:runtime" {
|
|
3821
3911
|
/**
|
3822
3912
|
* The entity the robot just picked up.
|
3823
3913
|
*/
|
3824
|
-
readonly item_stack:
|
3914
|
+
readonly item_stack: ItemWithQualityCount
|
3825
3915
|
/**
|
3826
3916
|
* Identifier of the event
|
3827
3917
|
*/
|
@@ -3839,7 +3929,7 @@ declare module "factorio:runtime" {
|
|
3839
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.
|
3840
3930
|
*
|
3841
3931
|
* Event filter: [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter]
|
3842
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3932
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_robot_mined_entity Online documentation}
|
3843
3933
|
*/
|
3844
3934
|
interface OnRobotMinedEntityEvent extends EventData {
|
3845
3935
|
/**
|
@@ -3865,7 +3955,7 @@ declare module "factorio:runtime" {
|
|
3865
3955
|
}
|
3866
3956
|
/**
|
3867
3957
|
* Called after a robot mines tiles.
|
3868
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3958
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_robot_mined_tile Online documentation}
|
3869
3959
|
*/
|
3870
3960
|
interface OnRobotMinedTileEvent extends EventData {
|
3871
3961
|
/**
|
@@ -3893,7 +3983,7 @@ declare module "factorio:runtime" {
|
|
3893
3983
|
* Called before a robot mines an entity.
|
3894
3984
|
*
|
3895
3985
|
* Event filter: [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter]
|
3896
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
3986
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_robot_pre_mined Online documentation}
|
3897
3987
|
*/
|
3898
3988
|
interface OnRobotPreMinedEvent extends EventData {
|
3899
3989
|
/**
|
@@ -3915,7 +4005,7 @@ declare module "factorio:runtime" {
|
|
3915
4005
|
}
|
3916
4006
|
/**
|
3917
4007
|
* Called when a rocket silo is ordered to be launched.
|
3918
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4008
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_rocket_launch_ordered Online documentation}
|
3919
4009
|
*/
|
3920
4010
|
interface OnRocketLaunchOrderedEvent extends EventData {
|
3921
4011
|
readonly rocket: LuaEntity
|
@@ -3935,7 +4025,7 @@ declare module "factorio:runtime" {
|
|
3935
4025
|
}
|
3936
4026
|
/**
|
3937
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)
|
3938
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4028
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_rocket_launched Online documentation}
|
3939
4029
|
*/
|
3940
4030
|
interface OnRocketLaunchedEvent extends EventData {
|
3941
4031
|
readonly rocket: LuaEntity
|
@@ -3951,7 +4041,7 @@ declare module "factorio:runtime" {
|
|
3951
4041
|
}
|
3952
4042
|
/**
|
3953
4043
|
* Called when a runtime mod setting is changed by a player.
|
3954
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4044
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_runtime_mod_setting_changed Online documentation}
|
3955
4045
|
*/
|
3956
4046
|
interface OnRuntimeModSettingChangedEvent extends EventData {
|
3957
4047
|
/**
|
@@ -3974,7 +4064,7 @@ declare module "factorio:runtime" {
|
|
3974
4064
|
}
|
3975
4065
|
/**
|
3976
4066
|
* Called just after a script inventory is resized.
|
3977
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4067
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_script_inventory_resized Online documentation}
|
3978
4068
|
*/
|
3979
4069
|
interface OnScriptInventoryResizedEvent extends EventData {
|
3980
4070
|
/**
|
@@ -4009,7 +4099,7 @@ declare module "factorio:runtime" {
|
|
4009
4099
|
}
|
4010
4100
|
/**
|
4011
4101
|
* Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
|
4012
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4102
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_script_path_request_finished Online documentation}
|
4013
4103
|
*/
|
4014
4104
|
interface OnScriptPathRequestFinishedEvent extends EventData {
|
4015
4105
|
/**
|
@@ -4035,7 +4125,7 @@ declare module "factorio:runtime" {
|
|
4035
4125
|
}
|
4036
4126
|
/**
|
4037
4127
|
* Called when a script trigger effect is triggered.
|
4038
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4128
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_script_trigger_effect Online documentation}
|
4039
4129
|
*/
|
4040
4130
|
interface OnScriptTriggerEffectEvent extends EventData {
|
4041
4131
|
/**
|
@@ -4068,7 +4158,7 @@ declare module "factorio:runtime" {
|
|
4068
4158
|
* Called when an entity of type `radar` finishes scanning a sector.
|
4069
4159
|
*
|
4070
4160
|
* Event filter: [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter]
|
4071
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4161
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_sector_scanned Online documentation}
|
4072
4162
|
*/
|
4073
4163
|
interface OnSectorScannedEvent extends EventData {
|
4074
4164
|
/**
|
@@ -4094,7 +4184,7 @@ declare module "factorio:runtime" {
|
|
4094
4184
|
}
|
4095
4185
|
/**
|
4096
4186
|
* Called when an individual segment of a SegmentedUnit is created.
|
4097
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4187
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_segment_entity_created Online documentation}
|
4098
4188
|
*/
|
4099
4189
|
interface OnSegmentEntityCreatedEvent extends EventData {
|
4100
4190
|
readonly entity: LuaEntity
|
@@ -4107,9 +4197,111 @@ declare module "factorio:runtime" {
|
|
4107
4197
|
*/
|
4108
4198
|
readonly tick: uint
|
4109
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.62/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.62/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.62/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
|
+
}
|
4110
4302
|
/**
|
4111
4303
|
* Called after the selected entity changes for a given player.
|
4112
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4304
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_selected_entity_changed Online documentation}
|
4113
4305
|
*/
|
4114
4306
|
interface OnSelectedEntityChangedEvent extends EventData {
|
4115
4307
|
/**
|
@@ -4131,7 +4323,7 @@ declare module "factorio:runtime" {
|
|
4131
4323
|
}
|
4132
4324
|
/**
|
4133
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.
|
4134
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4326
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_singleplayer_init Online documentation}
|
4135
4327
|
*/
|
4136
4328
|
interface OnSingleplayerInitEvent extends EventData {
|
4137
4329
|
/**
|
@@ -4147,7 +4339,7 @@ declare module "factorio:runtime" {
|
|
4147
4339
|
* Called when a space platform builds an entity.
|
4148
4340
|
*
|
4149
4341
|
* Event filter: [LuaPlatformBuiltEntityEventFilter](LuaPlatformBuiltEntityEventFilter]
|
4150
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4342
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_space_platform_built_entity Online documentation}
|
4151
4343
|
*/
|
4152
4344
|
interface OnSpacePlatformBuiltEntityEvent extends EventData {
|
4153
4345
|
/**
|
@@ -4177,7 +4369,7 @@ declare module "factorio:runtime" {
|
|
4177
4369
|
}
|
4178
4370
|
/**
|
4179
4371
|
* Called after a space platform builds tiles.
|
4180
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4372
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_space_platform_built_tile Online documentation}
|
4181
4373
|
*/
|
4182
4374
|
interface OnSpacePlatformBuiltTileEvent extends EventData {
|
4183
4375
|
/**
|
@@ -4219,7 +4411,7 @@ declare module "factorio:runtime" {
|
|
4219
4411
|
}
|
4220
4412
|
/**
|
4221
4413
|
* Called when a space platform changes state
|
4222
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4414
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_space_platform_changed_state Online documentation}
|
4223
4415
|
*/
|
4224
4416
|
interface OnSpacePlatformChangedStateEvent extends EventData {
|
4225
4417
|
readonly platform: LuaSpacePlatform
|
@@ -4241,7 +4433,7 @@ declare module "factorio:runtime" {
|
|
4241
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.
|
4242
4434
|
*
|
4243
4435
|
* Event filter: [LuaPlatformMinedEntityEventFilter](LuaPlatformMinedEntityEventFilter]
|
4244
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4436
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_space_platform_mined_entity Online documentation}
|
4245
4437
|
*/
|
4246
4438
|
interface OnSpacePlatformMinedEntityEvent extends EventData {
|
4247
4439
|
/**
|
@@ -4267,7 +4459,7 @@ declare module "factorio:runtime" {
|
|
4267
4459
|
}
|
4268
4460
|
/**
|
4269
4461
|
* Called when a platform mines an entity.
|
4270
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4462
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_space_platform_mined_item Online documentation}
|
4271
4463
|
*/
|
4272
4464
|
interface OnSpacePlatformMinedItemEvent extends EventData {
|
4273
4465
|
/**
|
@@ -4277,7 +4469,7 @@ declare module "factorio:runtime" {
|
|
4277
4469
|
/**
|
4278
4470
|
* The entity the platform just picked up.
|
4279
4471
|
*/
|
4280
|
-
readonly item_stack:
|
4472
|
+
readonly item_stack: ItemWithQualityCount
|
4281
4473
|
/**
|
4282
4474
|
* Identifier of the event
|
4283
4475
|
*/
|
@@ -4289,7 +4481,7 @@ declare module "factorio:runtime" {
|
|
4289
4481
|
}
|
4290
4482
|
/**
|
4291
4483
|
* Called after a platform mines tiles.
|
4292
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4484
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_space_platform_mined_tile Online documentation}
|
4293
4485
|
*/
|
4294
4486
|
interface OnSpacePlatformMinedTileEvent extends EventData {
|
4295
4487
|
/**
|
@@ -4317,7 +4509,7 @@ declare module "factorio:runtime" {
|
|
4317
4509
|
* Called before a platform mines an entity.
|
4318
4510
|
*
|
4319
4511
|
* Event filter: [LuaPrePlatformMinedEntityEventFilter](LuaPrePlatformMinedEntityEventFilter]
|
4320
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4512
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_space_platform_pre_mined Online documentation}
|
4321
4513
|
*/
|
4322
4514
|
interface OnSpacePlatformPreMinedEvent extends EventData {
|
4323
4515
|
/**
|
@@ -4339,7 +4531,7 @@ declare module "factorio:runtime" {
|
|
4339
4531
|
}
|
4340
4532
|
/**
|
4341
4533
|
* Called when a spider finishes moving to its autopilot position.
|
4342
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4534
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_spider_command_completed Online documentation}
|
4343
4535
|
*/
|
4344
4536
|
interface OnSpiderCommandCompletedEvent extends EventData {
|
4345
4537
|
/**
|
@@ -4357,7 +4549,7 @@ declare module "factorio:runtime" {
|
|
4357
4549
|
}
|
4358
4550
|
/**
|
4359
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.
|
4360
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4552
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_string_translated Online documentation}
|
4361
4553
|
*/
|
4362
4554
|
interface OnStringTranslatedEvent extends EventData {
|
4363
4555
|
/**
|
@@ -4391,7 +4583,7 @@ declare module "factorio:runtime" {
|
|
4391
4583
|
}
|
4392
4584
|
/**
|
4393
4585
|
* Called just after a surface is cleared (all entities removed and all chunks deleted).
|
4394
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4586
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_surface_cleared Online documentation}
|
4395
4587
|
*/
|
4396
4588
|
interface OnSurfaceClearedEvent extends EventData {
|
4397
4589
|
readonly surface_index: SurfaceIndex
|
@@ -4408,7 +4600,7 @@ declare module "factorio:runtime" {
|
|
4408
4600
|
* Called when a surface is created.
|
4409
4601
|
*
|
4410
4602
|
* This is not called when the default surface is created as it will always exist.
|
4411
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4603
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_surface_created Online documentation}
|
4412
4604
|
*/
|
4413
4605
|
interface OnSurfaceCreatedEvent extends EventData {
|
4414
4606
|
readonly surface_index: SurfaceIndex
|
@@ -4423,7 +4615,7 @@ declare module "factorio:runtime" {
|
|
4423
4615
|
}
|
4424
4616
|
/**
|
4425
4617
|
* Called after a surface is deleted.
|
4426
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4618
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_surface_deleted Online documentation}
|
4427
4619
|
*/
|
4428
4620
|
interface OnSurfaceDeletedEvent extends EventData {
|
4429
4621
|
readonly surface_index: SurfaceIndex
|
@@ -4438,7 +4630,7 @@ declare module "factorio:runtime" {
|
|
4438
4630
|
}
|
4439
4631
|
/**
|
4440
4632
|
* Called after a surface is imported via the map editor.
|
4441
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4633
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_surface_imported Online documentation}
|
4442
4634
|
*/
|
4443
4635
|
interface OnSurfaceImportedEvent extends EventData {
|
4444
4636
|
readonly surface_index: SurfaceIndex
|
@@ -4457,7 +4649,7 @@ declare module "factorio:runtime" {
|
|
4457
4649
|
}
|
4458
4650
|
/**
|
4459
4651
|
* Called when a surface is renamed.
|
4460
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4652
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_surface_renamed Online documentation}
|
4461
4653
|
*/
|
4462
4654
|
interface OnSurfaceRenamedEvent extends EventData {
|
4463
4655
|
readonly surface_index: SurfaceIndex
|
@@ -4474,7 +4666,7 @@ declare module "factorio:runtime" {
|
|
4474
4666
|
}
|
4475
4667
|
/**
|
4476
4668
|
* Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
|
4477
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4669
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_technology_effects_reset Online documentation}
|
4478
4670
|
*/
|
4479
4671
|
interface OnTechnologyEffectsResetEvent extends EventData {
|
4480
4672
|
readonly force: LuaForce
|
@@ -4487,9 +4679,49 @@ declare module "factorio:runtime" {
|
|
4487
4679
|
*/
|
4488
4680
|
readonly tick: uint
|
4489
4681
|
}
|
4682
|
+
/**
|
4683
|
+
* Called when a territory is created for any reason.
|
4684
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/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.62/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
|
+
}
|
4490
4722
|
/**
|
4491
4723
|
* It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
|
4492
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4724
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_tick Online documentation}
|
4493
4725
|
*/
|
4494
4726
|
interface OnTickEvent extends EventData {
|
4495
4727
|
/**
|
@@ -4501,9 +4733,87 @@ declare module "factorio:runtime" {
|
|
4501
4733
|
*/
|
4502
4734
|
readonly tick: uint
|
4503
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.62/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.62/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.62/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
|
+
}
|
4504
4814
|
/**
|
4505
4815
|
* Called when a train changes state (started to stopped and vice versa)
|
4506
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4816
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_train_changed_state Online documentation}
|
4507
4817
|
*/
|
4508
4818
|
interface OnTrainChangedStateEvent extends EventData {
|
4509
4819
|
readonly train: LuaTrain
|
@@ -4519,7 +4829,7 @@ declare module "factorio:runtime" {
|
|
4519
4829
|
}
|
4520
4830
|
/**
|
4521
4831
|
* Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
|
4522
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4832
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_train_created Online documentation}
|
4523
4833
|
*/
|
4524
4834
|
interface OnTrainCreatedEvent extends EventData {
|
4525
4835
|
readonly train: LuaTrain
|
@@ -4542,7 +4852,7 @@ declare module "factorio:runtime" {
|
|
4542
4852
|
}
|
4543
4853
|
/**
|
4544
4854
|
* Called when a trains schedule is changed either by the player or through script.
|
4545
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4855
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_train_schedule_changed Online documentation}
|
4546
4856
|
*/
|
4547
4857
|
interface OnTrainScheduleChangedEvent extends EventData {
|
4548
4858
|
readonly train: LuaTrain
|
@@ -4561,7 +4871,7 @@ declare module "factorio:runtime" {
|
|
4561
4871
|
}
|
4562
4872
|
/**
|
4563
4873
|
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.
|
4564
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4874
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_trigger_created_entity Online documentation}
|
4565
4875
|
*/
|
4566
4876
|
interface OnTriggerCreatedEntityEvent extends EventData {
|
4567
4877
|
readonly entity: LuaEntity
|
@@ -4577,7 +4887,7 @@ declare module "factorio:runtime" {
|
|
4577
4887
|
}
|
4578
4888
|
/**
|
4579
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`.
|
4580
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4890
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_trigger_fired_artillery Online documentation}
|
4581
4891
|
*/
|
4582
4892
|
interface OnTriggerFiredArtilleryEvent extends EventData {
|
4583
4893
|
readonly entity: LuaEntity
|
@@ -4591,9 +4901,35 @@ declare module "factorio:runtime" {
|
|
4591
4901
|
*/
|
4592
4902
|
readonly tick: uint
|
4593
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.62/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
|
+
}
|
4594
4930
|
/**
|
4595
4931
|
* Called when the player triggers "undo".
|
4596
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4932
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_undo_applied Online documentation}
|
4597
4933
|
*/
|
4598
4934
|
interface OnUndoAppliedEvent extends EventData {
|
4599
4935
|
/**
|
@@ -4615,7 +4951,7 @@ declare module "factorio:runtime" {
|
|
4615
4951
|
}
|
4616
4952
|
/**
|
4617
4953
|
* Called when a unit is added to a unit group.
|
4618
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4954
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_unit_added_to_group Online documentation}
|
4619
4955
|
*/
|
4620
4956
|
interface OnUnitAddedToGroupEvent extends EventData {
|
4621
4957
|
readonly unit: LuaEntity
|
@@ -4631,7 +4967,7 @@ declare module "factorio:runtime" {
|
|
4631
4967
|
}
|
4632
4968
|
/**
|
4633
4969
|
* Called when a new unit group is created, before any members are added to it.
|
4634
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4970
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_unit_group_created Online documentation}
|
4635
4971
|
*/
|
4636
4972
|
interface OnUnitGroupCreatedEvent extends EventData {
|
4637
4973
|
readonly group: LuaCommandable
|
@@ -4646,7 +4982,7 @@ declare module "factorio:runtime" {
|
|
4646
4982
|
}
|
4647
4983
|
/**
|
4648
4984
|
* Called when a unit group finishes gathering and starts executing its command.
|
4649
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
4985
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_unit_group_finished_gathering Online documentation}
|
4650
4986
|
*/
|
4651
4987
|
interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
4652
4988
|
readonly group: LuaCommandable
|
@@ -4661,7 +4997,7 @@ declare module "factorio:runtime" {
|
|
4661
4997
|
}
|
4662
4998
|
/**
|
4663
4999
|
* Called when a unit is removed from a unit group.
|
4664
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
5000
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_unit_removed_from_group Online documentation}
|
4665
5001
|
*/
|
4666
5002
|
interface OnUnitRemovedFromGroupEvent extends EventData {
|
4667
5003
|
readonly unit: LuaEntity
|
@@ -4677,7 +5013,7 @@ declare module "factorio:runtime" {
|
|
4677
5013
|
}
|
4678
5014
|
/**
|
4679
5015
|
* Called when a worker (construction or logistic) robot expires through a lack of energy.
|
4680
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
5016
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#on_worker_robot_expired Online documentation}
|
4681
5017
|
*/
|
4682
5018
|
interface OnWorkerRobotExpiredEvent extends EventData {
|
4683
5019
|
readonly robot: LuaEntity
|
@@ -4694,7 +5030,7 @@ declare module "factorio:runtime" {
|
|
4694
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}.
|
4695
5031
|
*
|
4696
5032
|
* Event filter: [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter]
|
4697
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
5033
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#script_raised_built Online documentation}
|
4698
5034
|
*/
|
4699
5035
|
interface ScriptRaisedBuiltEvent extends EventData {
|
4700
5036
|
/**
|
@@ -4714,7 +5050,7 @@ declare module "factorio:runtime" {
|
|
4714
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}.
|
4715
5051
|
*
|
4716
5052
|
* Event filter: [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter]
|
4717
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
5053
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#script_raised_destroy Online documentation}
|
4718
5054
|
*/
|
4719
5055
|
interface ScriptRaisedDestroyEvent extends EventData {
|
4720
5056
|
/**
|
@@ -4730,11 +5066,31 @@ declare module "factorio:runtime" {
|
|
4730
5066
|
*/
|
4731
5067
|
readonly tick: uint
|
4732
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.62/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
|
+
}
|
4733
5089
|
/**
|
4734
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}.
|
4735
5091
|
*
|
4736
5092
|
* Event filter: [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter]
|
4737
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
5093
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#script_raised_revive Online documentation}
|
4738
5094
|
*/
|
4739
5095
|
interface ScriptRaisedReviveEvent extends EventData {
|
4740
5096
|
/**
|
@@ -4756,7 +5112,7 @@ declare module "factorio:runtime" {
|
|
4756
5112
|
}
|
4757
5113
|
/**
|
4758
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}.
|
4759
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
5115
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#script_raised_set_tiles Online documentation}
|
4760
5116
|
*/
|
4761
5117
|
interface ScriptRaisedSetTilesEvent extends EventData {
|
4762
5118
|
/**
|
@@ -4780,7 +5136,7 @@ declare module "factorio:runtime" {
|
|
4780
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}.
|
4781
5137
|
*
|
4782
5138
|
* Event filter: [LuaScriptRaisedTeleportedEventFilter](LuaScriptRaisedTeleportedEventFilter]
|
4783
|
-
* @see {@link https://lua-api.factorio.com/2.0.
|
5139
|
+
* @see {@link https://lua-api.factorio.com/2.0.62/events.html#script_raised_teleported Online documentation}
|
4784
5140
|
*/
|
4785
5141
|
interface ScriptRaisedTeleportedEvent extends EventData {
|
4786
5142
|
/**
|