typed-factorio 0.18.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- package/Changelog.md +14 -0
- package/generated/builtin-types.d.ts +1 -3
- package/generated/classes.d.ts +5242 -6088
- package/generated/concepts.d.ts +1923 -1205
- package/generated/defines.d.ts +464 -163
- package/generated/events.d.ts +2061 -776
- package/generated/global-objects.d.ts +1 -2
- package/package.json +1 -2
- package/runtime/util.d.ts +12 -12
package/generated/events.d.ts
CHANGED
@@ -8,17 +8,29 @@
|
|
8
8
|
* {@link https://lua-api.factorio.com/latest/events.html#CustomInputEvent View documentation}
|
9
9
|
*/
|
10
10
|
interface CustomInputEvent extends EventData {
|
11
|
-
/**
|
11
|
+
/**
|
12
|
+
* The player that activated the custom input.
|
13
|
+
*/
|
12
14
|
readonly player_index: uint
|
13
|
-
/**
|
15
|
+
/**
|
16
|
+
* The prototype name of the custom input that was activated.
|
17
|
+
*/
|
14
18
|
readonly input_name: string
|
15
|
-
/**
|
16
|
-
|
17
|
-
|
19
|
+
/**
|
20
|
+
* The mouse cursor position when the custom input was activated.
|
21
|
+
*/
|
22
|
+
readonly cursor_position: MapPositionTable
|
23
|
+
/**
|
24
|
+
* Information about the prototype that is selected when the custom input is used. `nil` if none is selected.
|
25
|
+
*/
|
18
26
|
readonly selected_prototype?: SelectedPrototypeData
|
19
|
-
/**
|
27
|
+
/**
|
28
|
+
* Identifier of the event
|
29
|
+
*/
|
20
30
|
readonly name: string
|
21
|
-
/**
|
31
|
+
/**
|
32
|
+
* Tick the event was generated.
|
33
|
+
*/
|
22
34
|
readonly tick: uint
|
23
35
|
}
|
24
36
|
|
@@ -28,14 +40,22 @@ interface CustomInputEvent extends EventData {
|
|
28
40
|
* {@link https://lua-api.factorio.com/latest/events.html#on_ai_command_completed View documentation}
|
29
41
|
*/
|
30
42
|
interface OnAiCommandCompletedEvent extends EventData {
|
31
|
-
/**
|
43
|
+
/**
|
44
|
+
* unit_number/group_number of the unit/group which just completed a command.
|
45
|
+
*/
|
32
46
|
readonly unit_number: uint
|
33
47
|
readonly result: defines.behavior_result
|
34
|
-
/**
|
48
|
+
/**
|
49
|
+
* Was this command generated by a distraction.
|
50
|
+
*/
|
35
51
|
readonly was_distracted: boolean
|
36
|
-
/**
|
52
|
+
/**
|
53
|
+
* Identifier of the event
|
54
|
+
*/
|
37
55
|
readonly name: typeof defines.events.on_ai_command_completed
|
38
|
-
/**
|
56
|
+
/**
|
57
|
+
* Tick the event was generated.
|
58
|
+
*/
|
39
59
|
readonly tick: uint
|
40
60
|
}
|
41
61
|
|
@@ -55,26 +75,34 @@ interface OnAreaClonedEvent extends EventData {
|
|
55
75
|
readonly clone_decoratives: boolean
|
56
76
|
readonly clear_destination_entities: boolean
|
57
77
|
readonly clear_destination_decoratives: boolean
|
58
|
-
/**
|
78
|
+
/**
|
79
|
+
* Identifier of the event
|
80
|
+
*/
|
59
81
|
readonly name: typeof defines.events.on_area_cloned
|
60
|
-
/**
|
82
|
+
/**
|
83
|
+
* Tick the event was generated.
|
84
|
+
*/
|
61
85
|
readonly tick: uint
|
62
86
|
}
|
63
87
|
|
64
88
|
/**
|
65
89
|
* Called when a biter migration builds a base.
|
66
90
|
*
|
67
|
-
* **Note**: This will be called multiple times for each migration, once for every biter that is sacrificed to build
|
68
|
-
* part of the new base.
|
69
|
-
*
|
70
91
|
* {@link https://lua-api.factorio.com/latest/events.html#on_biter_base_built View documentation}
|
92
|
+
* @remarks This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
71
93
|
*/
|
72
94
|
interface OnBiterBaseBuiltEvent extends EventData {
|
73
|
-
/**
|
95
|
+
/**
|
96
|
+
* The entity that was built.
|
97
|
+
*/
|
74
98
|
readonly entity: LuaEntity
|
75
|
-
/**
|
99
|
+
/**
|
100
|
+
* Identifier of the event
|
101
|
+
*/
|
76
102
|
readonly name: typeof defines.events.on_biter_base_built
|
77
|
-
/**
|
103
|
+
/**
|
104
|
+
* Tick the event was generated.
|
105
|
+
*/
|
78
106
|
readonly tick: uint
|
79
107
|
}
|
80
108
|
|
@@ -95,9 +123,13 @@ interface OnBrushClonedEvent extends EventData {
|
|
95
123
|
readonly clone_decoratives: boolean
|
96
124
|
readonly clear_destination_entities: boolean
|
97
125
|
readonly clear_destination_decoratives: boolean
|
98
|
-
/**
|
126
|
+
/**
|
127
|
+
* Identifier of the event
|
128
|
+
*/
|
99
129
|
readonly name: typeof defines.events.on_brush_cloned
|
100
|
-
/**
|
130
|
+
/**
|
131
|
+
* Tick the event was generated.
|
132
|
+
*/
|
101
133
|
readonly tick: uint
|
102
134
|
}
|
103
135
|
|
@@ -107,13 +139,21 @@ interface OnBrushClonedEvent extends EventData {
|
|
107
139
|
* {@link https://lua-api.factorio.com/latest/events.html#on_build_base_arrived View documentation}
|
108
140
|
*/
|
109
141
|
interface OnBuildBaseArrivedEvent extends EventData {
|
110
|
-
/**
|
142
|
+
/**
|
143
|
+
* The unit the command was assigned to.
|
144
|
+
*/
|
111
145
|
readonly unit?: LuaEntity
|
112
|
-
/**
|
146
|
+
/**
|
147
|
+
* The unit group the command was assigned to.
|
148
|
+
*/
|
113
149
|
readonly group?: LuaUnitGroup
|
114
|
-
/**
|
150
|
+
/**
|
151
|
+
* Identifier of the event
|
152
|
+
*/
|
115
153
|
readonly name: typeof defines.events.on_build_base_arrived
|
116
|
-
/**
|
154
|
+
/**
|
155
|
+
* Tick the event was generated.
|
156
|
+
*/
|
117
157
|
readonly tick: uint
|
118
158
|
}
|
119
159
|
|
@@ -126,28 +166,39 @@ interface OnBuiltEntityEvent extends EventData {
|
|
126
166
|
readonly created_entity: LuaEntity
|
127
167
|
readonly player_index: uint
|
128
168
|
readonly stack: LuaItemStack
|
129
|
-
/**
|
169
|
+
/**
|
170
|
+
* The item prototype used to build the entity. Note this won't exist in some situations (built from blueprint, undo, etc).
|
171
|
+
*/
|
130
172
|
readonly item?: LuaItemPrototype
|
131
|
-
/**
|
173
|
+
/**
|
174
|
+
* The tags associated with this entity if any.
|
175
|
+
*/
|
132
176
|
readonly tags?: Tags
|
133
|
-
/**
|
177
|
+
/**
|
178
|
+
* Identifier of the event
|
179
|
+
*/
|
134
180
|
readonly name: typeof defines.events.on_built_entity
|
135
|
-
/**
|
181
|
+
/**
|
182
|
+
* Tick the event was generated.
|
183
|
+
*/
|
136
184
|
readonly tick: uint
|
137
185
|
}
|
138
186
|
|
139
187
|
/**
|
140
|
-
* Called when the deconstruction of an entity is canceled. Can be filtered using
|
141
|
-
* {@link LuaEntityDeconstructionCancelledEventFilter}.
|
188
|
+
* Called when the deconstruction of an entity is canceled. Can be filtered using {@link LuaEntityDeconstructionCancelledEventFilter}.
|
142
189
|
*
|
143
190
|
* {@link https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction View documentation}
|
144
191
|
*/
|
145
192
|
interface OnCancelledDeconstructionEvent extends EventData {
|
146
193
|
readonly entity: LuaEntity
|
147
194
|
readonly player_index?: uint
|
148
|
-
/**
|
195
|
+
/**
|
196
|
+
* Identifier of the event
|
197
|
+
*/
|
149
198
|
readonly name: typeof defines.events.on_cancelled_deconstruction
|
150
|
-
/**
|
199
|
+
/**
|
200
|
+
* Tick the event was generated.
|
201
|
+
*/
|
151
202
|
readonly tick: uint
|
152
203
|
}
|
153
204
|
|
@@ -159,25 +210,34 @@ interface OnCancelledDeconstructionEvent extends EventData {
|
|
159
210
|
interface OnCancelledUpgradeEvent extends EventData {
|
160
211
|
readonly entity: LuaEntity
|
161
212
|
readonly player_index?: uint
|
162
|
-
/**
|
213
|
+
/**
|
214
|
+
* Identifier of the event
|
215
|
+
*/
|
163
216
|
readonly name: typeof defines.events.on_cancelled_upgrade
|
164
|
-
/**
|
217
|
+
/**
|
218
|
+
* Tick the event was generated.
|
219
|
+
*/
|
165
220
|
readonly tick: uint
|
166
221
|
}
|
167
222
|
|
168
223
|
/**
|
169
224
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
170
225
|
*
|
171
|
-
* **Note**: this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
172
|
-
*
|
173
226
|
* {@link https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired View documentation}
|
227
|
+
* @remarks this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
174
228
|
*/
|
175
229
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
176
|
-
/**
|
230
|
+
/**
|
231
|
+
* The corpse.
|
232
|
+
*/
|
177
233
|
readonly corpse: LuaEntity
|
178
|
-
/**
|
234
|
+
/**
|
235
|
+
* Identifier of the event
|
236
|
+
*/
|
179
237
|
readonly name: typeof defines.events.on_character_corpse_expired
|
180
|
-
/**
|
238
|
+
/**
|
239
|
+
* Tick the event was generated.
|
240
|
+
*/
|
181
241
|
readonly tick: uint
|
182
242
|
}
|
183
243
|
|
@@ -190,9 +250,13 @@ interface OnChartTagAddedEvent extends EventData {
|
|
190
250
|
readonly tag: LuaCustomChartTag
|
191
251
|
readonly force: LuaForce
|
192
252
|
readonly player_index?: uint
|
193
|
-
/**
|
253
|
+
/**
|
254
|
+
* Identifier of the event
|
255
|
+
*/
|
194
256
|
readonly name: typeof defines.events.on_chart_tag_added
|
195
|
-
/**
|
257
|
+
/**
|
258
|
+
* Tick the event was generated.
|
259
|
+
*/
|
196
260
|
readonly tick: uint
|
197
261
|
}
|
198
262
|
|
@@ -208,9 +272,13 @@ interface OnChartTagModifiedEvent extends EventData {
|
|
208
272
|
readonly old_text: string
|
209
273
|
readonly old_icon?: SignalID
|
210
274
|
readonly old_player?: uint
|
211
|
-
/**
|
275
|
+
/**
|
276
|
+
* Identifier of the event
|
277
|
+
*/
|
212
278
|
readonly name: typeof defines.events.on_chart_tag_modified
|
213
|
-
/**
|
279
|
+
/**
|
280
|
+
* Tick the event was generated.
|
281
|
+
*/
|
214
282
|
readonly tick: uint
|
215
283
|
}
|
216
284
|
|
@@ -223,9 +291,13 @@ interface OnChartTagRemovedEvent extends EventData {
|
|
223
291
|
readonly tag: LuaCustomChartTag
|
224
292
|
readonly force: LuaForce
|
225
293
|
readonly player_index?: uint
|
226
|
-
/**
|
294
|
+
/**
|
295
|
+
* Identifier of the event
|
296
|
+
*/
|
227
297
|
readonly name: typeof defines.events.on_chart_tag_removed
|
228
|
-
/**
|
298
|
+
/**
|
299
|
+
* Tick the event was generated.
|
300
|
+
*/
|
229
301
|
readonly tick: uint
|
230
302
|
}
|
231
303
|
|
@@ -237,27 +309,39 @@ interface OnChartTagRemovedEvent extends EventData {
|
|
237
309
|
interface OnChunkChartedEvent extends EventData {
|
238
310
|
readonly surface_index: uint
|
239
311
|
readonly position: ChunkPositionTable
|
240
|
-
/**
|
312
|
+
/**
|
313
|
+
* Area of the chunk.
|
314
|
+
*/
|
241
315
|
readonly area: BoundingBoxRead
|
242
316
|
readonly force: LuaForce
|
243
|
-
/**
|
317
|
+
/**
|
318
|
+
* Identifier of the event
|
319
|
+
*/
|
244
320
|
readonly name: typeof defines.events.on_chunk_charted
|
245
|
-
/**
|
321
|
+
/**
|
322
|
+
* Tick the event was generated.
|
323
|
+
*/
|
246
324
|
readonly tick: uint
|
247
325
|
}
|
248
326
|
|
249
327
|
/**
|
250
|
-
* Called when one or more chunks are deleted using {@link LuaSurface
|
328
|
+
* Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
251
329
|
*
|
252
330
|
* {@link https://lua-api.factorio.com/latest/events.html#on_chunk_deleted View documentation}
|
253
331
|
*/
|
254
332
|
interface OnChunkDeletedEvent extends EventData {
|
255
333
|
readonly surface_index: uint
|
256
|
-
/**
|
334
|
+
/**
|
335
|
+
* The chunks deleted.
|
336
|
+
*/
|
257
337
|
readonly positions: ChunkPositionTable[]
|
258
|
-
/**
|
338
|
+
/**
|
339
|
+
* Identifier of the event
|
340
|
+
*/
|
259
341
|
readonly name: typeof defines.events.on_chunk_deleted
|
260
|
-
/**
|
342
|
+
/**
|
343
|
+
* Tick the event was generated.
|
344
|
+
*/
|
261
345
|
readonly tick: uint
|
262
346
|
}
|
263
347
|
|
@@ -267,15 +351,25 @@ interface OnChunkDeletedEvent extends EventData {
|
|
267
351
|
* {@link https://lua-api.factorio.com/latest/events.html#on_chunk_generated View documentation}
|
268
352
|
*/
|
269
353
|
interface OnChunkGeneratedEvent extends EventData {
|
270
|
-
/**
|
354
|
+
/**
|
355
|
+
* Area of the chunk.
|
356
|
+
*/
|
271
357
|
readonly area: BoundingBoxRead
|
272
|
-
/**
|
358
|
+
/**
|
359
|
+
* Position of the chunk.
|
360
|
+
*/
|
273
361
|
readonly position: ChunkPositionTable
|
274
|
-
/**
|
362
|
+
/**
|
363
|
+
* The surface the chunk is on.
|
364
|
+
*/
|
275
365
|
readonly surface: LuaSurface
|
276
|
-
/**
|
366
|
+
/**
|
367
|
+
* Identifier of the event
|
368
|
+
*/
|
277
369
|
readonly name: typeof defines.events.on_chunk_generated
|
278
|
-
/**
|
370
|
+
/**
|
371
|
+
* Tick the event was generated.
|
372
|
+
*/
|
279
373
|
readonly tick: uint
|
280
374
|
}
|
281
375
|
|
@@ -286,29 +380,42 @@ interface OnChunkGeneratedEvent extends EventData {
|
|
286
380
|
*/
|
287
381
|
interface OnCombatRobotExpiredEvent extends EventData {
|
288
382
|
readonly robot: LuaEntity
|
289
|
-
/**
|
383
|
+
/**
|
384
|
+
* The entity that owns the robot if any.
|
385
|
+
*/
|
290
386
|
readonly owner?: LuaEntity
|
291
|
-
/**
|
387
|
+
/**
|
388
|
+
* Identifier of the event
|
389
|
+
*/
|
292
390
|
readonly name: typeof defines.events.on_combat_robot_expired
|
293
|
-
/**
|
391
|
+
/**
|
392
|
+
* Tick the event was generated.
|
393
|
+
*/
|
294
394
|
readonly tick: uint
|
295
395
|
}
|
296
396
|
|
297
397
|
/**
|
298
398
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
299
399
|
*
|
300
|
-
* **Note**: This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
301
|
-
*
|
302
400
|
* {@link https://lua-api.factorio.com/latest/events.html#on_console_chat View documentation}
|
401
|
+
* @remarks This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
303
402
|
*/
|
304
403
|
interface OnConsoleChatEvent extends EventData {
|
305
|
-
/**
|
404
|
+
/**
|
405
|
+
* The player doing the chatting, if any.
|
406
|
+
*/
|
306
407
|
readonly player_index?: uint
|
307
|
-
/**
|
408
|
+
/**
|
409
|
+
* The chat message that was sent.
|
410
|
+
*/
|
308
411
|
readonly message: string
|
309
|
-
/**
|
412
|
+
/**
|
413
|
+
* Identifier of the event
|
414
|
+
*/
|
310
415
|
readonly name: typeof defines.events.on_console_chat
|
311
|
-
/**
|
416
|
+
/**
|
417
|
+
* Tick the event was generated.
|
418
|
+
*/
|
312
419
|
readonly tick: uint
|
313
420
|
}
|
314
421
|
|
@@ -318,15 +425,25 @@ interface OnConsoleChatEvent extends EventData {
|
|
318
425
|
* {@link https://lua-api.factorio.com/latest/events.html#on_console_command View documentation}
|
319
426
|
*/
|
320
427
|
interface OnConsoleCommandEvent extends EventData {
|
321
|
-
/**
|
428
|
+
/**
|
429
|
+
* The player if any.
|
430
|
+
*/
|
322
431
|
readonly player_index?: uint
|
323
|
-
/**
|
432
|
+
/**
|
433
|
+
* The command as typed without the preceding forward slash ('/').
|
434
|
+
*/
|
324
435
|
readonly command: string
|
325
|
-
/**
|
436
|
+
/**
|
437
|
+
* The parameters provided if any.
|
438
|
+
*/
|
326
439
|
readonly parameters: string
|
327
|
-
/**
|
440
|
+
/**
|
441
|
+
* Identifier of the event
|
442
|
+
*/
|
328
443
|
readonly name: typeof defines.events.on_console_command
|
329
|
-
/**
|
444
|
+
/**
|
445
|
+
* Tick the event was generated.
|
446
|
+
*/
|
330
447
|
readonly tick: uint
|
331
448
|
}
|
332
449
|
|
@@ -336,11 +453,17 @@ interface OnConsoleCommandEvent extends EventData {
|
|
336
453
|
* {@link https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled View documentation}
|
337
454
|
*/
|
338
455
|
interface OnCutsceneCancelledEvent extends EventData {
|
339
|
-
/**
|
456
|
+
/**
|
457
|
+
* The player the cutscene was shown to.
|
458
|
+
*/
|
340
459
|
readonly player_index: uint
|
341
|
-
/**
|
460
|
+
/**
|
461
|
+
* Identifier of the event
|
462
|
+
*/
|
342
463
|
readonly name: typeof defines.events.on_cutscene_cancelled
|
343
|
-
/**
|
464
|
+
/**
|
465
|
+
* Tick the event was generated.
|
466
|
+
*/
|
344
467
|
readonly tick: uint
|
345
468
|
}
|
346
469
|
|
@@ -349,34 +472,44 @@ interface OnCutsceneCancelledEvent extends EventData {
|
|
349
472
|
*
|
350
473
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
351
474
|
*
|
352
|
-
* **Note**: Due to implementation omission, waypoint_index is 0-based.
|
353
|
-
*
|
354
475
|
* {@link https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached View documentation}
|
476
|
+
* @remarks Due to implementation omission, waypoint_index is 0-based.
|
355
477
|
*/
|
356
478
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
357
|
-
/**
|
479
|
+
/**
|
480
|
+
* The player index of the player viewing the cutscene.
|
481
|
+
*/
|
358
482
|
readonly player_index: uint
|
359
|
-
/**
|
483
|
+
/**
|
484
|
+
* The index of the waypoint we just completed.
|
485
|
+
*/
|
360
486
|
readonly waypoint_index: uint
|
361
|
-
/**
|
487
|
+
/**
|
488
|
+
* Identifier of the event
|
489
|
+
*/
|
362
490
|
readonly name: typeof defines.events.on_cutscene_waypoint_reached
|
363
|
-
/**
|
491
|
+
/**
|
492
|
+
* Tick the event was generated.
|
493
|
+
*/
|
364
494
|
readonly tick: uint
|
365
495
|
}
|
366
496
|
|
367
497
|
/**
|
368
498
|
* Called when the map difficulty settings are changed.
|
369
499
|
*
|
370
|
-
* **Note**: It's not guaranteed that both settings are changed - just that at least one has been changed.
|
371
|
-
*
|
372
500
|
* {@link https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed View documentation}
|
501
|
+
* @remarks It's not guaranteed that both settings are changed - just that at least one has been changed.
|
373
502
|
*/
|
374
503
|
interface OnDifficultySettingsChangedEvent extends EventData {
|
375
504
|
readonly old_recipe_difficulty: uint
|
376
505
|
readonly old_technology_difficulty: uint
|
377
|
-
/**
|
506
|
+
/**
|
507
|
+
* Identifier of the event
|
508
|
+
*/
|
378
509
|
readonly name: typeof defines.events.on_difficulty_settings_changed
|
379
|
-
/**
|
510
|
+
/**
|
511
|
+
* Tick the event was generated.
|
512
|
+
*/
|
380
513
|
readonly tick: uint
|
381
514
|
}
|
382
515
|
|
@@ -388,53 +521,79 @@ interface OnDifficultySettingsChangedEvent extends EventData {
|
|
388
521
|
interface OnEntityClonedEvent extends EventData {
|
389
522
|
readonly source: LuaEntity
|
390
523
|
readonly destination: LuaEntity
|
391
|
-
/**
|
524
|
+
/**
|
525
|
+
* Identifier of the event
|
526
|
+
*/
|
392
527
|
readonly name: typeof defines.events.on_entity_cloned
|
393
|
-
/**
|
528
|
+
/**
|
529
|
+
* Tick the event was generated.
|
530
|
+
*/
|
394
531
|
readonly tick: uint
|
395
532
|
}
|
396
533
|
|
397
534
|
/**
|
398
535
|
* Called when an entity is damaged. Can be filtered using {@link LuaEntityDamagedEventFilter}.
|
399
536
|
*
|
400
|
-
* **Note**: This is not called when an entities health is set directly by another mod.
|
401
|
-
*
|
402
537
|
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_damaged View documentation}
|
538
|
+
* @remarks This is not called when an entities health is set directly by another mod.
|
403
539
|
*/
|
404
540
|
interface OnEntityDamagedEvent extends EventData {
|
405
541
|
readonly entity: LuaEntity
|
406
542
|
readonly damage_type: LuaDamagePrototype
|
407
|
-
/**
|
543
|
+
/**
|
544
|
+
* The damage amount before resistances.
|
545
|
+
*/
|
408
546
|
readonly original_damage_amount: float
|
409
|
-
/**
|
547
|
+
/**
|
548
|
+
* The damage amount after resistances.
|
549
|
+
*/
|
410
550
|
readonly final_damage_amount: float
|
411
|
-
/**
|
551
|
+
/**
|
552
|
+
* The health of the entity after the damage was applied.
|
553
|
+
*/
|
412
554
|
readonly final_health: float
|
413
|
-
/**
|
555
|
+
/**
|
556
|
+
* The entity that did the attacking if available.
|
557
|
+
*/
|
414
558
|
readonly cause?: LuaEntity
|
415
|
-
/**
|
559
|
+
/**
|
560
|
+
* The force that did the attacking if any.
|
561
|
+
*/
|
416
562
|
readonly force?: LuaForce
|
417
|
-
/**
|
563
|
+
/**
|
564
|
+
* Identifier of the event
|
565
|
+
*/
|
418
566
|
readonly name: typeof defines.events.on_entity_damaged
|
419
|
-
/**
|
567
|
+
/**
|
568
|
+
* Tick the event was generated.
|
569
|
+
*/
|
420
570
|
readonly tick: uint
|
421
571
|
}
|
422
572
|
|
423
573
|
/**
|
424
|
-
* Called after an entity is destroyed that has been registered with
|
425
|
-
* {@link LuaBootstrap.register_on_entity_destroyed LuaBootstrap::register_on_entity_destroyed}
|
574
|
+
* Called after an entity is destroyed that has been registered with {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap::register_on_entity_destroyed}
|
426
575
|
*
|
427
|
-
*
|
428
|
-
* the next tick.
|
576
|
+
* at the end of the next tick.
|
429
577
|
*
|
430
578
|
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_destroyed View documentation}
|
579
|
+
* @remarks Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or
|
431
580
|
*/
|
432
581
|
interface OnEntityDestroyedEvent extends EventData {
|
582
|
+
/**
|
583
|
+
* The number returned by {@link LuaBootstrap#register_on_entity_destroyed register_on_entity_destroyed} to uniquely identify this entity during this event.
|
584
|
+
*/
|
433
585
|
readonly registration_number: uint64
|
586
|
+
/**
|
587
|
+
* The {@link LuaEntity#unit_number LuaEntity::unit_number} of the destroyed entity, if it had one.
|
588
|
+
*/
|
434
589
|
readonly unit_number?: uint
|
435
|
-
/**
|
590
|
+
/**
|
591
|
+
* Identifier of the event
|
592
|
+
*/
|
436
593
|
readonly name: typeof defines.events.on_entity_destroyed
|
437
|
-
/**
|
594
|
+
/**
|
595
|
+
* Tick the event was generated.
|
596
|
+
*/
|
438
597
|
readonly tick: uint
|
439
598
|
}
|
440
599
|
|
@@ -444,40 +603,62 @@ interface OnEntityDestroyedEvent extends EventData {
|
|
444
603
|
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_died View documentation}
|
445
604
|
*/
|
446
605
|
interface OnEntityDiedEvent extends EventData {
|
447
|
-
/**
|
606
|
+
/**
|
607
|
+
* The entity that died.
|
608
|
+
*/
|
448
609
|
readonly entity: LuaEntity
|
449
|
-
/**
|
610
|
+
/**
|
611
|
+
* The entity that did the killing if available.
|
612
|
+
*/
|
450
613
|
readonly cause?: LuaEntity
|
451
|
-
/**
|
614
|
+
/**
|
615
|
+
* The loot generated by this entity if any.
|
616
|
+
*/
|
452
617
|
readonly loot: LuaInventory
|
453
|
-
/**
|
618
|
+
/**
|
619
|
+
* The force that did the killing if any.
|
620
|
+
*/
|
454
621
|
readonly force?: LuaForce
|
455
|
-
/**
|
622
|
+
/**
|
623
|
+
* The damage type if any.
|
624
|
+
*/
|
456
625
|
readonly damage_type?: LuaDamagePrototype
|
457
|
-
/**
|
626
|
+
/**
|
627
|
+
* Identifier of the event
|
628
|
+
*/
|
458
629
|
readonly name: typeof defines.events.on_entity_died
|
459
|
-
/**
|
630
|
+
/**
|
631
|
+
* Tick the event was generated.
|
632
|
+
*/
|
460
633
|
readonly tick: uint
|
461
634
|
}
|
462
635
|
|
463
636
|
/**
|
464
637
|
* Called when one of an entity's personal logistic slots changes.
|
465
638
|
*
|
466
|
-
* **Note**: "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the
|
467
|
-
* request slots on logistic chests.
|
468
|
-
*
|
469
639
|
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed View documentation}
|
640
|
+
* @remarks "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
|
470
641
|
*/
|
471
642
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
472
|
-
/**
|
643
|
+
/**
|
644
|
+
* The player who changed the slot, or `nil` if changed by script.
|
645
|
+
*/
|
473
646
|
readonly player_index?: uint
|
474
|
-
/**
|
647
|
+
/**
|
648
|
+
* The entity for whom a logistic slot was changed.
|
649
|
+
*/
|
475
650
|
readonly entity: LuaEntity
|
476
|
-
/**
|
651
|
+
/**
|
652
|
+
* The slot index that was changed.
|
653
|
+
*/
|
477
654
|
readonly slot_index: uint
|
478
|
-
/**
|
655
|
+
/**
|
656
|
+
* Identifier of the event
|
657
|
+
*/
|
479
658
|
readonly name: typeof defines.events.on_entity_logistic_slot_changed
|
480
|
-
/**
|
659
|
+
/**
|
660
|
+
* Tick the event was generated.
|
661
|
+
*/
|
481
662
|
readonly tick: uint
|
482
663
|
}
|
483
664
|
|
@@ -487,14 +668,20 @@ interface OnEntityLogisticSlotChangedEvent extends EventData {
|
|
487
668
|
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_renamed View documentation}
|
488
669
|
*/
|
489
670
|
interface OnEntityRenamedEvent extends EventData {
|
490
|
-
/**
|
671
|
+
/**
|
672
|
+
* If by_script is true this will not be included.
|
673
|
+
*/
|
491
674
|
readonly player_index?: uint
|
492
675
|
readonly by_script: boolean
|
493
676
|
readonly entity: LuaEntity
|
494
677
|
readonly old_name: string
|
495
|
-
/**
|
678
|
+
/**
|
679
|
+
* Identifier of the event
|
680
|
+
*/
|
496
681
|
readonly name: typeof defines.events.on_entity_renamed
|
497
|
-
/**
|
682
|
+
/**
|
683
|
+
* Tick the event was generated.
|
684
|
+
*/
|
498
685
|
readonly tick: uint
|
499
686
|
}
|
500
687
|
|
@@ -505,13 +692,21 @@ interface OnEntityRenamedEvent extends EventData {
|
|
505
692
|
*/
|
506
693
|
interface OnEntitySettingsPastedEvent extends EventData {
|
507
694
|
readonly player_index: uint
|
508
|
-
/**
|
695
|
+
/**
|
696
|
+
* The source entity settings were copied from.
|
697
|
+
*/
|
509
698
|
readonly source: LuaEntity
|
510
|
-
/**
|
699
|
+
/**
|
700
|
+
* The destination entity settings were copied to.
|
701
|
+
*/
|
511
702
|
readonly destination: LuaEntity
|
512
|
-
/**
|
703
|
+
/**
|
704
|
+
* Identifier of the event
|
705
|
+
*/
|
513
706
|
readonly name: typeof defines.events.on_entity_settings_pasted
|
514
|
-
/**
|
707
|
+
/**
|
708
|
+
* Tick the event was generated.
|
709
|
+
*/
|
515
710
|
readonly tick: uint
|
516
711
|
}
|
517
712
|
|
@@ -523,9 +718,13 @@ interface OnEntitySettingsPastedEvent extends EventData {
|
|
523
718
|
interface OnEntitySpawnedEvent extends EventData {
|
524
719
|
readonly spawner: LuaEntity
|
525
720
|
readonly entity: LuaEntity
|
526
|
-
/**
|
721
|
+
/**
|
722
|
+
* Identifier of the event
|
723
|
+
*/
|
527
724
|
readonly name: typeof defines.events.on_entity_spawned
|
528
|
-
/**
|
725
|
+
/**
|
726
|
+
* Tick the event was generated.
|
727
|
+
*/
|
529
728
|
readonly tick: uint
|
530
729
|
}
|
531
730
|
|
@@ -535,13 +734,21 @@ interface OnEntitySpawnedEvent extends EventData {
|
|
535
734
|
* {@link https://lua-api.factorio.com/latest/events.html#on_equipment_inserted View documentation}
|
536
735
|
*/
|
537
736
|
interface OnEquipmentInsertedEvent extends EventData {
|
538
|
-
/**
|
737
|
+
/**
|
738
|
+
* The equipment grid inserted into.
|
739
|
+
*/
|
539
740
|
readonly grid: LuaEquipmentGrid
|
540
|
-
/**
|
741
|
+
/**
|
742
|
+
* The equipment inserted.
|
743
|
+
*/
|
541
744
|
readonly equipment: LuaEquipment
|
542
|
-
/**
|
745
|
+
/**
|
746
|
+
* Identifier of the event
|
747
|
+
*/
|
543
748
|
readonly name: typeof defines.events.on_equipment_inserted
|
544
|
-
/**
|
749
|
+
/**
|
750
|
+
* Tick the event was generated.
|
751
|
+
*/
|
545
752
|
readonly tick: uint
|
546
753
|
}
|
547
754
|
|
@@ -551,15 +758,25 @@ interface OnEquipmentInsertedEvent extends EventData {
|
|
551
758
|
* {@link https://lua-api.factorio.com/latest/events.html#on_equipment_removed View documentation}
|
552
759
|
*/
|
553
760
|
interface OnEquipmentRemovedEvent extends EventData {
|
554
|
-
/**
|
761
|
+
/**
|
762
|
+
* The equipment grid removed from.
|
763
|
+
*/
|
555
764
|
readonly grid: LuaEquipmentGrid
|
556
|
-
/**
|
765
|
+
/**
|
766
|
+
* The equipment removed.
|
767
|
+
*/
|
557
768
|
readonly equipment: string
|
558
|
-
/**
|
769
|
+
/**
|
770
|
+
* The count of equipment removed.
|
771
|
+
*/
|
559
772
|
readonly count: uint
|
560
|
-
/**
|
773
|
+
/**
|
774
|
+
* Identifier of the event
|
775
|
+
*/
|
561
776
|
readonly name: typeof defines.events.on_equipment_removed
|
562
|
-
/**
|
777
|
+
/**
|
778
|
+
* Tick the event was generated.
|
779
|
+
*/
|
563
780
|
readonly tick: uint
|
564
781
|
}
|
565
782
|
|
@@ -569,32 +786,46 @@ interface OnEquipmentRemovedEvent extends EventData {
|
|
569
786
|
* {@link https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed View documentation}
|
570
787
|
*/
|
571
788
|
interface OnForceCeaseFireChangedEvent extends EventData {
|
572
|
-
/**
|
789
|
+
/**
|
790
|
+
* The force who's cease fire changed.
|
791
|
+
*/
|
573
792
|
readonly force: LuaForce
|
574
|
-
/**
|
793
|
+
/**
|
794
|
+
* Which force was added or removed.
|
795
|
+
*/
|
575
796
|
readonly other_force: LuaForce
|
576
|
-
/**
|
797
|
+
/**
|
798
|
+
* If the other force was added or removed.
|
799
|
+
*/
|
577
800
|
readonly added: boolean
|
578
|
-
/**
|
801
|
+
/**
|
802
|
+
* Identifier of the event
|
803
|
+
*/
|
579
804
|
readonly name: typeof defines.events.on_force_cease_fire_changed
|
580
|
-
/**
|
805
|
+
/**
|
806
|
+
* Tick the event was generated.
|
807
|
+
*/
|
581
808
|
readonly tick: uint
|
582
809
|
}
|
583
810
|
|
584
811
|
/**
|
585
812
|
* Called when a new force is created using `game.create_force()`
|
586
813
|
*
|
587
|
-
* **Note**: This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will
|
588
|
-
* always exist.
|
589
|
-
*
|
590
814
|
* {@link https://lua-api.factorio.com/latest/events.html#on_force_created View documentation}
|
815
|
+
* @remarks This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
591
816
|
*/
|
592
817
|
interface OnForceCreatedEvent extends EventData {
|
593
|
-
/**
|
818
|
+
/**
|
819
|
+
* The newly created force.
|
820
|
+
*/
|
594
821
|
readonly force: LuaForce
|
595
|
-
/**
|
822
|
+
/**
|
823
|
+
* Identifier of the event
|
824
|
+
*/
|
596
825
|
readonly name: typeof defines.events.on_force_created
|
597
|
-
/**
|
826
|
+
/**
|
827
|
+
* Tick the event was generated.
|
828
|
+
*/
|
598
829
|
readonly tick: uint
|
599
830
|
}
|
600
831
|
|
@@ -604,48 +835,71 @@ interface OnForceCreatedEvent extends EventData {
|
|
604
835
|
* {@link https://lua-api.factorio.com/latest/events.html#on_force_friends_changed View documentation}
|
605
836
|
*/
|
606
837
|
interface OnForceFriendsChangedEvent extends EventData {
|
607
|
-
/**
|
838
|
+
/**
|
839
|
+
* The force who's friends changed.
|
840
|
+
*/
|
608
841
|
readonly force: LuaForce
|
609
|
-
/**
|
842
|
+
/**
|
843
|
+
* Which force was added or removed.
|
844
|
+
*/
|
610
845
|
readonly other_force: LuaForce
|
611
|
-
/**
|
846
|
+
/**
|
847
|
+
* If the other force was added or removed.
|
848
|
+
*/
|
612
849
|
readonly added: boolean
|
613
|
-
/**
|
850
|
+
/**
|
851
|
+
* Identifier of the event
|
852
|
+
*/
|
614
853
|
readonly name: typeof defines.events.on_force_friends_changed
|
615
|
-
/**
|
854
|
+
/**
|
855
|
+
* Tick the event was generated.
|
856
|
+
*/
|
616
857
|
readonly tick: uint
|
617
858
|
}
|
618
859
|
|
619
860
|
/**
|
620
|
-
* Called when {@link LuaForce
|
861
|
+
* Called when {@link LuaForce#reset LuaForce::reset} is finished.
|
621
862
|
*
|
622
863
|
* {@link https://lua-api.factorio.com/latest/events.html#on_force_reset View documentation}
|
623
864
|
*/
|
624
865
|
interface OnForceResetEvent extends EventData {
|
625
866
|
readonly force: LuaForce
|
626
|
-
/**
|
867
|
+
/**
|
868
|
+
* Identifier of the event
|
869
|
+
*/
|
627
870
|
readonly name: typeof defines.events.on_force_reset
|
628
|
-
/**
|
871
|
+
/**
|
872
|
+
* Tick the event was generated.
|
873
|
+
*/
|
629
874
|
readonly tick: uint
|
630
875
|
}
|
631
876
|
|
632
877
|
/**
|
633
878
|
* Called after two forces have been merged using `game.merge_forces()`.
|
634
879
|
*
|
635
|
-
* **Note**: The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
636
|
-
*
|
637
880
|
* {@link https://lua-api.factorio.com/latest/events.html#on_forces_merged View documentation}
|
881
|
+
* @remarks The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
638
882
|
*/
|
639
883
|
interface OnForcesMergedEvent extends EventData {
|
640
|
-
/**
|
884
|
+
/**
|
885
|
+
* The force destroyed.
|
886
|
+
*/
|
641
887
|
readonly source_name: string
|
642
|
-
/**
|
888
|
+
/**
|
889
|
+
* The index of the destroyed force.
|
890
|
+
*/
|
643
891
|
readonly source_index: uint
|
644
|
-
/**
|
892
|
+
/**
|
893
|
+
* The force entities where reassigned to.
|
894
|
+
*/
|
645
895
|
readonly destination: LuaForce
|
646
|
-
/**
|
896
|
+
/**
|
897
|
+
* Identifier of the event
|
898
|
+
*/
|
647
899
|
readonly name: typeof defines.events.on_forces_merged
|
648
|
-
/**
|
900
|
+
/**
|
901
|
+
* Tick the event was generated.
|
902
|
+
*/
|
649
903
|
readonly tick: uint
|
650
904
|
}
|
651
905
|
|
@@ -655,28 +909,38 @@ interface OnForcesMergedEvent extends EventData {
|
|
655
909
|
* {@link https://lua-api.factorio.com/latest/events.html#on_forces_merging View documentation}
|
656
910
|
*/
|
657
911
|
interface OnForcesMergingEvent extends EventData {
|
658
|
-
/**
|
912
|
+
/**
|
913
|
+
* The force to be destroyed
|
914
|
+
*/
|
659
915
|
readonly source: LuaForce
|
660
|
-
/**
|
916
|
+
/**
|
917
|
+
* The force to reassign entities to.
|
918
|
+
*/
|
661
919
|
readonly destination: LuaForce
|
662
|
-
/**
|
920
|
+
/**
|
921
|
+
* Identifier of the event
|
922
|
+
*/
|
663
923
|
readonly name: typeof defines.events.on_forces_merging
|
664
|
-
/**
|
924
|
+
/**
|
925
|
+
* Tick the event was generated.
|
926
|
+
*/
|
665
927
|
readonly tick: uint
|
666
928
|
}
|
667
929
|
|
668
930
|
/**
|
669
|
-
* Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data
|
670
|
-
* already includes it. In those cases however, {@link LuaBootstrap.on_init LuaBootstrap::on_init} is not fired.
|
671
|
-
*
|
672
|
-
* **Note**: This event is not fired when the scenario is loaded via the map editor.
|
931
|
+
* 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.
|
673
932
|
*
|
674
933
|
* {@link https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario View documentation}
|
934
|
+
* @remarks This event is not fired when the scenario is loaded via the map editor.
|
675
935
|
*/
|
676
936
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
677
|
-
/**
|
937
|
+
/**
|
938
|
+
* Identifier of the event
|
939
|
+
*/
|
678
940
|
readonly name: typeof defines.events.on_game_created_from_scenario
|
679
|
-
/**
|
941
|
+
/**
|
942
|
+
* Tick the event was generated.
|
943
|
+
*/
|
680
944
|
readonly tick: uint
|
681
945
|
}
|
682
946
|
|
@@ -686,13 +950,21 @@ interface OnGameCreatedFromScenarioEvent extends EventData {
|
|
686
950
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed View documentation}
|
687
951
|
*/
|
688
952
|
interface OnGuiCheckedStateChangedEvent extends EventData {
|
689
|
-
/**
|
953
|
+
/**
|
954
|
+
* The element whose checked state changed.
|
955
|
+
*/
|
690
956
|
readonly element: LuaGuiElement
|
691
|
-
/**
|
957
|
+
/**
|
958
|
+
* The player who did the change.
|
959
|
+
*/
|
692
960
|
readonly player_index: uint
|
693
|
-
/**
|
961
|
+
/**
|
962
|
+
* Identifier of the event
|
963
|
+
*/
|
694
964
|
readonly name: typeof defines.events.on_gui_checked_state_changed
|
695
|
-
/**
|
965
|
+
/**
|
966
|
+
* Tick the event was generated.
|
967
|
+
*/
|
696
968
|
readonly tick: uint
|
697
969
|
}
|
698
970
|
|
@@ -702,56 +974,92 @@ interface OnGuiCheckedStateChangedEvent extends EventData {
|
|
702
974
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_click View documentation}
|
703
975
|
*/
|
704
976
|
interface OnGuiClickEvent extends EventData {
|
705
|
-
/**
|
977
|
+
/**
|
978
|
+
* The clicked element.
|
979
|
+
*/
|
706
980
|
readonly element: LuaGuiElement
|
707
|
-
/**
|
981
|
+
/**
|
982
|
+
* The player who did the clicking.
|
983
|
+
*/
|
708
984
|
readonly player_index: uint
|
709
|
-
/**
|
985
|
+
/**
|
986
|
+
* The mouse button used if any.
|
987
|
+
*/
|
710
988
|
readonly button: defines.mouse_button_type
|
711
|
-
/**
|
989
|
+
/**
|
990
|
+
* If alt was pressed.
|
991
|
+
*/
|
712
992
|
readonly alt: boolean
|
713
|
-
/**
|
993
|
+
/**
|
994
|
+
* If control was pressed.
|
995
|
+
*/
|
714
996
|
readonly control: boolean
|
715
|
-
/**
|
997
|
+
/**
|
998
|
+
* If shift was pressed.
|
999
|
+
*/
|
716
1000
|
readonly shift: boolean
|
717
|
-
/**
|
1001
|
+
/**
|
1002
|
+
* Identifier of the event
|
1003
|
+
*/
|
718
1004
|
readonly name: typeof defines.events.on_gui_click
|
719
|
-
/**
|
1005
|
+
/**
|
1006
|
+
* Tick the event was generated.
|
1007
|
+
*/
|
720
1008
|
readonly tick: uint
|
721
1009
|
}
|
722
1010
|
|
723
1011
|
/**
|
724
1012
|
* Called when the player closes the GUI they have open.
|
725
1013
|
*
|
726
|
-
*
|
727
|
-
*
|
728
|
-
* **Note**: It's not advised to open any other GUI during this event because if this is run as a request to open a
|
729
|
-
* different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.
|
1014
|
+
* 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.
|
730
1015
|
*
|
731
1016
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_closed View documentation}
|
1017
|
+
* @remarks It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.
|
732
1018
|
*/
|
733
1019
|
interface OnGuiClosedEvent extends EventData {
|
734
|
-
/**
|
1020
|
+
/**
|
1021
|
+
* The player.
|
1022
|
+
*/
|
735
1023
|
readonly player_index: uint
|
736
|
-
/**
|
1024
|
+
/**
|
1025
|
+
* The GUI type that was open.
|
1026
|
+
*/
|
737
1027
|
readonly gui_type: defines.gui_type
|
738
|
-
/**
|
1028
|
+
/**
|
1029
|
+
* The entity that was open
|
1030
|
+
*/
|
739
1031
|
readonly entity?: LuaEntity
|
740
|
-
/**
|
1032
|
+
/**
|
1033
|
+
* The item that was open
|
1034
|
+
*/
|
741
1035
|
readonly item?: LuaItemStack
|
742
|
-
/**
|
1036
|
+
/**
|
1037
|
+
* The equipment that was open
|
1038
|
+
*/
|
743
1039
|
readonly equipment?: LuaEquipment
|
744
|
-
/**
|
1040
|
+
/**
|
1041
|
+
* The other player that was open
|
1042
|
+
*/
|
745
1043
|
readonly other_player?: LuaPlayer
|
746
|
-
/**
|
1044
|
+
/**
|
1045
|
+
* The custom GUI element that was open
|
1046
|
+
*/
|
747
1047
|
readonly element?: LuaGuiElement
|
748
|
-
/**
|
1048
|
+
/**
|
1049
|
+
* The technology that was automatically selected when opening the research GUI
|
1050
|
+
*/
|
749
1051
|
readonly technology?: LuaTechnology
|
750
|
-
/**
|
1052
|
+
/**
|
1053
|
+
* The tile position that was open
|
1054
|
+
*/
|
751
1055
|
readonly tile_position?: TilePositionTable
|
752
|
-
/**
|
1056
|
+
/**
|
1057
|
+
* Identifier of the event
|
1058
|
+
*/
|
753
1059
|
readonly name: typeof defines.events.on_gui_closed
|
754
|
-
/**
|
1060
|
+
/**
|
1061
|
+
* Tick the event was generated.
|
1062
|
+
*/
|
755
1063
|
readonly tick: uint
|
756
1064
|
}
|
757
1065
|
|
@@ -761,19 +1069,33 @@ interface OnGuiClosedEvent extends EventData {
|
|
761
1069
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_confirmed View documentation}
|
762
1070
|
*/
|
763
1071
|
interface OnGuiConfirmedEvent extends EventData {
|
764
|
-
/**
|
1072
|
+
/**
|
1073
|
+
* The confirmed element.
|
1074
|
+
*/
|
765
1075
|
readonly element: LuaGuiElement
|
766
|
-
/**
|
1076
|
+
/**
|
1077
|
+
* The player who did the confirming.
|
1078
|
+
*/
|
767
1079
|
readonly player_index: uint
|
768
|
-
/**
|
1080
|
+
/**
|
1081
|
+
* If alt was pressed.
|
1082
|
+
*/
|
769
1083
|
readonly alt: boolean
|
770
|
-
/**
|
1084
|
+
/**
|
1085
|
+
* If control was pressed.
|
1086
|
+
*/
|
771
1087
|
readonly control: boolean
|
772
|
-
/**
|
1088
|
+
/**
|
1089
|
+
* If shift was pressed.
|
1090
|
+
*/
|
773
1091
|
readonly shift: boolean
|
774
|
-
/**
|
1092
|
+
/**
|
1093
|
+
* Identifier of the event
|
1094
|
+
*/
|
775
1095
|
readonly name: typeof defines.events.on_gui_confirmed
|
776
|
-
/**
|
1096
|
+
/**
|
1097
|
+
* Tick the event was generated.
|
1098
|
+
*/
|
777
1099
|
readonly tick: uint
|
778
1100
|
}
|
779
1101
|
|
@@ -783,13 +1105,21 @@ interface OnGuiConfirmedEvent extends EventData {
|
|
783
1105
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed View documentation}
|
784
1106
|
*/
|
785
1107
|
interface OnGuiElemChangedEvent extends EventData {
|
786
|
-
/**
|
1108
|
+
/**
|
1109
|
+
* The element whose element value changed.
|
1110
|
+
*/
|
787
1111
|
readonly element: LuaGuiElement
|
788
|
-
/**
|
1112
|
+
/**
|
1113
|
+
* The player who did the change.
|
1114
|
+
*/
|
789
1115
|
readonly player_index: uint
|
790
|
-
/**
|
1116
|
+
/**
|
1117
|
+
* Identifier of the event
|
1118
|
+
*/
|
791
1119
|
readonly name: typeof defines.events.on_gui_elem_changed
|
792
|
-
/**
|
1120
|
+
/**
|
1121
|
+
* Tick the event was generated.
|
1122
|
+
*/
|
793
1123
|
readonly tick: uint
|
794
1124
|
}
|
795
1125
|
|
@@ -799,13 +1129,21 @@ interface OnGuiElemChangedEvent extends EventData {
|
|
799
1129
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_location_changed View documentation}
|
800
1130
|
*/
|
801
1131
|
interface OnGuiLocationChangedEvent extends EventData {
|
802
|
-
/**
|
1132
|
+
/**
|
1133
|
+
* The element whose location changed.
|
1134
|
+
*/
|
803
1135
|
readonly element: LuaGuiElement
|
804
|
-
/**
|
1136
|
+
/**
|
1137
|
+
* The player who did the change.
|
1138
|
+
*/
|
805
1139
|
readonly player_index: uint
|
806
|
-
/**
|
1140
|
+
/**
|
1141
|
+
* Identifier of the event
|
1142
|
+
*/
|
807
1143
|
readonly name: typeof defines.events.on_gui_location_changed
|
808
|
-
/**
|
1144
|
+
/**
|
1145
|
+
* Tick the event was generated.
|
1146
|
+
*/
|
809
1147
|
readonly tick: uint
|
810
1148
|
}
|
811
1149
|
|
@@ -815,23 +1153,41 @@ interface OnGuiLocationChangedEvent extends EventData {
|
|
815
1153
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_opened View documentation}
|
816
1154
|
*/
|
817
1155
|
interface OnGuiOpenedEvent extends EventData {
|
818
|
-
/**
|
1156
|
+
/**
|
1157
|
+
* The player.
|
1158
|
+
*/
|
819
1159
|
readonly player_index: uint
|
820
|
-
/**
|
1160
|
+
/**
|
1161
|
+
* The GUI type that was opened.
|
1162
|
+
*/
|
821
1163
|
readonly gui_type: defines.gui_type
|
822
|
-
/**
|
1164
|
+
/**
|
1165
|
+
* The entity that was opened
|
1166
|
+
*/
|
823
1167
|
readonly entity?: LuaEntity
|
824
|
-
/**
|
1168
|
+
/**
|
1169
|
+
* The item that was opened
|
1170
|
+
*/
|
825
1171
|
readonly item?: LuaItemStack
|
826
|
-
/**
|
1172
|
+
/**
|
1173
|
+
* The equipment that was opened
|
1174
|
+
*/
|
827
1175
|
readonly equipment?: LuaEquipment
|
828
|
-
/**
|
1176
|
+
/**
|
1177
|
+
* The other player that was opened
|
1178
|
+
*/
|
829
1179
|
readonly other_player?: LuaPlayer
|
830
|
-
/**
|
1180
|
+
/**
|
1181
|
+
* The custom GUI element that was opened
|
1182
|
+
*/
|
831
1183
|
readonly element?: LuaGuiElement
|
832
|
-
/**
|
1184
|
+
/**
|
1185
|
+
* Identifier of the event
|
1186
|
+
*/
|
833
1187
|
readonly name: typeof defines.events.on_gui_opened
|
834
|
-
/**
|
1188
|
+
/**
|
1189
|
+
* Tick the event was generated.
|
1190
|
+
*/
|
835
1191
|
readonly tick: uint
|
836
1192
|
}
|
837
1193
|
|
@@ -841,13 +1197,21 @@ interface OnGuiOpenedEvent extends EventData {
|
|
841
1197
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed View documentation}
|
842
1198
|
*/
|
843
1199
|
interface OnGuiSelectedTabChangedEvent extends EventData {
|
844
|
-
/**
|
1200
|
+
/**
|
1201
|
+
* The tabbed pane whose selected tab changed.
|
1202
|
+
*/
|
845
1203
|
readonly element: LuaGuiElement
|
846
|
-
/**
|
1204
|
+
/**
|
1205
|
+
* The player who did the change.
|
1206
|
+
*/
|
847
1207
|
readonly player_index: uint
|
848
|
-
/**
|
1208
|
+
/**
|
1209
|
+
* Identifier of the event
|
1210
|
+
*/
|
849
1211
|
readonly name: typeof defines.events.on_gui_selected_tab_changed
|
850
|
-
/**
|
1212
|
+
/**
|
1213
|
+
* Tick the event was generated.
|
1214
|
+
*/
|
851
1215
|
readonly tick: uint
|
852
1216
|
}
|
853
1217
|
|
@@ -857,13 +1221,21 @@ interface OnGuiSelectedTabChangedEvent extends EventData {
|
|
857
1221
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed View documentation}
|
858
1222
|
*/
|
859
1223
|
interface OnGuiSelectionStateChangedEvent extends EventData {
|
860
|
-
/**
|
1224
|
+
/**
|
1225
|
+
* The element whose selection state changed.
|
1226
|
+
*/
|
861
1227
|
readonly element: LuaGuiElement
|
862
|
-
/**
|
1228
|
+
/**
|
1229
|
+
* The player who did the change.
|
1230
|
+
*/
|
863
1231
|
readonly player_index: uint
|
864
|
-
/**
|
1232
|
+
/**
|
1233
|
+
* Identifier of the event
|
1234
|
+
*/
|
865
1235
|
readonly name: typeof defines.events.on_gui_selection_state_changed
|
866
|
-
/**
|
1236
|
+
/**
|
1237
|
+
* Tick the event was generated.
|
1238
|
+
*/
|
867
1239
|
readonly tick: uint
|
868
1240
|
}
|
869
1241
|
|
@@ -873,13 +1245,21 @@ interface OnGuiSelectionStateChangedEvent extends EventData {
|
|
873
1245
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed View documentation}
|
874
1246
|
*/
|
875
1247
|
interface OnGuiSwitchStateChangedEvent extends EventData {
|
876
|
-
/**
|
1248
|
+
/**
|
1249
|
+
* The switch whose switch state changed.
|
1250
|
+
*/
|
877
1251
|
readonly element: LuaGuiElement
|
878
|
-
/**
|
1252
|
+
/**
|
1253
|
+
* The player who did the change.
|
1254
|
+
*/
|
879
1255
|
readonly player_index: uint
|
880
|
-
/**
|
1256
|
+
/**
|
1257
|
+
* Identifier of the event
|
1258
|
+
*/
|
881
1259
|
readonly name: typeof defines.events.on_gui_switch_state_changed
|
882
|
-
/**
|
1260
|
+
/**
|
1261
|
+
* Tick the event was generated.
|
1262
|
+
*/
|
883
1263
|
readonly tick: uint
|
884
1264
|
}
|
885
1265
|
|
@@ -889,15 +1269,25 @@ interface OnGuiSwitchStateChangedEvent extends EventData {
|
|
889
1269
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_text_changed View documentation}
|
890
1270
|
*/
|
891
1271
|
interface OnGuiTextChangedEvent extends EventData {
|
892
|
-
/**
|
1272
|
+
/**
|
1273
|
+
* The edited element.
|
1274
|
+
*/
|
893
1275
|
readonly element: LuaGuiElement
|
894
|
-
/**
|
1276
|
+
/**
|
1277
|
+
* The player who did the edit.
|
1278
|
+
*/
|
895
1279
|
readonly player_index: uint
|
896
|
-
/**
|
1280
|
+
/**
|
1281
|
+
* The new text in the element.
|
1282
|
+
*/
|
897
1283
|
readonly text: string
|
898
|
-
/**
|
1284
|
+
/**
|
1285
|
+
* Identifier of the event
|
1286
|
+
*/
|
899
1287
|
readonly name: typeof defines.events.on_gui_text_changed
|
900
|
-
/**
|
1288
|
+
/**
|
1289
|
+
* Tick the event was generated.
|
1290
|
+
*/
|
901
1291
|
readonly tick: uint
|
902
1292
|
}
|
903
1293
|
|
@@ -907,13 +1297,21 @@ interface OnGuiTextChangedEvent extends EventData {
|
|
907
1297
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_value_changed View documentation}
|
908
1298
|
*/
|
909
1299
|
interface OnGuiValueChangedEvent extends EventData {
|
910
|
-
/**
|
1300
|
+
/**
|
1301
|
+
* The element whose value changed.
|
1302
|
+
*/
|
911
1303
|
readonly element: LuaGuiElement
|
912
|
-
/**
|
1304
|
+
/**
|
1305
|
+
* The player who did the change.
|
1306
|
+
*/
|
913
1307
|
readonly player_index: uint
|
914
|
-
/**
|
1308
|
+
/**
|
1309
|
+
* Identifier of the event
|
1310
|
+
*/
|
915
1311
|
readonly name: typeof defines.events.on_gui_value_changed
|
916
|
-
/**
|
1312
|
+
/**
|
1313
|
+
* Tick the event was generated.
|
1314
|
+
*/
|
917
1315
|
readonly tick: uint
|
918
1316
|
}
|
919
1317
|
|
@@ -924,9 +1322,13 @@ interface OnGuiValueChangedEvent extends EventData {
|
|
924
1322
|
*/
|
925
1323
|
interface OnLandMineArmedEvent extends EventData {
|
926
1324
|
readonly mine: LuaEntity
|
927
|
-
/**
|
1325
|
+
/**
|
1326
|
+
* Identifier of the event
|
1327
|
+
*/
|
928
1328
|
readonly name: typeof defines.events.on_land_mine_armed
|
929
|
-
/**
|
1329
|
+
/**
|
1330
|
+
* Tick the event was generated.
|
1331
|
+
*/
|
930
1332
|
readonly tick: uint
|
931
1333
|
}
|
932
1334
|
|
@@ -937,32 +1339,40 @@ interface OnLandMineArmedEvent extends EventData {
|
|
937
1339
|
*/
|
938
1340
|
interface OnLuaShortcutEvent extends EventData {
|
939
1341
|
readonly player_index: uint
|
940
|
-
/**
|
1342
|
+
/**
|
1343
|
+
* Shortcut prototype name of the shortcut that was clicked.
|
1344
|
+
*/
|
941
1345
|
readonly prototype_name: string
|
942
|
-
/**
|
1346
|
+
/**
|
1347
|
+
* Identifier of the event
|
1348
|
+
*/
|
943
1349
|
readonly name: typeof defines.events.on_lua_shortcut
|
944
|
-
/**
|
1350
|
+
/**
|
1351
|
+
* Tick the event was generated.
|
1352
|
+
*/
|
945
1353
|
readonly tick: uint
|
946
1354
|
}
|
947
1355
|
|
948
1356
|
/**
|
949
|
-
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script. Can be filtered
|
950
|
-
* using {@link LuaEntityMarkedForDeconstructionEventFilter}.
|
1357
|
+
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script. Can be filtered using {@link LuaEntityMarkedForDeconstructionEventFilter}.
|
951
1358
|
*
|
952
1359
|
* {@link https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction View documentation}
|
953
1360
|
*/
|
954
1361
|
interface OnMarkedForDeconstructionEvent extends EventData {
|
955
1362
|
readonly entity: LuaEntity
|
956
1363
|
readonly player_index?: uint
|
957
|
-
/**
|
1364
|
+
/**
|
1365
|
+
* Identifier of the event
|
1366
|
+
*/
|
958
1367
|
readonly name: typeof defines.events.on_marked_for_deconstruction
|
959
|
-
/**
|
1368
|
+
/**
|
1369
|
+
* Tick the event was generated.
|
1370
|
+
*/
|
960
1371
|
readonly tick: uint
|
961
1372
|
}
|
962
1373
|
|
963
1374
|
/**
|
964
|
-
* Called when an entity is marked for upgrade with the Upgrade planner or via script. Can be filtered using
|
965
|
-
* {@link LuaEntityMarkedForUpgradeEventFilter}.
|
1375
|
+
* Called when an entity is marked for upgrade with the Upgrade planner or via script. Can be filtered using {@link LuaEntityMarkedForUpgradeEventFilter}.
|
966
1376
|
*
|
967
1377
|
* {@link https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade View documentation}
|
968
1378
|
*/
|
@@ -970,11 +1380,17 @@ interface OnMarkedForUpgradeEvent extends EventData {
|
|
970
1380
|
readonly entity: LuaEntity
|
971
1381
|
readonly target: LuaEntityPrototype
|
972
1382
|
readonly player_index?: uint
|
973
|
-
/**
|
1383
|
+
/**
|
1384
|
+
* The new direction (if any)
|
1385
|
+
*/
|
974
1386
|
readonly direction?: defines.direction
|
975
|
-
/**
|
1387
|
+
/**
|
1388
|
+
* Identifier of the event
|
1389
|
+
*/
|
976
1390
|
readonly name: typeof defines.events.on_marked_for_upgrade
|
977
|
-
/**
|
1391
|
+
/**
|
1392
|
+
* Tick the event was generated.
|
1393
|
+
*/
|
978
1394
|
readonly tick: uint
|
979
1395
|
}
|
980
1396
|
|
@@ -984,17 +1400,29 @@ interface OnMarkedForUpgradeEvent extends EventData {
|
|
984
1400
|
* {@link https://lua-api.factorio.com/latest/events.html#on_market_item_purchased View documentation}
|
985
1401
|
*/
|
986
1402
|
interface OnMarketItemPurchasedEvent extends EventData {
|
987
|
-
/**
|
1403
|
+
/**
|
1404
|
+
* The player who did the purchasing.
|
1405
|
+
*/
|
988
1406
|
readonly player_index: uint
|
989
|
-
/**
|
1407
|
+
/**
|
1408
|
+
* The market entity.
|
1409
|
+
*/
|
990
1410
|
readonly market: LuaEntity
|
991
|
-
/**
|
1411
|
+
/**
|
1412
|
+
* The index of the offer purchased.
|
1413
|
+
*/
|
992
1414
|
readonly offer_index: uint
|
993
|
-
/**
|
1415
|
+
/**
|
1416
|
+
* The amount of offers purchased.
|
1417
|
+
*/
|
994
1418
|
readonly count: uint
|
995
|
-
/**
|
1419
|
+
/**
|
1420
|
+
* Identifier of the event
|
1421
|
+
*/
|
996
1422
|
readonly name: typeof defines.events.on_market_item_purchased
|
997
|
-
/**
|
1423
|
+
/**
|
1424
|
+
* Tick the event was generated.
|
1425
|
+
*/
|
998
1426
|
readonly tick: uint
|
999
1427
|
}
|
1000
1428
|
|
@@ -1004,13 +1432,21 @@ interface OnMarketItemPurchasedEvent extends EventData {
|
|
1004
1432
|
* {@link https://lua-api.factorio.com/latest/events.html#on_mod_item_opened View documentation}
|
1005
1433
|
*/
|
1006
1434
|
interface OnModItemOpenedEvent extends EventData {
|
1007
|
-
/**
|
1435
|
+
/**
|
1436
|
+
* The player.
|
1437
|
+
*/
|
1008
1438
|
readonly player_index: uint
|
1009
|
-
/**
|
1439
|
+
/**
|
1440
|
+
* The item clicked on.
|
1441
|
+
*/
|
1010
1442
|
readonly item: LuaItemPrototype
|
1011
|
-
/**
|
1443
|
+
/**
|
1444
|
+
* Identifier of the event
|
1445
|
+
*/
|
1012
1446
|
readonly name: typeof defines.events.on_mod_item_opened
|
1013
|
-
/**
|
1447
|
+
/**
|
1448
|
+
* Tick the event was generated.
|
1449
|
+
*/
|
1014
1450
|
readonly tick: uint
|
1015
1451
|
}
|
1016
1452
|
|
@@ -1020,13 +1456,21 @@ interface OnModItemOpenedEvent extends EventData {
|
|
1020
1456
|
* {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_added View documentation}
|
1021
1457
|
*/
|
1022
1458
|
interface OnPermissionGroupAddedEvent extends EventData {
|
1023
|
-
/**
|
1459
|
+
/**
|
1460
|
+
* The player that added the group.
|
1461
|
+
*/
|
1024
1462
|
readonly player_index: uint
|
1025
|
-
/**
|
1463
|
+
/**
|
1464
|
+
* The group added.
|
1465
|
+
*/
|
1026
1466
|
readonly group: LuaPermissionGroup
|
1027
|
-
/**
|
1467
|
+
/**
|
1468
|
+
* Identifier of the event
|
1469
|
+
*/
|
1028
1470
|
readonly name: typeof defines.events.on_permission_group_added
|
1029
|
-
/**
|
1471
|
+
/**
|
1472
|
+
* Tick the event was generated.
|
1473
|
+
*/
|
1030
1474
|
readonly tick: uint
|
1031
1475
|
}
|
1032
1476
|
|
@@ -1036,15 +1480,25 @@ interface OnPermissionGroupAddedEvent extends EventData {
|
|
1036
1480
|
* {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted View documentation}
|
1037
1481
|
*/
|
1038
1482
|
interface OnPermissionGroupDeletedEvent extends EventData {
|
1039
|
-
/**
|
1483
|
+
/**
|
1484
|
+
* The player doing the deletion.
|
1485
|
+
*/
|
1040
1486
|
readonly player_index: uint
|
1041
|
-
/**
|
1487
|
+
/**
|
1488
|
+
* The group that was deleted.
|
1489
|
+
*/
|
1042
1490
|
readonly group_name: string
|
1043
|
-
/**
|
1491
|
+
/**
|
1492
|
+
* The group id that was deleted.
|
1493
|
+
*/
|
1044
1494
|
readonly id: uint
|
1045
|
-
/**
|
1495
|
+
/**
|
1496
|
+
* Identifier of the event
|
1497
|
+
*/
|
1046
1498
|
readonly name: typeof defines.events.on_permission_group_deleted
|
1047
|
-
/**
|
1499
|
+
/**
|
1500
|
+
* Tick the event was generated.
|
1501
|
+
*/
|
1048
1502
|
readonly tick: uint
|
1049
1503
|
}
|
1050
1504
|
|
@@ -1054,11 +1508,17 @@ interface OnPermissionGroupDeletedEvent extends EventData {
|
|
1054
1508
|
* {@link https://lua-api.factorio.com/latest/events.html#on_permission_group_edited View documentation}
|
1055
1509
|
*/
|
1056
1510
|
interface OnPermissionGroupEditedEvent extends EventData {
|
1057
|
-
/**
|
1511
|
+
/**
|
1512
|
+
* The player that did the editing.
|
1513
|
+
*/
|
1058
1514
|
readonly player_index: uint
|
1059
|
-
/**
|
1515
|
+
/**
|
1516
|
+
* The group being edited.
|
1517
|
+
*/
|
1060
1518
|
readonly group: LuaPermissionGroup
|
1061
|
-
/**
|
1519
|
+
/**
|
1520
|
+
* The edit type: "add-permission", "remove-permission", "enable-all", "disable-all", "add-player", "remove-player", "rename".
|
1521
|
+
*/
|
1062
1522
|
readonly type:
|
1063
1523
|
| "add-permission"
|
1064
1524
|
| "remove-permission"
|
@@ -1067,17 +1527,29 @@ interface OnPermissionGroupEditedEvent extends EventData {
|
|
1067
1527
|
| "add-player"
|
1068
1528
|
| "remove-player"
|
1069
1529
|
| "rename"
|
1070
|
-
/**
|
1530
|
+
/**
|
1531
|
+
* The action when the `type` is "add-permission" or "remove-permission".
|
1532
|
+
*/
|
1071
1533
|
readonly action: defines.input_action
|
1072
|
-
/**
|
1534
|
+
/**
|
1535
|
+
* The other player when the `type` is "add-player" or "remove-player".
|
1536
|
+
*/
|
1073
1537
|
readonly other_player_index: uint
|
1074
|
-
/**
|
1538
|
+
/**
|
1539
|
+
* The old group name when the `type` is "rename".
|
1540
|
+
*/
|
1075
1541
|
readonly old_name: string
|
1076
|
-
/**
|
1542
|
+
/**
|
1543
|
+
* The new group name when the `type` is "rename".
|
1544
|
+
*/
|
1077
1545
|
readonly new_name: string
|
1078
|
-
/**
|
1546
|
+
/**
|
1547
|
+
* Identifier of the event
|
1548
|
+
*/
|
1079
1549
|
readonly name: typeof defines.events.on_permission_group_edited
|
1080
|
-
/**
|
1550
|
+
/**
|
1551
|
+
* Tick the event was generated.
|
1552
|
+
*/
|
1081
1553
|
readonly tick: uint
|
1082
1554
|
}
|
1083
1555
|
|
@@ -1087,11 +1559,17 @@ interface OnPermissionGroupEditedEvent extends EventData {
|
|
1087
1559
|
* {@link https://lua-api.factorio.com/latest/events.html#on_permission_string_imported View documentation}
|
1088
1560
|
*/
|
1089
1561
|
interface OnPermissionStringImportedEvent extends EventData {
|
1090
|
-
/**
|
1562
|
+
/**
|
1563
|
+
* The player that imported the string.
|
1564
|
+
*/
|
1091
1565
|
readonly player_index: uint
|
1092
|
-
/**
|
1566
|
+
/**
|
1567
|
+
* Identifier of the event
|
1568
|
+
*/
|
1093
1569
|
readonly name: typeof defines.events.on_permission_string_imported
|
1094
|
-
/**
|
1570
|
+
/**
|
1571
|
+
* Tick the event was generated.
|
1572
|
+
*/
|
1095
1573
|
readonly tick: uint
|
1096
1574
|
}
|
1097
1575
|
|
@@ -1103,9 +1581,13 @@ interface OnPermissionStringImportedEvent extends EventData {
|
|
1103
1581
|
interface OnPickedUpItemEvent extends EventData {
|
1104
1582
|
readonly item_stack: SimpleItemStack
|
1105
1583
|
readonly player_index: uint
|
1106
|
-
/**
|
1584
|
+
/**
|
1585
|
+
* Identifier of the event
|
1586
|
+
*/
|
1107
1587
|
readonly name: typeof defines.events.on_picked_up_item
|
1108
|
-
/**
|
1588
|
+
/**
|
1589
|
+
* Tick the event was generated.
|
1590
|
+
*/
|
1109
1591
|
readonly tick: uint
|
1110
1592
|
}
|
1111
1593
|
|
@@ -1115,21 +1597,37 @@ interface OnPickedUpItemEvent extends EventData {
|
|
1115
1597
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area View documentation}
|
1116
1598
|
*/
|
1117
1599
|
interface OnPlayerAltSelectedAreaEvent extends EventData {
|
1118
|
-
/**
|
1600
|
+
/**
|
1601
|
+
* The player doing the selection.
|
1602
|
+
*/
|
1119
1603
|
readonly player_index: uint
|
1120
|
-
/**
|
1604
|
+
/**
|
1605
|
+
* The surface selected.
|
1606
|
+
*/
|
1121
1607
|
readonly surface: LuaSurface
|
1122
|
-
/**
|
1608
|
+
/**
|
1609
|
+
* The area selected.
|
1610
|
+
*/
|
1123
1611
|
readonly area: BoundingBoxRead
|
1124
|
-
/**
|
1612
|
+
/**
|
1613
|
+
* The item used to select the area.
|
1614
|
+
*/
|
1125
1615
|
readonly item: string
|
1126
|
-
/**
|
1616
|
+
/**
|
1617
|
+
* The entities selected.
|
1618
|
+
*/
|
1127
1619
|
readonly entities: LuaEntity[]
|
1128
|
-
/**
|
1620
|
+
/**
|
1621
|
+
* The tiles selected.
|
1622
|
+
*/
|
1129
1623
|
readonly tiles: LuaTile[]
|
1130
|
-
/**
|
1624
|
+
/**
|
1625
|
+
* Identifier of the event
|
1626
|
+
*/
|
1131
1627
|
readonly name: typeof defines.events.on_player_alt_selected_area
|
1132
|
-
/**
|
1628
|
+
/**
|
1629
|
+
* Tick the event was generated.
|
1630
|
+
*/
|
1133
1631
|
readonly tick: uint
|
1134
1632
|
}
|
1135
1633
|
|
@@ -1140,9 +1638,13 @@ interface OnPlayerAltSelectedAreaEvent extends EventData {
|
|
1140
1638
|
*/
|
1141
1639
|
interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
1142
1640
|
readonly player_index: uint
|
1143
|
-
/**
|
1641
|
+
/**
|
1642
|
+
* Identifier of the event
|
1643
|
+
*/
|
1144
1644
|
readonly name: typeof defines.events.on_player_ammo_inventory_changed
|
1145
|
-
/**
|
1645
|
+
/**
|
1646
|
+
* Tick the event was generated.
|
1647
|
+
*/
|
1146
1648
|
readonly tick: uint
|
1147
1649
|
}
|
1148
1650
|
|
@@ -1153,9 +1655,13 @@ interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
|
1153
1655
|
*/
|
1154
1656
|
interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
1155
1657
|
readonly player_index: uint
|
1156
|
-
/**
|
1658
|
+
/**
|
1659
|
+
* Identifier of the event
|
1660
|
+
*/
|
1157
1661
|
readonly name: typeof defines.events.on_player_armor_inventory_changed
|
1158
|
-
/**
|
1662
|
+
/**
|
1663
|
+
* Tick the event was generated.
|
1664
|
+
*/
|
1159
1665
|
readonly tick: uint
|
1160
1666
|
}
|
1161
1667
|
|
@@ -1165,17 +1671,29 @@ interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
|
1165
1671
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_banned View documentation}
|
1166
1672
|
*/
|
1167
1673
|
interface OnPlayerBannedEvent extends EventData {
|
1168
|
-
/**
|
1674
|
+
/**
|
1675
|
+
* The player banned.
|
1676
|
+
*/
|
1169
1677
|
readonly player_index?: uint
|
1170
|
-
/**
|
1678
|
+
/**
|
1679
|
+
* The banned player name.
|
1680
|
+
*/
|
1171
1681
|
readonly player_name: string
|
1172
|
-
/**
|
1682
|
+
/**
|
1683
|
+
* The player that did the banning if any.
|
1684
|
+
*/
|
1173
1685
|
readonly by_player?: uint
|
1174
|
-
/**
|
1686
|
+
/**
|
1687
|
+
* The reason given if any.
|
1688
|
+
*/
|
1175
1689
|
readonly reason?: string
|
1176
|
-
/**
|
1690
|
+
/**
|
1691
|
+
* Identifier of the event
|
1692
|
+
*/
|
1177
1693
|
readonly name: typeof defines.events.on_player_banned
|
1178
|
-
/**
|
1694
|
+
/**
|
1695
|
+
* Tick the event was generated.
|
1696
|
+
*/
|
1179
1697
|
readonly tick: uint
|
1180
1698
|
}
|
1181
1699
|
|
@@ -1186,19 +1704,33 @@ interface OnPlayerBannedEvent extends EventData {
|
|
1186
1704
|
*/
|
1187
1705
|
interface OnPlayerBuiltTileEvent extends EventData {
|
1188
1706
|
readonly player_index: uint
|
1189
|
-
/**
|
1707
|
+
/**
|
1708
|
+
* The surface the tile(s) were built on.
|
1709
|
+
*/
|
1190
1710
|
readonly surface_index: uint
|
1191
|
-
/**
|
1711
|
+
/**
|
1712
|
+
* The position data.
|
1713
|
+
*/
|
1192
1714
|
readonly tiles: OldTileAndPosition[]
|
1193
|
-
/**
|
1715
|
+
/**
|
1716
|
+
* The tile prototype that was placed.
|
1717
|
+
*/
|
1194
1718
|
readonly tile: LuaTilePrototype
|
1195
|
-
/**
|
1719
|
+
/**
|
1720
|
+
* The item type used to build the tiles
|
1721
|
+
*/
|
1196
1722
|
readonly item?: LuaItemPrototype
|
1197
|
-
/**
|
1723
|
+
/**
|
1724
|
+
* The stack used to build the tiles (may be empty if all of the items where used to build the tiles).
|
1725
|
+
*/
|
1198
1726
|
readonly stack?: LuaItemStack
|
1199
|
-
/**
|
1727
|
+
/**
|
1728
|
+
* Identifier of the event
|
1729
|
+
*/
|
1200
1730
|
readonly name: typeof defines.events.on_player_built_tile
|
1201
|
-
/**
|
1731
|
+
/**
|
1732
|
+
* Tick the event was generated.
|
1733
|
+
*/
|
1202
1734
|
readonly tick: uint
|
1203
1735
|
}
|
1204
1736
|
|
@@ -1208,17 +1740,29 @@ interface OnPlayerBuiltTileEvent extends EventData {
|
|
1208
1740
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting View documentation}
|
1209
1741
|
*/
|
1210
1742
|
interface OnPlayerCancelledCraftingEvent extends EventData {
|
1211
|
-
/**
|
1743
|
+
/**
|
1744
|
+
* The player that did the crafting.
|
1745
|
+
*/
|
1212
1746
|
readonly player_index: uint
|
1213
|
-
/**
|
1747
|
+
/**
|
1748
|
+
* The crafting items returned to the player's inventory.
|
1749
|
+
*/
|
1214
1750
|
readonly items: LuaInventory
|
1215
|
-
/**
|
1751
|
+
/**
|
1752
|
+
* The recipe that has been cancelled.
|
1753
|
+
*/
|
1216
1754
|
readonly recipe: LuaRecipe
|
1217
|
-
/**
|
1755
|
+
/**
|
1756
|
+
* The number of crafts that have been cancelled.
|
1757
|
+
*/
|
1218
1758
|
readonly cancel_count: uint
|
1219
|
-
/**
|
1759
|
+
/**
|
1760
|
+
* Identifier of the event
|
1761
|
+
*/
|
1220
1762
|
readonly name: typeof defines.events.on_player_cancelled_crafting
|
1221
|
-
/**
|
1763
|
+
/**
|
1764
|
+
* Tick the event was generated.
|
1765
|
+
*/
|
1222
1766
|
readonly tick: uint
|
1223
1767
|
}
|
1224
1768
|
|
@@ -1228,13 +1772,21 @@ interface OnPlayerCancelledCraftingEvent extends EventData {
|
|
1228
1772
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_force View documentation}
|
1229
1773
|
*/
|
1230
1774
|
interface OnPlayerChangedForceEvent extends EventData {
|
1231
|
-
/**
|
1775
|
+
/**
|
1776
|
+
* The player who changed forces.
|
1777
|
+
*/
|
1232
1778
|
readonly player_index: uint
|
1233
|
-
/**
|
1779
|
+
/**
|
1780
|
+
* The old force.
|
1781
|
+
*/
|
1234
1782
|
readonly force: LuaForce
|
1235
|
-
/**
|
1783
|
+
/**
|
1784
|
+
* Identifier of the event
|
1785
|
+
*/
|
1236
1786
|
readonly name: typeof defines.events.on_player_changed_force
|
1237
|
-
/**
|
1787
|
+
/**
|
1788
|
+
* Tick the event was generated.
|
1789
|
+
*/
|
1238
1790
|
readonly tick: uint
|
1239
1791
|
}
|
1240
1792
|
|
@@ -1244,29 +1796,42 @@ interface OnPlayerChangedForceEvent extends EventData {
|
|
1244
1796
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_position View documentation}
|
1245
1797
|
*/
|
1246
1798
|
interface OnPlayerChangedPositionEvent extends EventData {
|
1247
|
-
/**
|
1799
|
+
/**
|
1800
|
+
* The player.
|
1801
|
+
*/
|
1248
1802
|
readonly player_index: uint
|
1249
|
-
/**
|
1803
|
+
/**
|
1804
|
+
* Identifier of the event
|
1805
|
+
*/
|
1250
1806
|
readonly name: typeof defines.events.on_player_changed_position
|
1251
|
-
/**
|
1807
|
+
/**
|
1808
|
+
* Tick the event was generated.
|
1809
|
+
*/
|
1252
1810
|
readonly tick: uint
|
1253
1811
|
}
|
1254
1812
|
|
1255
1813
|
/**
|
1256
1814
|
* Called after a player changes surfaces.
|
1257
1815
|
*
|
1258
|
-
* **Note**: In the instance a player is moved off a surface due to it being deleted this is not called.
|
1259
|
-
*
|
1260
1816
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_surface View documentation}
|
1817
|
+
* @remarks In the instance a player is moved off a surface due to it being deleted this is not called.
|
1261
1818
|
*/
|
1262
1819
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
1263
|
-
/**
|
1820
|
+
/**
|
1821
|
+
* The player who changed surfaces.
|
1822
|
+
*/
|
1264
1823
|
readonly player_index: uint
|
1265
|
-
/**
|
1824
|
+
/**
|
1825
|
+
* The surface index the player was on.
|
1826
|
+
*/
|
1266
1827
|
readonly surface_index: uint
|
1267
|
-
/**
|
1828
|
+
/**
|
1829
|
+
* Identifier of the event
|
1830
|
+
*/
|
1268
1831
|
readonly name: typeof defines.events.on_player_changed_surface
|
1269
|
-
/**
|
1832
|
+
/**
|
1833
|
+
* Tick the event was generated.
|
1834
|
+
*/
|
1270
1835
|
readonly tick: uint
|
1271
1836
|
}
|
1272
1837
|
|
@@ -1276,11 +1841,17 @@ interface OnPlayerChangedSurfaceEvent extends EventData {
|
|
1276
1841
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled View documentation}
|
1277
1842
|
*/
|
1278
1843
|
interface OnPlayerCheatModeDisabledEvent extends EventData {
|
1279
|
-
/**
|
1844
|
+
/**
|
1845
|
+
* The player.
|
1846
|
+
*/
|
1280
1847
|
readonly player_index: uint
|
1281
|
-
/**
|
1848
|
+
/**
|
1849
|
+
* Identifier of the event
|
1850
|
+
*/
|
1282
1851
|
readonly name: typeof defines.events.on_player_cheat_mode_disabled
|
1283
|
-
/**
|
1852
|
+
/**
|
1853
|
+
* Tick the event was generated.
|
1854
|
+
*/
|
1284
1855
|
readonly tick: uint
|
1285
1856
|
}
|
1286
1857
|
|
@@ -1290,11 +1861,17 @@ interface OnPlayerCheatModeDisabledEvent extends EventData {
|
|
1290
1861
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled View documentation}
|
1291
1862
|
*/
|
1292
1863
|
interface OnPlayerCheatModeEnabledEvent extends EventData {
|
1293
|
-
/**
|
1864
|
+
/**
|
1865
|
+
* The player.
|
1866
|
+
*/
|
1294
1867
|
readonly player_index: uint
|
1295
|
-
/**
|
1868
|
+
/**
|
1869
|
+
* Identifier of the event
|
1870
|
+
*/
|
1296
1871
|
readonly name: typeof defines.events.on_player_cheat_mode_enabled
|
1297
|
-
/**
|
1872
|
+
/**
|
1873
|
+
* Tick the event was generated.
|
1874
|
+
*/
|
1298
1875
|
readonly tick: uint
|
1299
1876
|
}
|
1300
1877
|
|
@@ -1304,15 +1881,25 @@ interface OnPlayerCheatModeEnabledEvent extends EventData {
|
|
1304
1881
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag View documentation}
|
1305
1882
|
*/
|
1306
1883
|
interface OnPlayerClickedGpsTagEvent extends EventData {
|
1307
|
-
/**
|
1884
|
+
/**
|
1885
|
+
* Index of the player
|
1886
|
+
*/
|
1308
1887
|
readonly player_index: uint
|
1309
|
-
/**
|
1310
|
-
|
1311
|
-
|
1888
|
+
/**
|
1889
|
+
* Map position contained in gps tag
|
1890
|
+
*/
|
1891
|
+
readonly position: MapPositionTable
|
1892
|
+
/**
|
1893
|
+
* Surface name contained in gps tag, even when such surface does not exists
|
1894
|
+
*/
|
1312
1895
|
readonly surface: string
|
1313
|
-
/**
|
1896
|
+
/**
|
1897
|
+
* Identifier of the event
|
1898
|
+
*/
|
1314
1899
|
readonly name: typeof defines.events.on_player_clicked_gps_tag
|
1315
|
-
/**
|
1900
|
+
/**
|
1901
|
+
* Tick the event was generated.
|
1902
|
+
*/
|
1316
1903
|
readonly tick: uint
|
1317
1904
|
}
|
1318
1905
|
|
@@ -1322,11 +1909,17 @@ interface OnPlayerClickedGpsTagEvent extends EventData {
|
|
1322
1909
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint View documentation}
|
1323
1910
|
*/
|
1324
1911
|
interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
1325
|
-
/**
|
1912
|
+
/**
|
1913
|
+
* The player.
|
1914
|
+
*/
|
1326
1915
|
readonly player_index: uint
|
1327
|
-
/**
|
1916
|
+
/**
|
1917
|
+
* Identifier of the event
|
1918
|
+
*/
|
1328
1919
|
readonly name: typeof defines.events.on_player_configured_blueprint
|
1329
|
-
/**
|
1920
|
+
/**
|
1921
|
+
* Tick the event was generated.
|
1922
|
+
*/
|
1330
1923
|
readonly tick: uint
|
1331
1924
|
}
|
1332
1925
|
|
@@ -1336,32 +1929,49 @@ interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
|
1336
1929
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote View documentation}
|
1337
1930
|
*/
|
1338
1931
|
interface OnPlayerConfiguredSpiderRemoteEvent extends EventData {
|
1339
|
-
/**
|
1932
|
+
/**
|
1933
|
+
* The player that configured the remote.
|
1934
|
+
*/
|
1340
1935
|
readonly player_index: uint
|
1341
|
-
/**
|
1936
|
+
/**
|
1937
|
+
* Spider vehicle to which remote was connected to.
|
1938
|
+
*/
|
1342
1939
|
readonly vehicle: LuaEntity
|
1343
|
-
/**
|
1940
|
+
/**
|
1941
|
+
* Identifier of the event
|
1942
|
+
*/
|
1344
1943
|
readonly name: typeof defines.events.on_player_configured_spider_remote
|
1345
|
-
/**
|
1944
|
+
/**
|
1945
|
+
* Tick the event was generated.
|
1946
|
+
*/
|
1346
1947
|
readonly tick: uint
|
1347
1948
|
}
|
1348
1949
|
|
1349
1950
|
/**
|
1350
|
-
* Called when the player finishes crafting an item. This event fires just before the results are inserted into the
|
1351
|
-
* player's inventory, not when the crafting is queued (see {@link OnPrePlayerCraftedItemEvent on_pre_player_crafted_item}).
|
1951
|
+
* 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}).
|
1352
1952
|
*
|
1353
1953
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_crafted_item View documentation}
|
1354
1954
|
*/
|
1355
1955
|
interface OnPlayerCraftedItemEvent extends EventData {
|
1356
|
-
/**
|
1956
|
+
/**
|
1957
|
+
* The item that has been crafted.
|
1958
|
+
*/
|
1357
1959
|
readonly item_stack: LuaItemStack
|
1358
|
-
/**
|
1960
|
+
/**
|
1961
|
+
* The player doing the crafting.
|
1962
|
+
*/
|
1359
1963
|
readonly player_index: uint
|
1360
|
-
/**
|
1964
|
+
/**
|
1965
|
+
* The recipe used to craft this item.
|
1966
|
+
*/
|
1361
1967
|
readonly recipe: LuaRecipe
|
1362
|
-
/**
|
1968
|
+
/**
|
1969
|
+
* Identifier of the event
|
1970
|
+
*/
|
1363
1971
|
readonly name: typeof defines.events.on_player_crafted_item
|
1364
|
-
/**
|
1972
|
+
/**
|
1973
|
+
* Tick the event was generated.
|
1974
|
+
*/
|
1365
1975
|
readonly tick: uint
|
1366
1976
|
}
|
1367
1977
|
|
@@ -1372,9 +1982,13 @@ interface OnPlayerCraftedItemEvent extends EventData {
|
|
1372
1982
|
*/
|
1373
1983
|
interface OnPlayerCreatedEvent extends EventData {
|
1374
1984
|
readonly player_index: uint
|
1375
|
-
/**
|
1985
|
+
/**
|
1986
|
+
* Identifier of the event
|
1987
|
+
*/
|
1376
1988
|
readonly name: typeof defines.events.on_player_created
|
1377
|
-
/**
|
1989
|
+
/**
|
1990
|
+
* Tick the event was generated.
|
1991
|
+
*/
|
1378
1992
|
readonly tick: uint
|
1379
1993
|
}
|
1380
1994
|
|
@@ -1385,9 +1999,13 @@ interface OnPlayerCreatedEvent extends EventData {
|
|
1385
1999
|
*/
|
1386
2000
|
interface OnPlayerCursorStackChangedEvent extends EventData {
|
1387
2001
|
readonly player_index: uint
|
1388
|
-
/**
|
2002
|
+
/**
|
2003
|
+
* Identifier of the event
|
2004
|
+
*/
|
1389
2005
|
readonly name: typeof defines.events.on_player_cursor_stack_changed
|
1390
|
-
/**
|
2006
|
+
/**
|
2007
|
+
* Tick the event was generated.
|
2008
|
+
*/
|
1391
2009
|
readonly tick: uint
|
1392
2010
|
}
|
1393
2011
|
|
@@ -1397,19 +2015,33 @@ interface OnPlayerCursorStackChangedEvent extends EventData {
|
|
1397
2015
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area View documentation}
|
1398
2016
|
*/
|
1399
2017
|
interface OnPlayerDeconstructedAreaEvent extends EventData {
|
1400
|
-
/**
|
2018
|
+
/**
|
2019
|
+
* The player doing the selection.
|
2020
|
+
*/
|
1401
2021
|
readonly player_index: uint
|
1402
|
-
/**
|
2022
|
+
/**
|
2023
|
+
* The surface selected.
|
2024
|
+
*/
|
1403
2025
|
readonly surface: LuaSurface
|
1404
|
-
/**
|
2026
|
+
/**
|
2027
|
+
* The area selected.
|
2028
|
+
*/
|
1405
2029
|
readonly area: BoundingBoxRead
|
1406
|
-
/**
|
2030
|
+
/**
|
2031
|
+
* The item used to select the area.
|
2032
|
+
*/
|
1407
2033
|
readonly item: string
|
1408
|
-
/**
|
2034
|
+
/**
|
2035
|
+
* If normal selection or alt selection was used.
|
2036
|
+
*/
|
1409
2037
|
readonly alt: boolean
|
1410
|
-
/**
|
2038
|
+
/**
|
2039
|
+
* Identifier of the event
|
2040
|
+
*/
|
1411
2041
|
readonly name: typeof defines.events.on_player_deconstructed_area
|
1412
|
-
/**
|
2042
|
+
/**
|
2043
|
+
* Tick the event was generated.
|
2044
|
+
*/
|
1413
2045
|
readonly tick: uint
|
1414
2046
|
}
|
1415
2047
|
|
@@ -1419,11 +2051,17 @@ interface OnPlayerDeconstructedAreaEvent extends EventData {
|
|
1419
2051
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_demoted View documentation}
|
1420
2052
|
*/
|
1421
2053
|
interface OnPlayerDemotedEvent extends EventData {
|
1422
|
-
/**
|
2054
|
+
/**
|
2055
|
+
* The player.
|
2056
|
+
*/
|
1423
2057
|
readonly player_index: uint
|
1424
|
-
/**
|
2058
|
+
/**
|
2059
|
+
* Identifier of the event
|
2060
|
+
*/
|
1425
2061
|
readonly name: typeof defines.events.on_player_demoted
|
1426
|
-
/**
|
2062
|
+
/**
|
2063
|
+
* Tick the event was generated.
|
2064
|
+
*/
|
1427
2065
|
readonly tick: uint
|
1428
2066
|
}
|
1429
2067
|
|
@@ -1435,9 +2073,13 @@ interface OnPlayerDemotedEvent extends EventData {
|
|
1435
2073
|
interface OnPlayerDiedEvent extends EventData {
|
1436
2074
|
readonly player_index: uint
|
1437
2075
|
readonly cause?: LuaEntity
|
1438
|
-
/**
|
2076
|
+
/**
|
2077
|
+
* Identifier of the event
|
2078
|
+
*/
|
1439
2079
|
readonly name: typeof defines.events.on_player_died
|
1440
|
-
/**
|
2080
|
+
/**
|
2081
|
+
* Tick the event was generated.
|
2082
|
+
*/
|
1441
2083
|
readonly tick: uint
|
1442
2084
|
}
|
1443
2085
|
|
@@ -1447,13 +2089,21 @@ interface OnPlayerDiedEvent extends EventData {
|
|
1447
2089
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed View documentation}
|
1448
2090
|
*/
|
1449
2091
|
interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
1450
|
-
/**
|
2092
|
+
/**
|
2093
|
+
* The player
|
2094
|
+
*/
|
1451
2095
|
readonly player_index: uint
|
1452
|
-
/**
|
2096
|
+
/**
|
2097
|
+
* The old display resolution
|
2098
|
+
*/
|
1453
2099
|
readonly old_resolution: DisplayResolution
|
1454
|
-
/**
|
2100
|
+
/**
|
2101
|
+
* Identifier of the event
|
2102
|
+
*/
|
1455
2103
|
readonly name: typeof defines.events.on_player_display_resolution_changed
|
1456
|
-
/**
|
2104
|
+
/**
|
2105
|
+
* Tick the event was generated.
|
2106
|
+
*/
|
1457
2107
|
readonly tick: uint
|
1458
2108
|
}
|
1459
2109
|
|
@@ -1463,13 +2113,21 @@ interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
|
1463
2113
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed View documentation}
|
1464
2114
|
*/
|
1465
2115
|
interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
1466
|
-
/**
|
2116
|
+
/**
|
2117
|
+
* The player
|
2118
|
+
*/
|
1467
2119
|
readonly player_index: uint
|
1468
|
-
/**
|
2120
|
+
/**
|
2121
|
+
* The old display scale
|
2122
|
+
*/
|
1469
2123
|
readonly old_scale: double
|
1470
|
-
/**
|
2124
|
+
/**
|
2125
|
+
* Identifier of the event
|
2126
|
+
*/
|
1471
2127
|
readonly name: typeof defines.events.on_player_display_scale_changed
|
1472
|
-
/**
|
2128
|
+
/**
|
2129
|
+
* Tick the event was generated.
|
2130
|
+
*/
|
1473
2131
|
readonly tick: uint
|
1474
2132
|
}
|
1475
2133
|
|
@@ -1480,11 +2138,17 @@ interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
|
1480
2138
|
*/
|
1481
2139
|
interface OnPlayerDrivingChangedStateEvent extends EventData {
|
1482
2140
|
readonly player_index: uint
|
1483
|
-
/**
|
2141
|
+
/**
|
2142
|
+
* The vehicle if any.
|
2143
|
+
*/
|
1484
2144
|
readonly entity?: LuaEntity
|
1485
|
-
/**
|
2145
|
+
/**
|
2146
|
+
* Identifier of the event
|
2147
|
+
*/
|
1486
2148
|
readonly name: typeof defines.events.on_player_driving_changed_state
|
1487
|
-
/**
|
2149
|
+
/**
|
2150
|
+
* Tick the event was generated.
|
2151
|
+
*/
|
1488
2152
|
readonly tick: uint
|
1489
2153
|
}
|
1490
2154
|
|
@@ -1495,11 +2159,17 @@ interface OnPlayerDrivingChangedStateEvent extends EventData {
|
|
1495
2159
|
*/
|
1496
2160
|
interface OnPlayerDroppedItemEvent extends EventData {
|
1497
2161
|
readonly player_index: uint
|
1498
|
-
/**
|
2162
|
+
/**
|
2163
|
+
* The item-on-ground entity.
|
2164
|
+
*/
|
1499
2165
|
readonly entity: LuaEntity
|
1500
|
-
/**
|
2166
|
+
/**
|
2167
|
+
* Identifier of the event
|
2168
|
+
*/
|
1501
2169
|
readonly name: typeof defines.events.on_player_dropped_item
|
1502
|
-
/**
|
2170
|
+
/**
|
2171
|
+
* Tick the event was generated.
|
2172
|
+
*/
|
1503
2173
|
readonly tick: uint
|
1504
2174
|
}
|
1505
2175
|
|
@@ -1509,15 +2179,25 @@ interface OnPlayerDroppedItemEvent extends EventData {
|
|
1509
2179
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred View documentation}
|
1510
2180
|
*/
|
1511
2181
|
interface OnPlayerFastTransferredEvent extends EventData {
|
1512
|
-
/**
|
2182
|
+
/**
|
2183
|
+
* The player transferred from or to.
|
2184
|
+
*/
|
1513
2185
|
readonly player_index: uint
|
1514
|
-
/**
|
2186
|
+
/**
|
2187
|
+
* The entity transferred from or to.
|
2188
|
+
*/
|
1515
2189
|
readonly entity: LuaEntity
|
1516
|
-
/**
|
2190
|
+
/**
|
2191
|
+
* Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.
|
2192
|
+
*/
|
1517
2193
|
readonly from_player: boolean
|
1518
|
-
/**
|
2194
|
+
/**
|
2195
|
+
* Identifier of the event
|
2196
|
+
*/
|
1519
2197
|
readonly name: typeof defines.events.on_player_fast_transferred
|
1520
|
-
/**
|
2198
|
+
/**
|
2199
|
+
* Tick the event was generated.
|
2200
|
+
*/
|
1521
2201
|
readonly tick: uint
|
1522
2202
|
}
|
1523
2203
|
|
@@ -1527,19 +2207,33 @@ interface OnPlayerFastTransferredEvent extends EventData {
|
|
1527
2207
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid View documentation}
|
1528
2208
|
*/
|
1529
2209
|
interface OnPlayerFlushedFluidEvent extends EventData {
|
1530
|
-
/**
|
2210
|
+
/**
|
2211
|
+
* Index of the player
|
2212
|
+
*/
|
1531
2213
|
readonly player_index: uint
|
1532
|
-
/**
|
2214
|
+
/**
|
2215
|
+
* Name of a fluid that was flushed
|
2216
|
+
*/
|
1533
2217
|
readonly fluid: string
|
1534
|
-
/**
|
2218
|
+
/**
|
2219
|
+
* Amount of fluid that was removed
|
2220
|
+
*/
|
1535
2221
|
readonly amount: double
|
1536
|
-
/**
|
2222
|
+
/**
|
2223
|
+
* Entity from which flush was performed
|
2224
|
+
*/
|
1537
2225
|
readonly entity: LuaEntity
|
1538
|
-
/**
|
2226
|
+
/**
|
2227
|
+
* True if flush was requested only on this entity
|
2228
|
+
*/
|
1539
2229
|
readonly only_this_entity: boolean
|
1540
|
-
/**
|
2230
|
+
/**
|
2231
|
+
* Identifier of the event
|
2232
|
+
*/
|
1541
2233
|
readonly name: typeof defines.events.on_player_flushed_fluid
|
1542
|
-
/**
|
2234
|
+
/**
|
2235
|
+
* Tick the event was generated.
|
2236
|
+
*/
|
1543
2237
|
readonly tick: uint
|
1544
2238
|
}
|
1545
2239
|
|
@@ -1550,9 +2244,13 @@ interface OnPlayerFlushedFluidEvent extends EventData {
|
|
1550
2244
|
*/
|
1551
2245
|
interface OnPlayerGunInventoryChangedEvent extends EventData {
|
1552
2246
|
readonly player_index: uint
|
1553
|
-
/**
|
2247
|
+
/**
|
2248
|
+
* Identifier of the event
|
2249
|
+
*/
|
1554
2250
|
readonly name: typeof defines.events.on_player_gun_inventory_changed
|
1555
|
-
/**
|
2251
|
+
/**
|
2252
|
+
* Tick the event was generated.
|
2253
|
+
*/
|
1556
2254
|
readonly tick: uint
|
1557
2255
|
}
|
1558
2256
|
|
@@ -1563,9 +2261,13 @@ interface OnPlayerGunInventoryChangedEvent extends EventData {
|
|
1563
2261
|
*/
|
1564
2262
|
interface OnPlayerJoinedGameEvent extends EventData {
|
1565
2263
|
readonly player_index: uint
|
1566
|
-
/**
|
2264
|
+
/**
|
2265
|
+
* Identifier of the event
|
2266
|
+
*/
|
1567
2267
|
readonly name: typeof defines.events.on_player_joined_game
|
1568
|
-
/**
|
2268
|
+
/**
|
2269
|
+
* Tick the event was generated.
|
2270
|
+
*/
|
1569
2271
|
readonly tick: uint
|
1570
2272
|
}
|
1571
2273
|
|
@@ -1575,15 +2277,25 @@ interface OnPlayerJoinedGameEvent extends EventData {
|
|
1575
2277
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_kicked View documentation}
|
1576
2278
|
*/
|
1577
2279
|
interface OnPlayerKickedEvent extends EventData {
|
1578
|
-
/**
|
2280
|
+
/**
|
2281
|
+
* The player kicked.
|
2282
|
+
*/
|
1579
2283
|
readonly player_index: uint
|
1580
|
-
/**
|
2284
|
+
/**
|
2285
|
+
* The player that did the kicking if any.
|
2286
|
+
*/
|
1581
2287
|
readonly by_player?: uint
|
1582
|
-
/**
|
2288
|
+
/**
|
2289
|
+
* The reason given if any.
|
2290
|
+
*/
|
1583
2291
|
readonly reason?: string
|
1584
|
-
/**
|
2292
|
+
/**
|
2293
|
+
* Identifier of the event
|
2294
|
+
*/
|
1585
2295
|
readonly name: typeof defines.events.on_player_kicked
|
1586
|
-
/**
|
2296
|
+
/**
|
2297
|
+
* Tick the event was generated.
|
2298
|
+
*/
|
1587
2299
|
readonly tick: uint
|
1588
2300
|
}
|
1589
2301
|
|
@@ -1595,9 +2307,13 @@ interface OnPlayerKickedEvent extends EventData {
|
|
1595
2307
|
interface OnPlayerLeftGameEvent extends EventData {
|
1596
2308
|
readonly player_index: uint
|
1597
2309
|
readonly reason: defines.disconnect_reason
|
1598
|
-
/**
|
2310
|
+
/**
|
2311
|
+
* Identifier of the event
|
2312
|
+
*/
|
1599
2313
|
readonly name: typeof defines.events.on_player_left_game
|
1600
|
-
/**
|
2314
|
+
/**
|
2315
|
+
* Tick the event was generated.
|
2316
|
+
*/
|
1601
2317
|
readonly tick: uint
|
1602
2318
|
}
|
1603
2319
|
|
@@ -1608,32 +2324,42 @@ interface OnPlayerLeftGameEvent extends EventData {
|
|
1608
2324
|
*/
|
1609
2325
|
interface OnPlayerMainInventoryChangedEvent extends EventData {
|
1610
2326
|
readonly player_index: uint
|
1611
|
-
/**
|
2327
|
+
/**
|
2328
|
+
* Identifier of the event
|
2329
|
+
*/
|
1612
2330
|
readonly name: typeof defines.events.on_player_main_inventory_changed
|
1613
|
-
/**
|
2331
|
+
/**
|
2332
|
+
* Tick the event was generated.
|
2333
|
+
*/
|
1614
2334
|
readonly tick: uint
|
1615
2335
|
}
|
1616
2336
|
|
1617
2337
|
/**
|
1618
|
-
* Called after the results of an entity being mined are collected just before the entity is destroyed. After this event
|
1619
|
-
* any items in the buffer will be transferred into the player as if they came from mining the entity. Can be filtered
|
1620
|
-
* using {@link LuaPlayerMinedEntityEventFilter}.
|
1621
|
-
*
|
1622
|
-
* **Note**: The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding
|
1623
|
-
* as more items are transferred into it.
|
2338
|
+
* Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the player as if they came from mining the entity. Can be filtered using {@link LuaPlayerMinedEntityEventFilter}.
|
1624
2339
|
*
|
1625
2340
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_entity View documentation}
|
2341
|
+
* @remarks The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
1626
2342
|
*/
|
1627
2343
|
interface OnPlayerMinedEntityEvent extends EventData {
|
1628
|
-
/**
|
2344
|
+
/**
|
2345
|
+
* The index of the player doing the mining.
|
2346
|
+
*/
|
1629
2347
|
readonly player_index: uint
|
1630
|
-
/**
|
2348
|
+
/**
|
2349
|
+
* The entity that has been mined.
|
2350
|
+
*/
|
1631
2351
|
readonly entity: LuaEntity
|
1632
|
-
/**
|
2352
|
+
/**
|
2353
|
+
* The temporary inventory that holds the result of mining the entity.
|
2354
|
+
*/
|
1633
2355
|
readonly buffer: LuaInventory
|
1634
|
-
/**
|
2356
|
+
/**
|
2357
|
+
* Identifier of the event
|
2358
|
+
*/
|
1635
2359
|
readonly name: typeof defines.events.on_player_mined_entity
|
1636
|
-
/**
|
2360
|
+
/**
|
2361
|
+
* Tick the event was generated.
|
2362
|
+
*/
|
1637
2363
|
readonly tick: uint
|
1638
2364
|
}
|
1639
2365
|
|
@@ -1643,12 +2369,18 @@ interface OnPlayerMinedEntityEvent extends EventData {
|
|
1643
2369
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_item View documentation}
|
1644
2370
|
*/
|
1645
2371
|
interface OnPlayerMinedItemEvent extends EventData {
|
1646
|
-
/**
|
2372
|
+
/**
|
2373
|
+
* The item given to the player
|
2374
|
+
*/
|
1647
2375
|
readonly item_stack: SimpleItemStack
|
1648
2376
|
readonly player_index: uint
|
1649
|
-
/**
|
2377
|
+
/**
|
2378
|
+
* Identifier of the event
|
2379
|
+
*/
|
1650
2380
|
readonly name: typeof defines.events.on_player_mined_item
|
1651
|
-
/**
|
2381
|
+
/**
|
2382
|
+
* Tick the event was generated.
|
2383
|
+
*/
|
1652
2384
|
readonly tick: uint
|
1653
2385
|
}
|
1654
2386
|
|
@@ -1659,13 +2391,21 @@ interface OnPlayerMinedItemEvent extends EventData {
|
|
1659
2391
|
*/
|
1660
2392
|
interface OnPlayerMinedTileEvent extends EventData {
|
1661
2393
|
readonly player_index: uint
|
1662
|
-
/**
|
2394
|
+
/**
|
2395
|
+
* The surface the tile(s) were mined from.
|
2396
|
+
*/
|
1663
2397
|
readonly surface_index: uint
|
1664
|
-
/**
|
2398
|
+
/**
|
2399
|
+
* The position data.
|
2400
|
+
*/
|
1665
2401
|
readonly tiles: OldTileAndPosition[]
|
1666
|
-
/**
|
2402
|
+
/**
|
2403
|
+
* Identifier of the event
|
2404
|
+
*/
|
1667
2405
|
readonly name: typeof defines.events.on_player_mined_tile
|
1668
|
-
/**
|
2406
|
+
/**
|
2407
|
+
* Tick the event was generated.
|
2408
|
+
*/
|
1669
2409
|
readonly tick: uint
|
1670
2410
|
}
|
1671
2411
|
|
@@ -1675,11 +2415,17 @@ interface OnPlayerMinedTileEvent extends EventData {
|
|
1675
2415
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_muted View documentation}
|
1676
2416
|
*/
|
1677
2417
|
interface OnPlayerMutedEvent extends EventData {
|
1678
|
-
/**
|
2418
|
+
/**
|
2419
|
+
* The player.
|
2420
|
+
*/
|
1679
2421
|
readonly player_index: uint
|
1680
|
-
/**
|
2422
|
+
/**
|
2423
|
+
* Identifier of the event
|
2424
|
+
*/
|
1681
2425
|
readonly name: typeof defines.events.on_player_muted
|
1682
|
-
/**
|
2426
|
+
/**
|
2427
|
+
* Tick the event was generated.
|
2428
|
+
*/
|
1683
2429
|
readonly tick: uint
|
1684
2430
|
}
|
1685
2431
|
|
@@ -1689,15 +2435,25 @@ interface OnPlayerMutedEvent extends EventData {
|
|
1689
2435
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_pipette View documentation}
|
1690
2436
|
*/
|
1691
2437
|
interface OnPlayerPipetteEvent extends EventData {
|
1692
|
-
/**
|
2438
|
+
/**
|
2439
|
+
* The player
|
2440
|
+
*/
|
1693
2441
|
readonly player_index: uint
|
1694
|
-
/**
|
2442
|
+
/**
|
2443
|
+
* The item put in the cursor
|
2444
|
+
*/
|
1695
2445
|
readonly item: LuaItemPrototype
|
1696
|
-
/**
|
2446
|
+
/**
|
2447
|
+
* If cheat mode was used to give a free stack of the item.
|
2448
|
+
*/
|
1697
2449
|
readonly used_cheat_mode: boolean
|
1698
|
-
/**
|
2450
|
+
/**
|
2451
|
+
* Identifier of the event
|
2452
|
+
*/
|
1699
2453
|
readonly name: typeof defines.events.on_player_pipette
|
1700
|
-
/**
|
2454
|
+
/**
|
2455
|
+
* Tick the event was generated.
|
2456
|
+
*/
|
1701
2457
|
readonly tick: uint
|
1702
2458
|
}
|
1703
2459
|
|
@@ -1708,13 +2464,21 @@ interface OnPlayerPipetteEvent extends EventData {
|
|
1708
2464
|
*/
|
1709
2465
|
interface OnPlayerPlacedEquipmentEvent extends EventData {
|
1710
2466
|
readonly player_index: uint
|
1711
|
-
/**
|
2467
|
+
/**
|
2468
|
+
* The equipment put in the equipment grid.
|
2469
|
+
*/
|
1712
2470
|
readonly equipment: LuaEquipment
|
1713
|
-
/**
|
2471
|
+
/**
|
2472
|
+
* The equipment grid the equipment was put in.
|
2473
|
+
*/
|
1714
2474
|
readonly grid: LuaEquipmentGrid
|
1715
|
-
/**
|
2475
|
+
/**
|
2476
|
+
* Identifier of the event
|
2477
|
+
*/
|
1716
2478
|
readonly name: typeof defines.events.on_player_placed_equipment
|
1717
|
-
/**
|
2479
|
+
/**
|
2480
|
+
* Tick the event was generated.
|
2481
|
+
*/
|
1718
2482
|
readonly tick: uint
|
1719
2483
|
}
|
1720
2484
|
|
@@ -1724,26 +2488,37 @@ interface OnPlayerPlacedEquipmentEvent extends EventData {
|
|
1724
2488
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_promoted View documentation}
|
1725
2489
|
*/
|
1726
2490
|
interface OnPlayerPromotedEvent extends EventData {
|
1727
|
-
/**
|
2491
|
+
/**
|
2492
|
+
* The player.
|
2493
|
+
*/
|
1728
2494
|
readonly player_index: uint
|
1729
|
-
/**
|
2495
|
+
/**
|
2496
|
+
* Identifier of the event
|
2497
|
+
*/
|
1730
2498
|
readonly name: typeof defines.events.on_player_promoted
|
1731
|
-
/**
|
2499
|
+
/**
|
2500
|
+
* Tick the event was generated.
|
2501
|
+
*/
|
1732
2502
|
readonly tick: uint
|
1733
2503
|
}
|
1734
2504
|
|
1735
2505
|
/**
|
1736
|
-
* Called when a player is removed (deleted) from the game. Not to be confused with the player logging of this is
|
1737
|
-
* different in that the player is deleted as if he never existed in the save file.
|
2506
|
+
* Called when a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file.
|
1738
2507
|
*
|
1739
2508
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_removed View documentation}
|
1740
2509
|
*/
|
1741
2510
|
interface OnPlayerRemovedEvent extends EventData {
|
1742
|
-
/**
|
2511
|
+
/**
|
2512
|
+
* The player index that was removed
|
2513
|
+
*/
|
1743
2514
|
readonly player_index: uint
|
1744
|
-
/**
|
2515
|
+
/**
|
2516
|
+
* Identifier of the event
|
2517
|
+
*/
|
1745
2518
|
readonly name: typeof defines.events.on_player_removed
|
1746
|
-
/**
|
2519
|
+
/**
|
2520
|
+
* Tick the event was generated.
|
2521
|
+
*/
|
1747
2522
|
readonly tick: uint
|
1748
2523
|
}
|
1749
2524
|
|
@@ -1754,15 +2529,25 @@ interface OnPlayerRemovedEvent extends EventData {
|
|
1754
2529
|
*/
|
1755
2530
|
interface OnPlayerRemovedEquipmentEvent extends EventData {
|
1756
2531
|
readonly player_index: uint
|
1757
|
-
/**
|
2532
|
+
/**
|
2533
|
+
* The equipment grid removed from.
|
2534
|
+
*/
|
1758
2535
|
readonly grid: LuaEquipmentGrid
|
1759
|
-
/**
|
2536
|
+
/**
|
2537
|
+
* The equipment removed.
|
2538
|
+
*/
|
1760
2539
|
readonly equipment: string
|
1761
|
-
/**
|
2540
|
+
/**
|
2541
|
+
* The count of equipment removed.
|
2542
|
+
*/
|
1762
2543
|
readonly count: uint
|
1763
|
-
/**
|
2544
|
+
/**
|
2545
|
+
* Identifier of the event
|
2546
|
+
*/
|
1764
2547
|
readonly name: typeof defines.events.on_player_removed_equipment
|
1765
|
-
/**
|
2548
|
+
/**
|
2549
|
+
* Tick the event was generated.
|
2550
|
+
*/
|
1766
2551
|
readonly tick: uint
|
1767
2552
|
}
|
1768
2553
|
|
@@ -1774,9 +2559,13 @@ interface OnPlayerRemovedEquipmentEvent extends EventData {
|
|
1774
2559
|
interface OnPlayerRepairedEntityEvent extends EventData {
|
1775
2560
|
readonly player_index: uint
|
1776
2561
|
readonly entity: LuaEntity
|
1777
|
-
/**
|
2562
|
+
/**
|
2563
|
+
* Identifier of the event
|
2564
|
+
*/
|
1778
2565
|
readonly name: typeof defines.events.on_player_repaired_entity
|
1779
|
-
/**
|
2566
|
+
/**
|
2567
|
+
* Tick the event was generated.
|
2568
|
+
*/
|
1780
2569
|
readonly tick: uint
|
1781
2570
|
}
|
1782
2571
|
|
@@ -1787,29 +2576,42 @@ interface OnPlayerRepairedEntityEvent extends EventData {
|
|
1787
2576
|
*/
|
1788
2577
|
interface OnPlayerRespawnedEvent extends EventData {
|
1789
2578
|
readonly player_index: uint
|
1790
|
-
/**
|
2579
|
+
/**
|
2580
|
+
* The player port used to respawn if one was used.
|
2581
|
+
*/
|
1791
2582
|
readonly player_port?: LuaEntity
|
1792
|
-
/**
|
2583
|
+
/**
|
2584
|
+
* Identifier of the event
|
2585
|
+
*/
|
1793
2586
|
readonly name: typeof defines.events.on_player_respawned
|
1794
|
-
/**
|
2587
|
+
/**
|
2588
|
+
* Tick the event was generated.
|
2589
|
+
*/
|
1795
2590
|
readonly tick: uint
|
1796
2591
|
}
|
1797
2592
|
|
1798
2593
|
/**
|
1799
|
-
* Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation
|
1800
|
-
* -- pressing the rotate key on an entity that can't be rotated won't fire this event.
|
2594
|
+
* 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.
|
1801
2595
|
*
|
1802
2596
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity View documentation}
|
1803
2597
|
*/
|
1804
2598
|
interface OnPlayerRotatedEntityEvent extends EventData {
|
1805
|
-
/**
|
2599
|
+
/**
|
2600
|
+
* The rotated entity.
|
2601
|
+
*/
|
1806
2602
|
readonly entity: LuaEntity
|
1807
|
-
/**
|
2603
|
+
/**
|
2604
|
+
* The previous direction
|
2605
|
+
*/
|
1808
2606
|
readonly previous_direction: defines.direction
|
1809
2607
|
readonly player_index: uint
|
1810
|
-
/**
|
2608
|
+
/**
|
2609
|
+
* Identifier of the event
|
2610
|
+
*/
|
1811
2611
|
readonly name: typeof defines.events.on_player_rotated_entity
|
1812
|
-
/**
|
2612
|
+
/**
|
2613
|
+
* Tick the event was generated.
|
2614
|
+
*/
|
1813
2615
|
readonly tick: uint
|
1814
2616
|
}
|
1815
2617
|
|
@@ -1819,21 +2621,37 @@ interface OnPlayerRotatedEntityEvent extends EventData {
|
|
1819
2621
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_selected_area View documentation}
|
1820
2622
|
*/
|
1821
2623
|
interface OnPlayerSelectedAreaEvent extends EventData {
|
1822
|
-
/**
|
2624
|
+
/**
|
2625
|
+
* The player doing the selection.
|
2626
|
+
*/
|
1823
2627
|
readonly player_index: uint
|
1824
|
-
/**
|
2628
|
+
/**
|
2629
|
+
* The surface selected.
|
2630
|
+
*/
|
1825
2631
|
readonly surface: LuaSurface
|
1826
|
-
/**
|
2632
|
+
/**
|
2633
|
+
* The area selected.
|
2634
|
+
*/
|
1827
2635
|
readonly area: BoundingBoxRead
|
1828
|
-
/**
|
2636
|
+
/**
|
2637
|
+
* The item used to select the area.
|
2638
|
+
*/
|
1829
2639
|
readonly item: string
|
1830
|
-
/**
|
2640
|
+
/**
|
2641
|
+
* The entities selected.
|
2642
|
+
*/
|
1831
2643
|
readonly entities: LuaEntity[]
|
1832
|
-
/**
|
2644
|
+
/**
|
2645
|
+
* The tiles selected.
|
2646
|
+
*/
|
1833
2647
|
readonly tiles: LuaTile[]
|
1834
|
-
/**
|
2648
|
+
/**
|
2649
|
+
* Identifier of the event
|
2650
|
+
*/
|
1835
2651
|
readonly name: typeof defines.events.on_player_selected_area
|
1836
|
-
/**
|
2652
|
+
/**
|
2653
|
+
* Tick the event was generated.
|
2654
|
+
*/
|
1837
2655
|
readonly tick: uint
|
1838
2656
|
}
|
1839
2657
|
|
@@ -1844,9 +2662,13 @@ interface OnPlayerSelectedAreaEvent extends EventData {
|
|
1844
2662
|
*/
|
1845
2663
|
interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
1846
2664
|
readonly player_index: uint
|
1847
|
-
/**
|
2665
|
+
/**
|
2666
|
+
* Identifier of the event
|
2667
|
+
*/
|
1848
2668
|
readonly name: typeof defines.events.on_player_set_quick_bar_slot
|
1849
|
-
/**
|
2669
|
+
/**
|
2670
|
+
* Tick the event was generated.
|
2671
|
+
*/
|
1850
2672
|
readonly tick: uint
|
1851
2673
|
}
|
1852
2674
|
|
@@ -1856,21 +2678,37 @@ interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
|
1856
2678
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint View documentation}
|
1857
2679
|
*/
|
1858
2680
|
interface OnPlayerSetupBlueprintEvent extends EventData {
|
1859
|
-
/**
|
2681
|
+
/**
|
2682
|
+
* The player doing the selection.
|
2683
|
+
*/
|
1860
2684
|
readonly player_index: uint
|
1861
|
-
/**
|
2685
|
+
/**
|
2686
|
+
* The surface selected.
|
2687
|
+
*/
|
1862
2688
|
readonly surface: LuaSurface
|
1863
|
-
/**
|
2689
|
+
/**
|
2690
|
+
* The area selected.
|
2691
|
+
*/
|
1864
2692
|
readonly area: BoundingBoxRead
|
1865
|
-
/**
|
2693
|
+
/**
|
2694
|
+
* The item used to select the area.
|
2695
|
+
*/
|
1866
2696
|
readonly item: string
|
1867
|
-
/**
|
2697
|
+
/**
|
2698
|
+
* If normal selection or alt selection was used.
|
2699
|
+
*/
|
1868
2700
|
readonly alt: boolean
|
1869
|
-
/**
|
2701
|
+
/**
|
2702
|
+
* The blueprint entity index to source entity mapping. Note: if any mod changes the blueprint this will be incorrect.
|
2703
|
+
*/
|
1870
2704
|
readonly mapping: LuaLazyLoadedValue<Record<uint, LuaEntity>>
|
1871
|
-
/**
|
2705
|
+
/**
|
2706
|
+
* Identifier of the event
|
2707
|
+
*/
|
1872
2708
|
readonly name: typeof defines.events.on_player_setup_blueprint
|
1873
|
-
/**
|
2709
|
+
/**
|
2710
|
+
* Tick the event was generated.
|
2711
|
+
*/
|
1874
2712
|
readonly tick: uint
|
1875
2713
|
}
|
1876
2714
|
|
@@ -1882,13 +2720,16 @@ interface OnPlayerSetupBlueprintEvent extends EventData {
|
|
1882
2720
|
interface OnPlayerToggledAltModeEvent extends EventData {
|
1883
2721
|
readonly player_index: uint
|
1884
2722
|
/**
|
1885
|
-
* The new alt mode value. This value is a shortcut for accessing
|
1886
|
-
* {@link GameViewSettings.show_entity_info GameViewSettings::show_entity_info} on the player.
|
2723
|
+
* The new alt mode value. This value is a shortcut for accessing {@link GameViewSettings#show_entity_info GameViewSettings::show_entity_info} on the player.
|
1887
2724
|
*/
|
1888
2725
|
readonly alt_mode: boolean
|
1889
|
-
/**
|
2726
|
+
/**
|
2727
|
+
* Identifier of the event
|
2728
|
+
*/
|
1890
2729
|
readonly name: typeof defines.events.on_player_toggled_alt_mode
|
1891
|
-
/**
|
2730
|
+
/**
|
2731
|
+
* Tick the event was generated.
|
2732
|
+
*/
|
1892
2733
|
readonly tick: uint
|
1893
2734
|
}
|
1894
2735
|
|
@@ -1899,9 +2740,13 @@ interface OnPlayerToggledAltModeEvent extends EventData {
|
|
1899
2740
|
*/
|
1900
2741
|
interface OnPlayerToggledMapEditorEvent extends EventData {
|
1901
2742
|
readonly player_index: uint
|
1902
|
-
/**
|
2743
|
+
/**
|
2744
|
+
* Identifier of the event
|
2745
|
+
*/
|
1903
2746
|
readonly name: typeof defines.events.on_player_toggled_map_editor
|
1904
|
-
/**
|
2747
|
+
/**
|
2748
|
+
* Tick the event was generated.
|
2749
|
+
*/
|
1905
2750
|
readonly tick: uint
|
1906
2751
|
}
|
1907
2752
|
|
@@ -1912,9 +2757,13 @@ interface OnPlayerToggledMapEditorEvent extends EventData {
|
|
1912
2757
|
*/
|
1913
2758
|
interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
1914
2759
|
readonly player_index: uint
|
1915
|
-
/**
|
2760
|
+
/**
|
2761
|
+
* Identifier of the event
|
2762
|
+
*/
|
1916
2763
|
readonly name: typeof defines.events.on_player_trash_inventory_changed
|
1917
|
-
/**
|
2764
|
+
/**
|
2765
|
+
* Tick the event was generated.
|
2766
|
+
*/
|
1918
2767
|
readonly tick: uint
|
1919
2768
|
}
|
1920
2769
|
|
@@ -1924,17 +2773,29 @@ interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
|
1924
2773
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_unbanned View documentation}
|
1925
2774
|
*/
|
1926
2775
|
interface OnPlayerUnbannedEvent extends EventData {
|
1927
|
-
/**
|
2776
|
+
/**
|
2777
|
+
* The player un-banned.
|
2778
|
+
*/
|
1928
2779
|
readonly player_index?: uint
|
1929
|
-
/**
|
2780
|
+
/**
|
2781
|
+
* The player name un-banned.
|
2782
|
+
*/
|
1930
2783
|
readonly player_name: string
|
1931
|
-
/**
|
2784
|
+
/**
|
2785
|
+
* The player that did the un-banning if any.
|
2786
|
+
*/
|
1932
2787
|
readonly by_player?: uint
|
1933
|
-
/**
|
2788
|
+
/**
|
2789
|
+
* The reason the player was banned if any.
|
2790
|
+
*/
|
1934
2791
|
readonly reason?: string
|
1935
|
-
/**
|
2792
|
+
/**
|
2793
|
+
* Identifier of the event
|
2794
|
+
*/
|
1936
2795
|
readonly name: typeof defines.events.on_player_unbanned
|
1937
|
-
/**
|
2796
|
+
/**
|
2797
|
+
* Tick the event was generated.
|
2798
|
+
*/
|
1938
2799
|
readonly tick: uint
|
1939
2800
|
}
|
1940
2801
|
|
@@ -1944,11 +2805,17 @@ interface OnPlayerUnbannedEvent extends EventData {
|
|
1944
2805
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_unmuted View documentation}
|
1945
2806
|
*/
|
1946
2807
|
interface OnPlayerUnmutedEvent extends EventData {
|
1947
|
-
/**
|
2808
|
+
/**
|
2809
|
+
* The player.
|
2810
|
+
*/
|
1948
2811
|
readonly player_index: uint
|
1949
|
-
/**
|
2812
|
+
/**
|
2813
|
+
* Identifier of the event
|
2814
|
+
*/
|
1950
2815
|
readonly name: typeof defines.events.on_player_unmuted
|
1951
|
-
/**
|
2816
|
+
/**
|
2817
|
+
* Tick the event was generated.
|
2818
|
+
*/
|
1952
2819
|
readonly tick: uint
|
1953
2820
|
}
|
1954
2821
|
|
@@ -1958,15 +2825,25 @@ interface OnPlayerUnmutedEvent extends EventData {
|
|
1958
2825
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_used_capsule View documentation}
|
1959
2826
|
*/
|
1960
2827
|
interface OnPlayerUsedCapsuleEvent extends EventData {
|
1961
|
-
/**
|
2828
|
+
/**
|
2829
|
+
* The player.
|
2830
|
+
*/
|
1962
2831
|
readonly player_index: uint
|
1963
|
-
/**
|
2832
|
+
/**
|
2833
|
+
* The capsule item used.
|
2834
|
+
*/
|
1964
2835
|
readonly item: LuaItemPrototype
|
1965
|
-
/**
|
1966
|
-
|
1967
|
-
|
2836
|
+
/**
|
2837
|
+
* The position the capsule was used.
|
2838
|
+
*/
|
2839
|
+
readonly position: MapPositionTable
|
2840
|
+
/**
|
2841
|
+
* Identifier of the event
|
2842
|
+
*/
|
1968
2843
|
readonly name: typeof defines.events.on_player_used_capsule
|
1969
|
-
/**
|
2844
|
+
/**
|
2845
|
+
* Tick the event was generated.
|
2846
|
+
*/
|
1970
2847
|
readonly tick: uint
|
1971
2848
|
}
|
1972
2849
|
|
@@ -1976,17 +2853,29 @@ interface OnPlayerUsedCapsuleEvent extends EventData {
|
|
1976
2853
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote View documentation}
|
1977
2854
|
*/
|
1978
2855
|
interface OnPlayerUsedSpiderRemoteEvent extends EventData {
|
1979
|
-
/**
|
2856
|
+
/**
|
2857
|
+
* The player that used the remote.
|
2858
|
+
*/
|
1980
2859
|
readonly player_index: uint
|
1981
|
-
/**
|
2860
|
+
/**
|
2861
|
+
* Spider vehicle which was requested to move.
|
2862
|
+
*/
|
1982
2863
|
readonly vehicle: LuaEntity
|
1983
|
-
/**
|
1984
|
-
|
1985
|
-
|
2864
|
+
/**
|
2865
|
+
* Goal position to which spidertron was sent to.
|
2866
|
+
*/
|
2867
|
+
readonly position: MapPositionTable
|
2868
|
+
/**
|
2869
|
+
* If the use was successful. It may fail when spidertron has different driver or when player is on different surface.
|
2870
|
+
*/
|
1986
2871
|
readonly success: boolean
|
1987
|
-
/**
|
2872
|
+
/**
|
2873
|
+
* Identifier of the event
|
2874
|
+
*/
|
1988
2875
|
readonly name: typeof defines.events.on_player_used_spider_remote
|
1989
|
-
/**
|
2876
|
+
/**
|
2877
|
+
* Tick the event was generated.
|
2878
|
+
*/
|
1990
2879
|
readonly tick: uint
|
1991
2880
|
}
|
1992
2881
|
|
@@ -1996,25 +2885,45 @@ interface OnPlayerUsedSpiderRemoteEvent extends EventData {
|
|
1996
2885
|
* {@link https://lua-api.factorio.com/latest/events.html#on_post_entity_died View documentation}
|
1997
2886
|
*/
|
1998
2887
|
interface OnPostEntityDiedEvent extends EventData {
|
1999
|
-
/**
|
2888
|
+
/**
|
2889
|
+
* The ghost created by the entity dying if any.
|
2890
|
+
*/
|
2000
2891
|
readonly ghost?: LuaEntity
|
2001
|
-
/**
|
2892
|
+
/**
|
2893
|
+
* The force that did the killing if any.
|
2894
|
+
*/
|
2002
2895
|
readonly force?: LuaForce
|
2003
|
-
/**
|
2004
|
-
|
2005
|
-
|
2896
|
+
/**
|
2897
|
+
* Position where the entity died.
|
2898
|
+
*/
|
2899
|
+
readonly position: MapPositionTable
|
2900
|
+
/**
|
2901
|
+
* The entity prototype of the entity that died.
|
2902
|
+
*/
|
2006
2903
|
readonly prototype: LuaEntityPrototype
|
2007
|
-
/**
|
2904
|
+
/**
|
2905
|
+
* The damage type if any.
|
2906
|
+
*/
|
2008
2907
|
readonly damage_type?: LuaDamagePrototype
|
2009
|
-
/**
|
2908
|
+
/**
|
2909
|
+
* The corpses created by the entity dying if any.
|
2910
|
+
*/
|
2010
2911
|
readonly corpses: LuaEntity[]
|
2011
|
-
/**
|
2912
|
+
/**
|
2913
|
+
* The surface the entity was on.
|
2914
|
+
*/
|
2012
2915
|
readonly surface_index: uint
|
2013
|
-
/**
|
2916
|
+
/**
|
2917
|
+
* The unit number the entity had if any.
|
2918
|
+
*/
|
2014
2919
|
readonly unit_number?: uint
|
2015
|
-
/**
|
2920
|
+
/**
|
2921
|
+
* Identifier of the event
|
2922
|
+
*/
|
2016
2923
|
readonly name: typeof defines.events.on_post_entity_died
|
2017
|
-
/**
|
2924
|
+
/**
|
2925
|
+
* Tick the event was generated.
|
2926
|
+
*/
|
2018
2927
|
readonly tick: uint
|
2019
2928
|
}
|
2020
2929
|
|
@@ -2024,38 +2933,62 @@ interface OnPostEntityDiedEvent extends EventData {
|
|
2024
2933
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_build View documentation}
|
2025
2934
|
*/
|
2026
2935
|
interface OnPreBuildEvent extends EventData {
|
2027
|
-
/**
|
2936
|
+
/**
|
2937
|
+
* The player who did the placing.
|
2938
|
+
*/
|
2028
2939
|
readonly player_index: uint
|
2029
|
-
/**
|
2030
|
-
|
2031
|
-
|
2940
|
+
/**
|
2941
|
+
* Where the item was placed.
|
2942
|
+
*/
|
2943
|
+
readonly position: MapPositionTable
|
2944
|
+
/**
|
2945
|
+
* Item was placed using shift building.
|
2946
|
+
*/
|
2032
2947
|
readonly shift_build: boolean
|
2033
|
-
/**
|
2948
|
+
/**
|
2949
|
+
* The direction the item was facing when placed.
|
2950
|
+
*/
|
2034
2951
|
readonly direction: defines.direction
|
2035
|
-
/**
|
2952
|
+
/**
|
2953
|
+
* If building this blueprint was flipped horizontally.
|
2954
|
+
*/
|
2036
2955
|
readonly flip_horizontal: boolean
|
2037
|
-
/**
|
2956
|
+
/**
|
2957
|
+
* If building this blueprint was flipped vertically.
|
2958
|
+
*/
|
2038
2959
|
readonly flip_vertical: boolean
|
2039
|
-
/**
|
2960
|
+
/**
|
2961
|
+
* Item was placed while moving.
|
2962
|
+
*/
|
2040
2963
|
readonly created_by_moving: boolean
|
2041
|
-
/**
|
2964
|
+
/**
|
2965
|
+
* Identifier of the event
|
2966
|
+
*/
|
2042
2967
|
readonly name: typeof defines.events.on_pre_build
|
2043
|
-
/**
|
2968
|
+
/**
|
2969
|
+
* Tick the event was generated.
|
2970
|
+
*/
|
2044
2971
|
readonly tick: uint
|
2045
2972
|
}
|
2046
2973
|
|
2047
2974
|
/**
|
2048
|
-
* Called before one or more chunks are deleted using {@link LuaSurface
|
2975
|
+
* Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
2049
2976
|
*
|
2050
2977
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted View documentation}
|
2051
2978
|
*/
|
2052
2979
|
interface OnPreChunkDeletedEvent extends EventData {
|
2053
2980
|
readonly surface_index: uint
|
2054
|
-
/**
|
2981
|
+
/**
|
2982
|
+
* The chunks to be deleted.
|
2983
|
+
*/
|
2055
2984
|
readonly positions: ChunkPositionTable[]
|
2056
|
-
/**
|
2985
|
+
/**
|
2986
|
+
* Identifier of the event
|
2987
|
+
*/
|
2057
2988
|
readonly name: typeof defines.events.on_pre_chunk_deleted
|
2058
|
-
/**
|
2989
|
+
/**
|
2990
|
+
* Tick the event was generated.
|
2991
|
+
*/
|
2059
2992
|
readonly tick: uint
|
2060
2993
|
}
|
2061
2994
|
|
@@ -2066,29 +2999,42 @@ interface OnPreChunkDeletedEvent extends EventData {
|
|
2066
2999
|
*/
|
2067
3000
|
interface OnPreEntitySettingsPastedEvent extends EventData {
|
2068
3001
|
readonly player_index: uint
|
2069
|
-
/**
|
3002
|
+
/**
|
3003
|
+
* The source entity settings will be copied from.
|
3004
|
+
*/
|
2070
3005
|
readonly source: LuaEntity
|
2071
|
-
/**
|
3006
|
+
/**
|
3007
|
+
* The destination entity settings will be copied to.
|
3008
|
+
*/
|
2072
3009
|
readonly destination: LuaEntity
|
2073
|
-
/**
|
3010
|
+
/**
|
3011
|
+
* Identifier of the event
|
3012
|
+
*/
|
2074
3013
|
readonly name: typeof defines.events.on_pre_entity_settings_pasted
|
2075
|
-
/**
|
3014
|
+
/**
|
3015
|
+
* Tick the event was generated.
|
3016
|
+
*/
|
2076
3017
|
readonly tick: uint
|
2077
3018
|
}
|
2078
3019
|
|
2079
3020
|
/**
|
2080
|
-
* Called before a ghost entity is destroyed as a result of being marked for deconstruction. Can be filtered using
|
2081
|
-
* {@link LuaPreGhostDeconstructedEventFilter}.
|
3021
|
+
* Called before a ghost entity is destroyed as a result of being marked for deconstruction. Can be filtered using {@link LuaPreGhostDeconstructedEventFilter}.
|
2082
3022
|
*
|
2083
3023
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed View documentation}
|
2084
3024
|
*/
|
2085
3025
|
interface OnPreGhostDeconstructedEvent extends EventData {
|
2086
|
-
/**
|
3026
|
+
/**
|
3027
|
+
* The player that did the deconstruction if any.
|
3028
|
+
*/
|
2087
3029
|
readonly player_index?: uint
|
2088
3030
|
readonly ghost: LuaEntity
|
2089
|
-
/**
|
3031
|
+
/**
|
3032
|
+
* Identifier of the event
|
3033
|
+
*/
|
2090
3034
|
readonly name: typeof defines.events.on_pre_ghost_deconstructed
|
2091
|
-
/**
|
3035
|
+
/**
|
3036
|
+
* Tick the event was generated.
|
3037
|
+
*/
|
2092
3038
|
readonly tick: uint
|
2093
3039
|
}
|
2094
3040
|
|
@@ -2098,13 +3044,21 @@ interface OnPreGhostDeconstructedEvent extends EventData {
|
|
2098
3044
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted View documentation}
|
2099
3045
|
*/
|
2100
3046
|
interface OnPrePermissionGroupDeletedEvent extends EventData {
|
2101
|
-
/**
|
3047
|
+
/**
|
3048
|
+
* The player doing the deletion.
|
3049
|
+
*/
|
2102
3050
|
readonly player_index: uint
|
2103
|
-
/**
|
3051
|
+
/**
|
3052
|
+
* The group to be deleted.
|
3053
|
+
*/
|
2104
3054
|
readonly group: LuaPermissionGroup
|
2105
|
-
/**
|
3055
|
+
/**
|
3056
|
+
* Identifier of the event
|
3057
|
+
*/
|
2106
3058
|
readonly name: typeof defines.events.on_pre_permission_group_deleted
|
2107
|
-
/**
|
3059
|
+
/**
|
3060
|
+
* Tick the event was generated.
|
3061
|
+
*/
|
2108
3062
|
readonly tick: uint
|
2109
3063
|
}
|
2110
3064
|
|
@@ -2114,11 +3068,17 @@ interface OnPrePermissionGroupDeletedEvent extends EventData {
|
|
2114
3068
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported View documentation}
|
2115
3069
|
*/
|
2116
3070
|
interface OnPrePermissionStringImportedEvent extends EventData {
|
2117
|
-
/**
|
3071
|
+
/**
|
3072
|
+
* The player importing the string.
|
3073
|
+
*/
|
2118
3074
|
readonly player_index: uint
|
2119
|
-
/**
|
3075
|
+
/**
|
3076
|
+
* Identifier of the event
|
3077
|
+
*/
|
2120
3078
|
readonly name: typeof defines.events.on_pre_permission_string_imported
|
2121
|
-
/**
|
3079
|
+
/**
|
3080
|
+
* Tick the event was generated.
|
3081
|
+
*/
|
2122
3082
|
readonly tick: uint
|
2123
3083
|
}
|
2124
3084
|
|
@@ -2128,17 +3088,29 @@ interface OnPrePermissionStringImportedEvent extends EventData {
|
|
2128
3088
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item View documentation}
|
2129
3089
|
*/
|
2130
3090
|
interface OnPrePlayerCraftedItemEvent extends EventData {
|
2131
|
-
/**
|
3091
|
+
/**
|
3092
|
+
* The player doing the crafting.
|
3093
|
+
*/
|
2132
3094
|
readonly player_index: uint
|
2133
|
-
/**
|
3095
|
+
/**
|
3096
|
+
* The recipe being queued.
|
3097
|
+
*/
|
2134
3098
|
readonly recipe: LuaRecipe
|
2135
|
-
/**
|
3099
|
+
/**
|
3100
|
+
* The items removed from the players inventory to do the crafting.
|
3101
|
+
*/
|
2136
3102
|
readonly items: LuaInventory
|
2137
|
-
/**
|
3103
|
+
/**
|
3104
|
+
* The number of times the recipe is being queued.
|
3105
|
+
*/
|
2138
3106
|
readonly queued_count: uint
|
2139
|
-
/**
|
3107
|
+
/**
|
3108
|
+
* Identifier of the event
|
3109
|
+
*/
|
2140
3110
|
readonly name: typeof defines.events.on_pre_player_crafted_item
|
2141
|
-
/**
|
3111
|
+
/**
|
3112
|
+
* Tick the event was generated.
|
3113
|
+
*/
|
2142
3114
|
readonly tick: uint
|
2143
3115
|
}
|
2144
3116
|
|
@@ -2150,9 +3122,13 @@ interface OnPrePlayerCraftedItemEvent extends EventData {
|
|
2150
3122
|
interface OnPrePlayerDiedEvent extends EventData {
|
2151
3123
|
readonly player_index: uint
|
2152
3124
|
readonly cause?: LuaEntity
|
2153
|
-
/**
|
3125
|
+
/**
|
3126
|
+
* Identifier of the event
|
3127
|
+
*/
|
2154
3128
|
readonly name: typeof defines.events.on_pre_player_died
|
2155
|
-
/**
|
3129
|
+
/**
|
3130
|
+
* Tick the event was generated.
|
3131
|
+
*/
|
2156
3132
|
readonly tick: uint
|
2157
3133
|
}
|
2158
3134
|
|
@@ -2164,40 +3140,54 @@ interface OnPrePlayerDiedEvent extends EventData {
|
|
2164
3140
|
interface OnPrePlayerLeftGameEvent extends EventData {
|
2165
3141
|
readonly player_index: uint
|
2166
3142
|
readonly reason: defines.disconnect_reason
|
2167
|
-
/**
|
3143
|
+
/**
|
3144
|
+
* Identifier of the event
|
3145
|
+
*/
|
2168
3146
|
readonly name: typeof defines.events.on_pre_player_left_game
|
2169
|
-
/**
|
3147
|
+
/**
|
3148
|
+
* Tick the event was generated.
|
3149
|
+
*/
|
2170
3150
|
readonly tick: uint
|
2171
3151
|
}
|
2172
3152
|
|
2173
3153
|
/**
|
2174
|
-
* Called when the player finishes mining an entity, before the entity is removed from map. Can be filtered using
|
2175
|
-
* {@link LuaPrePlayerMinedEntityEventFilter}.
|
3154
|
+
* Called when the player finishes mining an entity, before the entity is removed from map. Can be filtered using {@link LuaPrePlayerMinedEntityEventFilter}.
|
2176
3155
|
*
|
2177
3156
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item View documentation}
|
2178
3157
|
*/
|
2179
3158
|
interface OnPrePlayerMinedItemEvent extends EventData {
|
2180
|
-
/**
|
3159
|
+
/**
|
3160
|
+
* The entity being mined
|
3161
|
+
*/
|
2181
3162
|
readonly entity: LuaEntity
|
2182
3163
|
readonly player_index: uint
|
2183
|
-
/**
|
3164
|
+
/**
|
3165
|
+
* Identifier of the event
|
3166
|
+
*/
|
2184
3167
|
readonly name: typeof defines.events.on_pre_player_mined_item
|
2185
|
-
/**
|
3168
|
+
/**
|
3169
|
+
* Tick the event was generated.
|
3170
|
+
*/
|
2186
3171
|
readonly tick: uint
|
2187
3172
|
}
|
2188
3173
|
|
2189
3174
|
/**
|
2190
|
-
* Called before a player is removed (deleted) from the game. Not to be confused with the player logging of this is
|
2191
|
-
* different in that the player is deleted as if he never existed in the save file.
|
3175
|
+
* Called before a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file.
|
2192
3176
|
*
|
2193
3177
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_removed View documentation}
|
2194
3178
|
*/
|
2195
3179
|
interface OnPrePlayerRemovedEvent extends EventData {
|
2196
|
-
/**
|
3180
|
+
/**
|
3181
|
+
* The player index that will be removed
|
3182
|
+
*/
|
2197
3183
|
readonly player_index: uint
|
2198
|
-
/**
|
3184
|
+
/**
|
3185
|
+
* Identifier of the event
|
3186
|
+
*/
|
2199
3187
|
readonly name: typeof defines.events.on_pre_player_removed
|
2200
|
-
/**
|
3188
|
+
/**
|
3189
|
+
* Tick the event was generated.
|
3190
|
+
*/
|
2201
3191
|
readonly tick: uint
|
2202
3192
|
}
|
2203
3193
|
|
@@ -2208,9 +3198,13 @@ interface OnPrePlayerRemovedEvent extends EventData {
|
|
2208
3198
|
*/
|
2209
3199
|
interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
2210
3200
|
readonly player_index: uint
|
2211
|
-
/**
|
3201
|
+
/**
|
3202
|
+
* Identifier of the event
|
3203
|
+
*/
|
2212
3204
|
readonly name: typeof defines.events.on_pre_player_toggled_map_editor
|
2213
|
-
/**
|
3205
|
+
/**
|
3206
|
+
* Tick the event was generated.
|
3207
|
+
*/
|
2214
3208
|
readonly tick: uint
|
2215
3209
|
}
|
2216
3210
|
|
@@ -2222,11 +3216,17 @@ interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
|
2222
3216
|
interface OnPreRobotExplodedCliffEvent extends EventData {
|
2223
3217
|
readonly robot: LuaEntity
|
2224
3218
|
readonly cliff: LuaEntity
|
2225
|
-
/**
|
3219
|
+
/**
|
3220
|
+
* The cliff explosive used.
|
3221
|
+
*/
|
2226
3222
|
readonly item: LuaItemPrototype
|
2227
|
-
/**
|
3223
|
+
/**
|
3224
|
+
* Identifier of the event
|
3225
|
+
*/
|
2228
3226
|
readonly name: typeof defines.events.on_pre_robot_exploded_cliff
|
2229
|
-
/**
|
3227
|
+
/**
|
3228
|
+
* Tick the event was generated.
|
3229
|
+
*/
|
2230
3230
|
readonly tick: uint
|
2231
3231
|
}
|
2232
3232
|
|
@@ -2236,18 +3236,30 @@ interface OnPreRobotExplodedCliffEvent extends EventData {
|
|
2236
3236
|
* {@link https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized View documentation}
|
2237
3237
|
*/
|
2238
3238
|
interface OnPreScriptInventoryResizedEvent extends EventData {
|
2239
|
-
/**
|
3239
|
+
/**
|
3240
|
+
* If done by console command; the player who ran the command.
|
3241
|
+
*/
|
2240
3242
|
readonly player_index?: uint
|
2241
|
-
/**
|
3243
|
+
/**
|
3244
|
+
* The mod that did the resizing. This will be `"core"` if done by console command or scenario script.
|
3245
|
+
*/
|
2242
3246
|
readonly mod: string
|
2243
3247
|
readonly inventory: LuaInventory
|
2244
|
-
/**
|
3248
|
+
/**
|
3249
|
+
* The old inventory size.
|
3250
|
+
*/
|
2245
3251
|
readonly old_size: uint
|
2246
|
-
/**
|
3252
|
+
/**
|
3253
|
+
* The new inventory size.
|
3254
|
+
*/
|
2247
3255
|
readonly new_size: uint
|
2248
|
-
/**
|
3256
|
+
/**
|
3257
|
+
* Identifier of the event
|
3258
|
+
*/
|
2249
3259
|
readonly name: typeof defines.events.on_pre_script_inventory_resized
|
2250
|
-
/**
|
3260
|
+
/**
|
3261
|
+
* Tick the event was generated.
|
3262
|
+
*/
|
2251
3263
|
readonly tick: uint
|
2252
3264
|
}
|
2253
3265
|
|
@@ -2258,9 +3270,13 @@ interface OnPreScriptInventoryResizedEvent extends EventData {
|
|
2258
3270
|
*/
|
2259
3271
|
interface OnPreSurfaceClearedEvent extends EventData {
|
2260
3272
|
readonly surface_index: uint
|
2261
|
-
/**
|
3273
|
+
/**
|
3274
|
+
* Identifier of the event
|
3275
|
+
*/
|
2262
3276
|
readonly name: typeof defines.events.on_pre_surface_cleared
|
2263
|
-
/**
|
3277
|
+
/**
|
3278
|
+
* Tick the event was generated.
|
3279
|
+
*/
|
2264
3280
|
readonly tick: uint
|
2265
3281
|
}
|
2266
3282
|
|
@@ -2271,9 +3287,13 @@ interface OnPreSurfaceClearedEvent extends EventData {
|
|
2271
3287
|
*/
|
2272
3288
|
interface OnPreSurfaceDeletedEvent extends EventData {
|
2273
3289
|
readonly surface_index: uint
|
2274
|
-
/**
|
3290
|
+
/**
|
3291
|
+
* Identifier of the event
|
3292
|
+
*/
|
2275
3293
|
readonly name: typeof defines.events.on_pre_surface_deleted
|
2276
|
-
/**
|
3294
|
+
/**
|
3295
|
+
* Tick the event was generated.
|
3296
|
+
*/
|
2277
3297
|
readonly tick: uint
|
2278
3298
|
}
|
2279
3299
|
|
@@ -2283,13 +3303,21 @@ interface OnPreSurfaceDeletedEvent extends EventData {
|
|
2283
3303
|
* {@link https://lua-api.factorio.com/latest/events.html#on_research_finished View documentation}
|
2284
3304
|
*/
|
2285
3305
|
interface OnResearchFinishedEvent extends EventData {
|
2286
|
-
/**
|
3306
|
+
/**
|
3307
|
+
* The researched technology
|
3308
|
+
*/
|
2287
3309
|
readonly research: LuaTechnology
|
2288
|
-
/**
|
3310
|
+
/**
|
3311
|
+
* If the technology was researched by script.
|
3312
|
+
*/
|
2289
3313
|
readonly by_script: boolean
|
2290
|
-
/**
|
3314
|
+
/**
|
3315
|
+
* Identifier of the event
|
3316
|
+
*/
|
2291
3317
|
readonly name: typeof defines.events.on_research_finished
|
2292
|
-
/**
|
3318
|
+
/**
|
3319
|
+
* Tick the event was generated.
|
3320
|
+
*/
|
2293
3321
|
readonly tick: uint
|
2294
3322
|
}
|
2295
3323
|
|
@@ -2299,13 +3327,21 @@ interface OnResearchFinishedEvent extends EventData {
|
|
2299
3327
|
* {@link https://lua-api.factorio.com/latest/events.html#on_research_reversed View documentation}
|
2300
3328
|
*/
|
2301
3329
|
interface OnResearchReversedEvent extends EventData {
|
2302
|
-
/**
|
3330
|
+
/**
|
3331
|
+
* The technology un-researched
|
3332
|
+
*/
|
2303
3333
|
readonly research: LuaTechnology
|
2304
|
-
/**
|
3334
|
+
/**
|
3335
|
+
* If the technology was un-researched by script.
|
3336
|
+
*/
|
2305
3337
|
readonly by_script: boolean
|
2306
|
-
/**
|
3338
|
+
/**
|
3339
|
+
* Identifier of the event
|
3340
|
+
*/
|
2307
3341
|
readonly name: typeof defines.events.on_research_reversed
|
2308
|
-
/**
|
3342
|
+
/**
|
3343
|
+
* Tick the event was generated.
|
3344
|
+
*/
|
2309
3345
|
readonly tick: uint
|
2310
3346
|
}
|
2311
3347
|
|
@@ -2315,12 +3351,18 @@ interface OnResearchReversedEvent extends EventData {
|
|
2315
3351
|
* {@link https://lua-api.factorio.com/latest/events.html#on_research_started View documentation}
|
2316
3352
|
*/
|
2317
3353
|
interface OnResearchStartedEvent extends EventData {
|
2318
|
-
/**
|
3354
|
+
/**
|
3355
|
+
* The technology being researched
|
3356
|
+
*/
|
2319
3357
|
readonly research: LuaTechnology
|
2320
3358
|
readonly last_research?: LuaTechnology
|
2321
|
-
/**
|
3359
|
+
/**
|
3360
|
+
* Identifier of the event
|
3361
|
+
*/
|
2322
3362
|
readonly name: typeof defines.events.on_research_started
|
2323
|
-
/**
|
3363
|
+
/**
|
3364
|
+
* Tick the event was generated.
|
3365
|
+
*/
|
2324
3366
|
readonly tick: uint
|
2325
3367
|
}
|
2326
3368
|
|
@@ -2331,9 +3373,13 @@ interface OnResearchStartedEvent extends EventData {
|
|
2331
3373
|
*/
|
2332
3374
|
interface OnResourceDepletedEvent extends EventData {
|
2333
3375
|
readonly entity: LuaEntity
|
2334
|
-
/**
|
3376
|
+
/**
|
3377
|
+
* Identifier of the event
|
3378
|
+
*/
|
2335
3379
|
readonly name: typeof defines.events.on_resource_depleted
|
2336
|
-
/**
|
3380
|
+
/**
|
3381
|
+
* Tick the event was generated.
|
3382
|
+
*/
|
2337
3383
|
readonly tick: uint
|
2338
3384
|
}
|
2339
3385
|
|
@@ -2343,17 +3389,29 @@ interface OnResourceDepletedEvent extends EventData {
|
|
2343
3389
|
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_built_entity View documentation}
|
2344
3390
|
*/
|
2345
3391
|
interface OnRobotBuiltEntityEvent extends EventData {
|
2346
|
-
/**
|
3392
|
+
/**
|
3393
|
+
* The robot that did the building.
|
3394
|
+
*/
|
2347
3395
|
readonly robot: LuaEntity
|
2348
|
-
/**
|
3396
|
+
/**
|
3397
|
+
* The entity built.
|
3398
|
+
*/
|
2349
3399
|
readonly created_entity: LuaEntity
|
2350
|
-
/**
|
3400
|
+
/**
|
3401
|
+
* The item used to do the building.
|
3402
|
+
*/
|
2351
3403
|
readonly stack: LuaItemStack
|
2352
|
-
/**
|
3404
|
+
/**
|
3405
|
+
* The tags associated with this entity if any.
|
3406
|
+
*/
|
2353
3407
|
readonly tags?: Tags
|
2354
|
-
/**
|
3408
|
+
/**
|
3409
|
+
* Identifier of the event
|
3410
|
+
*/
|
2355
3411
|
readonly name: typeof defines.events.on_robot_built_entity
|
2356
|
-
/**
|
3412
|
+
/**
|
3413
|
+
* Tick the event was generated.
|
3414
|
+
*/
|
2357
3415
|
readonly tick: uint
|
2358
3416
|
}
|
2359
3417
|
|
@@ -2363,21 +3421,37 @@ interface OnRobotBuiltEntityEvent extends EventData {
|
|
2363
3421
|
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_built_tile View documentation}
|
2364
3422
|
*/
|
2365
3423
|
interface OnRobotBuiltTileEvent extends EventData {
|
2366
|
-
/**
|
3424
|
+
/**
|
3425
|
+
* The robot.
|
3426
|
+
*/
|
2367
3427
|
readonly robot: LuaEntity
|
2368
|
-
/**
|
3428
|
+
/**
|
3429
|
+
* The position data.
|
3430
|
+
*/
|
2369
3431
|
readonly tiles: OldTileAndPosition[]
|
2370
|
-
/**
|
3432
|
+
/**
|
3433
|
+
* The tile prototype that was placed.
|
3434
|
+
*/
|
2371
3435
|
readonly tile: LuaTilePrototype
|
2372
|
-
/**
|
3436
|
+
/**
|
3437
|
+
* The item type used to build the tiles.
|
3438
|
+
*/
|
2373
3439
|
readonly item: LuaItemPrototype
|
2374
|
-
/**
|
3440
|
+
/**
|
3441
|
+
* The stack used to build the tiles (may be empty if all of the items where used to build the tiles).
|
3442
|
+
*/
|
2375
3443
|
readonly stack: LuaItemStack
|
2376
|
-
/**
|
3444
|
+
/**
|
3445
|
+
* The surface the tile(s) are build on.
|
3446
|
+
*/
|
2377
3447
|
readonly surface_index: uint
|
2378
|
-
/**
|
3448
|
+
/**
|
3449
|
+
* Identifier of the event
|
3450
|
+
*/
|
2379
3451
|
readonly name: typeof defines.events.on_robot_built_tile
|
2380
|
-
/**
|
3452
|
+
/**
|
3453
|
+
* Tick the event was generated.
|
3454
|
+
*/
|
2381
3455
|
readonly tick: uint
|
2382
3456
|
}
|
2383
3457
|
|
@@ -2388,11 +3462,17 @@ interface OnRobotBuiltTileEvent extends EventData {
|
|
2388
3462
|
*/
|
2389
3463
|
interface OnRobotExplodedCliffEvent extends EventData {
|
2390
3464
|
readonly robot: LuaEntity
|
2391
|
-
/**
|
3465
|
+
/**
|
3466
|
+
* The cliff explosive used.
|
3467
|
+
*/
|
2392
3468
|
readonly item: LuaItemPrototype
|
2393
|
-
/**
|
3469
|
+
/**
|
3470
|
+
* Identifier of the event
|
3471
|
+
*/
|
2394
3472
|
readonly name: typeof defines.events.on_robot_exploded_cliff
|
2395
|
-
/**
|
3473
|
+
/**
|
3474
|
+
* Tick the event was generated.
|
3475
|
+
*/
|
2396
3476
|
readonly tick: uint
|
2397
3477
|
}
|
2398
3478
|
|
@@ -2402,36 +3482,50 @@ interface OnRobotExplodedCliffEvent extends EventData {
|
|
2402
3482
|
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined View documentation}
|
2403
3483
|
*/
|
2404
3484
|
interface OnRobotMinedEvent extends EventData {
|
2405
|
-
/**
|
3485
|
+
/**
|
3486
|
+
* The robot that did the mining.
|
3487
|
+
*/
|
2406
3488
|
readonly robot: LuaEntity
|
2407
|
-
/**
|
3489
|
+
/**
|
3490
|
+
* The entity the robot just picked up.
|
3491
|
+
*/
|
2408
3492
|
readonly item_stack: SimpleItemStack
|
2409
|
-
/**
|
3493
|
+
/**
|
3494
|
+
* Identifier of the event
|
3495
|
+
*/
|
2410
3496
|
readonly name: typeof defines.events.on_robot_mined
|
2411
|
-
/**
|
3497
|
+
/**
|
3498
|
+
* Tick the event was generated.
|
3499
|
+
*/
|
2412
3500
|
readonly tick: uint
|
2413
3501
|
}
|
2414
3502
|
|
2415
3503
|
/**
|
2416
|
-
* Called after the results of an entity being mined are collected just before the entity is destroyed. After this event
|
2417
|
-
* any items in the buffer will be transferred into the robot as if they came from mining the entity. Can be filtered
|
2418
|
-
* using {@link LuaRobotMinedEntityEventFilter}.
|
2419
|
-
*
|
2420
|
-
* **Note**: The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding
|
2421
|
-
* as more items are transferred into it.
|
3504
|
+
* Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the robot as if they came from mining the entity. Can be filtered using {@link LuaRobotMinedEntityEventFilter}.
|
2422
3505
|
*
|
2423
3506
|
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity View documentation}
|
3507
|
+
* @remarks The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
2424
3508
|
*/
|
2425
3509
|
interface OnRobotMinedEntityEvent extends EventData {
|
2426
|
-
/**
|
3510
|
+
/**
|
3511
|
+
* The robot doing the mining.
|
3512
|
+
*/
|
2427
3513
|
readonly robot: LuaEntity
|
2428
|
-
/**
|
3514
|
+
/**
|
3515
|
+
* The entity that has been mined.
|
3516
|
+
*/
|
2429
3517
|
readonly entity: LuaEntity
|
2430
|
-
/**
|
3518
|
+
/**
|
3519
|
+
* The temporary inventory that holds the result of mining the entity.
|
3520
|
+
*/
|
2431
3521
|
readonly buffer: LuaInventory
|
2432
|
-
/**
|
3522
|
+
/**
|
3523
|
+
* Identifier of the event
|
3524
|
+
*/
|
2433
3525
|
readonly name: typeof defines.events.on_robot_mined_entity
|
2434
|
-
/**
|
3526
|
+
/**
|
3527
|
+
* Tick the event was generated.
|
3528
|
+
*/
|
2435
3529
|
readonly tick: uint
|
2436
3530
|
}
|
2437
3531
|
|
@@ -2441,15 +3535,25 @@ interface OnRobotMinedEntityEvent extends EventData {
|
|
2441
3535
|
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile View documentation}
|
2442
3536
|
*/
|
2443
3537
|
interface OnRobotMinedTileEvent extends EventData {
|
2444
|
-
/**
|
3538
|
+
/**
|
3539
|
+
* The robot.
|
3540
|
+
*/
|
2445
3541
|
readonly robot: LuaEntity
|
2446
|
-
/**
|
3542
|
+
/**
|
3543
|
+
* The position data.
|
3544
|
+
*/
|
2447
3545
|
readonly tiles: OldTileAndPosition[]
|
2448
|
-
/**
|
3546
|
+
/**
|
3547
|
+
* The surface the tile(s) were mined on.
|
3548
|
+
*/
|
2449
3549
|
readonly surface_index: uint
|
2450
|
-
/**
|
3550
|
+
/**
|
3551
|
+
* Identifier of the event
|
3552
|
+
*/
|
2451
3553
|
readonly name: typeof defines.events.on_robot_mined_tile
|
2452
|
-
/**
|
3554
|
+
/**
|
3555
|
+
* Tick the event was generated.
|
3556
|
+
*/
|
2453
3557
|
readonly tick: uint
|
2454
3558
|
}
|
2455
3559
|
|
@@ -2459,13 +3563,21 @@ interface OnRobotMinedTileEvent extends EventData {
|
|
2459
3563
|
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined View documentation}
|
2460
3564
|
*/
|
2461
3565
|
interface OnRobotPreMinedEvent extends EventData {
|
2462
|
-
/**
|
3566
|
+
/**
|
3567
|
+
* The robot that's about to do the mining.
|
3568
|
+
*/
|
2463
3569
|
readonly robot: LuaEntity
|
2464
|
-
/**
|
3570
|
+
/**
|
3571
|
+
* The entity which is about to be mined.
|
3572
|
+
*/
|
2465
3573
|
readonly entity: LuaEntity
|
2466
|
-
/**
|
3574
|
+
/**
|
3575
|
+
* Identifier of the event
|
3576
|
+
*/
|
2467
3577
|
readonly name: typeof defines.events.on_robot_pre_mined
|
2468
|
-
/**
|
3578
|
+
/**
|
3579
|
+
* Tick the event was generated.
|
3580
|
+
*/
|
2469
3581
|
readonly tick: uint
|
2470
3582
|
}
|
2471
3583
|
|
@@ -2477,11 +3589,17 @@ interface OnRobotPreMinedEvent extends EventData {
|
|
2477
3589
|
interface OnRocketLaunchOrderedEvent extends EventData {
|
2478
3590
|
readonly rocket: LuaEntity
|
2479
3591
|
readonly rocket_silo: LuaEntity
|
2480
|
-
/**
|
3592
|
+
/**
|
3593
|
+
* The player that is riding the rocket, if any.
|
3594
|
+
*/
|
2481
3595
|
readonly player_index?: uint
|
2482
|
-
/**
|
3596
|
+
/**
|
3597
|
+
* Identifier of the event
|
3598
|
+
*/
|
2483
3599
|
readonly name: typeof defines.events.on_rocket_launch_ordered
|
2484
|
-
/**
|
3600
|
+
/**
|
3601
|
+
* Tick the event was generated.
|
3602
|
+
*/
|
2485
3603
|
readonly tick: uint
|
2486
3604
|
}
|
2487
3605
|
|
@@ -2493,11 +3611,17 @@ interface OnRocketLaunchOrderedEvent extends EventData {
|
|
2493
3611
|
interface OnRocketLaunchedEvent extends EventData {
|
2494
3612
|
readonly rocket: LuaEntity
|
2495
3613
|
readonly rocket_silo?: LuaEntity
|
2496
|
-
/**
|
3614
|
+
/**
|
3615
|
+
* The player that is riding the rocket, if any.
|
3616
|
+
*/
|
2497
3617
|
readonly player_index?: uint
|
2498
|
-
/**
|
3618
|
+
/**
|
3619
|
+
* Identifier of the event
|
3620
|
+
*/
|
2499
3621
|
readonly name: typeof defines.events.on_rocket_launched
|
2500
|
-
/**
|
3622
|
+
/**
|
3623
|
+
* Tick the event was generated.
|
3624
|
+
*/
|
2501
3625
|
readonly tick: uint
|
2502
3626
|
}
|
2503
3627
|
|
@@ -2508,18 +3632,24 @@ interface OnRocketLaunchedEvent extends EventData {
|
|
2508
3632
|
*/
|
2509
3633
|
interface OnRuntimeModSettingChangedEvent extends EventData {
|
2510
3634
|
/**
|
2511
|
-
* If the `setting_type` is `"global"` and it was changed through the mod settings GUI, this is the index of the
|
2512
|
-
* player that changed the global setting. If the `setting_type` is `"runtime-per-user"` and it changed a current
|
2513
|
-
* setting of the player, this is the index of the player whose setting was changed. In all other cases, this is `nil`.
|
3635
|
+
* If the `setting_type` is `"global"` and it was changed through the mod settings GUI, this is the index of the player that changed the global setting. If the `setting_type` is `"runtime-per-user"` and it changed a current setting of the player, this is the index of the player whose setting was changed. In all other cases, this is `nil`.
|
2514
3636
|
*/
|
2515
3637
|
readonly player_index?: uint
|
2516
|
-
/**
|
3638
|
+
/**
|
3639
|
+
* The prototype name of the setting that was changed.
|
3640
|
+
*/
|
2517
3641
|
readonly setting: string
|
2518
|
-
/**
|
3642
|
+
/**
|
3643
|
+
* Either "runtime-per-user" or "runtime-global".
|
3644
|
+
*/
|
2519
3645
|
readonly setting_type: "runtime-per-user" | "runtime-global"
|
2520
|
-
/**
|
3646
|
+
/**
|
3647
|
+
* Identifier of the event
|
3648
|
+
*/
|
2521
3649
|
readonly name: typeof defines.events.on_runtime_mod_setting_changed
|
2522
|
-
/**
|
3650
|
+
/**
|
3651
|
+
* Tick the event was generated.
|
3652
|
+
*/
|
2523
3653
|
readonly tick: uint
|
2524
3654
|
}
|
2525
3655
|
|
@@ -2529,38 +3659,62 @@ interface OnRuntimeModSettingChangedEvent extends EventData {
|
|
2529
3659
|
* {@link https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized View documentation}
|
2530
3660
|
*/
|
2531
3661
|
interface OnScriptInventoryResizedEvent extends EventData {
|
2532
|
-
/**
|
3662
|
+
/**
|
3663
|
+
* If done by console command; the player who ran the command.
|
3664
|
+
*/
|
2533
3665
|
readonly player_index?: uint
|
2534
|
-
/**
|
3666
|
+
/**
|
3667
|
+
* The mod that did the resizing. This will be `"core"` if done by console command or scenario script.
|
3668
|
+
*/
|
2535
3669
|
readonly mod: string
|
2536
3670
|
readonly inventory: LuaInventory
|
2537
|
-
/**
|
3671
|
+
/**
|
3672
|
+
* The old inventory size.
|
3673
|
+
*/
|
2538
3674
|
readonly old_size: uint
|
2539
|
-
/**
|
3675
|
+
/**
|
3676
|
+
* The new inventory size.
|
3677
|
+
*/
|
2540
3678
|
readonly new_size: uint
|
2541
|
-
/**
|
3679
|
+
/**
|
3680
|
+
* Any items which didn't fit into the new inventory size.
|
3681
|
+
*/
|
2542
3682
|
readonly overflow_inventory: LuaInventory
|
2543
|
-
/**
|
3683
|
+
/**
|
3684
|
+
* Identifier of the event
|
3685
|
+
*/
|
2544
3686
|
readonly name: typeof defines.events.on_script_inventory_resized
|
2545
|
-
/**
|
3687
|
+
/**
|
3688
|
+
* Tick the event was generated.
|
3689
|
+
*/
|
2546
3690
|
readonly tick: uint
|
2547
3691
|
}
|
2548
3692
|
|
2549
3693
|
/**
|
2550
|
-
* Called when a {@link LuaSurface
|
3694
|
+
* Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
|
2551
3695
|
*
|
2552
3696
|
* {@link https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished View documentation}
|
2553
3697
|
*/
|
2554
3698
|
interface OnScriptPathRequestFinishedEvent extends EventData {
|
2555
|
-
/**
|
3699
|
+
/**
|
3700
|
+
* The actual path that the pathfinder has determined. `nil` if pathfinding failed.
|
3701
|
+
*/
|
2556
3702
|
readonly path?: PathfinderWaypoint[]
|
2557
|
-
/**
|
3703
|
+
/**
|
3704
|
+
* Handle to associate the callback with a particular call to {@link LuaSurface#request_path LuaSurface::request_path}.
|
3705
|
+
*/
|
2558
3706
|
readonly id: uint
|
2559
|
-
/**
|
3707
|
+
/**
|
3708
|
+
* Indicates that the pathfinder failed because it is too busy, and that you can retry later.
|
3709
|
+
*/
|
2560
3710
|
readonly try_again_later: boolean
|
2561
|
-
/**
|
3711
|
+
/**
|
3712
|
+
* Identifier of the event
|
3713
|
+
*/
|
2562
3714
|
readonly name: typeof defines.events.on_script_path_request_finished
|
2563
|
-
/**
|
3715
|
+
/**
|
3716
|
+
* Tick the event was generated.
|
3717
|
+
*/
|
2564
3718
|
readonly tick: uint
|
2565
3719
|
}
|
2566
3720
|
|
@@ -2570,36 +3724,53 @@ interface OnScriptPathRequestFinishedEvent extends EventData {
|
|
2570
3724
|
* {@link https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect View documentation}
|
2571
3725
|
*/
|
2572
3726
|
interface OnScriptTriggerEffectEvent extends EventData {
|
2573
|
-
/**
|
3727
|
+
/**
|
3728
|
+
* The effect_id specified in the trigger effect.
|
3729
|
+
*/
|
2574
3730
|
readonly effect_id: string
|
2575
|
-
/**
|
3731
|
+
/**
|
3732
|
+
* The surface the effect happened on.
|
3733
|
+
*/
|
2576
3734
|
readonly surface_index: uint
|
2577
|
-
readonly source_position?:
|
3735
|
+
readonly source_position?: MapPositionTable
|
2578
3736
|
readonly source_entity?: LuaEntity
|
2579
|
-
readonly target_position?:
|
3737
|
+
readonly target_position?: MapPositionTable
|
2580
3738
|
readonly target_entity?: LuaEntity
|
2581
|
-
/**
|
3739
|
+
/**
|
3740
|
+
* Identifier of the event
|
3741
|
+
*/
|
2582
3742
|
readonly name: typeof defines.events.on_script_trigger_effect
|
2583
|
-
/**
|
3743
|
+
/**
|
3744
|
+
* Tick the event was generated.
|
3745
|
+
*/
|
2584
3746
|
readonly tick: uint
|
2585
3747
|
}
|
2586
3748
|
|
2587
3749
|
/**
|
2588
|
-
* Called when an entity of type `radar` finishes scanning a sector. Can be filtered for the radar using
|
2589
|
-
* {@link LuaSectorScannedEventFilter}.
|
3750
|
+
* Called when an entity of type `radar` finishes scanning a sector. Can be filtered for the radar using {@link LuaSectorScannedEventFilter}.
|
2590
3751
|
*
|
2591
3752
|
* {@link https://lua-api.factorio.com/latest/events.html#on_sector_scanned View documentation}
|
2592
3753
|
*/
|
2593
3754
|
interface OnSectorScannedEvent extends EventData {
|
2594
|
-
/**
|
3755
|
+
/**
|
3756
|
+
* The radar that did the scanning.
|
3757
|
+
*/
|
2595
3758
|
readonly radar: LuaEntity
|
2596
|
-
/**
|
3759
|
+
/**
|
3760
|
+
* The chunk scanned.
|
3761
|
+
*/
|
2597
3762
|
readonly chunk_position: ChunkPositionTable
|
2598
|
-
/**
|
3763
|
+
/**
|
3764
|
+
* Area of the scanned chunk.
|
3765
|
+
*/
|
2599
3766
|
readonly area: BoundingBoxRead
|
2600
|
-
/**
|
3767
|
+
/**
|
3768
|
+
* Identifier of the event
|
3769
|
+
*/
|
2601
3770
|
readonly name: typeof defines.events.on_sector_scanned
|
2602
|
-
/**
|
3771
|
+
/**
|
3772
|
+
* Tick the event was generated.
|
3773
|
+
*/
|
2603
3774
|
readonly tick: uint
|
2604
3775
|
}
|
2605
3776
|
|
@@ -2609,13 +3780,21 @@ interface OnSectorScannedEvent extends EventData {
|
|
2609
3780
|
* {@link https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed View documentation}
|
2610
3781
|
*/
|
2611
3782
|
interface OnSelectedEntityChangedEvent extends EventData {
|
2612
|
-
/**
|
3783
|
+
/**
|
3784
|
+
* The player whose selected entity changed.
|
3785
|
+
*/
|
2613
3786
|
readonly player_index: uint
|
2614
|
-
/**
|
3787
|
+
/**
|
3788
|
+
* The last selected entity if it still exists and there was one.
|
3789
|
+
*/
|
2615
3790
|
readonly last_entity?: LuaEntity
|
2616
|
-
/**
|
3791
|
+
/**
|
3792
|
+
* Identifier of the event
|
3793
|
+
*/
|
2617
3794
|
readonly name: typeof defines.events.on_selected_entity_changed
|
2618
|
-
/**
|
3795
|
+
/**
|
3796
|
+
* Tick the event was generated.
|
3797
|
+
*/
|
2619
3798
|
readonly tick: uint
|
2620
3799
|
}
|
2621
3800
|
|
@@ -2625,32 +3804,49 @@ interface OnSelectedEntityChangedEvent extends EventData {
|
|
2625
3804
|
* {@link https://lua-api.factorio.com/latest/events.html#on_spider_command_completed View documentation}
|
2626
3805
|
*/
|
2627
3806
|
interface OnSpiderCommandCompletedEvent extends EventData {
|
2628
|
-
/**
|
3807
|
+
/**
|
3808
|
+
* Spider vehicle which was requested to move.
|
3809
|
+
*/
|
2629
3810
|
readonly vehicle: LuaEntity
|
2630
|
-
/**
|
3811
|
+
/**
|
3812
|
+
* Identifier of the event
|
3813
|
+
*/
|
2631
3814
|
readonly name: typeof defines.events.on_spider_command_completed
|
2632
|
-
/**
|
3815
|
+
/**
|
3816
|
+
* Tick the event was generated.
|
3817
|
+
*/
|
2633
3818
|
readonly tick: uint
|
2634
3819
|
}
|
2635
3820
|
|
2636
3821
|
/**
|
2637
|
-
* Called when a translation request generated through
|
2638
|
-
* {@link LuaPlayer.request_translation LuaPlayer::request_translation} is translated.
|
3822
|
+
* Called when a translation request generated through {@link LuaPlayer#request_translation LuaPlayer::request_translation} is translated.
|
2639
3823
|
*
|
2640
3824
|
* {@link https://lua-api.factorio.com/latest/events.html#on_string_translated View documentation}
|
2641
3825
|
*/
|
2642
3826
|
interface OnStringTranslatedEvent extends EventData {
|
2643
|
-
/**
|
3827
|
+
/**
|
3828
|
+
* The player whose locale was used for the translation.
|
3829
|
+
*/
|
2644
3830
|
readonly player_index: uint
|
2645
|
-
/**
|
3831
|
+
/**
|
3832
|
+
* The localised string being translated.
|
3833
|
+
*/
|
2646
3834
|
readonly localised_string: LocalisedString
|
2647
|
-
/**
|
3835
|
+
/**
|
3836
|
+
* The translated `localised_string`.
|
3837
|
+
*/
|
2648
3838
|
readonly result: string
|
2649
|
-
/**
|
3839
|
+
/**
|
3840
|
+
* Whether the requested localised string was valid and could be translated.
|
3841
|
+
*/
|
2650
3842
|
readonly translated: boolean
|
2651
|
-
/**
|
3843
|
+
/**
|
3844
|
+
* Identifier of the event
|
3845
|
+
*/
|
2652
3846
|
readonly name: typeof defines.events.on_string_translated
|
2653
|
-
/**
|
3847
|
+
/**
|
3848
|
+
* Tick the event was generated.
|
3849
|
+
*/
|
2654
3850
|
readonly tick: uint
|
2655
3851
|
}
|
2656
3852
|
|
@@ -2661,24 +3857,31 @@ interface OnStringTranslatedEvent extends EventData {
|
|
2661
3857
|
*/
|
2662
3858
|
interface OnSurfaceClearedEvent extends EventData {
|
2663
3859
|
readonly surface_index: uint
|
2664
|
-
/**
|
3860
|
+
/**
|
3861
|
+
* Identifier of the event
|
3862
|
+
*/
|
2665
3863
|
readonly name: typeof defines.events.on_surface_cleared
|
2666
|
-
/**
|
3864
|
+
/**
|
3865
|
+
* Tick the event was generated.
|
3866
|
+
*/
|
2667
3867
|
readonly tick: uint
|
2668
3868
|
}
|
2669
3869
|
|
2670
3870
|
/**
|
2671
3871
|
* Called when a surface is created.
|
2672
3872
|
*
|
2673
|
-
* **Note**: This is not called when the default surface is created as it will always exist.
|
2674
|
-
*
|
2675
3873
|
* {@link https://lua-api.factorio.com/latest/events.html#on_surface_created View documentation}
|
3874
|
+
* @remarks This is not called when the default surface is created as it will always exist.
|
2676
3875
|
*/
|
2677
3876
|
interface OnSurfaceCreatedEvent extends EventData {
|
2678
3877
|
readonly surface_index: uint
|
2679
|
-
/**
|
3878
|
+
/**
|
3879
|
+
* Identifier of the event
|
3880
|
+
*/
|
2680
3881
|
readonly name: typeof defines.events.on_surface_created
|
2681
|
-
/**
|
3882
|
+
/**
|
3883
|
+
* Tick the event was generated.
|
3884
|
+
*/
|
2682
3885
|
readonly tick: uint
|
2683
3886
|
}
|
2684
3887
|
|
@@ -2689,9 +3892,13 @@ interface OnSurfaceCreatedEvent extends EventData {
|
|
2689
3892
|
*/
|
2690
3893
|
interface OnSurfaceDeletedEvent extends EventData {
|
2691
3894
|
readonly surface_index: uint
|
2692
|
-
/**
|
3895
|
+
/**
|
3896
|
+
* Identifier of the event
|
3897
|
+
*/
|
2693
3898
|
readonly name: typeof defines.events.on_surface_deleted
|
2694
|
-
/**
|
3899
|
+
/**
|
3900
|
+
* Tick the event was generated.
|
3901
|
+
*/
|
2695
3902
|
readonly tick: uint
|
2696
3903
|
}
|
2697
3904
|
|
@@ -2702,11 +3909,17 @@ interface OnSurfaceDeletedEvent extends EventData {
|
|
2702
3909
|
*/
|
2703
3910
|
interface OnSurfaceImportedEvent extends EventData {
|
2704
3911
|
readonly surface_index: uint
|
2705
|
-
/**
|
3912
|
+
/**
|
3913
|
+
* The original surface name.
|
3914
|
+
*/
|
2706
3915
|
readonly original_name: string
|
2707
|
-
/**
|
3916
|
+
/**
|
3917
|
+
* Identifier of the event
|
3918
|
+
*/
|
2708
3919
|
readonly name: typeof defines.events.on_surface_imported
|
2709
|
-
/**
|
3920
|
+
/**
|
3921
|
+
* Tick the event was generated.
|
3922
|
+
*/
|
2710
3923
|
readonly tick: uint
|
2711
3924
|
}
|
2712
3925
|
|
@@ -2719,22 +3932,30 @@ interface OnSurfaceRenamedEvent extends EventData {
|
|
2719
3932
|
readonly surface_index: uint
|
2720
3933
|
readonly old_name: string
|
2721
3934
|
readonly new_name: string
|
2722
|
-
/**
|
3935
|
+
/**
|
3936
|
+
* Identifier of the event
|
3937
|
+
*/
|
2723
3938
|
readonly name: typeof defines.events.on_surface_renamed
|
2724
|
-
/**
|
3939
|
+
/**
|
3940
|
+
* Tick the event was generated.
|
3941
|
+
*/
|
2725
3942
|
readonly tick: uint
|
2726
3943
|
}
|
2727
3944
|
|
2728
3945
|
/**
|
2729
|
-
* Called when {@link LuaForce
|
3946
|
+
* Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
|
2730
3947
|
*
|
2731
3948
|
* {@link https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset View documentation}
|
2732
3949
|
*/
|
2733
3950
|
interface OnTechnologyEffectsResetEvent extends EventData {
|
2734
3951
|
readonly force: LuaForce
|
2735
|
-
/**
|
3952
|
+
/**
|
3953
|
+
* Identifier of the event
|
3954
|
+
*/
|
2736
3955
|
readonly name: typeof defines.events.on_technology_effects_reset
|
2737
|
-
/**
|
3956
|
+
/**
|
3957
|
+
* Tick the event was generated.
|
3958
|
+
*/
|
2738
3959
|
readonly tick: uint
|
2739
3960
|
}
|
2740
3961
|
|
@@ -2744,9 +3965,13 @@ interface OnTechnologyEffectsResetEvent extends EventData {
|
|
2744
3965
|
* {@link https://lua-api.factorio.com/latest/events.html#on_tick View documentation}
|
2745
3966
|
*/
|
2746
3967
|
interface OnTickEvent extends EventData {
|
2747
|
-
/**
|
3968
|
+
/**
|
3969
|
+
* Identifier of the event
|
3970
|
+
*/
|
2748
3971
|
readonly name: typeof defines.events.on_tick
|
2749
|
-
/**
|
3972
|
+
/**
|
3973
|
+
* Tick the event was generated.
|
3974
|
+
*/
|
2750
3975
|
readonly tick: uint
|
2751
3976
|
}
|
2752
3977
|
|
@@ -2758,9 +3983,13 @@ interface OnTickEvent extends EventData {
|
|
2758
3983
|
interface OnTrainChangedStateEvent extends EventData {
|
2759
3984
|
readonly train: LuaTrain
|
2760
3985
|
readonly old_state: defines.train_state
|
2761
|
-
/**
|
3986
|
+
/**
|
3987
|
+
* Identifier of the event
|
3988
|
+
*/
|
2762
3989
|
readonly name: typeof defines.events.on_train_changed_state
|
2763
|
-
/**
|
3990
|
+
/**
|
3991
|
+
* Tick the event was generated.
|
3992
|
+
*/
|
2764
3993
|
readonly tick: uint
|
2765
3994
|
}
|
2766
3995
|
|
@@ -2771,13 +4000,21 @@ interface OnTrainChangedStateEvent extends EventData {
|
|
2771
4000
|
*/
|
2772
4001
|
interface OnTrainCreatedEvent extends EventData {
|
2773
4002
|
readonly train: LuaTrain
|
2774
|
-
/**
|
4003
|
+
/**
|
4004
|
+
* The first old train id when splitting/merging trains.
|
4005
|
+
*/
|
2775
4006
|
readonly old_train_id_1?: uint
|
2776
|
-
/**
|
4007
|
+
/**
|
4008
|
+
* The second old train id when splitting/merging trains.
|
4009
|
+
*/
|
2777
4010
|
readonly old_train_id_2?: uint
|
2778
|
-
/**
|
4011
|
+
/**
|
4012
|
+
* Identifier of the event
|
4013
|
+
*/
|
2779
4014
|
readonly name: typeof defines.events.on_train_created
|
2780
|
-
/**
|
4015
|
+
/**
|
4016
|
+
* Tick the event was generated.
|
4017
|
+
*/
|
2781
4018
|
readonly tick: uint
|
2782
4019
|
}
|
2783
4020
|
|
@@ -2788,41 +4025,53 @@ interface OnTrainCreatedEvent extends EventData {
|
|
2788
4025
|
*/
|
2789
4026
|
interface OnTrainScheduleChangedEvent extends EventData {
|
2790
4027
|
readonly train: LuaTrain
|
2791
|
-
/**
|
4028
|
+
/**
|
4029
|
+
* The player who made the change if any.
|
4030
|
+
*/
|
2792
4031
|
readonly player_index?: uint
|
2793
|
-
/**
|
4032
|
+
/**
|
4033
|
+
* Identifier of the event
|
4034
|
+
*/
|
2794
4035
|
readonly name: typeof defines.events.on_train_schedule_changed
|
2795
|
-
/**
|
4036
|
+
/**
|
4037
|
+
* Tick the event was generated.
|
4038
|
+
*/
|
2796
4039
|
readonly tick: uint
|
2797
4040
|
}
|
2798
4041
|
|
2799
4042
|
/**
|
2800
|
-
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined
|
2801
|
-
* `trigger_created_entity="true"`.
|
4043
|
+
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity="true"`.
|
2802
4044
|
*
|
2803
4045
|
* {@link https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity View documentation}
|
2804
4046
|
*/
|
2805
4047
|
interface OnTriggerCreatedEntityEvent extends EventData {
|
2806
4048
|
readonly entity: LuaEntity
|
2807
4049
|
readonly source?: LuaEntity
|
2808
|
-
/**
|
4050
|
+
/**
|
4051
|
+
* Identifier of the event
|
4052
|
+
*/
|
2809
4053
|
readonly name: typeof defines.events.on_trigger_created_entity
|
2810
|
-
/**
|
4054
|
+
/**
|
4055
|
+
* Tick the event was generated.
|
4056
|
+
*/
|
2811
4057
|
readonly tick: uint
|
2812
4058
|
}
|
2813
4059
|
|
2814
4060
|
/**
|
2815
|
-
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger
|
2816
|
-
* prototype defined `trigger_fired_artillery="true"`.
|
4061
|
+
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery="true"`.
|
2817
4062
|
*
|
2818
4063
|
* {@link https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery View documentation}
|
2819
4064
|
*/
|
2820
4065
|
interface OnTriggerFiredArtilleryEvent extends EventData {
|
2821
4066
|
readonly entity: LuaEntity
|
2822
4067
|
readonly source?: LuaEntity
|
2823
|
-
/**
|
4068
|
+
/**
|
4069
|
+
* Identifier of the event
|
4070
|
+
*/
|
2824
4071
|
readonly name: typeof defines.events.on_trigger_fired_artillery
|
2825
|
-
/**
|
4072
|
+
/**
|
4073
|
+
* Tick the event was generated.
|
4074
|
+
*/
|
2826
4075
|
readonly tick: uint
|
2827
4076
|
}
|
2828
4077
|
|
@@ -2834,9 +4083,13 @@ interface OnTriggerFiredArtilleryEvent extends EventData {
|
|
2834
4083
|
interface OnUnitAddedToGroupEvent extends EventData {
|
2835
4084
|
readonly unit: LuaEntity
|
2836
4085
|
readonly group: LuaUnitGroup
|
2837
|
-
/**
|
4086
|
+
/**
|
4087
|
+
* Identifier of the event
|
4088
|
+
*/
|
2838
4089
|
readonly name: typeof defines.events.on_unit_added_to_group
|
2839
|
-
/**
|
4090
|
+
/**
|
4091
|
+
* Tick the event was generated.
|
4092
|
+
*/
|
2840
4093
|
readonly tick: uint
|
2841
4094
|
}
|
2842
4095
|
|
@@ -2847,9 +4100,13 @@ interface OnUnitAddedToGroupEvent extends EventData {
|
|
2847
4100
|
*/
|
2848
4101
|
interface OnUnitGroupCreatedEvent extends EventData {
|
2849
4102
|
readonly group: LuaUnitGroup
|
2850
|
-
/**
|
4103
|
+
/**
|
4104
|
+
* Identifier of the event
|
4105
|
+
*/
|
2851
4106
|
readonly name: typeof defines.events.on_unit_group_created
|
2852
|
-
/**
|
4107
|
+
/**
|
4108
|
+
* Tick the event was generated.
|
4109
|
+
*/
|
2853
4110
|
readonly tick: uint
|
2854
4111
|
}
|
2855
4112
|
|
@@ -2860,9 +4117,13 @@ interface OnUnitGroupCreatedEvent extends EventData {
|
|
2860
4117
|
*/
|
2861
4118
|
interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
2862
4119
|
readonly group: LuaUnitGroup
|
2863
|
-
/**
|
4120
|
+
/**
|
4121
|
+
* Identifier of the event
|
4122
|
+
*/
|
2864
4123
|
readonly name: typeof defines.events.on_unit_group_finished_gathering
|
2865
|
-
/**
|
4124
|
+
/**
|
4125
|
+
* Tick the event was generated.
|
4126
|
+
*/
|
2866
4127
|
readonly tick: uint
|
2867
4128
|
}
|
2868
4129
|
|
@@ -2874,9 +4135,13 @@ interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
|
2874
4135
|
interface OnUnitRemovedFromGroupEvent extends EventData {
|
2875
4136
|
readonly unit: LuaEntity
|
2876
4137
|
readonly group: LuaUnitGroup
|
2877
|
-
/**
|
4138
|
+
/**
|
4139
|
+
* Identifier of the event
|
4140
|
+
*/
|
2878
4141
|
readonly name: typeof defines.events.on_unit_removed_from_group
|
2879
|
-
/**
|
4142
|
+
/**
|
4143
|
+
* Tick the event was generated.
|
4144
|
+
*/
|
2880
4145
|
readonly tick: uint
|
2881
4146
|
}
|
2882
4147
|
|
@@ -2887,81 +4152,101 @@ interface OnUnitRemovedFromGroupEvent extends EventData {
|
|
2887
4152
|
*/
|
2888
4153
|
interface OnWorkerRobotExpiredEvent extends EventData {
|
2889
4154
|
readonly robot: LuaEntity
|
2890
|
-
/**
|
4155
|
+
/**
|
4156
|
+
* Identifier of the event
|
4157
|
+
*/
|
2891
4158
|
readonly name: typeof defines.events.on_worker_robot_expired
|
2892
|
-
/**
|
4159
|
+
/**
|
4160
|
+
* Tick the event was generated.
|
4161
|
+
*/
|
2893
4162
|
readonly tick: uint
|
2894
4163
|
}
|
2895
4164
|
|
2896
4165
|
/**
|
2897
|
-
* A static event mods can use to tell other mods they built something by script. This event is only raised if a mod
|
2898
|
-
* does so with {@link LuaBootstrap.raise_event LuaBootstrap::raise_event} or
|
2899
|
-
* {@link LuaBootstrap.raise_script_built LuaBootstrap::raise_script_built}, or when `raise_built` is passed to
|
2900
|
-
* {@link LuaSurface.create_entity LuaSurface::create_entity}. Can be filtered using {@link LuaScriptRaisedBuiltEventFilter}.
|
4166
|
+
* A static event mods can use to tell other mods they built something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_built LuaBootstrap::raise_script_built}, or when `raise_built` is passed to {@link LuaSurface#create_entity LuaSurface::create_entity}. Can be filtered using {@link LuaScriptRaisedBuiltEventFilter}.
|
2901
4167
|
*
|
2902
4168
|
* {@link https://lua-api.factorio.com/latest/events.html#script_raised_built View documentation}
|
2903
4169
|
*/
|
2904
4170
|
interface ScriptRaisedBuiltEvent extends EventData {
|
2905
|
-
/**
|
4171
|
+
/**
|
4172
|
+
* The entity that has been built.
|
4173
|
+
*/
|
2906
4174
|
readonly entity: LuaEntity
|
2907
|
-
/**
|
4175
|
+
/**
|
4176
|
+
* Identifier of the event
|
4177
|
+
*/
|
2908
4178
|
readonly name: typeof defines.events.script_raised_built
|
2909
|
-
/**
|
4179
|
+
/**
|
4180
|
+
* Tick the event was generated.
|
4181
|
+
*/
|
2910
4182
|
readonly tick: uint
|
2911
4183
|
}
|
2912
4184
|
|
2913
4185
|
/**
|
2914
|
-
* A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod
|
2915
|
-
* does so with {@link LuaBootstrap.raise_event LuaBootstrap::raise_event} or
|
2916
|
-
* {@link LuaBootstrap.raise_script_destroy LuaBootstrap::raise_script_destroy}, or when `raise_destroy` is passed to
|
2917
|
-
* {@link LuaEntity.destroy LuaEntity::destroy}. Can be filtered using {@link LuaScriptRaisedDestroyEventFilter}.
|
4186
|
+
* A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_destroy LuaBootstrap::raise_script_destroy}, or when `raise_destroy` is passed to {@link LuaEntity#destroy LuaEntity::destroy}. Can be filtered using {@link LuaScriptRaisedDestroyEventFilter}.
|
2918
4187
|
*
|
2919
4188
|
* {@link https://lua-api.factorio.com/latest/events.html#script_raised_destroy View documentation}
|
2920
4189
|
*/
|
2921
4190
|
interface ScriptRaisedDestroyEvent extends EventData {
|
2922
|
-
/**
|
4191
|
+
/**
|
4192
|
+
* The entity that was destroyed.
|
4193
|
+
*/
|
2923
4194
|
readonly entity: LuaEntity
|
2924
|
-
/**
|
4195
|
+
/**
|
4196
|
+
* Identifier of the event
|
4197
|
+
*/
|
2925
4198
|
readonly name: typeof defines.events.script_raised_destroy
|
2926
|
-
/**
|
4199
|
+
/**
|
4200
|
+
* Tick the event was generated.
|
4201
|
+
*/
|
2927
4202
|
readonly tick: uint
|
2928
4203
|
}
|
2929
4204
|
|
2930
4205
|
/**
|
2931
|
-
* A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod
|
2932
|
-
* does so with {@link LuaBootstrap.raise_event LuaBootstrap::raise_event} or
|
2933
|
-
* {@link LuaBootstrap.raise_script_revive LuaBootstrap::raise_script_revive}, or when `raise_revive` is passed to
|
2934
|
-
* {@link LuaEntity.revive LuaEntity::revive}. Can be filtered using {@link LuaScriptRaisedReviveEventFilter}.
|
4206
|
+
* A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_revive LuaBootstrap::raise_script_revive}, or when `raise_revive` is passed to {@link LuaEntity#revive LuaEntity::revive}. Can be filtered using {@link LuaScriptRaisedReviveEventFilter}.
|
2935
4207
|
*
|
2936
4208
|
* {@link https://lua-api.factorio.com/latest/events.html#script_raised_revive View documentation}
|
2937
4209
|
*/
|
2938
4210
|
interface ScriptRaisedReviveEvent extends EventData {
|
2939
|
-
/**
|
4211
|
+
/**
|
4212
|
+
* The entity that was revived.
|
4213
|
+
*/
|
2940
4214
|
readonly entity: LuaEntity
|
2941
|
-
/**
|
4215
|
+
/**
|
4216
|
+
* The tags associated with this entity, if any.
|
4217
|
+
*/
|
2942
4218
|
readonly tags?: Tags
|
2943
|
-
/**
|
4219
|
+
/**
|
4220
|
+
* Identifier of the event
|
4221
|
+
*/
|
2944
4222
|
readonly name: typeof defines.events.script_raised_revive
|
2945
|
-
/**
|
4223
|
+
/**
|
4224
|
+
* Tick the event was generated.
|
4225
|
+
*/
|
2946
4226
|
readonly tick: uint
|
2947
4227
|
}
|
2948
4228
|
|
2949
4229
|
/**
|
2950
|
-
* A static event mods can use to tell other mods they changed tiles on a surface by script. This event is only raised
|
2951
|
-
* if a mod does so with {@link LuaBootstrap.raise_event LuaBootstrap::raise_event} or
|
2952
|
-
* {@link LuaBootstrap.raise_script_set_tiles LuaBootstrap::raise_script_set_tiles}, or when `raise_event` is passed to
|
2953
|
-
* {@link LuaSurface.set_tiles LuaSurface::set_tiles}.
|
4230
|
+
* 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}.
|
2954
4231
|
*
|
2955
4232
|
* {@link https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles View documentation}
|
2956
4233
|
*/
|
2957
4234
|
interface ScriptRaisedSetTilesEvent extends EventData {
|
2958
|
-
/**
|
4235
|
+
/**
|
4236
|
+
* The surface whose tiles were changed.
|
4237
|
+
*/
|
2959
4238
|
readonly surface_index: uint
|
2960
|
-
/**
|
4239
|
+
/**
|
4240
|
+
* The tiles that were changed.
|
4241
|
+
*/
|
2961
4242
|
readonly tiles: TileRead[]
|
2962
|
-
/**
|
4243
|
+
/**
|
4244
|
+
* Identifier of the event
|
4245
|
+
*/
|
2963
4246
|
readonly name: typeof defines.events.script_raised_set_tiles
|
2964
|
-
/**
|
4247
|
+
/**
|
4248
|
+
* Tick the event was generated.
|
4249
|
+
*/
|
2965
4250
|
readonly tick: uint
|
2966
4251
|
}
|
2967
4252
|
|