typed-factorio 2.14.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +11 -8
- package/common/data-global.d.ts +8 -0
- package/common/types.d.ts +3 -1
- package/package.json +1 -2
- package/prototype/generated/prototypes.d.ts +6818 -4113
- package/prototype/generated/types.d.ts +10656 -6113
- package/runtime/generated/classes.d.ts +11574 -10762
- package/runtime/generated/concepts.d.ts +7516 -5096
- package/runtime/generated/defines.d.ts +832 -250
- package/runtime/generated/events.d.ts +712 -287
- package/runtime/generated/global-functions.d.ts +3 -3
- package/runtime/generated/global-objects.d.ts +23 -11
@@ -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/
|
16
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#CustomInputEvent Online documentation}
|
17
17
|
*/
|
18
18
|
interface CustomInputEvent extends EventData {
|
19
19
|
/**
|
@@ -45,9 +45,28 @@ declare module "factorio:runtime" {
|
|
45
45
|
*/
|
46
46
|
readonly tick: uint
|
47
47
|
}
|
48
|
+
/**
|
49
|
+
* Called when an achievement is gained.
|
50
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_achievement_gained Online documentation}
|
51
|
+
*/
|
52
|
+
interface OnAchievementGainedEvent extends EventData {
|
53
|
+
/**
|
54
|
+
* The player who gained the achievement.
|
55
|
+
*/
|
56
|
+
readonly player_index: PlayerIndex
|
57
|
+
readonly achievement: LuaAchievementPrototype
|
58
|
+
/**
|
59
|
+
* Identifier of the event
|
60
|
+
*/
|
61
|
+
readonly name: typeof defines.events.on_achievement_gained
|
62
|
+
/**
|
63
|
+
* Tick the event was generated.
|
64
|
+
*/
|
65
|
+
readonly tick: uint
|
66
|
+
}
|
48
67
|
/**
|
49
68
|
* Called when a unit/group completes a command.
|
50
|
-
* @see {@link https://lua-api.factorio.com/
|
69
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_ai_command_completed Online documentation}
|
51
70
|
*/
|
52
71
|
interface OnAiCommandCompletedEvent extends EventData {
|
53
72
|
/**
|
@@ -70,7 +89,7 @@ declare module "factorio:runtime" {
|
|
70
89
|
}
|
71
90
|
/**
|
72
91
|
* Called when an area of the map is cloned.
|
73
|
-
* @see {@link https://lua-api.factorio.com/
|
92
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_area_cloned Online documentation}
|
74
93
|
*/
|
75
94
|
interface OnAreaClonedEvent extends EventData {
|
76
95
|
readonly source_surface: LuaSurface
|
@@ -96,7 +115,7 @@ declare module "factorio:runtime" {
|
|
96
115
|
* Called when a biter migration builds a base.
|
97
116
|
*
|
98
117
|
* This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
99
|
-
* @see {@link https://lua-api.factorio.com/
|
118
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_biter_base_built Online documentation}
|
100
119
|
*/
|
101
120
|
interface OnBiterBaseBuiltEvent extends EventData {
|
102
121
|
/**
|
@@ -114,7 +133,7 @@ declare module "factorio:runtime" {
|
|
114
133
|
}
|
115
134
|
/**
|
116
135
|
* Called when a set of positions on the map is cloned.
|
117
|
-
* @see {@link https://lua-api.factorio.com/
|
136
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_brush_cloned Online documentation}
|
118
137
|
*/
|
119
138
|
interface OnBrushClonedEvent extends EventData {
|
120
139
|
readonly source_offset: TilePosition
|
@@ -139,7 +158,7 @@ declare module "factorio:runtime" {
|
|
139
158
|
}
|
140
159
|
/**
|
141
160
|
* Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
|
142
|
-
* @see {@link https://lua-api.factorio.com/
|
161
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_build_base_arrived Online documentation}
|
143
162
|
*/
|
144
163
|
interface OnBuildBaseArrivedEvent extends EventData {
|
145
164
|
/**
|
@@ -149,7 +168,7 @@ declare module "factorio:runtime" {
|
|
149
168
|
/**
|
150
169
|
* The unit group the command was assigned to.
|
151
170
|
*/
|
152
|
-
readonly group?:
|
171
|
+
readonly group?: LuaCommandable
|
153
172
|
/**
|
154
173
|
* Identifier of the event
|
155
174
|
*/
|
@@ -163,16 +182,12 @@ declare module "factorio:runtime" {
|
|
163
182
|
* Called when player builds something.
|
164
183
|
*
|
165
184
|
* Event filter: [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter]
|
166
|
-
* @see {@link https://lua-api.factorio.com/
|
185
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_built_entity Online documentation}
|
167
186
|
*/
|
168
187
|
interface OnBuiltEntityEvent extends EventData {
|
169
|
-
readonly
|
188
|
+
readonly entity: LuaEntity
|
170
189
|
readonly player_index: PlayerIndex
|
171
|
-
readonly
|
172
|
-
/**
|
173
|
-
* The item prototype used to build the entity. Note this won't exist in some situations (built from blueprint, undo, etc).
|
174
|
-
*/
|
175
|
-
readonly item?: LuaItemPrototype
|
190
|
+
readonly consumed_items: LuaInventory
|
176
191
|
/**
|
177
192
|
* The tags associated with this entity if any.
|
178
193
|
*/
|
@@ -190,7 +205,7 @@ declare module "factorio:runtime" {
|
|
190
205
|
* Called when the deconstruction of an entity is canceled.
|
191
206
|
*
|
192
207
|
* Event filter: [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter]
|
193
|
-
* @see {@link https://lua-api.factorio.com/
|
208
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_cancelled_deconstruction Online documentation}
|
194
209
|
*/
|
195
210
|
interface OnCancelledDeconstructionEvent extends EventData {
|
196
211
|
readonly entity: LuaEntity
|
@@ -208,13 +223,13 @@ declare module "factorio:runtime" {
|
|
208
223
|
* Called when the upgrade of an entity is canceled.
|
209
224
|
*
|
210
225
|
* Event filter: [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter]
|
211
|
-
* @see {@link https://lua-api.factorio.com/
|
226
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_cancelled_upgrade Online documentation}
|
212
227
|
*/
|
213
228
|
interface OnCancelledUpgradeEvent extends EventData {
|
214
229
|
readonly entity: LuaEntity
|
215
230
|
readonly player_index?: PlayerIndex
|
216
231
|
readonly target: LuaEntityPrototype
|
217
|
-
readonly
|
232
|
+
readonly quality: LuaQualityPrototype
|
218
233
|
/**
|
219
234
|
* Identifier of the event
|
220
235
|
*/
|
@@ -227,8 +242,8 @@ declare module "factorio:runtime" {
|
|
227
242
|
/**
|
228
243
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
229
244
|
*
|
230
|
-
*
|
231
|
-
* @see {@link https://lua-api.factorio.com/
|
245
|
+
* this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
246
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_character_corpse_expired Online documentation}
|
232
247
|
*/
|
233
248
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
234
249
|
/**
|
@@ -246,7 +261,7 @@ declare module "factorio:runtime" {
|
|
246
261
|
}
|
247
262
|
/**
|
248
263
|
* Called when a chart tag is created.
|
249
|
-
* @see {@link https://lua-api.factorio.com/
|
264
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_chart_tag_added Online documentation}
|
250
265
|
*/
|
251
266
|
interface OnChartTagAddedEvent extends EventData {
|
252
267
|
readonly tag: LuaCustomChartTag
|
@@ -263,15 +278,17 @@ declare module "factorio:runtime" {
|
|
263
278
|
}
|
264
279
|
/**
|
265
280
|
* Called when a chart tag is modified by a player.
|
266
|
-
* @see {@link https://lua-api.factorio.com/
|
281
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_chart_tag_modified Online documentation}
|
267
282
|
*/
|
268
283
|
interface OnChartTagModifiedEvent extends EventData {
|
269
284
|
readonly tag: LuaCustomChartTag
|
270
285
|
readonly player_index?: PlayerIndex
|
271
286
|
readonly force: LuaForce
|
272
287
|
readonly old_text: string
|
273
|
-
readonly old_icon
|
274
|
-
readonly
|
288
|
+
readonly old_icon: SignalID
|
289
|
+
readonly old_position: MapPosition
|
290
|
+
readonly old_surface: LuaSurface
|
291
|
+
readonly old_player_index?: uint
|
275
292
|
/**
|
276
293
|
* Identifier of the event
|
277
294
|
*/
|
@@ -283,7 +300,7 @@ declare module "factorio:runtime" {
|
|
283
300
|
}
|
284
301
|
/**
|
285
302
|
* Called just before a chart tag is deleted.
|
286
|
-
* @see {@link https://lua-api.factorio.com/
|
303
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_chart_tag_removed Online documentation}
|
287
304
|
*/
|
288
305
|
interface OnChartTagRemovedEvent extends EventData {
|
289
306
|
readonly tag: LuaCustomChartTag
|
@@ -300,7 +317,7 @@ declare module "factorio:runtime" {
|
|
300
317
|
}
|
301
318
|
/**
|
302
319
|
* Called when a chunk is charted or re-charted.
|
303
|
-
* @see {@link https://lua-api.factorio.com/
|
320
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_chunk_charted Online documentation}
|
304
321
|
*/
|
305
322
|
interface OnChunkChartedEvent extends EventData {
|
306
323
|
readonly surface_index: SurfaceIndex
|
@@ -321,7 +338,7 @@ declare module "factorio:runtime" {
|
|
321
338
|
}
|
322
339
|
/**
|
323
340
|
* Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
324
|
-
* @see {@link https://lua-api.factorio.com/
|
341
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_chunk_deleted Online documentation}
|
325
342
|
*/
|
326
343
|
interface OnChunkDeletedEvent extends EventData {
|
327
344
|
readonly surface_index: SurfaceIndex
|
@@ -340,7 +357,7 @@ declare module "factorio:runtime" {
|
|
340
357
|
}
|
341
358
|
/**
|
342
359
|
* Called when a chunk is generated.
|
343
|
-
* @see {@link https://lua-api.factorio.com/
|
360
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_chunk_generated Online documentation}
|
344
361
|
*/
|
345
362
|
interface OnChunkGeneratedEvent extends EventData {
|
346
363
|
/**
|
@@ -366,7 +383,7 @@ declare module "factorio:runtime" {
|
|
366
383
|
}
|
367
384
|
/**
|
368
385
|
* Called when a combat robot expires through a lack of energy, or timeout.
|
369
|
-
* @see {@link https://lua-api.factorio.com/
|
386
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_combat_robot_expired Online documentation}
|
370
387
|
*/
|
371
388
|
interface OnCombatRobotExpiredEvent extends EventData {
|
372
389
|
readonly robot: LuaEntity
|
@@ -387,7 +404,7 @@ declare module "factorio:runtime" {
|
|
387
404
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
388
405
|
*
|
389
406
|
* This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
390
|
-
* @see {@link https://lua-api.factorio.com/
|
407
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_console_chat Online documentation}
|
391
408
|
*/
|
392
409
|
interface OnConsoleChatEvent extends EventData {
|
393
410
|
/**
|
@@ -409,7 +426,7 @@ declare module "factorio:runtime" {
|
|
409
426
|
}
|
410
427
|
/**
|
411
428
|
* Called when someone enters a command-like message regardless of it being a valid command.
|
412
|
-
* @see {@link https://lua-api.factorio.com/
|
429
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_console_command Online documentation}
|
413
430
|
*/
|
414
431
|
interface OnConsoleCommandEvent extends EventData {
|
415
432
|
/**
|
@@ -435,7 +452,7 @@ declare module "factorio:runtime" {
|
|
435
452
|
}
|
436
453
|
/**
|
437
454
|
* Called when a cutscene is cancelled by the player or by script.
|
438
|
-
* @see {@link https://lua-api.factorio.com/
|
455
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_cutscene_cancelled Online documentation}
|
439
456
|
*/
|
440
457
|
interface OnCutsceneCancelledEvent extends EventData {
|
441
458
|
/**
|
@@ -453,7 +470,7 @@ declare module "factorio:runtime" {
|
|
453
470
|
}
|
454
471
|
/**
|
455
472
|
* Called when a cutscene finishes naturally (was not cancelled).
|
456
|
-
* @see {@link https://lua-api.factorio.com/
|
473
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_cutscene_finished Online documentation}
|
457
474
|
*/
|
458
475
|
interface OnCutsceneFinishedEvent extends EventData {
|
459
476
|
/**
|
@@ -471,7 +488,7 @@ declare module "factorio:runtime" {
|
|
471
488
|
}
|
472
489
|
/**
|
473
490
|
* Called when a cutscene starts.
|
474
|
-
* @see {@link https://lua-api.factorio.com/
|
491
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_cutscene_started Online documentation}
|
475
492
|
*/
|
476
493
|
interface OnCutsceneStartedEvent extends EventData {
|
477
494
|
/**
|
@@ -491,9 +508,7 @@ declare module "factorio:runtime" {
|
|
491
508
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
492
509
|
*
|
493
510
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
494
|
-
*
|
495
|
-
* Due to implementation omission, `waypoint_index` is 0-based.
|
496
|
-
* @see {@link https://lua-api.factorio.com/1.1.110/events.html#on_cutscene_waypoint_reached Online documentation}
|
511
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_cutscene_waypoint_reached Online documentation}
|
497
512
|
*/
|
498
513
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
499
514
|
/**
|
@@ -513,29 +528,11 @@ declare module "factorio:runtime" {
|
|
513
528
|
*/
|
514
529
|
readonly tick: uint
|
515
530
|
}
|
516
|
-
/**
|
517
|
-
* Called when the map difficulty settings are changed.
|
518
|
-
*
|
519
|
-
* It's not guaranteed that both settings are changed - just that at least one has been changed.
|
520
|
-
* @see {@link https://lua-api.factorio.com/1.1.110/events.html#on_difficulty_settings_changed Online documentation}
|
521
|
-
*/
|
522
|
-
interface OnDifficultySettingsChangedEvent extends EventData {
|
523
|
-
readonly old_recipe_difficulty: uint
|
524
|
-
readonly old_technology_difficulty: uint
|
525
|
-
/**
|
526
|
-
* Identifier of the event
|
527
|
-
*/
|
528
|
-
readonly name: typeof defines.events.on_difficulty_settings_changed
|
529
|
-
/**
|
530
|
-
* Tick the event was generated.
|
531
|
-
*/
|
532
|
-
readonly tick: uint
|
533
|
-
}
|
534
531
|
/**
|
535
532
|
* Called when an entity is cloned. The filter applies to the source entity.
|
536
533
|
*
|
537
534
|
* Event filter: [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter]
|
538
|
-
* @see {@link https://lua-api.factorio.com/
|
535
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_entity_cloned Online documentation}
|
539
536
|
*/
|
540
537
|
interface OnEntityClonedEvent extends EventData {
|
541
538
|
readonly source: LuaEntity
|
@@ -553,7 +550,7 @@ declare module "factorio:runtime" {
|
|
553
550
|
* Called after an entity has been recolored either by the player or through script.
|
554
551
|
*
|
555
552
|
* Automatic recoloring due to {@link LuaPlayer#color LuaPlayer::color} will not raise events, as that is a separate mechanism.
|
556
|
-
* @see {@link https://lua-api.factorio.com/
|
553
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_entity_color_changed Online documentation}
|
557
554
|
*/
|
558
555
|
interface OnEntityColorChangedEvent extends EventData {
|
559
556
|
/**
|
@@ -573,7 +570,7 @@ declare module "factorio:runtime" {
|
|
573
570
|
* Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
|
574
571
|
*
|
575
572
|
* Event filter: [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter]
|
576
|
-
* @see {@link https://lua-api.factorio.com/
|
573
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_entity_damaged Online documentation}
|
577
574
|
*/
|
578
575
|
interface OnEntityDamagedEvent extends EventData {
|
579
576
|
readonly entity: LuaEntity
|
@@ -591,9 +588,13 @@ declare module "factorio:runtime" {
|
|
591
588
|
*/
|
592
589
|
readonly final_health: float
|
593
590
|
/**
|
594
|
-
* The entity that
|
591
|
+
* The entity that originally triggered the events that led to this damage, if available (e.g. the character, turret, etc. that pulled the trigger).
|
595
592
|
*/
|
596
593
|
readonly cause?: LuaEntity
|
594
|
+
/**
|
595
|
+
* The entity that is directly dealing the damage, if available (e.g. the projectile, flame, sticker, grenade, laser beam, etc.).
|
596
|
+
*/
|
597
|
+
readonly source?: LuaEntity
|
597
598
|
/**
|
598
599
|
* The force that did the attacking if any.
|
599
600
|
*/
|
@@ -607,35 +608,11 @@ declare module "factorio:runtime" {
|
|
607
608
|
*/
|
608
609
|
readonly tick: uint
|
609
610
|
}
|
610
|
-
/**
|
611
|
-
* Called after an entity is destroyed that has been registered with {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap::register_on_entity_destroyed}.
|
612
|
-
*
|
613
|
-
* Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.
|
614
|
-
* @see {@link https://lua-api.factorio.com/1.1.110/events.html#on_entity_destroyed Online documentation}
|
615
|
-
*/
|
616
|
-
interface OnEntityDestroyedEvent extends EventData {
|
617
|
-
/**
|
618
|
-
* The number returned by {@link LuaBootstrap#register_on_entity_destroyed register_on_entity_destroyed} to uniquely identify this entity during this event.
|
619
|
-
*/
|
620
|
-
readonly registration_number: RegistrationNumber
|
621
|
-
/**
|
622
|
-
* The {@link LuaEntity#unit_number LuaEntity::unit_number} of the destroyed entity, if it had one.
|
623
|
-
*/
|
624
|
-
readonly unit_number?: UnitNumber
|
625
|
-
/**
|
626
|
-
* Identifier of the event
|
627
|
-
*/
|
628
|
-
readonly name: typeof defines.events.on_entity_destroyed
|
629
|
-
/**
|
630
|
-
* Tick the event was generated.
|
631
|
-
*/
|
632
|
-
readonly tick: uint
|
633
|
-
}
|
634
611
|
/**
|
635
612
|
* Called when an entity dies.
|
636
613
|
*
|
637
614
|
* Event filter: [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter]
|
638
|
-
* @see {@link https://lua-api.factorio.com/
|
615
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_entity_died Online documentation}
|
639
616
|
*/
|
640
617
|
interface OnEntityDiedEvent extends EventData {
|
641
618
|
/**
|
@@ -668,10 +645,8 @@ declare module "factorio:runtime" {
|
|
668
645
|
readonly tick: uint
|
669
646
|
}
|
670
647
|
/**
|
671
|
-
* Called when one of an entity's
|
672
|
-
*
|
673
|
-
* "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
|
674
|
-
* @see {@link https://lua-api.factorio.com/1.1.110/events.html#on_entity_logistic_slot_changed Online documentation}
|
648
|
+
* Called when one of an entity's logistic slots changes.
|
649
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_entity_logistic_slot_changed Online documentation}
|
675
650
|
*/
|
676
651
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
677
652
|
/**
|
@@ -682,6 +657,10 @@ declare module "factorio:runtime" {
|
|
682
657
|
* The entity for whom a logistic slot was changed.
|
683
658
|
*/
|
684
659
|
readonly entity: LuaEntity
|
660
|
+
/**
|
661
|
+
* The section changed.
|
662
|
+
*/
|
663
|
+
readonly section: LuaLogisticSection
|
685
664
|
/**
|
686
665
|
* The slot index that was changed.
|
687
666
|
*/
|
@@ -697,7 +676,7 @@ declare module "factorio:runtime" {
|
|
697
676
|
}
|
698
677
|
/**
|
699
678
|
* Called after an entity has been renamed either by the player or through script.
|
700
|
-
* @see {@link https://lua-api.factorio.com/
|
679
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_entity_renamed Online documentation}
|
701
680
|
*/
|
702
681
|
interface OnEntityRenamedEvent extends EventData {
|
703
682
|
/**
|
@@ -718,7 +697,7 @@ declare module "factorio:runtime" {
|
|
718
697
|
}
|
719
698
|
/**
|
720
699
|
* Called after entity copy-paste is done.
|
721
|
-
* @see {@link https://lua-api.factorio.com/
|
700
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_entity_settings_pasted Online documentation}
|
722
701
|
*/
|
723
702
|
interface OnEntitySettingsPastedEvent extends EventData {
|
724
703
|
readonly player_index: PlayerIndex
|
@@ -741,7 +720,7 @@ declare module "factorio:runtime" {
|
|
741
720
|
}
|
742
721
|
/**
|
743
722
|
* Called when an entity is spawned by a EnemySpawner
|
744
|
-
* @see {@link https://lua-api.factorio.com/
|
723
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_entity_spawned Online documentation}
|
745
724
|
*/
|
746
725
|
interface OnEntitySpawnedEvent extends EventData {
|
747
726
|
readonly spawner: LuaEntity
|
@@ -757,7 +736,7 @@ declare module "factorio:runtime" {
|
|
757
736
|
}
|
758
737
|
/**
|
759
738
|
* Called after equipment is inserted into an equipment grid.
|
760
|
-
* @see {@link https://lua-api.factorio.com/
|
739
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_equipment_inserted Online documentation}
|
761
740
|
*/
|
762
741
|
interface OnEquipmentInsertedEvent extends EventData {
|
763
742
|
/**
|
@@ -779,7 +758,7 @@ declare module "factorio:runtime" {
|
|
779
758
|
}
|
780
759
|
/**
|
781
760
|
* Called after equipment is removed from an equipment grid.
|
782
|
-
* @see {@link https://lua-api.factorio.com/
|
761
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_equipment_removed Online documentation}
|
783
762
|
*/
|
784
763
|
interface OnEquipmentRemovedEvent extends EventData {
|
785
764
|
/**
|
@@ -790,6 +769,10 @@ declare module "factorio:runtime" {
|
|
790
769
|
* The equipment removed.
|
791
770
|
*/
|
792
771
|
readonly equipment: string
|
772
|
+
/**
|
773
|
+
* The equipment quality.
|
774
|
+
*/
|
775
|
+
readonly quality: string
|
793
776
|
/**
|
794
777
|
* The count of equipment removed.
|
795
778
|
*/
|
@@ -805,7 +788,7 @@ declare module "factorio:runtime" {
|
|
805
788
|
}
|
806
789
|
/**
|
807
790
|
* Called when the a forces cease fire values change.
|
808
|
-
* @see {@link https://lua-api.factorio.com/
|
791
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_force_cease_fire_changed Online documentation}
|
809
792
|
*/
|
810
793
|
interface OnForceCeaseFireChangedEvent extends EventData {
|
811
794
|
/**
|
@@ -833,7 +816,7 @@ declare module "factorio:runtime" {
|
|
833
816
|
* Called when a new force is created using `game.create_force()`
|
834
817
|
*
|
835
818
|
* This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
836
|
-
* @see {@link https://lua-api.factorio.com/
|
819
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_force_created Online documentation}
|
837
820
|
*/
|
838
821
|
interface OnForceCreatedEvent extends EventData {
|
839
822
|
/**
|
@@ -851,7 +834,7 @@ declare module "factorio:runtime" {
|
|
851
834
|
}
|
852
835
|
/**
|
853
836
|
* Called when the a forces friends change.
|
854
|
-
* @see {@link https://lua-api.factorio.com/
|
837
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_force_friends_changed Online documentation}
|
855
838
|
*/
|
856
839
|
interface OnForceFriendsChangedEvent extends EventData {
|
857
840
|
/**
|
@@ -877,7 +860,7 @@ declare module "factorio:runtime" {
|
|
877
860
|
}
|
878
861
|
/**
|
879
862
|
* Called when {@link LuaForce#reset LuaForce::reset} is finished.
|
880
|
-
* @see {@link https://lua-api.factorio.com/
|
863
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_force_reset Online documentation}
|
881
864
|
*/
|
882
865
|
interface OnForceResetEvent extends EventData {
|
883
866
|
readonly force: LuaForce
|
@@ -894,7 +877,7 @@ declare module "factorio:runtime" {
|
|
894
877
|
* Called after two forces have been merged using `game.merge_forces()`.
|
895
878
|
*
|
896
879
|
* The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
897
|
-
* @see {@link https://lua-api.factorio.com/
|
880
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_forces_merged Online documentation}
|
898
881
|
*/
|
899
882
|
interface OnForcesMergedEvent extends EventData {
|
900
883
|
/**
|
@@ -920,7 +903,7 @@ declare module "factorio:runtime" {
|
|
920
903
|
}
|
921
904
|
/**
|
922
905
|
* Called when two forces are about to be merged using `game.merge_forces()`.
|
923
|
-
* @see {@link https://lua-api.factorio.com/
|
906
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_forces_merging Online documentation}
|
924
907
|
*/
|
925
908
|
interface OnForcesMergingEvent extends EventData {
|
926
909
|
/**
|
@@ -944,7 +927,7 @@ declare module "factorio:runtime" {
|
|
944
927
|
* 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.
|
945
928
|
*
|
946
929
|
* This event is not fired when the scenario is loaded via the map editor.
|
947
|
-
* @see {@link https://lua-api.factorio.com/
|
930
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_game_created_from_scenario Online documentation}
|
948
931
|
*/
|
949
932
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
950
933
|
/**
|
@@ -958,7 +941,7 @@ declare module "factorio:runtime" {
|
|
958
941
|
}
|
959
942
|
/**
|
960
943
|
* Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
|
961
|
-
* @see {@link https://lua-api.factorio.com/
|
944
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_checked_state_changed Online documentation}
|
962
945
|
*/
|
963
946
|
interface OnGuiCheckedStateChangedEvent extends EventData {
|
964
947
|
/**
|
@@ -980,7 +963,7 @@ declare module "factorio:runtime" {
|
|
980
963
|
}
|
981
964
|
/**
|
982
965
|
* Called when {@link LuaGuiElement} is clicked.
|
983
|
-
* @see {@link https://lua-api.factorio.com/
|
966
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_click Online documentation}
|
984
967
|
*/
|
985
968
|
interface OnGuiClickEvent extends EventData {
|
986
969
|
/**
|
@@ -1026,7 +1009,7 @@ declare module "factorio:runtime" {
|
|
1026
1009
|
* 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.
|
1027
1010
|
*
|
1028
1011
|
* It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.
|
1029
|
-
* @see {@link https://lua-api.factorio.com/
|
1012
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_closed Online documentation}
|
1030
1013
|
*/
|
1031
1014
|
interface OnGuiClosedEvent extends EventData {
|
1032
1015
|
/**
|
@@ -1080,7 +1063,7 @@ declare module "factorio:runtime" {
|
|
1080
1063
|
}
|
1081
1064
|
/**
|
1082
1065
|
* Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
|
1083
|
-
* @see {@link https://lua-api.factorio.com/
|
1066
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_confirmed Online documentation}
|
1084
1067
|
*/
|
1085
1068
|
interface OnGuiConfirmedEvent extends EventData {
|
1086
1069
|
/**
|
@@ -1114,7 +1097,7 @@ declare module "factorio:runtime" {
|
|
1114
1097
|
}
|
1115
1098
|
/**
|
1116
1099
|
* Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
|
1117
|
-
* @see {@link https://lua-api.factorio.com/
|
1100
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_elem_changed Online documentation}
|
1118
1101
|
*/
|
1119
1102
|
interface OnGuiElemChangedEvent extends EventData {
|
1120
1103
|
/**
|
@@ -1136,7 +1119,9 @@ declare module "factorio:runtime" {
|
|
1136
1119
|
}
|
1137
1120
|
/**
|
1138
1121
|
* Called when {@link LuaGuiElement} is hovered by the mouse.
|
1139
|
-
*
|
1122
|
+
*
|
1123
|
+
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
1124
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_hover Online documentation}
|
1140
1125
|
*/
|
1141
1126
|
interface OnGuiHoverEvent extends EventData {
|
1142
1127
|
/**
|
@@ -1158,7 +1143,9 @@ declare module "factorio:runtime" {
|
|
1158
1143
|
}
|
1159
1144
|
/**
|
1160
1145
|
* Called when the player's cursor leaves a {@link LuaGuiElement} that was previously hovered.
|
1161
|
-
*
|
1146
|
+
*
|
1147
|
+
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
1148
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_leave Online documentation}
|
1162
1149
|
*/
|
1163
1150
|
interface OnGuiLeaveEvent extends EventData {
|
1164
1151
|
/**
|
@@ -1180,7 +1167,7 @@ declare module "factorio:runtime" {
|
|
1180
1167
|
}
|
1181
1168
|
/**
|
1182
1169
|
* Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
|
1183
|
-
* @see {@link https://lua-api.factorio.com/
|
1170
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_location_changed Online documentation}
|
1184
1171
|
*/
|
1185
1172
|
interface OnGuiLocationChangedEvent extends EventData {
|
1186
1173
|
/**
|
@@ -1202,7 +1189,7 @@ declare module "factorio:runtime" {
|
|
1202
1189
|
}
|
1203
1190
|
/**
|
1204
1191
|
* Called when the player opens a GUI.
|
1205
|
-
* @see {@link https://lua-api.factorio.com/
|
1192
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_opened Online documentation}
|
1206
1193
|
*/
|
1207
1194
|
interface OnGuiOpenedEvent extends EventData {
|
1208
1195
|
/**
|
@@ -1248,7 +1235,7 @@ declare module "factorio:runtime" {
|
|
1248
1235
|
}
|
1249
1236
|
/**
|
1250
1237
|
* Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
|
1251
|
-
* @see {@link https://lua-api.factorio.com/
|
1238
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_selected_tab_changed Online documentation}
|
1252
1239
|
*/
|
1253
1240
|
interface OnGuiSelectedTabChangedEvent extends EventData {
|
1254
1241
|
/**
|
@@ -1270,7 +1257,7 @@ declare module "factorio:runtime" {
|
|
1270
1257
|
}
|
1271
1258
|
/**
|
1272
1259
|
* Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
|
1273
|
-
* @see {@link https://lua-api.factorio.com/
|
1260
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_selection_state_changed Online documentation}
|
1274
1261
|
*/
|
1275
1262
|
interface OnGuiSelectionStateChangedEvent extends EventData {
|
1276
1263
|
/**
|
@@ -1292,7 +1279,7 @@ declare module "factorio:runtime" {
|
|
1292
1279
|
}
|
1293
1280
|
/**
|
1294
1281
|
* Called when {@link LuaGuiElement} switch state is changed (related to switches).
|
1295
|
-
* @see {@link https://lua-api.factorio.com/
|
1282
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_switch_state_changed Online documentation}
|
1296
1283
|
*/
|
1297
1284
|
interface OnGuiSwitchStateChangedEvent extends EventData {
|
1298
1285
|
/**
|
@@ -1314,7 +1301,7 @@ declare module "factorio:runtime" {
|
|
1314
1301
|
}
|
1315
1302
|
/**
|
1316
1303
|
* Called when {@link LuaGuiElement} text is changed by the player.
|
1317
|
-
* @see {@link https://lua-api.factorio.com/
|
1304
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_text_changed Online documentation}
|
1318
1305
|
*/
|
1319
1306
|
interface OnGuiTextChangedEvent extends EventData {
|
1320
1307
|
/**
|
@@ -1340,7 +1327,7 @@ declare module "factorio:runtime" {
|
|
1340
1327
|
}
|
1341
1328
|
/**
|
1342
1329
|
* Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
|
1343
|
-
* @see {@link https://lua-api.factorio.com/
|
1330
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_gui_value_changed Online documentation}
|
1344
1331
|
*/
|
1345
1332
|
interface OnGuiValueChangedEvent extends EventData {
|
1346
1333
|
/**
|
@@ -1362,7 +1349,7 @@ declare module "factorio:runtime" {
|
|
1362
1349
|
}
|
1363
1350
|
/**
|
1364
1351
|
* Called when a land mine is armed.
|
1365
|
-
* @see {@link https://lua-api.factorio.com/
|
1352
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_land_mine_armed Online documentation}
|
1366
1353
|
*/
|
1367
1354
|
interface OnLandMineArmedEvent extends EventData {
|
1368
1355
|
readonly mine: LuaEntity
|
@@ -1377,7 +1364,7 @@ declare module "factorio:runtime" {
|
|
1377
1364
|
}
|
1378
1365
|
/**
|
1379
1366
|
* Called when a custom {@link import("factorio:prototype").ShortcutPrototype Lua shortcut} is pressed.
|
1380
|
-
* @see {@link https://lua-api.factorio.com/
|
1367
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_lua_shortcut Online documentation}
|
1381
1368
|
*/
|
1382
1369
|
interface OnLuaShortcutEvent extends EventData {
|
1383
1370
|
readonly player_index: PlayerIndex
|
@@ -1398,7 +1385,7 @@ declare module "factorio:runtime" {
|
|
1398
1385
|
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
|
1399
1386
|
*
|
1400
1387
|
* Event filter: [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter]
|
1401
|
-
* @see {@link https://lua-api.factorio.com/
|
1388
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_marked_for_deconstruction Online documentation}
|
1402
1389
|
*/
|
1403
1390
|
interface OnMarkedForDeconstructionEvent extends EventData {
|
1404
1391
|
readonly entity: LuaEntity
|
@@ -1416,16 +1403,13 @@ declare module "factorio:runtime" {
|
|
1416
1403
|
* Called when an entity is marked for upgrade with the Upgrade planner or via script.
|
1417
1404
|
*
|
1418
1405
|
* Event filter: [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter]
|
1419
|
-
* @see {@link https://lua-api.factorio.com/
|
1406
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_marked_for_upgrade Online documentation}
|
1420
1407
|
*/
|
1421
1408
|
interface OnMarkedForUpgradeEvent extends EventData {
|
1409
|
+
readonly player_index?: PlayerIndex
|
1422
1410
|
readonly entity: LuaEntity
|
1423
1411
|
readonly target: LuaEntityPrototype
|
1424
|
-
readonly
|
1425
|
-
/**
|
1426
|
-
* The new direction (if any)
|
1427
|
-
*/
|
1428
|
-
readonly direction?: defines.direction
|
1412
|
+
readonly quality: LuaQualityPrototype
|
1429
1413
|
/**
|
1430
1414
|
* Identifier of the event
|
1431
1415
|
*/
|
@@ -1437,7 +1421,7 @@ declare module "factorio:runtime" {
|
|
1437
1421
|
}
|
1438
1422
|
/**
|
1439
1423
|
* Called after a player purchases some offer from a `market` entity.
|
1440
|
-
* @see {@link https://lua-api.factorio.com/
|
1424
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_market_item_purchased Online documentation}
|
1441
1425
|
*/
|
1442
1426
|
interface OnMarketItemPurchasedEvent extends EventData {
|
1443
1427
|
/**
|
@@ -1467,7 +1451,7 @@ declare module "factorio:runtime" {
|
|
1467
1451
|
}
|
1468
1452
|
/**
|
1469
1453
|
* Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
|
1470
|
-
* @see {@link https://lua-api.factorio.com/
|
1454
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_mod_item_opened Online documentation}
|
1471
1455
|
*/
|
1472
1456
|
interface OnModItemOpenedEvent extends EventData {
|
1473
1457
|
/**
|
@@ -1478,6 +1462,10 @@ declare module "factorio:runtime" {
|
|
1478
1462
|
* The item clicked on.
|
1479
1463
|
*/
|
1480
1464
|
readonly item: LuaItemPrototype
|
1465
|
+
/**
|
1466
|
+
* The item quality clicked on.
|
1467
|
+
*/
|
1468
|
+
readonly quality: LuaQualityPrototype
|
1481
1469
|
/**
|
1482
1470
|
* Identifier of the event
|
1483
1471
|
*/
|
@@ -1487,15 +1475,43 @@ declare module "factorio:runtime" {
|
|
1487
1475
|
*/
|
1488
1476
|
readonly tick: uint
|
1489
1477
|
}
|
1478
|
+
/**
|
1479
|
+
* Called after an object is destroyed that has been registered with {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}.
|
1480
|
+
*
|
1481
|
+
* 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.
|
1482
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_object_destroyed Online documentation}
|
1483
|
+
*/
|
1484
|
+
interface OnObjectDestroyedEvent extends EventData {
|
1485
|
+
/**
|
1486
|
+
* The number returned by {@link LuaBootstrap#register_on_object_destroyed register_on_object_destroyed} to uniquely identify this object during this event.
|
1487
|
+
*/
|
1488
|
+
readonly registration_number: RegistrationNumber
|
1489
|
+
/**
|
1490
|
+
* Useful identifier of the object. Same as second value returned by {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}
|
1491
|
+
*/
|
1492
|
+
readonly useful_id: uint64
|
1493
|
+
/**
|
1494
|
+
* Type of the object that was destroyed. Same as third value returned by {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}
|
1495
|
+
*/
|
1496
|
+
readonly type: defines.target_type
|
1497
|
+
/**
|
1498
|
+
* Identifier of the event
|
1499
|
+
*/
|
1500
|
+
readonly name: typeof defines.events.on_object_destroyed
|
1501
|
+
/**
|
1502
|
+
* Tick the event was generated.
|
1503
|
+
*/
|
1504
|
+
readonly tick: uint
|
1505
|
+
}
|
1490
1506
|
/**
|
1491
1507
|
* Called directly after a permission group is added.
|
1492
|
-
* @see {@link https://lua-api.factorio.com/
|
1508
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_permission_group_added Online documentation}
|
1493
1509
|
*/
|
1494
1510
|
interface OnPermissionGroupAddedEvent extends EventData {
|
1495
1511
|
/**
|
1496
|
-
* The player that added the group.
|
1512
|
+
* The player that added the group or `nil` if by a mod.
|
1497
1513
|
*/
|
1498
|
-
readonly player_index
|
1514
|
+
readonly player_index?: PlayerIndex
|
1499
1515
|
/**
|
1500
1516
|
* The group added.
|
1501
1517
|
*/
|
@@ -1511,13 +1527,13 @@ declare module "factorio:runtime" {
|
|
1511
1527
|
}
|
1512
1528
|
/**
|
1513
1529
|
* Called directly after a permission group is deleted.
|
1514
|
-
* @see {@link https://lua-api.factorio.com/
|
1530
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_permission_group_deleted Online documentation}
|
1515
1531
|
*/
|
1516
1532
|
interface OnPermissionGroupDeletedEvent extends EventData {
|
1517
1533
|
/**
|
1518
|
-
* The player doing the deletion.
|
1534
|
+
* The player doing the deletion or `nil` if by a mod.
|
1519
1535
|
*/
|
1520
|
-
readonly player_index
|
1536
|
+
readonly player_index?: PlayerIndex
|
1521
1537
|
/**
|
1522
1538
|
* The group that was deleted.
|
1523
1539
|
*/
|
@@ -1537,13 +1553,13 @@ declare module "factorio:runtime" {
|
|
1537
1553
|
}
|
1538
1554
|
/**
|
1539
1555
|
* Called directly after a permission group is edited in some way.
|
1540
|
-
* @see {@link https://lua-api.factorio.com/
|
1556
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_permission_group_edited Online documentation}
|
1541
1557
|
*/
|
1542
1558
|
interface OnPermissionGroupEditedEvent extends EventData {
|
1543
1559
|
/**
|
1544
|
-
* The player that did the editing.
|
1560
|
+
* The player that did the editing or `nil` if by a mod.
|
1545
1561
|
*/
|
1546
|
-
readonly player_index
|
1562
|
+
readonly player_index?: PlayerIndex
|
1547
1563
|
/**
|
1548
1564
|
* The group being edited.
|
1549
1565
|
*/
|
@@ -1586,7 +1602,7 @@ declare module "factorio:runtime" {
|
|
1586
1602
|
}
|
1587
1603
|
/**
|
1588
1604
|
* Called directly after a permission string is imported.
|
1589
|
-
* @see {@link https://lua-api.factorio.com/
|
1605
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_permission_string_imported Online documentation}
|
1590
1606
|
*/
|
1591
1607
|
interface OnPermissionStringImportedEvent extends EventData {
|
1592
1608
|
/**
|
@@ -1604,7 +1620,7 @@ declare module "factorio:runtime" {
|
|
1604
1620
|
}
|
1605
1621
|
/**
|
1606
1622
|
* Called when a player picks up an item.
|
1607
|
-
* @see {@link https://lua-api.factorio.com/
|
1623
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_picked_up_item Online documentation}
|
1608
1624
|
*/
|
1609
1625
|
interface OnPickedUpItemEvent extends EventData {
|
1610
1626
|
readonly item_stack: SimpleItemStack
|
@@ -1620,7 +1636,7 @@ declare module "factorio:runtime" {
|
|
1620
1636
|
}
|
1621
1637
|
/**
|
1622
1638
|
* Called after a player alt-reverse-selects an area with a selection-tool item.
|
1623
|
-
* @see {@link https://lua-api.factorio.com/
|
1639
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_alt_reverse_selected_area Online documentation}
|
1624
1640
|
*/
|
1625
1641
|
interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
|
1626
1642
|
/**
|
@@ -1658,7 +1674,7 @@ declare module "factorio:runtime" {
|
|
1658
1674
|
}
|
1659
1675
|
/**
|
1660
1676
|
* Called after a player alt-selects an area with a selection-tool item.
|
1661
|
-
* @see {@link https://lua-api.factorio.com/
|
1677
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_alt_selected_area Online documentation}
|
1662
1678
|
*/
|
1663
1679
|
interface OnPlayerAltSelectedAreaEvent extends EventData {
|
1664
1680
|
/**
|
@@ -1677,6 +1693,10 @@ declare module "factorio:runtime" {
|
|
1677
1693
|
* The item used to select the area.
|
1678
1694
|
*/
|
1679
1695
|
readonly item: string
|
1696
|
+
/**
|
1697
|
+
* The item quality used to select the area.
|
1698
|
+
*/
|
1699
|
+
readonly quality: string
|
1680
1700
|
/**
|
1681
1701
|
* The entities selected.
|
1682
1702
|
*/
|
@@ -1696,7 +1716,7 @@ declare module "factorio:runtime" {
|
|
1696
1716
|
}
|
1697
1717
|
/**
|
1698
1718
|
* Called after a players ammo inventory changed in some way.
|
1699
|
-
* @see {@link https://lua-api.factorio.com/
|
1719
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_ammo_inventory_changed Online documentation}
|
1700
1720
|
*/
|
1701
1721
|
interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
1702
1722
|
readonly player_index: PlayerIndex
|
@@ -1711,7 +1731,7 @@ declare module "factorio:runtime" {
|
|
1711
1731
|
}
|
1712
1732
|
/**
|
1713
1733
|
* Called after a players armor inventory changed in some way.
|
1714
|
-
* @see {@link https://lua-api.factorio.com/
|
1734
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_armor_inventory_changed Online documentation}
|
1715
1735
|
*/
|
1716
1736
|
interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
1717
1737
|
readonly player_index: PlayerIndex
|
@@ -1726,7 +1746,7 @@ declare module "factorio:runtime" {
|
|
1726
1746
|
}
|
1727
1747
|
/**
|
1728
1748
|
* Called when a player is banned.
|
1729
|
-
* @see {@link https://lua-api.factorio.com/
|
1749
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_banned Online documentation}
|
1730
1750
|
*/
|
1731
1751
|
interface OnPlayerBannedEvent extends EventData {
|
1732
1752
|
/**
|
@@ -1756,7 +1776,7 @@ declare module "factorio:runtime" {
|
|
1756
1776
|
}
|
1757
1777
|
/**
|
1758
1778
|
* Called after a player builds tiles.
|
1759
|
-
* @see {@link https://lua-api.factorio.com/
|
1779
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_built_tile Online documentation}
|
1760
1780
|
*/
|
1761
1781
|
interface OnPlayerBuiltTileEvent extends EventData {
|
1762
1782
|
readonly player_index: PlayerIndex
|
@@ -1777,9 +1797,13 @@ declare module "factorio:runtime" {
|
|
1777
1797
|
*/
|
1778
1798
|
readonly item?: LuaItemPrototype
|
1779
1799
|
/**
|
1780
|
-
* The
|
1800
|
+
* The quality of the item used to build the tiles
|
1781
1801
|
*/
|
1782
|
-
readonly
|
1802
|
+
readonly quality?: LuaQualityPrototype
|
1803
|
+
/**
|
1804
|
+
* The inventory containing the items used to build the tiles.
|
1805
|
+
*/
|
1806
|
+
readonly inventory?: LuaInventory
|
1783
1807
|
/**
|
1784
1808
|
* Identifier of the event
|
1785
1809
|
*/
|
@@ -1791,7 +1815,7 @@ declare module "factorio:runtime" {
|
|
1791
1815
|
}
|
1792
1816
|
/**
|
1793
1817
|
* Called when a player cancels crafting.
|
1794
|
-
* @see {@link https://lua-api.factorio.com/
|
1818
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_cancelled_crafting Online documentation}
|
1795
1819
|
*/
|
1796
1820
|
interface OnPlayerCancelledCraftingEvent extends EventData {
|
1797
1821
|
/**
|
@@ -1821,7 +1845,7 @@ declare module "factorio:runtime" {
|
|
1821
1845
|
}
|
1822
1846
|
/**
|
1823
1847
|
* Called after a player changes forces.
|
1824
|
-
* @see {@link https://lua-api.factorio.com/
|
1848
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_changed_force Online documentation}
|
1825
1849
|
*/
|
1826
1850
|
interface OnPlayerChangedForceEvent extends EventData {
|
1827
1851
|
/**
|
@@ -1843,7 +1867,7 @@ declare module "factorio:runtime" {
|
|
1843
1867
|
}
|
1844
1868
|
/**
|
1845
1869
|
* Called when the tile position a player is located at changes.
|
1846
|
-
* @see {@link https://lua-api.factorio.com/
|
1870
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_changed_position Online documentation}
|
1847
1871
|
*/
|
1848
1872
|
interface OnPlayerChangedPositionEvent extends EventData {
|
1849
1873
|
/**
|
@@ -1861,9 +1885,7 @@ declare module "factorio:runtime" {
|
|
1861
1885
|
}
|
1862
1886
|
/**
|
1863
1887
|
* Called after a player changes surfaces.
|
1864
|
-
*
|
1865
|
-
* In the instance a player is moved off a surface due to it being deleted this is not called.
|
1866
|
-
* @see {@link https://lua-api.factorio.com/1.1.110/events.html#on_player_changed_surface Online documentation}
|
1888
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_changed_surface Online documentation}
|
1867
1889
|
*/
|
1868
1890
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
1869
1891
|
/**
|
@@ -1871,9 +1893,9 @@ declare module "factorio:runtime" {
|
|
1871
1893
|
*/
|
1872
1894
|
readonly player_index: PlayerIndex
|
1873
1895
|
/**
|
1874
|
-
* The surface index the player was on.
|
1896
|
+
* The surface index the player was on - may be `nil` if the surface no longer exists.
|
1875
1897
|
*/
|
1876
|
-
readonly surface_index
|
1898
|
+
readonly surface_index?: SurfaceIndex
|
1877
1899
|
/**
|
1878
1900
|
* Identifier of the event
|
1879
1901
|
*/
|
@@ -1885,7 +1907,7 @@ declare module "factorio:runtime" {
|
|
1885
1907
|
}
|
1886
1908
|
/**
|
1887
1909
|
* Called when cheat mode is disabled on a player.
|
1888
|
-
* @see {@link https://lua-api.factorio.com/
|
1910
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_cheat_mode_disabled Online documentation}
|
1889
1911
|
*/
|
1890
1912
|
interface OnPlayerCheatModeDisabledEvent extends EventData {
|
1891
1913
|
/**
|
@@ -1903,7 +1925,7 @@ declare module "factorio:runtime" {
|
|
1903
1925
|
}
|
1904
1926
|
/**
|
1905
1927
|
* Called when cheat mode is enabled on a player.
|
1906
|
-
* @see {@link https://lua-api.factorio.com/
|
1928
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_cheat_mode_enabled Online documentation}
|
1907
1929
|
*/
|
1908
1930
|
interface OnPlayerCheatModeEnabledEvent extends EventData {
|
1909
1931
|
/**
|
@@ -1921,7 +1943,7 @@ declare module "factorio:runtime" {
|
|
1921
1943
|
}
|
1922
1944
|
/**
|
1923
1945
|
* Called when a player clicks a gps tag
|
1924
|
-
* @see {@link https://lua-api.factorio.com/
|
1946
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_clicked_gps_tag Online documentation}
|
1925
1947
|
*/
|
1926
1948
|
interface OnPlayerClickedGpsTagEvent extends EventData {
|
1927
1949
|
/**
|
@@ -1947,7 +1969,7 @@ declare module "factorio:runtime" {
|
|
1947
1969
|
}
|
1948
1970
|
/**
|
1949
1971
|
* Called when a player clicks the "confirm" button in the configure Blueprint GUI.
|
1950
|
-
* @see {@link https://lua-api.factorio.com/
|
1972
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_configured_blueprint Online documentation}
|
1951
1973
|
*/
|
1952
1974
|
interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
1953
1975
|
/**
|
@@ -1964,22 +1986,22 @@ declare module "factorio:runtime" {
|
|
1964
1986
|
readonly tick: uint
|
1965
1987
|
}
|
1966
1988
|
/**
|
1967
|
-
* Called
|
1968
|
-
* @see {@link https://lua-api.factorio.com/
|
1989
|
+
* Called after a player changes controller types.
|
1990
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_controller_changed Online documentation}
|
1969
1991
|
*/
|
1970
|
-
interface
|
1992
|
+
interface OnPlayerControllerChangedEvent extends EventData {
|
1971
1993
|
/**
|
1972
|
-
* The player
|
1994
|
+
* The player who changed controllers.
|
1973
1995
|
*/
|
1974
1996
|
readonly player_index: PlayerIndex
|
1975
1997
|
/**
|
1976
|
-
*
|
1998
|
+
* The old controller type.
|
1977
1999
|
*/
|
1978
|
-
readonly
|
2000
|
+
readonly old_type: defines.controllers
|
1979
2001
|
/**
|
1980
2002
|
* Identifier of the event
|
1981
2003
|
*/
|
1982
|
-
readonly name: typeof defines.events.
|
2004
|
+
readonly name: typeof defines.events.on_player_controller_changed
|
1983
2005
|
/**
|
1984
2006
|
* Tick the event was generated.
|
1985
2007
|
*/
|
@@ -1987,7 +2009,7 @@ declare module "factorio:runtime" {
|
|
1987
2009
|
}
|
1988
2010
|
/**
|
1989
2011
|
* 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}).
|
1990
|
-
* @see {@link https://lua-api.factorio.com/
|
2012
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_crafted_item Online documentation}
|
1991
2013
|
*/
|
1992
2014
|
interface OnPlayerCraftedItemEvent extends EventData {
|
1993
2015
|
/**
|
@@ -2013,7 +2035,7 @@ declare module "factorio:runtime" {
|
|
2013
2035
|
}
|
2014
2036
|
/**
|
2015
2037
|
* Called after the player was created.
|
2016
|
-
* @see {@link https://lua-api.factorio.com/
|
2038
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_created Online documentation}
|
2017
2039
|
*/
|
2018
2040
|
interface OnPlayerCreatedEvent extends EventData {
|
2019
2041
|
readonly player_index: PlayerIndex
|
@@ -2030,7 +2052,7 @@ declare module "factorio:runtime" {
|
|
2030
2052
|
* Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
|
2031
2053
|
*
|
2032
2054
|
* This is fired in the same tick that the change happens, but not instantly.
|
2033
|
-
* @see {@link https://lua-api.factorio.com/
|
2055
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_cursor_stack_changed Online documentation}
|
2034
2056
|
*/
|
2035
2057
|
interface OnPlayerCursorStackChangedEvent extends EventData {
|
2036
2058
|
readonly player_index: PlayerIndex
|
@@ -2045,7 +2067,7 @@ declare module "factorio:runtime" {
|
|
2045
2067
|
}
|
2046
2068
|
/**
|
2047
2069
|
* Called when a player selects an area with a deconstruction planner.
|
2048
|
-
* @see {@link https://lua-api.factorio.com/
|
2070
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_deconstructed_area Online documentation}
|
2049
2071
|
*/
|
2050
2072
|
interface OnPlayerDeconstructedAreaEvent extends EventData {
|
2051
2073
|
/**
|
@@ -2064,6 +2086,14 @@ declare module "factorio:runtime" {
|
|
2064
2086
|
* The item used to select the area.
|
2065
2087
|
*/
|
2066
2088
|
readonly item: string
|
2089
|
+
/**
|
2090
|
+
* The item stack used to select the area.
|
2091
|
+
*/
|
2092
|
+
readonly stack?: LuaItemStack
|
2093
|
+
/**
|
2094
|
+
* The item quality used to select the area.
|
2095
|
+
*/
|
2096
|
+
readonly quality: string
|
2067
2097
|
/**
|
2068
2098
|
* If normal selection or alt selection was used.
|
2069
2099
|
*/
|
@@ -2079,7 +2109,7 @@ declare module "factorio:runtime" {
|
|
2079
2109
|
}
|
2080
2110
|
/**
|
2081
2111
|
* Called when a player is demoted.
|
2082
|
-
* @see {@link https://lua-api.factorio.com/
|
2112
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_demoted Online documentation}
|
2083
2113
|
*/
|
2084
2114
|
interface OnPlayerDemotedEvent extends EventData {
|
2085
2115
|
/**
|
@@ -2097,7 +2127,7 @@ declare module "factorio:runtime" {
|
|
2097
2127
|
}
|
2098
2128
|
/**
|
2099
2129
|
* Called after a player dies.
|
2100
|
-
* @see {@link https://lua-api.factorio.com/
|
2130
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_died Online documentation}
|
2101
2131
|
*/
|
2102
2132
|
interface OnPlayerDiedEvent extends EventData {
|
2103
2133
|
readonly player_index: PlayerIndex
|
@@ -2111,9 +2141,31 @@ declare module "factorio:runtime" {
|
|
2111
2141
|
*/
|
2112
2142
|
readonly tick: uint
|
2113
2143
|
}
|
2144
|
+
/**
|
2145
|
+
* 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.
|
2146
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_display_density_scale_changed Online documentation}
|
2147
|
+
*/
|
2148
|
+
interface OnPlayerDisplayDensityScaleChangedEvent extends EventData {
|
2149
|
+
/**
|
2150
|
+
* The player
|
2151
|
+
*/
|
2152
|
+
readonly player_index: PlayerIndex
|
2153
|
+
/**
|
2154
|
+
* The old display scale
|
2155
|
+
*/
|
2156
|
+
readonly old_scale: double
|
2157
|
+
/**
|
2158
|
+
* Identifier of the event
|
2159
|
+
*/
|
2160
|
+
readonly name: typeof defines.events.on_player_display_density_scale_changed
|
2161
|
+
/**
|
2162
|
+
* Tick the event was generated.
|
2163
|
+
*/
|
2164
|
+
readonly tick: uint
|
2165
|
+
}
|
2114
2166
|
/**
|
2115
2167
|
* Called when the display resolution changes for a given player.
|
2116
|
-
* @see {@link https://lua-api.factorio.com/
|
2168
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_display_resolution_changed Online documentation}
|
2117
2169
|
*/
|
2118
2170
|
interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
2119
2171
|
/**
|
@@ -2135,7 +2187,7 @@ declare module "factorio:runtime" {
|
|
2135
2187
|
}
|
2136
2188
|
/**
|
2137
2189
|
* Called when the display scale changes for a given player.
|
2138
|
-
* @see {@link https://lua-api.factorio.com/
|
2190
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_display_scale_changed Online documentation}
|
2139
2191
|
*/
|
2140
2192
|
interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
2141
2193
|
/**
|
@@ -2159,7 +2211,7 @@ declare module "factorio:runtime" {
|
|
2159
2211
|
* Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
|
2160
2212
|
*
|
2161
2213
|
* This event is not raised when the player is ejected from a vehicle due to it being destroyed.
|
2162
|
-
* @see {@link https://lua-api.factorio.com/
|
2214
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_driving_changed_state Online documentation}
|
2163
2215
|
*/
|
2164
2216
|
interface OnPlayerDrivingChangedStateEvent extends EventData {
|
2165
2217
|
readonly player_index: PlayerIndex
|
@@ -2178,7 +2230,7 @@ declare module "factorio:runtime" {
|
|
2178
2230
|
}
|
2179
2231
|
/**
|
2180
2232
|
* Called when a player drops an item on the ground.
|
2181
|
-
* @see {@link https://lua-api.factorio.com/
|
2233
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_dropped_item Online documentation}
|
2182
2234
|
*/
|
2183
2235
|
interface OnPlayerDroppedItemEvent extends EventData {
|
2184
2236
|
readonly player_index: PlayerIndex
|
@@ -2197,7 +2249,7 @@ declare module "factorio:runtime" {
|
|
2197
2249
|
}
|
2198
2250
|
/**
|
2199
2251
|
* Called when a player fast-transfers something to or from an entity.
|
2200
|
-
* @see {@link https://lua-api.factorio.com/
|
2252
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_fast_transferred Online documentation}
|
2201
2253
|
*/
|
2202
2254
|
interface OnPlayerFastTransferredEvent extends EventData {
|
2203
2255
|
/**
|
@@ -2225,9 +2277,32 @@ declare module "factorio:runtime" {
|
|
2225
2277
|
*/
|
2226
2278
|
readonly tick: uint
|
2227
2279
|
}
|
2280
|
+
/**
|
2281
|
+
* Called when the player flips an entity. This event is only fired when the entity actually changes its orientation or mirroring -- pressing the flip keys on an entity that can't be flipped won't fire this event.
|
2282
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_flipped_entity Online documentation}
|
2283
|
+
*/
|
2284
|
+
interface OnPlayerFlippedEntityEvent extends EventData {
|
2285
|
+
/**
|
2286
|
+
* The flipped entity.
|
2287
|
+
*/
|
2288
|
+
readonly entity: LuaEntity
|
2289
|
+
/**
|
2290
|
+
* The enacted flip. true = Horizontal, false = Vertical
|
2291
|
+
*/
|
2292
|
+
readonly horizontal: boolean
|
2293
|
+
readonly player_index: PlayerIndex
|
2294
|
+
/**
|
2295
|
+
* Identifier of the event
|
2296
|
+
*/
|
2297
|
+
readonly name: typeof defines.events.on_player_flipped_entity
|
2298
|
+
/**
|
2299
|
+
* Tick the event was generated.
|
2300
|
+
*/
|
2301
|
+
readonly tick: uint
|
2302
|
+
}
|
2228
2303
|
/**
|
2229
2304
|
* Called after player flushed fluid
|
2230
|
-
* @see {@link https://lua-api.factorio.com/
|
2305
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_flushed_fluid Online documentation}
|
2231
2306
|
*/
|
2232
2307
|
interface OnPlayerFlushedFluidEvent extends EventData {
|
2233
2308
|
/**
|
@@ -2261,7 +2336,7 @@ declare module "factorio:runtime" {
|
|
2261
2336
|
}
|
2262
2337
|
/**
|
2263
2338
|
* Called after a players gun inventory changed in some way.
|
2264
|
-
* @see {@link https://lua-api.factorio.com/
|
2339
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_gun_inventory_changed Online documentation}
|
2265
2340
|
*/
|
2266
2341
|
interface OnPlayerGunInventoryChangedEvent extends EventData {
|
2267
2342
|
readonly player_index: PlayerIndex
|
@@ -2276,7 +2351,7 @@ declare module "factorio:runtime" {
|
|
2276
2351
|
}
|
2277
2352
|
/**
|
2278
2353
|
* Called when a player's input method changes. See {@link LuaPlayer#input_method LuaPlayer::input_method}.
|
2279
|
-
* @see {@link https://lua-api.factorio.com/
|
2354
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_input_method_changed Online documentation}
|
2280
2355
|
*/
|
2281
2356
|
interface OnPlayerInputMethodChangedEvent extends EventData {
|
2282
2357
|
/**
|
@@ -2294,7 +2369,7 @@ declare module "factorio:runtime" {
|
|
2294
2369
|
}
|
2295
2370
|
/**
|
2296
2371
|
* 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.
|
2297
|
-
* @see {@link https://lua-api.factorio.com/
|
2372
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_joined_game Online documentation}
|
2298
2373
|
*/
|
2299
2374
|
interface OnPlayerJoinedGameEvent extends EventData {
|
2300
2375
|
readonly player_index: PlayerIndex
|
@@ -2309,7 +2384,7 @@ declare module "factorio:runtime" {
|
|
2309
2384
|
}
|
2310
2385
|
/**
|
2311
2386
|
* Called when a player is kicked.
|
2312
|
-
* @see {@link https://lua-api.factorio.com/
|
2387
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_kicked Online documentation}
|
2313
2388
|
*/
|
2314
2389
|
interface OnPlayerKickedEvent extends EventData {
|
2315
2390
|
/**
|
@@ -2335,7 +2410,7 @@ declare module "factorio:runtime" {
|
|
2335
2410
|
}
|
2336
2411
|
/**
|
2337
2412
|
* 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.
|
2338
|
-
* @see {@link https://lua-api.factorio.com/
|
2413
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_left_game Online documentation}
|
2339
2414
|
*/
|
2340
2415
|
interface OnPlayerLeftGameEvent extends EventData {
|
2341
2416
|
readonly player_index: PlayerIndex
|
@@ -2349,9 +2424,31 @@ declare module "factorio:runtime" {
|
|
2349
2424
|
*/
|
2350
2425
|
readonly tick: uint
|
2351
2426
|
}
|
2427
|
+
/**
|
2428
|
+
* Called when a player's active locale changes. See {@link LuaPlayer#locale LuaPlayer::locale}.
|
2429
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_locale_changed Online documentation}
|
2430
|
+
*/
|
2431
|
+
interface OnPlayerLocaleChangedEvent extends EventData {
|
2432
|
+
/**
|
2433
|
+
* The player whose locale was changed.
|
2434
|
+
*/
|
2435
|
+
readonly player_index: PlayerIndex
|
2436
|
+
/**
|
2437
|
+
* The previously active locale.
|
2438
|
+
*/
|
2439
|
+
readonly old_locale: string
|
2440
|
+
/**
|
2441
|
+
* Identifier of the event
|
2442
|
+
*/
|
2443
|
+
readonly name: typeof defines.events.on_player_locale_changed
|
2444
|
+
/**
|
2445
|
+
* Tick the event was generated.
|
2446
|
+
*/
|
2447
|
+
readonly tick: uint
|
2448
|
+
}
|
2352
2449
|
/**
|
2353
2450
|
* Called after a players main inventory changed in some way.
|
2354
|
-
* @see {@link https://lua-api.factorio.com/
|
2451
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_main_inventory_changed Online documentation}
|
2355
2452
|
*/
|
2356
2453
|
interface OnPlayerMainInventoryChangedEvent extends EventData {
|
2357
2454
|
readonly player_index: PlayerIndex
|
@@ -2372,7 +2469,7 @@ declare module "factorio:runtime" {
|
|
2372
2469
|
* The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
2373
2470
|
*
|
2374
2471
|
* Event filter: [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter]
|
2375
|
-
* @see {@link https://lua-api.factorio.com/
|
2472
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_mined_entity Online documentation}
|
2376
2473
|
*/
|
2377
2474
|
interface OnPlayerMinedEntityEvent extends EventData {
|
2378
2475
|
/**
|
@@ -2398,7 +2495,7 @@ declare module "factorio:runtime" {
|
|
2398
2495
|
}
|
2399
2496
|
/**
|
2400
2497
|
* Called when the player mines something.
|
2401
|
-
* @see {@link https://lua-api.factorio.com/
|
2498
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_mined_item Online documentation}
|
2402
2499
|
*/
|
2403
2500
|
interface OnPlayerMinedItemEvent extends EventData {
|
2404
2501
|
/**
|
@@ -2417,7 +2514,7 @@ declare module "factorio:runtime" {
|
|
2417
2514
|
}
|
2418
2515
|
/**
|
2419
2516
|
* Called after a player mines tiles.
|
2420
|
-
* @see {@link https://lua-api.factorio.com/
|
2517
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_mined_tile Online documentation}
|
2421
2518
|
*/
|
2422
2519
|
interface OnPlayerMinedTileEvent extends EventData {
|
2423
2520
|
readonly player_index: PlayerIndex
|
@@ -2440,7 +2537,7 @@ declare module "factorio:runtime" {
|
|
2440
2537
|
}
|
2441
2538
|
/**
|
2442
2539
|
* Called when a player is muted.
|
2443
|
-
* @see {@link https://lua-api.factorio.com/
|
2540
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_muted Online documentation}
|
2444
2541
|
*/
|
2445
2542
|
interface OnPlayerMutedEvent extends EventData {
|
2446
2543
|
/**
|
@@ -2458,7 +2555,7 @@ declare module "factorio:runtime" {
|
|
2458
2555
|
}
|
2459
2556
|
/**
|
2460
2557
|
* Called when a player invokes the "smart pipette" over an entity.
|
2461
|
-
* @see {@link https://lua-api.factorio.com/
|
2558
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_pipette Online documentation}
|
2462
2559
|
*/
|
2463
2560
|
interface OnPlayerPipetteEvent extends EventData {
|
2464
2561
|
/**
|
@@ -2469,6 +2566,10 @@ declare module "factorio:runtime" {
|
|
2469
2566
|
* The item put in the cursor
|
2470
2567
|
*/
|
2471
2568
|
readonly item: LuaItemPrototype
|
2569
|
+
/**
|
2570
|
+
* The item quality put in the cursor
|
2571
|
+
*/
|
2572
|
+
readonly quality: LuaQualityPrototype
|
2472
2573
|
/**
|
2473
2574
|
* If cheat mode was used to give a free stack of the item.
|
2474
2575
|
*/
|
@@ -2484,7 +2585,7 @@ declare module "factorio:runtime" {
|
|
2484
2585
|
}
|
2485
2586
|
/**
|
2486
2587
|
* Called after the player puts equipment in an equipment grid
|
2487
|
-
* @see {@link https://lua-api.factorio.com/
|
2588
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_placed_equipment Online documentation}
|
2488
2589
|
*/
|
2489
2590
|
interface OnPlayerPlacedEquipmentEvent extends EventData {
|
2490
2591
|
readonly player_index: PlayerIndex
|
@@ -2507,7 +2608,7 @@ declare module "factorio:runtime" {
|
|
2507
2608
|
}
|
2508
2609
|
/**
|
2509
2610
|
* Called when a player is promoted.
|
2510
|
-
* @see {@link https://lua-api.factorio.com/
|
2611
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_promoted Online documentation}
|
2511
2612
|
*/
|
2512
2613
|
interface OnPlayerPromotedEvent extends EventData {
|
2513
2614
|
/**
|
@@ -2525,7 +2626,7 @@ declare module "factorio:runtime" {
|
|
2525
2626
|
}
|
2526
2627
|
/**
|
2527
2628
|
* 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.
|
2528
|
-
* @see {@link https://lua-api.factorio.com/
|
2629
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_removed Online documentation}
|
2529
2630
|
*/
|
2530
2631
|
interface OnPlayerRemovedEvent extends EventData {
|
2531
2632
|
/**
|
@@ -2543,7 +2644,7 @@ declare module "factorio:runtime" {
|
|
2543
2644
|
}
|
2544
2645
|
/**
|
2545
2646
|
* Called after the player removes equipment from an equipment grid
|
2546
|
-
* @see {@link https://lua-api.factorio.com/
|
2647
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_removed_equipment Online documentation}
|
2547
2648
|
*/
|
2548
2649
|
interface OnPlayerRemovedEquipmentEvent extends EventData {
|
2549
2650
|
readonly player_index: PlayerIndex
|
@@ -2555,6 +2656,10 @@ declare module "factorio:runtime" {
|
|
2555
2656
|
* The equipment removed.
|
2556
2657
|
*/
|
2557
2658
|
readonly equipment: string
|
2659
|
+
/**
|
2660
|
+
* The equipment quality.
|
2661
|
+
*/
|
2662
|
+
readonly quality: string
|
2558
2663
|
/**
|
2559
2664
|
* The count of equipment removed.
|
2560
2665
|
*/
|
@@ -2572,7 +2677,7 @@ declare module "factorio:runtime" {
|
|
2572
2677
|
* Called when a player repairs an entity.
|
2573
2678
|
*
|
2574
2679
|
* Event filter: [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter]
|
2575
|
-
* @see {@link https://lua-api.factorio.com/
|
2680
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_repaired_entity Online documentation}
|
2576
2681
|
*/
|
2577
2682
|
interface OnPlayerRepairedEntityEvent extends EventData {
|
2578
2683
|
readonly player_index: PlayerIndex
|
@@ -2588,7 +2693,7 @@ declare module "factorio:runtime" {
|
|
2588
2693
|
}
|
2589
2694
|
/**
|
2590
2695
|
* Called after a player respawns.
|
2591
|
-
* @see {@link https://lua-api.factorio.com/
|
2696
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_respawned Online documentation}
|
2592
2697
|
*/
|
2593
2698
|
interface OnPlayerRespawnedEvent extends EventData {
|
2594
2699
|
readonly player_index: PlayerIndex
|
@@ -2607,7 +2712,7 @@ declare module "factorio:runtime" {
|
|
2607
2712
|
}
|
2608
2713
|
/**
|
2609
2714
|
* Called after a player reverse-selects an area with a selection-tool item.
|
2610
|
-
* @see {@link https://lua-api.factorio.com/
|
2715
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_reverse_selected_area Online documentation}
|
2611
2716
|
*/
|
2612
2717
|
interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
2613
2718
|
/**
|
@@ -2645,7 +2750,9 @@ declare module "factorio:runtime" {
|
|
2645
2750
|
}
|
2646
2751
|
/**
|
2647
2752
|
* 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.
|
2648
|
-
*
|
2753
|
+
*
|
2754
|
+
* Entities being flipped will not fire this event, even if the flip involves rotating. See {@link OnPlayerFlippedEntityEvent on_player_flipped_entity}.
|
2755
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_rotated_entity Online documentation}
|
2649
2756
|
*/
|
2650
2757
|
interface OnPlayerRotatedEntityEvent extends EventData {
|
2651
2758
|
/**
|
@@ -2668,7 +2775,7 @@ declare module "factorio:runtime" {
|
|
2668
2775
|
}
|
2669
2776
|
/**
|
2670
2777
|
* Called after a player selects an area with a selection-tool item.
|
2671
|
-
* @see {@link https://lua-api.factorio.com/
|
2778
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_selected_area Online documentation}
|
2672
2779
|
*/
|
2673
2780
|
interface OnPlayerSelectedAreaEvent extends EventData {
|
2674
2781
|
/**
|
@@ -2687,6 +2794,10 @@ declare module "factorio:runtime" {
|
|
2687
2794
|
* The item used to select the area.
|
2688
2795
|
*/
|
2689
2796
|
readonly item: string
|
2797
|
+
/**
|
2798
|
+
* The item quality used to select the area.
|
2799
|
+
*/
|
2800
|
+
readonly quality: string
|
2690
2801
|
/**
|
2691
2802
|
* The entities selected.
|
2692
2803
|
*/
|
@@ -2706,7 +2817,7 @@ declare module "factorio:runtime" {
|
|
2706
2817
|
}
|
2707
2818
|
/**
|
2708
2819
|
* Called when a player sets a quickbar slot to anything (new value, or set to empty).
|
2709
|
-
* @see {@link https://lua-api.factorio.com/
|
2820
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_set_quick_bar_slot Online documentation}
|
2710
2821
|
*/
|
2711
2822
|
interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
2712
2823
|
readonly player_index: PlayerIndex
|
@@ -2721,7 +2832,7 @@ declare module "factorio:runtime" {
|
|
2721
2832
|
}
|
2722
2833
|
/**
|
2723
2834
|
* Called when a player selects an area with a blueprint.
|
2724
|
-
* @see {@link https://lua-api.factorio.com/
|
2835
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_setup_blueprint Online documentation}
|
2725
2836
|
*/
|
2726
2837
|
interface OnPlayerSetupBlueprintEvent extends EventData {
|
2727
2838
|
/**
|
@@ -2740,6 +2851,14 @@ declare module "factorio:runtime" {
|
|
2740
2851
|
* The item used to select the area.
|
2741
2852
|
*/
|
2742
2853
|
readonly item: string
|
2854
|
+
/**
|
2855
|
+
* The item stack used to select the area.
|
2856
|
+
*/
|
2857
|
+
readonly stack?: LuaItemStack
|
2858
|
+
/**
|
2859
|
+
* The item quality used to select the area.
|
2860
|
+
*/
|
2861
|
+
readonly quality: string
|
2743
2862
|
/**
|
2744
2863
|
* If normal selection or alt selection was used.
|
2745
2864
|
*/
|
@@ -2759,7 +2878,7 @@ declare module "factorio:runtime" {
|
|
2759
2878
|
}
|
2760
2879
|
/**
|
2761
2880
|
* Called when a player toggles alt mode, also known as "show entity info".
|
2762
|
-
* @see {@link https://lua-api.factorio.com/
|
2881
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_toggled_alt_mode Online documentation}
|
2763
2882
|
*/
|
2764
2883
|
interface OnPlayerToggledAltModeEvent extends EventData {
|
2765
2884
|
readonly player_index: PlayerIndex
|
@@ -2778,7 +2897,7 @@ declare module "factorio:runtime" {
|
|
2778
2897
|
}
|
2779
2898
|
/**
|
2780
2899
|
* Called when a player toggles the map editor on or off.
|
2781
|
-
* @see {@link https://lua-api.factorio.com/
|
2900
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_toggled_map_editor Online documentation}
|
2782
2901
|
*/
|
2783
2902
|
interface OnPlayerToggledMapEditorEvent extends EventData {
|
2784
2903
|
readonly player_index: PlayerIndex
|
@@ -2793,7 +2912,7 @@ declare module "factorio:runtime" {
|
|
2793
2912
|
}
|
2794
2913
|
/**
|
2795
2914
|
* Called after a players trash inventory changed in some way.
|
2796
|
-
* @see {@link https://lua-api.factorio.com/
|
2915
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_trash_inventory_changed Online documentation}
|
2797
2916
|
*/
|
2798
2917
|
interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
2799
2918
|
readonly player_index: PlayerIndex
|
@@ -2808,7 +2927,7 @@ declare module "factorio:runtime" {
|
|
2808
2927
|
}
|
2809
2928
|
/**
|
2810
2929
|
* Called when a player is un-banned.
|
2811
|
-
* @see {@link https://lua-api.factorio.com/
|
2930
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_unbanned Online documentation}
|
2812
2931
|
*/
|
2813
2932
|
interface OnPlayerUnbannedEvent extends EventData {
|
2814
2933
|
/**
|
@@ -2838,7 +2957,7 @@ declare module "factorio:runtime" {
|
|
2838
2957
|
}
|
2839
2958
|
/**
|
2840
2959
|
* Called when a player is unmuted.
|
2841
|
-
* @see {@link https://lua-api.factorio.com/
|
2960
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_unmuted Online documentation}
|
2842
2961
|
*/
|
2843
2962
|
interface OnPlayerUnmutedEvent extends EventData {
|
2844
2963
|
/**
|
@@ -2856,7 +2975,7 @@ declare module "factorio:runtime" {
|
|
2856
2975
|
}
|
2857
2976
|
/**
|
2858
2977
|
* Called when a player uses a capsule that results in some game action.
|
2859
|
-
* @see {@link https://lua-api.factorio.com/
|
2978
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_used_capsule Online documentation}
|
2860
2979
|
*/
|
2861
2980
|
interface OnPlayerUsedCapsuleEvent extends EventData {
|
2862
2981
|
/**
|
@@ -2867,6 +2986,10 @@ declare module "factorio:runtime" {
|
|
2867
2986
|
* The capsule item used.
|
2868
2987
|
*/
|
2869
2988
|
readonly item: LuaItemPrototype
|
2989
|
+
/**
|
2990
|
+
* The quality of the capsule item used.
|
2991
|
+
*/
|
2992
|
+
readonly quality: LuaQualityPrototype
|
2870
2993
|
/**
|
2871
2994
|
* The position the capsule was used.
|
2872
2995
|
*/
|
@@ -2881,30 +3004,22 @@ declare module "factorio:runtime" {
|
|
2881
3004
|
readonly tick: uint
|
2882
3005
|
}
|
2883
3006
|
/**
|
2884
|
-
* Called when a player uses spidertron remote to send
|
2885
|
-
* @see {@link https://lua-api.factorio.com/
|
3007
|
+
* Called when a player uses spidertron remote to send all selected units to a given position
|
3008
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_player_used_spidertron_remote Online documentation}
|
2886
3009
|
*/
|
2887
|
-
interface
|
3010
|
+
interface OnPlayerUsedSpidertronRemoteEvent extends EventData {
|
2888
3011
|
/**
|
2889
3012
|
* The player that used the remote.
|
2890
3013
|
*/
|
2891
3014
|
readonly player_index: PlayerIndex
|
2892
|
-
/**
|
2893
|
-
* Spider vehicle which was requested to move.
|
2894
|
-
*/
|
2895
|
-
readonly vehicle: LuaEntity
|
2896
3015
|
/**
|
2897
3016
|
* Goal position to which spidertron was sent to.
|
2898
3017
|
*/
|
2899
3018
|
readonly position: MapPosition
|
2900
|
-
/**
|
2901
|
-
* If the use was successful. It may fail when spidertron has different driver or when player is on different surface.
|
2902
|
-
*/
|
2903
|
-
readonly success: boolean
|
2904
3019
|
/**
|
2905
3020
|
* Identifier of the event
|
2906
3021
|
*/
|
2907
|
-
readonly name: typeof defines.events.
|
3022
|
+
readonly name: typeof defines.events.on_player_used_spidertron_remote
|
2908
3023
|
/**
|
2909
3024
|
* Tick the event was generated.
|
2910
3025
|
*/
|
@@ -2914,7 +3029,7 @@ declare module "factorio:runtime" {
|
|
2914
3029
|
* Called after an entity dies.
|
2915
3030
|
*
|
2916
3031
|
* Event filter: [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter]
|
2917
|
-
* @see {@link https://lua-api.factorio.com/
|
3032
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_post_entity_died Online documentation}
|
2918
3033
|
*/
|
2919
3034
|
interface OnPostEntityDiedEvent extends EventData {
|
2920
3035
|
/**
|
@@ -2933,6 +3048,10 @@ declare module "factorio:runtime" {
|
|
2933
3048
|
* The entity prototype of the entity that died.
|
2934
3049
|
*/
|
2935
3050
|
readonly prototype: LuaEntityPrototype
|
3051
|
+
/**
|
3052
|
+
* The quality of the entity that died.
|
3053
|
+
*/
|
3054
|
+
readonly quality: LuaQualityPrototype
|
2936
3055
|
/**
|
2937
3056
|
* The damage type if any.
|
2938
3057
|
*/
|
@@ -2960,7 +3079,7 @@ declare module "factorio:runtime" {
|
|
2960
3079
|
}
|
2961
3080
|
/**
|
2962
3081
|
* Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
|
2963
|
-
* @see {@link https://lua-api.factorio.com/
|
3082
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_build Online documentation}
|
2964
3083
|
*/
|
2965
3084
|
interface OnPreBuildEvent extends EventData {
|
2966
3085
|
/**
|
@@ -2972,13 +3091,17 @@ declare module "factorio:runtime" {
|
|
2972
3091
|
*/
|
2973
3092
|
readonly position: MapPosition
|
2974
3093
|
/**
|
2975
|
-
*
|
3094
|
+
* Build mode the item was placed with.
|
2976
3095
|
*/
|
2977
|
-
readonly
|
3096
|
+
readonly build_mode: defines.build_mode
|
2978
3097
|
/**
|
2979
3098
|
* The direction the item was facing when placed.
|
2980
3099
|
*/
|
2981
3100
|
readonly direction: defines.direction
|
3101
|
+
/**
|
3102
|
+
* If the item is mirrored (only crafting machines support this)
|
3103
|
+
*/
|
3104
|
+
readonly mirror: boolean
|
2982
3105
|
/**
|
2983
3106
|
* Whether the blueprint was flipped horizontally. `nil` if not built by a blueprint.
|
2984
3107
|
*/
|
@@ -3002,7 +3125,7 @@ declare module "factorio:runtime" {
|
|
3002
3125
|
}
|
3003
3126
|
/**
|
3004
3127
|
* Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
3005
|
-
* @see {@link https://lua-api.factorio.com/
|
3128
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_chunk_deleted Online documentation}
|
3006
3129
|
*/
|
3007
3130
|
interface OnPreChunkDeletedEvent extends EventData {
|
3008
3131
|
readonly surface_index: SurfaceIndex
|
@@ -3021,7 +3144,7 @@ declare module "factorio:runtime" {
|
|
3021
3144
|
}
|
3022
3145
|
/**
|
3023
3146
|
* Called before entity copy-paste is done.
|
3024
|
-
* @see {@link https://lua-api.factorio.com/
|
3147
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_entity_settings_pasted Online documentation}
|
3025
3148
|
*/
|
3026
3149
|
interface OnPreEntitySettingsPastedEvent extends EventData {
|
3027
3150
|
readonly player_index: PlayerIndex
|
@@ -3048,7 +3171,7 @@ declare module "factorio:runtime" {
|
|
3048
3171
|
* Also called for item request proxies before they are destroyed as a result of being marked for deconstruction.
|
3049
3172
|
*
|
3050
3173
|
* Event filter: [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter]
|
3051
|
-
* @see {@link https://lua-api.factorio.com/
|
3174
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_ghost_deconstructed Online documentation}
|
3052
3175
|
*/
|
3053
3176
|
interface OnPreGhostDeconstructedEvent extends EventData {
|
3054
3177
|
/**
|
@@ -3069,7 +3192,7 @@ declare module "factorio:runtime" {
|
|
3069
3192
|
* Called before a ghost entity is upgraded.
|
3070
3193
|
*
|
3071
3194
|
* Event filter: [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter]
|
3072
|
-
* @see {@link https://lua-api.factorio.com/
|
3195
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_ghost_upgraded Online documentation}
|
3073
3196
|
*/
|
3074
3197
|
interface OnPreGhostUpgradedEvent extends EventData {
|
3075
3198
|
/**
|
@@ -3078,6 +3201,7 @@ declare module "factorio:runtime" {
|
|
3078
3201
|
readonly player_index?: PlayerIndex
|
3079
3202
|
readonly ghost: LuaEntity
|
3080
3203
|
readonly target: LuaEntityPrototype
|
3204
|
+
readonly quality: LuaQualityPrototype
|
3081
3205
|
/**
|
3082
3206
|
* Identifier of the event
|
3083
3207
|
*/
|
@@ -3089,13 +3213,13 @@ declare module "factorio:runtime" {
|
|
3089
3213
|
}
|
3090
3214
|
/**
|
3091
3215
|
* Called directly before a permission group is deleted.
|
3092
|
-
* @see {@link https://lua-api.factorio.com/
|
3216
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_permission_group_deleted Online documentation}
|
3093
3217
|
*/
|
3094
3218
|
interface OnPrePermissionGroupDeletedEvent extends EventData {
|
3095
3219
|
/**
|
3096
|
-
* The player doing the deletion.
|
3220
|
+
* The player doing the deletion or `nil` if by a mod.
|
3097
3221
|
*/
|
3098
|
-
readonly player_index
|
3222
|
+
readonly player_index?: PlayerIndex
|
3099
3223
|
/**
|
3100
3224
|
* The group to be deleted.
|
3101
3225
|
*/
|
@@ -3111,7 +3235,7 @@ declare module "factorio:runtime" {
|
|
3111
3235
|
}
|
3112
3236
|
/**
|
3113
3237
|
* Called directly before a permission string is imported.
|
3114
|
-
* @see {@link https://lua-api.factorio.com/
|
3238
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_permission_string_imported Online documentation}
|
3115
3239
|
*/
|
3116
3240
|
interface OnPrePermissionStringImportedEvent extends EventData {
|
3117
3241
|
/**
|
@@ -3129,7 +3253,7 @@ declare module "factorio:runtime" {
|
|
3129
3253
|
}
|
3130
3254
|
/**
|
3131
3255
|
* Called when a player queues something to be crafted.
|
3132
|
-
* @see {@link https://lua-api.factorio.com/
|
3256
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_player_crafted_item Online documentation}
|
3133
3257
|
*/
|
3134
3258
|
interface OnPrePlayerCraftedItemEvent extends EventData {
|
3135
3259
|
/**
|
@@ -3159,7 +3283,7 @@ declare module "factorio:runtime" {
|
|
3159
3283
|
}
|
3160
3284
|
/**
|
3161
3285
|
* Called before a players dies.
|
3162
|
-
* @see {@link https://lua-api.factorio.com/
|
3286
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_player_died Online documentation}
|
3163
3287
|
*/
|
3164
3288
|
interface OnPrePlayerDiedEvent extends EventData {
|
3165
3289
|
readonly player_index: PlayerIndex
|
@@ -3175,7 +3299,7 @@ declare module "factorio:runtime" {
|
|
3175
3299
|
}
|
3176
3300
|
/**
|
3177
3301
|
* Called before a player leaves the game.
|
3178
|
-
* @see {@link https://lua-api.factorio.com/
|
3302
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_player_left_game Online documentation}
|
3179
3303
|
*/
|
3180
3304
|
interface OnPrePlayerLeftGameEvent extends EventData {
|
3181
3305
|
readonly player_index: PlayerIndex
|
@@ -3193,7 +3317,7 @@ declare module "factorio:runtime" {
|
|
3193
3317
|
* Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed.
|
3194
3318
|
*
|
3195
3319
|
* Event filter: [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter]
|
3196
|
-
* @see {@link https://lua-api.factorio.com/
|
3320
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_player_mined_item Online documentation}
|
3197
3321
|
*/
|
3198
3322
|
interface OnPrePlayerMinedItemEvent extends EventData {
|
3199
3323
|
/**
|
@@ -3212,7 +3336,7 @@ declare module "factorio:runtime" {
|
|
3212
3336
|
}
|
3213
3337
|
/**
|
3214
3338
|
* 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.
|
3215
|
-
* @see {@link https://lua-api.factorio.com/
|
3339
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_player_removed Online documentation}
|
3216
3340
|
*/
|
3217
3341
|
interface OnPrePlayerRemovedEvent extends EventData {
|
3218
3342
|
/**
|
@@ -3230,7 +3354,7 @@ declare module "factorio:runtime" {
|
|
3230
3354
|
}
|
3231
3355
|
/**
|
3232
3356
|
* Called before a player toggles the map editor on or off.
|
3233
|
-
* @see {@link https://lua-api.factorio.com/
|
3357
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_player_toggled_map_editor Online documentation}
|
3234
3358
|
*/
|
3235
3359
|
interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
3236
3360
|
readonly player_index: PlayerIndex
|
@@ -3245,7 +3369,7 @@ declare module "factorio:runtime" {
|
|
3245
3369
|
}
|
3246
3370
|
/**
|
3247
3371
|
* Called directly before a robot explodes cliffs.
|
3248
|
-
* @see {@link https://lua-api.factorio.com/
|
3372
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_robot_exploded_cliff Online documentation}
|
3249
3373
|
*/
|
3250
3374
|
interface OnPreRobotExplodedCliffEvent extends EventData {
|
3251
3375
|
readonly robot: LuaEntity
|
@@ -3254,6 +3378,10 @@ declare module "factorio:runtime" {
|
|
3254
3378
|
* The cliff explosive used.
|
3255
3379
|
*/
|
3256
3380
|
readonly item: LuaItemPrototype
|
3381
|
+
/**
|
3382
|
+
* The quality of the cliff explosive used.
|
3383
|
+
*/
|
3384
|
+
readonly quality: LuaQualityPrototype
|
3257
3385
|
/**
|
3258
3386
|
* Identifier of the event
|
3259
3387
|
*/
|
@@ -3263,9 +3391,23 @@ declare module "factorio:runtime" {
|
|
3263
3391
|
*/
|
3264
3392
|
readonly tick: uint
|
3265
3393
|
}
|
3394
|
+
/**
|
3395
|
+
* Called just before the scenario finishes.
|
3396
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_scenario_finished Online documentation}
|
3397
|
+
*/
|
3398
|
+
interface OnPreScenarioFinishedEvent extends EventData {
|
3399
|
+
/**
|
3400
|
+
* Identifier of the event
|
3401
|
+
*/
|
3402
|
+
readonly name: typeof defines.events.on_pre_scenario_finished
|
3403
|
+
/**
|
3404
|
+
* Tick the event was generated.
|
3405
|
+
*/
|
3406
|
+
readonly tick: uint
|
3407
|
+
}
|
3266
3408
|
/**
|
3267
3409
|
* Called just before a script inventory is resized.
|
3268
|
-
* @see {@link https://lua-api.factorio.com/
|
3410
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_script_inventory_resized Online documentation}
|
3269
3411
|
*/
|
3270
3412
|
interface OnPreScriptInventoryResizedEvent extends EventData {
|
3271
3413
|
/**
|
@@ -3296,7 +3438,7 @@ declare module "factorio:runtime" {
|
|
3296
3438
|
}
|
3297
3439
|
/**
|
3298
3440
|
* Called just before a surface is cleared (all entities removed and all chunks deleted).
|
3299
|
-
* @see {@link https://lua-api.factorio.com/
|
3441
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_surface_cleared Online documentation}
|
3300
3442
|
*/
|
3301
3443
|
interface OnPreSurfaceClearedEvent extends EventData {
|
3302
3444
|
readonly surface_index: SurfaceIndex
|
@@ -3311,7 +3453,7 @@ declare module "factorio:runtime" {
|
|
3311
3453
|
}
|
3312
3454
|
/**
|
3313
3455
|
* Called just before a surface is deleted.
|
3314
|
-
* @see {@link https://lua-api.factorio.com/
|
3456
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_pre_surface_deleted Online documentation}
|
3315
3457
|
*/
|
3316
3458
|
interface OnPreSurfaceDeletedEvent extends EventData {
|
3317
3459
|
readonly surface_index: SurfaceIndex
|
@@ -3324,9 +3466,31 @@ declare module "factorio:runtime" {
|
|
3324
3466
|
*/
|
3325
3467
|
readonly tick: uint
|
3326
3468
|
}
|
3469
|
+
/**
|
3470
|
+
* Called when the player triggers "redo".
|
3471
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_redo_applied Online documentation}
|
3472
|
+
*/
|
3473
|
+
interface OnRedoAppliedEvent extends EventData {
|
3474
|
+
/**
|
3475
|
+
* The player who triggered the redo action.
|
3476
|
+
*/
|
3477
|
+
readonly player_index: PlayerIndex
|
3478
|
+
/**
|
3479
|
+
* The context of the redo action.
|
3480
|
+
*/
|
3481
|
+
readonly actions: UndoRedoAction[]
|
3482
|
+
/**
|
3483
|
+
* Identifier of the event
|
3484
|
+
*/
|
3485
|
+
readonly name: typeof defines.events.on_redo_applied
|
3486
|
+
/**
|
3487
|
+
* Tick the event was generated.
|
3488
|
+
*/
|
3489
|
+
readonly tick: uint
|
3490
|
+
}
|
3327
3491
|
/**
|
3328
3492
|
* Called when research is cancelled.
|
3329
|
-
* @see {@link https://lua-api.factorio.com/
|
3493
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_research_cancelled Online documentation}
|
3330
3494
|
*/
|
3331
3495
|
interface OnResearchCancelledEvent extends EventData {
|
3332
3496
|
/**
|
@@ -3348,7 +3512,7 @@ declare module "factorio:runtime" {
|
|
3348
3512
|
}
|
3349
3513
|
/**
|
3350
3514
|
* Called when a research finishes.
|
3351
|
-
* @see {@link https://lua-api.factorio.com/
|
3515
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_research_finished Online documentation}
|
3352
3516
|
*/
|
3353
3517
|
interface OnResearchFinishedEvent extends EventData {
|
3354
3518
|
/**
|
@@ -3368,9 +3532,27 @@ declare module "factorio:runtime" {
|
|
3368
3532
|
*/
|
3369
3533
|
readonly tick: uint
|
3370
3534
|
}
|
3535
|
+
/**
|
3536
|
+
* Called when research is moved forwards or backwards in the research queue.
|
3537
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_research_moved Online documentation}
|
3538
|
+
*/
|
3539
|
+
interface OnResearchMovedEvent extends EventData {
|
3540
|
+
/**
|
3541
|
+
* The force whose research was re-arranged.
|
3542
|
+
*/
|
3543
|
+
readonly force: LuaForce
|
3544
|
+
/**
|
3545
|
+
* Identifier of the event
|
3546
|
+
*/
|
3547
|
+
readonly name: typeof defines.events.on_research_moved
|
3548
|
+
/**
|
3549
|
+
* Tick the event was generated.
|
3550
|
+
*/
|
3551
|
+
readonly tick: uint
|
3552
|
+
}
|
3371
3553
|
/**
|
3372
3554
|
* Called when a research is reversed (unresearched).
|
3373
|
-
* @see {@link https://lua-api.factorio.com/
|
3555
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_research_reversed Online documentation}
|
3374
3556
|
*/
|
3375
3557
|
interface OnResearchReversedEvent extends EventData {
|
3376
3558
|
/**
|
@@ -3392,7 +3574,7 @@ declare module "factorio:runtime" {
|
|
3392
3574
|
}
|
3393
3575
|
/**
|
3394
3576
|
* Called when a technology research starts.
|
3395
|
-
* @see {@link https://lua-api.factorio.com/
|
3577
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_research_started Online documentation}
|
3396
3578
|
*/
|
3397
3579
|
interface OnResearchStartedEvent extends EventData {
|
3398
3580
|
/**
|
@@ -3411,7 +3593,7 @@ declare module "factorio:runtime" {
|
|
3411
3593
|
}
|
3412
3594
|
/**
|
3413
3595
|
* Called when a resource entity reaches 0 or its minimum yield for infinite resources.
|
3414
|
-
* @see {@link https://lua-api.factorio.com/
|
3596
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_resource_depleted Online documentation}
|
3415
3597
|
*/
|
3416
3598
|
interface OnResourceDepletedEvent extends EventData {
|
3417
3599
|
readonly entity: LuaEntity
|
@@ -3428,7 +3610,7 @@ declare module "factorio:runtime" {
|
|
3428
3610
|
* Called when a construction robot builds an entity.
|
3429
3611
|
*
|
3430
3612
|
* Event filter: [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter]
|
3431
|
-
* @see {@link https://lua-api.factorio.com/
|
3613
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_robot_built_entity Online documentation}
|
3432
3614
|
*/
|
3433
3615
|
interface OnRobotBuiltEntityEvent extends EventData {
|
3434
3616
|
/**
|
@@ -3438,7 +3620,7 @@ declare module "factorio:runtime" {
|
|
3438
3620
|
/**
|
3439
3621
|
* The entity built.
|
3440
3622
|
*/
|
3441
|
-
readonly
|
3623
|
+
readonly entity: LuaEntity
|
3442
3624
|
/**
|
3443
3625
|
* The item used to do the building.
|
3444
3626
|
*/
|
@@ -3458,7 +3640,7 @@ declare module "factorio:runtime" {
|
|
3458
3640
|
}
|
3459
3641
|
/**
|
3460
3642
|
* Called after a robot builds tiles.
|
3461
|
-
* @see {@link https://lua-api.factorio.com/
|
3643
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_robot_built_tile Online documentation}
|
3462
3644
|
*/
|
3463
3645
|
interface OnRobotBuiltTileEvent extends EventData {
|
3464
3646
|
/**
|
@@ -3478,9 +3660,13 @@ declare module "factorio:runtime" {
|
|
3478
3660
|
*/
|
3479
3661
|
readonly item: LuaItemPrototype
|
3480
3662
|
/**
|
3481
|
-
* The
|
3663
|
+
* The quality the item used to build the tiles.
|
3482
3664
|
*/
|
3483
|
-
readonly
|
3665
|
+
readonly quality: LuaQualityPrototype
|
3666
|
+
/**
|
3667
|
+
* The inventory containing the stacks used to build the tiles.
|
3668
|
+
*/
|
3669
|
+
readonly inventory: LuaInventory
|
3484
3670
|
/**
|
3485
3671
|
* The surface the tile(s) are build on.
|
3486
3672
|
*/
|
@@ -3496,7 +3682,7 @@ declare module "factorio:runtime" {
|
|
3496
3682
|
}
|
3497
3683
|
/**
|
3498
3684
|
* Called directly after a robot explodes cliffs.
|
3499
|
-
* @see {@link https://lua-api.factorio.com/
|
3685
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_robot_exploded_cliff Online documentation}
|
3500
3686
|
*/
|
3501
3687
|
interface OnRobotExplodedCliffEvent extends EventData {
|
3502
3688
|
readonly robot: LuaEntity
|
@@ -3504,6 +3690,10 @@ declare module "factorio:runtime" {
|
|
3504
3690
|
* The cliff explosive used.
|
3505
3691
|
*/
|
3506
3692
|
readonly item: LuaItemPrototype
|
3693
|
+
/**
|
3694
|
+
* The quality of the cliff explosive used.
|
3695
|
+
*/
|
3696
|
+
readonly quality: LuaQualityPrototype
|
3507
3697
|
/**
|
3508
3698
|
* Identifier of the event
|
3509
3699
|
*/
|
@@ -3515,7 +3705,7 @@ declare module "factorio:runtime" {
|
|
3515
3705
|
}
|
3516
3706
|
/**
|
3517
3707
|
* Called when a robot mines an entity.
|
3518
|
-
* @see {@link https://lua-api.factorio.com/
|
3708
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_robot_mined Online documentation}
|
3519
3709
|
*/
|
3520
3710
|
interface OnRobotMinedEvent extends EventData {
|
3521
3711
|
/**
|
@@ -3543,7 +3733,7 @@ declare module "factorio:runtime" {
|
|
3543
3733
|
* The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
3544
3734
|
*
|
3545
3735
|
* Event filter: [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter]
|
3546
|
-
* @see {@link https://lua-api.factorio.com/
|
3736
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_robot_mined_entity Online documentation}
|
3547
3737
|
*/
|
3548
3738
|
interface OnRobotMinedEntityEvent extends EventData {
|
3549
3739
|
/**
|
@@ -3569,7 +3759,7 @@ declare module "factorio:runtime" {
|
|
3569
3759
|
}
|
3570
3760
|
/**
|
3571
3761
|
* Called after a robot mines tiles.
|
3572
|
-
* @see {@link https://lua-api.factorio.com/
|
3762
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_robot_mined_tile Online documentation}
|
3573
3763
|
*/
|
3574
3764
|
interface OnRobotMinedTileEvent extends EventData {
|
3575
3765
|
/**
|
@@ -3597,7 +3787,7 @@ declare module "factorio:runtime" {
|
|
3597
3787
|
* Called before a robot mines an entity.
|
3598
3788
|
*
|
3599
3789
|
* Event filter: [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter]
|
3600
|
-
* @see {@link https://lua-api.factorio.com/
|
3790
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_robot_pre_mined Online documentation}
|
3601
3791
|
*/
|
3602
3792
|
interface OnRobotPreMinedEvent extends EventData {
|
3603
3793
|
/**
|
@@ -3619,7 +3809,7 @@ declare module "factorio:runtime" {
|
|
3619
3809
|
}
|
3620
3810
|
/**
|
3621
3811
|
* Called when a rocket silo is ordered to be launched.
|
3622
|
-
* @see {@link https://lua-api.factorio.com/
|
3812
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_rocket_launch_ordered Online documentation}
|
3623
3813
|
*/
|
3624
3814
|
interface OnRocketLaunchOrderedEvent extends EventData {
|
3625
3815
|
readonly rocket: LuaEntity
|
@@ -3639,7 +3829,7 @@ declare module "factorio:runtime" {
|
|
3639
3829
|
}
|
3640
3830
|
/**
|
3641
3831
|
* Called when the rocket is launched.
|
3642
|
-
* @see {@link https://lua-api.factorio.com/
|
3832
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_rocket_launched Online documentation}
|
3643
3833
|
*/
|
3644
3834
|
interface OnRocketLaunchedEvent extends EventData {
|
3645
3835
|
readonly rocket: LuaEntity
|
@@ -3659,7 +3849,7 @@ declare module "factorio:runtime" {
|
|
3659
3849
|
}
|
3660
3850
|
/**
|
3661
3851
|
* Called when a runtime mod setting is changed by a player.
|
3662
|
-
* @see {@link https://lua-api.factorio.com/
|
3852
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_runtime_mod_setting_changed Online documentation}
|
3663
3853
|
*/
|
3664
3854
|
interface OnRuntimeModSettingChangedEvent extends EventData {
|
3665
3855
|
/**
|
@@ -3682,7 +3872,7 @@ declare module "factorio:runtime" {
|
|
3682
3872
|
}
|
3683
3873
|
/**
|
3684
3874
|
* Called just after a script inventory is resized.
|
3685
|
-
* @see {@link https://lua-api.factorio.com/
|
3875
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_script_inventory_resized Online documentation}
|
3686
3876
|
*/
|
3687
3877
|
interface OnScriptInventoryResizedEvent extends EventData {
|
3688
3878
|
/**
|
@@ -3717,7 +3907,7 @@ declare module "factorio:runtime" {
|
|
3717
3907
|
}
|
3718
3908
|
/**
|
3719
3909
|
* Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
|
3720
|
-
* @see {@link https://lua-api.factorio.com/
|
3910
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_script_path_request_finished Online documentation}
|
3721
3911
|
*/
|
3722
3912
|
interface OnScriptPathRequestFinishedEvent extends EventData {
|
3723
3913
|
/**
|
@@ -3743,7 +3933,7 @@ declare module "factorio:runtime" {
|
|
3743
3933
|
}
|
3744
3934
|
/**
|
3745
3935
|
* Called when a script trigger effect is triggered.
|
3746
|
-
* @see {@link https://lua-api.factorio.com/
|
3936
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_script_trigger_effect Online documentation}
|
3747
3937
|
*/
|
3748
3938
|
interface OnScriptTriggerEffectEvent extends EventData {
|
3749
3939
|
/**
|
@@ -3758,6 +3948,10 @@ declare module "factorio:runtime" {
|
|
3758
3948
|
readonly source_entity?: LuaEntity
|
3759
3949
|
readonly target_position?: MapPosition
|
3760
3950
|
readonly target_entity?: LuaEntity
|
3951
|
+
/**
|
3952
|
+
* The entity that originally caused the sequence of triggers
|
3953
|
+
*/
|
3954
|
+
readonly cause_entity?: LuaEntity
|
3761
3955
|
/**
|
3762
3956
|
* Identifier of the event
|
3763
3957
|
*/
|
@@ -3771,7 +3965,7 @@ declare module "factorio:runtime" {
|
|
3771
3965
|
* Called when an entity of type `radar` finishes scanning a sector.
|
3772
3966
|
*
|
3773
3967
|
* Event filter: [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter]
|
3774
|
-
* @see {@link https://lua-api.factorio.com/
|
3968
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_sector_scanned Online documentation}
|
3775
3969
|
*/
|
3776
3970
|
interface OnSectorScannedEvent extends EventData {
|
3777
3971
|
/**
|
@@ -3795,9 +3989,24 @@ declare module "factorio:runtime" {
|
|
3795
3989
|
*/
|
3796
3990
|
readonly tick: uint
|
3797
3991
|
}
|
3992
|
+
/**
|
3993
|
+
* Called when an individual segment of a SegmentedUnit is created.
|
3994
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_segment_entity_created Online documentation}
|
3995
|
+
*/
|
3996
|
+
interface OnSegmentEntityCreatedEvent extends EventData {
|
3997
|
+
readonly entity: LuaEntity
|
3998
|
+
/**
|
3999
|
+
* Identifier of the event
|
4000
|
+
*/
|
4001
|
+
readonly name: typeof defines.events.on_segment_entity_created
|
4002
|
+
/**
|
4003
|
+
* Tick the event was generated.
|
4004
|
+
*/
|
4005
|
+
readonly tick: uint
|
4006
|
+
}
|
3798
4007
|
/**
|
3799
4008
|
* Called after the selected entity changes for a given player.
|
3800
|
-
* @see {@link https://lua-api.factorio.com/
|
4009
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_selected_entity_changed Online documentation}
|
3801
4010
|
*/
|
3802
4011
|
interface OnSelectedEntityChangedEvent extends EventData {
|
3803
4012
|
/**
|
@@ -3817,9 +4026,203 @@ declare module "factorio:runtime" {
|
|
3817
4026
|
*/
|
3818
4027
|
readonly tick: uint
|
3819
4028
|
}
|
4029
|
+
/**
|
4030
|
+
* Called when a space platform builds an entity.
|
4031
|
+
*
|
4032
|
+
* Event filter: [LuaPlatformBuiltEntityEventFilter](LuaPlatformBuiltEntityEventFilter]
|
4033
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_space_platform_built_entity Online documentation}
|
4034
|
+
*/
|
4035
|
+
interface OnSpacePlatformBuiltEntityEvent extends EventData {
|
4036
|
+
/**
|
4037
|
+
* The platform that did the building.
|
4038
|
+
*/
|
4039
|
+
readonly platform: LuaSpacePlatform
|
4040
|
+
/**
|
4041
|
+
* The entity built.
|
4042
|
+
*/
|
4043
|
+
readonly entity: LuaEntity
|
4044
|
+
/**
|
4045
|
+
* The item used to do the building.
|
4046
|
+
*/
|
4047
|
+
readonly stack: LuaItemStack
|
4048
|
+
/**
|
4049
|
+
* The tags associated with this entity if any.
|
4050
|
+
*/
|
4051
|
+
readonly tags?: Tags
|
4052
|
+
/**
|
4053
|
+
* Identifier of the event
|
4054
|
+
*/
|
4055
|
+
readonly name: typeof defines.events.on_space_platform_built_entity
|
4056
|
+
/**
|
4057
|
+
* Tick the event was generated.
|
4058
|
+
*/
|
4059
|
+
readonly tick: uint
|
4060
|
+
}
|
4061
|
+
/**
|
4062
|
+
* Called after a space platform builds tiles.
|
4063
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_space_platform_built_tile Online documentation}
|
4064
|
+
*/
|
4065
|
+
interface OnSpacePlatformBuiltTileEvent extends EventData {
|
4066
|
+
/**
|
4067
|
+
* The platform.
|
4068
|
+
*/
|
4069
|
+
readonly platform: LuaSpacePlatform
|
4070
|
+
/**
|
4071
|
+
* The position data.
|
4072
|
+
*/
|
4073
|
+
readonly tiles: OldTileAndPosition[]
|
4074
|
+
/**
|
4075
|
+
* The tile prototype that was placed.
|
4076
|
+
*/
|
4077
|
+
readonly tile: LuaTilePrototype
|
4078
|
+
/**
|
4079
|
+
* The item type used to build the tiles.
|
4080
|
+
*/
|
4081
|
+
readonly item: LuaItemPrototype
|
4082
|
+
/**
|
4083
|
+
* The quality the item used to build the tiles.
|
4084
|
+
*/
|
4085
|
+
readonly quality: LuaQualityPrototype
|
4086
|
+
/**
|
4087
|
+
* The inventory containing the stacks used to build the tiles.
|
4088
|
+
*/
|
4089
|
+
readonly inventory: LuaInventory
|
4090
|
+
/**
|
4091
|
+
* The surface the tile(s) are build on.
|
4092
|
+
*/
|
4093
|
+
readonly surface_index: SurfaceIndex
|
4094
|
+
/**
|
4095
|
+
* Identifier of the event
|
4096
|
+
*/
|
4097
|
+
readonly name: typeof defines.events.on_space_platform_built_tile
|
4098
|
+
/**
|
4099
|
+
* Tick the event was generated.
|
4100
|
+
*/
|
4101
|
+
readonly tick: uint
|
4102
|
+
}
|
4103
|
+
/**
|
4104
|
+
* Called when a space platform changes state
|
4105
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_space_platform_changed_state Online documentation}
|
4106
|
+
*/
|
4107
|
+
interface OnSpacePlatformChangedStateEvent extends EventData {
|
4108
|
+
readonly platform: LuaSpacePlatform
|
4109
|
+
readonly old_state: defines.space_platform_state
|
4110
|
+
/**
|
4111
|
+
* Identifier of the event
|
4112
|
+
*/
|
4113
|
+
readonly name: typeof defines.events.on_space_platform_changed_state
|
4114
|
+
/**
|
4115
|
+
* Tick the event was generated.
|
4116
|
+
*/
|
4117
|
+
readonly tick: uint
|
4118
|
+
}
|
4119
|
+
/**
|
4120
|
+
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
4121
|
+
*
|
4122
|
+
* After this event any items in the buffer will be transferred into the platform as if they came from mining the entity.
|
4123
|
+
*
|
4124
|
+
* 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.
|
4125
|
+
*
|
4126
|
+
* Event filter: [LuaPlatformMinedEntityEventFilter](LuaPlatformMinedEntityEventFilter]
|
4127
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_space_platform_mined_entity Online documentation}
|
4128
|
+
*/
|
4129
|
+
interface OnSpacePlatformMinedEntityEvent extends EventData {
|
4130
|
+
/**
|
4131
|
+
* The platform doing the mining.
|
4132
|
+
*/
|
4133
|
+
readonly platform: LuaSpacePlatform
|
4134
|
+
/**
|
4135
|
+
* The entity that has been mined.
|
4136
|
+
*/
|
4137
|
+
readonly entity: LuaEntity
|
4138
|
+
/**
|
4139
|
+
* The temporary inventory that holds the result of mining the entity.
|
4140
|
+
*/
|
4141
|
+
readonly buffer: LuaInventory
|
4142
|
+
/**
|
4143
|
+
* Identifier of the event
|
4144
|
+
*/
|
4145
|
+
readonly name: typeof defines.events.on_space_platform_mined_entity
|
4146
|
+
/**
|
4147
|
+
* Tick the event was generated.
|
4148
|
+
*/
|
4149
|
+
readonly tick: uint
|
4150
|
+
}
|
4151
|
+
/**
|
4152
|
+
* Called when a platform mines an entity.
|
4153
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_space_platform_mined_item Online documentation}
|
4154
|
+
*/
|
4155
|
+
interface OnSpacePlatformMinedItemEvent extends EventData {
|
4156
|
+
/**
|
4157
|
+
* The platform that did the mining.
|
4158
|
+
*/
|
4159
|
+
readonly platform: LuaSpacePlatform
|
4160
|
+
/**
|
4161
|
+
* The entity the platform just picked up.
|
4162
|
+
*/
|
4163
|
+
readonly item_stack: SimpleItemStack
|
4164
|
+
/**
|
4165
|
+
* Identifier of the event
|
4166
|
+
*/
|
4167
|
+
readonly name: typeof defines.events.on_space_platform_mined_item
|
4168
|
+
/**
|
4169
|
+
* Tick the event was generated.
|
4170
|
+
*/
|
4171
|
+
readonly tick: uint
|
4172
|
+
}
|
4173
|
+
/**
|
4174
|
+
* Called after a platform mines tiles.
|
4175
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_space_platform_mined_tile Online documentation}
|
4176
|
+
*/
|
4177
|
+
interface OnSpacePlatformMinedTileEvent extends EventData {
|
4178
|
+
/**
|
4179
|
+
* The platform.
|
4180
|
+
*/
|
4181
|
+
readonly platform: LuaSpacePlatform
|
4182
|
+
/**
|
4183
|
+
* The position data.
|
4184
|
+
*/
|
4185
|
+
readonly tiles: OldTileAndPosition[]
|
4186
|
+
/**
|
4187
|
+
* The surface the tile(s) were mined on.
|
4188
|
+
*/
|
4189
|
+
readonly surface_index: SurfaceIndex
|
4190
|
+
/**
|
4191
|
+
* Identifier of the event
|
4192
|
+
*/
|
4193
|
+
readonly name: typeof defines.events.on_space_platform_mined_tile
|
4194
|
+
/**
|
4195
|
+
* Tick the event was generated.
|
4196
|
+
*/
|
4197
|
+
readonly tick: uint
|
4198
|
+
}
|
4199
|
+
/**
|
4200
|
+
* Called before a platform mines an entity.
|
4201
|
+
*
|
4202
|
+
* Event filter: [LuaPrePlatformMinedEntityEventFilter](LuaPrePlatformMinedEntityEventFilter]
|
4203
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_space_platform_pre_mined Online documentation}
|
4204
|
+
*/
|
4205
|
+
interface OnSpacePlatformPreMinedEvent extends EventData {
|
4206
|
+
/**
|
4207
|
+
* The platform that's about to do the mining.
|
4208
|
+
*/
|
4209
|
+
readonly platform: LuaSpacePlatform
|
4210
|
+
/**
|
4211
|
+
* The entity which is about to be mined.
|
4212
|
+
*/
|
4213
|
+
readonly entity: LuaEntity
|
4214
|
+
/**
|
4215
|
+
* Identifier of the event
|
4216
|
+
*/
|
4217
|
+
readonly name: typeof defines.events.on_space_platform_pre_mined
|
4218
|
+
/**
|
4219
|
+
* Tick the event was generated.
|
4220
|
+
*/
|
4221
|
+
readonly tick: uint
|
4222
|
+
}
|
3820
4223
|
/**
|
3821
4224
|
* Called when a spider finishes moving to its autopilot position.
|
3822
|
-
* @see {@link https://lua-api.factorio.com/
|
4225
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_spider_command_completed Online documentation}
|
3823
4226
|
*/
|
3824
4227
|
interface OnSpiderCommandCompletedEvent extends EventData {
|
3825
4228
|
/**
|
@@ -3837,7 +4240,7 @@ declare module "factorio:runtime" {
|
|
3837
4240
|
}
|
3838
4241
|
/**
|
3839
4242
|
* 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.
|
3840
|
-
* @see {@link https://lua-api.factorio.com/
|
4243
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_string_translated Online documentation}
|
3841
4244
|
*/
|
3842
4245
|
interface OnStringTranslatedEvent extends EventData {
|
3843
4246
|
/**
|
@@ -3871,7 +4274,7 @@ declare module "factorio:runtime" {
|
|
3871
4274
|
}
|
3872
4275
|
/**
|
3873
4276
|
* Called just after a surface is cleared (all entities removed and all chunks deleted).
|
3874
|
-
* @see {@link https://lua-api.factorio.com/
|
4277
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_surface_cleared Online documentation}
|
3875
4278
|
*/
|
3876
4279
|
interface OnSurfaceClearedEvent extends EventData {
|
3877
4280
|
readonly surface_index: SurfaceIndex
|
@@ -3888,7 +4291,7 @@ declare module "factorio:runtime" {
|
|
3888
4291
|
* Called when a surface is created.
|
3889
4292
|
*
|
3890
4293
|
* This is not called when the default surface is created as it will always exist.
|
3891
|
-
* @see {@link https://lua-api.factorio.com/
|
4294
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_surface_created Online documentation}
|
3892
4295
|
*/
|
3893
4296
|
interface OnSurfaceCreatedEvent extends EventData {
|
3894
4297
|
readonly surface_index: SurfaceIndex
|
@@ -3903,7 +4306,7 @@ declare module "factorio:runtime" {
|
|
3903
4306
|
}
|
3904
4307
|
/**
|
3905
4308
|
* Called after a surface is deleted.
|
3906
|
-
* @see {@link https://lua-api.factorio.com/
|
4309
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_surface_deleted Online documentation}
|
3907
4310
|
*/
|
3908
4311
|
interface OnSurfaceDeletedEvent extends EventData {
|
3909
4312
|
readonly surface_index: SurfaceIndex
|
@@ -3918,7 +4321,7 @@ declare module "factorio:runtime" {
|
|
3918
4321
|
}
|
3919
4322
|
/**
|
3920
4323
|
* Called after a surface is imported via the map editor.
|
3921
|
-
* @see {@link https://lua-api.factorio.com/
|
4324
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_surface_imported Online documentation}
|
3922
4325
|
*/
|
3923
4326
|
interface OnSurfaceImportedEvent extends EventData {
|
3924
4327
|
readonly surface_index: SurfaceIndex
|
@@ -3937,7 +4340,7 @@ declare module "factorio:runtime" {
|
|
3937
4340
|
}
|
3938
4341
|
/**
|
3939
4342
|
* Called when a surface is renamed.
|
3940
|
-
* @see {@link https://lua-api.factorio.com/
|
4343
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_surface_renamed Online documentation}
|
3941
4344
|
*/
|
3942
4345
|
interface OnSurfaceRenamedEvent extends EventData {
|
3943
4346
|
readonly surface_index: SurfaceIndex
|
@@ -3954,7 +4357,7 @@ declare module "factorio:runtime" {
|
|
3954
4357
|
}
|
3955
4358
|
/**
|
3956
4359
|
* Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
|
3957
|
-
* @see {@link https://lua-api.factorio.com/
|
4360
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_technology_effects_reset Online documentation}
|
3958
4361
|
*/
|
3959
4362
|
interface OnTechnologyEffectsResetEvent extends EventData {
|
3960
4363
|
readonly force: LuaForce
|
@@ -3969,7 +4372,7 @@ declare module "factorio:runtime" {
|
|
3969
4372
|
}
|
3970
4373
|
/**
|
3971
4374
|
* It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
|
3972
|
-
* @see {@link https://lua-api.factorio.com/
|
4375
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_tick Online documentation}
|
3973
4376
|
*/
|
3974
4377
|
interface OnTickEvent extends EventData {
|
3975
4378
|
/**
|
@@ -3983,7 +4386,7 @@ declare module "factorio:runtime" {
|
|
3983
4386
|
}
|
3984
4387
|
/**
|
3985
4388
|
* Called when a train changes state (started to stopped and vice versa)
|
3986
|
-
* @see {@link https://lua-api.factorio.com/
|
4389
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_train_changed_state Online documentation}
|
3987
4390
|
*/
|
3988
4391
|
interface OnTrainChangedStateEvent extends EventData {
|
3989
4392
|
readonly train: LuaTrain
|
@@ -3999,7 +4402,7 @@ declare module "factorio:runtime" {
|
|
3999
4402
|
}
|
4000
4403
|
/**
|
4001
4404
|
* Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
|
4002
|
-
* @see {@link https://lua-api.factorio.com/
|
4405
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_train_created Online documentation}
|
4003
4406
|
*/
|
4004
4407
|
interface OnTrainCreatedEvent extends EventData {
|
4005
4408
|
readonly train: LuaTrain
|
@@ -4022,7 +4425,7 @@ declare module "factorio:runtime" {
|
|
4022
4425
|
}
|
4023
4426
|
/**
|
4024
4427
|
* Called when a trains schedule is changed either by the player or through script.
|
4025
|
-
* @see {@link https://lua-api.factorio.com/
|
4428
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_train_schedule_changed Online documentation}
|
4026
4429
|
*/
|
4027
4430
|
interface OnTrainScheduleChangedEvent extends EventData {
|
4028
4431
|
readonly train: LuaTrain
|
@@ -4041,7 +4444,7 @@ declare module "factorio:runtime" {
|
|
4041
4444
|
}
|
4042
4445
|
/**
|
4043
4446
|
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.
|
4044
|
-
* @see {@link https://lua-api.factorio.com/
|
4447
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_trigger_created_entity Online documentation}
|
4045
4448
|
*/
|
4046
4449
|
interface OnTriggerCreatedEntityEvent extends EventData {
|
4047
4450
|
readonly entity: LuaEntity
|
@@ -4057,7 +4460,7 @@ declare module "factorio:runtime" {
|
|
4057
4460
|
}
|
4058
4461
|
/**
|
4059
4462
|
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=true`.
|
4060
|
-
* @see {@link https://lua-api.factorio.com/
|
4463
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_trigger_fired_artillery Online documentation}
|
4061
4464
|
*/
|
4062
4465
|
interface OnTriggerFiredArtilleryEvent extends EventData {
|
4063
4466
|
readonly entity: LuaEntity
|
@@ -4071,13 +4474,35 @@ declare module "factorio:runtime" {
|
|
4071
4474
|
*/
|
4072
4475
|
readonly tick: uint
|
4073
4476
|
}
|
4477
|
+
/**
|
4478
|
+
* Called when the player triggers "undo".
|
4479
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_undo_applied Online documentation}
|
4480
|
+
*/
|
4481
|
+
interface OnUndoAppliedEvent extends EventData {
|
4482
|
+
/**
|
4483
|
+
* The player who triggered the undo action.
|
4484
|
+
*/
|
4485
|
+
readonly player_index: PlayerIndex
|
4486
|
+
/**
|
4487
|
+
* The context of the undo action.
|
4488
|
+
*/
|
4489
|
+
readonly actions: UndoRedoAction[]
|
4490
|
+
/**
|
4491
|
+
* Identifier of the event
|
4492
|
+
*/
|
4493
|
+
readonly name: typeof defines.events.on_undo_applied
|
4494
|
+
/**
|
4495
|
+
* Tick the event was generated.
|
4496
|
+
*/
|
4497
|
+
readonly tick: uint
|
4498
|
+
}
|
4074
4499
|
/**
|
4075
4500
|
* Called when a unit is added to a unit group.
|
4076
|
-
* @see {@link https://lua-api.factorio.com/
|
4501
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_unit_added_to_group Online documentation}
|
4077
4502
|
*/
|
4078
4503
|
interface OnUnitAddedToGroupEvent extends EventData {
|
4079
4504
|
readonly unit: LuaEntity
|
4080
|
-
readonly group:
|
4505
|
+
readonly group: LuaCommandable
|
4081
4506
|
/**
|
4082
4507
|
* Identifier of the event
|
4083
4508
|
*/
|
@@ -4089,10 +4514,10 @@ declare module "factorio:runtime" {
|
|
4089
4514
|
}
|
4090
4515
|
/**
|
4091
4516
|
* Called when a new unit group is created, before any members are added to it.
|
4092
|
-
* @see {@link https://lua-api.factorio.com/
|
4517
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_unit_group_created Online documentation}
|
4093
4518
|
*/
|
4094
4519
|
interface OnUnitGroupCreatedEvent extends EventData {
|
4095
|
-
readonly group:
|
4520
|
+
readonly group: LuaCommandable
|
4096
4521
|
/**
|
4097
4522
|
* Identifier of the event
|
4098
4523
|
*/
|
@@ -4104,10 +4529,10 @@ declare module "factorio:runtime" {
|
|
4104
4529
|
}
|
4105
4530
|
/**
|
4106
4531
|
* Called when a unit group finishes gathering and starts executing its command.
|
4107
|
-
* @see {@link https://lua-api.factorio.com/
|
4532
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_unit_group_finished_gathering Online documentation}
|
4108
4533
|
*/
|
4109
4534
|
interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
4110
|
-
readonly group:
|
4535
|
+
readonly group: LuaCommandable
|
4111
4536
|
/**
|
4112
4537
|
* Identifier of the event
|
4113
4538
|
*/
|
@@ -4119,11 +4544,11 @@ declare module "factorio:runtime" {
|
|
4119
4544
|
}
|
4120
4545
|
/**
|
4121
4546
|
* Called when a unit is removed from a unit group.
|
4122
|
-
* @see {@link https://lua-api.factorio.com/
|
4547
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_unit_removed_from_group Online documentation}
|
4123
4548
|
*/
|
4124
4549
|
interface OnUnitRemovedFromGroupEvent extends EventData {
|
4125
4550
|
readonly unit: LuaEntity
|
4126
|
-
readonly group:
|
4551
|
+
readonly group: LuaCommandable
|
4127
4552
|
/**
|
4128
4553
|
* Identifier of the event
|
4129
4554
|
*/
|
@@ -4135,7 +4560,7 @@ declare module "factorio:runtime" {
|
|
4135
4560
|
}
|
4136
4561
|
/**
|
4137
4562
|
* Called when a worker (construction or logistic) robot expires through a lack of energy.
|
4138
|
-
* @see {@link https://lua-api.factorio.com/
|
4563
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#on_worker_robot_expired Online documentation}
|
4139
4564
|
*/
|
4140
4565
|
interface OnWorkerRobotExpiredEvent extends EventData {
|
4141
4566
|
readonly robot: LuaEntity
|
@@ -4152,7 +4577,7 @@ declare module "factorio:runtime" {
|
|
4152
4577
|
* A static event mods can use to tell other mods they built something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_built LuaBootstrap::raise_script_built}, or when `raise_built` is passed to {@link LuaSurface#create_entity LuaSurface::create_entity}.
|
4153
4578
|
*
|
4154
4579
|
* Event filter: [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter]
|
4155
|
-
* @see {@link https://lua-api.factorio.com/
|
4580
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#script_raised_built Online documentation}
|
4156
4581
|
*/
|
4157
4582
|
interface ScriptRaisedBuiltEvent extends EventData {
|
4158
4583
|
/**
|
@@ -4172,7 +4597,7 @@ declare module "factorio:runtime" {
|
|
4172
4597
|
* A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_destroy LuaBootstrap::raise_script_destroy}, or when `raise_destroy` is passed to {@link LuaEntity#destroy LuaEntity::destroy}.
|
4173
4598
|
*
|
4174
4599
|
* Event filter: [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter]
|
4175
|
-
* @see {@link https://lua-api.factorio.com/
|
4600
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#script_raised_destroy Online documentation}
|
4176
4601
|
*/
|
4177
4602
|
interface ScriptRaisedDestroyEvent extends EventData {
|
4178
4603
|
/**
|
@@ -4192,7 +4617,7 @@ declare module "factorio:runtime" {
|
|
4192
4617
|
* A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_revive LuaBootstrap::raise_script_revive}, or when `raise_revive` is passed to {@link LuaEntity#revive LuaEntity::revive}.
|
4193
4618
|
*
|
4194
4619
|
* Event filter: [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter]
|
4195
|
-
* @see {@link https://lua-api.factorio.com/
|
4620
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#script_raised_revive Online documentation}
|
4196
4621
|
*/
|
4197
4622
|
interface ScriptRaisedReviveEvent extends EventData {
|
4198
4623
|
/**
|
@@ -4214,7 +4639,7 @@ declare module "factorio:runtime" {
|
|
4214
4639
|
}
|
4215
4640
|
/**
|
4216
4641
|
* 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}.
|
4217
|
-
* @see {@link https://lua-api.factorio.com/
|
4642
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#script_raised_set_tiles Online documentation}
|
4218
4643
|
*/
|
4219
4644
|
interface ScriptRaisedSetTilesEvent extends EventData {
|
4220
4645
|
/**
|
@@ -4238,7 +4663,7 @@ declare module "factorio:runtime" {
|
|
4238
4663
|
* A static event mods can use to tell other mods they teleported something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_teleported LuaBootstrap::raise_script_teleported}, or when `raise_teleported` is passed to {@link LuaControl#teleport LuaControl::teleport}.
|
4239
4664
|
*
|
4240
4665
|
* Event filter: [LuaScriptRaisedTeleportedEventFilter](LuaScriptRaisedTeleportedEventFilter]
|
4241
|
-
* @see {@link https://lua-api.factorio.com/
|
4666
|
+
* @see {@link https://lua-api.factorio.com/2.0.12/events.html#script_raised_teleported Online documentation}
|
4242
4667
|
*/
|
4243
4668
|
interface ScriptRaisedTeleportedEvent extends EventData {
|
4244
4669
|
/**
|