typed-factorio 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Changelog.md +28 -8
- package/README.md +14 -19
- package/custom-index-template.d.ts +1 -0
- package/generated/builtin-types.d.ts +24 -19
- package/generated/classes.d.ts +6382 -8710
- package/generated/concepts.d.ts +3110 -1937
- package/generated/defines.d.ts +126 -193
- package/generated/events.d.ts +250 -446
- package/generated/global-functions.d.ts +33 -0
- package/generated/global-objects.d.ts +7 -14
- package/package.json +22 -21
- package/runtime/index.d.ts +1 -0
- package/runtime/librariesAndFunctions.d.ts +0 -32
package/generated/events.d.ts
CHANGED
@@ -4,8 +4,7 @@
|
|
4
4
|
|
5
5
|
/**
|
6
6
|
* Called when a {@linkplain https://wiki.factorio.com/Prototype/CustomInput CustomInput} is activated.
|
7
|
-
*
|
8
|
-
* {@link https://lua-api.factorio.com/latest/events.html#CustomInputEvent View documentation}
|
7
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#CustomInputEvent Online documentation}
|
9
8
|
*/
|
10
9
|
interface CustomInputEvent extends EventData {
|
11
10
|
/**
|
@@ -19,7 +18,7 @@ interface CustomInputEvent extends EventData {
|
|
19
18
|
/**
|
20
19
|
* The mouse cursor position when the custom input was activated.
|
21
20
|
*/
|
22
|
-
readonly cursor_position:
|
21
|
+
readonly cursor_position: MapPosition
|
23
22
|
/**
|
24
23
|
* 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.
|
25
24
|
*/
|
@@ -36,8 +35,7 @@ interface CustomInputEvent extends EventData {
|
|
36
35
|
|
37
36
|
/**
|
38
37
|
* Called when a unit/group completes a command.
|
39
|
-
*
|
40
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_ai_command_completed View documentation}
|
38
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_ai_command_completed Online documentation}
|
41
39
|
*/
|
42
40
|
interface OnAiCommandCompletedEvent extends EventData {
|
43
41
|
/**
|
@@ -61,14 +59,13 @@ interface OnAiCommandCompletedEvent extends EventData {
|
|
61
59
|
|
62
60
|
/**
|
63
61
|
* Called when an area of the map is cloned.
|
64
|
-
*
|
65
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_area_cloned View documentation}
|
62
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_area_cloned Online documentation}
|
66
63
|
*/
|
67
64
|
interface OnAreaClonedEvent extends EventData {
|
68
65
|
readonly source_surface: LuaSurface
|
69
|
-
readonly source_area:
|
66
|
+
readonly source_area: BoundingBox
|
70
67
|
readonly destination_surface: LuaSurface
|
71
|
-
readonly destination_area:
|
68
|
+
readonly destination_area: BoundingBox
|
72
69
|
readonly destination_force?: LuaForce
|
73
70
|
readonly clone_tiles: boolean
|
74
71
|
readonly clone_entities: boolean
|
@@ -87,12 +84,8 @@ interface OnAreaClonedEvent extends EventData {
|
|
87
84
|
|
88
85
|
/**
|
89
86
|
* Called when a biter migration builds a base.
|
90
|
-
*
|
91
|
-
*
|
92
|
-
*
|
93
|
-
* This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
94
|
-
*
|
95
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_biter_base_built View documentation}
|
87
|
+
* @remarks This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
88
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_biter_base_built Online documentation}
|
96
89
|
*/
|
97
90
|
interface OnBiterBaseBuiltEvent extends EventData {
|
98
91
|
/**
|
@@ -111,14 +104,13 @@ interface OnBiterBaseBuiltEvent extends EventData {
|
|
111
104
|
|
112
105
|
/**
|
113
106
|
* Called when a set of positions on the map is cloned.
|
114
|
-
*
|
115
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_brush_cloned View documentation}
|
107
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_brush_cloned Online documentation}
|
116
108
|
*/
|
117
109
|
interface OnBrushClonedEvent extends EventData {
|
118
|
-
readonly source_offset:
|
119
|
-
readonly destination_offset:
|
110
|
+
readonly source_offset: TilePosition
|
111
|
+
readonly destination_offset: TilePosition
|
120
112
|
readonly source_surface: LuaSurface
|
121
|
-
readonly source_positions:
|
113
|
+
readonly source_positions: TilePosition[]
|
122
114
|
readonly destination_surface: LuaSurface
|
123
115
|
readonly destination_force?: LuaForce
|
124
116
|
readonly clone_tiles: boolean
|
@@ -138,8 +130,7 @@ interface OnBrushClonedEvent extends EventData {
|
|
138
130
|
|
139
131
|
/**
|
140
132
|
* Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
|
141
|
-
*
|
142
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_build_base_arrived View documentation}
|
133
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_build_base_arrived Online documentation}
|
143
134
|
*/
|
144
135
|
interface OnBuildBaseArrivedEvent extends EventData {
|
145
136
|
/**
|
@@ -162,8 +153,7 @@ interface OnBuildBaseArrivedEvent extends EventData {
|
|
162
153
|
|
163
154
|
/**
|
164
155
|
* Called when player builds something. Can be filtered using {@link LuaPlayerBuiltEntityEventFilter}.
|
165
|
-
*
|
166
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_built_entity View documentation}
|
156
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_built_entity Online documentation}
|
167
157
|
*/
|
168
158
|
interface OnBuiltEntityEvent extends EventData {
|
169
159
|
readonly created_entity: LuaEntity
|
@@ -189,8 +179,7 @@ interface OnBuiltEntityEvent extends EventData {
|
|
189
179
|
|
190
180
|
/**
|
191
181
|
* Called when the deconstruction of an entity is canceled. Can be filtered using {@link LuaEntityDeconstructionCancelledEventFilter}.
|
192
|
-
*
|
193
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction View documentation}
|
182
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction Online documentation}
|
194
183
|
*/
|
195
184
|
interface OnCancelledDeconstructionEvent extends EventData {
|
196
185
|
readonly entity: LuaEntity
|
@@ -207,8 +196,7 @@ interface OnCancelledDeconstructionEvent extends EventData {
|
|
207
196
|
|
208
197
|
/**
|
209
198
|
* Called when the upgrade of an entity is canceled. Can be filtered using {@link LuaUpgradeCancelledEventFilter}.
|
210
|
-
*
|
211
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade View documentation}
|
199
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade Online documentation}
|
212
200
|
*/
|
213
201
|
interface OnCancelledUpgradeEvent extends EventData {
|
214
202
|
readonly entity: LuaEntity
|
@@ -225,12 +213,8 @@ interface OnCancelledUpgradeEvent extends EventData {
|
|
225
213
|
|
226
214
|
/**
|
227
215
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
228
|
-
*
|
229
|
-
*
|
230
|
-
*
|
231
|
-
* this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
232
|
-
*
|
233
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired View documentation}
|
216
|
+
* @remarks this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
217
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired Online documentation}
|
234
218
|
*/
|
235
219
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
236
220
|
/**
|
@@ -249,8 +233,7 @@ interface OnCharacterCorpseExpiredEvent extends EventData {
|
|
249
233
|
|
250
234
|
/**
|
251
235
|
* Called when a chart tag is created.
|
252
|
-
*
|
253
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_chart_tag_added View documentation}
|
236
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_chart_tag_added Online documentation}
|
254
237
|
*/
|
255
238
|
interface OnChartTagAddedEvent extends EventData {
|
256
239
|
readonly tag: LuaCustomChartTag
|
@@ -268,8 +251,7 @@ interface OnChartTagAddedEvent extends EventData {
|
|
268
251
|
|
269
252
|
/**
|
270
253
|
* Called when a chart tag is modified by a player.
|
271
|
-
*
|
272
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified View documentation}
|
254
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified Online documentation}
|
273
255
|
*/
|
274
256
|
interface OnChartTagModifiedEvent extends EventData {
|
275
257
|
readonly tag: LuaCustomChartTag
|
@@ -290,8 +272,7 @@ interface OnChartTagModifiedEvent extends EventData {
|
|
290
272
|
|
291
273
|
/**
|
292
274
|
* Called just before a chart tag is deleted.
|
293
|
-
*
|
294
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed View documentation}
|
275
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed Online documentation}
|
295
276
|
*/
|
296
277
|
interface OnChartTagRemovedEvent extends EventData {
|
297
278
|
readonly tag: LuaCustomChartTag
|
@@ -309,16 +290,15 @@ interface OnChartTagRemovedEvent extends EventData {
|
|
309
290
|
|
310
291
|
/**
|
311
292
|
* Called when a chunk is charted or re-charted.
|
312
|
-
*
|
313
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_chunk_charted View documentation}
|
293
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_chunk_charted Online documentation}
|
314
294
|
*/
|
315
295
|
interface OnChunkChartedEvent extends EventData {
|
316
296
|
readonly surface_index: SurfaceIndex
|
317
|
-
readonly position:
|
297
|
+
readonly position: ChunkPosition
|
318
298
|
/**
|
319
299
|
* Area of the chunk.
|
320
300
|
*/
|
321
|
-
readonly area:
|
301
|
+
readonly area: BoundingBox
|
322
302
|
readonly force: LuaForce
|
323
303
|
/**
|
324
304
|
* Identifier of the event
|
@@ -332,15 +312,14 @@ interface OnChunkChartedEvent extends EventData {
|
|
332
312
|
|
333
313
|
/**
|
334
314
|
* Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
335
|
-
*
|
336
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_chunk_deleted View documentation}
|
315
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_chunk_deleted Online documentation}
|
337
316
|
*/
|
338
317
|
interface OnChunkDeletedEvent extends EventData {
|
339
318
|
readonly surface_index: SurfaceIndex
|
340
319
|
/**
|
341
320
|
* The chunks deleted.
|
342
321
|
*/
|
343
|
-
readonly positions:
|
322
|
+
readonly positions: ChunkPosition[]
|
344
323
|
/**
|
345
324
|
* Identifier of the event
|
346
325
|
*/
|
@@ -353,18 +332,17 @@ interface OnChunkDeletedEvent extends EventData {
|
|
353
332
|
|
354
333
|
/**
|
355
334
|
* Called when a chunk is generated.
|
356
|
-
*
|
357
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_chunk_generated View documentation}
|
335
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_chunk_generated Online documentation}
|
358
336
|
*/
|
359
337
|
interface OnChunkGeneratedEvent extends EventData {
|
360
338
|
/**
|
361
339
|
* Area of the chunk.
|
362
340
|
*/
|
363
|
-
readonly area:
|
341
|
+
readonly area: BoundingBox
|
364
342
|
/**
|
365
343
|
* Position of the chunk.
|
366
344
|
*/
|
367
|
-
readonly position:
|
345
|
+
readonly position: ChunkPosition
|
368
346
|
/**
|
369
347
|
* The surface the chunk is on.
|
370
348
|
*/
|
@@ -381,8 +359,7 @@ interface OnChunkGeneratedEvent extends EventData {
|
|
381
359
|
|
382
360
|
/**
|
383
361
|
* Called when a combat robot expires through a lack of energy, or timeout.
|
384
|
-
*
|
385
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired View documentation}
|
362
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired Online documentation}
|
386
363
|
*/
|
387
364
|
interface OnCombatRobotExpiredEvent extends EventData {
|
388
365
|
readonly robot: LuaEntity
|
@@ -402,12 +379,8 @@ interface OnCombatRobotExpiredEvent extends EventData {
|
|
402
379
|
|
403
380
|
/**
|
404
381
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
405
|
-
*
|
406
|
-
*
|
407
|
-
*
|
408
|
-
* This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
409
|
-
*
|
410
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_console_chat View documentation}
|
382
|
+
* @remarks This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
383
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_console_chat Online documentation}
|
411
384
|
*/
|
412
385
|
interface OnConsoleChatEvent extends EventData {
|
413
386
|
/**
|
@@ -430,8 +403,7 @@ interface OnConsoleChatEvent extends EventData {
|
|
430
403
|
|
431
404
|
/**
|
432
405
|
* Called when someone enters a command-like message regardless of it being a valid command.
|
433
|
-
*
|
434
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_console_command View documentation}
|
406
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_console_command Online documentation}
|
435
407
|
*/
|
436
408
|
interface OnConsoleCommandEvent extends EventData {
|
437
409
|
/**
|
@@ -458,8 +430,7 @@ interface OnConsoleCommandEvent extends EventData {
|
|
458
430
|
|
459
431
|
/**
|
460
432
|
* Called when a cutscene is cancelled by the player or by script.
|
461
|
-
*
|
462
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled View documentation}
|
433
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled Online documentation}
|
463
434
|
*/
|
464
435
|
interface OnCutsceneCancelledEvent extends EventData {
|
465
436
|
/**
|
@@ -480,12 +451,8 @@ interface OnCutsceneCancelledEvent extends EventData {
|
|
480
451
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
481
452
|
*
|
482
453
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
483
|
-
*
|
484
|
-
*
|
485
|
-
*
|
486
|
-
* Due to implementation omission, waypoint_index is 0-based.
|
487
|
-
*
|
488
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached View documentation}
|
454
|
+
* @remarks Due to implementation omission, waypoint_index is 0-based.
|
455
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached Online documentation}
|
489
456
|
*/
|
490
457
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
491
458
|
/**
|
@@ -508,12 +475,8 @@ interface OnCutsceneWaypointReachedEvent extends EventData {
|
|
508
475
|
|
509
476
|
/**
|
510
477
|
* Called when the map difficulty settings are changed.
|
511
|
-
*
|
512
|
-
*
|
513
|
-
*
|
514
|
-
* It's not guaranteed that both settings are changed - just that at least one has been changed.
|
515
|
-
*
|
516
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed View documentation}
|
478
|
+
* @remarks It's not guaranteed that both settings are changed - just that at least one has been changed.
|
479
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed Online documentation}
|
517
480
|
*/
|
518
481
|
interface OnDifficultySettingsChangedEvent extends EventData {
|
519
482
|
readonly old_recipe_difficulty: uint
|
@@ -530,8 +493,7 @@ interface OnDifficultySettingsChangedEvent extends EventData {
|
|
530
493
|
|
531
494
|
/**
|
532
495
|
* Called when an entity is cloned. Can be filtered for the source entity using {@link LuaEntityClonedEventFilter}.
|
533
|
-
*
|
534
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_cloned View documentation}
|
496
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_entity_cloned Online documentation}
|
535
497
|
*/
|
536
498
|
interface OnEntityClonedEvent extends EventData {
|
537
499
|
readonly source: LuaEntity
|
@@ -548,12 +510,8 @@ interface OnEntityClonedEvent extends EventData {
|
|
548
510
|
|
549
511
|
/**
|
550
512
|
* Called when an entity is damaged. Can be filtered using {@link LuaEntityDamagedEventFilter}.
|
551
|
-
*
|
552
|
-
*
|
553
|
-
*
|
554
|
-
* This is not called when an entities health is set directly by another mod.
|
555
|
-
*
|
556
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_damaged View documentation}
|
513
|
+
* @remarks This is not called when an entities health is set directly by another mod.
|
514
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_entity_damaged Online documentation}
|
557
515
|
*/
|
558
516
|
interface OnEntityDamagedEvent extends EventData {
|
559
517
|
readonly entity: LuaEntity
|
@@ -590,12 +548,8 @@ interface OnEntityDamagedEvent extends EventData {
|
|
590
548
|
|
591
549
|
/**
|
592
550
|
* Called after an entity is destroyed that has been registered with {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap::register_on_entity_destroyed}.
|
593
|
-
*
|
594
|
-
*
|
595
|
-
*
|
596
|
-
* Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.
|
597
|
-
*
|
598
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_destroyed View documentation}
|
551
|
+
* @remarks Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.
|
552
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_entity_destroyed Online documentation}
|
599
553
|
*/
|
600
554
|
interface OnEntityDestroyedEvent extends EventData {
|
601
555
|
/**
|
@@ -618,8 +572,7 @@ interface OnEntityDestroyedEvent extends EventData {
|
|
618
572
|
|
619
573
|
/**
|
620
574
|
* Called when an entity dies. Can be filtered using {@link LuaEntityDiedEventFilter}.
|
621
|
-
*
|
622
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_died View documentation}
|
575
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_entity_died Online documentation}
|
623
576
|
*/
|
624
577
|
interface OnEntityDiedEvent extends EventData {
|
625
578
|
/**
|
@@ -654,12 +607,8 @@ interface OnEntityDiedEvent extends EventData {
|
|
654
607
|
|
655
608
|
/**
|
656
609
|
* Called when one of an entity's personal logistic slots changes.
|
657
|
-
*
|
658
|
-
*
|
659
|
-
*
|
660
|
-
* "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
|
661
|
-
*
|
662
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed View documentation}
|
610
|
+
* @remarks "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
|
611
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed Online documentation}
|
663
612
|
*/
|
664
613
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
665
614
|
/**
|
@@ -686,8 +635,7 @@ interface OnEntityLogisticSlotChangedEvent extends EventData {
|
|
686
635
|
|
687
636
|
/**
|
688
637
|
* Called after an entity has been renamed either by the player or through script.
|
689
|
-
*
|
690
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_renamed View documentation}
|
638
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_entity_renamed Online documentation}
|
691
639
|
*/
|
692
640
|
interface OnEntityRenamedEvent extends EventData {
|
693
641
|
/**
|
@@ -709,8 +657,7 @@ interface OnEntityRenamedEvent extends EventData {
|
|
709
657
|
|
710
658
|
/**
|
711
659
|
* Called after entity copy-paste is done.
|
712
|
-
*
|
713
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted View documentation}
|
660
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted Online documentation}
|
714
661
|
*/
|
715
662
|
interface OnEntitySettingsPastedEvent extends EventData {
|
716
663
|
readonly player_index: PlayerIndex
|
@@ -734,8 +681,7 @@ interface OnEntitySettingsPastedEvent extends EventData {
|
|
734
681
|
|
735
682
|
/**
|
736
683
|
* Called when an entity is spawned by a EnemySpawner
|
737
|
-
*
|
738
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_spawned View documentation}
|
684
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_entity_spawned Online documentation}
|
739
685
|
*/
|
740
686
|
interface OnEntitySpawnedEvent extends EventData {
|
741
687
|
readonly spawner: LuaEntity
|
@@ -752,8 +698,7 @@ interface OnEntitySpawnedEvent extends EventData {
|
|
752
698
|
|
753
699
|
/**
|
754
700
|
* Called after equipment is inserted into an equipment grid.
|
755
|
-
*
|
756
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_equipment_inserted View documentation}
|
701
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_equipment_inserted Online documentation}
|
757
702
|
*/
|
758
703
|
interface OnEquipmentInsertedEvent extends EventData {
|
759
704
|
/**
|
@@ -776,8 +721,7 @@ interface OnEquipmentInsertedEvent extends EventData {
|
|
776
721
|
|
777
722
|
/**
|
778
723
|
* Called after equipment is removed from an equipment grid.
|
779
|
-
*
|
780
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_equipment_removed View documentation}
|
724
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_equipment_removed Online documentation}
|
781
725
|
*/
|
782
726
|
interface OnEquipmentRemovedEvent extends EventData {
|
783
727
|
/**
|
@@ -804,8 +748,7 @@ interface OnEquipmentRemovedEvent extends EventData {
|
|
804
748
|
|
805
749
|
/**
|
806
750
|
* Called when the a forces cease fire values change.
|
807
|
-
*
|
808
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed View documentation}
|
751
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed Online documentation}
|
809
752
|
*/
|
810
753
|
interface OnForceCeaseFireChangedEvent extends EventData {
|
811
754
|
/**
|
@@ -832,12 +775,8 @@ interface OnForceCeaseFireChangedEvent extends EventData {
|
|
832
775
|
|
833
776
|
/**
|
834
777
|
* Called when a new force is created using `game.create_force()`
|
835
|
-
*
|
836
|
-
*
|
837
|
-
*
|
838
|
-
* This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
839
|
-
*
|
840
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_force_created View documentation}
|
778
|
+
* @remarks This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
779
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_force_created Online documentation}
|
841
780
|
*/
|
842
781
|
interface OnForceCreatedEvent extends EventData {
|
843
782
|
/**
|
@@ -856,8 +795,7 @@ interface OnForceCreatedEvent extends EventData {
|
|
856
795
|
|
857
796
|
/**
|
858
797
|
* Called when the a forces friends change.
|
859
|
-
*
|
860
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_force_friends_changed View documentation}
|
798
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_force_friends_changed Online documentation}
|
861
799
|
*/
|
862
800
|
interface OnForceFriendsChangedEvent extends EventData {
|
863
801
|
/**
|
@@ -884,8 +822,7 @@ interface OnForceFriendsChangedEvent extends EventData {
|
|
884
822
|
|
885
823
|
/**
|
886
824
|
* Called when {@link LuaForce#reset LuaForce::reset} is finished.
|
887
|
-
*
|
888
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_force_reset View documentation}
|
825
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_force_reset Online documentation}
|
889
826
|
*/
|
890
827
|
interface OnForceResetEvent extends EventData {
|
891
828
|
readonly force: LuaForce
|
@@ -901,12 +838,8 @@ interface OnForceResetEvent extends EventData {
|
|
901
838
|
|
902
839
|
/**
|
903
840
|
* Called after two forces have been merged using `game.merge_forces()`.
|
904
|
-
*
|
905
|
-
*
|
906
|
-
*
|
907
|
-
* The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
908
|
-
*
|
909
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_forces_merged View documentation}
|
841
|
+
* @remarks The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
842
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_forces_merged Online documentation}
|
910
843
|
*/
|
911
844
|
interface OnForcesMergedEvent extends EventData {
|
912
845
|
/**
|
@@ -933,8 +866,7 @@ interface OnForcesMergedEvent extends EventData {
|
|
933
866
|
|
934
867
|
/**
|
935
868
|
* Called when two forces are about to be merged using `game.merge_forces()`.
|
936
|
-
*
|
937
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_forces_merging View documentation}
|
869
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_forces_merging Online documentation}
|
938
870
|
*/
|
939
871
|
interface OnForcesMergingEvent extends EventData {
|
940
872
|
/**
|
@@ -957,12 +889,8 @@ interface OnForcesMergingEvent extends EventData {
|
|
957
889
|
|
958
890
|
/**
|
959
891
|
* 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.
|
960
|
-
*
|
961
|
-
*
|
962
|
-
*
|
963
|
-
* This event is not fired when the scenario is loaded via the map editor.
|
964
|
-
*
|
965
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario View documentation}
|
892
|
+
* @remarks This event is not fired when the scenario is loaded via the map editor.
|
893
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario Online documentation}
|
966
894
|
*/
|
967
895
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
968
896
|
/**
|
@@ -977,8 +905,7 @@ interface OnGameCreatedFromScenarioEvent extends EventData {
|
|
977
905
|
|
978
906
|
/**
|
979
907
|
* Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
|
980
|
-
*
|
981
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed View documentation}
|
908
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed Online documentation}
|
982
909
|
*/
|
983
910
|
interface OnGuiCheckedStateChangedEvent extends EventData {
|
984
911
|
/**
|
@@ -1001,8 +928,7 @@ interface OnGuiCheckedStateChangedEvent extends EventData {
|
|
1001
928
|
|
1002
929
|
/**
|
1003
930
|
* Called when {@link LuaGuiElement} is clicked.
|
1004
|
-
*
|
1005
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_click View documentation}
|
931
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_click Online documentation}
|
1006
932
|
*/
|
1007
933
|
interface OnGuiClickEvent extends EventData {
|
1008
934
|
/**
|
@@ -1043,12 +969,8 @@ interface OnGuiClickEvent extends EventData {
|
|
1043
969
|
* Called when the player closes the GUI they have open.
|
1044
970
|
*
|
1045
971
|
* 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.
|
1046
|
-
*
|
1047
|
-
*
|
1048
|
-
*
|
1049
|
-
* 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.
|
1050
|
-
*
|
1051
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_closed View documentation}
|
972
|
+
* @remarks 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.
|
973
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_closed Online documentation}
|
1052
974
|
*/
|
1053
975
|
interface OnGuiClosedEvent extends EventData {
|
1054
976
|
/**
|
@@ -1086,7 +1008,11 @@ interface OnGuiClosedEvent extends EventData {
|
|
1086
1008
|
/**
|
1087
1009
|
* The tile position that was open
|
1088
1010
|
*/
|
1089
|
-
readonly tile_position?:
|
1011
|
+
readonly tile_position?: TilePosition
|
1012
|
+
/**
|
1013
|
+
* The script inventory that was open
|
1014
|
+
*/
|
1015
|
+
readonly inventory?: LuaInventory
|
1090
1016
|
/**
|
1091
1017
|
* Identifier of the event
|
1092
1018
|
*/
|
@@ -1099,8 +1025,7 @@ interface OnGuiClosedEvent extends EventData {
|
|
1099
1025
|
|
1100
1026
|
/**
|
1101
1027
|
* Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
|
1102
|
-
*
|
1103
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_confirmed View documentation}
|
1028
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_confirmed Online documentation}
|
1104
1029
|
*/
|
1105
1030
|
interface OnGuiConfirmedEvent extends EventData {
|
1106
1031
|
/**
|
@@ -1135,8 +1060,7 @@ interface OnGuiConfirmedEvent extends EventData {
|
|
1135
1060
|
|
1136
1061
|
/**
|
1137
1062
|
* Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
|
1138
|
-
*
|
1139
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed View documentation}
|
1063
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed Online documentation}
|
1140
1064
|
*/
|
1141
1065
|
interface OnGuiElemChangedEvent extends EventData {
|
1142
1066
|
/**
|
@@ -1159,8 +1083,7 @@ interface OnGuiElemChangedEvent extends EventData {
|
|
1159
1083
|
|
1160
1084
|
/**
|
1161
1085
|
* Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
|
1162
|
-
*
|
1163
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_location_changed View documentation}
|
1086
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_location_changed Online documentation}
|
1164
1087
|
*/
|
1165
1088
|
interface OnGuiLocationChangedEvent extends EventData {
|
1166
1089
|
/**
|
@@ -1183,8 +1106,7 @@ interface OnGuiLocationChangedEvent extends EventData {
|
|
1183
1106
|
|
1184
1107
|
/**
|
1185
1108
|
* Called when the player opens a GUI.
|
1186
|
-
*
|
1187
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_opened View documentation}
|
1109
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_opened Online documentation}
|
1188
1110
|
*/
|
1189
1111
|
interface OnGuiOpenedEvent extends EventData {
|
1190
1112
|
/**
|
@@ -1215,6 +1137,10 @@ interface OnGuiOpenedEvent extends EventData {
|
|
1215
1137
|
* The custom GUI element that was opened
|
1216
1138
|
*/
|
1217
1139
|
readonly element?: LuaGuiElement
|
1140
|
+
/**
|
1141
|
+
* The script inventory that was opened
|
1142
|
+
*/
|
1143
|
+
readonly inventory?: LuaInventory
|
1218
1144
|
/**
|
1219
1145
|
* Identifier of the event
|
1220
1146
|
*/
|
@@ -1227,8 +1153,7 @@ interface OnGuiOpenedEvent extends EventData {
|
|
1227
1153
|
|
1228
1154
|
/**
|
1229
1155
|
* Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
|
1230
|
-
*
|
1231
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed View documentation}
|
1156
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed Online documentation}
|
1232
1157
|
*/
|
1233
1158
|
interface OnGuiSelectedTabChangedEvent extends EventData {
|
1234
1159
|
/**
|
@@ -1251,8 +1176,7 @@ interface OnGuiSelectedTabChangedEvent extends EventData {
|
|
1251
1176
|
|
1252
1177
|
/**
|
1253
1178
|
* Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
|
1254
|
-
*
|
1255
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed View documentation}
|
1179
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed Online documentation}
|
1256
1180
|
*/
|
1257
1181
|
interface OnGuiSelectionStateChangedEvent extends EventData {
|
1258
1182
|
/**
|
@@ -1275,8 +1199,7 @@ interface OnGuiSelectionStateChangedEvent extends EventData {
|
|
1275
1199
|
|
1276
1200
|
/**
|
1277
1201
|
* Called when {@link LuaGuiElement} switch state is changed (related to switches).
|
1278
|
-
*
|
1279
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed View documentation}
|
1202
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed Online documentation}
|
1280
1203
|
*/
|
1281
1204
|
interface OnGuiSwitchStateChangedEvent extends EventData {
|
1282
1205
|
/**
|
@@ -1299,8 +1222,7 @@ interface OnGuiSwitchStateChangedEvent extends EventData {
|
|
1299
1222
|
|
1300
1223
|
/**
|
1301
1224
|
* Called when {@link LuaGuiElement} text is changed by the player.
|
1302
|
-
*
|
1303
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_text_changed View documentation}
|
1225
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_text_changed Online documentation}
|
1304
1226
|
*/
|
1305
1227
|
interface OnGuiTextChangedEvent extends EventData {
|
1306
1228
|
/**
|
@@ -1327,8 +1249,7 @@ interface OnGuiTextChangedEvent extends EventData {
|
|
1327
1249
|
|
1328
1250
|
/**
|
1329
1251
|
* Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
|
1330
|
-
*
|
1331
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_value_changed View documentation}
|
1252
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_gui_value_changed Online documentation}
|
1332
1253
|
*/
|
1333
1254
|
interface OnGuiValueChangedEvent extends EventData {
|
1334
1255
|
/**
|
@@ -1351,8 +1272,7 @@ interface OnGuiValueChangedEvent extends EventData {
|
|
1351
1272
|
|
1352
1273
|
/**
|
1353
1274
|
* Called when a land mine is armed.
|
1354
|
-
*
|
1355
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_land_mine_armed View documentation}
|
1275
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_land_mine_armed Online documentation}
|
1356
1276
|
*/
|
1357
1277
|
interface OnLandMineArmedEvent extends EventData {
|
1358
1278
|
readonly mine: LuaEntity
|
@@ -1368,8 +1288,7 @@ interface OnLandMineArmedEvent extends EventData {
|
|
1368
1288
|
|
1369
1289
|
/**
|
1370
1290
|
* Called when a custom Lua shortcut is pressed.
|
1371
|
-
*
|
1372
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_lua_shortcut View documentation}
|
1291
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_lua_shortcut Online documentation}
|
1373
1292
|
*/
|
1374
1293
|
interface OnLuaShortcutEvent extends EventData {
|
1375
1294
|
readonly player_index: PlayerIndex
|
@@ -1389,8 +1308,7 @@ interface OnLuaShortcutEvent extends EventData {
|
|
1389
1308
|
|
1390
1309
|
/**
|
1391
1310
|
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script. Can be filtered using {@link LuaEntityMarkedForDeconstructionEventFilter}.
|
1392
|
-
*
|
1393
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction View documentation}
|
1311
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction Online documentation}
|
1394
1312
|
*/
|
1395
1313
|
interface OnMarkedForDeconstructionEvent extends EventData {
|
1396
1314
|
readonly entity: LuaEntity
|
@@ -1407,8 +1325,7 @@ interface OnMarkedForDeconstructionEvent extends EventData {
|
|
1407
1325
|
|
1408
1326
|
/**
|
1409
1327
|
* Called when an entity is marked for upgrade with the Upgrade planner or via script. Can be filtered using {@link LuaEntityMarkedForUpgradeEventFilter}.
|
1410
|
-
*
|
1411
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade View documentation}
|
1328
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade Online documentation}
|
1412
1329
|
*/
|
1413
1330
|
interface OnMarkedForUpgradeEvent extends EventData {
|
1414
1331
|
readonly entity: LuaEntity
|
@@ -1430,8 +1347,7 @@ interface OnMarkedForUpgradeEvent extends EventData {
|
|
1430
1347
|
|
1431
1348
|
/**
|
1432
1349
|
* Called after a player purchases some offer from a `market` entity.
|
1433
|
-
*
|
1434
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_market_item_purchased View documentation}
|
1350
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_market_item_purchased Online documentation}
|
1435
1351
|
*/
|
1436
1352
|
interface OnMarketItemPurchasedEvent extends EventData {
|
1437
1353
|
/**
|
@@ -1462,8 +1378,7 @@ interface OnMarketItemPurchasedEvent extends EventData {
|
|
1462
1378
|
|
1463
1379
|
/**
|
1464
1380
|
* Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
|
1465
|
-
*
|
1466
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_mod_item_opened View documentation}
|
1381
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_mod_item_opened Online documentation}
|
1467
1382
|
*/
|
1468
1383
|
interface OnModItemOpenedEvent extends EventData {
|
1469
1384
|
/**
|
@@ -1486,8 +1401,7 @@ interface OnModItemOpenedEvent extends EventData {
|
|
1486
1401
|
|
1487
1402
|
/**
|
1488
1403
|
* Called directly after a permission group is added.
|
1489
|
-
*
|
1490
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_added View documentation}
|
1404
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_added Online documentation}
|
1491
1405
|
*/
|
1492
1406
|
interface OnPermissionGroupAddedEvent extends EventData {
|
1493
1407
|
/**
|
@@ -1510,8 +1424,7 @@ interface OnPermissionGroupAddedEvent extends EventData {
|
|
1510
1424
|
|
1511
1425
|
/**
|
1512
1426
|
* Called directly after a permission group is deleted.
|
1513
|
-
*
|
1514
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted View documentation}
|
1427
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted Online documentation}
|
1515
1428
|
*/
|
1516
1429
|
interface OnPermissionGroupDeletedEvent extends EventData {
|
1517
1430
|
/**
|
@@ -1538,8 +1451,7 @@ interface OnPermissionGroupDeletedEvent extends EventData {
|
|
1538
1451
|
|
1539
1452
|
/**
|
1540
1453
|
* Called directly after a permission group is edited in some way.
|
1541
|
-
*
|
1542
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_edited View documentation}
|
1454
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_edited Online documentation}
|
1543
1455
|
*/
|
1544
1456
|
interface OnPermissionGroupEditedEvent extends EventData {
|
1545
1457
|
/**
|
@@ -1589,8 +1501,7 @@ interface OnPermissionGroupEditedEvent extends EventData {
|
|
1589
1501
|
|
1590
1502
|
/**
|
1591
1503
|
* Called directly after a permission string is imported.
|
1592
|
-
*
|
1593
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_permission_string_imported View documentation}
|
1504
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_permission_string_imported Online documentation}
|
1594
1505
|
*/
|
1595
1506
|
interface OnPermissionStringImportedEvent extends EventData {
|
1596
1507
|
/**
|
@@ -1609,8 +1520,7 @@ interface OnPermissionStringImportedEvent extends EventData {
|
|
1609
1520
|
|
1610
1521
|
/**
|
1611
1522
|
* Called when a player picks up an item.
|
1612
|
-
*
|
1613
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_picked_up_item View documentation}
|
1523
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_picked_up_item Online documentation}
|
1614
1524
|
*/
|
1615
1525
|
interface OnPickedUpItemEvent extends EventData {
|
1616
1526
|
readonly item_stack: SimpleItemStack
|
@@ -1627,8 +1537,7 @@ interface OnPickedUpItemEvent extends EventData {
|
|
1627
1537
|
|
1628
1538
|
/**
|
1629
1539
|
* Called after a player alt-selects an area with a selection-tool item.
|
1630
|
-
*
|
1631
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area View documentation}
|
1540
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area Online documentation}
|
1632
1541
|
*/
|
1633
1542
|
interface OnPlayerAltSelectedAreaEvent extends EventData {
|
1634
1543
|
/**
|
@@ -1642,7 +1551,7 @@ interface OnPlayerAltSelectedAreaEvent extends EventData {
|
|
1642
1551
|
/**
|
1643
1552
|
* The area selected.
|
1644
1553
|
*/
|
1645
|
-
readonly area:
|
1554
|
+
readonly area: BoundingBox
|
1646
1555
|
/**
|
1647
1556
|
* The item used to select the area.
|
1648
1557
|
*/
|
@@ -1667,8 +1576,7 @@ interface OnPlayerAltSelectedAreaEvent extends EventData {
|
|
1667
1576
|
|
1668
1577
|
/**
|
1669
1578
|
* Called after a players ammo inventory changed in some way.
|
1670
|
-
*
|
1671
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed View documentation}
|
1579
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed Online documentation}
|
1672
1580
|
*/
|
1673
1581
|
interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
1674
1582
|
readonly player_index: PlayerIndex
|
@@ -1684,8 +1592,7 @@ interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
|
1684
1592
|
|
1685
1593
|
/**
|
1686
1594
|
* Called after a players armor inventory changed in some way.
|
1687
|
-
*
|
1688
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed View documentation}
|
1595
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed Online documentation}
|
1689
1596
|
*/
|
1690
1597
|
interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
1691
1598
|
readonly player_index: PlayerIndex
|
@@ -1701,8 +1608,7 @@ interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
|
1701
1608
|
|
1702
1609
|
/**
|
1703
1610
|
* Called when a player is banned.
|
1704
|
-
*
|
1705
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_banned View documentation}
|
1611
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_banned Online documentation}
|
1706
1612
|
*/
|
1707
1613
|
interface OnPlayerBannedEvent extends EventData {
|
1708
1614
|
/**
|
@@ -1733,8 +1639,7 @@ interface OnPlayerBannedEvent extends EventData {
|
|
1733
1639
|
|
1734
1640
|
/**
|
1735
1641
|
* Called after a player builds tiles.
|
1736
|
-
*
|
1737
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_built_tile View documentation}
|
1642
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_built_tile Online documentation}
|
1738
1643
|
*/
|
1739
1644
|
interface OnPlayerBuiltTileEvent extends EventData {
|
1740
1645
|
readonly player_index: PlayerIndex
|
@@ -1770,8 +1675,7 @@ interface OnPlayerBuiltTileEvent extends EventData {
|
|
1770
1675
|
|
1771
1676
|
/**
|
1772
1677
|
* Called when a player cancels crafting.
|
1773
|
-
*
|
1774
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting View documentation}
|
1678
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting Online documentation}
|
1775
1679
|
*/
|
1776
1680
|
interface OnPlayerCancelledCraftingEvent extends EventData {
|
1777
1681
|
/**
|
@@ -1802,8 +1706,7 @@ interface OnPlayerCancelledCraftingEvent extends EventData {
|
|
1802
1706
|
|
1803
1707
|
/**
|
1804
1708
|
* Called after a player changes forces.
|
1805
|
-
*
|
1806
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_force View documentation}
|
1709
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_force Online documentation}
|
1807
1710
|
*/
|
1808
1711
|
interface OnPlayerChangedForceEvent extends EventData {
|
1809
1712
|
/**
|
@@ -1826,8 +1729,7 @@ interface OnPlayerChangedForceEvent extends EventData {
|
|
1826
1729
|
|
1827
1730
|
/**
|
1828
1731
|
* Called when the tile position a player is located at changes.
|
1829
|
-
*
|
1830
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_position View documentation}
|
1732
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_position Online documentation}
|
1831
1733
|
*/
|
1832
1734
|
interface OnPlayerChangedPositionEvent extends EventData {
|
1833
1735
|
/**
|
@@ -1846,12 +1748,8 @@ interface OnPlayerChangedPositionEvent extends EventData {
|
|
1846
1748
|
|
1847
1749
|
/**
|
1848
1750
|
* Called after a player changes surfaces.
|
1849
|
-
*
|
1850
|
-
*
|
1851
|
-
*
|
1852
|
-
* In the instance a player is moved off a surface due to it being deleted this is not called.
|
1853
|
-
*
|
1854
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_surface View documentation}
|
1751
|
+
* @remarks In the instance a player is moved off a surface due to it being deleted this is not called.
|
1752
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_surface Online documentation}
|
1855
1753
|
*/
|
1856
1754
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
1857
1755
|
/**
|
@@ -1874,8 +1772,7 @@ interface OnPlayerChangedSurfaceEvent extends EventData {
|
|
1874
1772
|
|
1875
1773
|
/**
|
1876
1774
|
* Called when cheat mode is disabled on a player.
|
1877
|
-
*
|
1878
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled View documentation}
|
1775
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled Online documentation}
|
1879
1776
|
*/
|
1880
1777
|
interface OnPlayerCheatModeDisabledEvent extends EventData {
|
1881
1778
|
/**
|
@@ -1894,8 +1791,7 @@ interface OnPlayerCheatModeDisabledEvent extends EventData {
|
|
1894
1791
|
|
1895
1792
|
/**
|
1896
1793
|
* Called when cheat mode is enabled on a player.
|
1897
|
-
*
|
1898
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled View documentation}
|
1794
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled Online documentation}
|
1899
1795
|
*/
|
1900
1796
|
interface OnPlayerCheatModeEnabledEvent extends EventData {
|
1901
1797
|
/**
|
@@ -1914,8 +1810,7 @@ interface OnPlayerCheatModeEnabledEvent extends EventData {
|
|
1914
1810
|
|
1915
1811
|
/**
|
1916
1812
|
* Called when a player clicks a gps tag
|
1917
|
-
*
|
1918
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag View documentation}
|
1813
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag Online documentation}
|
1919
1814
|
*/
|
1920
1815
|
interface OnPlayerClickedGpsTagEvent extends EventData {
|
1921
1816
|
/**
|
@@ -1925,7 +1820,7 @@ interface OnPlayerClickedGpsTagEvent extends EventData {
|
|
1925
1820
|
/**
|
1926
1821
|
* Map position contained in gps tag
|
1927
1822
|
*/
|
1928
|
-
readonly position:
|
1823
|
+
readonly position: MapPosition
|
1929
1824
|
/**
|
1930
1825
|
* Surface name contained in gps tag, even when such surface does not exists
|
1931
1826
|
*/
|
@@ -1942,8 +1837,7 @@ interface OnPlayerClickedGpsTagEvent extends EventData {
|
|
1942
1837
|
|
1943
1838
|
/**
|
1944
1839
|
* Called when a player clicks the "confirm" button in the configure Blueprint GUI.
|
1945
|
-
*
|
1946
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint View documentation}
|
1840
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint Online documentation}
|
1947
1841
|
*/
|
1948
1842
|
interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
1949
1843
|
/**
|
@@ -1962,8 +1856,7 @@ interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
|
1962
1856
|
|
1963
1857
|
/**
|
1964
1858
|
* Called when a player configures spidertron remote to be connected with a given spidertron
|
1965
|
-
*
|
1966
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote View documentation}
|
1859
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote Online documentation}
|
1967
1860
|
*/
|
1968
1861
|
interface OnPlayerConfiguredSpiderRemoteEvent extends EventData {
|
1969
1862
|
/**
|
@@ -1986,8 +1879,7 @@ interface OnPlayerConfiguredSpiderRemoteEvent extends EventData {
|
|
1986
1879
|
|
1987
1880
|
/**
|
1988
1881
|
* 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}).
|
1989
|
-
*
|
1990
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_crafted_item View documentation}
|
1882
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_crafted_item Online documentation}
|
1991
1883
|
*/
|
1992
1884
|
interface OnPlayerCraftedItemEvent extends EventData {
|
1993
1885
|
/**
|
@@ -2014,8 +1906,7 @@ interface OnPlayerCraftedItemEvent extends EventData {
|
|
2014
1906
|
|
2015
1907
|
/**
|
2016
1908
|
* Called after the player was created.
|
2017
|
-
*
|
2018
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_created View documentation}
|
1909
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_created Online documentation}
|
2019
1910
|
*/
|
2020
1911
|
interface OnPlayerCreatedEvent extends EventData {
|
2021
1912
|
readonly player_index: PlayerIndex
|
@@ -2031,8 +1922,7 @@ interface OnPlayerCreatedEvent extends EventData {
|
|
2031
1922
|
|
2032
1923
|
/**
|
2033
1924
|
* Called after a players cursorstack changed in some way.
|
2034
|
-
*
|
2035
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed View documentation}
|
1925
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed Online documentation}
|
2036
1926
|
*/
|
2037
1927
|
interface OnPlayerCursorStackChangedEvent extends EventData {
|
2038
1928
|
readonly player_index: PlayerIndex
|
@@ -2048,8 +1938,7 @@ interface OnPlayerCursorStackChangedEvent extends EventData {
|
|
2048
1938
|
|
2049
1939
|
/**
|
2050
1940
|
* Called when a player selects an area with a deconstruction planner.
|
2051
|
-
*
|
2052
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area View documentation}
|
1941
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area Online documentation}
|
2053
1942
|
*/
|
2054
1943
|
interface OnPlayerDeconstructedAreaEvent extends EventData {
|
2055
1944
|
/**
|
@@ -2063,7 +1952,7 @@ interface OnPlayerDeconstructedAreaEvent extends EventData {
|
|
2063
1952
|
/**
|
2064
1953
|
* The area selected.
|
2065
1954
|
*/
|
2066
|
-
readonly area:
|
1955
|
+
readonly area: BoundingBox
|
2067
1956
|
/**
|
2068
1957
|
* The item used to select the area.
|
2069
1958
|
*/
|
@@ -2084,8 +1973,7 @@ interface OnPlayerDeconstructedAreaEvent extends EventData {
|
|
2084
1973
|
|
2085
1974
|
/**
|
2086
1975
|
* Called when a player is demoted.
|
2087
|
-
*
|
2088
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_demoted View documentation}
|
1976
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_demoted Online documentation}
|
2089
1977
|
*/
|
2090
1978
|
interface OnPlayerDemotedEvent extends EventData {
|
2091
1979
|
/**
|
@@ -2104,8 +1992,7 @@ interface OnPlayerDemotedEvent extends EventData {
|
|
2104
1992
|
|
2105
1993
|
/**
|
2106
1994
|
* Called after a player dies.
|
2107
|
-
*
|
2108
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_died View documentation}
|
1995
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_died Online documentation}
|
2109
1996
|
*/
|
2110
1997
|
interface OnPlayerDiedEvent extends EventData {
|
2111
1998
|
readonly player_index: PlayerIndex
|
@@ -2122,8 +2009,7 @@ interface OnPlayerDiedEvent extends EventData {
|
|
2122
2009
|
|
2123
2010
|
/**
|
2124
2011
|
* Called when the display resolution changes for a given player.
|
2125
|
-
*
|
2126
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed View documentation}
|
2012
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed Online documentation}
|
2127
2013
|
*/
|
2128
2014
|
interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
2129
2015
|
/**
|
@@ -2146,8 +2032,7 @@ interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
|
2146
2032
|
|
2147
2033
|
/**
|
2148
2034
|
* Called when the display scale changes for a given player.
|
2149
|
-
*
|
2150
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed View documentation}
|
2035
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed Online documentation}
|
2151
2036
|
*/
|
2152
2037
|
interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
2153
2038
|
/**
|
@@ -2170,8 +2055,7 @@ interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
|
2170
2055
|
|
2171
2056
|
/**
|
2172
2057
|
* Called when the player's driving state has changed, this means a player has either entered or left a vehicle.
|
2173
|
-
*
|
2174
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state View documentation}
|
2058
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state Online documentation}
|
2175
2059
|
*/
|
2176
2060
|
interface OnPlayerDrivingChangedStateEvent extends EventData {
|
2177
2061
|
readonly player_index: PlayerIndex
|
@@ -2191,8 +2075,7 @@ interface OnPlayerDrivingChangedStateEvent extends EventData {
|
|
2191
2075
|
|
2192
2076
|
/**
|
2193
2077
|
* Called when a player drops an item on the ground.
|
2194
|
-
*
|
2195
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_dropped_item View documentation}
|
2078
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_dropped_item Online documentation}
|
2196
2079
|
*/
|
2197
2080
|
interface OnPlayerDroppedItemEvent extends EventData {
|
2198
2081
|
readonly player_index: PlayerIndex
|
@@ -2212,8 +2095,7 @@ interface OnPlayerDroppedItemEvent extends EventData {
|
|
2212
2095
|
|
2213
2096
|
/**
|
2214
2097
|
* Called when a player fast-transfers something to or from an entity.
|
2215
|
-
*
|
2216
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred View documentation}
|
2098
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred Online documentation}
|
2217
2099
|
*/
|
2218
2100
|
interface OnPlayerFastTransferredEvent extends EventData {
|
2219
2101
|
/**
|
@@ -2240,8 +2122,7 @@ interface OnPlayerFastTransferredEvent extends EventData {
|
|
2240
2122
|
|
2241
2123
|
/**
|
2242
2124
|
* Called after player flushed fluid
|
2243
|
-
*
|
2244
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid View documentation}
|
2125
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid Online documentation}
|
2245
2126
|
*/
|
2246
2127
|
interface OnPlayerFlushedFluidEvent extends EventData {
|
2247
2128
|
/**
|
@@ -2276,8 +2157,7 @@ interface OnPlayerFlushedFluidEvent extends EventData {
|
|
2276
2157
|
|
2277
2158
|
/**
|
2278
2159
|
* Called after a players gun inventory changed in some way.
|
2279
|
-
*
|
2280
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed View documentation}
|
2160
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed Online documentation}
|
2281
2161
|
*/
|
2282
2162
|
interface OnPlayerGunInventoryChangedEvent extends EventData {
|
2283
2163
|
readonly player_index: PlayerIndex
|
@@ -2292,9 +2172,8 @@ interface OnPlayerGunInventoryChangedEvent extends EventData {
|
|
2292
2172
|
}
|
2293
2173
|
|
2294
2174
|
/**
|
2295
|
-
* Called after a player joins the game.
|
2296
|
-
*
|
2297
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_joined_game View documentation}
|
2175
|
+
* 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.
|
2176
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_joined_game Online documentation}
|
2298
2177
|
*/
|
2299
2178
|
interface OnPlayerJoinedGameEvent extends EventData {
|
2300
2179
|
readonly player_index: PlayerIndex
|
@@ -2310,8 +2189,7 @@ interface OnPlayerJoinedGameEvent extends EventData {
|
|
2310
2189
|
|
2311
2190
|
/**
|
2312
2191
|
* Called when a player is kicked.
|
2313
|
-
*
|
2314
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_kicked View documentation}
|
2192
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_kicked Online documentation}
|
2315
2193
|
*/
|
2316
2194
|
interface OnPlayerKickedEvent extends EventData {
|
2317
2195
|
/**
|
@@ -2337,9 +2215,8 @@ interface OnPlayerKickedEvent extends EventData {
|
|
2337
2215
|
}
|
2338
2216
|
|
2339
2217
|
/**
|
2340
|
-
* Called after a player leaves the game.
|
2341
|
-
*
|
2342
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_left_game View documentation}
|
2218
|
+
* 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.
|
2219
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_left_game Online documentation}
|
2343
2220
|
*/
|
2344
2221
|
interface OnPlayerLeftGameEvent extends EventData {
|
2345
2222
|
readonly player_index: PlayerIndex
|
@@ -2356,8 +2233,7 @@ interface OnPlayerLeftGameEvent extends EventData {
|
|
2356
2233
|
|
2357
2234
|
/**
|
2358
2235
|
* Called after a players main inventory changed in some way.
|
2359
|
-
*
|
2360
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed View documentation}
|
2236
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed Online documentation}
|
2361
2237
|
*/
|
2362
2238
|
interface OnPlayerMainInventoryChangedEvent extends EventData {
|
2363
2239
|
readonly player_index: PlayerIndex
|
@@ -2373,12 +2249,8 @@ interface OnPlayerMainInventoryChangedEvent extends EventData {
|
|
2373
2249
|
|
2374
2250
|
/**
|
2375
2251
|
* Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the player as if they came from mining the entity. Can be filtered using {@link LuaPlayerMinedEntityEventFilter}.
|
2376
|
-
*
|
2377
|
-
*
|
2378
|
-
*
|
2379
|
-
* 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.
|
2380
|
-
*
|
2381
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_entity View documentation}
|
2252
|
+
* @remarks 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.
|
2253
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_entity Online documentation}
|
2382
2254
|
*/
|
2383
2255
|
interface OnPlayerMinedEntityEvent extends EventData {
|
2384
2256
|
/**
|
@@ -2405,8 +2277,7 @@ interface OnPlayerMinedEntityEvent extends EventData {
|
|
2405
2277
|
|
2406
2278
|
/**
|
2407
2279
|
* Called when the player mines something.
|
2408
|
-
*
|
2409
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_item View documentation}
|
2280
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_item Online documentation}
|
2410
2281
|
*/
|
2411
2282
|
interface OnPlayerMinedItemEvent extends EventData {
|
2412
2283
|
/**
|
@@ -2426,8 +2297,7 @@ interface OnPlayerMinedItemEvent extends EventData {
|
|
2426
2297
|
|
2427
2298
|
/**
|
2428
2299
|
* Called after a player mines tiles.
|
2429
|
-
*
|
2430
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_tile View documentation}
|
2300
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_tile Online documentation}
|
2431
2301
|
*/
|
2432
2302
|
interface OnPlayerMinedTileEvent extends EventData {
|
2433
2303
|
readonly player_index: PlayerIndex
|
@@ -2451,8 +2321,7 @@ interface OnPlayerMinedTileEvent extends EventData {
|
|
2451
2321
|
|
2452
2322
|
/**
|
2453
2323
|
* Called when a player is muted.
|
2454
|
-
*
|
2455
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_muted View documentation}
|
2324
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_muted Online documentation}
|
2456
2325
|
*/
|
2457
2326
|
interface OnPlayerMutedEvent extends EventData {
|
2458
2327
|
/**
|
@@ -2471,8 +2340,7 @@ interface OnPlayerMutedEvent extends EventData {
|
|
2471
2340
|
|
2472
2341
|
/**
|
2473
2342
|
* Called when a player invokes the "smart pipette" over an entity.
|
2474
|
-
*
|
2475
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_pipette View documentation}
|
2343
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_pipette Online documentation}
|
2476
2344
|
*/
|
2477
2345
|
interface OnPlayerPipetteEvent extends EventData {
|
2478
2346
|
/**
|
@@ -2499,8 +2367,7 @@ interface OnPlayerPipetteEvent extends EventData {
|
|
2499
2367
|
|
2500
2368
|
/**
|
2501
2369
|
* Called after the player puts equipment in an equipment grid
|
2502
|
-
*
|
2503
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment View documentation}
|
2370
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment Online documentation}
|
2504
2371
|
*/
|
2505
2372
|
interface OnPlayerPlacedEquipmentEvent extends EventData {
|
2506
2373
|
readonly player_index: PlayerIndex
|
@@ -2524,8 +2391,7 @@ interface OnPlayerPlacedEquipmentEvent extends EventData {
|
|
2524
2391
|
|
2525
2392
|
/**
|
2526
2393
|
* Called when a player is promoted.
|
2527
|
-
*
|
2528
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_promoted View documentation}
|
2394
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_promoted Online documentation}
|
2529
2395
|
*/
|
2530
2396
|
interface OnPlayerPromotedEvent extends EventData {
|
2531
2397
|
/**
|
@@ -2544,8 +2410,7 @@ interface OnPlayerPromotedEvent extends EventData {
|
|
2544
2410
|
|
2545
2411
|
/**
|
2546
2412
|
* Called when a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file.
|
2547
|
-
*
|
2548
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_removed View documentation}
|
2413
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_removed Online documentation}
|
2549
2414
|
*/
|
2550
2415
|
interface OnPlayerRemovedEvent extends EventData {
|
2551
2416
|
/**
|
@@ -2564,8 +2429,7 @@ interface OnPlayerRemovedEvent extends EventData {
|
|
2564
2429
|
|
2565
2430
|
/**
|
2566
2431
|
* Called after the player removes equipment from an equipment grid
|
2567
|
-
*
|
2568
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment View documentation}
|
2432
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment Online documentation}
|
2569
2433
|
*/
|
2570
2434
|
interface OnPlayerRemovedEquipmentEvent extends EventData {
|
2571
2435
|
readonly player_index: PlayerIndex
|
@@ -2593,8 +2457,7 @@ interface OnPlayerRemovedEquipmentEvent extends EventData {
|
|
2593
2457
|
|
2594
2458
|
/**
|
2595
2459
|
* Called when a player repairs an entity. Can be filtered using {@link LuaPlayerRepairedEntityEventFilter}.
|
2596
|
-
*
|
2597
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity View documentation}
|
2460
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity Online documentation}
|
2598
2461
|
*/
|
2599
2462
|
interface OnPlayerRepairedEntityEvent extends EventData {
|
2600
2463
|
readonly player_index: PlayerIndex
|
@@ -2611,8 +2474,7 @@ interface OnPlayerRepairedEntityEvent extends EventData {
|
|
2611
2474
|
|
2612
2475
|
/**
|
2613
2476
|
* Called after a player respawns.
|
2614
|
-
*
|
2615
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_respawned View documentation}
|
2477
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_respawned Online documentation}
|
2616
2478
|
*/
|
2617
2479
|
interface OnPlayerRespawnedEvent extends EventData {
|
2618
2480
|
readonly player_index: PlayerIndex
|
@@ -2632,8 +2494,7 @@ interface OnPlayerRespawnedEvent extends EventData {
|
|
2632
2494
|
|
2633
2495
|
/**
|
2634
2496
|
* Called after a player reverse-selects an area with a selection-tool item.
|
2635
|
-
*
|
2636
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area View documentation}
|
2497
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area Online documentation}
|
2637
2498
|
*/
|
2638
2499
|
interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
2639
2500
|
/**
|
@@ -2647,7 +2508,7 @@ interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
|
2647
2508
|
/**
|
2648
2509
|
* The area selected.
|
2649
2510
|
*/
|
2650
|
-
readonly area:
|
2511
|
+
readonly area: BoundingBox
|
2651
2512
|
/**
|
2652
2513
|
* The item used to select the area.
|
2653
2514
|
*/
|
@@ -2672,8 +2533,7 @@ interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
|
2672
2533
|
|
2673
2534
|
/**
|
2674
2535
|
* 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.
|
2675
|
-
*
|
2676
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity View documentation}
|
2536
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity Online documentation}
|
2677
2537
|
*/
|
2678
2538
|
interface OnPlayerRotatedEntityEvent extends EventData {
|
2679
2539
|
/**
|
@@ -2697,8 +2557,7 @@ interface OnPlayerRotatedEntityEvent extends EventData {
|
|
2697
2557
|
|
2698
2558
|
/**
|
2699
2559
|
* Called after a player selects an area with a selection-tool item.
|
2700
|
-
*
|
2701
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_selected_area View documentation}
|
2560
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_selected_area Online documentation}
|
2702
2561
|
*/
|
2703
2562
|
interface OnPlayerSelectedAreaEvent extends EventData {
|
2704
2563
|
/**
|
@@ -2712,7 +2571,7 @@ interface OnPlayerSelectedAreaEvent extends EventData {
|
|
2712
2571
|
/**
|
2713
2572
|
* The area selected.
|
2714
2573
|
*/
|
2715
|
-
readonly area:
|
2574
|
+
readonly area: BoundingBox
|
2716
2575
|
/**
|
2717
2576
|
* The item used to select the area.
|
2718
2577
|
*/
|
@@ -2737,8 +2596,7 @@ interface OnPlayerSelectedAreaEvent extends EventData {
|
|
2737
2596
|
|
2738
2597
|
/**
|
2739
2598
|
* Called when a player sets a quickbar slot to anything (new value, or set to empty).
|
2740
|
-
*
|
2741
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot View documentation}
|
2599
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot Online documentation}
|
2742
2600
|
*/
|
2743
2601
|
interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
2744
2602
|
readonly player_index: PlayerIndex
|
@@ -2754,8 +2612,7 @@ interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
|
2754
2612
|
|
2755
2613
|
/**
|
2756
2614
|
* Called when a player selects an area with a blueprint.
|
2757
|
-
*
|
2758
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint View documentation}
|
2615
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint Online documentation}
|
2759
2616
|
*/
|
2760
2617
|
interface OnPlayerSetupBlueprintEvent extends EventData {
|
2761
2618
|
/**
|
@@ -2769,7 +2626,7 @@ interface OnPlayerSetupBlueprintEvent extends EventData {
|
|
2769
2626
|
/**
|
2770
2627
|
* The area selected.
|
2771
2628
|
*/
|
2772
|
-
readonly area:
|
2629
|
+
readonly area: BoundingBox
|
2773
2630
|
/**
|
2774
2631
|
* The item used to select the area.
|
2775
2632
|
*/
|
@@ -2794,8 +2651,7 @@ interface OnPlayerSetupBlueprintEvent extends EventData {
|
|
2794
2651
|
|
2795
2652
|
/**
|
2796
2653
|
* Called when a player toggles alt mode, also known as "show entity info".
|
2797
|
-
*
|
2798
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode View documentation}
|
2654
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode Online documentation}
|
2799
2655
|
*/
|
2800
2656
|
interface OnPlayerToggledAltModeEvent extends EventData {
|
2801
2657
|
readonly player_index: PlayerIndex
|
@@ -2815,8 +2671,7 @@ interface OnPlayerToggledAltModeEvent extends EventData {
|
|
2815
2671
|
|
2816
2672
|
/**
|
2817
2673
|
* Called when a player toggles the map editor on or off.
|
2818
|
-
*
|
2819
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor View documentation}
|
2674
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor Online documentation}
|
2820
2675
|
*/
|
2821
2676
|
interface OnPlayerToggledMapEditorEvent extends EventData {
|
2822
2677
|
readonly player_index: PlayerIndex
|
@@ -2832,8 +2687,7 @@ interface OnPlayerToggledMapEditorEvent extends EventData {
|
|
2832
2687
|
|
2833
2688
|
/**
|
2834
2689
|
* Called after a players trash inventory changed in some way.
|
2835
|
-
*
|
2836
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed View documentation}
|
2690
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed Online documentation}
|
2837
2691
|
*/
|
2838
2692
|
interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
2839
2693
|
readonly player_index: PlayerIndex
|
@@ -2849,8 +2703,7 @@ interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
|
2849
2703
|
|
2850
2704
|
/**
|
2851
2705
|
* Called when a player is un-banned.
|
2852
|
-
*
|
2853
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_unbanned View documentation}
|
2706
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_unbanned Online documentation}
|
2854
2707
|
*/
|
2855
2708
|
interface OnPlayerUnbannedEvent extends EventData {
|
2856
2709
|
/**
|
@@ -2881,8 +2734,7 @@ interface OnPlayerUnbannedEvent extends EventData {
|
|
2881
2734
|
|
2882
2735
|
/**
|
2883
2736
|
* Called when a player is unmuted.
|
2884
|
-
*
|
2885
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_unmuted View documentation}
|
2737
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_unmuted Online documentation}
|
2886
2738
|
*/
|
2887
2739
|
interface OnPlayerUnmutedEvent extends EventData {
|
2888
2740
|
/**
|
@@ -2901,8 +2753,7 @@ interface OnPlayerUnmutedEvent extends EventData {
|
|
2901
2753
|
|
2902
2754
|
/**
|
2903
2755
|
* Called when a player uses a capsule that results in some game action.
|
2904
|
-
*
|
2905
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_used_capsule View documentation}
|
2756
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_used_capsule Online documentation}
|
2906
2757
|
*/
|
2907
2758
|
interface OnPlayerUsedCapsuleEvent extends EventData {
|
2908
2759
|
/**
|
@@ -2916,7 +2767,7 @@ interface OnPlayerUsedCapsuleEvent extends EventData {
|
|
2916
2767
|
/**
|
2917
2768
|
* The position the capsule was used.
|
2918
2769
|
*/
|
2919
|
-
readonly position:
|
2770
|
+
readonly position: MapPosition
|
2920
2771
|
/**
|
2921
2772
|
* Identifier of the event
|
2922
2773
|
*/
|
@@ -2929,8 +2780,7 @@ interface OnPlayerUsedCapsuleEvent extends EventData {
|
|
2929
2780
|
|
2930
2781
|
/**
|
2931
2782
|
* Called when a player uses spidertron remote to send a spidertron to a given position
|
2932
|
-
*
|
2933
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote View documentation}
|
2783
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote Online documentation}
|
2934
2784
|
*/
|
2935
2785
|
interface OnPlayerUsedSpiderRemoteEvent extends EventData {
|
2936
2786
|
/**
|
@@ -2944,7 +2794,7 @@ interface OnPlayerUsedSpiderRemoteEvent extends EventData {
|
|
2944
2794
|
/**
|
2945
2795
|
* Goal position to which spidertron was sent to.
|
2946
2796
|
*/
|
2947
|
-
readonly position:
|
2797
|
+
readonly position: MapPosition
|
2948
2798
|
/**
|
2949
2799
|
* If the use was successful. It may fail when spidertron has different driver or when player is on different surface.
|
2950
2800
|
*/
|
@@ -2961,8 +2811,7 @@ interface OnPlayerUsedSpiderRemoteEvent extends EventData {
|
|
2961
2811
|
|
2962
2812
|
/**
|
2963
2813
|
* Called after an entity dies. Can be filtered using {@link LuaPostEntityDiedEventFilter}.
|
2964
|
-
*
|
2965
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_post_entity_died View documentation}
|
2814
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_post_entity_died Online documentation}
|
2966
2815
|
*/
|
2967
2816
|
interface OnPostEntityDiedEvent extends EventData {
|
2968
2817
|
/**
|
@@ -2976,7 +2825,7 @@ interface OnPostEntityDiedEvent extends EventData {
|
|
2976
2825
|
/**
|
2977
2826
|
* Position where the entity died.
|
2978
2827
|
*/
|
2979
|
-
readonly position:
|
2828
|
+
readonly position: MapPosition
|
2980
2829
|
/**
|
2981
2830
|
* The entity prototype of the entity that died.
|
2982
2831
|
*/
|
@@ -3009,8 +2858,7 @@ interface OnPostEntityDiedEvent extends EventData {
|
|
3009
2858
|
|
3010
2859
|
/**
|
3011
2860
|
* Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
|
3012
|
-
*
|
3013
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_build View documentation}
|
2861
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_build Online documentation}
|
3014
2862
|
*/
|
3015
2863
|
interface OnPreBuildEvent extends EventData {
|
3016
2864
|
/**
|
@@ -3020,7 +2868,7 @@ interface OnPreBuildEvent extends EventData {
|
|
3020
2868
|
/**
|
3021
2869
|
* Where the item was placed.
|
3022
2870
|
*/
|
3023
|
-
readonly position:
|
2871
|
+
readonly position: MapPosition
|
3024
2872
|
/**
|
3025
2873
|
* Item was placed using shift building.
|
3026
2874
|
*/
|
@@ -3053,15 +2901,14 @@ interface OnPreBuildEvent extends EventData {
|
|
3053
2901
|
|
3054
2902
|
/**
|
3055
2903
|
* Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
3056
|
-
*
|
3057
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted View documentation}
|
2904
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted Online documentation}
|
3058
2905
|
*/
|
3059
2906
|
interface OnPreChunkDeletedEvent extends EventData {
|
3060
2907
|
readonly surface_index: SurfaceIndex
|
3061
2908
|
/**
|
3062
2909
|
* The chunks to be deleted.
|
3063
2910
|
*/
|
3064
|
-
readonly positions:
|
2911
|
+
readonly positions: ChunkPosition[]
|
3065
2912
|
/**
|
3066
2913
|
* Identifier of the event
|
3067
2914
|
*/
|
@@ -3074,8 +2921,7 @@ interface OnPreChunkDeletedEvent extends EventData {
|
|
3074
2921
|
|
3075
2922
|
/**
|
3076
2923
|
* Called before entity copy-paste is done.
|
3077
|
-
*
|
3078
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted View documentation}
|
2924
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted Online documentation}
|
3079
2925
|
*/
|
3080
2926
|
interface OnPreEntitySettingsPastedEvent extends EventData {
|
3081
2927
|
readonly player_index: PlayerIndex
|
@@ -3099,8 +2945,7 @@ interface OnPreEntitySettingsPastedEvent extends EventData {
|
|
3099
2945
|
|
3100
2946
|
/**
|
3101
2947
|
* Called before a ghost entity is destroyed as a result of being marked for deconstruction. Can be filtered using {@link LuaPreGhostDeconstructedEventFilter}.
|
3102
|
-
*
|
3103
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed View documentation}
|
2948
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed Online documentation}
|
3104
2949
|
*/
|
3105
2950
|
interface OnPreGhostDeconstructedEvent extends EventData {
|
3106
2951
|
/**
|
@@ -3118,10 +2963,29 @@ interface OnPreGhostDeconstructedEvent extends EventData {
|
|
3118
2963
|
readonly tick: uint
|
3119
2964
|
}
|
3120
2965
|
|
2966
|
+
/**
|
2967
|
+
* Called before a ghost entity is upgraded. Can be filtered using {@link LuaPreGhostUpgradedEventFilter}.
|
2968
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded Online documentation}
|
2969
|
+
*/
|
2970
|
+
interface OnPreGhostUpgradedEvent extends EventData {
|
2971
|
+
/**
|
2972
|
+
* The player that did the upgrade if any.
|
2973
|
+
*/
|
2974
|
+
readonly player_index?: PlayerIndex
|
2975
|
+
readonly ghost: LuaEntity
|
2976
|
+
/**
|
2977
|
+
* Identifier of the event
|
2978
|
+
*/
|
2979
|
+
readonly name: typeof defines.events.on_pre_ghost_upgraded
|
2980
|
+
/**
|
2981
|
+
* Tick the event was generated.
|
2982
|
+
*/
|
2983
|
+
readonly tick: uint
|
2984
|
+
}
|
2985
|
+
|
3121
2986
|
/**
|
3122
2987
|
* Called directly before a permission group is deleted.
|
3123
|
-
*
|
3124
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted View documentation}
|
2988
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted Online documentation}
|
3125
2989
|
*/
|
3126
2990
|
interface OnPrePermissionGroupDeletedEvent extends EventData {
|
3127
2991
|
/**
|
@@ -3144,8 +3008,7 @@ interface OnPrePermissionGroupDeletedEvent extends EventData {
|
|
3144
3008
|
|
3145
3009
|
/**
|
3146
3010
|
* Called directly before a permission string is imported.
|
3147
|
-
*
|
3148
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported View documentation}
|
3011
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported Online documentation}
|
3149
3012
|
*/
|
3150
3013
|
interface OnPrePermissionStringImportedEvent extends EventData {
|
3151
3014
|
/**
|
@@ -3164,8 +3027,7 @@ interface OnPrePermissionStringImportedEvent extends EventData {
|
|
3164
3027
|
|
3165
3028
|
/**
|
3166
3029
|
* Called when a player queues something to be crafted.
|
3167
|
-
*
|
3168
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item View documentation}
|
3030
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item Online documentation}
|
3169
3031
|
*/
|
3170
3032
|
interface OnPrePlayerCraftedItemEvent extends EventData {
|
3171
3033
|
/**
|
@@ -3196,8 +3058,7 @@ interface OnPrePlayerCraftedItemEvent extends EventData {
|
|
3196
3058
|
|
3197
3059
|
/**
|
3198
3060
|
* Called before a players dies.
|
3199
|
-
*
|
3200
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_died View documentation}
|
3061
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_died Online documentation}
|
3201
3062
|
*/
|
3202
3063
|
interface OnPrePlayerDiedEvent extends EventData {
|
3203
3064
|
readonly player_index: PlayerIndex
|
@@ -3214,8 +3075,7 @@ interface OnPrePlayerDiedEvent extends EventData {
|
|
3214
3075
|
|
3215
3076
|
/**
|
3216
3077
|
* Called before a player leaves the game.
|
3217
|
-
*
|
3218
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game View documentation}
|
3078
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game Online documentation}
|
3219
3079
|
*/
|
3220
3080
|
interface OnPrePlayerLeftGameEvent extends EventData {
|
3221
3081
|
readonly player_index: PlayerIndex
|
@@ -3232,8 +3092,7 @@ interface OnPrePlayerLeftGameEvent extends EventData {
|
|
3232
3092
|
|
3233
3093
|
/**
|
3234
3094
|
* Called when the player finishes mining an entity, before the entity is removed from map. Can be filtered using {@link LuaPrePlayerMinedEntityEventFilter}.
|
3235
|
-
*
|
3236
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item View documentation}
|
3095
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item Online documentation}
|
3237
3096
|
*/
|
3238
3097
|
interface OnPrePlayerMinedItemEvent extends EventData {
|
3239
3098
|
/**
|
@@ -3253,8 +3112,7 @@ interface OnPrePlayerMinedItemEvent extends EventData {
|
|
3253
3112
|
|
3254
3113
|
/**
|
3255
3114
|
* Called before a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file.
|
3256
|
-
*
|
3257
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_removed View documentation}
|
3115
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_removed Online documentation}
|
3258
3116
|
*/
|
3259
3117
|
interface OnPrePlayerRemovedEvent extends EventData {
|
3260
3118
|
/**
|
@@ -3273,8 +3131,7 @@ interface OnPrePlayerRemovedEvent extends EventData {
|
|
3273
3131
|
|
3274
3132
|
/**
|
3275
3133
|
* Called before a player toggles the map editor on or off.
|
3276
|
-
*
|
3277
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor View documentation}
|
3134
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor Online documentation}
|
3278
3135
|
*/
|
3279
3136
|
interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
3280
3137
|
readonly player_index: PlayerIndex
|
@@ -3290,8 +3147,7 @@ interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
|
3290
3147
|
|
3291
3148
|
/**
|
3292
3149
|
* Called directly before a robot explodes cliffs.
|
3293
|
-
*
|
3294
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff View documentation}
|
3150
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff Online documentation}
|
3295
3151
|
*/
|
3296
3152
|
interface OnPreRobotExplodedCliffEvent extends EventData {
|
3297
3153
|
readonly robot: LuaEntity
|
@@ -3312,8 +3168,7 @@ interface OnPreRobotExplodedCliffEvent extends EventData {
|
|
3312
3168
|
|
3313
3169
|
/**
|
3314
3170
|
* Called just before a script inventory is resized.
|
3315
|
-
*
|
3316
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized View documentation}
|
3171
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized Online documentation}
|
3317
3172
|
*/
|
3318
3173
|
interface OnPreScriptInventoryResizedEvent extends EventData {
|
3319
3174
|
/**
|
@@ -3345,8 +3200,7 @@ interface OnPreScriptInventoryResizedEvent extends EventData {
|
|
3345
3200
|
|
3346
3201
|
/**
|
3347
3202
|
* Called just before a surface is cleared (all entities removed and all chunks deleted).
|
3348
|
-
*
|
3349
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared View documentation}
|
3203
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared Online documentation}
|
3350
3204
|
*/
|
3351
3205
|
interface OnPreSurfaceClearedEvent extends EventData {
|
3352
3206
|
readonly surface_index: SurfaceIndex
|
@@ -3362,8 +3216,7 @@ interface OnPreSurfaceClearedEvent extends EventData {
|
|
3362
3216
|
|
3363
3217
|
/**
|
3364
3218
|
* Called just before a surface is deleted.
|
3365
|
-
*
|
3366
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted View documentation}
|
3219
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted Online documentation}
|
3367
3220
|
*/
|
3368
3221
|
interface OnPreSurfaceDeletedEvent extends EventData {
|
3369
3222
|
readonly surface_index: SurfaceIndex
|
@@ -3379,8 +3232,7 @@ interface OnPreSurfaceDeletedEvent extends EventData {
|
|
3379
3232
|
|
3380
3233
|
/**
|
3381
3234
|
* Called when research is cancelled.
|
3382
|
-
*
|
3383
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_research_cancelled View documentation}
|
3235
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_research_cancelled Online documentation}
|
3384
3236
|
*/
|
3385
3237
|
interface OnResearchCancelledEvent extends EventData {
|
3386
3238
|
/**
|
@@ -3403,8 +3255,7 @@ interface OnResearchCancelledEvent extends EventData {
|
|
3403
3255
|
|
3404
3256
|
/**
|
3405
3257
|
* Called when a research finishes.
|
3406
|
-
*
|
3407
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_research_finished View documentation}
|
3258
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_research_finished Online documentation}
|
3408
3259
|
*/
|
3409
3260
|
interface OnResearchFinishedEvent extends EventData {
|
3410
3261
|
/**
|
@@ -3427,8 +3278,7 @@ interface OnResearchFinishedEvent extends EventData {
|
|
3427
3278
|
|
3428
3279
|
/**
|
3429
3280
|
* Called when a research is reversed (unresearched).
|
3430
|
-
*
|
3431
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_research_reversed View documentation}
|
3281
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_research_reversed Online documentation}
|
3432
3282
|
*/
|
3433
3283
|
interface OnResearchReversedEvent extends EventData {
|
3434
3284
|
/**
|
@@ -3451,8 +3301,7 @@ interface OnResearchReversedEvent extends EventData {
|
|
3451
3301
|
|
3452
3302
|
/**
|
3453
3303
|
* Called when a technology research starts.
|
3454
|
-
*
|
3455
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_research_started View documentation}
|
3304
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_research_started Online documentation}
|
3456
3305
|
*/
|
3457
3306
|
interface OnResearchStartedEvent extends EventData {
|
3458
3307
|
/**
|
@@ -3472,8 +3321,7 @@ interface OnResearchStartedEvent extends EventData {
|
|
3472
3321
|
|
3473
3322
|
/**
|
3474
3323
|
* Called when a resource entity reaches 0 or its minimum yield for infinite resources.
|
3475
|
-
*
|
3476
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_resource_depleted View documentation}
|
3324
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_resource_depleted Online documentation}
|
3477
3325
|
*/
|
3478
3326
|
interface OnResourceDepletedEvent extends EventData {
|
3479
3327
|
readonly entity: LuaEntity
|
@@ -3489,8 +3337,7 @@ interface OnResourceDepletedEvent extends EventData {
|
|
3489
3337
|
|
3490
3338
|
/**
|
3491
3339
|
* Called when a construction robot builds an entity. Can be filtered using {@link LuaRobotBuiltEntityEventFilter}.
|
3492
|
-
*
|
3493
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_built_entity View documentation}
|
3340
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_robot_built_entity Online documentation}
|
3494
3341
|
*/
|
3495
3342
|
interface OnRobotBuiltEntityEvent extends EventData {
|
3496
3343
|
/**
|
@@ -3521,8 +3368,7 @@ interface OnRobotBuiltEntityEvent extends EventData {
|
|
3521
3368
|
|
3522
3369
|
/**
|
3523
3370
|
* Called after a robot builds tiles.
|
3524
|
-
*
|
3525
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_built_tile View documentation}
|
3371
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_robot_built_tile Online documentation}
|
3526
3372
|
*/
|
3527
3373
|
interface OnRobotBuiltTileEvent extends EventData {
|
3528
3374
|
/**
|
@@ -3561,8 +3407,7 @@ interface OnRobotBuiltTileEvent extends EventData {
|
|
3561
3407
|
|
3562
3408
|
/**
|
3563
3409
|
* Called directly after a robot explodes cliffs.
|
3564
|
-
*
|
3565
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff View documentation}
|
3410
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff Online documentation}
|
3566
3411
|
*/
|
3567
3412
|
interface OnRobotExplodedCliffEvent extends EventData {
|
3568
3413
|
readonly robot: LuaEntity
|
@@ -3582,8 +3427,7 @@ interface OnRobotExplodedCliffEvent extends EventData {
|
|
3582
3427
|
|
3583
3428
|
/**
|
3584
3429
|
* Called when a robot mines an entity.
|
3585
|
-
*
|
3586
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined View documentation}
|
3430
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined Online documentation}
|
3587
3431
|
*/
|
3588
3432
|
interface OnRobotMinedEvent extends EventData {
|
3589
3433
|
/**
|
@@ -3606,12 +3450,8 @@ interface OnRobotMinedEvent extends EventData {
|
|
3606
3450
|
|
3607
3451
|
/**
|
3608
3452
|
* Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the robot as if they came from mining the entity. Can be filtered using {@link LuaRobotMinedEntityEventFilter}.
|
3609
|
-
*
|
3610
|
-
*
|
3611
|
-
*
|
3612
|
-
* 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.
|
3613
|
-
*
|
3614
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity View documentation}
|
3453
|
+
* @remarks 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.
|
3454
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity Online documentation}
|
3615
3455
|
*/
|
3616
3456
|
interface OnRobotMinedEntityEvent extends EventData {
|
3617
3457
|
/**
|
@@ -3638,8 +3478,7 @@ interface OnRobotMinedEntityEvent extends EventData {
|
|
3638
3478
|
|
3639
3479
|
/**
|
3640
3480
|
* Called after a robot mines tiles.
|
3641
|
-
*
|
3642
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile View documentation}
|
3481
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile Online documentation}
|
3643
3482
|
*/
|
3644
3483
|
interface OnRobotMinedTileEvent extends EventData {
|
3645
3484
|
/**
|
@@ -3666,8 +3505,7 @@ interface OnRobotMinedTileEvent extends EventData {
|
|
3666
3505
|
|
3667
3506
|
/**
|
3668
3507
|
* Called before a robot mines an entity. Can be filtered using {@link LuaPreRobotMinedEntityEventFilter}.
|
3669
|
-
*
|
3670
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined View documentation}
|
3508
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined Online documentation}
|
3671
3509
|
*/
|
3672
3510
|
interface OnRobotPreMinedEvent extends EventData {
|
3673
3511
|
/**
|
@@ -3690,8 +3528,7 @@ interface OnRobotPreMinedEvent extends EventData {
|
|
3690
3528
|
|
3691
3529
|
/**
|
3692
3530
|
* Called when a rocket silo is ordered to be launched.
|
3693
|
-
*
|
3694
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered View documentation}
|
3531
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered Online documentation}
|
3695
3532
|
*/
|
3696
3533
|
interface OnRocketLaunchOrderedEvent extends EventData {
|
3697
3534
|
readonly rocket: LuaEntity
|
@@ -3712,8 +3549,7 @@ interface OnRocketLaunchOrderedEvent extends EventData {
|
|
3712
3549
|
|
3713
3550
|
/**
|
3714
3551
|
* Called when the rocket is launched.
|
3715
|
-
*
|
3716
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_rocket_launched View documentation}
|
3552
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_rocket_launched Online documentation}
|
3717
3553
|
*/
|
3718
3554
|
interface OnRocketLaunchedEvent extends EventData {
|
3719
3555
|
readonly rocket: LuaEntity
|
@@ -3734,8 +3570,7 @@ interface OnRocketLaunchedEvent extends EventData {
|
|
3734
3570
|
|
3735
3571
|
/**
|
3736
3572
|
* Called when a runtime mod setting is changed by a player.
|
3737
|
-
*
|
3738
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed View documentation}
|
3573
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed Online documentation}
|
3739
3574
|
*/
|
3740
3575
|
interface OnRuntimeModSettingChangedEvent extends EventData {
|
3741
3576
|
/**
|
@@ -3762,8 +3597,7 @@ interface OnRuntimeModSettingChangedEvent extends EventData {
|
|
3762
3597
|
|
3763
3598
|
/**
|
3764
3599
|
* Called just after a script inventory is resized.
|
3765
|
-
*
|
3766
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized View documentation}
|
3600
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized Online documentation}
|
3767
3601
|
*/
|
3768
3602
|
interface OnScriptInventoryResizedEvent extends EventData {
|
3769
3603
|
/**
|
@@ -3799,8 +3633,7 @@ interface OnScriptInventoryResizedEvent extends EventData {
|
|
3799
3633
|
|
3800
3634
|
/**
|
3801
3635
|
* Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
|
3802
|
-
*
|
3803
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished View documentation}
|
3636
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished Online documentation}
|
3804
3637
|
*/
|
3805
3638
|
interface OnScriptPathRequestFinishedEvent extends EventData {
|
3806
3639
|
/**
|
@@ -3827,8 +3660,7 @@ interface OnScriptPathRequestFinishedEvent extends EventData {
|
|
3827
3660
|
|
3828
3661
|
/**
|
3829
3662
|
* Called when a script trigger effect is triggered.
|
3830
|
-
*
|
3831
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect View documentation}
|
3663
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect Online documentation}
|
3832
3664
|
*/
|
3833
3665
|
interface OnScriptTriggerEffectEvent extends EventData {
|
3834
3666
|
/**
|
@@ -3839,9 +3671,9 @@ interface OnScriptTriggerEffectEvent extends EventData {
|
|
3839
3671
|
* The surface the effect happened on.
|
3840
3672
|
*/
|
3841
3673
|
readonly surface_index: SurfaceIndex
|
3842
|
-
readonly source_position?:
|
3674
|
+
readonly source_position?: MapPosition
|
3843
3675
|
readonly source_entity?: LuaEntity
|
3844
|
-
readonly target_position?:
|
3676
|
+
readonly target_position?: MapPosition
|
3845
3677
|
readonly target_entity?: LuaEntity
|
3846
3678
|
/**
|
3847
3679
|
* Identifier of the event
|
@@ -3855,8 +3687,7 @@ interface OnScriptTriggerEffectEvent extends EventData {
|
|
3855
3687
|
|
3856
3688
|
/**
|
3857
3689
|
* Called when an entity of type `radar` finishes scanning a sector. Can be filtered for the radar using {@link LuaSectorScannedEventFilter}.
|
3858
|
-
*
|
3859
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_sector_scanned View documentation}
|
3690
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_sector_scanned Online documentation}
|
3860
3691
|
*/
|
3861
3692
|
interface OnSectorScannedEvent extends EventData {
|
3862
3693
|
/**
|
@@ -3866,11 +3697,11 @@ interface OnSectorScannedEvent extends EventData {
|
|
3866
3697
|
/**
|
3867
3698
|
* The chunk scanned.
|
3868
3699
|
*/
|
3869
|
-
readonly chunk_position:
|
3700
|
+
readonly chunk_position: ChunkPosition
|
3870
3701
|
/**
|
3871
3702
|
* Area of the scanned chunk.
|
3872
3703
|
*/
|
3873
|
-
readonly area:
|
3704
|
+
readonly area: BoundingBox
|
3874
3705
|
/**
|
3875
3706
|
* Identifier of the event
|
3876
3707
|
*/
|
@@ -3883,8 +3714,7 @@ interface OnSectorScannedEvent extends EventData {
|
|
3883
3714
|
|
3884
3715
|
/**
|
3885
3716
|
* Called after the selected entity changes for a given player.
|
3886
|
-
*
|
3887
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed View documentation}
|
3717
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed Online documentation}
|
3888
3718
|
*/
|
3889
3719
|
interface OnSelectedEntityChangedEvent extends EventData {
|
3890
3720
|
/**
|
@@ -3907,8 +3737,7 @@ interface OnSelectedEntityChangedEvent extends EventData {
|
|
3907
3737
|
|
3908
3738
|
/**
|
3909
3739
|
* Called when a spider finishes moving to its autopilot position.
|
3910
|
-
*
|
3911
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_spider_command_completed View documentation}
|
3740
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_spider_command_completed Online documentation}
|
3912
3741
|
*/
|
3913
3742
|
interface OnSpiderCommandCompletedEvent extends EventData {
|
3914
3743
|
/**
|
@@ -3927,8 +3756,7 @@ interface OnSpiderCommandCompletedEvent extends EventData {
|
|
3927
3756
|
|
3928
3757
|
/**
|
3929
3758
|
* Called when a translation request generated through {@link LuaPlayer#request_translation LuaPlayer::request_translation} is translated.
|
3930
|
-
*
|
3931
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_string_translated View documentation}
|
3759
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_string_translated Online documentation}
|
3932
3760
|
*/
|
3933
3761
|
interface OnStringTranslatedEvent extends EventData {
|
3934
3762
|
/**
|
@@ -3959,8 +3787,7 @@ interface OnStringTranslatedEvent extends EventData {
|
|
3959
3787
|
|
3960
3788
|
/**
|
3961
3789
|
* Called just after a surface is cleared (all entities removed and all chunks deleted).
|
3962
|
-
*
|
3963
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_surface_cleared View documentation}
|
3790
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_surface_cleared Online documentation}
|
3964
3791
|
*/
|
3965
3792
|
interface OnSurfaceClearedEvent extends EventData {
|
3966
3793
|
readonly surface_index: SurfaceIndex
|
@@ -3976,12 +3803,8 @@ interface OnSurfaceClearedEvent extends EventData {
|
|
3976
3803
|
|
3977
3804
|
/**
|
3978
3805
|
* Called when a surface is created.
|
3979
|
-
*
|
3980
|
-
*
|
3981
|
-
*
|
3982
|
-
* This is not called when the default surface is created as it will always exist.
|
3983
|
-
*
|
3984
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_surface_created View documentation}
|
3806
|
+
* @remarks This is not called when the default surface is created as it will always exist.
|
3807
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_surface_created Online documentation}
|
3985
3808
|
*/
|
3986
3809
|
interface OnSurfaceCreatedEvent extends EventData {
|
3987
3810
|
readonly surface_index: SurfaceIndex
|
@@ -3997,8 +3820,7 @@ interface OnSurfaceCreatedEvent extends EventData {
|
|
3997
3820
|
|
3998
3821
|
/**
|
3999
3822
|
* Called after a surface is deleted.
|
4000
|
-
*
|
4001
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_surface_deleted View documentation}
|
3823
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_surface_deleted Online documentation}
|
4002
3824
|
*/
|
4003
3825
|
interface OnSurfaceDeletedEvent extends EventData {
|
4004
3826
|
readonly surface_index: SurfaceIndex
|
@@ -4014,8 +3836,7 @@ interface OnSurfaceDeletedEvent extends EventData {
|
|
4014
3836
|
|
4015
3837
|
/**
|
4016
3838
|
* Called after a surface is imported.
|
4017
|
-
*
|
4018
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_surface_imported View documentation}
|
3839
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_surface_imported Online documentation}
|
4019
3840
|
*/
|
4020
3841
|
interface OnSurfaceImportedEvent extends EventData {
|
4021
3842
|
readonly surface_index: SurfaceIndex
|
@@ -4035,8 +3856,7 @@ interface OnSurfaceImportedEvent extends EventData {
|
|
4035
3856
|
|
4036
3857
|
/**
|
4037
3858
|
* Called when a surface is renamed.
|
4038
|
-
*
|
4039
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_surface_renamed View documentation}
|
3859
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_surface_renamed Online documentation}
|
4040
3860
|
*/
|
4041
3861
|
interface OnSurfaceRenamedEvent extends EventData {
|
4042
3862
|
readonly surface_index: SurfaceIndex
|
@@ -4054,8 +3874,7 @@ interface OnSurfaceRenamedEvent extends EventData {
|
|
4054
3874
|
|
4055
3875
|
/**
|
4056
3876
|
* Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
|
4057
|
-
*
|
4058
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset View documentation}
|
3877
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset Online documentation}
|
4059
3878
|
*/
|
4060
3879
|
interface OnTechnologyEffectsResetEvent extends EventData {
|
4061
3880
|
readonly force: LuaForce
|
@@ -4071,8 +3890,7 @@ interface OnTechnologyEffectsResetEvent extends EventData {
|
|
4071
3890
|
|
4072
3891
|
/**
|
4073
3892
|
* It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
|
4074
|
-
*
|
4075
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_tick View documentation}
|
3893
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_tick Online documentation}
|
4076
3894
|
*/
|
4077
3895
|
interface OnTickEvent extends EventData {
|
4078
3896
|
/**
|
@@ -4087,8 +3905,7 @@ interface OnTickEvent extends EventData {
|
|
4087
3905
|
|
4088
3906
|
/**
|
4089
3907
|
* Called when a train changes state (started to stopped and vice versa)
|
4090
|
-
*
|
4091
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_train_changed_state View documentation}
|
3908
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_train_changed_state Online documentation}
|
4092
3909
|
*/
|
4093
3910
|
interface OnTrainChangedStateEvent extends EventData {
|
4094
3911
|
readonly train: LuaTrain
|
@@ -4105,8 +3922,7 @@ interface OnTrainChangedStateEvent extends EventData {
|
|
4105
3922
|
|
4106
3923
|
/**
|
4107
3924
|
* Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
|
4108
|
-
*
|
4109
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_train_created View documentation}
|
3925
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_train_created Online documentation}
|
4110
3926
|
*/
|
4111
3927
|
interface OnTrainCreatedEvent extends EventData {
|
4112
3928
|
readonly train: LuaTrain
|
@@ -4130,8 +3946,7 @@ interface OnTrainCreatedEvent extends EventData {
|
|
4130
3946
|
|
4131
3947
|
/**
|
4132
3948
|
* Called when a trains schedule is changed either by the player or through script.
|
4133
|
-
*
|
4134
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed View documentation}
|
3949
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed Online documentation}
|
4135
3950
|
*/
|
4136
3951
|
interface OnTrainScheduleChangedEvent extends EventData {
|
4137
3952
|
readonly train: LuaTrain
|
@@ -4151,8 +3966,7 @@ interface OnTrainScheduleChangedEvent extends EventData {
|
|
4151
3966
|
|
4152
3967
|
/**
|
4153
3968
|
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity="true"`.
|
4154
|
-
*
|
4155
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity View documentation}
|
3969
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity Online documentation}
|
4156
3970
|
*/
|
4157
3971
|
interface OnTriggerCreatedEntityEvent extends EventData {
|
4158
3972
|
readonly entity: LuaEntity
|
@@ -4169,8 +3983,7 @@ interface OnTriggerCreatedEntityEvent extends EventData {
|
|
4169
3983
|
|
4170
3984
|
/**
|
4171
3985
|
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery="true"`.
|
4172
|
-
*
|
4173
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery View documentation}
|
3986
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery Online documentation}
|
4174
3987
|
*/
|
4175
3988
|
interface OnTriggerFiredArtilleryEvent extends EventData {
|
4176
3989
|
readonly entity: LuaEntity
|
@@ -4187,8 +4000,7 @@ interface OnTriggerFiredArtilleryEvent extends EventData {
|
|
4187
4000
|
|
4188
4001
|
/**
|
4189
4002
|
* Called when a unit is added to a unit group.
|
4190
|
-
*
|
4191
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group View documentation}
|
4003
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group Online documentation}
|
4192
4004
|
*/
|
4193
4005
|
interface OnUnitAddedToGroupEvent extends EventData {
|
4194
4006
|
readonly unit: LuaEntity
|
@@ -4205,8 +4017,7 @@ interface OnUnitAddedToGroupEvent extends EventData {
|
|
4205
4017
|
|
4206
4018
|
/**
|
4207
4019
|
* Called when a new unit group is created, before any members are added to it.
|
4208
|
-
*
|
4209
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_unit_group_created View documentation}
|
4020
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_unit_group_created Online documentation}
|
4210
4021
|
*/
|
4211
4022
|
interface OnUnitGroupCreatedEvent extends EventData {
|
4212
4023
|
readonly group: LuaUnitGroup
|
@@ -4222,8 +4033,7 @@ interface OnUnitGroupCreatedEvent extends EventData {
|
|
4222
4033
|
|
4223
4034
|
/**
|
4224
4035
|
* Called when a unit group finishes gathering and starts executing its command.
|
4225
|
-
*
|
4226
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering View documentation}
|
4036
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering Online documentation}
|
4227
4037
|
*/
|
4228
4038
|
interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
4229
4039
|
readonly group: LuaUnitGroup
|
@@ -4239,8 +4049,7 @@ interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
|
4239
4049
|
|
4240
4050
|
/**
|
4241
4051
|
* Called when a unit is removed from a unit group.
|
4242
|
-
*
|
4243
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group View documentation}
|
4052
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group Online documentation}
|
4244
4053
|
*/
|
4245
4054
|
interface OnUnitRemovedFromGroupEvent extends EventData {
|
4246
4055
|
readonly unit: LuaEntity
|
@@ -4257,8 +4066,7 @@ interface OnUnitRemovedFromGroupEvent extends EventData {
|
|
4257
4066
|
|
4258
4067
|
/**
|
4259
4068
|
* Called when a worker (construction or logistic) robot expires through a lack of energy.
|
4260
|
-
*
|
4261
|
-
* {@link https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired View documentation}
|
4069
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired Online documentation}
|
4262
4070
|
*/
|
4263
4071
|
interface OnWorkerRobotExpiredEvent extends EventData {
|
4264
4072
|
readonly robot: LuaEntity
|
@@ -4274,8 +4082,7 @@ interface OnWorkerRobotExpiredEvent extends EventData {
|
|
4274
4082
|
|
4275
4083
|
/**
|
4276
4084
|
* 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}. Can be filtered using {@link LuaScriptRaisedBuiltEventFilter}.
|
4277
|
-
*
|
4278
|
-
* {@link https://lua-api.factorio.com/latest/events.html#script_raised_built View documentation}
|
4085
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#script_raised_built Online documentation}
|
4279
4086
|
*/
|
4280
4087
|
interface ScriptRaisedBuiltEvent extends EventData {
|
4281
4088
|
/**
|
@@ -4294,8 +4101,7 @@ interface ScriptRaisedBuiltEvent extends EventData {
|
|
4294
4101
|
|
4295
4102
|
/**
|
4296
4103
|
* 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}. Can be filtered using {@link LuaScriptRaisedDestroyEventFilter}.
|
4297
|
-
*
|
4298
|
-
* {@link https://lua-api.factorio.com/latest/events.html#script_raised_destroy View documentation}
|
4104
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#script_raised_destroy Online documentation}
|
4299
4105
|
*/
|
4300
4106
|
interface ScriptRaisedDestroyEvent extends EventData {
|
4301
4107
|
/**
|
@@ -4314,8 +4120,7 @@ interface ScriptRaisedDestroyEvent extends EventData {
|
|
4314
4120
|
|
4315
4121
|
/**
|
4316
4122
|
* 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}. Can be filtered using {@link LuaScriptRaisedReviveEventFilter}.
|
4317
|
-
*
|
4318
|
-
* {@link https://lua-api.factorio.com/latest/events.html#script_raised_revive View documentation}
|
4123
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#script_raised_revive Online documentation}
|
4319
4124
|
*/
|
4320
4125
|
interface ScriptRaisedReviveEvent extends EventData {
|
4321
4126
|
/**
|
@@ -4338,8 +4143,7 @@ interface ScriptRaisedReviveEvent extends EventData {
|
|
4338
4143
|
|
4339
4144
|
/**
|
4340
4145
|
* 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}.
|
4341
|
-
*
|
4342
|
-
* {@link https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles View documentation}
|
4146
|
+
* @see {@link https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles Online documentation}
|
4343
4147
|
*/
|
4344
4148
|
interface ScriptRaisedSetTilesEvent extends EventData {
|
4345
4149
|
/**
|
@@ -4349,7 +4153,7 @@ interface ScriptRaisedSetTilesEvent extends EventData {
|
|
4349
4153
|
/**
|
4350
4154
|
* The tiles that were changed.
|
4351
4155
|
*/
|
4352
|
-
readonly tiles:
|
4156
|
+
readonly tiles: Tile[]
|
4353
4157
|
/**
|
4354
4158
|
* Identifier of the event
|
4355
4159
|
*/
|