typed-factorio 4.6.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/package.json +2 -2
- package/prototype/generated/prototypes.d.ts +2551 -2472
- package/prototype/generated/types.d.ts +2672 -2610
- package/runtime/generated/classes.d.ts +5182 -5038
- package/runtime/generated/concepts.d.ts +476 -497
- package/runtime/generated/defines.d.ts +242 -218
- package/runtime/generated/events.d.ts +446 -226
- 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
|
/**
|
|
@@ -59,7 +59,7 @@ declare module "factorio:runtime" {
|
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
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.
|
|
62
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#RecipeCraftedEvent Online documentation}
|
|
63
63
|
*/
|
|
64
64
|
interface RecipeCraftedEvent extends EventData {
|
|
65
65
|
/**
|
|
@@ -105,7 +105,7 @@ declare module "factorio:runtime" {
|
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
107
|
* Called when an achievement is gained.
|
|
108
|
-
* @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}
|
|
109
109
|
*/
|
|
110
110
|
interface OnAchievementGainedEvent extends EventData {
|
|
111
111
|
/**
|
|
@@ -124,7 +124,7 @@ declare module "factorio:runtime" {
|
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* Called when a unit/group completes a command.
|
|
127
|
-
* @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}
|
|
128
128
|
*/
|
|
129
129
|
interface OnAiCommandCompletedEvent extends EventData {
|
|
130
130
|
/**
|
|
@@ -147,7 +147,7 @@ declare module "factorio:runtime" {
|
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Called when an area of the map is cloned.
|
|
150
|
-
* @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}
|
|
151
151
|
*/
|
|
152
152
|
interface OnAreaClonedEvent extends EventData {
|
|
153
153
|
readonly source_surface: LuaSurface
|
|
@@ -173,7 +173,7 @@ declare module "factorio:runtime" {
|
|
|
173
173
|
* Called when a biter migration builds a base.
|
|
174
174
|
*
|
|
175
175
|
* This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
|
176
|
-
* @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}
|
|
177
177
|
*/
|
|
178
178
|
interface OnBiterBaseBuiltEvent extends EventData {
|
|
179
179
|
/**
|
|
@@ -195,7 +195,7 @@ declare module "factorio:runtime" {
|
|
|
195
195
|
* The entity's settings, rotation, mirroring, wire connections, etc. may have been updated. This event is raised even if no settings actually changed.
|
|
196
196
|
*
|
|
197
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.
|
|
198
|
-
* @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}
|
|
199
199
|
*/
|
|
200
200
|
interface OnBlueprintSettingsPastedEvent extends EventData {
|
|
201
201
|
/**
|
|
@@ -229,7 +229,7 @@ declare module "factorio:runtime" {
|
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
231
231
|
* Called when a set of positions on the map is cloned.
|
|
232
|
-
* @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}
|
|
233
233
|
*/
|
|
234
234
|
interface OnBrushClonedEvent extends EventData {
|
|
235
235
|
readonly source_offset: TilePosition
|
|
@@ -254,7 +254,7 @@ declare module "factorio:runtime" {
|
|
|
254
254
|
}
|
|
255
255
|
/**
|
|
256
256
|
* Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
|
|
257
|
-
* @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}
|
|
258
258
|
*/
|
|
259
259
|
interface OnBuildBaseArrivedEvent extends EventData {
|
|
260
260
|
/**
|
|
@@ -278,7 +278,7 @@ declare module "factorio:runtime" {
|
|
|
278
278
|
* Called when player builds something.
|
|
279
279
|
*
|
|
280
280
|
* Event filter: [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter]
|
|
281
|
-
* @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}
|
|
282
282
|
*/
|
|
283
283
|
interface OnBuiltEntityEvent extends EventData {
|
|
284
284
|
/**
|
|
@@ -310,7 +310,7 @@ declare module "factorio:runtime" {
|
|
|
310
310
|
* Called when the deconstruction of an entity is canceled.
|
|
311
311
|
*
|
|
312
312
|
* Event filter: [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter]
|
|
313
|
-
* @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}
|
|
314
314
|
*/
|
|
315
315
|
interface OnCancelledDeconstructionEvent extends EventData {
|
|
316
316
|
readonly entity: LuaEntity
|
|
@@ -328,7 +328,7 @@ declare module "factorio:runtime" {
|
|
|
328
328
|
* Called when the upgrade of an entity is canceled.
|
|
329
329
|
*
|
|
330
330
|
* Event filter: [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter]
|
|
331
|
-
* @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}
|
|
332
332
|
*/
|
|
333
333
|
interface OnCancelledUpgradeEvent extends EventData {
|
|
334
334
|
readonly entity: LuaEntity
|
|
@@ -346,7 +346,7 @@ declare module "factorio:runtime" {
|
|
|
346
346
|
}
|
|
347
347
|
/**
|
|
348
348
|
* Called after a cargo pod has delivered its cargo.
|
|
349
|
-
* @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}
|
|
350
350
|
*/
|
|
351
351
|
interface OnCargoPodDeliveredCargoEvent extends EventData {
|
|
352
352
|
readonly cargo_pod: LuaEntity
|
|
@@ -365,7 +365,7 @@ declare module "factorio:runtime" {
|
|
|
365
365
|
}
|
|
366
366
|
/**
|
|
367
367
|
* Called when a cargo pod departs a surface.
|
|
368
|
-
* @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}
|
|
369
369
|
*/
|
|
370
370
|
interface OnCargoPodFinishedAscendingEvent extends EventData {
|
|
371
371
|
readonly cargo_pod: LuaEntity
|
|
@@ -388,7 +388,7 @@ declare module "factorio:runtime" {
|
|
|
388
388
|
}
|
|
389
389
|
/**
|
|
390
390
|
* Called when a cargo pods lands on a surface, either at a station or on the ground.
|
|
391
|
-
* @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}
|
|
392
392
|
*/
|
|
393
393
|
interface OnCargoPodFinishedDescendingEvent extends EventData {
|
|
394
394
|
readonly cargo_pod: LuaEntity
|
|
@@ -411,7 +411,7 @@ declare module "factorio:runtime" {
|
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
413
413
|
* Called when a cargo pod departs from a space platform hub or by another method not attached to a rocket.
|
|
414
|
-
* @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}
|
|
415
415
|
*/
|
|
416
416
|
interface OnCargoPodStartedAscendingEvent extends EventData {
|
|
417
417
|
readonly cargo_pod: LuaEntity
|
|
@@ -432,7 +432,7 @@ declare module "factorio:runtime" {
|
|
|
432
432
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
|
433
433
|
*
|
|
434
434
|
* this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
|
435
|
-
* @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}
|
|
436
436
|
*/
|
|
437
437
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
|
438
438
|
/**
|
|
@@ -450,7 +450,7 @@ declare module "factorio:runtime" {
|
|
|
450
450
|
}
|
|
451
451
|
/**
|
|
452
452
|
* Called when a chart tag is created.
|
|
453
|
-
* @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}
|
|
454
454
|
*/
|
|
455
455
|
interface OnChartTagAddedEvent extends EventData {
|
|
456
456
|
readonly tag: LuaCustomChartTag
|
|
@@ -467,7 +467,7 @@ declare module "factorio:runtime" {
|
|
|
467
467
|
}
|
|
468
468
|
/**
|
|
469
469
|
* Called when a chart tag is modified by a player or by script.
|
|
470
|
-
* @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}
|
|
471
471
|
*/
|
|
472
472
|
interface OnChartTagModifiedEvent extends EventData {
|
|
473
473
|
readonly tag: LuaCustomChartTag
|
|
@@ -489,7 +489,7 @@ declare module "factorio:runtime" {
|
|
|
489
489
|
}
|
|
490
490
|
/**
|
|
491
491
|
* Called just before a chart tag is deleted.
|
|
492
|
-
* @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}
|
|
493
493
|
*/
|
|
494
494
|
interface OnChartTagRemovedEvent extends EventData {
|
|
495
495
|
readonly tag: LuaCustomChartTag
|
|
@@ -506,7 +506,7 @@ declare module "factorio:runtime" {
|
|
|
506
506
|
}
|
|
507
507
|
/**
|
|
508
508
|
* Called when a chunk is charted or re-charted.
|
|
509
|
-
* @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}
|
|
510
510
|
*/
|
|
511
511
|
interface OnChunkChartedEvent extends EventData {
|
|
512
512
|
readonly surface_index: SurfaceIndex
|
|
@@ -527,7 +527,7 @@ declare module "factorio:runtime" {
|
|
|
527
527
|
}
|
|
528
528
|
/**
|
|
529
529
|
* Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
|
530
|
-
* @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}
|
|
531
531
|
*/
|
|
532
532
|
interface OnChunkDeletedEvent extends EventData {
|
|
533
533
|
readonly surface_index: SurfaceIndex
|
|
@@ -546,7 +546,7 @@ declare module "factorio:runtime" {
|
|
|
546
546
|
}
|
|
547
547
|
/**
|
|
548
548
|
* Called when a chunk is generated.
|
|
549
|
-
* @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}
|
|
550
550
|
*/
|
|
551
551
|
interface OnChunkGeneratedEvent extends EventData {
|
|
552
552
|
/**
|
|
@@ -572,7 +572,7 @@ declare module "factorio:runtime" {
|
|
|
572
572
|
}
|
|
573
573
|
/**
|
|
574
574
|
* Called when a combat robot expires through a lack of energy, or timeout.
|
|
575
|
-
* @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}
|
|
576
576
|
*/
|
|
577
577
|
interface OnCombatRobotExpiredEvent extends EventData {
|
|
578
578
|
readonly robot: LuaEntity
|
|
@@ -593,7 +593,7 @@ declare module "factorio:runtime" {
|
|
|
593
593
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
|
594
594
|
*
|
|
595
595
|
* This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
|
596
|
-
* @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}
|
|
597
597
|
*/
|
|
598
598
|
interface OnConsoleChatEvent extends EventData {
|
|
599
599
|
/**
|
|
@@ -615,7 +615,7 @@ declare module "factorio:runtime" {
|
|
|
615
615
|
}
|
|
616
616
|
/**
|
|
617
617
|
* Called when someone enters a command-like message regardless of it being a valid command.
|
|
618
|
-
* @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}
|
|
619
619
|
*/
|
|
620
620
|
interface OnConsoleCommandEvent extends EventData {
|
|
621
621
|
/**
|
|
@@ -641,7 +641,7 @@ declare module "factorio:runtime" {
|
|
|
641
641
|
}
|
|
642
642
|
/**
|
|
643
643
|
* Called when a cutscene is cancelled by the player or by script.
|
|
644
|
-
* @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}
|
|
645
645
|
*/
|
|
646
646
|
interface OnCutsceneCancelledEvent extends EventData {
|
|
647
647
|
/**
|
|
@@ -659,7 +659,7 @@ declare module "factorio:runtime" {
|
|
|
659
659
|
}
|
|
660
660
|
/**
|
|
661
661
|
* Called when a cutscene finishes naturally (was not cancelled).
|
|
662
|
-
* @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}
|
|
663
663
|
*/
|
|
664
664
|
interface OnCutsceneFinishedEvent extends EventData {
|
|
665
665
|
/**
|
|
@@ -677,7 +677,7 @@ declare module "factorio:runtime" {
|
|
|
677
677
|
}
|
|
678
678
|
/**
|
|
679
679
|
* Called when a cutscene starts.
|
|
680
|
-
* @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}
|
|
681
681
|
*/
|
|
682
682
|
interface OnCutsceneStartedEvent extends EventData {
|
|
683
683
|
/**
|
|
@@ -697,7 +697,7 @@ declare module "factorio:runtime" {
|
|
|
697
697
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
|
698
698
|
*
|
|
699
699
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
|
700
|
-
* @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}
|
|
701
701
|
*/
|
|
702
702
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
|
703
703
|
/**
|
|
@@ -721,7 +721,7 @@ declare module "factorio:runtime" {
|
|
|
721
721
|
* Called when an entity is cloned. The filter applies to the source entity.
|
|
722
722
|
*
|
|
723
723
|
* Event filter: [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter]
|
|
724
|
-
* @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}
|
|
725
725
|
*/
|
|
726
726
|
interface OnEntityClonedEvent extends EventData {
|
|
727
727
|
readonly source: LuaEntity
|
|
@@ -739,7 +739,7 @@ declare module "factorio:runtime" {
|
|
|
739
739
|
* Called after an entity has been recolored either by the player or through script.
|
|
740
740
|
*
|
|
741
741
|
* Automatic recoloring due to {@link LuaPlayer#color LuaPlayer::color} will not raise events, as that is a separate mechanism.
|
|
742
|
-
* @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}
|
|
743
743
|
*/
|
|
744
744
|
interface OnEntityColorChangedEvent extends EventData {
|
|
745
745
|
/**
|
|
@@ -759,7 +759,7 @@ declare module "factorio:runtime" {
|
|
|
759
759
|
* Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
|
|
760
760
|
*
|
|
761
761
|
* Event filter: [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter]
|
|
762
|
-
* @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}
|
|
763
763
|
*/
|
|
764
764
|
interface OnEntityDamagedEvent extends EventData {
|
|
765
765
|
readonly entity: LuaEntity
|
|
@@ -801,7 +801,7 @@ declare module "factorio:runtime" {
|
|
|
801
801
|
* Called when an entity dies.
|
|
802
802
|
*
|
|
803
803
|
* Event filter: [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter]
|
|
804
|
-
* @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}
|
|
805
805
|
*/
|
|
806
806
|
interface OnEntityDiedEvent extends EventData {
|
|
807
807
|
/**
|
|
@@ -835,7 +835,7 @@ declare module "factorio:runtime" {
|
|
|
835
835
|
}
|
|
836
836
|
/**
|
|
837
837
|
* Called when one of an entity's logistic slots changes.
|
|
838
|
-
* @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}
|
|
839
839
|
*/
|
|
840
840
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
|
841
841
|
/**
|
|
@@ -865,7 +865,7 @@ declare module "factorio:runtime" {
|
|
|
865
865
|
}
|
|
866
866
|
/**
|
|
867
867
|
* Called after an entity has been renamed either by the player or through script.
|
|
868
|
-
* @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}
|
|
869
869
|
*/
|
|
870
870
|
interface OnEntityRenamedEvent extends EventData {
|
|
871
871
|
/**
|
|
@@ -886,7 +886,7 @@ declare module "factorio:runtime" {
|
|
|
886
886
|
}
|
|
887
887
|
/**
|
|
888
888
|
* Called after entity copy-paste is done.
|
|
889
|
-
* @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}
|
|
890
890
|
*/
|
|
891
891
|
interface OnEntitySettingsPastedEvent extends EventData {
|
|
892
892
|
readonly player_index: PlayerIndex
|
|
@@ -909,7 +909,7 @@ declare module "factorio:runtime" {
|
|
|
909
909
|
}
|
|
910
910
|
/**
|
|
911
911
|
* Called when an entity is spawned by a EnemySpawner
|
|
912
|
-
* @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}
|
|
913
913
|
*/
|
|
914
914
|
interface OnEntitySpawnedEvent extends EventData {
|
|
915
915
|
readonly spawner: LuaEntity
|
|
@@ -925,7 +925,7 @@ declare module "factorio:runtime" {
|
|
|
925
925
|
}
|
|
926
926
|
/**
|
|
927
927
|
* Called after equipment is inserted into an equipment grid.
|
|
928
|
-
* @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}
|
|
929
929
|
*/
|
|
930
930
|
interface OnEquipmentInsertedEvent extends EventData {
|
|
931
931
|
/**
|
|
@@ -947,7 +947,7 @@ declare module "factorio:runtime" {
|
|
|
947
947
|
}
|
|
948
948
|
/**
|
|
949
949
|
* Called after equipment is removed from an equipment grid.
|
|
950
|
-
* @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}
|
|
951
951
|
*/
|
|
952
952
|
interface OnEquipmentRemovedEvent extends EventData {
|
|
953
953
|
/**
|
|
@@ -977,7 +977,7 @@ declare module "factorio:runtime" {
|
|
|
977
977
|
}
|
|
978
978
|
/**
|
|
979
979
|
* Called when the a forces cease fire values change.
|
|
980
|
-
* @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}
|
|
981
981
|
*/
|
|
982
982
|
interface OnForceCeaseFireChangedEvent extends EventData {
|
|
983
983
|
/**
|
|
@@ -1005,7 +1005,7 @@ declare module "factorio:runtime" {
|
|
|
1005
1005
|
* Called when a new force is created using `game.create_force()`
|
|
1006
1006
|
*
|
|
1007
1007
|
* This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
|
1008
|
-
* @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}
|
|
1009
1009
|
*/
|
|
1010
1010
|
interface OnForceCreatedEvent extends EventData {
|
|
1011
1011
|
/**
|
|
@@ -1023,7 +1023,7 @@ declare module "factorio:runtime" {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
/**
|
|
1025
1025
|
* Called when the a forces friends change.
|
|
1026
|
-
* @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}
|
|
1027
1027
|
*/
|
|
1028
1028
|
interface OnForceFriendsChangedEvent extends EventData {
|
|
1029
1029
|
/**
|
|
@@ -1049,7 +1049,7 @@ declare module "factorio:runtime" {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
/**
|
|
1051
1051
|
* Called when {@link LuaForce#reset LuaForce::reset} is finished.
|
|
1052
|
-
* @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}
|
|
1053
1053
|
*/
|
|
1054
1054
|
interface OnForceResetEvent extends EventData {
|
|
1055
1055
|
readonly force: LuaForce
|
|
@@ -1066,7 +1066,7 @@ declare module "factorio:runtime" {
|
|
|
1066
1066
|
* Called after two forces have been merged using `game.merge_forces()`.
|
|
1067
1067
|
*
|
|
1068
1068
|
* The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
|
1069
|
-
* @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}
|
|
1070
1070
|
*/
|
|
1071
1071
|
interface OnForcesMergedEvent extends EventData {
|
|
1072
1072
|
/**
|
|
@@ -1092,7 +1092,7 @@ declare module "factorio:runtime" {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
/**
|
|
1094
1094
|
* Called when two forces are about to be merged using `game.merge_forces()`.
|
|
1095
|
-
* @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}
|
|
1096
1096
|
*/
|
|
1097
1097
|
interface OnForcesMergingEvent extends EventData {
|
|
1098
1098
|
/**
|
|
@@ -1116,7 +1116,7 @@ declare module "factorio:runtime" {
|
|
|
1116
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.
|
|
1117
1117
|
*
|
|
1118
1118
|
* This event is not fired when the scenario is loaded via the map editor.
|
|
1119
|
-
* @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}
|
|
1120
1120
|
*/
|
|
1121
1121
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
|
1122
1122
|
/**
|
|
@@ -1130,7 +1130,7 @@ declare module "factorio:runtime" {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
/**
|
|
1132
1132
|
* Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
|
|
1133
|
-
* @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}
|
|
1134
1134
|
*/
|
|
1135
1135
|
interface OnGuiCheckedStateChangedEvent extends EventData {
|
|
1136
1136
|
/**
|
|
@@ -1152,7 +1152,7 @@ declare module "factorio:runtime" {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
/**
|
|
1154
1154
|
* Called when {@link LuaGuiElement} is clicked.
|
|
1155
|
-
* @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}
|
|
1156
1156
|
*/
|
|
1157
1157
|
interface OnGuiClickEvent extends EventData {
|
|
1158
1158
|
/**
|
|
@@ -1198,7 +1198,7 @@ declare module "factorio:runtime" {
|
|
|
1198
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.
|
|
1199
1199
|
*
|
|
1200
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.
|
|
1201
|
-
* @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}
|
|
1202
1202
|
*/
|
|
1203
1203
|
interface OnGuiClosedEvent extends EventData {
|
|
1204
1204
|
/**
|
|
@@ -1252,7 +1252,7 @@ declare module "factorio:runtime" {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
/**
|
|
1254
1254
|
* Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
|
|
1255
|
-
* @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}
|
|
1256
1256
|
*/
|
|
1257
1257
|
interface OnGuiConfirmedEvent extends EventData {
|
|
1258
1258
|
/**
|
|
@@ -1286,7 +1286,7 @@ declare module "factorio:runtime" {
|
|
|
1286
1286
|
}
|
|
1287
1287
|
/**
|
|
1288
1288
|
* Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
|
|
1289
|
-
* @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}
|
|
1290
1290
|
*/
|
|
1291
1291
|
interface OnGuiElemChangedEvent extends EventData {
|
|
1292
1292
|
/**
|
|
@@ -1310,7 +1310,7 @@ declare module "factorio:runtime" {
|
|
|
1310
1310
|
* Called when {@link LuaGuiElement} is hovered by the mouse.
|
|
1311
1311
|
*
|
|
1312
1312
|
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
|
1313
|
-
* @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}
|
|
1314
1314
|
*/
|
|
1315
1315
|
interface OnGuiHoverEvent extends EventData {
|
|
1316
1316
|
/**
|
|
@@ -1332,7 +1332,7 @@ declare module "factorio:runtime" {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
/**
|
|
1334
1334
|
* Called when a player interacts with a custom inventory GUI.
|
|
1335
|
-
* @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}
|
|
1336
1336
|
*/
|
|
1337
1337
|
interface OnGuiInventoryActionEvent extends EventData {
|
|
1338
1338
|
/**
|
|
@@ -1392,7 +1392,7 @@ declare module "factorio:runtime" {
|
|
|
1392
1392
|
* Called when the player's cursor leaves a {@link LuaGuiElement} that was previously hovered.
|
|
1393
1393
|
*
|
|
1394
1394
|
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
|
1395
|
-
* @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}
|
|
1396
1396
|
*/
|
|
1397
1397
|
interface OnGuiLeaveEvent extends EventData {
|
|
1398
1398
|
/**
|
|
@@ -1414,7 +1414,7 @@ declare module "factorio:runtime" {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
/**
|
|
1416
1416
|
* Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
|
|
1417
|
-
* @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}
|
|
1418
1418
|
*/
|
|
1419
1419
|
interface OnGuiLocationChangedEvent extends EventData {
|
|
1420
1420
|
/**
|
|
@@ -1436,7 +1436,7 @@ declare module "factorio:runtime" {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
/**
|
|
1438
1438
|
* Called when the player opens a GUI.
|
|
1439
|
-
* @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}
|
|
1440
1440
|
*/
|
|
1441
1441
|
interface OnGuiOpenedEvent extends EventData {
|
|
1442
1442
|
/**
|
|
@@ -1490,7 +1490,7 @@ declare module "factorio:runtime" {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
/**
|
|
1492
1492
|
* Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
|
|
1493
|
-
* @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}
|
|
1494
1494
|
*/
|
|
1495
1495
|
interface OnGuiSelectedTabChangedEvent extends EventData {
|
|
1496
1496
|
/**
|
|
@@ -1512,7 +1512,7 @@ declare module "factorio:runtime" {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
/**
|
|
1514
1514
|
* Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
|
|
1515
|
-
* @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}
|
|
1516
1516
|
*/
|
|
1517
1517
|
interface OnGuiSelectionStateChangedEvent extends EventData {
|
|
1518
1518
|
/**
|
|
@@ -1534,7 +1534,7 @@ declare module "factorio:runtime" {
|
|
|
1534
1534
|
}
|
|
1535
1535
|
/**
|
|
1536
1536
|
* Called when {@link LuaGuiElement} switch state is changed (related to switches).
|
|
1537
|
-
* @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}
|
|
1538
1538
|
*/
|
|
1539
1539
|
interface OnGuiSwitchStateChangedEvent extends EventData {
|
|
1540
1540
|
/**
|
|
@@ -1556,7 +1556,7 @@ declare module "factorio:runtime" {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
/**
|
|
1558
1558
|
* Called when {@link LuaGuiElement} text is changed by the player.
|
|
1559
|
-
* @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}
|
|
1560
1560
|
*/
|
|
1561
1561
|
interface OnGuiTextChangedEvent extends EventData {
|
|
1562
1562
|
/**
|
|
@@ -1582,7 +1582,7 @@ declare module "factorio:runtime" {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
/**
|
|
1584
1584
|
* Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
|
|
1585
|
-
* @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}
|
|
1586
1586
|
*/
|
|
1587
1587
|
interface OnGuiValueChangedEvent extends EventData {
|
|
1588
1588
|
/**
|
|
@@ -1604,7 +1604,7 @@ declare module "factorio:runtime" {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
/**
|
|
1606
1606
|
* Called when a land mine is armed.
|
|
1607
|
-
* @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}
|
|
1608
1608
|
*/
|
|
1609
1609
|
interface OnLandMineArmedEvent extends EventData {
|
|
1610
1610
|
readonly mine: LuaEntity
|
|
@@ -1619,7 +1619,7 @@ declare module "factorio:runtime" {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
/**
|
|
1621
1621
|
* Called when a custom {@link import("factorio:prototype").ShortcutPrototype Lua shortcut} is pressed.
|
|
1622
|
-
* @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}
|
|
1623
1623
|
*/
|
|
1624
1624
|
interface OnLuaShortcutEvent extends EventData {
|
|
1625
1625
|
readonly player_index: PlayerIndex
|
|
@@ -1640,7 +1640,7 @@ declare module "factorio:runtime" {
|
|
|
1640
1640
|
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
|
|
1641
1641
|
*
|
|
1642
1642
|
* Event filter: [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter]
|
|
1643
|
-
* @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}
|
|
1644
1644
|
*/
|
|
1645
1645
|
interface OnMarkedForDeconstructionEvent extends EventData {
|
|
1646
1646
|
readonly entity: LuaEntity
|
|
@@ -1658,7 +1658,7 @@ declare module "factorio:runtime" {
|
|
|
1658
1658
|
* Called when an entity is marked for upgrade with the upgrade planner or via script.
|
|
1659
1659
|
*
|
|
1660
1660
|
* Event filter: [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter]
|
|
1661
|
-
* @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}
|
|
1662
1662
|
*/
|
|
1663
1663
|
interface OnMarkedForUpgradeEvent extends EventData {
|
|
1664
1664
|
readonly player_index?: PlayerIndex
|
|
@@ -1687,7 +1687,7 @@ declare module "factorio:runtime" {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
/**
|
|
1689
1689
|
* Called after a player purchases some offer from a `market` entity.
|
|
1690
|
-
* @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}
|
|
1691
1691
|
*/
|
|
1692
1692
|
interface OnMarketItemPurchasedEvent extends EventData {
|
|
1693
1693
|
/**
|
|
@@ -1717,7 +1717,7 @@ declare module "factorio:runtime" {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
/**
|
|
1719
1719
|
* Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
|
|
1720
|
-
* @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}
|
|
1721
1721
|
*/
|
|
1722
1722
|
interface OnModItemOpenedEvent extends EventData {
|
|
1723
1723
|
/**
|
|
@@ -1743,7 +1743,7 @@ declare module "factorio:runtime" {
|
|
|
1743
1743
|
}
|
|
1744
1744
|
/**
|
|
1745
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.
|
|
1746
|
-
* @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}
|
|
1747
1747
|
*/
|
|
1748
1748
|
interface OnMultiplayerInitEvent extends EventData {
|
|
1749
1749
|
/**
|
|
@@ -1757,7 +1757,7 @@ declare module "factorio:runtime" {
|
|
|
1757
1757
|
}
|
|
1758
1758
|
/**
|
|
1759
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.
|
|
1760
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_next_day_started Online documentation}
|
|
1761
1761
|
*/
|
|
1762
1762
|
interface OnNextDayStartedEvent extends EventData {
|
|
1763
1763
|
readonly surface: LuaSurface
|
|
@@ -1774,7 +1774,7 @@ declare module "factorio:runtime" {
|
|
|
1774
1774
|
* Called after an object is destroyed which was registered with {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed} previously.
|
|
1775
1775
|
*
|
|
1776
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.
|
|
1777
|
-
* @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}
|
|
1778
1778
|
*/
|
|
1779
1779
|
interface OnObjectDestroyedEvent extends EventData {
|
|
1780
1780
|
/**
|
|
@@ -1800,7 +1800,7 @@ declare module "factorio:runtime" {
|
|
|
1800
1800
|
}
|
|
1801
1801
|
/**
|
|
1802
1802
|
* Called directly after a permission group is added.
|
|
1803
|
-
* @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}
|
|
1804
1804
|
*/
|
|
1805
1805
|
interface OnPermissionGroupAddedEvent extends EventData {
|
|
1806
1806
|
/**
|
|
@@ -1822,7 +1822,7 @@ declare module "factorio:runtime" {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
/**
|
|
1824
1824
|
* Called directly after a permission group is deleted.
|
|
1825
|
-
* @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}
|
|
1826
1826
|
*/
|
|
1827
1827
|
interface OnPermissionGroupDeletedEvent extends EventData {
|
|
1828
1828
|
/**
|
|
@@ -1848,7 +1848,7 @@ declare module "factorio:runtime" {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
/**
|
|
1850
1850
|
* Called directly after a permission group is edited in some way.
|
|
1851
|
-
* @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}
|
|
1852
1852
|
*/
|
|
1853
1853
|
interface OnPermissionGroupEditedEvent extends EventData {
|
|
1854
1854
|
/**
|
|
@@ -1891,7 +1891,7 @@ declare module "factorio:runtime" {
|
|
|
1891
1891
|
}
|
|
1892
1892
|
/**
|
|
1893
1893
|
* Called directly after a permission string is imported.
|
|
1894
|
-
* @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}
|
|
1895
1895
|
*/
|
|
1896
1896
|
interface OnPermissionStringImportedEvent extends EventData {
|
|
1897
1897
|
/**
|
|
@@ -1909,7 +1909,7 @@ declare module "factorio:runtime" {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
/**
|
|
1911
1911
|
* Called when a player picks up an item.
|
|
1912
|
-
* @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}
|
|
1913
1913
|
*/
|
|
1914
1914
|
interface OnPickedUpItemEvent extends EventData {
|
|
1915
1915
|
readonly item_stack: ItemWithQualityCount
|
|
@@ -1925,7 +1925,7 @@ declare module "factorio:runtime" {
|
|
|
1925
1925
|
}
|
|
1926
1926
|
/**
|
|
1927
1927
|
* Called after a player alt-reverse-selects an area with a selection-tool item.
|
|
1928
|
-
* @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}
|
|
1929
1929
|
*/
|
|
1930
1930
|
interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
|
|
1931
1931
|
/**
|
|
@@ -1940,6 +1940,14 @@ declare module "factorio:runtime" {
|
|
|
1940
1940
|
* The area selected.
|
|
1941
1941
|
*/
|
|
1942
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
|
|
1943
1951
|
/**
|
|
1944
1952
|
* The item used to select the area.
|
|
1945
1953
|
*/
|
|
@@ -1952,6 +1960,7 @@ declare module "factorio:runtime" {
|
|
|
1952
1960
|
* The tiles selected.
|
|
1953
1961
|
*/
|
|
1954
1962
|
readonly tiles: LuaTile[]
|
|
1963
|
+
readonly selection_mode: defines.selection_mode
|
|
1955
1964
|
/**
|
|
1956
1965
|
* Identifier of the event.
|
|
1957
1966
|
*/
|
|
@@ -1963,7 +1972,7 @@ declare module "factorio:runtime" {
|
|
|
1963
1972
|
}
|
|
1964
1973
|
/**
|
|
1965
1974
|
* Called after a player alt-selects an area with a selection-tool item.
|
|
1966
|
-
* @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}
|
|
1967
1976
|
*/
|
|
1968
1977
|
interface OnPlayerAltSelectedAreaEvent extends EventData {
|
|
1969
1978
|
/**
|
|
@@ -1978,6 +1987,14 @@ declare module "factorio:runtime" {
|
|
|
1978
1987
|
* The area selected.
|
|
1979
1988
|
*/
|
|
1980
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
|
|
1981
1998
|
/**
|
|
1982
1999
|
* The item used to select the area.
|
|
1983
2000
|
*/
|
|
@@ -1994,6 +2011,7 @@ declare module "factorio:runtime" {
|
|
|
1994
2011
|
* The tiles selected.
|
|
1995
2012
|
*/
|
|
1996
2013
|
readonly tiles: LuaTile[]
|
|
2014
|
+
readonly selection_mode: defines.selection_mode
|
|
1997
2015
|
/**
|
|
1998
2016
|
* Identifier of the event.
|
|
1999
2017
|
*/
|
|
@@ -2005,7 +2023,7 @@ declare module "factorio:runtime" {
|
|
|
2005
2023
|
}
|
|
2006
2024
|
/**
|
|
2007
2025
|
* Called after a players ammo inventory changed in some way.
|
|
2008
|
-
* @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}
|
|
2009
2027
|
*/
|
|
2010
2028
|
interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
|
2011
2029
|
readonly player_index: PlayerIndex
|
|
@@ -2020,7 +2038,7 @@ declare module "factorio:runtime" {
|
|
|
2020
2038
|
}
|
|
2021
2039
|
/**
|
|
2022
2040
|
* Called after a players armor inventory changed in some way.
|
|
2023
|
-
* @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}
|
|
2024
2042
|
*/
|
|
2025
2043
|
interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
|
2026
2044
|
readonly player_index: PlayerIndex
|
|
@@ -2035,7 +2053,7 @@ declare module "factorio:runtime" {
|
|
|
2035
2053
|
}
|
|
2036
2054
|
/**
|
|
2037
2055
|
* Called when a player is banned.
|
|
2038
|
-
* @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}
|
|
2039
2057
|
*/
|
|
2040
2058
|
interface OnPlayerBannedEvent extends EventData {
|
|
2041
2059
|
/**
|
|
@@ -2065,7 +2083,7 @@ declare module "factorio:runtime" {
|
|
|
2065
2083
|
}
|
|
2066
2084
|
/**
|
|
2067
2085
|
* Called after a player builds tiles.
|
|
2068
|
-
* @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}
|
|
2069
2087
|
*/
|
|
2070
2088
|
interface OnPlayerBuiltTileEvent extends EventData {
|
|
2071
2089
|
readonly player_index: PlayerIndex
|
|
@@ -2102,9 +2120,62 @@ declare module "factorio:runtime" {
|
|
|
2102
2120
|
*/
|
|
2103
2121
|
readonly tick: MapTick
|
|
2104
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
|
+
}
|
|
2105
2176
|
/**
|
|
2106
2177
|
* Called when a player cancels crafting.
|
|
2107
|
-
* @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}
|
|
2108
2179
|
*/
|
|
2109
2180
|
interface OnPlayerCancelledCraftingEvent extends EventData {
|
|
2110
2181
|
/**
|
|
@@ -2132,9 +2203,62 @@ declare module "factorio:runtime" {
|
|
|
2132
2203
|
*/
|
|
2133
2204
|
readonly tick: MapTick
|
|
2134
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
|
+
}
|
|
2135
2259
|
/**
|
|
2136
2260
|
* Called after a player changes forces.
|
|
2137
|
-
* @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}
|
|
2138
2262
|
*/
|
|
2139
2263
|
interface OnPlayerChangedForceEvent extends EventData {
|
|
2140
2264
|
/**
|
|
@@ -2156,7 +2280,7 @@ declare module "factorio:runtime" {
|
|
|
2156
2280
|
}
|
|
2157
2281
|
/**
|
|
2158
2282
|
* Called when the tile position a player is located at changes.
|
|
2159
|
-
* @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}
|
|
2160
2284
|
*/
|
|
2161
2285
|
interface OnPlayerChangedPositionEvent extends EventData {
|
|
2162
2286
|
/**
|
|
@@ -2174,7 +2298,7 @@ declare module "factorio:runtime" {
|
|
|
2174
2298
|
}
|
|
2175
2299
|
/**
|
|
2176
2300
|
* Called after a player changes surfaces.
|
|
2177
|
-
* @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}
|
|
2178
2302
|
*/
|
|
2179
2303
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
|
2180
2304
|
/**
|
|
@@ -2196,7 +2320,7 @@ declare module "factorio:runtime" {
|
|
|
2196
2320
|
}
|
|
2197
2321
|
/**
|
|
2198
2322
|
* Called when cheat mode is disabled on a player.
|
|
2199
|
-
* @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}
|
|
2200
2324
|
*/
|
|
2201
2325
|
interface OnPlayerCheatModeDisabledEvent extends EventData {
|
|
2202
2326
|
/**
|
|
@@ -2214,7 +2338,7 @@ declare module "factorio:runtime" {
|
|
|
2214
2338
|
}
|
|
2215
2339
|
/**
|
|
2216
2340
|
* Called when cheat mode is enabled on a player.
|
|
2217
|
-
* @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}
|
|
2218
2342
|
*/
|
|
2219
2343
|
interface OnPlayerCheatModeEnabledEvent extends EventData {
|
|
2220
2344
|
/**
|
|
@@ -2232,7 +2356,7 @@ declare module "factorio:runtime" {
|
|
|
2232
2356
|
}
|
|
2233
2357
|
/**
|
|
2234
2358
|
* Called when a player clicks a gps tag
|
|
2235
|
-
* @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}
|
|
2236
2360
|
*/
|
|
2237
2361
|
interface OnPlayerClickedGpsTagEvent extends EventData {
|
|
2238
2362
|
/**
|
|
@@ -2258,7 +2382,7 @@ declare module "factorio:runtime" {
|
|
|
2258
2382
|
}
|
|
2259
2383
|
/**
|
|
2260
2384
|
* Called after a player's color changes.
|
|
2261
|
-
* @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}
|
|
2262
2386
|
*/
|
|
2263
2387
|
interface OnPlayerColorChangedEvent extends EventData {
|
|
2264
2388
|
/**
|
|
@@ -2288,7 +2412,7 @@ declare module "factorio:runtime" {
|
|
|
2288
2412
|
}
|
|
2289
2413
|
/**
|
|
2290
2414
|
* Called when a player clicks the "confirm" button in the configure Blueprint GUI.
|
|
2291
|
-
* @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}
|
|
2292
2416
|
*/
|
|
2293
2417
|
interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
|
2294
2418
|
/**
|
|
@@ -2306,7 +2430,7 @@ declare module "factorio:runtime" {
|
|
|
2306
2430
|
}
|
|
2307
2431
|
/**
|
|
2308
2432
|
* Called after a player changes controller types.
|
|
2309
|
-
* @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}
|
|
2310
2434
|
*/
|
|
2311
2435
|
interface OnPlayerControllerChangedEvent extends EventData {
|
|
2312
2436
|
/**
|
|
@@ -2328,7 +2452,7 @@ declare module "factorio:runtime" {
|
|
|
2328
2452
|
}
|
|
2329
2453
|
/**
|
|
2330
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}).
|
|
2331
|
-
* @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}
|
|
2332
2456
|
*/
|
|
2333
2457
|
interface OnPlayerCraftedItemEvent extends EventData {
|
|
2334
2458
|
/**
|
|
@@ -2354,7 +2478,7 @@ declare module "factorio:runtime" {
|
|
|
2354
2478
|
}
|
|
2355
2479
|
/**
|
|
2356
2480
|
* Called after the player was created.
|
|
2357
|
-
* @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}
|
|
2358
2482
|
*/
|
|
2359
2483
|
interface OnPlayerCreatedEvent extends EventData {
|
|
2360
2484
|
readonly player_index: PlayerIndex
|
|
@@ -2371,7 +2495,7 @@ declare module "factorio:runtime" {
|
|
|
2371
2495
|
* Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
|
|
2372
2496
|
*
|
|
2373
2497
|
* This is fired in the same tick that the change happens, but not instantly.
|
|
2374
|
-
* @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}
|
|
2375
2499
|
*/
|
|
2376
2500
|
interface OnPlayerCursorStackChangedEvent extends EventData {
|
|
2377
2501
|
readonly player_index: PlayerIndex
|
|
@@ -2386,7 +2510,7 @@ declare module "factorio:runtime" {
|
|
|
2386
2510
|
}
|
|
2387
2511
|
/**
|
|
2388
2512
|
* Called when a player selects an area with a deconstruction planner.
|
|
2389
|
-
* @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}
|
|
2390
2514
|
*/
|
|
2391
2515
|
interface OnPlayerDeconstructedAreaEvent extends EventData {
|
|
2392
2516
|
/**
|
|
@@ -2401,6 +2525,14 @@ declare module "factorio:runtime" {
|
|
|
2401
2525
|
* The area selected.
|
|
2402
2526
|
*/
|
|
2403
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
|
|
2404
2536
|
/**
|
|
2405
2537
|
* The item used to select the area.
|
|
2406
2538
|
*/
|
|
@@ -2433,7 +2565,7 @@ declare module "factorio:runtime" {
|
|
|
2433
2565
|
}
|
|
2434
2566
|
/**
|
|
2435
2567
|
* Called when a player is demoted.
|
|
2436
|
-
* @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}
|
|
2437
2569
|
*/
|
|
2438
2570
|
interface OnPlayerDemotedEvent extends EventData {
|
|
2439
2571
|
/**
|
|
@@ -2451,7 +2583,7 @@ declare module "factorio:runtime" {
|
|
|
2451
2583
|
}
|
|
2452
2584
|
/**
|
|
2453
2585
|
* Called after a player dies.
|
|
2454
|
-
* @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}
|
|
2455
2587
|
*/
|
|
2456
2588
|
interface OnPlayerDiedEvent extends EventData {
|
|
2457
2589
|
readonly player_index: PlayerIndex
|
|
@@ -2467,7 +2599,7 @@ declare module "factorio:runtime" {
|
|
|
2467
2599
|
}
|
|
2468
2600
|
/**
|
|
2469
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.
|
|
2470
|
-
* @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}
|
|
2471
2603
|
*/
|
|
2472
2604
|
interface OnPlayerDisplayDensityScaleChangedEvent extends EventData {
|
|
2473
2605
|
/**
|
|
@@ -2489,7 +2621,7 @@ declare module "factorio:runtime" {
|
|
|
2489
2621
|
}
|
|
2490
2622
|
/**
|
|
2491
2623
|
* Called when the display resolution changes for a given player.
|
|
2492
|
-
* @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}
|
|
2493
2625
|
*/
|
|
2494
2626
|
interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
|
2495
2627
|
/**
|
|
@@ -2511,7 +2643,7 @@ declare module "factorio:runtime" {
|
|
|
2511
2643
|
}
|
|
2512
2644
|
/**
|
|
2513
2645
|
* Called when the display scale changes for a given player.
|
|
2514
|
-
* @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}
|
|
2515
2647
|
*/
|
|
2516
2648
|
interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
|
2517
2649
|
/**
|
|
@@ -2535,7 +2667,7 @@ declare module "factorio:runtime" {
|
|
|
2535
2667
|
* Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
|
|
2536
2668
|
*
|
|
2537
2669
|
* This event is not raised when the player is ejected from a vehicle due to it being destroyed.
|
|
2538
|
-
* @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}
|
|
2539
2671
|
*/
|
|
2540
2672
|
interface OnPlayerDrivingChangedStateEvent extends EventData {
|
|
2541
2673
|
readonly player_index: PlayerIndex
|
|
@@ -2554,7 +2686,7 @@ declare module "factorio:runtime" {
|
|
|
2554
2686
|
}
|
|
2555
2687
|
/**
|
|
2556
2688
|
* Called when a player drops an item on the ground.
|
|
2557
|
-
* @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}
|
|
2558
2690
|
*/
|
|
2559
2691
|
interface OnPlayerDroppedItemEvent extends EventData {
|
|
2560
2692
|
readonly player_index: PlayerIndex
|
|
@@ -2573,7 +2705,7 @@ declare module "factorio:runtime" {
|
|
|
2573
2705
|
}
|
|
2574
2706
|
/**
|
|
2575
2707
|
* Called when a player drops a single item into an entity.
|
|
2576
|
-
* @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}
|
|
2577
2709
|
*/
|
|
2578
2710
|
interface OnPlayerDroppedItemIntoEntityEvent extends EventData {
|
|
2579
2711
|
readonly player_index: PlayerIndex
|
|
@@ -2592,7 +2724,7 @@ declare module "factorio:runtime" {
|
|
|
2592
2724
|
}
|
|
2593
2725
|
/**
|
|
2594
2726
|
* Called when a player fast-transfers something to or from an entity.
|
|
2595
|
-
* @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}
|
|
2596
2728
|
*/
|
|
2597
2729
|
interface OnPlayerFastTransferredEvent extends EventData {
|
|
2598
2730
|
/**
|
|
@@ -2624,7 +2756,7 @@ declare module "factorio:runtime" {
|
|
|
2624
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.
|
|
2625
2757
|
*
|
|
2626
2758
|
* This event reflects a change in the {@link LuaEntity#mirroring LuaEntity::mirroring} property.
|
|
2627
|
-
* @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}
|
|
2628
2760
|
*/
|
|
2629
2761
|
interface OnPlayerFlippedEntityEvent extends EventData {
|
|
2630
2762
|
/**
|
|
@@ -2647,7 +2779,7 @@ declare module "factorio:runtime" {
|
|
|
2647
2779
|
}
|
|
2648
2780
|
/**
|
|
2649
2781
|
* Called after player flushed fluid
|
|
2650
|
-
* @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}
|
|
2651
2783
|
*/
|
|
2652
2784
|
interface OnPlayerFlushedFluidEvent extends EventData {
|
|
2653
2785
|
/**
|
|
@@ -2681,7 +2813,7 @@ declare module "factorio:runtime" {
|
|
|
2681
2813
|
}
|
|
2682
2814
|
/**
|
|
2683
2815
|
* Called after a players gun inventory changed in some way.
|
|
2684
|
-
* @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}
|
|
2685
2817
|
*/
|
|
2686
2818
|
interface OnPlayerGunInventoryChangedEvent extends EventData {
|
|
2687
2819
|
readonly player_index: PlayerIndex
|
|
@@ -2696,7 +2828,7 @@ declare module "factorio:runtime" {
|
|
|
2696
2828
|
}
|
|
2697
2829
|
/**
|
|
2698
2830
|
* Called when a player's input method changes. See {@link LuaPlayer#input_method LuaPlayer::input_method}.
|
|
2699
|
-
* @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}
|
|
2700
2832
|
*/
|
|
2701
2833
|
interface OnPlayerInputMethodChangedEvent extends EventData {
|
|
2702
2834
|
/**
|
|
@@ -2714,7 +2846,7 @@ declare module "factorio:runtime" {
|
|
|
2714
2846
|
}
|
|
2715
2847
|
/**
|
|
2716
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.
|
|
2717
|
-
* @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}
|
|
2718
2850
|
*/
|
|
2719
2851
|
interface OnPlayerJoinedGameEvent extends EventData {
|
|
2720
2852
|
readonly player_index: PlayerIndex
|
|
@@ -2729,7 +2861,7 @@ declare module "factorio:runtime" {
|
|
|
2729
2861
|
}
|
|
2730
2862
|
/**
|
|
2731
2863
|
* Called when a player is kicked.
|
|
2732
|
-
* @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}
|
|
2733
2865
|
*/
|
|
2734
2866
|
interface OnPlayerKickedEvent extends EventData {
|
|
2735
2867
|
/**
|
|
@@ -2755,7 +2887,7 @@ declare module "factorio:runtime" {
|
|
|
2755
2887
|
}
|
|
2756
2888
|
/**
|
|
2757
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.
|
|
2758
|
-
* @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}
|
|
2759
2891
|
*/
|
|
2760
2892
|
interface OnPlayerLeftGameEvent extends EventData {
|
|
2761
2893
|
readonly player_index: PlayerIndex
|
|
@@ -2771,7 +2903,7 @@ declare module "factorio:runtime" {
|
|
|
2771
2903
|
}
|
|
2772
2904
|
/**
|
|
2773
2905
|
* Called when a player's active locale changes. See {@link LuaPlayer#locale LuaPlayer::locale}.
|
|
2774
|
-
* @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}
|
|
2775
2907
|
*/
|
|
2776
2908
|
interface OnPlayerLocaleChangedEvent extends EventData {
|
|
2777
2909
|
/**
|
|
@@ -2793,7 +2925,7 @@ declare module "factorio:runtime" {
|
|
|
2793
2925
|
}
|
|
2794
2926
|
/**
|
|
2795
2927
|
* Called after a players main inventory changed in some way.
|
|
2796
|
-
* @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}
|
|
2797
2929
|
*/
|
|
2798
2930
|
interface OnPlayerMainInventoryChangedEvent extends EventData {
|
|
2799
2931
|
readonly player_index: PlayerIndex
|
|
@@ -2814,7 +2946,7 @@ declare module "factorio:runtime" {
|
|
|
2814
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.
|
|
2815
2947
|
*
|
|
2816
2948
|
* Event filter: [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter]
|
|
2817
|
-
* @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}
|
|
2818
2950
|
*/
|
|
2819
2951
|
interface OnPlayerMinedEntityEvent extends EventData {
|
|
2820
2952
|
/**
|
|
@@ -2840,7 +2972,7 @@ declare module "factorio:runtime" {
|
|
|
2840
2972
|
}
|
|
2841
2973
|
/**
|
|
2842
2974
|
* Called when the player mines something.
|
|
2843
|
-
* @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}
|
|
2844
2976
|
*/
|
|
2845
2977
|
interface OnPlayerMinedItemEvent extends EventData {
|
|
2846
2978
|
/**
|
|
@@ -2859,7 +2991,7 @@ declare module "factorio:runtime" {
|
|
|
2859
2991
|
}
|
|
2860
2992
|
/**
|
|
2861
2993
|
* Called after a player mines tiles.
|
|
2862
|
-
* @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}
|
|
2863
2995
|
*/
|
|
2864
2996
|
interface OnPlayerMinedTileEvent extends EventData {
|
|
2865
2997
|
readonly player_index: PlayerIndex
|
|
@@ -2882,7 +3014,7 @@ declare module "factorio:runtime" {
|
|
|
2882
3014
|
}
|
|
2883
3015
|
/**
|
|
2884
3016
|
* Called when a player's current music track (ambient sound) changes. This includes when the music track finishes playing.
|
|
2885
|
-
* @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}
|
|
2886
3018
|
*/
|
|
2887
3019
|
interface OnPlayerMusicChangedEvent extends EventData {
|
|
2888
3020
|
/**
|
|
@@ -2900,7 +3032,7 @@ declare module "factorio:runtime" {
|
|
|
2900
3032
|
}
|
|
2901
3033
|
/**
|
|
2902
3034
|
* Called when a player is muted.
|
|
2903
|
-
* @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}
|
|
2904
3036
|
*/
|
|
2905
3037
|
interface OnPlayerMutedEvent extends EventData {
|
|
2906
3038
|
/**
|
|
@@ -2918,7 +3050,7 @@ declare module "factorio:runtime" {
|
|
|
2918
3050
|
}
|
|
2919
3051
|
/**
|
|
2920
3052
|
* Called when a player invokes the "smart pipette" over an entity.
|
|
2921
|
-
* @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}
|
|
2922
3054
|
*/
|
|
2923
3055
|
interface OnPlayerPipetteEvent extends EventData {
|
|
2924
3056
|
/**
|
|
@@ -2948,7 +3080,7 @@ declare module "factorio:runtime" {
|
|
|
2948
3080
|
}
|
|
2949
3081
|
/**
|
|
2950
3082
|
* Called after the player puts equipment in an equipment grid
|
|
2951
|
-
* @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}
|
|
2952
3084
|
*/
|
|
2953
3085
|
interface OnPlayerPlacedEquipmentEvent extends EventData {
|
|
2954
3086
|
readonly player_index: PlayerIndex
|
|
@@ -2971,7 +3103,7 @@ declare module "factorio:runtime" {
|
|
|
2971
3103
|
}
|
|
2972
3104
|
/**
|
|
2973
3105
|
* Called when a player is promoted.
|
|
2974
|
-
* @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}
|
|
2975
3107
|
*/
|
|
2976
3108
|
interface OnPlayerPromotedEvent extends EventData {
|
|
2977
3109
|
/**
|
|
@@ -2989,7 +3121,7 @@ declare module "factorio:runtime" {
|
|
|
2989
3121
|
}
|
|
2990
3122
|
/**
|
|
2991
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.
|
|
2992
|
-
* @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}
|
|
2993
3125
|
*/
|
|
2994
3126
|
interface OnPlayerRemovedEvent extends EventData {
|
|
2995
3127
|
/**
|
|
@@ -3007,7 +3139,7 @@ declare module "factorio:runtime" {
|
|
|
3007
3139
|
}
|
|
3008
3140
|
/**
|
|
3009
3141
|
* Called after the player removes equipment from an equipment grid
|
|
3010
|
-
* @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}
|
|
3011
3143
|
*/
|
|
3012
3144
|
interface OnPlayerRemovedEquipmentEvent extends EventData {
|
|
3013
3145
|
readonly player_index: PlayerIndex
|
|
@@ -3040,7 +3172,7 @@ declare module "factorio:runtime" {
|
|
|
3040
3172
|
* Called when a player repairs an entity.
|
|
3041
3173
|
*
|
|
3042
3174
|
* Event filter: [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter]
|
|
3043
|
-
* @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}
|
|
3044
3176
|
*/
|
|
3045
3177
|
interface OnPlayerRepairedEntityEvent extends EventData {
|
|
3046
3178
|
readonly player_index: PlayerIndex
|
|
@@ -3056,7 +3188,7 @@ declare module "factorio:runtime" {
|
|
|
3056
3188
|
}
|
|
3057
3189
|
/**
|
|
3058
3190
|
* Called after a player respawns.
|
|
3059
|
-
* @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}
|
|
3060
3192
|
*/
|
|
3061
3193
|
interface OnPlayerRespawnedEvent extends EventData {
|
|
3062
3194
|
readonly player_index: PlayerIndex
|
|
@@ -3075,7 +3207,7 @@ declare module "factorio:runtime" {
|
|
|
3075
3207
|
}
|
|
3076
3208
|
/**
|
|
3077
3209
|
* Called after a player reverse-selects an area with a selection-tool item.
|
|
3078
|
-
* @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}
|
|
3079
3211
|
*/
|
|
3080
3212
|
interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
|
3081
3213
|
/**
|
|
@@ -3090,6 +3222,14 @@ declare module "factorio:runtime" {
|
|
|
3090
3222
|
* The area selected.
|
|
3091
3223
|
*/
|
|
3092
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
|
|
3093
3233
|
/**
|
|
3094
3234
|
* The item used to select the area.
|
|
3095
3235
|
*/
|
|
@@ -3102,6 +3242,7 @@ declare module "factorio:runtime" {
|
|
|
3102
3242
|
* The tiles selected.
|
|
3103
3243
|
*/
|
|
3104
3244
|
readonly tiles: LuaTile[]
|
|
3245
|
+
readonly selection_mode: defines.selection_mode
|
|
3105
3246
|
/**
|
|
3106
3247
|
* Identifier of the event.
|
|
3107
3248
|
*/
|
|
@@ -3115,7 +3256,7 @@ declare module "factorio:runtime" {
|
|
|
3115
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.
|
|
3116
3257
|
*
|
|
3117
3258
|
* Entities being flipped will not fire this event, even if the flip involves rotating. See {@link OnPlayerFlippedEntityEvent on_player_flipped_entity}.
|
|
3118
|
-
* @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}
|
|
3119
3260
|
*/
|
|
3120
3261
|
interface OnPlayerRotatedEntityEvent extends EventData {
|
|
3121
3262
|
/**
|
|
@@ -3139,7 +3280,7 @@ declare module "factorio:runtime" {
|
|
|
3139
3280
|
}
|
|
3140
3281
|
/**
|
|
3141
3282
|
* Called after a player selects an area with a selection-tool item.
|
|
3142
|
-
* @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}
|
|
3143
3284
|
*/
|
|
3144
3285
|
interface OnPlayerSelectedAreaEvent extends EventData {
|
|
3145
3286
|
/**
|
|
@@ -3154,6 +3295,14 @@ declare module "factorio:runtime" {
|
|
|
3154
3295
|
* The area selected.
|
|
3155
3296
|
*/
|
|
3156
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
|
|
3157
3306
|
/**
|
|
3158
3307
|
* The item used to select the area.
|
|
3159
3308
|
*/
|
|
@@ -3170,6 +3319,7 @@ declare module "factorio:runtime" {
|
|
|
3170
3319
|
* The tiles selected.
|
|
3171
3320
|
*/
|
|
3172
3321
|
readonly tiles: LuaTile[]
|
|
3322
|
+
readonly selection_mode: defines.selection_mode
|
|
3173
3323
|
/**
|
|
3174
3324
|
* Identifier of the event.
|
|
3175
3325
|
*/
|
|
@@ -3181,7 +3331,7 @@ declare module "factorio:runtime" {
|
|
|
3181
3331
|
}
|
|
3182
3332
|
/**
|
|
3183
3333
|
* Called when a player sets a quickbar slot to anything (new value, or set to empty).
|
|
3184
|
-
* @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}
|
|
3185
3335
|
*/
|
|
3186
3336
|
interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
|
3187
3337
|
readonly player_index: PlayerIndex
|
|
@@ -3196,7 +3346,7 @@ declare module "factorio:runtime" {
|
|
|
3196
3346
|
}
|
|
3197
3347
|
/**
|
|
3198
3348
|
* Called when a player selects an area with a blueprint.
|
|
3199
|
-
* @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}
|
|
3200
3350
|
*/
|
|
3201
3351
|
interface OnPlayerSetupBlueprintEvent extends EventData {
|
|
3202
3352
|
/**
|
|
@@ -3211,6 +3361,14 @@ declare module "factorio:runtime" {
|
|
|
3211
3361
|
* The area selected.
|
|
3212
3362
|
*/
|
|
3213
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
|
|
3214
3372
|
/**
|
|
3215
3373
|
* The item used to select the area.
|
|
3216
3374
|
*/
|
|
@@ -3244,9 +3402,62 @@ declare module "factorio:runtime" {
|
|
|
3244
3402
|
*/
|
|
3245
3403
|
readonly tick: MapTick
|
|
3246
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
|
+
}
|
|
3247
3458
|
/**
|
|
3248
3459
|
* Called after a player super-forced-selects an area with a selection-tool item.
|
|
3249
|
-
* @see {@link https://lua-api.factorio.com/2.1.
|
|
3460
|
+
* @see {@link https://lua-api.factorio.com/2.1.22/events.html#on_player_super_forced_selected_area Online documentation}
|
|
3250
3461
|
*/
|
|
3251
3462
|
interface OnPlayerSuperForcedSelectedAreaEvent extends EventData {
|
|
3252
3463
|
/**
|
|
@@ -3261,6 +3472,14 @@ declare module "factorio:runtime" {
|
|
|
3261
3472
|
* The area selected.
|
|
3262
3473
|
*/
|
|
3263
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
|
|
3264
3483
|
/**
|
|
3265
3484
|
* The item used to select the area.
|
|
3266
3485
|
*/
|
|
@@ -3277,6 +3496,7 @@ declare module "factorio:runtime" {
|
|
|
3277
3496
|
* The tiles selected.
|
|
3278
3497
|
*/
|
|
3279
3498
|
readonly tiles: LuaTile[]
|
|
3499
|
+
readonly selection_mode: defines.selection_mode
|
|
3280
3500
|
/**
|
|
3281
3501
|
* Identifier of the event.
|
|
3282
3502
|
*/
|
|
@@ -3288,7 +3508,7 @@ declare module "factorio:runtime" {
|
|
|
3288
3508
|
}
|
|
3289
3509
|
/**
|
|
3290
3510
|
* Called when a player toggles alt mode, also known as "show entity info".
|
|
3291
|
-
* @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}
|
|
3292
3512
|
*/
|
|
3293
3513
|
interface OnPlayerToggledAltModeEvent extends EventData {
|
|
3294
3514
|
readonly player_index: PlayerIndex
|
|
@@ -3307,7 +3527,7 @@ declare module "factorio:runtime" {
|
|
|
3307
3527
|
}
|
|
3308
3528
|
/**
|
|
3309
3529
|
* Called when a player toggles the map editor on or off.
|
|
3310
|
-
* @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}
|
|
3311
3531
|
*/
|
|
3312
3532
|
interface OnPlayerToggledMapEditorEvent extends EventData {
|
|
3313
3533
|
readonly player_index: PlayerIndex
|
|
@@ -3322,7 +3542,7 @@ declare module "factorio:runtime" {
|
|
|
3322
3542
|
}
|
|
3323
3543
|
/**
|
|
3324
3544
|
* Called after a players trash inventory changed in some way.
|
|
3325
|
-
* @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}
|
|
3326
3546
|
*/
|
|
3327
3547
|
interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
|
3328
3548
|
readonly player_index: PlayerIndex
|
|
@@ -3337,7 +3557,7 @@ declare module "factorio:runtime" {
|
|
|
3337
3557
|
}
|
|
3338
3558
|
/**
|
|
3339
3559
|
* Called when a player is un-banned.
|
|
3340
|
-
* @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}
|
|
3341
3561
|
*/
|
|
3342
3562
|
interface OnPlayerUnbannedEvent extends EventData {
|
|
3343
3563
|
/**
|
|
@@ -3367,7 +3587,7 @@ declare module "factorio:runtime" {
|
|
|
3367
3587
|
}
|
|
3368
3588
|
/**
|
|
3369
3589
|
* Called when a player is unmuted.
|
|
3370
|
-
* @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}
|
|
3371
3591
|
*/
|
|
3372
3592
|
interface OnPlayerUnmutedEvent extends EventData {
|
|
3373
3593
|
/**
|
|
@@ -3385,7 +3605,7 @@ declare module "factorio:runtime" {
|
|
|
3385
3605
|
}
|
|
3386
3606
|
/**
|
|
3387
3607
|
* Called when a player uses a capsule that results in some game action.
|
|
3388
|
-
* @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}
|
|
3389
3609
|
*/
|
|
3390
3610
|
interface OnPlayerUsedCapsuleEvent extends EventData {
|
|
3391
3611
|
/**
|
|
@@ -3415,7 +3635,7 @@ declare module "factorio:runtime" {
|
|
|
3415
3635
|
}
|
|
3416
3636
|
/**
|
|
3417
3637
|
* Called when a player uses spidertron remote to send all selected units to a given position
|
|
3418
|
-
* @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}
|
|
3419
3639
|
*/
|
|
3420
3640
|
interface OnPlayerUsedSpidertronRemoteEvent extends EventData {
|
|
3421
3641
|
/**
|
|
@@ -3439,7 +3659,7 @@ declare module "factorio:runtime" {
|
|
|
3439
3659
|
* Called after an entity dies.
|
|
3440
3660
|
*
|
|
3441
3661
|
* Event filter: [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter]
|
|
3442
|
-
* @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}
|
|
3443
3663
|
*/
|
|
3444
3664
|
interface OnPostEntityDiedEvent extends EventData {
|
|
3445
3665
|
/**
|
|
@@ -3491,7 +3711,7 @@ declare module "factorio:runtime" {
|
|
|
3491
3711
|
* Called after a segmented unit dies.
|
|
3492
3712
|
*
|
|
3493
3713
|
* Event filter: [LuaPostSegmentedUnitDiedEventFilter](LuaPostSegmentedUnitDiedEventFilter]
|
|
3494
|
-
* @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}
|
|
3495
3715
|
*/
|
|
3496
3716
|
interface OnPostSegmentedUnitDiedEvent extends EventData {
|
|
3497
3717
|
/**
|
|
@@ -3533,7 +3753,7 @@ declare module "factorio:runtime" {
|
|
|
3533
3753
|
}
|
|
3534
3754
|
/**
|
|
3535
3755
|
* Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
|
|
3536
|
-
* @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}
|
|
3537
3757
|
*/
|
|
3538
3758
|
interface OnPreBuildEvent extends EventData {
|
|
3539
3759
|
/**
|
|
@@ -3579,7 +3799,7 @@ declare module "factorio:runtime" {
|
|
|
3579
3799
|
}
|
|
3580
3800
|
/**
|
|
3581
3801
|
* Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
|
3582
|
-
* @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}
|
|
3583
3803
|
*/
|
|
3584
3804
|
interface OnPreChunkDeletedEvent extends EventData {
|
|
3585
3805
|
readonly surface_index: SurfaceIndex
|
|
@@ -3598,7 +3818,7 @@ declare module "factorio:runtime" {
|
|
|
3598
3818
|
}
|
|
3599
3819
|
/**
|
|
3600
3820
|
* Called before entity copy-paste is done.
|
|
3601
|
-
* @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}
|
|
3602
3822
|
*/
|
|
3603
3823
|
interface OnPreEntitySettingsPastedEvent extends EventData {
|
|
3604
3824
|
readonly player_index: PlayerIndex
|
|
@@ -3625,7 +3845,7 @@ declare module "factorio:runtime" {
|
|
|
3625
3845
|
* Also called for item request proxies before they are destroyed as a result of being marked for deconstruction.
|
|
3626
3846
|
*
|
|
3627
3847
|
* Event filter: [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter]
|
|
3628
|
-
* @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}
|
|
3629
3849
|
*/
|
|
3630
3850
|
interface OnPreGhostDeconstructedEvent extends EventData {
|
|
3631
3851
|
/**
|
|
@@ -3646,7 +3866,7 @@ declare module "factorio:runtime" {
|
|
|
3646
3866
|
* Called before a ghost entity is upgraded.
|
|
3647
3867
|
*
|
|
3648
3868
|
* Event filter: [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter]
|
|
3649
|
-
* @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}
|
|
3650
3870
|
*/
|
|
3651
3871
|
interface OnPreGhostUpgradedEvent extends EventData {
|
|
3652
3872
|
/**
|
|
@@ -3667,7 +3887,7 @@ declare module "factorio:runtime" {
|
|
|
3667
3887
|
}
|
|
3668
3888
|
/**
|
|
3669
3889
|
* Called directly before a permission group is deleted.
|
|
3670
|
-
* @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}
|
|
3671
3891
|
*/
|
|
3672
3892
|
interface OnPrePermissionGroupDeletedEvent extends EventData {
|
|
3673
3893
|
/**
|
|
@@ -3689,7 +3909,7 @@ declare module "factorio:runtime" {
|
|
|
3689
3909
|
}
|
|
3690
3910
|
/**
|
|
3691
3911
|
* Called directly before a permission string is imported.
|
|
3692
|
-
* @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}
|
|
3693
3913
|
*/
|
|
3694
3914
|
interface OnPrePermissionStringImportedEvent extends EventData {
|
|
3695
3915
|
/**
|
|
@@ -3707,7 +3927,7 @@ declare module "factorio:runtime" {
|
|
|
3707
3927
|
}
|
|
3708
3928
|
/**
|
|
3709
3929
|
* Called when a player queues something to be crafted.
|
|
3710
|
-
* @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}
|
|
3711
3931
|
*/
|
|
3712
3932
|
interface OnPrePlayerCraftedItemEvent extends EventData {
|
|
3713
3933
|
/**
|
|
@@ -3737,7 +3957,7 @@ declare module "factorio:runtime" {
|
|
|
3737
3957
|
}
|
|
3738
3958
|
/**
|
|
3739
3959
|
* Called before a players dies.
|
|
3740
|
-
* @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}
|
|
3741
3961
|
*/
|
|
3742
3962
|
interface OnPrePlayerDiedEvent extends EventData {
|
|
3743
3963
|
readonly player_index: PlayerIndex
|
|
@@ -3753,7 +3973,7 @@ declare module "factorio:runtime" {
|
|
|
3753
3973
|
}
|
|
3754
3974
|
/**
|
|
3755
3975
|
* Called before a player leaves the game.
|
|
3756
|
-
* @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}
|
|
3757
3977
|
*/
|
|
3758
3978
|
interface OnPrePlayerLeftGameEvent extends EventData {
|
|
3759
3979
|
readonly player_index: PlayerIndex
|
|
@@ -3771,7 +3991,7 @@ declare module "factorio:runtime" {
|
|
|
3771
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.
|
|
3772
3992
|
*
|
|
3773
3993
|
* Event filter: [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter]
|
|
3774
|
-
* @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}
|
|
3775
3995
|
*/
|
|
3776
3996
|
interface OnPrePlayerMinedItemEvent extends EventData {
|
|
3777
3997
|
/**
|
|
@@ -3790,7 +4010,7 @@ declare module "factorio:runtime" {
|
|
|
3790
4010
|
}
|
|
3791
4011
|
/**
|
|
3792
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.
|
|
3793
|
-
* @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}
|
|
3794
4014
|
*/
|
|
3795
4015
|
interface OnPrePlayerRemovedEvent extends EventData {
|
|
3796
4016
|
/**
|
|
@@ -3808,7 +4028,7 @@ declare module "factorio:runtime" {
|
|
|
3808
4028
|
}
|
|
3809
4029
|
/**
|
|
3810
4030
|
* Called before a player toggles the map editor on or off.
|
|
3811
|
-
* @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}
|
|
3812
4032
|
*/
|
|
3813
4033
|
interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
|
3814
4034
|
readonly player_index: PlayerIndex
|
|
@@ -3823,7 +4043,7 @@ declare module "factorio:runtime" {
|
|
|
3823
4043
|
}
|
|
3824
4044
|
/**
|
|
3825
4045
|
* Called directly before a robot explodes cliffs.
|
|
3826
|
-
* @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}
|
|
3827
4047
|
*/
|
|
3828
4048
|
interface OnPreRobotExplodedCliffEvent extends EventData {
|
|
3829
4049
|
readonly robot: LuaEntity
|
|
@@ -3847,7 +4067,7 @@ declare module "factorio:runtime" {
|
|
|
3847
4067
|
}
|
|
3848
4068
|
/**
|
|
3849
4069
|
* Called just before the scenario finishes.
|
|
3850
|
-
* @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}
|
|
3851
4071
|
*/
|
|
3852
4072
|
interface OnPreScenarioFinishedEvent extends EventData {
|
|
3853
4073
|
/**
|
|
@@ -3865,7 +4085,7 @@ declare module "factorio:runtime" {
|
|
|
3865
4085
|
}
|
|
3866
4086
|
/**
|
|
3867
4087
|
* Called just before a script inventory is resized.
|
|
3868
|
-
* @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}
|
|
3869
4089
|
*/
|
|
3870
4090
|
interface OnPreScriptInventoryResizedEvent extends EventData {
|
|
3871
4091
|
/**
|
|
@@ -3896,7 +4116,7 @@ declare module "factorio:runtime" {
|
|
|
3896
4116
|
}
|
|
3897
4117
|
/**
|
|
3898
4118
|
* Called just before a surface is cleared (all entities removed and all chunks deleted).
|
|
3899
|
-
* @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}
|
|
3900
4120
|
*/
|
|
3901
4121
|
interface OnPreSurfaceClearedEvent extends EventData {
|
|
3902
4122
|
readonly surface_index: SurfaceIndex
|
|
@@ -3911,7 +4131,7 @@ declare module "factorio:runtime" {
|
|
|
3911
4131
|
}
|
|
3912
4132
|
/**
|
|
3913
4133
|
* Called just before a surface is deleted.
|
|
3914
|
-
* @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}
|
|
3915
4135
|
*/
|
|
3916
4136
|
interface OnPreSurfaceDeletedEvent extends EventData {
|
|
3917
4137
|
readonly surface_index: SurfaceIndex
|
|
@@ -3926,7 +4146,7 @@ declare module "factorio:runtime" {
|
|
|
3926
4146
|
}
|
|
3927
4147
|
/**
|
|
3928
4148
|
* Called when the player triggers "redo".
|
|
3929
|
-
* @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}
|
|
3930
4150
|
*/
|
|
3931
4151
|
interface OnRedoAppliedEvent extends EventData {
|
|
3932
4152
|
/**
|
|
@@ -3948,7 +4168,7 @@ declare module "factorio:runtime" {
|
|
|
3948
4168
|
}
|
|
3949
4169
|
/**
|
|
3950
4170
|
* Called when research is cancelled.
|
|
3951
|
-
* @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}
|
|
3952
4172
|
*/
|
|
3953
4173
|
interface OnResearchCancelledEvent extends EventData {
|
|
3954
4174
|
/**
|
|
@@ -3974,7 +4194,7 @@ declare module "factorio:runtime" {
|
|
|
3974
4194
|
}
|
|
3975
4195
|
/**
|
|
3976
4196
|
* Called when a research finishes.
|
|
3977
|
-
* @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}
|
|
3978
4198
|
*/
|
|
3979
4199
|
interface OnResearchFinishedEvent extends EventData {
|
|
3980
4200
|
/**
|
|
@@ -3996,7 +4216,7 @@ declare module "factorio:runtime" {
|
|
|
3996
4216
|
}
|
|
3997
4217
|
/**
|
|
3998
4218
|
* Called when research is moved forwards or backwards in the research queue.
|
|
3999
|
-
* @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}
|
|
4000
4220
|
*/
|
|
4001
4221
|
interface OnResearchMovedEvent extends EventData {
|
|
4002
4222
|
/**
|
|
@@ -4018,7 +4238,7 @@ declare module "factorio:runtime" {
|
|
|
4018
4238
|
}
|
|
4019
4239
|
/**
|
|
4020
4240
|
* Called when research is queued.
|
|
4021
|
-
* @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}
|
|
4022
4242
|
*/
|
|
4023
4243
|
interface OnResearchQueuedEvent extends EventData {
|
|
4024
4244
|
/**
|
|
@@ -4044,7 +4264,7 @@ declare module "factorio:runtime" {
|
|
|
4044
4264
|
}
|
|
4045
4265
|
/**
|
|
4046
4266
|
* Called when a research is reversed (unresearched).
|
|
4047
|
-
* @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}
|
|
4048
4268
|
*/
|
|
4049
4269
|
interface OnResearchReversedEvent extends EventData {
|
|
4050
4270
|
/**
|
|
@@ -4066,7 +4286,7 @@ declare module "factorio:runtime" {
|
|
|
4066
4286
|
}
|
|
4067
4287
|
/**
|
|
4068
4288
|
* Called when a technology research starts.
|
|
4069
|
-
* @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}
|
|
4070
4290
|
*/
|
|
4071
4291
|
interface OnResearchStartedEvent extends EventData {
|
|
4072
4292
|
/**
|
|
@@ -4085,7 +4305,7 @@ declare module "factorio:runtime" {
|
|
|
4085
4305
|
}
|
|
4086
4306
|
/**
|
|
4087
4307
|
* Called when a resource entity reaches 0 or its minimum yield for infinite resources.
|
|
4088
|
-
* @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}
|
|
4089
4309
|
*/
|
|
4090
4310
|
interface OnResourceDepletedEvent extends EventData {
|
|
4091
4311
|
readonly entity: LuaEntity
|
|
@@ -4102,7 +4322,7 @@ declare module "factorio:runtime" {
|
|
|
4102
4322
|
* Called when a construction robot builds an entity.
|
|
4103
4323
|
*
|
|
4104
4324
|
* Event filter: [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter]
|
|
4105
|
-
* @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}
|
|
4106
4326
|
*/
|
|
4107
4327
|
interface OnRobotBuiltEntityEvent extends EventData {
|
|
4108
4328
|
/**
|
|
@@ -4132,7 +4352,7 @@ declare module "factorio:runtime" {
|
|
|
4132
4352
|
}
|
|
4133
4353
|
/**
|
|
4134
4354
|
* Called after a robot builds tiles.
|
|
4135
|
-
* @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}
|
|
4136
4356
|
*/
|
|
4137
4357
|
interface OnRobotBuiltTileEvent extends EventData {
|
|
4138
4358
|
/**
|
|
@@ -4174,7 +4394,7 @@ declare module "factorio:runtime" {
|
|
|
4174
4394
|
}
|
|
4175
4395
|
/**
|
|
4176
4396
|
* Called directly after a robot explodes cliffs.
|
|
4177
|
-
* @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}
|
|
4178
4398
|
*/
|
|
4179
4399
|
interface OnRobotExplodedCliffEvent extends EventData {
|
|
4180
4400
|
readonly robot: LuaEntity
|
|
@@ -4197,7 +4417,7 @@ declare module "factorio:runtime" {
|
|
|
4197
4417
|
}
|
|
4198
4418
|
/**
|
|
4199
4419
|
* Called when a robot mines an entity.
|
|
4200
|
-
* @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}
|
|
4201
4421
|
*/
|
|
4202
4422
|
interface OnRobotMinedEvent extends EventData {
|
|
4203
4423
|
/**
|
|
@@ -4225,7 +4445,7 @@ declare module "factorio:runtime" {
|
|
|
4225
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.
|
|
4226
4446
|
*
|
|
4227
4447
|
* Event filter: [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter]
|
|
4228
|
-
* @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}
|
|
4229
4449
|
*/
|
|
4230
4450
|
interface OnRobotMinedEntityEvent extends EventData {
|
|
4231
4451
|
/**
|
|
@@ -4251,7 +4471,7 @@ declare module "factorio:runtime" {
|
|
|
4251
4471
|
}
|
|
4252
4472
|
/**
|
|
4253
4473
|
* Called after a robot mines tiles.
|
|
4254
|
-
* @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}
|
|
4255
4475
|
*/
|
|
4256
4476
|
interface OnRobotMinedTileEvent extends EventData {
|
|
4257
4477
|
/**
|
|
@@ -4279,7 +4499,7 @@ declare module "factorio:runtime" {
|
|
|
4279
4499
|
* Called before a robot mines an entity.
|
|
4280
4500
|
*
|
|
4281
4501
|
* Event filter: [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter]
|
|
4282
|
-
* @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}
|
|
4283
4503
|
*/
|
|
4284
4504
|
interface OnRobotPreMinedEvent extends EventData {
|
|
4285
4505
|
/**
|
|
@@ -4301,7 +4521,7 @@ declare module "factorio:runtime" {
|
|
|
4301
4521
|
}
|
|
4302
4522
|
/**
|
|
4303
4523
|
* Called when a rocket silo is ordered to be launched.
|
|
4304
|
-
* @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}
|
|
4305
4525
|
*/
|
|
4306
4526
|
interface OnRocketLaunchOrderedEvent extends EventData {
|
|
4307
4527
|
readonly rocket: LuaEntity
|
|
@@ -4321,7 +4541,7 @@ declare module "factorio:runtime" {
|
|
|
4321
4541
|
}
|
|
4322
4542
|
/**
|
|
4323
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)
|
|
4324
|
-
* @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}
|
|
4325
4545
|
*/
|
|
4326
4546
|
interface OnRocketLaunchedEvent extends EventData {
|
|
4327
4547
|
readonly rocket: LuaEntity
|
|
@@ -4337,7 +4557,7 @@ declare module "factorio:runtime" {
|
|
|
4337
4557
|
}
|
|
4338
4558
|
/**
|
|
4339
4559
|
* Called when a runtime mod setting is changed by a player.
|
|
4340
|
-
* @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}
|
|
4341
4561
|
*/
|
|
4342
4562
|
interface OnRuntimeModSettingChangedEvent extends EventData {
|
|
4343
4563
|
/**
|
|
@@ -4360,7 +4580,7 @@ declare module "factorio:runtime" {
|
|
|
4360
4580
|
}
|
|
4361
4581
|
/**
|
|
4362
4582
|
* Called just after a script inventory is resized.
|
|
4363
|
-
* @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}
|
|
4364
4584
|
*/
|
|
4365
4585
|
interface OnScriptInventoryResizedEvent extends EventData {
|
|
4366
4586
|
/**
|
|
@@ -4395,7 +4615,7 @@ declare module "factorio:runtime" {
|
|
|
4395
4615
|
}
|
|
4396
4616
|
/**
|
|
4397
4617
|
* Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
|
|
4398
|
-
* @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}
|
|
4399
4619
|
*/
|
|
4400
4620
|
interface OnScriptPathRequestFinishedEvent extends EventData {
|
|
4401
4621
|
/**
|
|
@@ -4421,7 +4641,7 @@ declare module "factorio:runtime" {
|
|
|
4421
4641
|
}
|
|
4422
4642
|
/**
|
|
4423
4643
|
* Called when a script trigger effect is triggered.
|
|
4424
|
-
* @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}
|
|
4425
4645
|
*/
|
|
4426
4646
|
interface OnScriptTriggerEffectEvent extends EventData {
|
|
4427
4647
|
/**
|
|
@@ -4454,7 +4674,7 @@ declare module "factorio:runtime" {
|
|
|
4454
4674
|
* Called when an entity of type `radar` finishes scanning a sector.
|
|
4455
4675
|
*
|
|
4456
4676
|
* Event filter: [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter]
|
|
4457
|
-
* @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}
|
|
4458
4678
|
*/
|
|
4459
4679
|
interface OnSectorScannedEvent extends EventData {
|
|
4460
4680
|
/**
|
|
@@ -4480,7 +4700,7 @@ declare module "factorio:runtime" {
|
|
|
4480
4700
|
}
|
|
4481
4701
|
/**
|
|
4482
4702
|
* Called when an individual segment of a SegmentedUnit is created.
|
|
4483
|
-
* @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}
|
|
4484
4704
|
*/
|
|
4485
4705
|
interface OnSegmentEntityCreatedEvent extends EventData {
|
|
4486
4706
|
readonly entity: LuaEntity
|
|
@@ -4497,7 +4717,7 @@ declare module "factorio:runtime" {
|
|
|
4497
4717
|
* Called when a segmented unit is created for any reason.
|
|
4498
4718
|
*
|
|
4499
4719
|
* Event filter: [LuaSegmentedUnitCreatedEventFilter](LuaSegmentedUnitCreatedEventFilter]
|
|
4500
|
-
* @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}
|
|
4501
4721
|
*/
|
|
4502
4722
|
interface OnSegmentedUnitCreatedEvent extends EventData {
|
|
4503
4723
|
/**
|
|
@@ -4525,7 +4745,7 @@ declare module "factorio:runtime" {
|
|
|
4525
4745
|
* Called when a segmented unit is damaged. This is not called when a segmented unit's health is set directly by another mod.
|
|
4526
4746
|
*
|
|
4527
4747
|
* Event filter: [LuaSegmentedUnitDamagedEventFilter](LuaSegmentedUnitDamagedEventFilter]
|
|
4528
|
-
* @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}
|
|
4529
4749
|
*/
|
|
4530
4750
|
interface OnSegmentedUnitDamagedEvent extends EventData {
|
|
4531
4751
|
readonly segmented_unit: LuaSegmentedUnit
|
|
@@ -4567,7 +4787,7 @@ declare module "factorio:runtime" {
|
|
|
4567
4787
|
* Called when a segmented unit dies.
|
|
4568
4788
|
*
|
|
4569
4789
|
* Event filter: [LuaSegmentedUnitDiedEventFilter](LuaSegmentedUnitDiedEventFilter]
|
|
4570
|
-
* @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}
|
|
4571
4791
|
*/
|
|
4572
4792
|
interface OnSegmentedUnitDiedEvent extends EventData {
|
|
4573
4793
|
/**
|
|
@@ -4597,7 +4817,7 @@ declare module "factorio:runtime" {
|
|
|
4597
4817
|
}
|
|
4598
4818
|
/**
|
|
4599
4819
|
* Called after the selected entity changes for a given player.
|
|
4600
|
-
* @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}
|
|
4601
4821
|
*/
|
|
4602
4822
|
interface OnSelectedEntityChangedEvent extends EventData {
|
|
4603
4823
|
/**
|
|
@@ -4619,7 +4839,7 @@ declare module "factorio:runtime" {
|
|
|
4619
4839
|
}
|
|
4620
4840
|
/**
|
|
4621
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.
|
|
4622
|
-
* @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}
|
|
4623
4843
|
*/
|
|
4624
4844
|
interface OnSingleplayerInitEvent extends EventData {
|
|
4625
4845
|
/**
|
|
@@ -4635,7 +4855,7 @@ declare module "factorio:runtime" {
|
|
|
4635
4855
|
* Called when a space platform builds an entity.
|
|
4636
4856
|
*
|
|
4637
4857
|
* Event filter: [LuaPlatformBuiltEntityEventFilter](LuaPlatformBuiltEntityEventFilter]
|
|
4638
|
-
* @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}
|
|
4639
4859
|
*/
|
|
4640
4860
|
interface OnSpacePlatformBuiltEntityEvent extends EventData {
|
|
4641
4861
|
/**
|
|
@@ -4665,7 +4885,7 @@ declare module "factorio:runtime" {
|
|
|
4665
4885
|
}
|
|
4666
4886
|
/**
|
|
4667
4887
|
* Called after a space platform builds tiles.
|
|
4668
|
-
* @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}
|
|
4669
4889
|
*/
|
|
4670
4890
|
interface OnSpacePlatformBuiltTileEvent extends EventData {
|
|
4671
4891
|
/**
|
|
@@ -4707,7 +4927,7 @@ declare module "factorio:runtime" {
|
|
|
4707
4927
|
}
|
|
4708
4928
|
/**
|
|
4709
4929
|
* Called when a space platform changes state
|
|
4710
|
-
* @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}
|
|
4711
4931
|
*/
|
|
4712
4932
|
interface OnSpacePlatformChangedStateEvent extends EventData {
|
|
4713
4933
|
readonly platform: LuaSpacePlatform
|
|
@@ -4729,7 +4949,7 @@ declare module "factorio:runtime" {
|
|
|
4729
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.
|
|
4730
4950
|
*
|
|
4731
4951
|
* Event filter: [LuaPlatformMinedEntityEventFilter](LuaPlatformMinedEntityEventFilter]
|
|
4732
|
-
* @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}
|
|
4733
4953
|
*/
|
|
4734
4954
|
interface OnSpacePlatformMinedEntityEvent extends EventData {
|
|
4735
4955
|
/**
|
|
@@ -4755,7 +4975,7 @@ declare module "factorio:runtime" {
|
|
|
4755
4975
|
}
|
|
4756
4976
|
/**
|
|
4757
4977
|
* Called when a platform mines an entity.
|
|
4758
|
-
* @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}
|
|
4759
4979
|
*/
|
|
4760
4980
|
interface OnSpacePlatformMinedItemEvent extends EventData {
|
|
4761
4981
|
/**
|
|
@@ -4777,7 +4997,7 @@ declare module "factorio:runtime" {
|
|
|
4777
4997
|
}
|
|
4778
4998
|
/**
|
|
4779
4999
|
* Called after a platform mines tiles.
|
|
4780
|
-
* @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}
|
|
4781
5001
|
*/
|
|
4782
5002
|
interface OnSpacePlatformMinedTileEvent extends EventData {
|
|
4783
5003
|
/**
|
|
@@ -4805,7 +5025,7 @@ declare module "factorio:runtime" {
|
|
|
4805
5025
|
* Called before a platform mines an entity.
|
|
4806
5026
|
*
|
|
4807
5027
|
* Event filter: [LuaPrePlatformMinedEntityEventFilter](LuaPrePlatformMinedEntityEventFilter]
|
|
4808
|
-
* @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}
|
|
4809
5029
|
*/
|
|
4810
5030
|
interface OnSpacePlatformPreMinedEvent extends EventData {
|
|
4811
5031
|
/**
|
|
@@ -4827,7 +5047,7 @@ declare module "factorio:runtime" {
|
|
|
4827
5047
|
}
|
|
4828
5048
|
/**
|
|
4829
5049
|
* Called when a spider finishes moving to its autopilot position.
|
|
4830
|
-
* @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}
|
|
4831
5051
|
*/
|
|
4832
5052
|
interface OnSpiderCommandCompletedEvent extends EventData {
|
|
4833
5053
|
/**
|
|
@@ -4845,7 +5065,7 @@ declare module "factorio:runtime" {
|
|
|
4845
5065
|
}
|
|
4846
5066
|
/**
|
|
4847
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.
|
|
4848
|
-
* @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}
|
|
4849
5069
|
*/
|
|
4850
5070
|
interface OnStringTranslatedEvent extends EventData {
|
|
4851
5071
|
/**
|
|
@@ -4879,7 +5099,7 @@ declare module "factorio:runtime" {
|
|
|
4879
5099
|
}
|
|
4880
5100
|
/**
|
|
4881
5101
|
* Called just after a surface is cleared (all entities removed and all chunks deleted).
|
|
4882
|
-
* @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}
|
|
4883
5103
|
*/
|
|
4884
5104
|
interface OnSurfaceClearedEvent extends EventData {
|
|
4885
5105
|
readonly surface_index: SurfaceIndex
|
|
@@ -4896,7 +5116,7 @@ declare module "factorio:runtime" {
|
|
|
4896
5116
|
* Called when a surface is created.
|
|
4897
5117
|
*
|
|
4898
5118
|
* This is not called when the default surface is created as it will always exist.
|
|
4899
|
-
* @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}
|
|
4900
5120
|
*/
|
|
4901
5121
|
interface OnSurfaceCreatedEvent extends EventData {
|
|
4902
5122
|
readonly surface_index: SurfaceIndex
|
|
@@ -4911,7 +5131,7 @@ declare module "factorio:runtime" {
|
|
|
4911
5131
|
}
|
|
4912
5132
|
/**
|
|
4913
5133
|
* Called after a surface is deleted.
|
|
4914
|
-
* @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}
|
|
4915
5135
|
*/
|
|
4916
5136
|
interface OnSurfaceDeletedEvent extends EventData {
|
|
4917
5137
|
readonly surface_index: SurfaceIndex
|
|
@@ -4926,7 +5146,7 @@ declare module "factorio:runtime" {
|
|
|
4926
5146
|
}
|
|
4927
5147
|
/**
|
|
4928
5148
|
* Called after a surface is imported via the map editor.
|
|
4929
|
-
* @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}
|
|
4930
5150
|
*/
|
|
4931
5151
|
interface OnSurfaceImportedEvent extends EventData {
|
|
4932
5152
|
readonly surface_index: SurfaceIndex
|
|
@@ -4945,7 +5165,7 @@ declare module "factorio:runtime" {
|
|
|
4945
5165
|
}
|
|
4946
5166
|
/**
|
|
4947
5167
|
* Called when a surface is renamed.
|
|
4948
|
-
* @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}
|
|
4949
5169
|
*/
|
|
4950
5170
|
interface OnSurfaceRenamedEvent extends EventData {
|
|
4951
5171
|
readonly surface_index: SurfaceIndex
|
|
@@ -4962,7 +5182,7 @@ declare module "factorio:runtime" {
|
|
|
4962
5182
|
}
|
|
4963
5183
|
/**
|
|
4964
5184
|
* Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
|
|
4965
|
-
* @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}
|
|
4966
5186
|
*/
|
|
4967
5187
|
interface OnTechnologyEffectsResetEvent extends EventData {
|
|
4968
5188
|
readonly force: LuaForce
|
|
@@ -4977,7 +5197,7 @@ declare module "factorio:runtime" {
|
|
|
4977
5197
|
}
|
|
4978
5198
|
/**
|
|
4979
5199
|
* Called when a territory is created for any reason.
|
|
4980
|
-
* @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}
|
|
4981
5201
|
*/
|
|
4982
5202
|
interface OnTerritoryCreatedEvent extends EventData {
|
|
4983
5203
|
/**
|
|
@@ -4999,7 +5219,7 @@ declare module "factorio:runtime" {
|
|
|
4999
5219
|
}
|
|
5000
5220
|
/**
|
|
5001
5221
|
* Called when a territory is destroyed from a surface.
|
|
5002
|
-
* @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}
|
|
5003
5223
|
*/
|
|
5004
5224
|
interface OnTerritoryDestroyedEvent extends EventData {
|
|
5005
5225
|
/**
|
|
@@ -5017,7 +5237,7 @@ declare module "factorio:runtime" {
|
|
|
5017
5237
|
}
|
|
5018
5238
|
/**
|
|
5019
5239
|
* It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
|
|
5020
|
-
* @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}
|
|
5021
5241
|
*/
|
|
5022
5242
|
interface OnTickEvent extends EventData {
|
|
5023
5243
|
/**
|
|
@@ -5035,7 +5255,7 @@ declare module "factorio:runtime" {
|
|
|
5035
5255
|
* After this event any items in the buffer will be transferred into the tower as if they came from mining the entity.
|
|
5036
5256
|
*
|
|
5037
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.
|
|
5038
|
-
* @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}
|
|
5039
5259
|
*/
|
|
5040
5260
|
interface OnTowerMinedPlantEvent extends EventData {
|
|
5041
5261
|
/**
|
|
@@ -5061,7 +5281,7 @@ declare module "factorio:runtime" {
|
|
|
5061
5281
|
}
|
|
5062
5282
|
/**
|
|
5063
5283
|
* Called before an agricultural tower plants a seed.
|
|
5064
|
-
* @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}
|
|
5065
5285
|
*/
|
|
5066
5286
|
interface OnTowerPlantedSeedEvent extends EventData {
|
|
5067
5287
|
/**
|
|
@@ -5087,7 +5307,7 @@ declare module "factorio:runtime" {
|
|
|
5087
5307
|
}
|
|
5088
5308
|
/**
|
|
5089
5309
|
* Called before an agricultural tower mines a plant.
|
|
5090
|
-
* @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}
|
|
5091
5311
|
*/
|
|
5092
5312
|
interface OnTowerPreMinedPlantEvent extends EventData {
|
|
5093
5313
|
/**
|
|
@@ -5109,7 +5329,7 @@ declare module "factorio:runtime" {
|
|
|
5109
5329
|
}
|
|
5110
5330
|
/**
|
|
5111
5331
|
* Called when a train changes state (started to stopped and vice versa)
|
|
5112
|
-
* @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}
|
|
5113
5333
|
*/
|
|
5114
5334
|
interface OnTrainChangedStateEvent extends EventData {
|
|
5115
5335
|
readonly train: LuaTrain
|
|
@@ -5125,7 +5345,7 @@ declare module "factorio:runtime" {
|
|
|
5125
5345
|
}
|
|
5126
5346
|
/**
|
|
5127
5347
|
* Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
|
|
5128
|
-
* @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}
|
|
5129
5349
|
*/
|
|
5130
5350
|
interface OnTrainCreatedEvent extends EventData {
|
|
5131
5351
|
readonly train: LuaTrain
|
|
@@ -5148,7 +5368,7 @@ declare module "factorio:runtime" {
|
|
|
5148
5368
|
}
|
|
5149
5369
|
/**
|
|
5150
5370
|
* Called when a trains schedule is changed either by the player or through script.
|
|
5151
|
-
* @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}
|
|
5152
5372
|
*/
|
|
5153
5373
|
interface OnTrainScheduleChangedEvent extends EventData {
|
|
5154
5374
|
readonly train: LuaTrain
|
|
@@ -5167,7 +5387,7 @@ declare module "factorio:runtime" {
|
|
|
5167
5387
|
}
|
|
5168
5388
|
/**
|
|
5169
5389
|
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.
|
|
5170
|
-
* @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}
|
|
5171
5391
|
*/
|
|
5172
5392
|
interface OnTriggerCreatedEntityEvent extends EventData {
|
|
5173
5393
|
readonly entity: LuaEntity
|
|
@@ -5183,7 +5403,7 @@ declare module "factorio:runtime" {
|
|
|
5183
5403
|
}
|
|
5184
5404
|
/**
|
|
5185
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`.
|
|
5186
|
-
* @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}
|
|
5187
5407
|
*/
|
|
5188
5408
|
interface OnTriggerFiredArtilleryEvent extends EventData {
|
|
5189
5409
|
readonly entity: LuaEntity
|
|
@@ -5199,7 +5419,7 @@ declare module "factorio:runtime" {
|
|
|
5199
5419
|
}
|
|
5200
5420
|
/**
|
|
5201
5421
|
* Called when new packets are processed by {@link LuaHelpers#recv_udp LuaHelpers::recv_udp}.
|
|
5202
|
-
* @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}
|
|
5203
5423
|
*/
|
|
5204
5424
|
interface OnUdpPacketReceivedEvent extends EventData {
|
|
5205
5425
|
/**
|
|
@@ -5225,7 +5445,7 @@ declare module "factorio:runtime" {
|
|
|
5225
5445
|
}
|
|
5226
5446
|
/**
|
|
5227
5447
|
* Called when the player triggers "undo".
|
|
5228
|
-
* @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}
|
|
5229
5449
|
*/
|
|
5230
5450
|
interface OnUndoAppliedEvent extends EventData {
|
|
5231
5451
|
/**
|
|
@@ -5247,7 +5467,7 @@ declare module "factorio:runtime" {
|
|
|
5247
5467
|
}
|
|
5248
5468
|
/**
|
|
5249
5469
|
* Called when a unit is added to a unit group.
|
|
5250
|
-
* @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}
|
|
5251
5471
|
*/
|
|
5252
5472
|
interface OnUnitAddedToGroupEvent extends EventData {
|
|
5253
5473
|
readonly unit: LuaEntity
|
|
@@ -5263,7 +5483,7 @@ declare module "factorio:runtime" {
|
|
|
5263
5483
|
}
|
|
5264
5484
|
/**
|
|
5265
5485
|
* Called when a new unit group is created, before any members are added to it.
|
|
5266
|
-
* @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}
|
|
5267
5487
|
*/
|
|
5268
5488
|
interface OnUnitGroupCreatedEvent extends EventData {
|
|
5269
5489
|
readonly group: LuaCommandable
|
|
@@ -5278,7 +5498,7 @@ declare module "factorio:runtime" {
|
|
|
5278
5498
|
}
|
|
5279
5499
|
/**
|
|
5280
5500
|
* Called when a unit group finishes gathering and starts executing its command.
|
|
5281
|
-
* @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}
|
|
5282
5502
|
*/
|
|
5283
5503
|
interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
|
5284
5504
|
readonly group: LuaCommandable
|
|
@@ -5293,7 +5513,7 @@ declare module "factorio:runtime" {
|
|
|
5293
5513
|
}
|
|
5294
5514
|
/**
|
|
5295
5515
|
* Called when a unit is removed from a unit group.
|
|
5296
|
-
* @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}
|
|
5297
5517
|
*/
|
|
5298
5518
|
interface OnUnitRemovedFromGroupEvent extends EventData {
|
|
5299
5519
|
readonly unit: LuaEntity
|
|
@@ -5309,7 +5529,7 @@ declare module "factorio:runtime" {
|
|
|
5309
5529
|
}
|
|
5310
5530
|
/**
|
|
5311
5531
|
* Called when a worker (construction or logistic) robot expires through a lack of energy.
|
|
5312
|
-
* @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}
|
|
5313
5533
|
*/
|
|
5314
5534
|
interface OnWorkerRobotExpiredEvent extends EventData {
|
|
5315
5535
|
readonly robot: LuaEntity
|
|
@@ -5326,7 +5546,7 @@ declare module "factorio:runtime" {
|
|
|
5326
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}.
|
|
5327
5547
|
*
|
|
5328
5548
|
* Event filter: [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter]
|
|
5329
|
-
* @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}
|
|
5330
5550
|
*/
|
|
5331
5551
|
interface ScriptRaisedBuiltEvent extends EventData {
|
|
5332
5552
|
/**
|
|
@@ -5346,7 +5566,7 @@ declare module "factorio:runtime" {
|
|
|
5346
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}.
|
|
5347
5567
|
*
|
|
5348
5568
|
* Event filter: [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter]
|
|
5349
|
-
* @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}
|
|
5350
5570
|
*/
|
|
5351
5571
|
interface ScriptRaisedDestroyEvent extends EventData {
|
|
5352
5572
|
/**
|
|
@@ -5366,7 +5586,7 @@ declare module "factorio:runtime" {
|
|
|
5366
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}.
|
|
5367
5587
|
*
|
|
5368
5588
|
* Event filter: [LuaScriptRaisedDestroySegmentedUnitEventFilter](LuaScriptRaisedDestroySegmentedUnitEventFilter]
|
|
5369
|
-
* @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}
|
|
5370
5590
|
*/
|
|
5371
5591
|
interface ScriptRaisedDestroySegmentedUnitEvent extends EventData {
|
|
5372
5592
|
/**
|
|
@@ -5386,7 +5606,7 @@ declare module "factorio:runtime" {
|
|
|
5386
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}.
|
|
5387
5607
|
*
|
|
5388
5608
|
* Event filter: [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter]
|
|
5389
|
-
* @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}
|
|
5390
5610
|
*/
|
|
5391
5611
|
interface ScriptRaisedReviveEvent extends EventData {
|
|
5392
5612
|
/**
|
|
@@ -5408,7 +5628,7 @@ declare module "factorio:runtime" {
|
|
|
5408
5628
|
}
|
|
5409
5629
|
/**
|
|
5410
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}.
|
|
5411
|
-
* @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}
|
|
5412
5632
|
*/
|
|
5413
5633
|
interface ScriptRaisedSetTilesEvent extends EventData {
|
|
5414
5634
|
/**
|
|
@@ -5432,7 +5652,7 @@ declare module "factorio:runtime" {
|
|
|
5432
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}.
|
|
5433
5653
|
*
|
|
5434
5654
|
* Event filter: [LuaScriptRaisedTeleportedEventFilter](LuaScriptRaisedTeleportedEventFilter]
|
|
5435
|
-
* @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}
|
|
5436
5656
|
*/
|
|
5437
5657
|
interface ScriptRaisedTeleportedEvent extends EventData {
|
|
5438
5658
|
/**
|