typed-factorio 2.10.1 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +0 -1
- package/package.json +6 -4
- package/prototype/generated/prototypes.d.ts +1747 -1735
- package/prototype/generated/types.d.ts +1485 -1466
- package/runtime/generated/classes.d.ts +4603 -4106
- package/runtime/generated/concepts.d.ts +718 -801
- package/runtime/generated/defines.d.ts +501 -573
- package/runtime/generated/events.d.ts +304 -239
- package/runtime/generated/global-functions.d.ts +8 -8
- package/runtime/generated/global-objects.d.ts +6 -6
- package/runtime/generated/builtin-types.d.ts +0 -66
@@ -8,11 +8,12 @@
|
|
8
8
|
declare module "factorio:runtime" {
|
9
9
|
/**
|
10
10
|
* Called when a {@link import("factorio:prototype").CustomInputPrototype CustomInputPrototype} is activated.
|
11
|
-
* @example
|
11
|
+
* @example
|
12
|
+
* -- This will be raised when a custom input with the name "my-potato-control" and action "lua" is pressed
|
12
13
|
* script.on_event("my-potato-control", function(event)
|
13
14
|
* game.print("Keyboard shortcut pressed on tick: " ..tostring(event.tick))
|
14
15
|
* end)
|
15
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
16
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#CustomInputEvent Online documentation}
|
16
17
|
*/
|
17
18
|
interface CustomInputEvent extends EventData {
|
18
19
|
/**
|
@@ -46,7 +47,7 @@ declare module "factorio:runtime" {
|
|
46
47
|
}
|
47
48
|
/**
|
48
49
|
* Called when a unit/group completes a command.
|
49
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
50
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_ai_command_completed Online documentation}
|
50
51
|
*/
|
51
52
|
interface OnAiCommandCompletedEvent extends EventData {
|
52
53
|
/**
|
@@ -69,7 +70,7 @@ declare module "factorio:runtime" {
|
|
69
70
|
}
|
70
71
|
/**
|
71
72
|
* Called when an area of the map is cloned.
|
72
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
73
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_area_cloned Online documentation}
|
73
74
|
*/
|
74
75
|
interface OnAreaClonedEvent extends EventData {
|
75
76
|
readonly source_surface: LuaSurface
|
@@ -93,8 +94,9 @@ declare module "factorio:runtime" {
|
|
93
94
|
}
|
94
95
|
/**
|
95
96
|
* Called when a biter migration builds a base.
|
96
|
-
*
|
97
|
-
*
|
97
|
+
*
|
98
|
+
* This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
99
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_biter_base_built Online documentation}
|
98
100
|
*/
|
99
101
|
interface OnBiterBaseBuiltEvent extends EventData {
|
100
102
|
/**
|
@@ -112,7 +114,7 @@ declare module "factorio:runtime" {
|
|
112
114
|
}
|
113
115
|
/**
|
114
116
|
* Called when a set of positions on the map is cloned.
|
115
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
117
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_brush_cloned Online documentation}
|
116
118
|
*/
|
117
119
|
interface OnBrushClonedEvent extends EventData {
|
118
120
|
readonly source_offset: TilePosition
|
@@ -137,7 +139,7 @@ declare module "factorio:runtime" {
|
|
137
139
|
}
|
138
140
|
/**
|
139
141
|
* Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
|
140
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
142
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_build_base_arrived Online documentation}
|
141
143
|
*/
|
142
144
|
interface OnBuildBaseArrivedEvent extends EventData {
|
143
145
|
/**
|
@@ -158,8 +160,10 @@ declare module "factorio:runtime" {
|
|
158
160
|
readonly tick: uint
|
159
161
|
}
|
160
162
|
/**
|
161
|
-
* Called when player builds something.
|
162
|
-
*
|
163
|
+
* Called when player builds something.
|
164
|
+
*
|
165
|
+
* Event filter: [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter]
|
166
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_built_entity Online documentation}
|
163
167
|
*/
|
164
168
|
interface OnBuiltEntityEvent extends EventData {
|
165
169
|
readonly created_entity: LuaEntity
|
@@ -183,8 +187,10 @@ declare module "factorio:runtime" {
|
|
183
187
|
readonly tick: uint
|
184
188
|
}
|
185
189
|
/**
|
186
|
-
* Called when the deconstruction of an entity is canceled.
|
187
|
-
*
|
190
|
+
* Called when the deconstruction of an entity is canceled.
|
191
|
+
*
|
192
|
+
* Event filter: [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter]
|
193
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_cancelled_deconstruction Online documentation}
|
188
194
|
*/
|
189
195
|
interface OnCancelledDeconstructionEvent extends EventData {
|
190
196
|
readonly entity: LuaEntity
|
@@ -199,8 +205,10 @@ declare module "factorio:runtime" {
|
|
199
205
|
readonly tick: uint
|
200
206
|
}
|
201
207
|
/**
|
202
|
-
* Called when the upgrade of an entity is canceled.
|
203
|
-
*
|
208
|
+
* Called when the upgrade of an entity is canceled.
|
209
|
+
*
|
210
|
+
* Event filter: [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter]
|
211
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_cancelled_upgrade Online documentation}
|
204
212
|
*/
|
205
213
|
interface OnCancelledUpgradeEvent extends EventData {
|
206
214
|
readonly entity: LuaEntity
|
@@ -218,8 +226,9 @@ declare module "factorio:runtime" {
|
|
218
226
|
}
|
219
227
|
/**
|
220
228
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
221
|
-
*
|
222
|
-
*
|
229
|
+
*
|
230
|
+
* This is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
231
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_character_corpse_expired Online documentation}
|
223
232
|
*/
|
224
233
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
225
234
|
/**
|
@@ -237,7 +246,7 @@ declare module "factorio:runtime" {
|
|
237
246
|
}
|
238
247
|
/**
|
239
248
|
* Called when a chart tag is created.
|
240
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
249
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_chart_tag_added Online documentation}
|
241
250
|
*/
|
242
251
|
interface OnChartTagAddedEvent extends EventData {
|
243
252
|
readonly tag: LuaCustomChartTag
|
@@ -254,7 +263,7 @@ declare module "factorio:runtime" {
|
|
254
263
|
}
|
255
264
|
/**
|
256
265
|
* Called when a chart tag is modified by a player.
|
257
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
266
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_chart_tag_modified Online documentation}
|
258
267
|
*/
|
259
268
|
interface OnChartTagModifiedEvent extends EventData {
|
260
269
|
readonly tag: LuaCustomChartTag
|
@@ -274,7 +283,7 @@ declare module "factorio:runtime" {
|
|
274
283
|
}
|
275
284
|
/**
|
276
285
|
* Called just before a chart tag is deleted.
|
277
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
286
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_chart_tag_removed Online documentation}
|
278
287
|
*/
|
279
288
|
interface OnChartTagRemovedEvent extends EventData {
|
280
289
|
readonly tag: LuaCustomChartTag
|
@@ -291,7 +300,7 @@ declare module "factorio:runtime" {
|
|
291
300
|
}
|
292
301
|
/**
|
293
302
|
* Called when a chunk is charted or re-charted.
|
294
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
303
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_chunk_charted Online documentation}
|
295
304
|
*/
|
296
305
|
interface OnChunkChartedEvent extends EventData {
|
297
306
|
readonly surface_index: SurfaceIndex
|
@@ -312,7 +321,7 @@ declare module "factorio:runtime" {
|
|
312
321
|
}
|
313
322
|
/**
|
314
323
|
* Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
315
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
324
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_chunk_deleted Online documentation}
|
316
325
|
*/
|
317
326
|
interface OnChunkDeletedEvent extends EventData {
|
318
327
|
readonly surface_index: SurfaceIndex
|
@@ -331,7 +340,7 @@ declare module "factorio:runtime" {
|
|
331
340
|
}
|
332
341
|
/**
|
333
342
|
* Called when a chunk is generated.
|
334
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
343
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_chunk_generated Online documentation}
|
335
344
|
*/
|
336
345
|
interface OnChunkGeneratedEvent extends EventData {
|
337
346
|
/**
|
@@ -357,7 +366,7 @@ declare module "factorio:runtime" {
|
|
357
366
|
}
|
358
367
|
/**
|
359
368
|
* Called when a combat robot expires through a lack of energy, or timeout.
|
360
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
369
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_combat_robot_expired Online documentation}
|
361
370
|
*/
|
362
371
|
interface OnCombatRobotExpiredEvent extends EventData {
|
363
372
|
readonly robot: LuaEntity
|
@@ -376,8 +385,9 @@ declare module "factorio:runtime" {
|
|
376
385
|
}
|
377
386
|
/**
|
378
387
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
379
|
-
*
|
380
|
-
*
|
388
|
+
*
|
389
|
+
* This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
390
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_console_chat Online documentation}
|
381
391
|
*/
|
382
392
|
interface OnConsoleChatEvent extends EventData {
|
383
393
|
/**
|
@@ -399,7 +409,7 @@ declare module "factorio:runtime" {
|
|
399
409
|
}
|
400
410
|
/**
|
401
411
|
* Called when someone enters a command-like message regardless of it being a valid command.
|
402
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
412
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_console_command Online documentation}
|
403
413
|
*/
|
404
414
|
interface OnConsoleCommandEvent extends EventData {
|
405
415
|
/**
|
@@ -425,7 +435,7 @@ declare module "factorio:runtime" {
|
|
425
435
|
}
|
426
436
|
/**
|
427
437
|
* Called when a cutscene is cancelled by the player or by script.
|
428
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
438
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_cutscene_cancelled Online documentation}
|
429
439
|
*/
|
430
440
|
interface OnCutsceneCancelledEvent extends EventData {
|
431
441
|
/**
|
@@ -443,7 +453,7 @@ declare module "factorio:runtime" {
|
|
443
453
|
}
|
444
454
|
/**
|
445
455
|
* Called when a cutscene finishes naturally (was not cancelled).
|
446
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
456
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_cutscene_finished Online documentation}
|
447
457
|
*/
|
448
458
|
interface OnCutsceneFinishedEvent extends EventData {
|
449
459
|
/**
|
@@ -461,7 +471,7 @@ declare module "factorio:runtime" {
|
|
461
471
|
}
|
462
472
|
/**
|
463
473
|
* Called when a cutscene starts.
|
464
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
474
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_cutscene_started Online documentation}
|
465
475
|
*/
|
466
476
|
interface OnCutsceneStartedEvent extends EventData {
|
467
477
|
/**
|
@@ -481,8 +491,9 @@ declare module "factorio:runtime" {
|
|
481
491
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
482
492
|
*
|
483
493
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
484
|
-
*
|
485
|
-
*
|
494
|
+
*
|
495
|
+
* Due to implementation omission, `waypoint_index` is 0-based.
|
496
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_cutscene_waypoint_reached Online documentation}
|
486
497
|
*/
|
487
498
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
488
499
|
/**
|
@@ -504,8 +515,9 @@ declare module "factorio:runtime" {
|
|
504
515
|
}
|
505
516
|
/**
|
506
517
|
* Called when the map difficulty settings are changed.
|
507
|
-
*
|
508
|
-
*
|
518
|
+
*
|
519
|
+
* It's not guaranteed that both settings are changed - just that at least one has been changed.
|
520
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_difficulty_settings_changed Online documentation}
|
509
521
|
*/
|
510
522
|
interface OnDifficultySettingsChangedEvent extends EventData {
|
511
523
|
readonly old_recipe_difficulty: uint
|
@@ -520,8 +532,10 @@ declare module "factorio:runtime" {
|
|
520
532
|
readonly tick: uint
|
521
533
|
}
|
522
534
|
/**
|
523
|
-
* Called when an entity is cloned.
|
524
|
-
*
|
535
|
+
* Called when an entity is cloned. The filter applies to the source entity.
|
536
|
+
*
|
537
|
+
* Event filter: [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter]
|
538
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_cloned Online documentation}
|
525
539
|
*/
|
526
540
|
interface OnEntityClonedEvent extends EventData {
|
527
541
|
readonly source: LuaEntity
|
@@ -537,8 +551,9 @@ declare module "factorio:runtime" {
|
|
537
551
|
}
|
538
552
|
/**
|
539
553
|
* Called after an entity has been recolored either by the player or through script.
|
540
|
-
*
|
541
|
-
*
|
554
|
+
*
|
555
|
+
* Automatic recoloring due to {@link LuaPlayer#color LuaPlayer::color} will not raise events, as that is a separate mechanism.
|
556
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_color_changed Online documentation}
|
542
557
|
*/
|
543
558
|
interface OnEntityColorChangedEvent extends EventData {
|
544
559
|
/**
|
@@ -555,9 +570,10 @@ declare module "factorio:runtime" {
|
|
555
570
|
readonly tick: uint
|
556
571
|
}
|
557
572
|
/**
|
558
|
-
* Called when an entity is damaged.
|
559
|
-
*
|
560
|
-
*
|
573
|
+
* Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
|
574
|
+
*
|
575
|
+
* Event filter: [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter]
|
576
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_damaged Online documentation}
|
561
577
|
*/
|
562
578
|
interface OnEntityDamagedEvent extends EventData {
|
563
579
|
readonly entity: LuaEntity
|
@@ -593,8 +609,9 @@ declare module "factorio:runtime" {
|
|
593
609
|
}
|
594
610
|
/**
|
595
611
|
* Called after an entity is destroyed that has been registered with {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap::register_on_entity_destroyed}.
|
596
|
-
*
|
597
|
-
*
|
612
|
+
*
|
613
|
+
* 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.
|
614
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_destroyed Online documentation}
|
598
615
|
*/
|
599
616
|
interface OnEntityDestroyedEvent extends EventData {
|
600
617
|
/**
|
@@ -615,8 +632,10 @@ declare module "factorio:runtime" {
|
|
615
632
|
readonly tick: uint
|
616
633
|
}
|
617
634
|
/**
|
618
|
-
* Called when an entity dies.
|
619
|
-
*
|
635
|
+
* Called when an entity dies.
|
636
|
+
*
|
637
|
+
* Event filter: [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter]
|
638
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_died Online documentation}
|
620
639
|
*/
|
621
640
|
interface OnEntityDiedEvent extends EventData {
|
622
641
|
/**
|
@@ -650,8 +669,9 @@ declare module "factorio:runtime" {
|
|
650
669
|
}
|
651
670
|
/**
|
652
671
|
* Called when one of an entity's personal logistic slots changes.
|
653
|
-
*
|
654
|
-
*
|
672
|
+
*
|
673
|
+
* "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
|
674
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_logistic_slot_changed Online documentation}
|
655
675
|
*/
|
656
676
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
657
677
|
/**
|
@@ -677,7 +697,7 @@ declare module "factorio:runtime" {
|
|
677
697
|
}
|
678
698
|
/**
|
679
699
|
* Called after an entity has been renamed either by the player or through script.
|
680
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
700
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_renamed Online documentation}
|
681
701
|
*/
|
682
702
|
interface OnEntityRenamedEvent extends EventData {
|
683
703
|
/**
|
@@ -698,7 +718,7 @@ declare module "factorio:runtime" {
|
|
698
718
|
}
|
699
719
|
/**
|
700
720
|
* Called after entity copy-paste is done.
|
701
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
721
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_settings_pasted Online documentation}
|
702
722
|
*/
|
703
723
|
interface OnEntitySettingsPastedEvent extends EventData {
|
704
724
|
readonly player_index: PlayerIndex
|
@@ -721,7 +741,7 @@ declare module "factorio:runtime" {
|
|
721
741
|
}
|
722
742
|
/**
|
723
743
|
* Called when an entity is spawned by a EnemySpawner
|
724
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
744
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_entity_spawned Online documentation}
|
725
745
|
*/
|
726
746
|
interface OnEntitySpawnedEvent extends EventData {
|
727
747
|
readonly spawner: LuaEntity
|
@@ -737,7 +757,7 @@ declare module "factorio:runtime" {
|
|
737
757
|
}
|
738
758
|
/**
|
739
759
|
* Called after equipment is inserted into an equipment grid.
|
740
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
760
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_equipment_inserted Online documentation}
|
741
761
|
*/
|
742
762
|
interface OnEquipmentInsertedEvent extends EventData {
|
743
763
|
/**
|
@@ -759,7 +779,7 @@ declare module "factorio:runtime" {
|
|
759
779
|
}
|
760
780
|
/**
|
761
781
|
* Called after equipment is removed from an equipment grid.
|
762
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
782
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_equipment_removed Online documentation}
|
763
783
|
*/
|
764
784
|
interface OnEquipmentRemovedEvent extends EventData {
|
765
785
|
/**
|
@@ -785,7 +805,7 @@ declare module "factorio:runtime" {
|
|
785
805
|
}
|
786
806
|
/**
|
787
807
|
* Called when the a forces cease fire values change.
|
788
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
808
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_force_cease_fire_changed Online documentation}
|
789
809
|
*/
|
790
810
|
interface OnForceCeaseFireChangedEvent extends EventData {
|
791
811
|
/**
|
@@ -811,8 +831,9 @@ declare module "factorio:runtime" {
|
|
811
831
|
}
|
812
832
|
/**
|
813
833
|
* Called when a new force is created using `game.create_force()`
|
814
|
-
*
|
815
|
-
*
|
834
|
+
*
|
835
|
+
* This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
836
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_force_created Online documentation}
|
816
837
|
*/
|
817
838
|
interface OnForceCreatedEvent extends EventData {
|
818
839
|
/**
|
@@ -830,7 +851,7 @@ declare module "factorio:runtime" {
|
|
830
851
|
}
|
831
852
|
/**
|
832
853
|
* Called when the a forces friends change.
|
833
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
854
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_force_friends_changed Online documentation}
|
834
855
|
*/
|
835
856
|
interface OnForceFriendsChangedEvent extends EventData {
|
836
857
|
/**
|
@@ -856,7 +877,7 @@ declare module "factorio:runtime" {
|
|
856
877
|
}
|
857
878
|
/**
|
858
879
|
* Called when {@link LuaForce#reset LuaForce::reset} is finished.
|
859
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
880
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_force_reset Online documentation}
|
860
881
|
*/
|
861
882
|
interface OnForceResetEvent extends EventData {
|
862
883
|
readonly force: LuaForce
|
@@ -871,8 +892,9 @@ declare module "factorio:runtime" {
|
|
871
892
|
}
|
872
893
|
/**
|
873
894
|
* Called after two forces have been merged using `game.merge_forces()`.
|
874
|
-
*
|
875
|
-
*
|
895
|
+
*
|
896
|
+
* The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
897
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_forces_merged Online documentation}
|
876
898
|
*/
|
877
899
|
interface OnForcesMergedEvent extends EventData {
|
878
900
|
/**
|
@@ -898,7 +920,7 @@ declare module "factorio:runtime" {
|
|
898
920
|
}
|
899
921
|
/**
|
900
922
|
* Called when two forces are about to be merged using `game.merge_forces()`.
|
901
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
923
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_forces_merging Online documentation}
|
902
924
|
*/
|
903
925
|
interface OnForcesMergingEvent extends EventData {
|
904
926
|
/**
|
@@ -920,8 +942,9 @@ declare module "factorio:runtime" {
|
|
920
942
|
}
|
921
943
|
/**
|
922
944
|
* 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.
|
923
|
-
*
|
924
|
-
*
|
945
|
+
*
|
946
|
+
* This event is not fired when the scenario is loaded via the map editor.
|
947
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_game_created_from_scenario Online documentation}
|
925
948
|
*/
|
926
949
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
927
950
|
/**
|
@@ -935,7 +958,7 @@ declare module "factorio:runtime" {
|
|
935
958
|
}
|
936
959
|
/**
|
937
960
|
* Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
|
938
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
961
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_checked_state_changed Online documentation}
|
939
962
|
*/
|
940
963
|
interface OnGuiCheckedStateChangedEvent extends EventData {
|
941
964
|
/**
|
@@ -957,7 +980,7 @@ declare module "factorio:runtime" {
|
|
957
980
|
}
|
958
981
|
/**
|
959
982
|
* Called when {@link LuaGuiElement} is clicked.
|
960
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
983
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_click Online documentation}
|
961
984
|
*/
|
962
985
|
interface OnGuiClickEvent extends EventData {
|
963
986
|
/**
|
@@ -1001,8 +1024,9 @@ declare module "factorio:runtime" {
|
|
1001
1024
|
* Called when the player closes the GUI they have open.
|
1002
1025
|
*
|
1003
1026
|
* 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.
|
1004
|
-
*
|
1005
|
-
*
|
1027
|
+
*
|
1028
|
+
* 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.
|
1029
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_closed Online documentation}
|
1006
1030
|
*/
|
1007
1031
|
interface OnGuiClosedEvent extends EventData {
|
1008
1032
|
/**
|
@@ -1056,7 +1080,7 @@ declare module "factorio:runtime" {
|
|
1056
1080
|
}
|
1057
1081
|
/**
|
1058
1082
|
* Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
|
1059
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1083
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_confirmed Online documentation}
|
1060
1084
|
*/
|
1061
1085
|
interface OnGuiConfirmedEvent extends EventData {
|
1062
1086
|
/**
|
@@ -1090,7 +1114,7 @@ declare module "factorio:runtime" {
|
|
1090
1114
|
}
|
1091
1115
|
/**
|
1092
1116
|
* Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
|
1093
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1117
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_elem_changed Online documentation}
|
1094
1118
|
*/
|
1095
1119
|
interface OnGuiElemChangedEvent extends EventData {
|
1096
1120
|
/**
|
@@ -1112,7 +1136,7 @@ declare module "factorio:runtime" {
|
|
1112
1136
|
}
|
1113
1137
|
/**
|
1114
1138
|
* Called when {@link LuaGuiElement} is hovered by the mouse.
|
1115
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1139
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_hover Online documentation}
|
1116
1140
|
*/
|
1117
1141
|
interface OnGuiHoverEvent extends EventData {
|
1118
1142
|
/**
|
@@ -1134,7 +1158,7 @@ declare module "factorio:runtime" {
|
|
1134
1158
|
}
|
1135
1159
|
/**
|
1136
1160
|
* Called when the player's cursor leaves a {@link LuaGuiElement} that was previously hovered.
|
1137
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1161
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_leave Online documentation}
|
1138
1162
|
*/
|
1139
1163
|
interface OnGuiLeaveEvent extends EventData {
|
1140
1164
|
/**
|
@@ -1156,7 +1180,7 @@ declare module "factorio:runtime" {
|
|
1156
1180
|
}
|
1157
1181
|
/**
|
1158
1182
|
* Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
|
1159
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1183
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_location_changed Online documentation}
|
1160
1184
|
*/
|
1161
1185
|
interface OnGuiLocationChangedEvent extends EventData {
|
1162
1186
|
/**
|
@@ -1178,7 +1202,7 @@ declare module "factorio:runtime" {
|
|
1178
1202
|
}
|
1179
1203
|
/**
|
1180
1204
|
* Called when the player opens a GUI.
|
1181
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1205
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_opened Online documentation}
|
1182
1206
|
*/
|
1183
1207
|
interface OnGuiOpenedEvent extends EventData {
|
1184
1208
|
/**
|
@@ -1224,7 +1248,7 @@ declare module "factorio:runtime" {
|
|
1224
1248
|
}
|
1225
1249
|
/**
|
1226
1250
|
* Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
|
1227
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1251
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_selected_tab_changed Online documentation}
|
1228
1252
|
*/
|
1229
1253
|
interface OnGuiSelectedTabChangedEvent extends EventData {
|
1230
1254
|
/**
|
@@ -1246,7 +1270,7 @@ declare module "factorio:runtime" {
|
|
1246
1270
|
}
|
1247
1271
|
/**
|
1248
1272
|
* Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
|
1249
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1273
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_selection_state_changed Online documentation}
|
1250
1274
|
*/
|
1251
1275
|
interface OnGuiSelectionStateChangedEvent extends EventData {
|
1252
1276
|
/**
|
@@ -1268,7 +1292,7 @@ declare module "factorio:runtime" {
|
|
1268
1292
|
}
|
1269
1293
|
/**
|
1270
1294
|
* Called when {@link LuaGuiElement} switch state is changed (related to switches).
|
1271
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1295
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_switch_state_changed Online documentation}
|
1272
1296
|
*/
|
1273
1297
|
interface OnGuiSwitchStateChangedEvent extends EventData {
|
1274
1298
|
/**
|
@@ -1290,7 +1314,7 @@ declare module "factorio:runtime" {
|
|
1290
1314
|
}
|
1291
1315
|
/**
|
1292
1316
|
* Called when {@link LuaGuiElement} text is changed by the player.
|
1293
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1317
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_text_changed Online documentation}
|
1294
1318
|
*/
|
1295
1319
|
interface OnGuiTextChangedEvent extends EventData {
|
1296
1320
|
/**
|
@@ -1316,7 +1340,7 @@ declare module "factorio:runtime" {
|
|
1316
1340
|
}
|
1317
1341
|
/**
|
1318
1342
|
* Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
|
1319
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1343
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_gui_value_changed Online documentation}
|
1320
1344
|
*/
|
1321
1345
|
interface OnGuiValueChangedEvent extends EventData {
|
1322
1346
|
/**
|
@@ -1338,7 +1362,7 @@ declare module "factorio:runtime" {
|
|
1338
1362
|
}
|
1339
1363
|
/**
|
1340
1364
|
* Called when a land mine is armed.
|
1341
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1365
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_land_mine_armed Online documentation}
|
1342
1366
|
*/
|
1343
1367
|
interface OnLandMineArmedEvent extends EventData {
|
1344
1368
|
readonly mine: LuaEntity
|
@@ -1353,7 +1377,7 @@ declare module "factorio:runtime" {
|
|
1353
1377
|
}
|
1354
1378
|
/**
|
1355
1379
|
* Called when a custom {@link import("factorio:prototype").ShortcutPrototype Lua shortcut} is pressed.
|
1356
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1380
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_lua_shortcut Online documentation}
|
1357
1381
|
*/
|
1358
1382
|
interface OnLuaShortcutEvent extends EventData {
|
1359
1383
|
readonly player_index: PlayerIndex
|
@@ -1371,8 +1395,10 @@ declare module "factorio:runtime" {
|
|
1371
1395
|
readonly tick: uint
|
1372
1396
|
}
|
1373
1397
|
/**
|
1374
|
-
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
|
1375
|
-
*
|
1398
|
+
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
|
1399
|
+
*
|
1400
|
+
* Event filter: [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter]
|
1401
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_marked_for_deconstruction Online documentation}
|
1376
1402
|
*/
|
1377
1403
|
interface OnMarkedForDeconstructionEvent extends EventData {
|
1378
1404
|
readonly entity: LuaEntity
|
@@ -1387,8 +1413,10 @@ declare module "factorio:runtime" {
|
|
1387
1413
|
readonly tick: uint
|
1388
1414
|
}
|
1389
1415
|
/**
|
1390
|
-
* Called when an entity is marked for upgrade with the Upgrade planner or via script.
|
1391
|
-
*
|
1416
|
+
* Called when an entity is marked for upgrade with the Upgrade planner or via script.
|
1417
|
+
*
|
1418
|
+
* Event filter: [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter]
|
1419
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_marked_for_upgrade Online documentation}
|
1392
1420
|
*/
|
1393
1421
|
interface OnMarkedForUpgradeEvent extends EventData {
|
1394
1422
|
readonly entity: LuaEntity
|
@@ -1409,7 +1437,7 @@ declare module "factorio:runtime" {
|
|
1409
1437
|
}
|
1410
1438
|
/**
|
1411
1439
|
* Called after a player purchases some offer from a `market` entity.
|
1412
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1440
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_market_item_purchased Online documentation}
|
1413
1441
|
*/
|
1414
1442
|
interface OnMarketItemPurchasedEvent extends EventData {
|
1415
1443
|
/**
|
@@ -1439,7 +1467,7 @@ declare module "factorio:runtime" {
|
|
1439
1467
|
}
|
1440
1468
|
/**
|
1441
1469
|
* Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
|
1442
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1470
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_mod_item_opened Online documentation}
|
1443
1471
|
*/
|
1444
1472
|
interface OnModItemOpenedEvent extends EventData {
|
1445
1473
|
/**
|
@@ -1461,7 +1489,7 @@ declare module "factorio:runtime" {
|
|
1461
1489
|
}
|
1462
1490
|
/**
|
1463
1491
|
* Called directly after a permission group is added.
|
1464
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1492
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_permission_group_added Online documentation}
|
1465
1493
|
*/
|
1466
1494
|
interface OnPermissionGroupAddedEvent extends EventData {
|
1467
1495
|
/**
|
@@ -1483,7 +1511,7 @@ declare module "factorio:runtime" {
|
|
1483
1511
|
}
|
1484
1512
|
/**
|
1485
1513
|
* Called directly after a permission group is deleted.
|
1486
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1514
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_permission_group_deleted Online documentation}
|
1487
1515
|
*/
|
1488
1516
|
interface OnPermissionGroupDeletedEvent extends EventData {
|
1489
1517
|
/**
|
@@ -1509,7 +1537,7 @@ declare module "factorio:runtime" {
|
|
1509
1537
|
}
|
1510
1538
|
/**
|
1511
1539
|
* Called directly after a permission group is edited in some way.
|
1512
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1540
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_permission_group_edited Online documentation}
|
1513
1541
|
*/
|
1514
1542
|
interface OnPermissionGroupEditedEvent extends EventData {
|
1515
1543
|
/**
|
@@ -1521,7 +1549,7 @@ declare module "factorio:runtime" {
|
|
1521
1549
|
*/
|
1522
1550
|
readonly group: LuaPermissionGroup
|
1523
1551
|
/**
|
1524
|
-
* The edit type
|
1552
|
+
* The edit type.
|
1525
1553
|
*/
|
1526
1554
|
readonly type:
|
1527
1555
|
| "add-permission"
|
@@ -1532,19 +1560,19 @@ declare module "factorio:runtime" {
|
|
1532
1560
|
| "remove-player"
|
1533
1561
|
| "rename"
|
1534
1562
|
/**
|
1535
|
-
* The action when the `type` is "add-permission" or "remove-permission"
|
1563
|
+
* The action when the `type` is `"add-permission"` or `"remove-permission"`.
|
1536
1564
|
*/
|
1537
1565
|
readonly action: defines.input_action
|
1538
1566
|
/**
|
1539
|
-
* The other player when the `type` is "add-player" or "remove-player"
|
1567
|
+
* The other player when the `type` is `"add-player"` or `"remove-player"`.
|
1540
1568
|
*/
|
1541
1569
|
readonly other_player_index: uint
|
1542
1570
|
/**
|
1543
|
-
* The old group name when the `type` is "rename"
|
1571
|
+
* The old group name when the `type` is `"rename"`.
|
1544
1572
|
*/
|
1545
1573
|
readonly old_name: string
|
1546
1574
|
/**
|
1547
|
-
* The new group name when the `type` is "rename"
|
1575
|
+
* The new group name when the `type` is `"rename"`.
|
1548
1576
|
*/
|
1549
1577
|
readonly new_name: string
|
1550
1578
|
/**
|
@@ -1558,7 +1586,7 @@ declare module "factorio:runtime" {
|
|
1558
1586
|
}
|
1559
1587
|
/**
|
1560
1588
|
* Called directly after a permission string is imported.
|
1561
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1589
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_permission_string_imported Online documentation}
|
1562
1590
|
*/
|
1563
1591
|
interface OnPermissionStringImportedEvent extends EventData {
|
1564
1592
|
/**
|
@@ -1576,7 +1604,7 @@ declare module "factorio:runtime" {
|
|
1576
1604
|
}
|
1577
1605
|
/**
|
1578
1606
|
* Called when a player picks up an item.
|
1579
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1607
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_picked_up_item Online documentation}
|
1580
1608
|
*/
|
1581
1609
|
interface OnPickedUpItemEvent extends EventData {
|
1582
1610
|
readonly item_stack: SimpleItemStack
|
@@ -1592,7 +1620,7 @@ declare module "factorio:runtime" {
|
|
1592
1620
|
}
|
1593
1621
|
/**
|
1594
1622
|
* Called after a player alt-reverse-selects an area with a selection-tool item.
|
1595
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1623
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_alt_reverse_selected_area Online documentation}
|
1596
1624
|
*/
|
1597
1625
|
interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
|
1598
1626
|
/**
|
@@ -1630,7 +1658,7 @@ declare module "factorio:runtime" {
|
|
1630
1658
|
}
|
1631
1659
|
/**
|
1632
1660
|
* Called after a player alt-selects an area with a selection-tool item.
|
1633
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1661
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_alt_selected_area Online documentation}
|
1634
1662
|
*/
|
1635
1663
|
interface OnPlayerAltSelectedAreaEvent extends EventData {
|
1636
1664
|
/**
|
@@ -1668,7 +1696,7 @@ declare module "factorio:runtime" {
|
|
1668
1696
|
}
|
1669
1697
|
/**
|
1670
1698
|
* Called after a players ammo inventory changed in some way.
|
1671
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1699
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_ammo_inventory_changed Online documentation}
|
1672
1700
|
*/
|
1673
1701
|
interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
1674
1702
|
readonly player_index: PlayerIndex
|
@@ -1683,7 +1711,7 @@ declare module "factorio:runtime" {
|
|
1683
1711
|
}
|
1684
1712
|
/**
|
1685
1713
|
* Called after a players armor inventory changed in some way.
|
1686
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1714
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_armor_inventory_changed Online documentation}
|
1687
1715
|
*/
|
1688
1716
|
interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
1689
1717
|
readonly player_index: PlayerIndex
|
@@ -1698,7 +1726,7 @@ declare module "factorio:runtime" {
|
|
1698
1726
|
}
|
1699
1727
|
/**
|
1700
1728
|
* Called when a player is banned.
|
1701
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1729
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_banned Online documentation}
|
1702
1730
|
*/
|
1703
1731
|
interface OnPlayerBannedEvent extends EventData {
|
1704
1732
|
/**
|
@@ -1728,7 +1756,7 @@ declare module "factorio:runtime" {
|
|
1728
1756
|
}
|
1729
1757
|
/**
|
1730
1758
|
* Called after a player builds tiles.
|
1731
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1759
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_built_tile Online documentation}
|
1732
1760
|
*/
|
1733
1761
|
interface OnPlayerBuiltTileEvent extends EventData {
|
1734
1762
|
readonly player_index: PlayerIndex
|
@@ -1749,7 +1777,7 @@ declare module "factorio:runtime" {
|
|
1749
1777
|
*/
|
1750
1778
|
readonly item?: LuaItemPrototype
|
1751
1779
|
/**
|
1752
|
-
* The stack used to build the tiles (may be empty if all of the items
|
1780
|
+
* The stack used to build the tiles (may be empty if all of the items were used to build the tiles).
|
1753
1781
|
*/
|
1754
1782
|
readonly stack?: LuaItemStack
|
1755
1783
|
/**
|
@@ -1763,7 +1791,7 @@ declare module "factorio:runtime" {
|
|
1763
1791
|
}
|
1764
1792
|
/**
|
1765
1793
|
* Called when a player cancels crafting.
|
1766
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1794
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_cancelled_crafting Online documentation}
|
1767
1795
|
*/
|
1768
1796
|
interface OnPlayerCancelledCraftingEvent extends EventData {
|
1769
1797
|
/**
|
@@ -1793,7 +1821,7 @@ declare module "factorio:runtime" {
|
|
1793
1821
|
}
|
1794
1822
|
/**
|
1795
1823
|
* Called after a player changes forces.
|
1796
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1824
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_changed_force Online documentation}
|
1797
1825
|
*/
|
1798
1826
|
interface OnPlayerChangedForceEvent extends EventData {
|
1799
1827
|
/**
|
@@ -1815,7 +1843,7 @@ declare module "factorio:runtime" {
|
|
1815
1843
|
}
|
1816
1844
|
/**
|
1817
1845
|
* Called when the tile position a player is located at changes.
|
1818
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1846
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_changed_position Online documentation}
|
1819
1847
|
*/
|
1820
1848
|
interface OnPlayerChangedPositionEvent extends EventData {
|
1821
1849
|
/**
|
@@ -1833,8 +1861,9 @@ declare module "factorio:runtime" {
|
|
1833
1861
|
}
|
1834
1862
|
/**
|
1835
1863
|
* Called after a player changes surfaces.
|
1836
|
-
*
|
1837
|
-
*
|
1864
|
+
*
|
1865
|
+
* In the instance a player is moved off a surface due to it being deleted this is not called.
|
1866
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_changed_surface Online documentation}
|
1838
1867
|
*/
|
1839
1868
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
1840
1869
|
/**
|
@@ -1856,7 +1885,7 @@ declare module "factorio:runtime" {
|
|
1856
1885
|
}
|
1857
1886
|
/**
|
1858
1887
|
* Called when cheat mode is disabled on a player.
|
1859
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1888
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_cheat_mode_disabled Online documentation}
|
1860
1889
|
*/
|
1861
1890
|
interface OnPlayerCheatModeDisabledEvent extends EventData {
|
1862
1891
|
/**
|
@@ -1874,7 +1903,7 @@ declare module "factorio:runtime" {
|
|
1874
1903
|
}
|
1875
1904
|
/**
|
1876
1905
|
* Called when cheat mode is enabled on a player.
|
1877
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1906
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_cheat_mode_enabled Online documentation}
|
1878
1907
|
*/
|
1879
1908
|
interface OnPlayerCheatModeEnabledEvent extends EventData {
|
1880
1909
|
/**
|
@@ -1892,7 +1921,7 @@ declare module "factorio:runtime" {
|
|
1892
1921
|
}
|
1893
1922
|
/**
|
1894
1923
|
* Called when a player clicks a gps tag
|
1895
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1924
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_clicked_gps_tag Online documentation}
|
1896
1925
|
*/
|
1897
1926
|
interface OnPlayerClickedGpsTagEvent extends EventData {
|
1898
1927
|
/**
|
@@ -1918,7 +1947,7 @@ declare module "factorio:runtime" {
|
|
1918
1947
|
}
|
1919
1948
|
/**
|
1920
1949
|
* Called when a player clicks the "confirm" button in the configure Blueprint GUI.
|
1921
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1950
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_configured_blueprint Online documentation}
|
1922
1951
|
*/
|
1923
1952
|
interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
1924
1953
|
/**
|
@@ -1936,7 +1965,7 @@ declare module "factorio:runtime" {
|
|
1936
1965
|
}
|
1937
1966
|
/**
|
1938
1967
|
* Called when a player configures spidertron remote to be connected with a given spidertron
|
1939
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1968
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_configured_spider_remote Online documentation}
|
1940
1969
|
*/
|
1941
1970
|
interface OnPlayerConfiguredSpiderRemoteEvent extends EventData {
|
1942
1971
|
/**
|
@@ -1958,7 +1987,7 @@ declare module "factorio:runtime" {
|
|
1958
1987
|
}
|
1959
1988
|
/**
|
1960
1989
|
* 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}).
|
1961
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
1990
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_crafted_item Online documentation}
|
1962
1991
|
*/
|
1963
1992
|
interface OnPlayerCraftedItemEvent extends EventData {
|
1964
1993
|
/**
|
@@ -1984,7 +2013,7 @@ declare module "factorio:runtime" {
|
|
1984
2013
|
}
|
1985
2014
|
/**
|
1986
2015
|
* Called after the player was created.
|
1987
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2016
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_created Online documentation}
|
1988
2017
|
*/
|
1989
2018
|
interface OnPlayerCreatedEvent extends EventData {
|
1990
2019
|
readonly player_index: PlayerIndex
|
@@ -1998,8 +2027,10 @@ declare module "factorio:runtime" {
|
|
1998
2027
|
readonly tick: uint
|
1999
2028
|
}
|
2000
2029
|
/**
|
2001
|
-
* Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
|
2002
|
-
*
|
2030
|
+
* Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
|
2031
|
+
*
|
2032
|
+
* This is fired in the same tick that the change happens, but not instantly.
|
2033
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_cursor_stack_changed Online documentation}
|
2003
2034
|
*/
|
2004
2035
|
interface OnPlayerCursorStackChangedEvent extends EventData {
|
2005
2036
|
readonly player_index: PlayerIndex
|
@@ -2014,7 +2045,7 @@ declare module "factorio:runtime" {
|
|
2014
2045
|
}
|
2015
2046
|
/**
|
2016
2047
|
* Called when a player selects an area with a deconstruction planner.
|
2017
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2048
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_deconstructed_area Online documentation}
|
2018
2049
|
*/
|
2019
2050
|
interface OnPlayerDeconstructedAreaEvent extends EventData {
|
2020
2051
|
/**
|
@@ -2048,7 +2079,7 @@ declare module "factorio:runtime" {
|
|
2048
2079
|
}
|
2049
2080
|
/**
|
2050
2081
|
* Called when a player is demoted.
|
2051
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2082
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_demoted Online documentation}
|
2052
2083
|
*/
|
2053
2084
|
interface OnPlayerDemotedEvent extends EventData {
|
2054
2085
|
/**
|
@@ -2066,7 +2097,7 @@ declare module "factorio:runtime" {
|
|
2066
2097
|
}
|
2067
2098
|
/**
|
2068
2099
|
* Called after a player dies.
|
2069
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2100
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_died Online documentation}
|
2070
2101
|
*/
|
2071
2102
|
interface OnPlayerDiedEvent extends EventData {
|
2072
2103
|
readonly player_index: PlayerIndex
|
@@ -2082,7 +2113,7 @@ declare module "factorio:runtime" {
|
|
2082
2113
|
}
|
2083
2114
|
/**
|
2084
2115
|
* Called when the display resolution changes for a given player.
|
2085
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2116
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_display_resolution_changed Online documentation}
|
2086
2117
|
*/
|
2087
2118
|
interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
2088
2119
|
/**
|
@@ -2104,7 +2135,7 @@ declare module "factorio:runtime" {
|
|
2104
2135
|
}
|
2105
2136
|
/**
|
2106
2137
|
* Called when the display scale changes for a given player.
|
2107
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2138
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_display_scale_changed Online documentation}
|
2108
2139
|
*/
|
2109
2140
|
interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
2110
2141
|
/**
|
@@ -2126,8 +2157,9 @@ declare module "factorio:runtime" {
|
|
2126
2157
|
}
|
2127
2158
|
/**
|
2128
2159
|
* Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
|
2129
|
-
*
|
2130
|
-
*
|
2160
|
+
*
|
2161
|
+
* This event is not raised when the player is ejected from a vehicle due to it being destroyed.
|
2162
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_driving_changed_state Online documentation}
|
2131
2163
|
*/
|
2132
2164
|
interface OnPlayerDrivingChangedStateEvent extends EventData {
|
2133
2165
|
readonly player_index: PlayerIndex
|
@@ -2146,7 +2178,7 @@ declare module "factorio:runtime" {
|
|
2146
2178
|
}
|
2147
2179
|
/**
|
2148
2180
|
* Called when a player drops an item on the ground.
|
2149
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2181
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_dropped_item Online documentation}
|
2150
2182
|
*/
|
2151
2183
|
interface OnPlayerDroppedItemEvent extends EventData {
|
2152
2184
|
readonly player_index: PlayerIndex
|
@@ -2165,7 +2197,7 @@ declare module "factorio:runtime" {
|
|
2165
2197
|
}
|
2166
2198
|
/**
|
2167
2199
|
* Called when a player fast-transfers something to or from an entity.
|
2168
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2200
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_fast_transferred Online documentation}
|
2169
2201
|
*/
|
2170
2202
|
interface OnPlayerFastTransferredEvent extends EventData {
|
2171
2203
|
/**
|
@@ -2195,7 +2227,7 @@ declare module "factorio:runtime" {
|
|
2195
2227
|
}
|
2196
2228
|
/**
|
2197
2229
|
* Called after player flushed fluid
|
2198
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2230
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_flushed_fluid Online documentation}
|
2199
2231
|
*/
|
2200
2232
|
interface OnPlayerFlushedFluidEvent extends EventData {
|
2201
2233
|
/**
|
@@ -2229,7 +2261,7 @@ declare module "factorio:runtime" {
|
|
2229
2261
|
}
|
2230
2262
|
/**
|
2231
2263
|
* Called after a players gun inventory changed in some way.
|
2232
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2264
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_gun_inventory_changed Online documentation}
|
2233
2265
|
*/
|
2234
2266
|
interface OnPlayerGunInventoryChangedEvent extends EventData {
|
2235
2267
|
readonly player_index: PlayerIndex
|
@@ -2243,9 +2275,8 @@ declare module "factorio:runtime" {
|
|
2243
2275
|
readonly tick: uint
|
2244
2276
|
}
|
2245
2277
|
/**
|
2246
|
-
* Called when a player's input method changes.
|
2247
|
-
* @
|
2248
|
-
* @see {@link https://lua-api.factorio.com/1.1.107/events.html#on_player_input_method_changed Online documentation}
|
2278
|
+
* Called when a player's input method changes. See {@link LuaPlayer#input_method LuaPlayer::input_method}.
|
2279
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_input_method_changed Online documentation}
|
2249
2280
|
*/
|
2250
2281
|
interface OnPlayerInputMethodChangedEvent extends EventData {
|
2251
2282
|
/**
|
@@ -2263,7 +2294,7 @@ declare module "factorio:runtime" {
|
|
2263
2294
|
}
|
2264
2295
|
/**
|
2265
2296
|
* 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.
|
2266
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2297
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_joined_game Online documentation}
|
2267
2298
|
*/
|
2268
2299
|
interface OnPlayerJoinedGameEvent extends EventData {
|
2269
2300
|
readonly player_index: PlayerIndex
|
@@ -2278,7 +2309,7 @@ declare module "factorio:runtime" {
|
|
2278
2309
|
}
|
2279
2310
|
/**
|
2280
2311
|
* Called when a player is kicked.
|
2281
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2312
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_kicked Online documentation}
|
2282
2313
|
*/
|
2283
2314
|
interface OnPlayerKickedEvent extends EventData {
|
2284
2315
|
/**
|
@@ -2304,7 +2335,7 @@ declare module "factorio:runtime" {
|
|
2304
2335
|
}
|
2305
2336
|
/**
|
2306
2337
|
* 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.
|
2307
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2338
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_left_game Online documentation}
|
2308
2339
|
*/
|
2309
2340
|
interface OnPlayerLeftGameEvent extends EventData {
|
2310
2341
|
readonly player_index: PlayerIndex
|
@@ -2320,7 +2351,7 @@ declare module "factorio:runtime" {
|
|
2320
2351
|
}
|
2321
2352
|
/**
|
2322
2353
|
* Called after a players main inventory changed in some way.
|
2323
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2354
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_main_inventory_changed Online documentation}
|
2324
2355
|
*/
|
2325
2356
|
interface OnPlayerMainInventoryChangedEvent extends EventData {
|
2326
2357
|
readonly player_index: PlayerIndex
|
@@ -2334,9 +2365,14 @@ declare module "factorio:runtime" {
|
|
2334
2365
|
readonly tick: uint
|
2335
2366
|
}
|
2336
2367
|
/**
|
2337
|
-
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
2338
|
-
*
|
2339
|
-
*
|
2368
|
+
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
2369
|
+
*
|
2370
|
+
* After this event any items in the buffer will be transferred into the player as if they came from mining the entity.
|
2371
|
+
*
|
2372
|
+
* 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.
|
2373
|
+
*
|
2374
|
+
* Event filter: [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter]
|
2375
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_mined_entity Online documentation}
|
2340
2376
|
*/
|
2341
2377
|
interface OnPlayerMinedEntityEvent extends EventData {
|
2342
2378
|
/**
|
@@ -2362,7 +2398,7 @@ declare module "factorio:runtime" {
|
|
2362
2398
|
}
|
2363
2399
|
/**
|
2364
2400
|
* Called when the player mines something.
|
2365
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2401
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_mined_item Online documentation}
|
2366
2402
|
*/
|
2367
2403
|
interface OnPlayerMinedItemEvent extends EventData {
|
2368
2404
|
/**
|
@@ -2381,7 +2417,7 @@ declare module "factorio:runtime" {
|
|
2381
2417
|
}
|
2382
2418
|
/**
|
2383
2419
|
* Called after a player mines tiles.
|
2384
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2420
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_mined_tile Online documentation}
|
2385
2421
|
*/
|
2386
2422
|
interface OnPlayerMinedTileEvent extends EventData {
|
2387
2423
|
readonly player_index: PlayerIndex
|
@@ -2404,7 +2440,7 @@ declare module "factorio:runtime" {
|
|
2404
2440
|
}
|
2405
2441
|
/**
|
2406
2442
|
* Called when a player is muted.
|
2407
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2443
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_muted Online documentation}
|
2408
2444
|
*/
|
2409
2445
|
interface OnPlayerMutedEvent extends EventData {
|
2410
2446
|
/**
|
@@ -2422,7 +2458,7 @@ declare module "factorio:runtime" {
|
|
2422
2458
|
}
|
2423
2459
|
/**
|
2424
2460
|
* Called when a player invokes the "smart pipette" over an entity.
|
2425
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2461
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_pipette Online documentation}
|
2426
2462
|
*/
|
2427
2463
|
interface OnPlayerPipetteEvent extends EventData {
|
2428
2464
|
/**
|
@@ -2448,7 +2484,7 @@ declare module "factorio:runtime" {
|
|
2448
2484
|
}
|
2449
2485
|
/**
|
2450
2486
|
* Called after the player puts equipment in an equipment grid
|
2451
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2487
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_placed_equipment Online documentation}
|
2452
2488
|
*/
|
2453
2489
|
interface OnPlayerPlacedEquipmentEvent extends EventData {
|
2454
2490
|
readonly player_index: PlayerIndex
|
@@ -2471,7 +2507,7 @@ declare module "factorio:runtime" {
|
|
2471
2507
|
}
|
2472
2508
|
/**
|
2473
2509
|
* Called when a player is promoted.
|
2474
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2510
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_promoted Online documentation}
|
2475
2511
|
*/
|
2476
2512
|
interface OnPlayerPromotedEvent extends EventData {
|
2477
2513
|
/**
|
@@ -2489,7 +2525,7 @@ declare module "factorio:runtime" {
|
|
2489
2525
|
}
|
2490
2526
|
/**
|
2491
2527
|
* Called when a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link OnPlayerLeftGameEvent leaving} the game, and instead behaves like the player never existed in the save file.
|
2492
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2528
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_removed Online documentation}
|
2493
2529
|
*/
|
2494
2530
|
interface OnPlayerRemovedEvent extends EventData {
|
2495
2531
|
/**
|
@@ -2507,7 +2543,7 @@ declare module "factorio:runtime" {
|
|
2507
2543
|
}
|
2508
2544
|
/**
|
2509
2545
|
* Called after the player removes equipment from an equipment grid
|
2510
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2546
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_removed_equipment Online documentation}
|
2511
2547
|
*/
|
2512
2548
|
interface OnPlayerRemovedEquipmentEvent extends EventData {
|
2513
2549
|
readonly player_index: PlayerIndex
|
@@ -2533,8 +2569,10 @@ declare module "factorio:runtime" {
|
|
2533
2569
|
readonly tick: uint
|
2534
2570
|
}
|
2535
2571
|
/**
|
2536
|
-
* Called when a player repairs an entity.
|
2537
|
-
*
|
2572
|
+
* Called when a player repairs an entity.
|
2573
|
+
*
|
2574
|
+
* Event filter: [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter]
|
2575
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_repaired_entity Online documentation}
|
2538
2576
|
*/
|
2539
2577
|
interface OnPlayerRepairedEntityEvent extends EventData {
|
2540
2578
|
readonly player_index: PlayerIndex
|
@@ -2550,7 +2588,7 @@ declare module "factorio:runtime" {
|
|
2550
2588
|
}
|
2551
2589
|
/**
|
2552
2590
|
* Called after a player respawns.
|
2553
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2591
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_respawned Online documentation}
|
2554
2592
|
*/
|
2555
2593
|
interface OnPlayerRespawnedEvent extends EventData {
|
2556
2594
|
readonly player_index: PlayerIndex
|
@@ -2569,7 +2607,7 @@ declare module "factorio:runtime" {
|
|
2569
2607
|
}
|
2570
2608
|
/**
|
2571
2609
|
* Called after a player reverse-selects an area with a selection-tool item.
|
2572
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2610
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_reverse_selected_area Online documentation}
|
2573
2611
|
*/
|
2574
2612
|
interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
2575
2613
|
/**
|
@@ -2607,7 +2645,7 @@ declare module "factorio:runtime" {
|
|
2607
2645
|
}
|
2608
2646
|
/**
|
2609
2647
|
* 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.
|
2610
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2648
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_rotated_entity Online documentation}
|
2611
2649
|
*/
|
2612
2650
|
interface OnPlayerRotatedEntityEvent extends EventData {
|
2613
2651
|
/**
|
@@ -2630,7 +2668,7 @@ declare module "factorio:runtime" {
|
|
2630
2668
|
}
|
2631
2669
|
/**
|
2632
2670
|
* Called after a player selects an area with a selection-tool item.
|
2633
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2671
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_selected_area Online documentation}
|
2634
2672
|
*/
|
2635
2673
|
interface OnPlayerSelectedAreaEvent extends EventData {
|
2636
2674
|
/**
|
@@ -2668,7 +2706,7 @@ declare module "factorio:runtime" {
|
|
2668
2706
|
}
|
2669
2707
|
/**
|
2670
2708
|
* Called when a player sets a quickbar slot to anything (new value, or set to empty).
|
2671
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2709
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_set_quick_bar_slot Online documentation}
|
2672
2710
|
*/
|
2673
2711
|
interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
2674
2712
|
readonly player_index: PlayerIndex
|
@@ -2683,7 +2721,7 @@ declare module "factorio:runtime" {
|
|
2683
2721
|
}
|
2684
2722
|
/**
|
2685
2723
|
* Called when a player selects an area with a blueprint.
|
2686
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2724
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_setup_blueprint Online documentation}
|
2687
2725
|
*/
|
2688
2726
|
interface OnPlayerSetupBlueprintEvent extends EventData {
|
2689
2727
|
/**
|
@@ -2721,7 +2759,7 @@ declare module "factorio:runtime" {
|
|
2721
2759
|
}
|
2722
2760
|
/**
|
2723
2761
|
* Called when a player toggles alt mode, also known as "show entity info".
|
2724
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2762
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_toggled_alt_mode Online documentation}
|
2725
2763
|
*/
|
2726
2764
|
interface OnPlayerToggledAltModeEvent extends EventData {
|
2727
2765
|
readonly player_index: PlayerIndex
|
@@ -2740,7 +2778,7 @@ declare module "factorio:runtime" {
|
|
2740
2778
|
}
|
2741
2779
|
/**
|
2742
2780
|
* Called when a player toggles the map editor on or off.
|
2743
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2781
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_toggled_map_editor Online documentation}
|
2744
2782
|
*/
|
2745
2783
|
interface OnPlayerToggledMapEditorEvent extends EventData {
|
2746
2784
|
readonly player_index: PlayerIndex
|
@@ -2755,7 +2793,7 @@ declare module "factorio:runtime" {
|
|
2755
2793
|
}
|
2756
2794
|
/**
|
2757
2795
|
* Called after a players trash inventory changed in some way.
|
2758
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2796
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_trash_inventory_changed Online documentation}
|
2759
2797
|
*/
|
2760
2798
|
interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
2761
2799
|
readonly player_index: PlayerIndex
|
@@ -2770,7 +2808,7 @@ declare module "factorio:runtime" {
|
|
2770
2808
|
}
|
2771
2809
|
/**
|
2772
2810
|
* Called when a player is un-banned.
|
2773
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2811
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_unbanned Online documentation}
|
2774
2812
|
*/
|
2775
2813
|
interface OnPlayerUnbannedEvent extends EventData {
|
2776
2814
|
/**
|
@@ -2800,7 +2838,7 @@ declare module "factorio:runtime" {
|
|
2800
2838
|
}
|
2801
2839
|
/**
|
2802
2840
|
* Called when a player is unmuted.
|
2803
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2841
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_unmuted Online documentation}
|
2804
2842
|
*/
|
2805
2843
|
interface OnPlayerUnmutedEvent extends EventData {
|
2806
2844
|
/**
|
@@ -2818,7 +2856,7 @@ declare module "factorio:runtime" {
|
|
2818
2856
|
}
|
2819
2857
|
/**
|
2820
2858
|
* Called when a player uses a capsule that results in some game action.
|
2821
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2859
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_used_capsule Online documentation}
|
2822
2860
|
*/
|
2823
2861
|
interface OnPlayerUsedCapsuleEvent extends EventData {
|
2824
2862
|
/**
|
@@ -2844,7 +2882,7 @@ declare module "factorio:runtime" {
|
|
2844
2882
|
}
|
2845
2883
|
/**
|
2846
2884
|
* Called when a player uses spidertron remote to send a spidertron to a given position
|
2847
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2885
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_player_used_spider_remote Online documentation}
|
2848
2886
|
*/
|
2849
2887
|
interface OnPlayerUsedSpiderRemoteEvent extends EventData {
|
2850
2888
|
/**
|
@@ -2873,8 +2911,10 @@ declare module "factorio:runtime" {
|
|
2873
2911
|
readonly tick: uint
|
2874
2912
|
}
|
2875
2913
|
/**
|
2876
|
-
* Called after an entity dies.
|
2877
|
-
*
|
2914
|
+
* Called after an entity dies.
|
2915
|
+
*
|
2916
|
+
* Event filter: [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter]
|
2917
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_post_entity_died Online documentation}
|
2878
2918
|
*/
|
2879
2919
|
interface OnPostEntityDiedEvent extends EventData {
|
2880
2920
|
/**
|
@@ -2920,7 +2960,7 @@ declare module "factorio:runtime" {
|
|
2920
2960
|
}
|
2921
2961
|
/**
|
2922
2962
|
* Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
|
2923
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
2963
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_build Online documentation}
|
2924
2964
|
*/
|
2925
2965
|
interface OnPreBuildEvent extends EventData {
|
2926
2966
|
/**
|
@@ -2962,7 +3002,7 @@ declare module "factorio:runtime" {
|
|
2962
3002
|
}
|
2963
3003
|
/**
|
2964
3004
|
* Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
2965
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3005
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_chunk_deleted Online documentation}
|
2966
3006
|
*/
|
2967
3007
|
interface OnPreChunkDeletedEvent extends EventData {
|
2968
3008
|
readonly surface_index: SurfaceIndex
|
@@ -2981,7 +3021,7 @@ declare module "factorio:runtime" {
|
|
2981
3021
|
}
|
2982
3022
|
/**
|
2983
3023
|
* Called before entity copy-paste is done.
|
2984
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3024
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_entity_settings_pasted Online documentation}
|
2985
3025
|
*/
|
2986
3026
|
interface OnPreEntitySettingsPastedEvent extends EventData {
|
2987
3027
|
readonly player_index: PlayerIndex
|
@@ -3003,8 +3043,12 @@ declare module "factorio:runtime" {
|
|
3003
3043
|
readonly tick: uint
|
3004
3044
|
}
|
3005
3045
|
/**
|
3006
|
-
* Called before a ghost entity is destroyed as a result of being marked for deconstruction.
|
3007
|
-
*
|
3046
|
+
* Called before a ghost entity is destroyed as a result of being marked for deconstruction.
|
3047
|
+
*
|
3048
|
+
* Also called for item request proxies before they are destroyed as a result of being marked for deconstruction.
|
3049
|
+
*
|
3050
|
+
* Event filter: [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter]
|
3051
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_ghost_deconstructed Online documentation}
|
3008
3052
|
*/
|
3009
3053
|
interface OnPreGhostDeconstructedEvent extends EventData {
|
3010
3054
|
/**
|
@@ -3022,8 +3066,10 @@ declare module "factorio:runtime" {
|
|
3022
3066
|
readonly tick: uint
|
3023
3067
|
}
|
3024
3068
|
/**
|
3025
|
-
* Called before a ghost entity is upgraded.
|
3026
|
-
*
|
3069
|
+
* Called before a ghost entity is upgraded.
|
3070
|
+
*
|
3071
|
+
* Event filter: [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter]
|
3072
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_ghost_upgraded Online documentation}
|
3027
3073
|
*/
|
3028
3074
|
interface OnPreGhostUpgradedEvent extends EventData {
|
3029
3075
|
/**
|
@@ -3043,7 +3089,7 @@ declare module "factorio:runtime" {
|
|
3043
3089
|
}
|
3044
3090
|
/**
|
3045
3091
|
* Called directly before a permission group is deleted.
|
3046
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3092
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_permission_group_deleted Online documentation}
|
3047
3093
|
*/
|
3048
3094
|
interface OnPrePermissionGroupDeletedEvent extends EventData {
|
3049
3095
|
/**
|
@@ -3065,7 +3111,7 @@ declare module "factorio:runtime" {
|
|
3065
3111
|
}
|
3066
3112
|
/**
|
3067
3113
|
* Called directly before a permission string is imported.
|
3068
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3114
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_permission_string_imported Online documentation}
|
3069
3115
|
*/
|
3070
3116
|
interface OnPrePermissionStringImportedEvent extends EventData {
|
3071
3117
|
/**
|
@@ -3083,7 +3129,7 @@ declare module "factorio:runtime" {
|
|
3083
3129
|
}
|
3084
3130
|
/**
|
3085
3131
|
* Called when a player queues something to be crafted.
|
3086
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3132
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_player_crafted_item Online documentation}
|
3087
3133
|
*/
|
3088
3134
|
interface OnPrePlayerCraftedItemEvent extends EventData {
|
3089
3135
|
/**
|
@@ -3113,7 +3159,7 @@ declare module "factorio:runtime" {
|
|
3113
3159
|
}
|
3114
3160
|
/**
|
3115
3161
|
* Called before a players dies.
|
3116
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3162
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_player_died Online documentation}
|
3117
3163
|
*/
|
3118
3164
|
interface OnPrePlayerDiedEvent extends EventData {
|
3119
3165
|
readonly player_index: PlayerIndex
|
@@ -3129,7 +3175,7 @@ declare module "factorio:runtime" {
|
|
3129
3175
|
}
|
3130
3176
|
/**
|
3131
3177
|
* Called before a player leaves the game.
|
3132
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3178
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_player_left_game Online documentation}
|
3133
3179
|
*/
|
3134
3180
|
interface OnPrePlayerLeftGameEvent extends EventData {
|
3135
3181
|
readonly player_index: PlayerIndex
|
@@ -3144,8 +3190,10 @@ declare module "factorio:runtime" {
|
|
3144
3190
|
readonly tick: uint
|
3145
3191
|
}
|
3146
3192
|
/**
|
3147
|
-
* Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed.
|
3148
|
-
*
|
3193
|
+
* Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed.
|
3194
|
+
*
|
3195
|
+
* Event filter: [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter]
|
3196
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_player_mined_item Online documentation}
|
3149
3197
|
*/
|
3150
3198
|
interface OnPrePlayerMinedItemEvent extends EventData {
|
3151
3199
|
/**
|
@@ -3164,7 +3212,7 @@ declare module "factorio:runtime" {
|
|
3164
3212
|
}
|
3165
3213
|
/**
|
3166
3214
|
* Called before a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link OnPlayerLeftGameEvent leaving} the game, and instead behaves like the player never existed in the save file.
|
3167
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3215
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_player_removed Online documentation}
|
3168
3216
|
*/
|
3169
3217
|
interface OnPrePlayerRemovedEvent extends EventData {
|
3170
3218
|
/**
|
@@ -3182,7 +3230,7 @@ declare module "factorio:runtime" {
|
|
3182
3230
|
}
|
3183
3231
|
/**
|
3184
3232
|
* Called before a player toggles the map editor on or off.
|
3185
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3233
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_player_toggled_map_editor Online documentation}
|
3186
3234
|
*/
|
3187
3235
|
interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
3188
3236
|
readonly player_index: PlayerIndex
|
@@ -3197,7 +3245,7 @@ declare module "factorio:runtime" {
|
|
3197
3245
|
}
|
3198
3246
|
/**
|
3199
3247
|
* Called directly before a robot explodes cliffs.
|
3200
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3248
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_robot_exploded_cliff Online documentation}
|
3201
3249
|
*/
|
3202
3250
|
interface OnPreRobotExplodedCliffEvent extends EventData {
|
3203
3251
|
readonly robot: LuaEntity
|
@@ -3217,7 +3265,7 @@ declare module "factorio:runtime" {
|
|
3217
3265
|
}
|
3218
3266
|
/**
|
3219
3267
|
* Called just before a script inventory is resized.
|
3220
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3268
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_script_inventory_resized Online documentation}
|
3221
3269
|
*/
|
3222
3270
|
interface OnPreScriptInventoryResizedEvent extends EventData {
|
3223
3271
|
/**
|
@@ -3248,7 +3296,7 @@ declare module "factorio:runtime" {
|
|
3248
3296
|
}
|
3249
3297
|
/**
|
3250
3298
|
* Called just before a surface is cleared (all entities removed and all chunks deleted).
|
3251
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3299
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_surface_cleared Online documentation}
|
3252
3300
|
*/
|
3253
3301
|
interface OnPreSurfaceClearedEvent extends EventData {
|
3254
3302
|
readonly surface_index: SurfaceIndex
|
@@ -3263,7 +3311,7 @@ declare module "factorio:runtime" {
|
|
3263
3311
|
}
|
3264
3312
|
/**
|
3265
3313
|
* Called just before a surface is deleted.
|
3266
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3314
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_pre_surface_deleted Online documentation}
|
3267
3315
|
*/
|
3268
3316
|
interface OnPreSurfaceDeletedEvent extends EventData {
|
3269
3317
|
readonly surface_index: SurfaceIndex
|
@@ -3278,7 +3326,7 @@ declare module "factorio:runtime" {
|
|
3278
3326
|
}
|
3279
3327
|
/**
|
3280
3328
|
* Called when research is cancelled.
|
3281
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3329
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_research_cancelled Online documentation}
|
3282
3330
|
*/
|
3283
3331
|
interface OnResearchCancelledEvent extends EventData {
|
3284
3332
|
/**
|
@@ -3300,7 +3348,7 @@ declare module "factorio:runtime" {
|
|
3300
3348
|
}
|
3301
3349
|
/**
|
3302
3350
|
* Called when a research finishes.
|
3303
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3351
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_research_finished Online documentation}
|
3304
3352
|
*/
|
3305
3353
|
interface OnResearchFinishedEvent extends EventData {
|
3306
3354
|
/**
|
@@ -3322,7 +3370,7 @@ declare module "factorio:runtime" {
|
|
3322
3370
|
}
|
3323
3371
|
/**
|
3324
3372
|
* Called when a research is reversed (unresearched).
|
3325
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3373
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_research_reversed Online documentation}
|
3326
3374
|
*/
|
3327
3375
|
interface OnResearchReversedEvent extends EventData {
|
3328
3376
|
/**
|
@@ -3344,7 +3392,7 @@ declare module "factorio:runtime" {
|
|
3344
3392
|
}
|
3345
3393
|
/**
|
3346
3394
|
* Called when a technology research starts.
|
3347
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3395
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_research_started Online documentation}
|
3348
3396
|
*/
|
3349
3397
|
interface OnResearchStartedEvent extends EventData {
|
3350
3398
|
/**
|
@@ -3363,7 +3411,7 @@ declare module "factorio:runtime" {
|
|
3363
3411
|
}
|
3364
3412
|
/**
|
3365
3413
|
* Called when a resource entity reaches 0 or its minimum yield for infinite resources.
|
3366
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3414
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_resource_depleted Online documentation}
|
3367
3415
|
*/
|
3368
3416
|
interface OnResourceDepletedEvent extends EventData {
|
3369
3417
|
readonly entity: LuaEntity
|
@@ -3377,8 +3425,10 @@ declare module "factorio:runtime" {
|
|
3377
3425
|
readonly tick: uint
|
3378
3426
|
}
|
3379
3427
|
/**
|
3380
|
-
* Called when a construction robot builds an entity.
|
3381
|
-
*
|
3428
|
+
* Called when a construction robot builds an entity.
|
3429
|
+
*
|
3430
|
+
* Event filter: [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter]
|
3431
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_robot_built_entity Online documentation}
|
3382
3432
|
*/
|
3383
3433
|
interface OnRobotBuiltEntityEvent extends EventData {
|
3384
3434
|
/**
|
@@ -3408,7 +3458,7 @@ declare module "factorio:runtime" {
|
|
3408
3458
|
}
|
3409
3459
|
/**
|
3410
3460
|
* Called after a robot builds tiles.
|
3411
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3461
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_robot_built_tile Online documentation}
|
3412
3462
|
*/
|
3413
3463
|
interface OnRobotBuiltTileEvent extends EventData {
|
3414
3464
|
/**
|
@@ -3446,7 +3496,7 @@ declare module "factorio:runtime" {
|
|
3446
3496
|
}
|
3447
3497
|
/**
|
3448
3498
|
* Called directly after a robot explodes cliffs.
|
3449
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3499
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_robot_exploded_cliff Online documentation}
|
3450
3500
|
*/
|
3451
3501
|
interface OnRobotExplodedCliffEvent extends EventData {
|
3452
3502
|
readonly robot: LuaEntity
|
@@ -3465,7 +3515,7 @@ declare module "factorio:runtime" {
|
|
3465
3515
|
}
|
3466
3516
|
/**
|
3467
3517
|
* Called when a robot mines an entity.
|
3468
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3518
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_robot_mined Online documentation}
|
3469
3519
|
*/
|
3470
3520
|
interface OnRobotMinedEvent extends EventData {
|
3471
3521
|
/**
|
@@ -3486,9 +3536,14 @@ declare module "factorio:runtime" {
|
|
3486
3536
|
readonly tick: uint
|
3487
3537
|
}
|
3488
3538
|
/**
|
3489
|
-
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
3490
|
-
*
|
3491
|
-
*
|
3539
|
+
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
3540
|
+
*
|
3541
|
+
* After this event any items in the buffer will be transferred into the robot as if they came from mining the entity.
|
3542
|
+
*
|
3543
|
+
* 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.
|
3544
|
+
*
|
3545
|
+
* Event filter: [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter]
|
3546
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_robot_mined_entity Online documentation}
|
3492
3547
|
*/
|
3493
3548
|
interface OnRobotMinedEntityEvent extends EventData {
|
3494
3549
|
/**
|
@@ -3514,7 +3569,7 @@ declare module "factorio:runtime" {
|
|
3514
3569
|
}
|
3515
3570
|
/**
|
3516
3571
|
* Called after a robot mines tiles.
|
3517
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3572
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_robot_mined_tile Online documentation}
|
3518
3573
|
*/
|
3519
3574
|
interface OnRobotMinedTileEvent extends EventData {
|
3520
3575
|
/**
|
@@ -3539,8 +3594,10 @@ declare module "factorio:runtime" {
|
|
3539
3594
|
readonly tick: uint
|
3540
3595
|
}
|
3541
3596
|
/**
|
3542
|
-
* Called before a robot mines an entity.
|
3543
|
-
*
|
3597
|
+
* Called before a robot mines an entity.
|
3598
|
+
*
|
3599
|
+
* Event filter: [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter]
|
3600
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_robot_pre_mined Online documentation}
|
3544
3601
|
*/
|
3545
3602
|
interface OnRobotPreMinedEvent extends EventData {
|
3546
3603
|
/**
|
@@ -3562,7 +3619,7 @@ declare module "factorio:runtime" {
|
|
3562
3619
|
}
|
3563
3620
|
/**
|
3564
3621
|
* Called when a rocket silo is ordered to be launched.
|
3565
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3622
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_rocket_launch_ordered Online documentation}
|
3566
3623
|
*/
|
3567
3624
|
interface OnRocketLaunchOrderedEvent extends EventData {
|
3568
3625
|
readonly rocket: LuaEntity
|
@@ -3582,7 +3639,7 @@ declare module "factorio:runtime" {
|
|
3582
3639
|
}
|
3583
3640
|
/**
|
3584
3641
|
* Called when the rocket is launched.
|
3585
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3642
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_rocket_launched Online documentation}
|
3586
3643
|
*/
|
3587
3644
|
interface OnRocketLaunchedEvent extends EventData {
|
3588
3645
|
readonly rocket: LuaEntity
|
@@ -3602,7 +3659,7 @@ declare module "factorio:runtime" {
|
|
3602
3659
|
}
|
3603
3660
|
/**
|
3604
3661
|
* Called when a runtime mod setting is changed by a player.
|
3605
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3662
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_runtime_mod_setting_changed Online documentation}
|
3606
3663
|
*/
|
3607
3664
|
interface OnRuntimeModSettingChangedEvent extends EventData {
|
3608
3665
|
/**
|
@@ -3613,10 +3670,7 @@ declare module "factorio:runtime" {
|
|
3613
3670
|
* The prototype name of the setting that was changed.
|
3614
3671
|
*/
|
3615
3672
|
readonly setting: string
|
3616
|
-
|
3617
|
-
* Either "runtime-per-user" or "runtime-global".
|
3618
|
-
*/
|
3619
|
-
readonly setting_type: "runtime-per-user" | "runtime-global"
|
3673
|
+
readonly setting_type: "runtime-global" | "runtime-per-user"
|
3620
3674
|
/**
|
3621
3675
|
* Identifier of the event
|
3622
3676
|
*/
|
@@ -3628,7 +3682,7 @@ declare module "factorio:runtime" {
|
|
3628
3682
|
}
|
3629
3683
|
/**
|
3630
3684
|
* Called just after a script inventory is resized.
|
3631
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3685
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_script_inventory_resized Online documentation}
|
3632
3686
|
*/
|
3633
3687
|
interface OnScriptInventoryResizedEvent extends EventData {
|
3634
3688
|
/**
|
@@ -3663,7 +3717,7 @@ declare module "factorio:runtime" {
|
|
3663
3717
|
}
|
3664
3718
|
/**
|
3665
3719
|
* Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
|
3666
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3720
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_script_path_request_finished Online documentation}
|
3667
3721
|
*/
|
3668
3722
|
interface OnScriptPathRequestFinishedEvent extends EventData {
|
3669
3723
|
/**
|
@@ -3689,7 +3743,7 @@ declare module "factorio:runtime" {
|
|
3689
3743
|
}
|
3690
3744
|
/**
|
3691
3745
|
* Called when a script trigger effect is triggered.
|
3692
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3746
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_script_trigger_effect Online documentation}
|
3693
3747
|
*/
|
3694
3748
|
interface OnScriptTriggerEffectEvent extends EventData {
|
3695
3749
|
/**
|
@@ -3714,8 +3768,10 @@ declare module "factorio:runtime" {
|
|
3714
3768
|
readonly tick: uint
|
3715
3769
|
}
|
3716
3770
|
/**
|
3717
|
-
* Called when an entity of type `radar` finishes scanning a sector.
|
3718
|
-
*
|
3771
|
+
* Called when an entity of type `radar` finishes scanning a sector.
|
3772
|
+
*
|
3773
|
+
* Event filter: [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter]
|
3774
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_sector_scanned Online documentation}
|
3719
3775
|
*/
|
3720
3776
|
interface OnSectorScannedEvent extends EventData {
|
3721
3777
|
/**
|
@@ -3741,7 +3797,7 @@ declare module "factorio:runtime" {
|
|
3741
3797
|
}
|
3742
3798
|
/**
|
3743
3799
|
* Called after the selected entity changes for a given player.
|
3744
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3800
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_selected_entity_changed Online documentation}
|
3745
3801
|
*/
|
3746
3802
|
interface OnSelectedEntityChangedEvent extends EventData {
|
3747
3803
|
/**
|
@@ -3763,7 +3819,7 @@ declare module "factorio:runtime" {
|
|
3763
3819
|
}
|
3764
3820
|
/**
|
3765
3821
|
* Called when a spider finishes moving to its autopilot position.
|
3766
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3822
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_spider_command_completed Online documentation}
|
3767
3823
|
*/
|
3768
3824
|
interface OnSpiderCommandCompletedEvent extends EventData {
|
3769
3825
|
/**
|
@@ -3781,7 +3837,7 @@ declare module "factorio:runtime" {
|
|
3781
3837
|
}
|
3782
3838
|
/**
|
3783
3839
|
* Called when a translation request generated through {@link LuaPlayer#request_translation LuaPlayer::request_translation} or {@link LuaPlayer#request_translations LuaPlayer::request_translations} has been completed.
|
3784
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3840
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_string_translated Online documentation}
|
3785
3841
|
*/
|
3786
3842
|
interface OnStringTranslatedEvent extends EventData {
|
3787
3843
|
/**
|
@@ -3815,7 +3871,7 @@ declare module "factorio:runtime" {
|
|
3815
3871
|
}
|
3816
3872
|
/**
|
3817
3873
|
* Called just after a surface is cleared (all entities removed and all chunks deleted).
|
3818
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3874
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_surface_cleared Online documentation}
|
3819
3875
|
*/
|
3820
3876
|
interface OnSurfaceClearedEvent extends EventData {
|
3821
3877
|
readonly surface_index: SurfaceIndex
|
@@ -3830,8 +3886,9 @@ declare module "factorio:runtime" {
|
|
3830
3886
|
}
|
3831
3887
|
/**
|
3832
3888
|
* Called when a surface is created.
|
3833
|
-
*
|
3834
|
-
*
|
3889
|
+
*
|
3890
|
+
* This is not called when the default surface is created as it will always exist.
|
3891
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_surface_created Online documentation}
|
3835
3892
|
*/
|
3836
3893
|
interface OnSurfaceCreatedEvent extends EventData {
|
3837
3894
|
readonly surface_index: SurfaceIndex
|
@@ -3846,7 +3903,7 @@ declare module "factorio:runtime" {
|
|
3846
3903
|
}
|
3847
3904
|
/**
|
3848
3905
|
* Called after a surface is deleted.
|
3849
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3906
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_surface_deleted Online documentation}
|
3850
3907
|
*/
|
3851
3908
|
interface OnSurfaceDeletedEvent extends EventData {
|
3852
3909
|
readonly surface_index: SurfaceIndex
|
@@ -3861,7 +3918,7 @@ declare module "factorio:runtime" {
|
|
3861
3918
|
}
|
3862
3919
|
/**
|
3863
3920
|
* Called after a surface is imported via the map editor.
|
3864
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3921
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_surface_imported Online documentation}
|
3865
3922
|
*/
|
3866
3923
|
interface OnSurfaceImportedEvent extends EventData {
|
3867
3924
|
readonly surface_index: SurfaceIndex
|
@@ -3880,7 +3937,7 @@ declare module "factorio:runtime" {
|
|
3880
3937
|
}
|
3881
3938
|
/**
|
3882
3939
|
* Called when a surface is renamed.
|
3883
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3940
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_surface_renamed Online documentation}
|
3884
3941
|
*/
|
3885
3942
|
interface OnSurfaceRenamedEvent extends EventData {
|
3886
3943
|
readonly surface_index: SurfaceIndex
|
@@ -3897,7 +3954,7 @@ declare module "factorio:runtime" {
|
|
3897
3954
|
}
|
3898
3955
|
/**
|
3899
3956
|
* Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
|
3900
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3957
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_technology_effects_reset Online documentation}
|
3901
3958
|
*/
|
3902
3959
|
interface OnTechnologyEffectsResetEvent extends EventData {
|
3903
3960
|
readonly force: LuaForce
|
@@ -3912,7 +3969,7 @@ declare module "factorio:runtime" {
|
|
3912
3969
|
}
|
3913
3970
|
/**
|
3914
3971
|
* It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
|
3915
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3972
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_tick Online documentation}
|
3916
3973
|
*/
|
3917
3974
|
interface OnTickEvent extends EventData {
|
3918
3975
|
/**
|
@@ -3926,7 +3983,7 @@ declare module "factorio:runtime" {
|
|
3926
3983
|
}
|
3927
3984
|
/**
|
3928
3985
|
* Called when a train changes state (started to stopped and vice versa)
|
3929
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
3986
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_train_changed_state Online documentation}
|
3930
3987
|
*/
|
3931
3988
|
interface OnTrainChangedStateEvent extends EventData {
|
3932
3989
|
readonly train: LuaTrain
|
@@ -3942,7 +3999,7 @@ declare module "factorio:runtime" {
|
|
3942
3999
|
}
|
3943
4000
|
/**
|
3944
4001
|
* Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
|
3945
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4002
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_train_created Online documentation}
|
3946
4003
|
*/
|
3947
4004
|
interface OnTrainCreatedEvent extends EventData {
|
3948
4005
|
readonly train: LuaTrain
|
@@ -3965,7 +4022,7 @@ declare module "factorio:runtime" {
|
|
3965
4022
|
}
|
3966
4023
|
/**
|
3967
4024
|
* Called when a trains schedule is changed either by the player or through script.
|
3968
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4025
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_train_schedule_changed Online documentation}
|
3969
4026
|
*/
|
3970
4027
|
interface OnTrainScheduleChangedEvent extends EventData {
|
3971
4028
|
readonly train: LuaTrain
|
@@ -3984,7 +4041,7 @@ declare module "factorio:runtime" {
|
|
3984
4041
|
}
|
3985
4042
|
/**
|
3986
4043
|
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity="true"`.
|
3987
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4044
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_trigger_created_entity Online documentation}
|
3988
4045
|
*/
|
3989
4046
|
interface OnTriggerCreatedEntityEvent extends EventData {
|
3990
4047
|
readonly entity: LuaEntity
|
@@ -4000,7 +4057,7 @@ declare module "factorio:runtime" {
|
|
4000
4057
|
}
|
4001
4058
|
/**
|
4002
4059
|
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery="true"`.
|
4003
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4060
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_trigger_fired_artillery Online documentation}
|
4004
4061
|
*/
|
4005
4062
|
interface OnTriggerFiredArtilleryEvent extends EventData {
|
4006
4063
|
readonly entity: LuaEntity
|
@@ -4016,7 +4073,7 @@ declare module "factorio:runtime" {
|
|
4016
4073
|
}
|
4017
4074
|
/**
|
4018
4075
|
* Called when a unit is added to a unit group.
|
4019
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4076
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_unit_added_to_group Online documentation}
|
4020
4077
|
*/
|
4021
4078
|
interface OnUnitAddedToGroupEvent extends EventData {
|
4022
4079
|
readonly unit: LuaEntity
|
@@ -4032,7 +4089,7 @@ declare module "factorio:runtime" {
|
|
4032
4089
|
}
|
4033
4090
|
/**
|
4034
4091
|
* Called when a new unit group is created, before any members are added to it.
|
4035
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4092
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_unit_group_created Online documentation}
|
4036
4093
|
*/
|
4037
4094
|
interface OnUnitGroupCreatedEvent extends EventData {
|
4038
4095
|
readonly group: LuaUnitGroup
|
@@ -4047,7 +4104,7 @@ declare module "factorio:runtime" {
|
|
4047
4104
|
}
|
4048
4105
|
/**
|
4049
4106
|
* Called when a unit group finishes gathering and starts executing its command.
|
4050
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4107
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_unit_group_finished_gathering Online documentation}
|
4051
4108
|
*/
|
4052
4109
|
interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
4053
4110
|
readonly group: LuaUnitGroup
|
@@ -4062,7 +4119,7 @@ declare module "factorio:runtime" {
|
|
4062
4119
|
}
|
4063
4120
|
/**
|
4064
4121
|
* Called when a unit is removed from a unit group.
|
4065
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4122
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_unit_removed_from_group Online documentation}
|
4066
4123
|
*/
|
4067
4124
|
interface OnUnitRemovedFromGroupEvent extends EventData {
|
4068
4125
|
readonly unit: LuaEntity
|
@@ -4078,7 +4135,7 @@ declare module "factorio:runtime" {
|
|
4078
4135
|
}
|
4079
4136
|
/**
|
4080
4137
|
* Called when a worker (construction or logistic) robot expires through a lack of energy.
|
4081
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4138
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#on_worker_robot_expired Online documentation}
|
4082
4139
|
*/
|
4083
4140
|
interface OnWorkerRobotExpiredEvent extends EventData {
|
4084
4141
|
readonly robot: LuaEntity
|
@@ -4092,8 +4149,10 @@ declare module "factorio:runtime" {
|
|
4092
4149
|
readonly tick: uint
|
4093
4150
|
}
|
4094
4151
|
/**
|
4095
|
-
* 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}.
|
4096
|
-
*
|
4152
|
+
* 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}.
|
4153
|
+
*
|
4154
|
+
* Event filter: [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter]
|
4155
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#script_raised_built Online documentation}
|
4097
4156
|
*/
|
4098
4157
|
interface ScriptRaisedBuiltEvent extends EventData {
|
4099
4158
|
/**
|
@@ -4110,8 +4169,10 @@ declare module "factorio:runtime" {
|
|
4110
4169
|
readonly tick: uint
|
4111
4170
|
}
|
4112
4171
|
/**
|
4113
|
-
* 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}.
|
4114
|
-
*
|
4172
|
+
* 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}.
|
4173
|
+
*
|
4174
|
+
* Event filter: [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter]
|
4175
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#script_raised_destroy Online documentation}
|
4115
4176
|
*/
|
4116
4177
|
interface ScriptRaisedDestroyEvent extends EventData {
|
4117
4178
|
/**
|
@@ -4128,8 +4189,10 @@ declare module "factorio:runtime" {
|
|
4128
4189
|
readonly tick: uint
|
4129
4190
|
}
|
4130
4191
|
/**
|
4131
|
-
* 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}.
|
4132
|
-
*
|
4192
|
+
* 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}.
|
4193
|
+
*
|
4194
|
+
* Event filter: [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter]
|
4195
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#script_raised_revive Online documentation}
|
4133
4196
|
*/
|
4134
4197
|
interface ScriptRaisedReviveEvent extends EventData {
|
4135
4198
|
/**
|
@@ -4151,7 +4214,7 @@ declare module "factorio:runtime" {
|
|
4151
4214
|
}
|
4152
4215
|
/**
|
4153
4216
|
* 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}.
|
4154
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
4217
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#script_raised_set_tiles Online documentation}
|
4155
4218
|
*/
|
4156
4219
|
interface ScriptRaisedSetTilesEvent extends EventData {
|
4157
4220
|
/**
|
@@ -4172,8 +4235,10 @@ declare module "factorio:runtime" {
|
|
4172
4235
|
readonly tick: uint
|
4173
4236
|
}
|
4174
4237
|
/**
|
4175
|
-
* A static event mods can use to tell other mods they teleported something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_teleported LuaBootstrap::raise_script_teleported}, or when `raise_teleported` is passed to {@link LuaControl#teleport LuaControl::teleport}.
|
4176
|
-
*
|
4238
|
+
* A static event mods can use to tell other mods they teleported something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_teleported LuaBootstrap::raise_script_teleported}, or when `raise_teleported` is passed to {@link LuaControl#teleport LuaControl::teleport}.
|
4239
|
+
*
|
4240
|
+
* Event filter: [LuaScriptRaisedTeleportedEventFilter](LuaScriptRaisedTeleportedEventFilter]
|
4241
|
+
* @see {@link https://lua-api.factorio.com/1.1.108/events.html#script_raised_teleported Online documentation}
|
4177
4242
|
*/
|
4178
4243
|
interface ScriptRaisedTeleportedEvent extends EventData {
|
4179
4244
|
/**
|