typed-factorio 4.2.0 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/data-global.d.ts +1 -1
- package/common/types.d.ts +5 -24
- package/package.json +2 -2
- package/prototype/generated/prototypes.d.ts +2739 -2489
- package/prototype/generated/types.d.ts +2784 -2691
- package/runtime/generated/classes.d.ts +5952 -5225
- package/runtime/generated/concepts.d.ts +876 -526
- package/runtime/generated/defines.d.ts +255 -217
- package/runtime/generated/events.d.ts +547 -223
- package/runtime/generated/global-functions.d.ts +3 -3
- package/runtime/generated/global-objects.d.ts +7 -7
|
@@ -13,7 +13,7 @@ declare module "factorio:runtime" {
|
|
|
13
13
|
* script.on_event("my-potato-control", function(event)
|
|
14
14
|
* game.print("Keyboard shortcut pressed on tick: " ..tostring(event.tick))
|
|
15
15
|
* end)
|
|
16
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
16
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#CustomInputEvent Online documentation}
|
|
17
17
|
*/
|
|
18
18
|
interface CustomInputEvent extends EventData {
|
|
19
19
|
/**
|
|
@@ -57,9 +57,55 @@ declare module "factorio:runtime" {
|
|
|
57
57
|
*/
|
|
58
58
|
readonly tick: MapTick
|
|
59
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Called when a recipe with {@link import("factorio:prototype").RecipePrototype#raise_on_crafted RecipePrototype::raise_on_crafted} is crafted.
|
|
62
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#RecipeCraftedEvent Online documentation}
|
|
63
|
+
*/
|
|
64
|
+
interface RecipeCraftedEvent extends EventData {
|
|
65
|
+
/**
|
|
66
|
+
* Entity that crafted recipe.
|
|
67
|
+
*/
|
|
68
|
+
readonly entity: LuaEntity
|
|
69
|
+
/**
|
|
70
|
+
* Name of recipe that was crafted.
|
|
71
|
+
*/
|
|
72
|
+
readonly recipe: string
|
|
73
|
+
/**
|
|
74
|
+
* Quality of the recipe crafted.
|
|
75
|
+
*/
|
|
76
|
+
readonly recipe_quality: string
|
|
77
|
+
/**
|
|
78
|
+
* Quality effect used when giving products. Not provided if value is 0. May be different than value obtained from {@link LuaEntity#effects LuaEntity::effects} when quality modules were changed between craft starting and products being given.
|
|
79
|
+
*/
|
|
80
|
+
readonly quality_effect?: EffectValue
|
|
81
|
+
/**
|
|
82
|
+
* Random value in range [0, 1) that was used when selecting product quality. Only provided when quality_effect is provided.
|
|
83
|
+
*/
|
|
84
|
+
readonly quality_seed?: double
|
|
85
|
+
/**
|
|
86
|
+
* Quality of products given. May be different than recipe quality if quality modules are present. Always provided even if quality_effect is zero because {@link LuaEntity#result_quality LuaEntity::result_quality} may have been used. Only used by products without quality control.
|
|
87
|
+
*/
|
|
88
|
+
readonly product_quality: string
|
|
89
|
+
/**
|
|
90
|
+
* If crafted as part of bonus products.
|
|
91
|
+
*/
|
|
92
|
+
readonly bonus: boolean
|
|
93
|
+
/**
|
|
94
|
+
* Random value in range {@link import("factorio:prototype").ProductPrototypeBase#shared_probability 0, 1) used as part of shared roll when giving products. Related to [ProductPrototypeBase::shared_probability}.
|
|
95
|
+
*/
|
|
96
|
+
readonly shared_roll: double
|
|
97
|
+
/**
|
|
98
|
+
* Identifier of the event.
|
|
99
|
+
*/
|
|
100
|
+
readonly name: defines.events
|
|
101
|
+
/**
|
|
102
|
+
* Tick the event was generated.
|
|
103
|
+
*/
|
|
104
|
+
readonly tick: MapTick
|
|
105
|
+
}
|
|
60
106
|
/**
|
|
61
107
|
* Called when an achievement is gained.
|
|
62
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
108
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_achievement_gained Online documentation}
|
|
63
109
|
*/
|
|
64
110
|
interface OnAchievementGainedEvent extends EventData {
|
|
65
111
|
/**
|
|
@@ -78,7 +124,7 @@ declare module "factorio:runtime" {
|
|
|
78
124
|
}
|
|
79
125
|
/**
|
|
80
126
|
* Called when a unit/group completes a command.
|
|
81
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
127
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_ai_command_completed Online documentation}
|
|
82
128
|
*/
|
|
83
129
|
interface OnAiCommandCompletedEvent extends EventData {
|
|
84
130
|
/**
|
|
@@ -101,7 +147,7 @@ declare module "factorio:runtime" {
|
|
|
101
147
|
}
|
|
102
148
|
/**
|
|
103
149
|
* Called when an area of the map is cloned.
|
|
104
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
150
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_area_cloned Online documentation}
|
|
105
151
|
*/
|
|
106
152
|
interface OnAreaClonedEvent extends EventData {
|
|
107
153
|
readonly source_surface: LuaSurface
|
|
@@ -127,7 +173,7 @@ declare module "factorio:runtime" {
|
|
|
127
173
|
* Called when a biter migration builds a base.
|
|
128
174
|
*
|
|
129
175
|
* This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
|
130
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
176
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_biter_base_built Online documentation}
|
|
131
177
|
*/
|
|
132
178
|
interface OnBiterBaseBuiltEvent extends EventData {
|
|
133
179
|
/**
|
|
@@ -149,7 +195,7 @@ declare module "factorio:runtime" {
|
|
|
149
195
|
* The entity's settings, rotation, mirroring, wire connections, etc. may have been updated. This event is raised even if no settings actually changed.
|
|
150
196
|
*
|
|
151
197
|
* Note this event is not raised when an entity is upgraded or marked for upgrade, when a new entity is created, or when an entity ghost is instantly revived. {@link OnBuiltEntityEvent on_built_entity} is raised instead in those cases.
|
|
152
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
198
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_blueprint_settings_pasted Online documentation}
|
|
153
199
|
*/
|
|
154
200
|
interface OnBlueprintSettingsPastedEvent extends EventData {
|
|
155
201
|
/**
|
|
@@ -183,7 +229,7 @@ declare module "factorio:runtime" {
|
|
|
183
229
|
}
|
|
184
230
|
/**
|
|
185
231
|
* Called when a set of positions on the map is cloned.
|
|
186
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
232
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_brush_cloned Online documentation}
|
|
187
233
|
*/
|
|
188
234
|
interface OnBrushClonedEvent extends EventData {
|
|
189
235
|
readonly source_offset: TilePosition
|
|
@@ -208,7 +254,7 @@ declare module "factorio:runtime" {
|
|
|
208
254
|
}
|
|
209
255
|
/**
|
|
210
256
|
* Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
|
|
211
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
257
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_build_base_arrived Online documentation}
|
|
212
258
|
*/
|
|
213
259
|
interface OnBuildBaseArrivedEvent extends EventData {
|
|
214
260
|
/**
|
|
@@ -232,7 +278,7 @@ declare module "factorio:runtime" {
|
|
|
232
278
|
* Called when player builds something.
|
|
233
279
|
*
|
|
234
280
|
* Event filter: [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter]
|
|
235
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
281
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_built_entity Online documentation}
|
|
236
282
|
*/
|
|
237
283
|
interface OnBuiltEntityEvent extends EventData {
|
|
238
284
|
/**
|
|
@@ -264,7 +310,7 @@ declare module "factorio:runtime" {
|
|
|
264
310
|
* Called when the deconstruction of an entity is canceled.
|
|
265
311
|
*
|
|
266
312
|
* Event filter: [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter]
|
|
267
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
313
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cancelled_deconstruction Online documentation}
|
|
268
314
|
*/
|
|
269
315
|
interface OnCancelledDeconstructionEvent extends EventData {
|
|
270
316
|
readonly entity: LuaEntity
|
|
@@ -282,7 +328,7 @@ declare module "factorio:runtime" {
|
|
|
282
328
|
* Called when the upgrade of an entity is canceled.
|
|
283
329
|
*
|
|
284
330
|
* Event filter: [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter]
|
|
285
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
331
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cancelled_upgrade Online documentation}
|
|
286
332
|
*/
|
|
287
333
|
interface OnCancelledUpgradeEvent extends EventData {
|
|
288
334
|
readonly entity: LuaEntity
|
|
@@ -300,7 +346,7 @@ declare module "factorio:runtime" {
|
|
|
300
346
|
}
|
|
301
347
|
/**
|
|
302
348
|
* Called after a cargo pod has delivered its cargo.
|
|
303
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
349
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cargo_pod_delivered_cargo Online documentation}
|
|
304
350
|
*/
|
|
305
351
|
interface OnCargoPodDeliveredCargoEvent extends EventData {
|
|
306
352
|
readonly cargo_pod: LuaEntity
|
|
@@ -319,7 +365,7 @@ declare module "factorio:runtime" {
|
|
|
319
365
|
}
|
|
320
366
|
/**
|
|
321
367
|
* Called when a cargo pod departs a surface.
|
|
322
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
368
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cargo_pod_finished_ascending Online documentation}
|
|
323
369
|
*/
|
|
324
370
|
interface OnCargoPodFinishedAscendingEvent extends EventData {
|
|
325
371
|
readonly cargo_pod: LuaEntity
|
|
@@ -342,7 +388,7 @@ declare module "factorio:runtime" {
|
|
|
342
388
|
}
|
|
343
389
|
/**
|
|
344
390
|
* Called when a cargo pods lands on a surface, either at a station or on the ground.
|
|
345
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
391
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cargo_pod_finished_descending Online documentation}
|
|
346
392
|
*/
|
|
347
393
|
interface OnCargoPodFinishedDescendingEvent extends EventData {
|
|
348
394
|
readonly cargo_pod: LuaEntity
|
|
@@ -365,7 +411,7 @@ declare module "factorio:runtime" {
|
|
|
365
411
|
}
|
|
366
412
|
/**
|
|
367
413
|
* Called when a cargo pod departs from a space platform hub or by another method not attached to a rocket.
|
|
368
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
414
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cargo_pod_started_ascending Online documentation}
|
|
369
415
|
*/
|
|
370
416
|
interface OnCargoPodStartedAscendingEvent extends EventData {
|
|
371
417
|
readonly cargo_pod: LuaEntity
|
|
@@ -386,7 +432,7 @@ declare module "factorio:runtime" {
|
|
|
386
432
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
|
387
433
|
*
|
|
388
434
|
* this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
|
389
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
435
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_character_corpse_expired Online documentation}
|
|
390
436
|
*/
|
|
391
437
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
|
392
438
|
/**
|
|
@@ -404,7 +450,7 @@ declare module "factorio:runtime" {
|
|
|
404
450
|
}
|
|
405
451
|
/**
|
|
406
452
|
* Called when a chart tag is created.
|
|
407
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
453
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_chart_tag_added Online documentation}
|
|
408
454
|
*/
|
|
409
455
|
interface OnChartTagAddedEvent extends EventData {
|
|
410
456
|
readonly tag: LuaCustomChartTag
|
|
@@ -421,7 +467,7 @@ declare module "factorio:runtime" {
|
|
|
421
467
|
}
|
|
422
468
|
/**
|
|
423
469
|
* Called when a chart tag is modified by a player or by script.
|
|
424
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
470
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_chart_tag_modified Online documentation}
|
|
425
471
|
*/
|
|
426
472
|
interface OnChartTagModifiedEvent extends EventData {
|
|
427
473
|
readonly tag: LuaCustomChartTag
|
|
@@ -443,7 +489,7 @@ declare module "factorio:runtime" {
|
|
|
443
489
|
}
|
|
444
490
|
/**
|
|
445
491
|
* Called just before a chart tag is deleted.
|
|
446
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
492
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_chart_tag_removed Online documentation}
|
|
447
493
|
*/
|
|
448
494
|
interface OnChartTagRemovedEvent extends EventData {
|
|
449
495
|
readonly tag: LuaCustomChartTag
|
|
@@ -460,7 +506,7 @@ declare module "factorio:runtime" {
|
|
|
460
506
|
}
|
|
461
507
|
/**
|
|
462
508
|
* Called when a chunk is charted or re-charted.
|
|
463
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
509
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_chunk_charted Online documentation}
|
|
464
510
|
*/
|
|
465
511
|
interface OnChunkChartedEvent extends EventData {
|
|
466
512
|
readonly surface_index: SurfaceIndex
|
|
@@ -481,7 +527,7 @@ declare module "factorio:runtime" {
|
|
|
481
527
|
}
|
|
482
528
|
/**
|
|
483
529
|
* Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
|
484
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
530
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_chunk_deleted Online documentation}
|
|
485
531
|
*/
|
|
486
532
|
interface OnChunkDeletedEvent extends EventData {
|
|
487
533
|
readonly surface_index: SurfaceIndex
|
|
@@ -500,7 +546,7 @@ declare module "factorio:runtime" {
|
|
|
500
546
|
}
|
|
501
547
|
/**
|
|
502
548
|
* Called when a chunk is generated.
|
|
503
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
549
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_chunk_generated Online documentation}
|
|
504
550
|
*/
|
|
505
551
|
interface OnChunkGeneratedEvent extends EventData {
|
|
506
552
|
/**
|
|
@@ -526,7 +572,7 @@ declare module "factorio:runtime" {
|
|
|
526
572
|
}
|
|
527
573
|
/**
|
|
528
574
|
* Called when a combat robot expires through a lack of energy, or timeout.
|
|
529
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
575
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_combat_robot_expired Online documentation}
|
|
530
576
|
*/
|
|
531
577
|
interface OnCombatRobotExpiredEvent extends EventData {
|
|
532
578
|
readonly robot: LuaEntity
|
|
@@ -547,7 +593,7 @@ declare module "factorio:runtime" {
|
|
|
547
593
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
|
548
594
|
*
|
|
549
595
|
* This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
|
550
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
596
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_console_chat Online documentation}
|
|
551
597
|
*/
|
|
552
598
|
interface OnConsoleChatEvent extends EventData {
|
|
553
599
|
/**
|
|
@@ -569,7 +615,7 @@ declare module "factorio:runtime" {
|
|
|
569
615
|
}
|
|
570
616
|
/**
|
|
571
617
|
* Called when someone enters a command-like message regardless of it being a valid command.
|
|
572
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
618
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_console_command Online documentation}
|
|
573
619
|
*/
|
|
574
620
|
interface OnConsoleCommandEvent extends EventData {
|
|
575
621
|
/**
|
|
@@ -595,7 +641,7 @@ declare module "factorio:runtime" {
|
|
|
595
641
|
}
|
|
596
642
|
/**
|
|
597
643
|
* Called when a cutscene is cancelled by the player or by script.
|
|
598
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
644
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cutscene_cancelled Online documentation}
|
|
599
645
|
*/
|
|
600
646
|
interface OnCutsceneCancelledEvent extends EventData {
|
|
601
647
|
/**
|
|
@@ -613,7 +659,7 @@ declare module "factorio:runtime" {
|
|
|
613
659
|
}
|
|
614
660
|
/**
|
|
615
661
|
* Called when a cutscene finishes naturally (was not cancelled).
|
|
616
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
662
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cutscene_finished Online documentation}
|
|
617
663
|
*/
|
|
618
664
|
interface OnCutsceneFinishedEvent extends EventData {
|
|
619
665
|
/**
|
|
@@ -631,7 +677,7 @@ declare module "factorio:runtime" {
|
|
|
631
677
|
}
|
|
632
678
|
/**
|
|
633
679
|
* Called when a cutscene starts.
|
|
634
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
680
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cutscene_started Online documentation}
|
|
635
681
|
*/
|
|
636
682
|
interface OnCutsceneStartedEvent extends EventData {
|
|
637
683
|
/**
|
|
@@ -651,7 +697,7 @@ declare module "factorio:runtime" {
|
|
|
651
697
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
|
652
698
|
*
|
|
653
699
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
|
654
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
700
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_cutscene_waypoint_reached Online documentation}
|
|
655
701
|
*/
|
|
656
702
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
|
657
703
|
/**
|
|
@@ -675,7 +721,7 @@ declare module "factorio:runtime" {
|
|
|
675
721
|
* Called when an entity is cloned. The filter applies to the source entity.
|
|
676
722
|
*
|
|
677
723
|
* Event filter: [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter]
|
|
678
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
724
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_entity_cloned Online documentation}
|
|
679
725
|
*/
|
|
680
726
|
interface OnEntityClonedEvent extends EventData {
|
|
681
727
|
readonly source: LuaEntity
|
|
@@ -693,7 +739,7 @@ declare module "factorio:runtime" {
|
|
|
693
739
|
* Called after an entity has been recolored either by the player or through script.
|
|
694
740
|
*
|
|
695
741
|
* Automatic recoloring due to {@link LuaPlayer#color LuaPlayer::color} will not raise events, as that is a separate mechanism.
|
|
696
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
742
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_entity_color_changed Online documentation}
|
|
697
743
|
*/
|
|
698
744
|
interface OnEntityColorChangedEvent extends EventData {
|
|
699
745
|
/**
|
|
@@ -713,7 +759,7 @@ declare module "factorio:runtime" {
|
|
|
713
759
|
* Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
|
|
714
760
|
*
|
|
715
761
|
* Event filter: [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter]
|
|
716
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
762
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_entity_damaged Online documentation}
|
|
717
763
|
*/
|
|
718
764
|
interface OnEntityDamagedEvent extends EventData {
|
|
719
765
|
readonly entity: LuaEntity
|
|
@@ -755,7 +801,7 @@ declare module "factorio:runtime" {
|
|
|
755
801
|
* Called when an entity dies.
|
|
756
802
|
*
|
|
757
803
|
* Event filter: [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter]
|
|
758
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
804
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_entity_died Online documentation}
|
|
759
805
|
*/
|
|
760
806
|
interface OnEntityDiedEvent extends EventData {
|
|
761
807
|
/**
|
|
@@ -789,7 +835,7 @@ declare module "factorio:runtime" {
|
|
|
789
835
|
}
|
|
790
836
|
/**
|
|
791
837
|
* Called when one of an entity's logistic slots changes.
|
|
792
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
838
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_entity_logistic_slot_changed Online documentation}
|
|
793
839
|
*/
|
|
794
840
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
|
795
841
|
/**
|
|
@@ -819,7 +865,7 @@ declare module "factorio:runtime" {
|
|
|
819
865
|
}
|
|
820
866
|
/**
|
|
821
867
|
* Called after an entity has been renamed either by the player or through script.
|
|
822
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
868
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_entity_renamed Online documentation}
|
|
823
869
|
*/
|
|
824
870
|
interface OnEntityRenamedEvent extends EventData {
|
|
825
871
|
/**
|
|
@@ -840,7 +886,7 @@ declare module "factorio:runtime" {
|
|
|
840
886
|
}
|
|
841
887
|
/**
|
|
842
888
|
* Called after entity copy-paste is done.
|
|
843
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
889
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_entity_settings_pasted Online documentation}
|
|
844
890
|
*/
|
|
845
891
|
interface OnEntitySettingsPastedEvent extends EventData {
|
|
846
892
|
readonly player_index: PlayerIndex
|
|
@@ -863,7 +909,7 @@ declare module "factorio:runtime" {
|
|
|
863
909
|
}
|
|
864
910
|
/**
|
|
865
911
|
* Called when an entity is spawned by a EnemySpawner
|
|
866
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
912
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_entity_spawned Online documentation}
|
|
867
913
|
*/
|
|
868
914
|
interface OnEntitySpawnedEvent extends EventData {
|
|
869
915
|
readonly spawner: LuaEntity
|
|
@@ -879,7 +925,7 @@ declare module "factorio:runtime" {
|
|
|
879
925
|
}
|
|
880
926
|
/**
|
|
881
927
|
* Called after equipment is inserted into an equipment grid.
|
|
882
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
928
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_equipment_inserted Online documentation}
|
|
883
929
|
*/
|
|
884
930
|
interface OnEquipmentInsertedEvent extends EventData {
|
|
885
931
|
/**
|
|
@@ -901,7 +947,7 @@ declare module "factorio:runtime" {
|
|
|
901
947
|
}
|
|
902
948
|
/**
|
|
903
949
|
* Called after equipment is removed from an equipment grid.
|
|
904
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
950
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_equipment_removed Online documentation}
|
|
905
951
|
*/
|
|
906
952
|
interface OnEquipmentRemovedEvent extends EventData {
|
|
907
953
|
/**
|
|
@@ -931,7 +977,7 @@ declare module "factorio:runtime" {
|
|
|
931
977
|
}
|
|
932
978
|
/**
|
|
933
979
|
* Called when the a forces cease fire values change.
|
|
934
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
980
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_force_cease_fire_changed Online documentation}
|
|
935
981
|
*/
|
|
936
982
|
interface OnForceCeaseFireChangedEvent extends EventData {
|
|
937
983
|
/**
|
|
@@ -959,7 +1005,7 @@ declare module "factorio:runtime" {
|
|
|
959
1005
|
* Called when a new force is created using `game.create_force()`
|
|
960
1006
|
*
|
|
961
1007
|
* This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
|
962
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1008
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_force_created Online documentation}
|
|
963
1009
|
*/
|
|
964
1010
|
interface OnForceCreatedEvent extends EventData {
|
|
965
1011
|
/**
|
|
@@ -977,7 +1023,7 @@ declare module "factorio:runtime" {
|
|
|
977
1023
|
}
|
|
978
1024
|
/**
|
|
979
1025
|
* Called when the a forces friends change.
|
|
980
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1026
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_force_friends_changed Online documentation}
|
|
981
1027
|
*/
|
|
982
1028
|
interface OnForceFriendsChangedEvent extends EventData {
|
|
983
1029
|
/**
|
|
@@ -1003,7 +1049,7 @@ declare module "factorio:runtime" {
|
|
|
1003
1049
|
}
|
|
1004
1050
|
/**
|
|
1005
1051
|
* Called when {@link LuaForce#reset LuaForce::reset} is finished.
|
|
1006
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1052
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_force_reset Online documentation}
|
|
1007
1053
|
*/
|
|
1008
1054
|
interface OnForceResetEvent extends EventData {
|
|
1009
1055
|
readonly force: LuaForce
|
|
@@ -1020,7 +1066,7 @@ declare module "factorio:runtime" {
|
|
|
1020
1066
|
* Called after two forces have been merged using `game.merge_forces()`.
|
|
1021
1067
|
*
|
|
1022
1068
|
* The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
|
1023
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1069
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_forces_merged Online documentation}
|
|
1024
1070
|
*/
|
|
1025
1071
|
interface OnForcesMergedEvent extends EventData {
|
|
1026
1072
|
/**
|
|
@@ -1046,7 +1092,7 @@ declare module "factorio:runtime" {
|
|
|
1046
1092
|
}
|
|
1047
1093
|
/**
|
|
1048
1094
|
* Called when two forces are about to be merged using `game.merge_forces()`.
|
|
1049
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1095
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_forces_merging Online documentation}
|
|
1050
1096
|
*/
|
|
1051
1097
|
interface OnForcesMergingEvent extends EventData {
|
|
1052
1098
|
/**
|
|
@@ -1070,7 +1116,7 @@ declare module "factorio:runtime" {
|
|
|
1070
1116
|
* 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.
|
|
1071
1117
|
*
|
|
1072
1118
|
* This event is not fired when the scenario is loaded via the map editor.
|
|
1073
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1119
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_game_created_from_scenario Online documentation}
|
|
1074
1120
|
*/
|
|
1075
1121
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
|
1076
1122
|
/**
|
|
@@ -1084,7 +1130,7 @@ declare module "factorio:runtime" {
|
|
|
1084
1130
|
}
|
|
1085
1131
|
/**
|
|
1086
1132
|
* Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
|
|
1087
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1133
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_checked_state_changed Online documentation}
|
|
1088
1134
|
*/
|
|
1089
1135
|
interface OnGuiCheckedStateChangedEvent extends EventData {
|
|
1090
1136
|
/**
|
|
@@ -1106,7 +1152,7 @@ declare module "factorio:runtime" {
|
|
|
1106
1152
|
}
|
|
1107
1153
|
/**
|
|
1108
1154
|
* Called when {@link LuaGuiElement} is clicked.
|
|
1109
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1155
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_click Online documentation}
|
|
1110
1156
|
*/
|
|
1111
1157
|
interface OnGuiClickEvent extends EventData {
|
|
1112
1158
|
/**
|
|
@@ -1152,7 +1198,7 @@ declare module "factorio:runtime" {
|
|
|
1152
1198
|
* 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.
|
|
1153
1199
|
*
|
|
1154
1200
|
* 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.
|
|
1155
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1201
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_closed Online documentation}
|
|
1156
1202
|
*/
|
|
1157
1203
|
interface OnGuiClosedEvent extends EventData {
|
|
1158
1204
|
/**
|
|
@@ -1206,7 +1252,7 @@ declare module "factorio:runtime" {
|
|
|
1206
1252
|
}
|
|
1207
1253
|
/**
|
|
1208
1254
|
* Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
|
|
1209
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1255
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_confirmed Online documentation}
|
|
1210
1256
|
*/
|
|
1211
1257
|
interface OnGuiConfirmedEvent extends EventData {
|
|
1212
1258
|
/**
|
|
@@ -1240,7 +1286,7 @@ declare module "factorio:runtime" {
|
|
|
1240
1286
|
}
|
|
1241
1287
|
/**
|
|
1242
1288
|
* Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
|
|
1243
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1289
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_elem_changed Online documentation}
|
|
1244
1290
|
*/
|
|
1245
1291
|
interface OnGuiElemChangedEvent extends EventData {
|
|
1246
1292
|
/**
|
|
@@ -1264,7 +1310,7 @@ declare module "factorio:runtime" {
|
|
|
1264
1310
|
* Called when {@link LuaGuiElement} is hovered by the mouse.
|
|
1265
1311
|
*
|
|
1266
1312
|
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
|
1267
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1313
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_hover Online documentation}
|
|
1268
1314
|
*/
|
|
1269
1315
|
interface OnGuiHoverEvent extends EventData {
|
|
1270
1316
|
/**
|
|
@@ -1286,7 +1332,7 @@ declare module "factorio:runtime" {
|
|
|
1286
1332
|
}
|
|
1287
1333
|
/**
|
|
1288
1334
|
* Called when a player interacts with a custom inventory GUI.
|
|
1289
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1335
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_inventory_action Online documentation}
|
|
1290
1336
|
*/
|
|
1291
1337
|
interface OnGuiInventoryActionEvent extends EventData {
|
|
1292
1338
|
/**
|
|
@@ -1346,7 +1392,7 @@ declare module "factorio:runtime" {
|
|
|
1346
1392
|
* Called when the player's cursor leaves a {@link LuaGuiElement} that was previously hovered.
|
|
1347
1393
|
*
|
|
1348
1394
|
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
|
1349
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1395
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_leave Online documentation}
|
|
1350
1396
|
*/
|
|
1351
1397
|
interface OnGuiLeaveEvent extends EventData {
|
|
1352
1398
|
/**
|
|
@@ -1368,7 +1414,7 @@ declare module "factorio:runtime" {
|
|
|
1368
1414
|
}
|
|
1369
1415
|
/**
|
|
1370
1416
|
* Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
|
|
1371
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1417
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_location_changed Online documentation}
|
|
1372
1418
|
*/
|
|
1373
1419
|
interface OnGuiLocationChangedEvent extends EventData {
|
|
1374
1420
|
/**
|
|
@@ -1390,7 +1436,7 @@ declare module "factorio:runtime" {
|
|
|
1390
1436
|
}
|
|
1391
1437
|
/**
|
|
1392
1438
|
* Called when the player opens a GUI.
|
|
1393
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1439
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_opened Online documentation}
|
|
1394
1440
|
*/
|
|
1395
1441
|
interface OnGuiOpenedEvent extends EventData {
|
|
1396
1442
|
/**
|
|
@@ -1444,7 +1490,7 @@ declare module "factorio:runtime" {
|
|
|
1444
1490
|
}
|
|
1445
1491
|
/**
|
|
1446
1492
|
* Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
|
|
1447
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1493
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_selected_tab_changed Online documentation}
|
|
1448
1494
|
*/
|
|
1449
1495
|
interface OnGuiSelectedTabChangedEvent extends EventData {
|
|
1450
1496
|
/**
|
|
@@ -1466,7 +1512,7 @@ declare module "factorio:runtime" {
|
|
|
1466
1512
|
}
|
|
1467
1513
|
/**
|
|
1468
1514
|
* Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
|
|
1469
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1515
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_selection_state_changed Online documentation}
|
|
1470
1516
|
*/
|
|
1471
1517
|
interface OnGuiSelectionStateChangedEvent extends EventData {
|
|
1472
1518
|
/**
|
|
@@ -1488,7 +1534,7 @@ declare module "factorio:runtime" {
|
|
|
1488
1534
|
}
|
|
1489
1535
|
/**
|
|
1490
1536
|
* Called when {@link LuaGuiElement} switch state is changed (related to switches).
|
|
1491
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1537
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_switch_state_changed Online documentation}
|
|
1492
1538
|
*/
|
|
1493
1539
|
interface OnGuiSwitchStateChangedEvent extends EventData {
|
|
1494
1540
|
/**
|
|
@@ -1510,7 +1556,7 @@ declare module "factorio:runtime" {
|
|
|
1510
1556
|
}
|
|
1511
1557
|
/**
|
|
1512
1558
|
* Called when {@link LuaGuiElement} text is changed by the player.
|
|
1513
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1559
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_text_changed Online documentation}
|
|
1514
1560
|
*/
|
|
1515
1561
|
interface OnGuiTextChangedEvent extends EventData {
|
|
1516
1562
|
/**
|
|
@@ -1536,7 +1582,7 @@ declare module "factorio:runtime" {
|
|
|
1536
1582
|
}
|
|
1537
1583
|
/**
|
|
1538
1584
|
* Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
|
|
1539
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1585
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_gui_value_changed Online documentation}
|
|
1540
1586
|
*/
|
|
1541
1587
|
interface OnGuiValueChangedEvent extends EventData {
|
|
1542
1588
|
/**
|
|
@@ -1558,7 +1604,7 @@ declare module "factorio:runtime" {
|
|
|
1558
1604
|
}
|
|
1559
1605
|
/**
|
|
1560
1606
|
* Called when a land mine is armed.
|
|
1561
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1607
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_land_mine_armed Online documentation}
|
|
1562
1608
|
*/
|
|
1563
1609
|
interface OnLandMineArmedEvent extends EventData {
|
|
1564
1610
|
readonly mine: LuaEntity
|
|
@@ -1573,7 +1619,7 @@ declare module "factorio:runtime" {
|
|
|
1573
1619
|
}
|
|
1574
1620
|
/**
|
|
1575
1621
|
* Called when a custom {@link import("factorio:prototype").ShortcutPrototype Lua shortcut} is pressed.
|
|
1576
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1622
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_lua_shortcut Online documentation}
|
|
1577
1623
|
*/
|
|
1578
1624
|
interface OnLuaShortcutEvent extends EventData {
|
|
1579
1625
|
readonly player_index: PlayerIndex
|
|
@@ -1594,7 +1640,7 @@ declare module "factorio:runtime" {
|
|
|
1594
1640
|
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
|
|
1595
1641
|
*
|
|
1596
1642
|
* Event filter: [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter]
|
|
1597
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1643
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_marked_for_deconstruction Online documentation}
|
|
1598
1644
|
*/
|
|
1599
1645
|
interface OnMarkedForDeconstructionEvent extends EventData {
|
|
1600
1646
|
readonly entity: LuaEntity
|
|
@@ -1612,7 +1658,7 @@ declare module "factorio:runtime" {
|
|
|
1612
1658
|
* Called when an entity is marked for upgrade with the upgrade planner or via script.
|
|
1613
1659
|
*
|
|
1614
1660
|
* Event filter: [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter]
|
|
1615
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1661
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_marked_for_upgrade Online documentation}
|
|
1616
1662
|
*/
|
|
1617
1663
|
interface OnMarkedForUpgradeEvent extends EventData {
|
|
1618
1664
|
readonly player_index?: PlayerIndex
|
|
@@ -1641,7 +1687,7 @@ declare module "factorio:runtime" {
|
|
|
1641
1687
|
}
|
|
1642
1688
|
/**
|
|
1643
1689
|
* Called after a player purchases some offer from a `market` entity.
|
|
1644
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1690
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_market_item_purchased Online documentation}
|
|
1645
1691
|
*/
|
|
1646
1692
|
interface OnMarketItemPurchasedEvent extends EventData {
|
|
1647
1693
|
/**
|
|
@@ -1671,7 +1717,7 @@ declare module "factorio:runtime" {
|
|
|
1671
1717
|
}
|
|
1672
1718
|
/**
|
|
1673
1719
|
* Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
|
|
1674
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1720
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_mod_item_opened Online documentation}
|
|
1675
1721
|
*/
|
|
1676
1722
|
interface OnModItemOpenedEvent extends EventData {
|
|
1677
1723
|
/**
|
|
@@ -1697,7 +1743,7 @@ declare module "factorio:runtime" {
|
|
|
1697
1743
|
}
|
|
1698
1744
|
/**
|
|
1699
1745
|
* Called when {@link LuaGameScript#is_multiplayer LuaGameScript::is_multiplayer} changes to true. May also be raised when it was already true but a game was loaded from a save file and with hosting.
|
|
1700
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1746
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_multiplayer_init Online documentation}
|
|
1701
1747
|
*/
|
|
1702
1748
|
interface OnMultiplayerInitEvent extends EventData {
|
|
1703
1749
|
/**
|
|
@@ -1709,11 +1755,26 @@ declare module "factorio:runtime" {
|
|
|
1709
1755
|
*/
|
|
1710
1756
|
readonly tick: MapTick
|
|
1711
1757
|
}
|
|
1758
|
+
/**
|
|
1759
|
+
* Called when value of {@link LuaSurface#daytime LuaSurface::daytime} wraps around to be in `[0, 1)` range.
|
|
1760
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_next_day_started Online documentation}
|
|
1761
|
+
*/
|
|
1762
|
+
interface OnNextDayStartedEvent extends EventData {
|
|
1763
|
+
readonly surface: LuaSurface
|
|
1764
|
+
/**
|
|
1765
|
+
* Identifier of the event.
|
|
1766
|
+
*/
|
|
1767
|
+
readonly name: typeof defines.events.on_next_day_started
|
|
1768
|
+
/**
|
|
1769
|
+
* Tick the event was generated.
|
|
1770
|
+
*/
|
|
1771
|
+
readonly tick: MapTick
|
|
1772
|
+
}
|
|
1712
1773
|
/**
|
|
1713
1774
|
* Called after an object is destroyed which was registered with {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed} previously.
|
|
1714
1775
|
*
|
|
1715
1776
|
* Depending on when a given object is destroyed, this event will be fired at the end of the current tick or at the end of the next tick. The event's timing is independent of the in-world object being destroyed.
|
|
1716
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1777
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_object_destroyed Online documentation}
|
|
1717
1778
|
*/
|
|
1718
1779
|
interface OnObjectDestroyedEvent extends EventData {
|
|
1719
1780
|
/**
|
|
@@ -1739,7 +1800,7 @@ declare module "factorio:runtime" {
|
|
|
1739
1800
|
}
|
|
1740
1801
|
/**
|
|
1741
1802
|
* Called directly after a permission group is added.
|
|
1742
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1803
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_permission_group_added Online documentation}
|
|
1743
1804
|
*/
|
|
1744
1805
|
interface OnPermissionGroupAddedEvent extends EventData {
|
|
1745
1806
|
/**
|
|
@@ -1761,7 +1822,7 @@ declare module "factorio:runtime" {
|
|
|
1761
1822
|
}
|
|
1762
1823
|
/**
|
|
1763
1824
|
* Called directly after a permission group is deleted.
|
|
1764
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1825
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_permission_group_deleted Online documentation}
|
|
1765
1826
|
*/
|
|
1766
1827
|
interface OnPermissionGroupDeletedEvent extends EventData {
|
|
1767
1828
|
/**
|
|
@@ -1787,7 +1848,7 @@ declare module "factorio:runtime" {
|
|
|
1787
1848
|
}
|
|
1788
1849
|
/**
|
|
1789
1850
|
* Called directly after a permission group is edited in some way.
|
|
1790
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1851
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_permission_group_edited Online documentation}
|
|
1791
1852
|
*/
|
|
1792
1853
|
interface OnPermissionGroupEditedEvent extends EventData {
|
|
1793
1854
|
/**
|
|
@@ -1830,7 +1891,7 @@ declare module "factorio:runtime" {
|
|
|
1830
1891
|
}
|
|
1831
1892
|
/**
|
|
1832
1893
|
* Called directly after a permission string is imported.
|
|
1833
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1894
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_permission_string_imported Online documentation}
|
|
1834
1895
|
*/
|
|
1835
1896
|
interface OnPermissionStringImportedEvent extends EventData {
|
|
1836
1897
|
/**
|
|
@@ -1848,7 +1909,7 @@ declare module "factorio:runtime" {
|
|
|
1848
1909
|
}
|
|
1849
1910
|
/**
|
|
1850
1911
|
* Called when a player picks up an item.
|
|
1851
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1912
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_picked_up_item Online documentation}
|
|
1852
1913
|
*/
|
|
1853
1914
|
interface OnPickedUpItemEvent extends EventData {
|
|
1854
1915
|
readonly item_stack: ItemWithQualityCount
|
|
@@ -1864,7 +1925,7 @@ declare module "factorio:runtime" {
|
|
|
1864
1925
|
}
|
|
1865
1926
|
/**
|
|
1866
1927
|
* Called after a player alt-reverse-selects an area with a selection-tool item.
|
|
1867
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1928
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_alt_reverse_selected_area Online documentation}
|
|
1868
1929
|
*/
|
|
1869
1930
|
interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
|
|
1870
1931
|
/**
|
|
@@ -1879,6 +1940,14 @@ declare module "factorio:runtime" {
|
|
|
1879
1940
|
* The area selected.
|
|
1880
1941
|
*/
|
|
1881
1942
|
readonly area: BoundingBox
|
|
1943
|
+
/**
|
|
1944
|
+
* The position where the player started the selection.
|
|
1945
|
+
*/
|
|
1946
|
+
readonly position: MapPosition
|
|
1947
|
+
/**
|
|
1948
|
+
* The player cursor position.
|
|
1949
|
+
*/
|
|
1950
|
+
readonly cursor_position: MapPosition
|
|
1882
1951
|
/**
|
|
1883
1952
|
* The item used to select the area.
|
|
1884
1953
|
*/
|
|
@@ -1891,6 +1960,7 @@ declare module "factorio:runtime" {
|
|
|
1891
1960
|
* The tiles selected.
|
|
1892
1961
|
*/
|
|
1893
1962
|
readonly tiles: LuaTile[]
|
|
1963
|
+
readonly selection_mode: defines.selection_mode
|
|
1894
1964
|
/**
|
|
1895
1965
|
* Identifier of the event.
|
|
1896
1966
|
*/
|
|
@@ -1902,7 +1972,7 @@ declare module "factorio:runtime" {
|
|
|
1902
1972
|
}
|
|
1903
1973
|
/**
|
|
1904
1974
|
* Called after a player alt-selects an area with a selection-tool item.
|
|
1905
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
1975
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_alt_selected_area Online documentation}
|
|
1906
1976
|
*/
|
|
1907
1977
|
interface OnPlayerAltSelectedAreaEvent extends EventData {
|
|
1908
1978
|
/**
|
|
@@ -1917,6 +1987,14 @@ declare module "factorio:runtime" {
|
|
|
1917
1987
|
* The area selected.
|
|
1918
1988
|
*/
|
|
1919
1989
|
readonly area: BoundingBox
|
|
1990
|
+
/**
|
|
1991
|
+
* The position where the player started the selection.
|
|
1992
|
+
*/
|
|
1993
|
+
readonly position: MapPosition
|
|
1994
|
+
/**
|
|
1995
|
+
* The player cursor position.
|
|
1996
|
+
*/
|
|
1997
|
+
readonly cursor_position: MapPosition
|
|
1920
1998
|
/**
|
|
1921
1999
|
* The item used to select the area.
|
|
1922
2000
|
*/
|
|
@@ -1933,6 +2011,7 @@ declare module "factorio:runtime" {
|
|
|
1933
2011
|
* The tiles selected.
|
|
1934
2012
|
*/
|
|
1935
2013
|
readonly tiles: LuaTile[]
|
|
2014
|
+
readonly selection_mode: defines.selection_mode
|
|
1936
2015
|
/**
|
|
1937
2016
|
* Identifier of the event.
|
|
1938
2017
|
*/
|
|
@@ -1944,7 +2023,7 @@ declare module "factorio:runtime" {
|
|
|
1944
2023
|
}
|
|
1945
2024
|
/**
|
|
1946
2025
|
* Called after a players ammo inventory changed in some way.
|
|
1947
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2026
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_ammo_inventory_changed Online documentation}
|
|
1948
2027
|
*/
|
|
1949
2028
|
interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
|
1950
2029
|
readonly player_index: PlayerIndex
|
|
@@ -1959,7 +2038,7 @@ declare module "factorio:runtime" {
|
|
|
1959
2038
|
}
|
|
1960
2039
|
/**
|
|
1961
2040
|
* Called after a players armor inventory changed in some way.
|
|
1962
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2041
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_armor_inventory_changed Online documentation}
|
|
1963
2042
|
*/
|
|
1964
2043
|
interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
|
1965
2044
|
readonly player_index: PlayerIndex
|
|
@@ -1974,7 +2053,7 @@ declare module "factorio:runtime" {
|
|
|
1974
2053
|
}
|
|
1975
2054
|
/**
|
|
1976
2055
|
* Called when a player is banned.
|
|
1977
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2056
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_banned Online documentation}
|
|
1978
2057
|
*/
|
|
1979
2058
|
interface OnPlayerBannedEvent extends EventData {
|
|
1980
2059
|
/**
|
|
@@ -2004,7 +2083,7 @@ declare module "factorio:runtime" {
|
|
|
2004
2083
|
}
|
|
2005
2084
|
/**
|
|
2006
2085
|
* Called after a player builds tiles.
|
|
2007
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2086
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_built_tile Online documentation}
|
|
2008
2087
|
*/
|
|
2009
2088
|
interface OnPlayerBuiltTileEvent extends EventData {
|
|
2010
2089
|
readonly player_index: PlayerIndex
|
|
@@ -2041,9 +2120,62 @@ declare module "factorio:runtime" {
|
|
|
2041
2120
|
*/
|
|
2042
2121
|
readonly tick: MapTick
|
|
2043
2122
|
}
|
|
2123
|
+
/**
|
|
2124
|
+
* Called after a player cancels their attempt to select an area with a selection-tool item that has {@link import("factorio:prototype").SelectionToolPrototype#send_pre_selection_events SelectionToolPrototype::send_pre_selection_events} set to `true`.
|
|
2125
|
+
*
|
|
2126
|
+
* Because a player's selection state exists solely on their local client and not in game state, this event and the other area preselection events are provided with "best effort", but are not guaranteed. In some situations, such as after loading an existing save or in a multiplayer game, preselection events may not be received in an order that makes sense for the current game state or may be dropped altogether.
|
|
2127
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_cancel_selected_area Online documentation}
|
|
2128
|
+
*/
|
|
2129
|
+
interface OnPlayerCancelSelectedAreaEvent extends EventData {
|
|
2130
|
+
/**
|
|
2131
|
+
* The player doing the selection.
|
|
2132
|
+
*/
|
|
2133
|
+
readonly player_index: PlayerIndex
|
|
2134
|
+
/**
|
|
2135
|
+
* The surface selected.
|
|
2136
|
+
*/
|
|
2137
|
+
readonly surface: LuaSurface
|
|
2138
|
+
/**
|
|
2139
|
+
* The area selected.
|
|
2140
|
+
*/
|
|
2141
|
+
readonly area: BoundingBox
|
|
2142
|
+
/**
|
|
2143
|
+
* The position where the player started the selection.
|
|
2144
|
+
*/
|
|
2145
|
+
readonly position: MapPosition
|
|
2146
|
+
/**
|
|
2147
|
+
* The player cursor position.
|
|
2148
|
+
*/
|
|
2149
|
+
readonly cursor_position: MapPosition
|
|
2150
|
+
/**
|
|
2151
|
+
* The item used to select the area.
|
|
2152
|
+
*/
|
|
2153
|
+
readonly item: string
|
|
2154
|
+
/**
|
|
2155
|
+
* The item quality used to select the area.
|
|
2156
|
+
*/
|
|
2157
|
+
readonly quality: string
|
|
2158
|
+
/**
|
|
2159
|
+
* The entities selected.
|
|
2160
|
+
*/
|
|
2161
|
+
readonly entities: LuaEntity[]
|
|
2162
|
+
/**
|
|
2163
|
+
* The tiles selected.
|
|
2164
|
+
*/
|
|
2165
|
+
readonly tiles: LuaTile[]
|
|
2166
|
+
readonly selection_mode: defines.selection_mode
|
|
2167
|
+
/**
|
|
2168
|
+
* Identifier of the event.
|
|
2169
|
+
*/
|
|
2170
|
+
readonly name: typeof defines.events.on_player_cancel_selected_area
|
|
2171
|
+
/**
|
|
2172
|
+
* Tick the event was generated.
|
|
2173
|
+
*/
|
|
2174
|
+
readonly tick: MapTick
|
|
2175
|
+
}
|
|
2044
2176
|
/**
|
|
2045
2177
|
* Called when a player cancels crafting.
|
|
2046
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2178
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_cancelled_crafting Online documentation}
|
|
2047
2179
|
*/
|
|
2048
2180
|
interface OnPlayerCancelledCraftingEvent extends EventData {
|
|
2049
2181
|
/**
|
|
@@ -2071,9 +2203,62 @@ declare module "factorio:runtime" {
|
|
|
2071
2203
|
*/
|
|
2072
2204
|
readonly tick: MapTick
|
|
2073
2205
|
}
|
|
2206
|
+
/**
|
|
2207
|
+
* Called after a player changes the selection area or selection type with a selection-tool item that has {@link import("factorio:prototype").SelectionToolPrototype#send_pre_selection_events SelectionToolPrototype::send_pre_selection_events} set to `true`.
|
|
2208
|
+
*
|
|
2209
|
+
* Because a player's selection state exists solely on their local client and not in game state, this event and the other area preselection events are provided with "best effort", but are not guaranteed. In some situations, such as after loading an existing save or in a multiplayer game, preselection events may not be received in an order that makes sense for the current game state or may be dropped altogether.
|
|
2210
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_change_selected_area Online documentation}
|
|
2211
|
+
*/
|
|
2212
|
+
interface OnPlayerChangeSelectedAreaEvent extends EventData {
|
|
2213
|
+
/**
|
|
2214
|
+
* The player doing the selection.
|
|
2215
|
+
*/
|
|
2216
|
+
readonly player_index: PlayerIndex
|
|
2217
|
+
/**
|
|
2218
|
+
* The surface selected.
|
|
2219
|
+
*/
|
|
2220
|
+
readonly surface: LuaSurface
|
|
2221
|
+
/**
|
|
2222
|
+
* The area selected.
|
|
2223
|
+
*/
|
|
2224
|
+
readonly area: BoundingBox
|
|
2225
|
+
/**
|
|
2226
|
+
* The position where the player started the selection.
|
|
2227
|
+
*/
|
|
2228
|
+
readonly position: MapPosition
|
|
2229
|
+
/**
|
|
2230
|
+
* The player cursor position.
|
|
2231
|
+
*/
|
|
2232
|
+
readonly cursor_position: MapPosition
|
|
2233
|
+
/**
|
|
2234
|
+
* The item used to select the area.
|
|
2235
|
+
*/
|
|
2236
|
+
readonly item: string
|
|
2237
|
+
/**
|
|
2238
|
+
* The item quality used to select the area.
|
|
2239
|
+
*/
|
|
2240
|
+
readonly quality: string
|
|
2241
|
+
/**
|
|
2242
|
+
* The entities selected.
|
|
2243
|
+
*/
|
|
2244
|
+
readonly entities: LuaEntity[]
|
|
2245
|
+
/**
|
|
2246
|
+
* The tiles selected.
|
|
2247
|
+
*/
|
|
2248
|
+
readonly tiles: LuaTile[]
|
|
2249
|
+
readonly selection_mode: defines.selection_mode
|
|
2250
|
+
/**
|
|
2251
|
+
* Identifier of the event.
|
|
2252
|
+
*/
|
|
2253
|
+
readonly name: typeof defines.events.on_player_change_selected_area
|
|
2254
|
+
/**
|
|
2255
|
+
* Tick the event was generated.
|
|
2256
|
+
*/
|
|
2257
|
+
readonly tick: MapTick
|
|
2258
|
+
}
|
|
2074
2259
|
/**
|
|
2075
2260
|
* Called after a player changes forces.
|
|
2076
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2261
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_changed_force Online documentation}
|
|
2077
2262
|
*/
|
|
2078
2263
|
interface OnPlayerChangedForceEvent extends EventData {
|
|
2079
2264
|
/**
|
|
@@ -2095,7 +2280,7 @@ declare module "factorio:runtime" {
|
|
|
2095
2280
|
}
|
|
2096
2281
|
/**
|
|
2097
2282
|
* Called when the tile position a player is located at changes.
|
|
2098
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2283
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_changed_position Online documentation}
|
|
2099
2284
|
*/
|
|
2100
2285
|
interface OnPlayerChangedPositionEvent extends EventData {
|
|
2101
2286
|
/**
|
|
@@ -2113,7 +2298,7 @@ declare module "factorio:runtime" {
|
|
|
2113
2298
|
}
|
|
2114
2299
|
/**
|
|
2115
2300
|
* Called after a player changes surfaces.
|
|
2116
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2301
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_changed_surface Online documentation}
|
|
2117
2302
|
*/
|
|
2118
2303
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
|
2119
2304
|
/**
|
|
@@ -2135,7 +2320,7 @@ declare module "factorio:runtime" {
|
|
|
2135
2320
|
}
|
|
2136
2321
|
/**
|
|
2137
2322
|
* Called when cheat mode is disabled on a player.
|
|
2138
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2323
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_cheat_mode_disabled Online documentation}
|
|
2139
2324
|
*/
|
|
2140
2325
|
interface OnPlayerCheatModeDisabledEvent extends EventData {
|
|
2141
2326
|
/**
|
|
@@ -2153,7 +2338,7 @@ declare module "factorio:runtime" {
|
|
|
2153
2338
|
}
|
|
2154
2339
|
/**
|
|
2155
2340
|
* Called when cheat mode is enabled on a player.
|
|
2156
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2341
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_cheat_mode_enabled Online documentation}
|
|
2157
2342
|
*/
|
|
2158
2343
|
interface OnPlayerCheatModeEnabledEvent extends EventData {
|
|
2159
2344
|
/**
|
|
@@ -2171,7 +2356,7 @@ declare module "factorio:runtime" {
|
|
|
2171
2356
|
}
|
|
2172
2357
|
/**
|
|
2173
2358
|
* Called when a player clicks a gps tag
|
|
2174
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2359
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_clicked_gps_tag Online documentation}
|
|
2175
2360
|
*/
|
|
2176
2361
|
interface OnPlayerClickedGpsTagEvent extends EventData {
|
|
2177
2362
|
/**
|
|
@@ -2197,7 +2382,7 @@ declare module "factorio:runtime" {
|
|
|
2197
2382
|
}
|
|
2198
2383
|
/**
|
|
2199
2384
|
* Called after a player's color changes.
|
|
2200
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2385
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_color_changed Online documentation}
|
|
2201
2386
|
*/
|
|
2202
2387
|
interface OnPlayerColorChangedEvent extends EventData {
|
|
2203
2388
|
/**
|
|
@@ -2227,7 +2412,7 @@ declare module "factorio:runtime" {
|
|
|
2227
2412
|
}
|
|
2228
2413
|
/**
|
|
2229
2414
|
* Called when a player clicks the "confirm" button in the configure Blueprint GUI.
|
|
2230
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2415
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_configured_blueprint Online documentation}
|
|
2231
2416
|
*/
|
|
2232
2417
|
interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
|
2233
2418
|
/**
|
|
@@ -2245,7 +2430,7 @@ declare module "factorio:runtime" {
|
|
|
2245
2430
|
}
|
|
2246
2431
|
/**
|
|
2247
2432
|
* Called after a player changes controller types.
|
|
2248
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2433
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_controller_changed Online documentation}
|
|
2249
2434
|
*/
|
|
2250
2435
|
interface OnPlayerControllerChangedEvent extends EventData {
|
|
2251
2436
|
/**
|
|
@@ -2267,7 +2452,7 @@ declare module "factorio:runtime" {
|
|
|
2267
2452
|
}
|
|
2268
2453
|
/**
|
|
2269
2454
|
* 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}).
|
|
2270
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2455
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_crafted_item Online documentation}
|
|
2271
2456
|
*/
|
|
2272
2457
|
interface OnPlayerCraftedItemEvent extends EventData {
|
|
2273
2458
|
/**
|
|
@@ -2293,7 +2478,7 @@ declare module "factorio:runtime" {
|
|
|
2293
2478
|
}
|
|
2294
2479
|
/**
|
|
2295
2480
|
* Called after the player was created.
|
|
2296
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2481
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_created Online documentation}
|
|
2297
2482
|
*/
|
|
2298
2483
|
interface OnPlayerCreatedEvent extends EventData {
|
|
2299
2484
|
readonly player_index: PlayerIndex
|
|
@@ -2310,7 +2495,7 @@ declare module "factorio:runtime" {
|
|
|
2310
2495
|
* Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
|
|
2311
2496
|
*
|
|
2312
2497
|
* This is fired in the same tick that the change happens, but not instantly.
|
|
2313
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2498
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_cursor_stack_changed Online documentation}
|
|
2314
2499
|
*/
|
|
2315
2500
|
interface OnPlayerCursorStackChangedEvent extends EventData {
|
|
2316
2501
|
readonly player_index: PlayerIndex
|
|
@@ -2325,7 +2510,7 @@ declare module "factorio:runtime" {
|
|
|
2325
2510
|
}
|
|
2326
2511
|
/**
|
|
2327
2512
|
* Called when a player selects an area with a deconstruction planner.
|
|
2328
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2513
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_deconstructed_area Online documentation}
|
|
2329
2514
|
*/
|
|
2330
2515
|
interface OnPlayerDeconstructedAreaEvent extends EventData {
|
|
2331
2516
|
/**
|
|
@@ -2340,6 +2525,14 @@ declare module "factorio:runtime" {
|
|
|
2340
2525
|
* The area selected.
|
|
2341
2526
|
*/
|
|
2342
2527
|
readonly area: BoundingBox
|
|
2528
|
+
/**
|
|
2529
|
+
* The position where the player started the selection.
|
|
2530
|
+
*/
|
|
2531
|
+
readonly position: MapPosition
|
|
2532
|
+
/**
|
|
2533
|
+
* The player cursor position.
|
|
2534
|
+
*/
|
|
2535
|
+
readonly cursor_position: MapPosition
|
|
2343
2536
|
/**
|
|
2344
2537
|
* The item used to select the area.
|
|
2345
2538
|
*/
|
|
@@ -2360,6 +2553,7 @@ declare module "factorio:runtime" {
|
|
|
2360
2553
|
* If normal selection or alt selection was used.
|
|
2361
2554
|
*/
|
|
2362
2555
|
readonly alt: boolean
|
|
2556
|
+
readonly selection_mode: defines.selection_mode
|
|
2363
2557
|
/**
|
|
2364
2558
|
* Identifier of the event.
|
|
2365
2559
|
*/
|
|
@@ -2371,7 +2565,7 @@ declare module "factorio:runtime" {
|
|
|
2371
2565
|
}
|
|
2372
2566
|
/**
|
|
2373
2567
|
* Called when a player is demoted.
|
|
2374
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2568
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_demoted Online documentation}
|
|
2375
2569
|
*/
|
|
2376
2570
|
interface OnPlayerDemotedEvent extends EventData {
|
|
2377
2571
|
/**
|
|
@@ -2389,7 +2583,7 @@ declare module "factorio:runtime" {
|
|
|
2389
2583
|
}
|
|
2390
2584
|
/**
|
|
2391
2585
|
* Called after a player dies.
|
|
2392
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2586
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_died Online documentation}
|
|
2393
2587
|
*/
|
|
2394
2588
|
interface OnPlayerDiedEvent extends EventData {
|
|
2395
2589
|
readonly player_index: PlayerIndex
|
|
@@ -2405,7 +2599,7 @@ declare module "factorio:runtime" {
|
|
|
2405
2599
|
}
|
|
2406
2600
|
/**
|
|
2407
2601
|
* Called when the display density scale changes for a given player. The display density scale is the scale value automatically applied based on the player's display DPI. This is only relevant on platforms that support high-density displays.
|
|
2408
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2602
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_display_density_scale_changed Online documentation}
|
|
2409
2603
|
*/
|
|
2410
2604
|
interface OnPlayerDisplayDensityScaleChangedEvent extends EventData {
|
|
2411
2605
|
/**
|
|
@@ -2427,7 +2621,7 @@ declare module "factorio:runtime" {
|
|
|
2427
2621
|
}
|
|
2428
2622
|
/**
|
|
2429
2623
|
* Called when the display resolution changes for a given player.
|
|
2430
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2624
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_display_resolution_changed Online documentation}
|
|
2431
2625
|
*/
|
|
2432
2626
|
interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
|
2433
2627
|
/**
|
|
@@ -2449,7 +2643,7 @@ declare module "factorio:runtime" {
|
|
|
2449
2643
|
}
|
|
2450
2644
|
/**
|
|
2451
2645
|
* Called when the display scale changes for a given player.
|
|
2452
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2646
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_display_scale_changed Online documentation}
|
|
2453
2647
|
*/
|
|
2454
2648
|
interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
|
2455
2649
|
/**
|
|
@@ -2473,7 +2667,7 @@ declare module "factorio:runtime" {
|
|
|
2473
2667
|
* Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
|
|
2474
2668
|
*
|
|
2475
2669
|
* This event is not raised when the player is ejected from a vehicle due to it being destroyed.
|
|
2476
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2670
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_driving_changed_state Online documentation}
|
|
2477
2671
|
*/
|
|
2478
2672
|
interface OnPlayerDrivingChangedStateEvent extends EventData {
|
|
2479
2673
|
readonly player_index: PlayerIndex
|
|
@@ -2492,7 +2686,7 @@ declare module "factorio:runtime" {
|
|
|
2492
2686
|
}
|
|
2493
2687
|
/**
|
|
2494
2688
|
* Called when a player drops an item on the ground.
|
|
2495
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2689
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_dropped_item Online documentation}
|
|
2496
2690
|
*/
|
|
2497
2691
|
interface OnPlayerDroppedItemEvent extends EventData {
|
|
2498
2692
|
readonly player_index: PlayerIndex
|
|
@@ -2511,7 +2705,7 @@ declare module "factorio:runtime" {
|
|
|
2511
2705
|
}
|
|
2512
2706
|
/**
|
|
2513
2707
|
* Called when a player drops a single item into an entity.
|
|
2514
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2708
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_dropped_item_into_entity Online documentation}
|
|
2515
2709
|
*/
|
|
2516
2710
|
interface OnPlayerDroppedItemIntoEntityEvent extends EventData {
|
|
2517
2711
|
readonly player_index: PlayerIndex
|
|
@@ -2530,7 +2724,7 @@ declare module "factorio:runtime" {
|
|
|
2530
2724
|
}
|
|
2531
2725
|
/**
|
|
2532
2726
|
* Called when a player fast-transfers something to or from an entity.
|
|
2533
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2727
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_fast_transferred Online documentation}
|
|
2534
2728
|
*/
|
|
2535
2729
|
interface OnPlayerFastTransferredEvent extends EventData {
|
|
2536
2730
|
/**
|
|
@@ -2562,7 +2756,7 @@ declare module "factorio:runtime" {
|
|
|
2562
2756
|
* Called when the player flips an entity. This event is only fired when the entity actually changes its orientation or mirroring, so it won't be triggered when pressing the flip keys on an entity that can't be flipped.
|
|
2563
2757
|
*
|
|
2564
2758
|
* This event reflects a change in the {@link LuaEntity#mirroring LuaEntity::mirroring} property.
|
|
2565
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2759
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_flipped_entity Online documentation}
|
|
2566
2760
|
*/
|
|
2567
2761
|
interface OnPlayerFlippedEntityEvent extends EventData {
|
|
2568
2762
|
/**
|
|
@@ -2585,7 +2779,7 @@ declare module "factorio:runtime" {
|
|
|
2585
2779
|
}
|
|
2586
2780
|
/**
|
|
2587
2781
|
* Called after player flushed fluid
|
|
2588
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2782
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_flushed_fluid Online documentation}
|
|
2589
2783
|
*/
|
|
2590
2784
|
interface OnPlayerFlushedFluidEvent extends EventData {
|
|
2591
2785
|
/**
|
|
@@ -2619,7 +2813,7 @@ declare module "factorio:runtime" {
|
|
|
2619
2813
|
}
|
|
2620
2814
|
/**
|
|
2621
2815
|
* Called after a players gun inventory changed in some way.
|
|
2622
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2816
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_gun_inventory_changed Online documentation}
|
|
2623
2817
|
*/
|
|
2624
2818
|
interface OnPlayerGunInventoryChangedEvent extends EventData {
|
|
2625
2819
|
readonly player_index: PlayerIndex
|
|
@@ -2634,7 +2828,7 @@ declare module "factorio:runtime" {
|
|
|
2634
2828
|
}
|
|
2635
2829
|
/**
|
|
2636
2830
|
* Called when a player's input method changes. See {@link LuaPlayer#input_method LuaPlayer::input_method}.
|
|
2637
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2831
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_input_method_changed Online documentation}
|
|
2638
2832
|
*/
|
|
2639
2833
|
interface OnPlayerInputMethodChangedEvent extends EventData {
|
|
2640
2834
|
/**
|
|
@@ -2652,7 +2846,7 @@ declare module "factorio:runtime" {
|
|
|
2652
2846
|
}
|
|
2653
2847
|
/**
|
|
2654
2848
|
* 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.
|
|
2655
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2849
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_joined_game Online documentation}
|
|
2656
2850
|
*/
|
|
2657
2851
|
interface OnPlayerJoinedGameEvent extends EventData {
|
|
2658
2852
|
readonly player_index: PlayerIndex
|
|
@@ -2667,7 +2861,7 @@ declare module "factorio:runtime" {
|
|
|
2667
2861
|
}
|
|
2668
2862
|
/**
|
|
2669
2863
|
* Called when a player is kicked.
|
|
2670
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2864
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_kicked Online documentation}
|
|
2671
2865
|
*/
|
|
2672
2866
|
interface OnPlayerKickedEvent extends EventData {
|
|
2673
2867
|
/**
|
|
@@ -2693,7 +2887,7 @@ declare module "factorio:runtime" {
|
|
|
2693
2887
|
}
|
|
2694
2888
|
/**
|
|
2695
2889
|
* 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.
|
|
2696
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2890
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_left_game Online documentation}
|
|
2697
2891
|
*/
|
|
2698
2892
|
interface OnPlayerLeftGameEvent extends EventData {
|
|
2699
2893
|
readonly player_index: PlayerIndex
|
|
@@ -2709,7 +2903,7 @@ declare module "factorio:runtime" {
|
|
|
2709
2903
|
}
|
|
2710
2904
|
/**
|
|
2711
2905
|
* Called when a player's active locale changes. See {@link LuaPlayer#locale LuaPlayer::locale}.
|
|
2712
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2906
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_locale_changed Online documentation}
|
|
2713
2907
|
*/
|
|
2714
2908
|
interface OnPlayerLocaleChangedEvent extends EventData {
|
|
2715
2909
|
/**
|
|
@@ -2731,7 +2925,7 @@ declare module "factorio:runtime" {
|
|
|
2731
2925
|
}
|
|
2732
2926
|
/**
|
|
2733
2927
|
* Called after a players main inventory changed in some way.
|
|
2734
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2928
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_main_inventory_changed Online documentation}
|
|
2735
2929
|
*/
|
|
2736
2930
|
interface OnPlayerMainInventoryChangedEvent extends EventData {
|
|
2737
2931
|
readonly player_index: PlayerIndex
|
|
@@ -2752,7 +2946,7 @@ declare module "factorio:runtime" {
|
|
|
2752
2946
|
* 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.
|
|
2753
2947
|
*
|
|
2754
2948
|
* Event filter: [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter]
|
|
2755
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2949
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_mined_entity Online documentation}
|
|
2756
2950
|
*/
|
|
2757
2951
|
interface OnPlayerMinedEntityEvent extends EventData {
|
|
2758
2952
|
/**
|
|
@@ -2778,7 +2972,7 @@ declare module "factorio:runtime" {
|
|
|
2778
2972
|
}
|
|
2779
2973
|
/**
|
|
2780
2974
|
* Called when the player mines something.
|
|
2781
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2975
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_mined_item Online documentation}
|
|
2782
2976
|
*/
|
|
2783
2977
|
interface OnPlayerMinedItemEvent extends EventData {
|
|
2784
2978
|
/**
|
|
@@ -2797,7 +2991,7 @@ declare module "factorio:runtime" {
|
|
|
2797
2991
|
}
|
|
2798
2992
|
/**
|
|
2799
2993
|
* Called after a player mines tiles.
|
|
2800
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
2994
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_mined_tile Online documentation}
|
|
2801
2995
|
*/
|
|
2802
2996
|
interface OnPlayerMinedTileEvent extends EventData {
|
|
2803
2997
|
readonly player_index: PlayerIndex
|
|
@@ -2820,7 +3014,7 @@ declare module "factorio:runtime" {
|
|
|
2820
3014
|
}
|
|
2821
3015
|
/**
|
|
2822
3016
|
* Called when a player's current music track (ambient sound) changes. This includes when the music track finishes playing.
|
|
2823
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3017
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_music_changed Online documentation}
|
|
2824
3018
|
*/
|
|
2825
3019
|
interface OnPlayerMusicChangedEvent extends EventData {
|
|
2826
3020
|
/**
|
|
@@ -2838,7 +3032,7 @@ declare module "factorio:runtime" {
|
|
|
2838
3032
|
}
|
|
2839
3033
|
/**
|
|
2840
3034
|
* Called when a player is muted.
|
|
2841
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3035
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_muted Online documentation}
|
|
2842
3036
|
*/
|
|
2843
3037
|
interface OnPlayerMutedEvent extends EventData {
|
|
2844
3038
|
/**
|
|
@@ -2856,7 +3050,7 @@ declare module "factorio:runtime" {
|
|
|
2856
3050
|
}
|
|
2857
3051
|
/**
|
|
2858
3052
|
* Called when a player invokes the "smart pipette" over an entity.
|
|
2859
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3053
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_pipette Online documentation}
|
|
2860
3054
|
*/
|
|
2861
3055
|
interface OnPlayerPipetteEvent extends EventData {
|
|
2862
3056
|
/**
|
|
@@ -2886,7 +3080,7 @@ declare module "factorio:runtime" {
|
|
|
2886
3080
|
}
|
|
2887
3081
|
/**
|
|
2888
3082
|
* Called after the player puts equipment in an equipment grid
|
|
2889
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3083
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_placed_equipment Online documentation}
|
|
2890
3084
|
*/
|
|
2891
3085
|
interface OnPlayerPlacedEquipmentEvent extends EventData {
|
|
2892
3086
|
readonly player_index: PlayerIndex
|
|
@@ -2909,7 +3103,7 @@ declare module "factorio:runtime" {
|
|
|
2909
3103
|
}
|
|
2910
3104
|
/**
|
|
2911
3105
|
* Called when a player is promoted.
|
|
2912
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3106
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_promoted Online documentation}
|
|
2913
3107
|
*/
|
|
2914
3108
|
interface OnPlayerPromotedEvent extends EventData {
|
|
2915
3109
|
/**
|
|
@@ -2927,7 +3121,7 @@ declare module "factorio:runtime" {
|
|
|
2927
3121
|
}
|
|
2928
3122
|
/**
|
|
2929
3123
|
* 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.
|
|
2930
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3124
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_removed Online documentation}
|
|
2931
3125
|
*/
|
|
2932
3126
|
interface OnPlayerRemovedEvent extends EventData {
|
|
2933
3127
|
/**
|
|
@@ -2945,7 +3139,7 @@ declare module "factorio:runtime" {
|
|
|
2945
3139
|
}
|
|
2946
3140
|
/**
|
|
2947
3141
|
* Called after the player removes equipment from an equipment grid
|
|
2948
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3142
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_removed_equipment Online documentation}
|
|
2949
3143
|
*/
|
|
2950
3144
|
interface OnPlayerRemovedEquipmentEvent extends EventData {
|
|
2951
3145
|
readonly player_index: PlayerIndex
|
|
@@ -2978,7 +3172,7 @@ declare module "factorio:runtime" {
|
|
|
2978
3172
|
* Called when a player repairs an entity.
|
|
2979
3173
|
*
|
|
2980
3174
|
* Event filter: [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter]
|
|
2981
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3175
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_repaired_entity Online documentation}
|
|
2982
3176
|
*/
|
|
2983
3177
|
interface OnPlayerRepairedEntityEvent extends EventData {
|
|
2984
3178
|
readonly player_index: PlayerIndex
|
|
@@ -2994,7 +3188,7 @@ declare module "factorio:runtime" {
|
|
|
2994
3188
|
}
|
|
2995
3189
|
/**
|
|
2996
3190
|
* Called after a player respawns.
|
|
2997
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3191
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_respawned Online documentation}
|
|
2998
3192
|
*/
|
|
2999
3193
|
interface OnPlayerRespawnedEvent extends EventData {
|
|
3000
3194
|
readonly player_index: PlayerIndex
|
|
@@ -3013,7 +3207,7 @@ declare module "factorio:runtime" {
|
|
|
3013
3207
|
}
|
|
3014
3208
|
/**
|
|
3015
3209
|
* Called after a player reverse-selects an area with a selection-tool item.
|
|
3016
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3210
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_reverse_selected_area Online documentation}
|
|
3017
3211
|
*/
|
|
3018
3212
|
interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
|
3019
3213
|
/**
|
|
@@ -3028,6 +3222,14 @@ declare module "factorio:runtime" {
|
|
|
3028
3222
|
* The area selected.
|
|
3029
3223
|
*/
|
|
3030
3224
|
readonly area: BoundingBox
|
|
3225
|
+
/**
|
|
3226
|
+
* The position where the player started the selection.
|
|
3227
|
+
*/
|
|
3228
|
+
readonly position: MapPosition
|
|
3229
|
+
/**
|
|
3230
|
+
* The player cursor position.
|
|
3231
|
+
*/
|
|
3232
|
+
readonly cursor_position: MapPosition
|
|
3031
3233
|
/**
|
|
3032
3234
|
* The item used to select the area.
|
|
3033
3235
|
*/
|
|
@@ -3040,6 +3242,7 @@ declare module "factorio:runtime" {
|
|
|
3040
3242
|
* The tiles selected.
|
|
3041
3243
|
*/
|
|
3042
3244
|
readonly tiles: LuaTile[]
|
|
3245
|
+
readonly selection_mode: defines.selection_mode
|
|
3043
3246
|
/**
|
|
3044
3247
|
* Identifier of the event.
|
|
3045
3248
|
*/
|
|
@@ -3053,7 +3256,7 @@ declare module "factorio:runtime" {
|
|
|
3053
3256
|
* 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.
|
|
3054
3257
|
*
|
|
3055
3258
|
* Entities being flipped will not fire this event, even if the flip involves rotating. See {@link OnPlayerFlippedEntityEvent on_player_flipped_entity}.
|
|
3056
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3259
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_rotated_entity Online documentation}
|
|
3057
3260
|
*/
|
|
3058
3261
|
interface OnPlayerRotatedEntityEvent extends EventData {
|
|
3059
3262
|
/**
|
|
@@ -3077,7 +3280,7 @@ declare module "factorio:runtime" {
|
|
|
3077
3280
|
}
|
|
3078
3281
|
/**
|
|
3079
3282
|
* Called after a player selects an area with a selection-tool item.
|
|
3080
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3283
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_selected_area Online documentation}
|
|
3081
3284
|
*/
|
|
3082
3285
|
interface OnPlayerSelectedAreaEvent extends EventData {
|
|
3083
3286
|
/**
|
|
@@ -3092,6 +3295,14 @@ declare module "factorio:runtime" {
|
|
|
3092
3295
|
* The area selected.
|
|
3093
3296
|
*/
|
|
3094
3297
|
readonly area: BoundingBox
|
|
3298
|
+
/**
|
|
3299
|
+
* The position where the player started the selection.
|
|
3300
|
+
*/
|
|
3301
|
+
readonly position: MapPosition
|
|
3302
|
+
/**
|
|
3303
|
+
* The player cursor position.
|
|
3304
|
+
*/
|
|
3305
|
+
readonly cursor_position: MapPosition
|
|
3095
3306
|
/**
|
|
3096
3307
|
* The item used to select the area.
|
|
3097
3308
|
*/
|
|
@@ -3108,6 +3319,7 @@ declare module "factorio:runtime" {
|
|
|
3108
3319
|
* The tiles selected.
|
|
3109
3320
|
*/
|
|
3110
3321
|
readonly tiles: LuaTile[]
|
|
3322
|
+
readonly selection_mode: defines.selection_mode
|
|
3111
3323
|
/**
|
|
3112
3324
|
* Identifier of the event.
|
|
3113
3325
|
*/
|
|
@@ -3119,7 +3331,7 @@ declare module "factorio:runtime" {
|
|
|
3119
3331
|
}
|
|
3120
3332
|
/**
|
|
3121
3333
|
* Called when a player sets a quickbar slot to anything (new value, or set to empty).
|
|
3122
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3334
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_set_quick_bar_slot Online documentation}
|
|
3123
3335
|
*/
|
|
3124
3336
|
interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
|
3125
3337
|
readonly player_index: PlayerIndex
|
|
@@ -3134,7 +3346,7 @@ declare module "factorio:runtime" {
|
|
|
3134
3346
|
}
|
|
3135
3347
|
/**
|
|
3136
3348
|
* Called when a player selects an area with a blueprint.
|
|
3137
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3349
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_setup_blueprint Online documentation}
|
|
3138
3350
|
*/
|
|
3139
3351
|
interface OnPlayerSetupBlueprintEvent extends EventData {
|
|
3140
3352
|
/**
|
|
@@ -3149,6 +3361,14 @@ declare module "factorio:runtime" {
|
|
|
3149
3361
|
* The area selected.
|
|
3150
3362
|
*/
|
|
3151
3363
|
readonly area: BoundingBox
|
|
3364
|
+
/**
|
|
3365
|
+
* The position where the player started the selection.
|
|
3366
|
+
*/
|
|
3367
|
+
readonly position: MapPosition
|
|
3368
|
+
/**
|
|
3369
|
+
* The player cursor position.
|
|
3370
|
+
*/
|
|
3371
|
+
readonly cursor_position: MapPosition
|
|
3152
3372
|
/**
|
|
3153
3373
|
* The item used to select the area.
|
|
3154
3374
|
*/
|
|
@@ -3182,9 +3402,113 @@ declare module "factorio:runtime" {
|
|
|
3182
3402
|
*/
|
|
3183
3403
|
readonly tick: MapTick
|
|
3184
3404
|
}
|
|
3405
|
+
/**
|
|
3406
|
+
* Called after a player starts to select an area with a selection-tool item that has {@link import("factorio:prototype").SelectionToolPrototype#send_pre_selection_events SelectionToolPrototype::send_pre_selection_events} set to `true`.
|
|
3407
|
+
*
|
|
3408
|
+
* Because a player's selection state exists solely on their local client and not in game state, this event and the other area preselection events are provided with "best effort", but are not guaranteed. In some situations, such as after loading an existing save or in a multiplayer game, preselection events may not be received in an order that makes sense for the current game state or may be dropped altogether.
|
|
3409
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_start_selected_area Online documentation}
|
|
3410
|
+
*/
|
|
3411
|
+
interface OnPlayerStartSelectedAreaEvent extends EventData {
|
|
3412
|
+
/**
|
|
3413
|
+
* The player doing the selection.
|
|
3414
|
+
*/
|
|
3415
|
+
readonly player_index: PlayerIndex
|
|
3416
|
+
/**
|
|
3417
|
+
* The surface selected.
|
|
3418
|
+
*/
|
|
3419
|
+
readonly surface: LuaSurface
|
|
3420
|
+
/**
|
|
3421
|
+
* The area selected.
|
|
3422
|
+
*/
|
|
3423
|
+
readonly area: BoundingBox
|
|
3424
|
+
/**
|
|
3425
|
+
* The position where the player started the selection.
|
|
3426
|
+
*/
|
|
3427
|
+
readonly position: MapPosition
|
|
3428
|
+
/**
|
|
3429
|
+
* The player cursor position.
|
|
3430
|
+
*/
|
|
3431
|
+
readonly cursor_position: MapPosition
|
|
3432
|
+
/**
|
|
3433
|
+
* The item used to select the area.
|
|
3434
|
+
*/
|
|
3435
|
+
readonly item: string
|
|
3436
|
+
/**
|
|
3437
|
+
* The item quality used to select the area.
|
|
3438
|
+
*/
|
|
3439
|
+
readonly quality: string
|
|
3440
|
+
/**
|
|
3441
|
+
* The entities selected.
|
|
3442
|
+
*/
|
|
3443
|
+
readonly entities: LuaEntity[]
|
|
3444
|
+
/**
|
|
3445
|
+
* The tiles selected.
|
|
3446
|
+
*/
|
|
3447
|
+
readonly tiles: LuaTile[]
|
|
3448
|
+
readonly selection_mode: defines.selection_mode
|
|
3449
|
+
/**
|
|
3450
|
+
* Identifier of the event.
|
|
3451
|
+
*/
|
|
3452
|
+
readonly name: typeof defines.events.on_player_start_selected_area
|
|
3453
|
+
/**
|
|
3454
|
+
* Tick the event was generated.
|
|
3455
|
+
*/
|
|
3456
|
+
readonly tick: MapTick
|
|
3457
|
+
}
|
|
3458
|
+
/**
|
|
3459
|
+
* Called after a player super-forced-selects an area with a selection-tool item.
|
|
3460
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_super_forced_selected_area Online documentation}
|
|
3461
|
+
*/
|
|
3462
|
+
interface OnPlayerSuperForcedSelectedAreaEvent extends EventData {
|
|
3463
|
+
/**
|
|
3464
|
+
* The player doing the selection.
|
|
3465
|
+
*/
|
|
3466
|
+
readonly player_index: PlayerIndex
|
|
3467
|
+
/**
|
|
3468
|
+
* The surface selected.
|
|
3469
|
+
*/
|
|
3470
|
+
readonly surface: LuaSurface
|
|
3471
|
+
/**
|
|
3472
|
+
* The area selected.
|
|
3473
|
+
*/
|
|
3474
|
+
readonly area: BoundingBox
|
|
3475
|
+
/**
|
|
3476
|
+
* The position where the player started the selection.
|
|
3477
|
+
*/
|
|
3478
|
+
readonly position: MapPosition
|
|
3479
|
+
/**
|
|
3480
|
+
* The player cursor position.
|
|
3481
|
+
*/
|
|
3482
|
+
readonly cursor_position: MapPosition
|
|
3483
|
+
/**
|
|
3484
|
+
* The item used to select the area.
|
|
3485
|
+
*/
|
|
3486
|
+
readonly item: string
|
|
3487
|
+
/**
|
|
3488
|
+
* The item quality used to select the area.
|
|
3489
|
+
*/
|
|
3490
|
+
readonly quality: string
|
|
3491
|
+
/**
|
|
3492
|
+
* The entities selected.
|
|
3493
|
+
*/
|
|
3494
|
+
readonly entities: LuaEntity[]
|
|
3495
|
+
/**
|
|
3496
|
+
* The tiles selected.
|
|
3497
|
+
*/
|
|
3498
|
+
readonly tiles: LuaTile[]
|
|
3499
|
+
readonly selection_mode: defines.selection_mode
|
|
3500
|
+
/**
|
|
3501
|
+
* Identifier of the event.
|
|
3502
|
+
*/
|
|
3503
|
+
readonly name: typeof defines.events.on_player_super_forced_selected_area
|
|
3504
|
+
/**
|
|
3505
|
+
* Tick the event was generated.
|
|
3506
|
+
*/
|
|
3507
|
+
readonly tick: MapTick
|
|
3508
|
+
}
|
|
3185
3509
|
/**
|
|
3186
3510
|
* Called when a player toggles alt mode, also known as "show entity info".
|
|
3187
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3511
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_toggled_alt_mode Online documentation}
|
|
3188
3512
|
*/
|
|
3189
3513
|
interface OnPlayerToggledAltModeEvent extends EventData {
|
|
3190
3514
|
readonly player_index: PlayerIndex
|
|
@@ -3203,7 +3527,7 @@ declare module "factorio:runtime" {
|
|
|
3203
3527
|
}
|
|
3204
3528
|
/**
|
|
3205
3529
|
* Called when a player toggles the map editor on or off.
|
|
3206
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3530
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_toggled_map_editor Online documentation}
|
|
3207
3531
|
*/
|
|
3208
3532
|
interface OnPlayerToggledMapEditorEvent extends EventData {
|
|
3209
3533
|
readonly player_index: PlayerIndex
|
|
@@ -3218,7 +3542,7 @@ declare module "factorio:runtime" {
|
|
|
3218
3542
|
}
|
|
3219
3543
|
/**
|
|
3220
3544
|
* Called after a players trash inventory changed in some way.
|
|
3221
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3545
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_trash_inventory_changed Online documentation}
|
|
3222
3546
|
*/
|
|
3223
3547
|
interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
|
3224
3548
|
readonly player_index: PlayerIndex
|
|
@@ -3233,7 +3557,7 @@ declare module "factorio:runtime" {
|
|
|
3233
3557
|
}
|
|
3234
3558
|
/**
|
|
3235
3559
|
* Called when a player is un-banned.
|
|
3236
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3560
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_unbanned Online documentation}
|
|
3237
3561
|
*/
|
|
3238
3562
|
interface OnPlayerUnbannedEvent extends EventData {
|
|
3239
3563
|
/**
|
|
@@ -3263,7 +3587,7 @@ declare module "factorio:runtime" {
|
|
|
3263
3587
|
}
|
|
3264
3588
|
/**
|
|
3265
3589
|
* Called when a player is unmuted.
|
|
3266
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3590
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_unmuted Online documentation}
|
|
3267
3591
|
*/
|
|
3268
3592
|
interface OnPlayerUnmutedEvent extends EventData {
|
|
3269
3593
|
/**
|
|
@@ -3281,7 +3605,7 @@ declare module "factorio:runtime" {
|
|
|
3281
3605
|
}
|
|
3282
3606
|
/**
|
|
3283
3607
|
* Called when a player uses a capsule that results in some game action.
|
|
3284
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3608
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_used_capsule Online documentation}
|
|
3285
3609
|
*/
|
|
3286
3610
|
interface OnPlayerUsedCapsuleEvent extends EventData {
|
|
3287
3611
|
/**
|
|
@@ -3311,7 +3635,7 @@ declare module "factorio:runtime" {
|
|
|
3311
3635
|
}
|
|
3312
3636
|
/**
|
|
3313
3637
|
* Called when a player uses spidertron remote to send all selected units to a given position
|
|
3314
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3638
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_used_spidertron_remote Online documentation}
|
|
3315
3639
|
*/
|
|
3316
3640
|
interface OnPlayerUsedSpidertronRemoteEvent extends EventData {
|
|
3317
3641
|
/**
|
|
@@ -3335,7 +3659,7 @@ declare module "factorio:runtime" {
|
|
|
3335
3659
|
* Called after an entity dies.
|
|
3336
3660
|
*
|
|
3337
3661
|
* Event filter: [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter]
|
|
3338
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3662
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_post_entity_died Online documentation}
|
|
3339
3663
|
*/
|
|
3340
3664
|
interface OnPostEntityDiedEvent extends EventData {
|
|
3341
3665
|
/**
|
|
@@ -3387,7 +3711,7 @@ declare module "factorio:runtime" {
|
|
|
3387
3711
|
* Called after a segmented unit dies.
|
|
3388
3712
|
*
|
|
3389
3713
|
* Event filter: [LuaPostSegmentedUnitDiedEventFilter](LuaPostSegmentedUnitDiedEventFilter]
|
|
3390
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3714
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_post_segmented_unit_died Online documentation}
|
|
3391
3715
|
*/
|
|
3392
3716
|
interface OnPostSegmentedUnitDiedEvent extends EventData {
|
|
3393
3717
|
/**
|
|
@@ -3429,7 +3753,7 @@ declare module "factorio:runtime" {
|
|
|
3429
3753
|
}
|
|
3430
3754
|
/**
|
|
3431
3755
|
* Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
|
|
3432
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3756
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_build Online documentation}
|
|
3433
3757
|
*/
|
|
3434
3758
|
interface OnPreBuildEvent extends EventData {
|
|
3435
3759
|
/**
|
|
@@ -3475,7 +3799,7 @@ declare module "factorio:runtime" {
|
|
|
3475
3799
|
}
|
|
3476
3800
|
/**
|
|
3477
3801
|
* Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
|
3478
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3802
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_chunk_deleted Online documentation}
|
|
3479
3803
|
*/
|
|
3480
3804
|
interface OnPreChunkDeletedEvent extends EventData {
|
|
3481
3805
|
readonly surface_index: SurfaceIndex
|
|
@@ -3494,7 +3818,7 @@ declare module "factorio:runtime" {
|
|
|
3494
3818
|
}
|
|
3495
3819
|
/**
|
|
3496
3820
|
* Called before entity copy-paste is done.
|
|
3497
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3821
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_entity_settings_pasted Online documentation}
|
|
3498
3822
|
*/
|
|
3499
3823
|
interface OnPreEntitySettingsPastedEvent extends EventData {
|
|
3500
3824
|
readonly player_index: PlayerIndex
|
|
@@ -3521,7 +3845,7 @@ declare module "factorio:runtime" {
|
|
|
3521
3845
|
* Also called for item request proxies before they are destroyed as a result of being marked for deconstruction.
|
|
3522
3846
|
*
|
|
3523
3847
|
* Event filter: [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter]
|
|
3524
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3848
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_ghost_deconstructed Online documentation}
|
|
3525
3849
|
*/
|
|
3526
3850
|
interface OnPreGhostDeconstructedEvent extends EventData {
|
|
3527
3851
|
/**
|
|
@@ -3542,7 +3866,7 @@ declare module "factorio:runtime" {
|
|
|
3542
3866
|
* Called before a ghost entity is upgraded.
|
|
3543
3867
|
*
|
|
3544
3868
|
* Event filter: [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter]
|
|
3545
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3869
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_ghost_upgraded Online documentation}
|
|
3546
3870
|
*/
|
|
3547
3871
|
interface OnPreGhostUpgradedEvent extends EventData {
|
|
3548
3872
|
/**
|
|
@@ -3563,7 +3887,7 @@ declare module "factorio:runtime" {
|
|
|
3563
3887
|
}
|
|
3564
3888
|
/**
|
|
3565
3889
|
* Called directly before a permission group is deleted.
|
|
3566
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3890
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_permission_group_deleted Online documentation}
|
|
3567
3891
|
*/
|
|
3568
3892
|
interface OnPrePermissionGroupDeletedEvent extends EventData {
|
|
3569
3893
|
/**
|
|
@@ -3585,7 +3909,7 @@ declare module "factorio:runtime" {
|
|
|
3585
3909
|
}
|
|
3586
3910
|
/**
|
|
3587
3911
|
* Called directly before a permission string is imported.
|
|
3588
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3912
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_permission_string_imported Online documentation}
|
|
3589
3913
|
*/
|
|
3590
3914
|
interface OnPrePermissionStringImportedEvent extends EventData {
|
|
3591
3915
|
/**
|
|
@@ -3603,7 +3927,7 @@ declare module "factorio:runtime" {
|
|
|
3603
3927
|
}
|
|
3604
3928
|
/**
|
|
3605
3929
|
* Called when a player queues something to be crafted.
|
|
3606
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3930
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_player_crafted_item Online documentation}
|
|
3607
3931
|
*/
|
|
3608
3932
|
interface OnPrePlayerCraftedItemEvent extends EventData {
|
|
3609
3933
|
/**
|
|
@@ -3633,7 +3957,7 @@ declare module "factorio:runtime" {
|
|
|
3633
3957
|
}
|
|
3634
3958
|
/**
|
|
3635
3959
|
* Called before a players dies.
|
|
3636
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3960
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_player_died Online documentation}
|
|
3637
3961
|
*/
|
|
3638
3962
|
interface OnPrePlayerDiedEvent extends EventData {
|
|
3639
3963
|
readonly player_index: PlayerIndex
|
|
@@ -3649,7 +3973,7 @@ declare module "factorio:runtime" {
|
|
|
3649
3973
|
}
|
|
3650
3974
|
/**
|
|
3651
3975
|
* Called before a player leaves the game.
|
|
3652
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3976
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_player_left_game Online documentation}
|
|
3653
3977
|
*/
|
|
3654
3978
|
interface OnPrePlayerLeftGameEvent extends EventData {
|
|
3655
3979
|
readonly player_index: PlayerIndex
|
|
@@ -3667,7 +3991,7 @@ declare module "factorio:runtime" {
|
|
|
3667
3991
|
* 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.
|
|
3668
3992
|
*
|
|
3669
3993
|
* Event filter: [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter]
|
|
3670
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3994
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_player_mined_item Online documentation}
|
|
3671
3995
|
*/
|
|
3672
3996
|
interface OnPrePlayerMinedItemEvent extends EventData {
|
|
3673
3997
|
/**
|
|
@@ -3686,7 +4010,7 @@ declare module "factorio:runtime" {
|
|
|
3686
4010
|
}
|
|
3687
4011
|
/**
|
|
3688
4012
|
* 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.
|
|
3689
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4013
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_player_removed Online documentation}
|
|
3690
4014
|
*/
|
|
3691
4015
|
interface OnPrePlayerRemovedEvent extends EventData {
|
|
3692
4016
|
/**
|
|
@@ -3704,7 +4028,7 @@ declare module "factorio:runtime" {
|
|
|
3704
4028
|
}
|
|
3705
4029
|
/**
|
|
3706
4030
|
* Called before a player toggles the map editor on or off.
|
|
3707
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4031
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_player_toggled_map_editor Online documentation}
|
|
3708
4032
|
*/
|
|
3709
4033
|
interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
|
3710
4034
|
readonly player_index: PlayerIndex
|
|
@@ -3719,7 +4043,7 @@ declare module "factorio:runtime" {
|
|
|
3719
4043
|
}
|
|
3720
4044
|
/**
|
|
3721
4045
|
* Called directly before a robot explodes cliffs.
|
|
3722
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4046
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_robot_exploded_cliff Online documentation}
|
|
3723
4047
|
*/
|
|
3724
4048
|
interface OnPreRobotExplodedCliffEvent extends EventData {
|
|
3725
4049
|
readonly robot: LuaEntity
|
|
@@ -3743,7 +4067,7 @@ declare module "factorio:runtime" {
|
|
|
3743
4067
|
}
|
|
3744
4068
|
/**
|
|
3745
4069
|
* Called just before the scenario finishes.
|
|
3746
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4070
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_scenario_finished Online documentation}
|
|
3747
4071
|
*/
|
|
3748
4072
|
interface OnPreScenarioFinishedEvent extends EventData {
|
|
3749
4073
|
/**
|
|
@@ -3761,7 +4085,7 @@ declare module "factorio:runtime" {
|
|
|
3761
4085
|
}
|
|
3762
4086
|
/**
|
|
3763
4087
|
* Called just before a script inventory is resized.
|
|
3764
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4088
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_script_inventory_resized Online documentation}
|
|
3765
4089
|
*/
|
|
3766
4090
|
interface OnPreScriptInventoryResizedEvent extends EventData {
|
|
3767
4091
|
/**
|
|
@@ -3792,7 +4116,7 @@ declare module "factorio:runtime" {
|
|
|
3792
4116
|
}
|
|
3793
4117
|
/**
|
|
3794
4118
|
* Called just before a surface is cleared (all entities removed and all chunks deleted).
|
|
3795
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4119
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_surface_cleared Online documentation}
|
|
3796
4120
|
*/
|
|
3797
4121
|
interface OnPreSurfaceClearedEvent extends EventData {
|
|
3798
4122
|
readonly surface_index: SurfaceIndex
|
|
@@ -3807,7 +4131,7 @@ declare module "factorio:runtime" {
|
|
|
3807
4131
|
}
|
|
3808
4132
|
/**
|
|
3809
4133
|
* Called just before a surface is deleted.
|
|
3810
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4134
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_pre_surface_deleted Online documentation}
|
|
3811
4135
|
*/
|
|
3812
4136
|
interface OnPreSurfaceDeletedEvent extends EventData {
|
|
3813
4137
|
readonly surface_index: SurfaceIndex
|
|
@@ -3822,7 +4146,7 @@ declare module "factorio:runtime" {
|
|
|
3822
4146
|
}
|
|
3823
4147
|
/**
|
|
3824
4148
|
* Called when the player triggers "redo".
|
|
3825
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4149
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_redo_applied Online documentation}
|
|
3826
4150
|
*/
|
|
3827
4151
|
interface OnRedoAppliedEvent extends EventData {
|
|
3828
4152
|
/**
|
|
@@ -3844,7 +4168,7 @@ declare module "factorio:runtime" {
|
|
|
3844
4168
|
}
|
|
3845
4169
|
/**
|
|
3846
4170
|
* Called when research is cancelled.
|
|
3847
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4171
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_research_cancelled Online documentation}
|
|
3848
4172
|
*/
|
|
3849
4173
|
interface OnResearchCancelledEvent extends EventData {
|
|
3850
4174
|
/**
|
|
@@ -3870,7 +4194,7 @@ declare module "factorio:runtime" {
|
|
|
3870
4194
|
}
|
|
3871
4195
|
/**
|
|
3872
4196
|
* Called when a research finishes.
|
|
3873
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4197
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_research_finished Online documentation}
|
|
3874
4198
|
*/
|
|
3875
4199
|
interface OnResearchFinishedEvent extends EventData {
|
|
3876
4200
|
/**
|
|
@@ -3892,7 +4216,7 @@ declare module "factorio:runtime" {
|
|
|
3892
4216
|
}
|
|
3893
4217
|
/**
|
|
3894
4218
|
* Called when research is moved forwards or backwards in the research queue.
|
|
3895
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4219
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_research_moved Online documentation}
|
|
3896
4220
|
*/
|
|
3897
4221
|
interface OnResearchMovedEvent extends EventData {
|
|
3898
4222
|
/**
|
|
@@ -3914,7 +4238,7 @@ declare module "factorio:runtime" {
|
|
|
3914
4238
|
}
|
|
3915
4239
|
/**
|
|
3916
4240
|
* Called when research is queued.
|
|
3917
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4241
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_research_queued Online documentation}
|
|
3918
4242
|
*/
|
|
3919
4243
|
interface OnResearchQueuedEvent extends EventData {
|
|
3920
4244
|
/**
|
|
@@ -3940,7 +4264,7 @@ declare module "factorio:runtime" {
|
|
|
3940
4264
|
}
|
|
3941
4265
|
/**
|
|
3942
4266
|
* Called when a research is reversed (unresearched).
|
|
3943
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4267
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_research_reversed Online documentation}
|
|
3944
4268
|
*/
|
|
3945
4269
|
interface OnResearchReversedEvent extends EventData {
|
|
3946
4270
|
/**
|
|
@@ -3962,7 +4286,7 @@ declare module "factorio:runtime" {
|
|
|
3962
4286
|
}
|
|
3963
4287
|
/**
|
|
3964
4288
|
* Called when a technology research starts.
|
|
3965
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4289
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_research_started Online documentation}
|
|
3966
4290
|
*/
|
|
3967
4291
|
interface OnResearchStartedEvent extends EventData {
|
|
3968
4292
|
/**
|
|
@@ -3981,7 +4305,7 @@ declare module "factorio:runtime" {
|
|
|
3981
4305
|
}
|
|
3982
4306
|
/**
|
|
3983
4307
|
* Called when a resource entity reaches 0 or its minimum yield for infinite resources.
|
|
3984
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4308
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_resource_depleted Online documentation}
|
|
3985
4309
|
*/
|
|
3986
4310
|
interface OnResourceDepletedEvent extends EventData {
|
|
3987
4311
|
readonly entity: LuaEntity
|
|
@@ -3998,7 +4322,7 @@ declare module "factorio:runtime" {
|
|
|
3998
4322
|
* Called when a construction robot builds an entity.
|
|
3999
4323
|
*
|
|
4000
4324
|
* Event filter: [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter]
|
|
4001
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4325
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_robot_built_entity Online documentation}
|
|
4002
4326
|
*/
|
|
4003
4327
|
interface OnRobotBuiltEntityEvent extends EventData {
|
|
4004
4328
|
/**
|
|
@@ -4028,7 +4352,7 @@ declare module "factorio:runtime" {
|
|
|
4028
4352
|
}
|
|
4029
4353
|
/**
|
|
4030
4354
|
* Called after a robot builds tiles.
|
|
4031
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4355
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_robot_built_tile Online documentation}
|
|
4032
4356
|
*/
|
|
4033
4357
|
interface OnRobotBuiltTileEvent extends EventData {
|
|
4034
4358
|
/**
|
|
@@ -4070,7 +4394,7 @@ declare module "factorio:runtime" {
|
|
|
4070
4394
|
}
|
|
4071
4395
|
/**
|
|
4072
4396
|
* Called directly after a robot explodes cliffs.
|
|
4073
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4397
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_robot_exploded_cliff Online documentation}
|
|
4074
4398
|
*/
|
|
4075
4399
|
interface OnRobotExplodedCliffEvent extends EventData {
|
|
4076
4400
|
readonly robot: LuaEntity
|
|
@@ -4093,7 +4417,7 @@ declare module "factorio:runtime" {
|
|
|
4093
4417
|
}
|
|
4094
4418
|
/**
|
|
4095
4419
|
* Called when a robot mines an entity.
|
|
4096
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4420
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_robot_mined Online documentation}
|
|
4097
4421
|
*/
|
|
4098
4422
|
interface OnRobotMinedEvent extends EventData {
|
|
4099
4423
|
/**
|
|
@@ -4121,7 +4445,7 @@ declare module "factorio:runtime" {
|
|
|
4121
4445
|
* 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.
|
|
4122
4446
|
*
|
|
4123
4447
|
* Event filter: [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter]
|
|
4124
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4448
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_robot_mined_entity Online documentation}
|
|
4125
4449
|
*/
|
|
4126
4450
|
interface OnRobotMinedEntityEvent extends EventData {
|
|
4127
4451
|
/**
|
|
@@ -4147,7 +4471,7 @@ declare module "factorio:runtime" {
|
|
|
4147
4471
|
}
|
|
4148
4472
|
/**
|
|
4149
4473
|
* Called after a robot mines tiles.
|
|
4150
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4474
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_robot_mined_tile Online documentation}
|
|
4151
4475
|
*/
|
|
4152
4476
|
interface OnRobotMinedTileEvent extends EventData {
|
|
4153
4477
|
/**
|
|
@@ -4175,7 +4499,7 @@ declare module "factorio:runtime" {
|
|
|
4175
4499
|
* Called before a robot mines an entity.
|
|
4176
4500
|
*
|
|
4177
4501
|
* Event filter: [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter]
|
|
4178
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4502
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_robot_pre_mined Online documentation}
|
|
4179
4503
|
*/
|
|
4180
4504
|
interface OnRobotPreMinedEvent extends EventData {
|
|
4181
4505
|
/**
|
|
@@ -4197,7 +4521,7 @@ declare module "factorio:runtime" {
|
|
|
4197
4521
|
}
|
|
4198
4522
|
/**
|
|
4199
4523
|
* Called when a rocket silo is ordered to be launched.
|
|
4200
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4524
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_rocket_launch_ordered Online documentation}
|
|
4201
4525
|
*/
|
|
4202
4526
|
interface OnRocketLaunchOrderedEvent extends EventData {
|
|
4203
4527
|
readonly rocket: LuaEntity
|
|
@@ -4217,7 +4541,7 @@ declare module "factorio:runtime" {
|
|
|
4217
4541
|
}
|
|
4218
4542
|
/**
|
|
4219
4543
|
* Called when a rocket finishes ascending. (Triggers listening for finished rocket launch past 2.0 have been moved to 'on_cargo_pod_finished_ascending' as rocket and cargo pod are two separate entities)
|
|
4220
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4544
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_rocket_launched Online documentation}
|
|
4221
4545
|
*/
|
|
4222
4546
|
interface OnRocketLaunchedEvent extends EventData {
|
|
4223
4547
|
readonly rocket: LuaEntity
|
|
@@ -4233,7 +4557,7 @@ declare module "factorio:runtime" {
|
|
|
4233
4557
|
}
|
|
4234
4558
|
/**
|
|
4235
4559
|
* Called when a runtime mod setting is changed by a player.
|
|
4236
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4560
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_runtime_mod_setting_changed Online documentation}
|
|
4237
4561
|
*/
|
|
4238
4562
|
interface OnRuntimeModSettingChangedEvent extends EventData {
|
|
4239
4563
|
/**
|
|
@@ -4256,7 +4580,7 @@ declare module "factorio:runtime" {
|
|
|
4256
4580
|
}
|
|
4257
4581
|
/**
|
|
4258
4582
|
* Called just after a script inventory is resized.
|
|
4259
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4583
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_script_inventory_resized Online documentation}
|
|
4260
4584
|
*/
|
|
4261
4585
|
interface OnScriptInventoryResizedEvent extends EventData {
|
|
4262
4586
|
/**
|
|
@@ -4291,7 +4615,7 @@ declare module "factorio:runtime" {
|
|
|
4291
4615
|
}
|
|
4292
4616
|
/**
|
|
4293
4617
|
* Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
|
|
4294
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4618
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_script_path_request_finished Online documentation}
|
|
4295
4619
|
*/
|
|
4296
4620
|
interface OnScriptPathRequestFinishedEvent extends EventData {
|
|
4297
4621
|
/**
|
|
@@ -4317,7 +4641,7 @@ declare module "factorio:runtime" {
|
|
|
4317
4641
|
}
|
|
4318
4642
|
/**
|
|
4319
4643
|
* Called when a script trigger effect is triggered.
|
|
4320
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4644
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_script_trigger_effect Online documentation}
|
|
4321
4645
|
*/
|
|
4322
4646
|
interface OnScriptTriggerEffectEvent extends EventData {
|
|
4323
4647
|
/**
|
|
@@ -4350,7 +4674,7 @@ declare module "factorio:runtime" {
|
|
|
4350
4674
|
* Called when an entity of type `radar` finishes scanning a sector.
|
|
4351
4675
|
*
|
|
4352
4676
|
* Event filter: [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter]
|
|
4353
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4677
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_sector_scanned Online documentation}
|
|
4354
4678
|
*/
|
|
4355
4679
|
interface OnSectorScannedEvent extends EventData {
|
|
4356
4680
|
/**
|
|
@@ -4376,7 +4700,7 @@ declare module "factorio:runtime" {
|
|
|
4376
4700
|
}
|
|
4377
4701
|
/**
|
|
4378
4702
|
* Called when an individual segment of a SegmentedUnit is created.
|
|
4379
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4703
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_segment_entity_created Online documentation}
|
|
4380
4704
|
*/
|
|
4381
4705
|
interface OnSegmentEntityCreatedEvent extends EventData {
|
|
4382
4706
|
readonly entity: LuaEntity
|
|
@@ -4393,7 +4717,7 @@ declare module "factorio:runtime" {
|
|
|
4393
4717
|
* Called when a segmented unit is created for any reason.
|
|
4394
4718
|
*
|
|
4395
4719
|
* Event filter: [LuaSegmentedUnitCreatedEventFilter](LuaSegmentedUnitCreatedEventFilter]
|
|
4396
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4720
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_segmented_unit_created Online documentation}
|
|
4397
4721
|
*/
|
|
4398
4722
|
interface OnSegmentedUnitCreatedEvent extends EventData {
|
|
4399
4723
|
/**
|
|
@@ -4421,7 +4745,7 @@ declare module "factorio:runtime" {
|
|
|
4421
4745
|
* Called when a segmented unit is damaged. This is not called when a segmented unit's health is set directly by another mod.
|
|
4422
4746
|
*
|
|
4423
4747
|
* Event filter: [LuaSegmentedUnitDamagedEventFilter](LuaSegmentedUnitDamagedEventFilter]
|
|
4424
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4748
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_segmented_unit_damaged Online documentation}
|
|
4425
4749
|
*/
|
|
4426
4750
|
interface OnSegmentedUnitDamagedEvent extends EventData {
|
|
4427
4751
|
readonly segmented_unit: LuaSegmentedUnit
|
|
@@ -4463,7 +4787,7 @@ declare module "factorio:runtime" {
|
|
|
4463
4787
|
* Called when a segmented unit dies.
|
|
4464
4788
|
*
|
|
4465
4789
|
* Event filter: [LuaSegmentedUnitDiedEventFilter](LuaSegmentedUnitDiedEventFilter]
|
|
4466
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4790
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_segmented_unit_died Online documentation}
|
|
4467
4791
|
*/
|
|
4468
4792
|
interface OnSegmentedUnitDiedEvent extends EventData {
|
|
4469
4793
|
/**
|
|
@@ -4493,7 +4817,7 @@ declare module "factorio:runtime" {
|
|
|
4493
4817
|
}
|
|
4494
4818
|
/**
|
|
4495
4819
|
* Called after the selected entity changes for a given player.
|
|
4496
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4820
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_selected_entity_changed Online documentation}
|
|
4497
4821
|
*/
|
|
4498
4822
|
interface OnSelectedEntityChangedEvent extends EventData {
|
|
4499
4823
|
/**
|
|
@@ -4515,7 +4839,7 @@ declare module "factorio:runtime" {
|
|
|
4515
4839
|
}
|
|
4516
4840
|
/**
|
|
4517
4841
|
* Called when {@link LuaGameScript#is_multiplayer LuaGameScript::is_multiplayer} changes to false. May also be raised when it was already false but a game was loaded from a save file without hosting.
|
|
4518
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4842
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_singleplayer_init Online documentation}
|
|
4519
4843
|
*/
|
|
4520
4844
|
interface OnSingleplayerInitEvent extends EventData {
|
|
4521
4845
|
/**
|
|
@@ -4531,7 +4855,7 @@ declare module "factorio:runtime" {
|
|
|
4531
4855
|
* Called when a space platform builds an entity.
|
|
4532
4856
|
*
|
|
4533
4857
|
* Event filter: [LuaPlatformBuiltEntityEventFilter](LuaPlatformBuiltEntityEventFilter]
|
|
4534
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4858
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_space_platform_built_entity Online documentation}
|
|
4535
4859
|
*/
|
|
4536
4860
|
interface OnSpacePlatformBuiltEntityEvent extends EventData {
|
|
4537
4861
|
/**
|
|
@@ -4561,7 +4885,7 @@ declare module "factorio:runtime" {
|
|
|
4561
4885
|
}
|
|
4562
4886
|
/**
|
|
4563
4887
|
* Called after a space platform builds tiles.
|
|
4564
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4888
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_space_platform_built_tile Online documentation}
|
|
4565
4889
|
*/
|
|
4566
4890
|
interface OnSpacePlatformBuiltTileEvent extends EventData {
|
|
4567
4891
|
/**
|
|
@@ -4603,7 +4927,7 @@ declare module "factorio:runtime" {
|
|
|
4603
4927
|
}
|
|
4604
4928
|
/**
|
|
4605
4929
|
* Called when a space platform changes state
|
|
4606
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4930
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_space_platform_changed_state Online documentation}
|
|
4607
4931
|
*/
|
|
4608
4932
|
interface OnSpacePlatformChangedStateEvent extends EventData {
|
|
4609
4933
|
readonly platform: LuaSpacePlatform
|
|
@@ -4625,7 +4949,7 @@ declare module "factorio:runtime" {
|
|
|
4625
4949
|
* 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.
|
|
4626
4950
|
*
|
|
4627
4951
|
* Event filter: [LuaPlatformMinedEntityEventFilter](LuaPlatformMinedEntityEventFilter]
|
|
4628
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4952
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_space_platform_mined_entity Online documentation}
|
|
4629
4953
|
*/
|
|
4630
4954
|
interface OnSpacePlatformMinedEntityEvent extends EventData {
|
|
4631
4955
|
/**
|
|
@@ -4651,7 +4975,7 @@ declare module "factorio:runtime" {
|
|
|
4651
4975
|
}
|
|
4652
4976
|
/**
|
|
4653
4977
|
* Called when a platform mines an entity.
|
|
4654
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
4978
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_space_platform_mined_item Online documentation}
|
|
4655
4979
|
*/
|
|
4656
4980
|
interface OnSpacePlatformMinedItemEvent extends EventData {
|
|
4657
4981
|
/**
|
|
@@ -4673,7 +4997,7 @@ declare module "factorio:runtime" {
|
|
|
4673
4997
|
}
|
|
4674
4998
|
/**
|
|
4675
4999
|
* Called after a platform mines tiles.
|
|
4676
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5000
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_space_platform_mined_tile Online documentation}
|
|
4677
5001
|
*/
|
|
4678
5002
|
interface OnSpacePlatformMinedTileEvent extends EventData {
|
|
4679
5003
|
/**
|
|
@@ -4701,7 +5025,7 @@ declare module "factorio:runtime" {
|
|
|
4701
5025
|
* Called before a platform mines an entity.
|
|
4702
5026
|
*
|
|
4703
5027
|
* Event filter: [LuaPrePlatformMinedEntityEventFilter](LuaPrePlatformMinedEntityEventFilter]
|
|
4704
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5028
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_space_platform_pre_mined Online documentation}
|
|
4705
5029
|
*/
|
|
4706
5030
|
interface OnSpacePlatformPreMinedEvent extends EventData {
|
|
4707
5031
|
/**
|
|
@@ -4723,7 +5047,7 @@ declare module "factorio:runtime" {
|
|
|
4723
5047
|
}
|
|
4724
5048
|
/**
|
|
4725
5049
|
* Called when a spider finishes moving to its autopilot position.
|
|
4726
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5050
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_spider_command_completed Online documentation}
|
|
4727
5051
|
*/
|
|
4728
5052
|
interface OnSpiderCommandCompletedEvent extends EventData {
|
|
4729
5053
|
/**
|
|
@@ -4741,7 +5065,7 @@ declare module "factorio:runtime" {
|
|
|
4741
5065
|
}
|
|
4742
5066
|
/**
|
|
4743
5067
|
* 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.
|
|
4744
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5068
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_string_translated Online documentation}
|
|
4745
5069
|
*/
|
|
4746
5070
|
interface OnStringTranslatedEvent extends EventData {
|
|
4747
5071
|
/**
|
|
@@ -4775,7 +5099,7 @@ declare module "factorio:runtime" {
|
|
|
4775
5099
|
}
|
|
4776
5100
|
/**
|
|
4777
5101
|
* Called just after a surface is cleared (all entities removed and all chunks deleted).
|
|
4778
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5102
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_surface_cleared Online documentation}
|
|
4779
5103
|
*/
|
|
4780
5104
|
interface OnSurfaceClearedEvent extends EventData {
|
|
4781
5105
|
readonly surface_index: SurfaceIndex
|
|
@@ -4792,7 +5116,7 @@ declare module "factorio:runtime" {
|
|
|
4792
5116
|
* Called when a surface is created.
|
|
4793
5117
|
*
|
|
4794
5118
|
* This is not called when the default surface is created as it will always exist.
|
|
4795
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5119
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_surface_created Online documentation}
|
|
4796
5120
|
*/
|
|
4797
5121
|
interface OnSurfaceCreatedEvent extends EventData {
|
|
4798
5122
|
readonly surface_index: SurfaceIndex
|
|
@@ -4807,7 +5131,7 @@ declare module "factorio:runtime" {
|
|
|
4807
5131
|
}
|
|
4808
5132
|
/**
|
|
4809
5133
|
* Called after a surface is deleted.
|
|
4810
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5134
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_surface_deleted Online documentation}
|
|
4811
5135
|
*/
|
|
4812
5136
|
interface OnSurfaceDeletedEvent extends EventData {
|
|
4813
5137
|
readonly surface_index: SurfaceIndex
|
|
@@ -4822,7 +5146,7 @@ declare module "factorio:runtime" {
|
|
|
4822
5146
|
}
|
|
4823
5147
|
/**
|
|
4824
5148
|
* Called after a surface is imported via the map editor.
|
|
4825
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5149
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_surface_imported Online documentation}
|
|
4826
5150
|
*/
|
|
4827
5151
|
interface OnSurfaceImportedEvent extends EventData {
|
|
4828
5152
|
readonly surface_index: SurfaceIndex
|
|
@@ -4841,7 +5165,7 @@ declare module "factorio:runtime" {
|
|
|
4841
5165
|
}
|
|
4842
5166
|
/**
|
|
4843
5167
|
* Called when a surface is renamed.
|
|
4844
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5168
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_surface_renamed Online documentation}
|
|
4845
5169
|
*/
|
|
4846
5170
|
interface OnSurfaceRenamedEvent extends EventData {
|
|
4847
5171
|
readonly surface_index: SurfaceIndex
|
|
@@ -4858,7 +5182,7 @@ declare module "factorio:runtime" {
|
|
|
4858
5182
|
}
|
|
4859
5183
|
/**
|
|
4860
5184
|
* Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
|
|
4861
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5185
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_technology_effects_reset Online documentation}
|
|
4862
5186
|
*/
|
|
4863
5187
|
interface OnTechnologyEffectsResetEvent extends EventData {
|
|
4864
5188
|
readonly force: LuaForce
|
|
@@ -4873,7 +5197,7 @@ declare module "factorio:runtime" {
|
|
|
4873
5197
|
}
|
|
4874
5198
|
/**
|
|
4875
5199
|
* Called when a territory is created for any reason.
|
|
4876
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5200
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_territory_created Online documentation}
|
|
4877
5201
|
*/
|
|
4878
5202
|
interface OnTerritoryCreatedEvent extends EventData {
|
|
4879
5203
|
/**
|
|
@@ -4895,7 +5219,7 @@ declare module "factorio:runtime" {
|
|
|
4895
5219
|
}
|
|
4896
5220
|
/**
|
|
4897
5221
|
* Called when a territory is destroyed from a surface.
|
|
4898
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5222
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_territory_destroyed Online documentation}
|
|
4899
5223
|
*/
|
|
4900
5224
|
interface OnTerritoryDestroyedEvent extends EventData {
|
|
4901
5225
|
/**
|
|
@@ -4913,7 +5237,7 @@ declare module "factorio:runtime" {
|
|
|
4913
5237
|
}
|
|
4914
5238
|
/**
|
|
4915
5239
|
* It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
|
|
4916
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5240
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_tick Online documentation}
|
|
4917
5241
|
*/
|
|
4918
5242
|
interface OnTickEvent extends EventData {
|
|
4919
5243
|
/**
|
|
@@ -4931,7 +5255,7 @@ declare module "factorio:runtime" {
|
|
|
4931
5255
|
* After this event any items in the buffer will be transferred into the tower as if they came from mining the entity.
|
|
4932
5256
|
*
|
|
4933
5257
|
* 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.
|
|
4934
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5258
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_tower_mined_plant Online documentation}
|
|
4935
5259
|
*/
|
|
4936
5260
|
interface OnTowerMinedPlantEvent extends EventData {
|
|
4937
5261
|
/**
|
|
@@ -4957,7 +5281,7 @@ declare module "factorio:runtime" {
|
|
|
4957
5281
|
}
|
|
4958
5282
|
/**
|
|
4959
5283
|
* Called before an agricultural tower plants a seed.
|
|
4960
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5284
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_tower_planted_seed Online documentation}
|
|
4961
5285
|
*/
|
|
4962
5286
|
interface OnTowerPlantedSeedEvent extends EventData {
|
|
4963
5287
|
/**
|
|
@@ -4983,7 +5307,7 @@ declare module "factorio:runtime" {
|
|
|
4983
5307
|
}
|
|
4984
5308
|
/**
|
|
4985
5309
|
* Called before an agricultural tower mines a plant.
|
|
4986
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5310
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_tower_pre_mined_plant Online documentation}
|
|
4987
5311
|
*/
|
|
4988
5312
|
interface OnTowerPreMinedPlantEvent extends EventData {
|
|
4989
5313
|
/**
|
|
@@ -5005,7 +5329,7 @@ declare module "factorio:runtime" {
|
|
|
5005
5329
|
}
|
|
5006
5330
|
/**
|
|
5007
5331
|
* Called when a train changes state (started to stopped and vice versa)
|
|
5008
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5332
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_train_changed_state Online documentation}
|
|
5009
5333
|
*/
|
|
5010
5334
|
interface OnTrainChangedStateEvent extends EventData {
|
|
5011
5335
|
readonly train: LuaTrain
|
|
@@ -5021,7 +5345,7 @@ declare module "factorio:runtime" {
|
|
|
5021
5345
|
}
|
|
5022
5346
|
/**
|
|
5023
5347
|
* Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
|
|
5024
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5348
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_train_created Online documentation}
|
|
5025
5349
|
*/
|
|
5026
5350
|
interface OnTrainCreatedEvent extends EventData {
|
|
5027
5351
|
readonly train: LuaTrain
|
|
@@ -5044,7 +5368,7 @@ declare module "factorio:runtime" {
|
|
|
5044
5368
|
}
|
|
5045
5369
|
/**
|
|
5046
5370
|
* Called when a trains schedule is changed either by the player or through script.
|
|
5047
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5371
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_train_schedule_changed Online documentation}
|
|
5048
5372
|
*/
|
|
5049
5373
|
interface OnTrainScheduleChangedEvent extends EventData {
|
|
5050
5374
|
readonly train: LuaTrain
|
|
@@ -5063,7 +5387,7 @@ declare module "factorio:runtime" {
|
|
|
5063
5387
|
}
|
|
5064
5388
|
/**
|
|
5065
5389
|
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.
|
|
5066
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5390
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_trigger_created_entity Online documentation}
|
|
5067
5391
|
*/
|
|
5068
5392
|
interface OnTriggerCreatedEntityEvent extends EventData {
|
|
5069
5393
|
readonly entity: LuaEntity
|
|
@@ -5079,7 +5403,7 @@ declare module "factorio:runtime" {
|
|
|
5079
5403
|
}
|
|
5080
5404
|
/**
|
|
5081
5405
|
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=true`.
|
|
5082
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5406
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_trigger_fired_artillery Online documentation}
|
|
5083
5407
|
*/
|
|
5084
5408
|
interface OnTriggerFiredArtilleryEvent extends EventData {
|
|
5085
5409
|
readonly entity: LuaEntity
|
|
@@ -5095,7 +5419,7 @@ declare module "factorio:runtime" {
|
|
|
5095
5419
|
}
|
|
5096
5420
|
/**
|
|
5097
5421
|
* Called when new packets are processed by {@link LuaHelpers#recv_udp LuaHelpers::recv_udp}.
|
|
5098
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5422
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_udp_packet_received Online documentation}
|
|
5099
5423
|
*/
|
|
5100
5424
|
interface OnUdpPacketReceivedEvent extends EventData {
|
|
5101
5425
|
/**
|
|
@@ -5121,7 +5445,7 @@ declare module "factorio:runtime" {
|
|
|
5121
5445
|
}
|
|
5122
5446
|
/**
|
|
5123
5447
|
* Called when the player triggers "undo".
|
|
5124
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5448
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_undo_applied Online documentation}
|
|
5125
5449
|
*/
|
|
5126
5450
|
interface OnUndoAppliedEvent extends EventData {
|
|
5127
5451
|
/**
|
|
@@ -5143,7 +5467,7 @@ declare module "factorio:runtime" {
|
|
|
5143
5467
|
}
|
|
5144
5468
|
/**
|
|
5145
5469
|
* Called when a unit is added to a unit group.
|
|
5146
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5470
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_unit_added_to_group Online documentation}
|
|
5147
5471
|
*/
|
|
5148
5472
|
interface OnUnitAddedToGroupEvent extends EventData {
|
|
5149
5473
|
readonly unit: LuaEntity
|
|
@@ -5159,7 +5483,7 @@ declare module "factorio:runtime" {
|
|
|
5159
5483
|
}
|
|
5160
5484
|
/**
|
|
5161
5485
|
* Called when a new unit group is created, before any members are added to it.
|
|
5162
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5486
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_unit_group_created Online documentation}
|
|
5163
5487
|
*/
|
|
5164
5488
|
interface OnUnitGroupCreatedEvent extends EventData {
|
|
5165
5489
|
readonly group: LuaCommandable
|
|
@@ -5174,7 +5498,7 @@ declare module "factorio:runtime" {
|
|
|
5174
5498
|
}
|
|
5175
5499
|
/**
|
|
5176
5500
|
* Called when a unit group finishes gathering and starts executing its command.
|
|
5177
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5501
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_unit_group_finished_gathering Online documentation}
|
|
5178
5502
|
*/
|
|
5179
5503
|
interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
|
5180
5504
|
readonly group: LuaCommandable
|
|
@@ -5189,7 +5513,7 @@ declare module "factorio:runtime" {
|
|
|
5189
5513
|
}
|
|
5190
5514
|
/**
|
|
5191
5515
|
* Called when a unit is removed from a unit group.
|
|
5192
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5516
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_unit_removed_from_group Online documentation}
|
|
5193
5517
|
*/
|
|
5194
5518
|
interface OnUnitRemovedFromGroupEvent extends EventData {
|
|
5195
5519
|
readonly unit: LuaEntity
|
|
@@ -5205,7 +5529,7 @@ declare module "factorio:runtime" {
|
|
|
5205
5529
|
}
|
|
5206
5530
|
/**
|
|
5207
5531
|
* Called when a worker (construction or logistic) robot expires through a lack of energy.
|
|
5208
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5532
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_worker_robot_expired Online documentation}
|
|
5209
5533
|
*/
|
|
5210
5534
|
interface OnWorkerRobotExpiredEvent extends EventData {
|
|
5211
5535
|
readonly robot: LuaEntity
|
|
@@ -5222,7 +5546,7 @@ declare module "factorio:runtime" {
|
|
|
5222
5546
|
* 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}.
|
|
5223
5547
|
*
|
|
5224
5548
|
* Event filter: [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter]
|
|
5225
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5549
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#script_raised_built Online documentation}
|
|
5226
5550
|
*/
|
|
5227
5551
|
interface ScriptRaisedBuiltEvent extends EventData {
|
|
5228
5552
|
/**
|
|
@@ -5242,7 +5566,7 @@ declare module "factorio:runtime" {
|
|
|
5242
5566
|
* 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}.
|
|
5243
5567
|
*
|
|
5244
5568
|
* Event filter: [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter]
|
|
5245
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5569
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#script_raised_destroy Online documentation}
|
|
5246
5570
|
*/
|
|
5247
5571
|
interface ScriptRaisedDestroyEvent extends EventData {
|
|
5248
5572
|
/**
|
|
@@ -5262,7 +5586,7 @@ declare module "factorio:runtime" {
|
|
|
5262
5586
|
* A static event that mods can use to tell other mods they destroyed a segmented unit by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event}, or {@link LuaBootstrap#raise_script_destroy_segmented_unit LuaBootstrap::raise_script_destroy_segmented_unit}, or when `raise_destroy` is passed to {@link LuaSegmentedUnit#destroy LuaSegmentedUnit::destroy}.
|
|
5263
5587
|
*
|
|
5264
5588
|
* Event filter: [LuaScriptRaisedDestroySegmentedUnitEventFilter](LuaScriptRaisedDestroySegmentedUnitEventFilter]
|
|
5265
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5589
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#script_raised_destroy_segmented_unit Online documentation}
|
|
5266
5590
|
*/
|
|
5267
5591
|
interface ScriptRaisedDestroySegmentedUnitEvent extends EventData {
|
|
5268
5592
|
/**
|
|
@@ -5282,7 +5606,7 @@ declare module "factorio:runtime" {
|
|
|
5282
5606
|
* 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}.
|
|
5283
5607
|
*
|
|
5284
5608
|
* Event filter: [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter]
|
|
5285
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5609
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#script_raised_revive Online documentation}
|
|
5286
5610
|
*/
|
|
5287
5611
|
interface ScriptRaisedReviveEvent extends EventData {
|
|
5288
5612
|
/**
|
|
@@ -5304,7 +5628,7 @@ declare module "factorio:runtime" {
|
|
|
5304
5628
|
}
|
|
5305
5629
|
/**
|
|
5306
5630
|
* 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}.
|
|
5307
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5631
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#script_raised_set_tiles Online documentation}
|
|
5308
5632
|
*/
|
|
5309
5633
|
interface ScriptRaisedSetTilesEvent extends EventData {
|
|
5310
5634
|
/**
|
|
@@ -5328,7 +5652,7 @@ declare module "factorio:runtime" {
|
|
|
5328
5652
|
* 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}.
|
|
5329
5653
|
*
|
|
5330
5654
|
* Event filter: [LuaScriptRaisedTeleportedEventFilter](LuaScriptRaisedTeleportedEventFilter]
|
|
5331
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
5655
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#script_raised_teleported Online documentation}
|
|
5332
5656
|
*/
|
|
5333
5657
|
interface ScriptRaisedTeleportedEvent extends EventData {
|
|
5334
5658
|
/**
|