typed-factorio 3.33.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/helpers-global.d.ts +5 -0
- package/package.json +2 -2
- package/prototype/generated/prototypes.d.ts +3960 -2495
- package/prototype/generated/types.d.ts +4499 -2472
- package/runtime/generated/classes.d.ts +11536 -6409
- package/runtime/generated/concepts.d.ts +11619 -9334
- package/runtime/generated/defines.d.ts +339 -280
- package/runtime/generated/events.d.ts +806 -661
- package/runtime/generated/global-functions.d.ts +3 -3
- package/runtime/generated/global-objects.d.ts +7 -7
|
@@ -13,7 +13,7 @@ declare module "factorio:runtime" {
|
|
|
13
13
|
* script.on_event("my-potato-control", function(event)
|
|
14
14
|
* game.print("Keyboard shortcut pressed on tick: " ..tostring(event.tick))
|
|
15
15
|
* end)
|
|
16
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
16
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#CustomInputEvent Online documentation}
|
|
17
17
|
*/
|
|
18
18
|
interface CustomInputEvent extends EventData {
|
|
19
19
|
/**
|
|
@@ -49,17 +49,17 @@ declare module "factorio:runtime" {
|
|
|
49
49
|
*/
|
|
50
50
|
readonly in_gui: boolean
|
|
51
51
|
/**
|
|
52
|
-
* Identifier of the event
|
|
52
|
+
* Identifier of the event.
|
|
53
53
|
*/
|
|
54
54
|
readonly name: defines.events
|
|
55
55
|
/**
|
|
56
56
|
* Tick the event was generated.
|
|
57
57
|
*/
|
|
58
|
-
readonly tick:
|
|
58
|
+
readonly tick: MapTick
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Called when an achievement is gained.
|
|
62
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
62
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_achievement_gained Online documentation}
|
|
63
63
|
*/
|
|
64
64
|
interface OnAchievementGainedEvent extends EventData {
|
|
65
65
|
/**
|
|
@@ -68,17 +68,17 @@ declare module "factorio:runtime" {
|
|
|
68
68
|
readonly player_index: PlayerIndex
|
|
69
69
|
readonly achievement: LuaAchievementPrototype
|
|
70
70
|
/**
|
|
71
|
-
* Identifier of the event
|
|
71
|
+
* Identifier of the event.
|
|
72
72
|
*/
|
|
73
73
|
readonly name: typeof defines.events.on_achievement_gained
|
|
74
74
|
/**
|
|
75
75
|
* Tick the event was generated.
|
|
76
76
|
*/
|
|
77
|
-
readonly tick:
|
|
77
|
+
readonly tick: MapTick
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
* Called when a unit/group completes a command.
|
|
81
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
81
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_ai_command_completed Online documentation}
|
|
82
82
|
*/
|
|
83
83
|
interface OnAiCommandCompletedEvent extends EventData {
|
|
84
84
|
/**
|
|
@@ -91,17 +91,17 @@ declare module "factorio:runtime" {
|
|
|
91
91
|
*/
|
|
92
92
|
readonly was_distracted: boolean
|
|
93
93
|
/**
|
|
94
|
-
* Identifier of the event
|
|
94
|
+
* Identifier of the event.
|
|
95
95
|
*/
|
|
96
96
|
readonly name: typeof defines.events.on_ai_command_completed
|
|
97
97
|
/**
|
|
98
98
|
* Tick the event was generated.
|
|
99
99
|
*/
|
|
100
|
-
readonly tick:
|
|
100
|
+
readonly tick: MapTick
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Called when an area of the map is cloned.
|
|
104
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
104
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_area_cloned Online documentation}
|
|
105
105
|
*/
|
|
106
106
|
interface OnAreaClonedEvent extends EventData {
|
|
107
107
|
readonly source_surface: LuaSurface
|
|
@@ -115,19 +115,19 @@ declare module "factorio:runtime" {
|
|
|
115
115
|
readonly clear_destination_entities: boolean
|
|
116
116
|
readonly clear_destination_decoratives: boolean
|
|
117
117
|
/**
|
|
118
|
-
* Identifier of the event
|
|
118
|
+
* Identifier of the event.
|
|
119
119
|
*/
|
|
120
120
|
readonly name: typeof defines.events.on_area_cloned
|
|
121
121
|
/**
|
|
122
122
|
* Tick the event was generated.
|
|
123
123
|
*/
|
|
124
|
-
readonly tick:
|
|
124
|
+
readonly tick: MapTick
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Called when a biter migration builds a base.
|
|
128
128
|
*
|
|
129
129
|
* This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
|
130
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
130
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_biter_base_built Online documentation}
|
|
131
131
|
*/
|
|
132
132
|
interface OnBiterBaseBuiltEvent extends EventData {
|
|
133
133
|
/**
|
|
@@ -135,17 +135,55 @@ declare module "factorio:runtime" {
|
|
|
135
135
|
*/
|
|
136
136
|
readonly entity: LuaEntity
|
|
137
137
|
/**
|
|
138
|
-
* Identifier of the event
|
|
138
|
+
* Identifier of the event.
|
|
139
139
|
*/
|
|
140
140
|
readonly name: typeof defines.events.on_biter_base_built
|
|
141
141
|
/**
|
|
142
142
|
* Tick the event was generated.
|
|
143
143
|
*/
|
|
144
|
-
readonly tick:
|
|
144
|
+
readonly tick: MapTick
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Called when a blueprint entity is pasted over an existing entity or entity ghost.
|
|
148
|
+
*
|
|
149
|
+
* The entity's settings, rotation, mirroring, wire connections, etc. may have been updated. This event is raised even if no settings actually changed.
|
|
150
|
+
*
|
|
151
|
+
* Note this event is not raised when an entity is upgraded or marked for upgrade, when a new entity is created, or when an entity ghost is instantly revived. {@link OnBuiltEntityEvent on_built_entity} is raised instead in those cases.
|
|
152
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_blueprint_settings_pasted Online documentation}
|
|
153
|
+
*/
|
|
154
|
+
interface OnBlueprintSettingsPastedEvent extends EventData {
|
|
155
|
+
/**
|
|
156
|
+
* The entity that was updated. Can be either an entity or an entity ghost.
|
|
157
|
+
*/
|
|
158
|
+
readonly entity: LuaEntity
|
|
159
|
+
/**
|
|
160
|
+
* The player who pasted the blueprint, if any. `nil` if pasted by script.
|
|
161
|
+
*/
|
|
162
|
+
readonly player_index?: PlayerIndex
|
|
163
|
+
/**
|
|
164
|
+
* Tags from the source blueprint, if any. Only provided for non-ghost entities. For ghost entities, access tags via `entity.tags`.
|
|
165
|
+
*/
|
|
166
|
+
readonly tags?: Tags
|
|
167
|
+
/**
|
|
168
|
+
* If the blueprint rotated the entity, provides the entity's direction before the rotation. Note: not provided for rotations due to superforce printing.
|
|
169
|
+
*/
|
|
170
|
+
readonly previous_direction?: defines.direction
|
|
171
|
+
/**
|
|
172
|
+
* Whether the blueprint changed the entity's mirroring.
|
|
173
|
+
*/
|
|
174
|
+
readonly mirrored: boolean
|
|
175
|
+
/**
|
|
176
|
+
* Identifier of the event.
|
|
177
|
+
*/
|
|
178
|
+
readonly name: typeof defines.events.on_blueprint_settings_pasted
|
|
179
|
+
/**
|
|
180
|
+
* Tick the event was generated.
|
|
181
|
+
*/
|
|
182
|
+
readonly tick: MapTick
|
|
145
183
|
}
|
|
146
184
|
/**
|
|
147
185
|
* Called when a set of positions on the map is cloned.
|
|
148
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
186
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_brush_cloned Online documentation}
|
|
149
187
|
*/
|
|
150
188
|
interface OnBrushClonedEvent extends EventData {
|
|
151
189
|
readonly source_offset: TilePosition
|
|
@@ -160,17 +198,17 @@ declare module "factorio:runtime" {
|
|
|
160
198
|
readonly clear_destination_entities: boolean
|
|
161
199
|
readonly clear_destination_decoratives: boolean
|
|
162
200
|
/**
|
|
163
|
-
* Identifier of the event
|
|
201
|
+
* Identifier of the event.
|
|
164
202
|
*/
|
|
165
203
|
readonly name: typeof defines.events.on_brush_cloned
|
|
166
204
|
/**
|
|
167
205
|
* Tick the event was generated.
|
|
168
206
|
*/
|
|
169
|
-
readonly tick:
|
|
207
|
+
readonly tick: MapTick
|
|
170
208
|
}
|
|
171
209
|
/**
|
|
172
210
|
* Called when a {@link defines.command.build_base} command reaches its destination, and before building starts.
|
|
173
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
211
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_build_base_arrived Online documentation}
|
|
174
212
|
*/
|
|
175
213
|
interface OnBuildBaseArrivedEvent extends EventData {
|
|
176
214
|
/**
|
|
@@ -182,19 +220,19 @@ declare module "factorio:runtime" {
|
|
|
182
220
|
*/
|
|
183
221
|
readonly group?: LuaCommandable
|
|
184
222
|
/**
|
|
185
|
-
* Identifier of the event
|
|
223
|
+
* Identifier of the event.
|
|
186
224
|
*/
|
|
187
225
|
readonly name: typeof defines.events.on_build_base_arrived
|
|
188
226
|
/**
|
|
189
227
|
* Tick the event was generated.
|
|
190
228
|
*/
|
|
191
|
-
readonly tick:
|
|
229
|
+
readonly tick: MapTick
|
|
192
230
|
}
|
|
193
231
|
/**
|
|
194
232
|
* Called when player builds something.
|
|
195
233
|
*
|
|
196
234
|
* Event filter: [LuaPlayerBuiltEntityEventFilter](LuaPlayerBuiltEntityEventFilter]
|
|
197
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
235
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_built_entity Online documentation}
|
|
198
236
|
*/
|
|
199
237
|
interface OnBuiltEntityEvent extends EventData {
|
|
200
238
|
/**
|
|
@@ -214,37 +252,37 @@ declare module "factorio:runtime" {
|
|
|
214
252
|
*/
|
|
215
253
|
readonly tags?: Tags
|
|
216
254
|
/**
|
|
217
|
-
* Identifier of the event
|
|
255
|
+
* Identifier of the event.
|
|
218
256
|
*/
|
|
219
257
|
readonly name: typeof defines.events.on_built_entity
|
|
220
258
|
/**
|
|
221
259
|
* Tick the event was generated.
|
|
222
260
|
*/
|
|
223
|
-
readonly tick:
|
|
261
|
+
readonly tick: MapTick
|
|
224
262
|
}
|
|
225
263
|
/**
|
|
226
264
|
* Called when the deconstruction of an entity is canceled.
|
|
227
265
|
*
|
|
228
266
|
* Event filter: [LuaEntityDeconstructionCancelledEventFilter](LuaEntityDeconstructionCancelledEventFilter]
|
|
229
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
267
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cancelled_deconstruction Online documentation}
|
|
230
268
|
*/
|
|
231
269
|
interface OnCancelledDeconstructionEvent extends EventData {
|
|
232
270
|
readonly entity: LuaEntity
|
|
233
271
|
readonly player_index?: PlayerIndex
|
|
234
272
|
/**
|
|
235
|
-
* Identifier of the event
|
|
273
|
+
* Identifier of the event.
|
|
236
274
|
*/
|
|
237
275
|
readonly name: typeof defines.events.on_cancelled_deconstruction
|
|
238
276
|
/**
|
|
239
277
|
* Tick the event was generated.
|
|
240
278
|
*/
|
|
241
|
-
readonly tick:
|
|
279
|
+
readonly tick: MapTick
|
|
242
280
|
}
|
|
243
281
|
/**
|
|
244
282
|
* Called when the upgrade of an entity is canceled.
|
|
245
283
|
*
|
|
246
284
|
* Event filter: [LuaUpgradeCancelledEventFilter](LuaUpgradeCancelledEventFilter]
|
|
247
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
285
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cancelled_upgrade Online documentation}
|
|
248
286
|
*/
|
|
249
287
|
interface OnCancelledUpgradeEvent extends EventData {
|
|
250
288
|
readonly entity: LuaEntity
|
|
@@ -252,17 +290,17 @@ declare module "factorio:runtime" {
|
|
|
252
290
|
readonly target: LuaEntityPrototype
|
|
253
291
|
readonly quality: LuaQualityPrototype
|
|
254
292
|
/**
|
|
255
|
-
* Identifier of the event
|
|
293
|
+
* Identifier of the event.
|
|
256
294
|
*/
|
|
257
295
|
readonly name: typeof defines.events.on_cancelled_upgrade
|
|
258
296
|
/**
|
|
259
297
|
* Tick the event was generated.
|
|
260
298
|
*/
|
|
261
|
-
readonly tick:
|
|
299
|
+
readonly tick: MapTick
|
|
262
300
|
}
|
|
263
301
|
/**
|
|
264
302
|
* Called after a cargo pod has delivered its cargo.
|
|
265
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
303
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cargo_pod_delivered_cargo Online documentation}
|
|
266
304
|
*/
|
|
267
305
|
interface OnCargoPodDeliveredCargoEvent extends EventData {
|
|
268
306
|
readonly cargo_pod: LuaEntity
|
|
@@ -271,17 +309,17 @@ declare module "factorio:runtime" {
|
|
|
271
309
|
*/
|
|
272
310
|
readonly spawned_container?: LuaEntity
|
|
273
311
|
/**
|
|
274
|
-
* Identifier of the event
|
|
312
|
+
* Identifier of the event.
|
|
275
313
|
*/
|
|
276
314
|
readonly name: typeof defines.events.on_cargo_pod_delivered_cargo
|
|
277
315
|
/**
|
|
278
316
|
* Tick the event was generated.
|
|
279
317
|
*/
|
|
280
|
-
readonly tick:
|
|
318
|
+
readonly tick: MapTick
|
|
281
319
|
}
|
|
282
320
|
/**
|
|
283
321
|
* Called when a cargo pod departs a surface.
|
|
284
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
322
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cargo_pod_finished_ascending Online documentation}
|
|
285
323
|
*/
|
|
286
324
|
interface OnCargoPodFinishedAscendingEvent extends EventData {
|
|
287
325
|
readonly cargo_pod: LuaEntity
|
|
@@ -294,17 +332,17 @@ declare module "factorio:runtime" {
|
|
|
294
332
|
*/
|
|
295
333
|
readonly player_index?: PlayerIndex
|
|
296
334
|
/**
|
|
297
|
-
* Identifier of the event
|
|
335
|
+
* Identifier of the event.
|
|
298
336
|
*/
|
|
299
337
|
readonly name: typeof defines.events.on_cargo_pod_finished_ascending
|
|
300
338
|
/**
|
|
301
339
|
* Tick the event was generated.
|
|
302
340
|
*/
|
|
303
|
-
readonly tick:
|
|
341
|
+
readonly tick: MapTick
|
|
304
342
|
}
|
|
305
343
|
/**
|
|
306
344
|
* Called when a cargo pods lands on a surface, either at a station or on the ground.
|
|
307
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
345
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cargo_pod_finished_descending Online documentation}
|
|
308
346
|
*/
|
|
309
347
|
interface OnCargoPodFinishedDescendingEvent extends EventData {
|
|
310
348
|
readonly cargo_pod: LuaEntity
|
|
@@ -317,17 +355,17 @@ declare module "factorio:runtime" {
|
|
|
317
355
|
*/
|
|
318
356
|
readonly player_index?: PlayerIndex
|
|
319
357
|
/**
|
|
320
|
-
* Identifier of the event
|
|
358
|
+
* Identifier of the event.
|
|
321
359
|
*/
|
|
322
360
|
readonly name: typeof defines.events.on_cargo_pod_finished_descending
|
|
323
361
|
/**
|
|
324
362
|
* Tick the event was generated.
|
|
325
363
|
*/
|
|
326
|
-
readonly tick:
|
|
364
|
+
readonly tick: MapTick
|
|
327
365
|
}
|
|
328
366
|
/**
|
|
329
367
|
* Called when a cargo pod departs from a space platform hub or by another method not attached to a rocket.
|
|
330
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
368
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cargo_pod_started_ascending Online documentation}
|
|
331
369
|
*/
|
|
332
370
|
interface OnCargoPodStartedAscendingEvent extends EventData {
|
|
333
371
|
readonly cargo_pod: LuaEntity
|
|
@@ -336,19 +374,19 @@ declare module "factorio:runtime" {
|
|
|
336
374
|
*/
|
|
337
375
|
readonly player_index?: PlayerIndex
|
|
338
376
|
/**
|
|
339
|
-
* Identifier of the event
|
|
377
|
+
* Identifier of the event.
|
|
340
378
|
*/
|
|
341
379
|
readonly name: typeof defines.events.on_cargo_pod_started_ascending
|
|
342
380
|
/**
|
|
343
381
|
* Tick the event was generated.
|
|
344
382
|
*/
|
|
345
|
-
readonly tick:
|
|
383
|
+
readonly tick: MapTick
|
|
346
384
|
}
|
|
347
385
|
/**
|
|
348
386
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
|
349
387
|
*
|
|
350
388
|
* this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
|
351
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
389
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_character_corpse_expired Online documentation}
|
|
352
390
|
*/
|
|
353
391
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
|
354
392
|
/**
|
|
@@ -356,34 +394,34 @@ declare module "factorio:runtime" {
|
|
|
356
394
|
*/
|
|
357
395
|
readonly corpse: LuaEntity
|
|
358
396
|
/**
|
|
359
|
-
* Identifier of the event
|
|
397
|
+
* Identifier of the event.
|
|
360
398
|
*/
|
|
361
399
|
readonly name: typeof defines.events.on_character_corpse_expired
|
|
362
400
|
/**
|
|
363
401
|
* Tick the event was generated.
|
|
364
402
|
*/
|
|
365
|
-
readonly tick:
|
|
403
|
+
readonly tick: MapTick
|
|
366
404
|
}
|
|
367
405
|
/**
|
|
368
406
|
* Called when a chart tag is created.
|
|
369
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
407
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_chart_tag_added Online documentation}
|
|
370
408
|
*/
|
|
371
409
|
interface OnChartTagAddedEvent extends EventData {
|
|
372
410
|
readonly tag: LuaCustomChartTag
|
|
373
411
|
readonly force: LuaForce
|
|
374
412
|
readonly player_index?: PlayerIndex
|
|
375
413
|
/**
|
|
376
|
-
* Identifier of the event
|
|
414
|
+
* Identifier of the event.
|
|
377
415
|
*/
|
|
378
416
|
readonly name: typeof defines.events.on_chart_tag_added
|
|
379
417
|
/**
|
|
380
418
|
* Tick the event was generated.
|
|
381
419
|
*/
|
|
382
|
-
readonly tick:
|
|
420
|
+
readonly tick: MapTick
|
|
383
421
|
}
|
|
384
422
|
/**
|
|
385
423
|
* Called when a chart tag is modified by a player or by script.
|
|
386
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
424
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_chart_tag_modified Online documentation}
|
|
387
425
|
*/
|
|
388
426
|
interface OnChartTagModifiedEvent extends EventData {
|
|
389
427
|
readonly tag: LuaCustomChartTag
|
|
@@ -395,34 +433,34 @@ declare module "factorio:runtime" {
|
|
|
395
433
|
readonly old_surface: LuaSurface
|
|
396
434
|
readonly old_player_index?: uint32
|
|
397
435
|
/**
|
|
398
|
-
* Identifier of the event
|
|
436
|
+
* Identifier of the event.
|
|
399
437
|
*/
|
|
400
438
|
readonly name: typeof defines.events.on_chart_tag_modified
|
|
401
439
|
/**
|
|
402
440
|
* Tick the event was generated.
|
|
403
441
|
*/
|
|
404
|
-
readonly tick:
|
|
442
|
+
readonly tick: MapTick
|
|
405
443
|
}
|
|
406
444
|
/**
|
|
407
445
|
* Called just before a chart tag is deleted.
|
|
408
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
446
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_chart_tag_removed Online documentation}
|
|
409
447
|
*/
|
|
410
448
|
interface OnChartTagRemovedEvent extends EventData {
|
|
411
449
|
readonly tag: LuaCustomChartTag
|
|
412
450
|
readonly force: LuaForce
|
|
413
451
|
readonly player_index?: PlayerIndex
|
|
414
452
|
/**
|
|
415
|
-
* Identifier of the event
|
|
453
|
+
* Identifier of the event.
|
|
416
454
|
*/
|
|
417
455
|
readonly name: typeof defines.events.on_chart_tag_removed
|
|
418
456
|
/**
|
|
419
457
|
* Tick the event was generated.
|
|
420
458
|
*/
|
|
421
|
-
readonly tick:
|
|
459
|
+
readonly tick: MapTick
|
|
422
460
|
}
|
|
423
461
|
/**
|
|
424
462
|
* Called when a chunk is charted or re-charted.
|
|
425
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
463
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_chunk_charted Online documentation}
|
|
426
464
|
*/
|
|
427
465
|
interface OnChunkChartedEvent extends EventData {
|
|
428
466
|
readonly surface_index: SurfaceIndex
|
|
@@ -433,17 +471,17 @@ declare module "factorio:runtime" {
|
|
|
433
471
|
readonly area: BoundingBox
|
|
434
472
|
readonly force: LuaForce
|
|
435
473
|
/**
|
|
436
|
-
* Identifier of the event
|
|
474
|
+
* Identifier of the event.
|
|
437
475
|
*/
|
|
438
476
|
readonly name: typeof defines.events.on_chunk_charted
|
|
439
477
|
/**
|
|
440
478
|
* Tick the event was generated.
|
|
441
479
|
*/
|
|
442
|
-
readonly tick:
|
|
480
|
+
readonly tick: MapTick
|
|
443
481
|
}
|
|
444
482
|
/**
|
|
445
483
|
* Called when one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
|
446
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
484
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_chunk_deleted Online documentation}
|
|
447
485
|
*/
|
|
448
486
|
interface OnChunkDeletedEvent extends EventData {
|
|
449
487
|
readonly surface_index: SurfaceIndex
|
|
@@ -452,17 +490,17 @@ declare module "factorio:runtime" {
|
|
|
452
490
|
*/
|
|
453
491
|
readonly positions: ChunkPosition[]
|
|
454
492
|
/**
|
|
455
|
-
* Identifier of the event
|
|
493
|
+
* Identifier of the event.
|
|
456
494
|
*/
|
|
457
495
|
readonly name: typeof defines.events.on_chunk_deleted
|
|
458
496
|
/**
|
|
459
497
|
* Tick the event was generated.
|
|
460
498
|
*/
|
|
461
|
-
readonly tick:
|
|
499
|
+
readonly tick: MapTick
|
|
462
500
|
}
|
|
463
501
|
/**
|
|
464
502
|
* Called when a chunk is generated.
|
|
465
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
503
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_chunk_generated Online documentation}
|
|
466
504
|
*/
|
|
467
505
|
interface OnChunkGeneratedEvent extends EventData {
|
|
468
506
|
/**
|
|
@@ -478,17 +516,17 @@ declare module "factorio:runtime" {
|
|
|
478
516
|
*/
|
|
479
517
|
readonly surface: LuaSurface
|
|
480
518
|
/**
|
|
481
|
-
* Identifier of the event
|
|
519
|
+
* Identifier of the event.
|
|
482
520
|
*/
|
|
483
521
|
readonly name: typeof defines.events.on_chunk_generated
|
|
484
522
|
/**
|
|
485
523
|
* Tick the event was generated.
|
|
486
524
|
*/
|
|
487
|
-
readonly tick:
|
|
525
|
+
readonly tick: MapTick
|
|
488
526
|
}
|
|
489
527
|
/**
|
|
490
528
|
* Called when a combat robot expires through a lack of energy, or timeout.
|
|
491
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
529
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_combat_robot_expired Online documentation}
|
|
492
530
|
*/
|
|
493
531
|
interface OnCombatRobotExpiredEvent extends EventData {
|
|
494
532
|
readonly robot: LuaEntity
|
|
@@ -497,19 +535,19 @@ declare module "factorio:runtime" {
|
|
|
497
535
|
*/
|
|
498
536
|
readonly owner?: LuaEntity
|
|
499
537
|
/**
|
|
500
|
-
* Identifier of the event
|
|
538
|
+
* Identifier of the event.
|
|
501
539
|
*/
|
|
502
540
|
readonly name: typeof defines.events.on_combat_robot_expired
|
|
503
541
|
/**
|
|
504
542
|
* Tick the event was generated.
|
|
505
543
|
*/
|
|
506
|
-
readonly tick:
|
|
544
|
+
readonly tick: MapTick
|
|
507
545
|
}
|
|
508
546
|
/**
|
|
509
547
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
|
510
548
|
*
|
|
511
549
|
* This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
|
512
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
550
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_console_chat Online documentation}
|
|
513
551
|
*/
|
|
514
552
|
interface OnConsoleChatEvent extends EventData {
|
|
515
553
|
/**
|
|
@@ -521,17 +559,17 @@ declare module "factorio:runtime" {
|
|
|
521
559
|
*/
|
|
522
560
|
readonly message: string
|
|
523
561
|
/**
|
|
524
|
-
* Identifier of the event
|
|
562
|
+
* Identifier of the event.
|
|
525
563
|
*/
|
|
526
564
|
readonly name: typeof defines.events.on_console_chat
|
|
527
565
|
/**
|
|
528
566
|
* Tick the event was generated.
|
|
529
567
|
*/
|
|
530
|
-
readonly tick:
|
|
568
|
+
readonly tick: MapTick
|
|
531
569
|
}
|
|
532
570
|
/**
|
|
533
571
|
* Called when someone enters a command-like message regardless of it being a valid command.
|
|
534
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
572
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_console_command Online documentation}
|
|
535
573
|
*/
|
|
536
574
|
interface OnConsoleCommandEvent extends EventData {
|
|
537
575
|
/**
|
|
@@ -547,17 +585,17 @@ declare module "factorio:runtime" {
|
|
|
547
585
|
*/
|
|
548
586
|
readonly parameters: string
|
|
549
587
|
/**
|
|
550
|
-
* Identifier of the event
|
|
588
|
+
* Identifier of the event.
|
|
551
589
|
*/
|
|
552
590
|
readonly name: typeof defines.events.on_console_command
|
|
553
591
|
/**
|
|
554
592
|
* Tick the event was generated.
|
|
555
593
|
*/
|
|
556
|
-
readonly tick:
|
|
594
|
+
readonly tick: MapTick
|
|
557
595
|
}
|
|
558
596
|
/**
|
|
559
597
|
* Called when a cutscene is cancelled by the player or by script.
|
|
560
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
598
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cutscene_cancelled Online documentation}
|
|
561
599
|
*/
|
|
562
600
|
interface OnCutsceneCancelledEvent extends EventData {
|
|
563
601
|
/**
|
|
@@ -565,17 +603,17 @@ declare module "factorio:runtime" {
|
|
|
565
603
|
*/
|
|
566
604
|
readonly player_index: PlayerIndex
|
|
567
605
|
/**
|
|
568
|
-
* Identifier of the event
|
|
606
|
+
* Identifier of the event.
|
|
569
607
|
*/
|
|
570
608
|
readonly name: typeof defines.events.on_cutscene_cancelled
|
|
571
609
|
/**
|
|
572
610
|
* Tick the event was generated.
|
|
573
611
|
*/
|
|
574
|
-
readonly tick:
|
|
612
|
+
readonly tick: MapTick
|
|
575
613
|
}
|
|
576
614
|
/**
|
|
577
615
|
* Called when a cutscene finishes naturally (was not cancelled).
|
|
578
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
616
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cutscene_finished Online documentation}
|
|
579
617
|
*/
|
|
580
618
|
interface OnCutsceneFinishedEvent extends EventData {
|
|
581
619
|
/**
|
|
@@ -583,17 +621,17 @@ declare module "factorio:runtime" {
|
|
|
583
621
|
*/
|
|
584
622
|
readonly player_index: PlayerIndex
|
|
585
623
|
/**
|
|
586
|
-
* Identifier of the event
|
|
624
|
+
* Identifier of the event.
|
|
587
625
|
*/
|
|
588
626
|
readonly name: typeof defines.events.on_cutscene_finished
|
|
589
627
|
/**
|
|
590
628
|
* Tick the event was generated.
|
|
591
629
|
*/
|
|
592
|
-
readonly tick:
|
|
630
|
+
readonly tick: MapTick
|
|
593
631
|
}
|
|
594
632
|
/**
|
|
595
633
|
* Called when a cutscene starts.
|
|
596
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
634
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cutscene_started Online documentation}
|
|
597
635
|
*/
|
|
598
636
|
interface OnCutsceneStartedEvent extends EventData {
|
|
599
637
|
/**
|
|
@@ -601,19 +639,19 @@ declare module "factorio:runtime" {
|
|
|
601
639
|
*/
|
|
602
640
|
readonly player_index: PlayerIndex
|
|
603
641
|
/**
|
|
604
|
-
* Identifier of the event
|
|
642
|
+
* Identifier of the event.
|
|
605
643
|
*/
|
|
606
644
|
readonly name: typeof defines.events.on_cutscene_started
|
|
607
645
|
/**
|
|
608
646
|
* Tick the event was generated.
|
|
609
647
|
*/
|
|
610
|
-
readonly tick:
|
|
648
|
+
readonly tick: MapTick
|
|
611
649
|
}
|
|
612
650
|
/**
|
|
613
651
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
|
614
652
|
*
|
|
615
653
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
|
616
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
654
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_cutscene_waypoint_reached Online documentation}
|
|
617
655
|
*/
|
|
618
656
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
|
619
657
|
/**
|
|
@@ -625,37 +663,37 @@ declare module "factorio:runtime" {
|
|
|
625
663
|
*/
|
|
626
664
|
readonly waypoint_index: uint32
|
|
627
665
|
/**
|
|
628
|
-
* Identifier of the event
|
|
666
|
+
* Identifier of the event.
|
|
629
667
|
*/
|
|
630
668
|
readonly name: typeof defines.events.on_cutscene_waypoint_reached
|
|
631
669
|
/**
|
|
632
670
|
* Tick the event was generated.
|
|
633
671
|
*/
|
|
634
|
-
readonly tick:
|
|
672
|
+
readonly tick: MapTick
|
|
635
673
|
}
|
|
636
674
|
/**
|
|
637
675
|
* Called when an entity is cloned. The filter applies to the source entity.
|
|
638
676
|
*
|
|
639
677
|
* Event filter: [LuaEntityClonedEventFilter](LuaEntityClonedEventFilter]
|
|
640
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
678
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_entity_cloned Online documentation}
|
|
641
679
|
*/
|
|
642
680
|
interface OnEntityClonedEvent extends EventData {
|
|
643
681
|
readonly source: LuaEntity
|
|
644
682
|
readonly destination: LuaEntity
|
|
645
683
|
/**
|
|
646
|
-
* Identifier of the event
|
|
684
|
+
* Identifier of the event.
|
|
647
685
|
*/
|
|
648
686
|
readonly name: typeof defines.events.on_entity_cloned
|
|
649
687
|
/**
|
|
650
688
|
* Tick the event was generated.
|
|
651
689
|
*/
|
|
652
|
-
readonly tick:
|
|
690
|
+
readonly tick: MapTick
|
|
653
691
|
}
|
|
654
692
|
/**
|
|
655
693
|
* Called after an entity has been recolored either by the player or through script.
|
|
656
694
|
*
|
|
657
695
|
* Automatic recoloring due to {@link LuaPlayer#color LuaPlayer::color} will not raise events, as that is a separate mechanism.
|
|
658
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
696
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_entity_color_changed Online documentation}
|
|
659
697
|
*/
|
|
660
698
|
interface OnEntityColorChangedEvent extends EventData {
|
|
661
699
|
/**
|
|
@@ -663,19 +701,19 @@ declare module "factorio:runtime" {
|
|
|
663
701
|
*/
|
|
664
702
|
readonly entity: LuaEntity
|
|
665
703
|
/**
|
|
666
|
-
* Identifier of the event
|
|
704
|
+
* Identifier of the event.
|
|
667
705
|
*/
|
|
668
706
|
readonly name: typeof defines.events.on_entity_color_changed
|
|
669
707
|
/**
|
|
670
708
|
* Tick the event was generated.
|
|
671
709
|
*/
|
|
672
|
-
readonly tick:
|
|
710
|
+
readonly tick: MapTick
|
|
673
711
|
}
|
|
674
712
|
/**
|
|
675
713
|
* Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
|
|
676
714
|
*
|
|
677
715
|
* Event filter: [LuaEntityDamagedEventFilter](LuaEntityDamagedEventFilter]
|
|
678
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
716
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_entity_damaged Online documentation}
|
|
679
717
|
*/
|
|
680
718
|
interface OnEntityDamagedEvent extends EventData {
|
|
681
719
|
readonly entity: LuaEntity
|
|
@@ -705,19 +743,19 @@ declare module "factorio:runtime" {
|
|
|
705
743
|
*/
|
|
706
744
|
readonly force?: LuaForce
|
|
707
745
|
/**
|
|
708
|
-
* Identifier of the event
|
|
746
|
+
* Identifier of the event.
|
|
709
747
|
*/
|
|
710
748
|
readonly name: typeof defines.events.on_entity_damaged
|
|
711
749
|
/**
|
|
712
750
|
* Tick the event was generated.
|
|
713
751
|
*/
|
|
714
|
-
readonly tick:
|
|
752
|
+
readonly tick: MapTick
|
|
715
753
|
}
|
|
716
754
|
/**
|
|
717
755
|
* Called when an entity dies.
|
|
718
756
|
*
|
|
719
757
|
* Event filter: [LuaEntityDiedEventFilter](LuaEntityDiedEventFilter]
|
|
720
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
758
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_entity_died Online documentation}
|
|
721
759
|
*/
|
|
722
760
|
interface OnEntityDiedEvent extends EventData {
|
|
723
761
|
/**
|
|
@@ -741,17 +779,17 @@ declare module "factorio:runtime" {
|
|
|
741
779
|
*/
|
|
742
780
|
readonly damage_type?: LuaDamagePrototype
|
|
743
781
|
/**
|
|
744
|
-
* Identifier of the event
|
|
782
|
+
* Identifier of the event.
|
|
745
783
|
*/
|
|
746
784
|
readonly name: typeof defines.events.on_entity_died
|
|
747
785
|
/**
|
|
748
786
|
* Tick the event was generated.
|
|
749
787
|
*/
|
|
750
|
-
readonly tick:
|
|
788
|
+
readonly tick: MapTick
|
|
751
789
|
}
|
|
752
790
|
/**
|
|
753
791
|
* Called when one of an entity's logistic slots changes.
|
|
754
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
792
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_entity_logistic_slot_changed Online documentation}
|
|
755
793
|
*/
|
|
756
794
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
|
757
795
|
/**
|
|
@@ -771,17 +809,17 @@ declare module "factorio:runtime" {
|
|
|
771
809
|
*/
|
|
772
810
|
readonly slot_index: uint32
|
|
773
811
|
/**
|
|
774
|
-
* Identifier of the event
|
|
812
|
+
* Identifier of the event.
|
|
775
813
|
*/
|
|
776
814
|
readonly name: typeof defines.events.on_entity_logistic_slot_changed
|
|
777
815
|
/**
|
|
778
816
|
* Tick the event was generated.
|
|
779
817
|
*/
|
|
780
|
-
readonly tick:
|
|
818
|
+
readonly tick: MapTick
|
|
781
819
|
}
|
|
782
820
|
/**
|
|
783
821
|
* Called after an entity has been renamed either by the player or through script.
|
|
784
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
822
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_entity_renamed Online documentation}
|
|
785
823
|
*/
|
|
786
824
|
interface OnEntityRenamedEvent extends EventData {
|
|
787
825
|
/**
|
|
@@ -792,17 +830,17 @@ declare module "factorio:runtime" {
|
|
|
792
830
|
readonly entity: LuaEntity
|
|
793
831
|
readonly old_name: string
|
|
794
832
|
/**
|
|
795
|
-
* Identifier of the event
|
|
833
|
+
* Identifier of the event.
|
|
796
834
|
*/
|
|
797
835
|
readonly name: typeof defines.events.on_entity_renamed
|
|
798
836
|
/**
|
|
799
837
|
* Tick the event was generated.
|
|
800
838
|
*/
|
|
801
|
-
readonly tick:
|
|
839
|
+
readonly tick: MapTick
|
|
802
840
|
}
|
|
803
841
|
/**
|
|
804
842
|
* Called after entity copy-paste is done.
|
|
805
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
843
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_entity_settings_pasted Online documentation}
|
|
806
844
|
*/
|
|
807
845
|
interface OnEntitySettingsPastedEvent extends EventData {
|
|
808
846
|
readonly player_index: PlayerIndex
|
|
@@ -815,33 +853,33 @@ declare module "factorio:runtime" {
|
|
|
815
853
|
*/
|
|
816
854
|
readonly destination: LuaEntity
|
|
817
855
|
/**
|
|
818
|
-
* Identifier of the event
|
|
856
|
+
* Identifier of the event.
|
|
819
857
|
*/
|
|
820
858
|
readonly name: typeof defines.events.on_entity_settings_pasted
|
|
821
859
|
/**
|
|
822
860
|
* Tick the event was generated.
|
|
823
861
|
*/
|
|
824
|
-
readonly tick:
|
|
862
|
+
readonly tick: MapTick
|
|
825
863
|
}
|
|
826
864
|
/**
|
|
827
865
|
* Called when an entity is spawned by a EnemySpawner
|
|
828
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
866
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_entity_spawned Online documentation}
|
|
829
867
|
*/
|
|
830
868
|
interface OnEntitySpawnedEvent extends EventData {
|
|
831
869
|
readonly spawner: LuaEntity
|
|
832
870
|
readonly entity: LuaEntity
|
|
833
871
|
/**
|
|
834
|
-
* Identifier of the event
|
|
872
|
+
* Identifier of the event.
|
|
835
873
|
*/
|
|
836
874
|
readonly name: typeof defines.events.on_entity_spawned
|
|
837
875
|
/**
|
|
838
876
|
* Tick the event was generated.
|
|
839
877
|
*/
|
|
840
|
-
readonly tick:
|
|
878
|
+
readonly tick: MapTick
|
|
841
879
|
}
|
|
842
880
|
/**
|
|
843
881
|
* Called after equipment is inserted into an equipment grid.
|
|
844
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
882
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_equipment_inserted Online documentation}
|
|
845
883
|
*/
|
|
846
884
|
interface OnEquipmentInsertedEvent extends EventData {
|
|
847
885
|
/**
|
|
@@ -853,17 +891,17 @@ declare module "factorio:runtime" {
|
|
|
853
891
|
*/
|
|
854
892
|
readonly equipment: LuaEquipment
|
|
855
893
|
/**
|
|
856
|
-
* Identifier of the event
|
|
894
|
+
* Identifier of the event.
|
|
857
895
|
*/
|
|
858
896
|
readonly name: typeof defines.events.on_equipment_inserted
|
|
859
897
|
/**
|
|
860
898
|
* Tick the event was generated.
|
|
861
899
|
*/
|
|
862
|
-
readonly tick:
|
|
900
|
+
readonly tick: MapTick
|
|
863
901
|
}
|
|
864
902
|
/**
|
|
865
903
|
* Called after equipment is removed from an equipment grid.
|
|
866
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
904
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_equipment_removed Online documentation}
|
|
867
905
|
*/
|
|
868
906
|
interface OnEquipmentRemovedEvent extends EventData {
|
|
869
907
|
/**
|
|
@@ -883,17 +921,17 @@ declare module "factorio:runtime" {
|
|
|
883
921
|
*/
|
|
884
922
|
readonly count: uint32
|
|
885
923
|
/**
|
|
886
|
-
* Identifier of the event
|
|
924
|
+
* Identifier of the event.
|
|
887
925
|
*/
|
|
888
926
|
readonly name: typeof defines.events.on_equipment_removed
|
|
889
927
|
/**
|
|
890
928
|
* Tick the event was generated.
|
|
891
929
|
*/
|
|
892
|
-
readonly tick:
|
|
930
|
+
readonly tick: MapTick
|
|
893
931
|
}
|
|
894
932
|
/**
|
|
895
933
|
* Called when the a forces cease fire values change.
|
|
896
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
934
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_force_cease_fire_changed Online documentation}
|
|
897
935
|
*/
|
|
898
936
|
interface OnForceCeaseFireChangedEvent extends EventData {
|
|
899
937
|
/**
|
|
@@ -909,19 +947,19 @@ declare module "factorio:runtime" {
|
|
|
909
947
|
*/
|
|
910
948
|
readonly added: boolean
|
|
911
949
|
/**
|
|
912
|
-
* Identifier of the event
|
|
950
|
+
* Identifier of the event.
|
|
913
951
|
*/
|
|
914
952
|
readonly name: typeof defines.events.on_force_cease_fire_changed
|
|
915
953
|
/**
|
|
916
954
|
* Tick the event was generated.
|
|
917
955
|
*/
|
|
918
|
-
readonly tick:
|
|
956
|
+
readonly tick: MapTick
|
|
919
957
|
}
|
|
920
958
|
/**
|
|
921
959
|
* Called when a new force is created using `game.create_force()`
|
|
922
960
|
*
|
|
923
961
|
* This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
|
924
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
962
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_force_created Online documentation}
|
|
925
963
|
*/
|
|
926
964
|
interface OnForceCreatedEvent extends EventData {
|
|
927
965
|
/**
|
|
@@ -929,17 +967,17 @@ declare module "factorio:runtime" {
|
|
|
929
967
|
*/
|
|
930
968
|
readonly force: LuaForce
|
|
931
969
|
/**
|
|
932
|
-
* Identifier of the event
|
|
970
|
+
* Identifier of the event.
|
|
933
971
|
*/
|
|
934
972
|
readonly name: typeof defines.events.on_force_created
|
|
935
973
|
/**
|
|
936
974
|
* Tick the event was generated.
|
|
937
975
|
*/
|
|
938
|
-
readonly tick:
|
|
976
|
+
readonly tick: MapTick
|
|
939
977
|
}
|
|
940
978
|
/**
|
|
941
979
|
* Called when the a forces friends change.
|
|
942
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
980
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_force_friends_changed Online documentation}
|
|
943
981
|
*/
|
|
944
982
|
interface OnForceFriendsChangedEvent extends EventData {
|
|
945
983
|
/**
|
|
@@ -955,34 +993,34 @@ declare module "factorio:runtime" {
|
|
|
955
993
|
*/
|
|
956
994
|
readonly added: boolean
|
|
957
995
|
/**
|
|
958
|
-
* Identifier of the event
|
|
996
|
+
* Identifier of the event.
|
|
959
997
|
*/
|
|
960
998
|
readonly name: typeof defines.events.on_force_friends_changed
|
|
961
999
|
/**
|
|
962
1000
|
* Tick the event was generated.
|
|
963
1001
|
*/
|
|
964
|
-
readonly tick:
|
|
1002
|
+
readonly tick: MapTick
|
|
965
1003
|
}
|
|
966
1004
|
/**
|
|
967
1005
|
* Called when {@link LuaForce#reset LuaForce::reset} is finished.
|
|
968
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1006
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_force_reset Online documentation}
|
|
969
1007
|
*/
|
|
970
1008
|
interface OnForceResetEvent extends EventData {
|
|
971
1009
|
readonly force: LuaForce
|
|
972
1010
|
/**
|
|
973
|
-
* Identifier of the event
|
|
1011
|
+
* Identifier of the event.
|
|
974
1012
|
*/
|
|
975
1013
|
readonly name: typeof defines.events.on_force_reset
|
|
976
1014
|
/**
|
|
977
1015
|
* Tick the event was generated.
|
|
978
1016
|
*/
|
|
979
|
-
readonly tick:
|
|
1017
|
+
readonly tick: MapTick
|
|
980
1018
|
}
|
|
981
1019
|
/**
|
|
982
1020
|
* Called after two forces have been merged using `game.merge_forces()`.
|
|
983
1021
|
*
|
|
984
1022
|
* The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
|
985
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1023
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_forces_merged Online documentation}
|
|
986
1024
|
*/
|
|
987
1025
|
interface OnForcesMergedEvent extends EventData {
|
|
988
1026
|
/**
|
|
@@ -998,17 +1036,17 @@ declare module "factorio:runtime" {
|
|
|
998
1036
|
*/
|
|
999
1037
|
readonly destination: LuaForce
|
|
1000
1038
|
/**
|
|
1001
|
-
* Identifier of the event
|
|
1039
|
+
* Identifier of the event.
|
|
1002
1040
|
*/
|
|
1003
1041
|
readonly name: typeof defines.events.on_forces_merged
|
|
1004
1042
|
/**
|
|
1005
1043
|
* Tick the event was generated.
|
|
1006
1044
|
*/
|
|
1007
|
-
readonly tick:
|
|
1045
|
+
readonly tick: MapTick
|
|
1008
1046
|
}
|
|
1009
1047
|
/**
|
|
1010
1048
|
* Called when two forces are about to be merged using `game.merge_forces()`.
|
|
1011
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1049
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_forces_merging Online documentation}
|
|
1012
1050
|
*/
|
|
1013
1051
|
interface OnForcesMergingEvent extends EventData {
|
|
1014
1052
|
/**
|
|
@@ -1020,33 +1058,33 @@ declare module "factorio:runtime" {
|
|
|
1020
1058
|
*/
|
|
1021
1059
|
readonly destination: LuaForce
|
|
1022
1060
|
/**
|
|
1023
|
-
* Identifier of the event
|
|
1061
|
+
* Identifier of the event.
|
|
1024
1062
|
*/
|
|
1025
1063
|
readonly name: typeof defines.events.on_forces_merging
|
|
1026
1064
|
/**
|
|
1027
1065
|
* Tick the event was generated.
|
|
1028
1066
|
*/
|
|
1029
|
-
readonly tick:
|
|
1067
|
+
readonly tick: MapTick
|
|
1030
1068
|
}
|
|
1031
1069
|
/**
|
|
1032
1070
|
* 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.
|
|
1033
1071
|
*
|
|
1034
1072
|
* This event is not fired when the scenario is loaded via the map editor.
|
|
1035
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1073
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_game_created_from_scenario Online documentation}
|
|
1036
1074
|
*/
|
|
1037
1075
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
|
1038
1076
|
/**
|
|
1039
|
-
* Identifier of the event
|
|
1077
|
+
* Identifier of the event.
|
|
1040
1078
|
*/
|
|
1041
1079
|
readonly name: typeof defines.events.on_game_created_from_scenario
|
|
1042
1080
|
/**
|
|
1043
1081
|
* Tick the event was generated.
|
|
1044
1082
|
*/
|
|
1045
|
-
readonly tick:
|
|
1083
|
+
readonly tick: MapTick
|
|
1046
1084
|
}
|
|
1047
1085
|
/**
|
|
1048
1086
|
* Called when {@link LuaGuiElement} checked state is changed (related to checkboxes and radio buttons).
|
|
1049
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1087
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_checked_state_changed Online documentation}
|
|
1050
1088
|
*/
|
|
1051
1089
|
interface OnGuiCheckedStateChangedEvent extends EventData {
|
|
1052
1090
|
/**
|
|
@@ -1058,17 +1096,17 @@ declare module "factorio:runtime" {
|
|
|
1058
1096
|
*/
|
|
1059
1097
|
readonly player_index: PlayerIndex
|
|
1060
1098
|
/**
|
|
1061
|
-
* Identifier of the event
|
|
1099
|
+
* Identifier of the event.
|
|
1062
1100
|
*/
|
|
1063
1101
|
readonly name: typeof defines.events.on_gui_checked_state_changed
|
|
1064
1102
|
/**
|
|
1065
1103
|
* Tick the event was generated.
|
|
1066
1104
|
*/
|
|
1067
|
-
readonly tick:
|
|
1105
|
+
readonly tick: MapTick
|
|
1068
1106
|
}
|
|
1069
1107
|
/**
|
|
1070
1108
|
* Called when {@link LuaGuiElement} is clicked.
|
|
1071
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1109
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_click Online documentation}
|
|
1072
1110
|
*/
|
|
1073
1111
|
interface OnGuiClickEvent extends EventData {
|
|
1074
1112
|
/**
|
|
@@ -1100,13 +1138,13 @@ declare module "factorio:runtime" {
|
|
|
1100
1138
|
*/
|
|
1101
1139
|
readonly shift: boolean
|
|
1102
1140
|
/**
|
|
1103
|
-
* Identifier of the event
|
|
1141
|
+
* Identifier of the event.
|
|
1104
1142
|
*/
|
|
1105
1143
|
readonly name: typeof defines.events.on_gui_click
|
|
1106
1144
|
/**
|
|
1107
1145
|
* Tick the event was generated.
|
|
1108
1146
|
*/
|
|
1109
|
-
readonly tick:
|
|
1147
|
+
readonly tick: MapTick
|
|
1110
1148
|
}
|
|
1111
1149
|
/**
|
|
1112
1150
|
* Called when the player closes the GUI they have open.
|
|
@@ -1114,7 +1152,7 @@ declare module "factorio:runtime" {
|
|
|
1114
1152
|
* 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.
|
|
1115
1153
|
*
|
|
1116
1154
|
* 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.
|
|
1117
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1155
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_closed Online documentation}
|
|
1118
1156
|
*/
|
|
1119
1157
|
interface OnGuiClosedEvent extends EventData {
|
|
1120
1158
|
/**
|
|
@@ -1158,17 +1196,17 @@ declare module "factorio:runtime" {
|
|
|
1158
1196
|
*/
|
|
1159
1197
|
readonly inventory?: LuaInventory
|
|
1160
1198
|
/**
|
|
1161
|
-
* Identifier of the event
|
|
1199
|
+
* Identifier of the event.
|
|
1162
1200
|
*/
|
|
1163
1201
|
readonly name: typeof defines.events.on_gui_closed
|
|
1164
1202
|
/**
|
|
1165
1203
|
* Tick the event was generated.
|
|
1166
1204
|
*/
|
|
1167
|
-
readonly tick:
|
|
1205
|
+
readonly tick: MapTick
|
|
1168
1206
|
}
|
|
1169
1207
|
/**
|
|
1170
1208
|
* Called when a {@link LuaGuiElement} is confirmed, for example by pressing Enter in a textfield.
|
|
1171
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1209
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_confirmed Online documentation}
|
|
1172
1210
|
*/
|
|
1173
1211
|
interface OnGuiConfirmedEvent extends EventData {
|
|
1174
1212
|
/**
|
|
@@ -1192,17 +1230,17 @@ declare module "factorio:runtime" {
|
|
|
1192
1230
|
*/
|
|
1193
1231
|
readonly shift: boolean
|
|
1194
1232
|
/**
|
|
1195
|
-
* Identifier of the event
|
|
1233
|
+
* Identifier of the event.
|
|
1196
1234
|
*/
|
|
1197
1235
|
readonly name: typeof defines.events.on_gui_confirmed
|
|
1198
1236
|
/**
|
|
1199
1237
|
* Tick the event was generated.
|
|
1200
1238
|
*/
|
|
1201
|
-
readonly tick:
|
|
1239
|
+
readonly tick: MapTick
|
|
1202
1240
|
}
|
|
1203
1241
|
/**
|
|
1204
1242
|
* Called when {@link LuaGuiElement} element value is changed (related to choose element buttons).
|
|
1205
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1243
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_elem_changed Online documentation}
|
|
1206
1244
|
*/
|
|
1207
1245
|
interface OnGuiElemChangedEvent extends EventData {
|
|
1208
1246
|
/**
|
|
@@ -1214,19 +1252,19 @@ declare module "factorio:runtime" {
|
|
|
1214
1252
|
*/
|
|
1215
1253
|
readonly player_index: PlayerIndex
|
|
1216
1254
|
/**
|
|
1217
|
-
* Identifier of the event
|
|
1255
|
+
* Identifier of the event.
|
|
1218
1256
|
*/
|
|
1219
1257
|
readonly name: typeof defines.events.on_gui_elem_changed
|
|
1220
1258
|
/**
|
|
1221
1259
|
* Tick the event was generated.
|
|
1222
1260
|
*/
|
|
1223
|
-
readonly tick:
|
|
1261
|
+
readonly tick: MapTick
|
|
1224
1262
|
}
|
|
1225
1263
|
/**
|
|
1226
1264
|
* Called when {@link LuaGuiElement} is hovered by the mouse.
|
|
1227
1265
|
*
|
|
1228
1266
|
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
|
1229
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1267
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_hover Online documentation}
|
|
1230
1268
|
*/
|
|
1231
1269
|
interface OnGuiHoverEvent extends EventData {
|
|
1232
1270
|
/**
|
|
@@ -1238,19 +1276,77 @@ declare module "factorio:runtime" {
|
|
|
1238
1276
|
*/
|
|
1239
1277
|
readonly player_index: PlayerIndex
|
|
1240
1278
|
/**
|
|
1241
|
-
* Identifier of the event
|
|
1279
|
+
* Identifier of the event.
|
|
1242
1280
|
*/
|
|
1243
1281
|
readonly name: typeof defines.events.on_gui_hover
|
|
1244
1282
|
/**
|
|
1245
1283
|
* Tick the event was generated.
|
|
1246
1284
|
*/
|
|
1247
|
-
readonly tick:
|
|
1285
|
+
readonly tick: MapTick
|
|
1286
|
+
}
|
|
1287
|
+
/**
|
|
1288
|
+
* Called when a player interacts with a custom inventory GUI.
|
|
1289
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_inventory_action Online documentation}
|
|
1290
|
+
*/
|
|
1291
|
+
interface OnGuiInventoryActionEvent extends EventData {
|
|
1292
|
+
/**
|
|
1293
|
+
* The player doing the action.
|
|
1294
|
+
*/
|
|
1295
|
+
readonly player_index: PlayerIndex
|
|
1296
|
+
/**
|
|
1297
|
+
* The inventory element interacted with.
|
|
1298
|
+
*/
|
|
1299
|
+
readonly element: LuaGuiElement
|
|
1300
|
+
/**
|
|
1301
|
+
* The slot index that was interacted with.
|
|
1302
|
+
*/
|
|
1303
|
+
readonly slot: uint32
|
|
1304
|
+
/**
|
|
1305
|
+
* The action performed.
|
|
1306
|
+
*/
|
|
1307
|
+
readonly action: defines.inventory_actions
|
|
1308
|
+
/**
|
|
1309
|
+
* The final mouse button used if any.
|
|
1310
|
+
*/
|
|
1311
|
+
readonly button: defines.mouse_button_type
|
|
1312
|
+
/**
|
|
1313
|
+
* If alt was pressed.
|
|
1314
|
+
*/
|
|
1315
|
+
readonly alt: boolean
|
|
1316
|
+
/**
|
|
1317
|
+
* If control was pressed.
|
|
1318
|
+
*/
|
|
1319
|
+
readonly control: boolean
|
|
1320
|
+
/**
|
|
1321
|
+
* If shift was pressed.
|
|
1322
|
+
*/
|
|
1323
|
+
readonly shift: boolean
|
|
1324
|
+
/**
|
|
1325
|
+
* The item clicked on.
|
|
1326
|
+
*/
|
|
1327
|
+
readonly item?: LuaItemPrototype
|
|
1328
|
+
/**
|
|
1329
|
+
* The item quality clicked on.
|
|
1330
|
+
*/
|
|
1331
|
+
readonly quality?: LuaQualityPrototype
|
|
1332
|
+
/**
|
|
1333
|
+
* The item number clicked on (if it had one).
|
|
1334
|
+
*/
|
|
1335
|
+
readonly item_number?: uint32
|
|
1336
|
+
/**
|
|
1337
|
+
* Identifier of the event.
|
|
1338
|
+
*/
|
|
1339
|
+
readonly name: typeof defines.events.on_gui_inventory_action
|
|
1340
|
+
/**
|
|
1341
|
+
* Tick the event was generated.
|
|
1342
|
+
*/
|
|
1343
|
+
readonly tick: MapTick
|
|
1248
1344
|
}
|
|
1249
1345
|
/**
|
|
1250
1346
|
* Called when the player's cursor leaves a {@link LuaGuiElement} that was previously hovered.
|
|
1251
1347
|
*
|
|
1252
1348
|
* Only fired for events whose {@link LuaGuiElement#raise_hover_events LuaGuiElement::raise_hover_events} is `true`.
|
|
1253
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1349
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_leave Online documentation}
|
|
1254
1350
|
*/
|
|
1255
1351
|
interface OnGuiLeaveEvent extends EventData {
|
|
1256
1352
|
/**
|
|
@@ -1262,17 +1358,17 @@ declare module "factorio:runtime" {
|
|
|
1262
1358
|
*/
|
|
1263
1359
|
readonly player_index: PlayerIndex
|
|
1264
1360
|
/**
|
|
1265
|
-
* Identifier of the event
|
|
1361
|
+
* Identifier of the event.
|
|
1266
1362
|
*/
|
|
1267
1363
|
readonly name: typeof defines.events.on_gui_leave
|
|
1268
1364
|
/**
|
|
1269
1365
|
* Tick the event was generated.
|
|
1270
1366
|
*/
|
|
1271
|
-
readonly tick:
|
|
1367
|
+
readonly tick: MapTick
|
|
1272
1368
|
}
|
|
1273
1369
|
/**
|
|
1274
1370
|
* Called when {@link LuaGuiElement} element location is changed (related to frames in `player.gui.screen`).
|
|
1275
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1371
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_location_changed Online documentation}
|
|
1276
1372
|
*/
|
|
1277
1373
|
interface OnGuiLocationChangedEvent extends EventData {
|
|
1278
1374
|
/**
|
|
@@ -1284,21 +1380,21 @@ declare module "factorio:runtime" {
|
|
|
1284
1380
|
*/
|
|
1285
1381
|
readonly player_index: PlayerIndex
|
|
1286
1382
|
/**
|
|
1287
|
-
* Identifier of the event
|
|
1383
|
+
* Identifier of the event.
|
|
1288
1384
|
*/
|
|
1289
1385
|
readonly name: typeof defines.events.on_gui_location_changed
|
|
1290
1386
|
/**
|
|
1291
1387
|
* Tick the event was generated.
|
|
1292
1388
|
*/
|
|
1293
|
-
readonly tick:
|
|
1389
|
+
readonly tick: MapTick
|
|
1294
1390
|
}
|
|
1295
1391
|
/**
|
|
1296
1392
|
* Called when the player opens a GUI.
|
|
1297
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1393
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_opened Online documentation}
|
|
1298
1394
|
*/
|
|
1299
1395
|
interface OnGuiOpenedEvent extends EventData {
|
|
1300
1396
|
/**
|
|
1301
|
-
* The player
|
|
1397
|
+
* The player opening the GUI.
|
|
1302
1398
|
*/
|
|
1303
1399
|
readonly player_index: PlayerIndex
|
|
1304
1400
|
/**
|
|
@@ -1338,17 +1434,17 @@ declare module "factorio:runtime" {
|
|
|
1338
1434
|
*/
|
|
1339
1435
|
readonly inventory?: LuaInventory
|
|
1340
1436
|
/**
|
|
1341
|
-
* Identifier of the event
|
|
1437
|
+
* Identifier of the event.
|
|
1342
1438
|
*/
|
|
1343
1439
|
readonly name: typeof defines.events.on_gui_opened
|
|
1344
1440
|
/**
|
|
1345
1441
|
* Tick the event was generated.
|
|
1346
1442
|
*/
|
|
1347
|
-
readonly tick:
|
|
1443
|
+
readonly tick: MapTick
|
|
1348
1444
|
}
|
|
1349
1445
|
/**
|
|
1350
1446
|
* Called when {@link LuaGuiElement} selected tab is changed (related to tabbed-panes).
|
|
1351
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1447
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_selected_tab_changed Online documentation}
|
|
1352
1448
|
*/
|
|
1353
1449
|
interface OnGuiSelectedTabChangedEvent extends EventData {
|
|
1354
1450
|
/**
|
|
@@ -1360,17 +1456,17 @@ declare module "factorio:runtime" {
|
|
|
1360
1456
|
*/
|
|
1361
1457
|
readonly player_index: PlayerIndex
|
|
1362
1458
|
/**
|
|
1363
|
-
* Identifier of the event
|
|
1459
|
+
* Identifier of the event.
|
|
1364
1460
|
*/
|
|
1365
1461
|
readonly name: typeof defines.events.on_gui_selected_tab_changed
|
|
1366
1462
|
/**
|
|
1367
1463
|
* Tick the event was generated.
|
|
1368
1464
|
*/
|
|
1369
|
-
readonly tick:
|
|
1465
|
+
readonly tick: MapTick
|
|
1370
1466
|
}
|
|
1371
1467
|
/**
|
|
1372
1468
|
* Called when {@link LuaGuiElement} selection state is changed (related to drop-downs and listboxes).
|
|
1373
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1469
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_selection_state_changed Online documentation}
|
|
1374
1470
|
*/
|
|
1375
1471
|
interface OnGuiSelectionStateChangedEvent extends EventData {
|
|
1376
1472
|
/**
|
|
@@ -1382,17 +1478,17 @@ declare module "factorio:runtime" {
|
|
|
1382
1478
|
*/
|
|
1383
1479
|
readonly player_index: PlayerIndex
|
|
1384
1480
|
/**
|
|
1385
|
-
* Identifier of the event
|
|
1481
|
+
* Identifier of the event.
|
|
1386
1482
|
*/
|
|
1387
1483
|
readonly name: typeof defines.events.on_gui_selection_state_changed
|
|
1388
1484
|
/**
|
|
1389
1485
|
* Tick the event was generated.
|
|
1390
1486
|
*/
|
|
1391
|
-
readonly tick:
|
|
1487
|
+
readonly tick: MapTick
|
|
1392
1488
|
}
|
|
1393
1489
|
/**
|
|
1394
1490
|
* Called when {@link LuaGuiElement} switch state is changed (related to switches).
|
|
1395
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1491
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_switch_state_changed Online documentation}
|
|
1396
1492
|
*/
|
|
1397
1493
|
interface OnGuiSwitchStateChangedEvent extends EventData {
|
|
1398
1494
|
/**
|
|
@@ -1404,17 +1500,17 @@ declare module "factorio:runtime" {
|
|
|
1404
1500
|
*/
|
|
1405
1501
|
readonly player_index: PlayerIndex
|
|
1406
1502
|
/**
|
|
1407
|
-
* Identifier of the event
|
|
1503
|
+
* Identifier of the event.
|
|
1408
1504
|
*/
|
|
1409
1505
|
readonly name: typeof defines.events.on_gui_switch_state_changed
|
|
1410
1506
|
/**
|
|
1411
1507
|
* Tick the event was generated.
|
|
1412
1508
|
*/
|
|
1413
|
-
readonly tick:
|
|
1509
|
+
readonly tick: MapTick
|
|
1414
1510
|
}
|
|
1415
1511
|
/**
|
|
1416
1512
|
* Called when {@link LuaGuiElement} text is changed by the player.
|
|
1417
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1513
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_text_changed Online documentation}
|
|
1418
1514
|
*/
|
|
1419
1515
|
interface OnGuiTextChangedEvent extends EventData {
|
|
1420
1516
|
/**
|
|
@@ -1430,17 +1526,17 @@ declare module "factorio:runtime" {
|
|
|
1430
1526
|
*/
|
|
1431
1527
|
readonly text: string
|
|
1432
1528
|
/**
|
|
1433
|
-
* Identifier of the event
|
|
1529
|
+
* Identifier of the event.
|
|
1434
1530
|
*/
|
|
1435
1531
|
readonly name: typeof defines.events.on_gui_text_changed
|
|
1436
1532
|
/**
|
|
1437
1533
|
* Tick the event was generated.
|
|
1438
1534
|
*/
|
|
1439
|
-
readonly tick:
|
|
1535
|
+
readonly tick: MapTick
|
|
1440
1536
|
}
|
|
1441
1537
|
/**
|
|
1442
1538
|
* Called when {@link LuaGuiElement} slider value is changed (related to the slider element).
|
|
1443
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1539
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_gui_value_changed Online documentation}
|
|
1444
1540
|
*/
|
|
1445
1541
|
interface OnGuiValueChangedEvent extends EventData {
|
|
1446
1542
|
/**
|
|
@@ -1452,32 +1548,32 @@ declare module "factorio:runtime" {
|
|
|
1452
1548
|
*/
|
|
1453
1549
|
readonly player_index: PlayerIndex
|
|
1454
1550
|
/**
|
|
1455
|
-
* Identifier of the event
|
|
1551
|
+
* Identifier of the event.
|
|
1456
1552
|
*/
|
|
1457
1553
|
readonly name: typeof defines.events.on_gui_value_changed
|
|
1458
1554
|
/**
|
|
1459
1555
|
* Tick the event was generated.
|
|
1460
1556
|
*/
|
|
1461
|
-
readonly tick:
|
|
1557
|
+
readonly tick: MapTick
|
|
1462
1558
|
}
|
|
1463
1559
|
/**
|
|
1464
1560
|
* Called when a land mine is armed.
|
|
1465
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1561
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_land_mine_armed Online documentation}
|
|
1466
1562
|
*/
|
|
1467
1563
|
interface OnLandMineArmedEvent extends EventData {
|
|
1468
1564
|
readonly mine: LuaEntity
|
|
1469
1565
|
/**
|
|
1470
|
-
* Identifier of the event
|
|
1566
|
+
* Identifier of the event.
|
|
1471
1567
|
*/
|
|
1472
1568
|
readonly name: typeof defines.events.on_land_mine_armed
|
|
1473
1569
|
/**
|
|
1474
1570
|
* Tick the event was generated.
|
|
1475
1571
|
*/
|
|
1476
|
-
readonly tick:
|
|
1572
|
+
readonly tick: MapTick
|
|
1477
1573
|
}
|
|
1478
1574
|
/**
|
|
1479
1575
|
* Called when a custom {@link import("factorio:prototype").ShortcutPrototype Lua shortcut} is pressed.
|
|
1480
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1576
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_lua_shortcut Online documentation}
|
|
1481
1577
|
*/
|
|
1482
1578
|
interface OnLuaShortcutEvent extends EventData {
|
|
1483
1579
|
readonly player_index: PlayerIndex
|
|
@@ -1486,37 +1582,37 @@ declare module "factorio:runtime" {
|
|
|
1486
1582
|
*/
|
|
1487
1583
|
readonly prototype_name: string
|
|
1488
1584
|
/**
|
|
1489
|
-
* Identifier of the event
|
|
1585
|
+
* Identifier of the event.
|
|
1490
1586
|
*/
|
|
1491
1587
|
readonly name: typeof defines.events.on_lua_shortcut
|
|
1492
1588
|
/**
|
|
1493
1589
|
* Tick the event was generated.
|
|
1494
1590
|
*/
|
|
1495
|
-
readonly tick:
|
|
1591
|
+
readonly tick: MapTick
|
|
1496
1592
|
}
|
|
1497
1593
|
/**
|
|
1498
1594
|
* Called when an entity is marked for deconstruction with the Deconstruction planner or via script.
|
|
1499
1595
|
*
|
|
1500
1596
|
* Event filter: [LuaEntityMarkedForDeconstructionEventFilter](LuaEntityMarkedForDeconstructionEventFilter]
|
|
1501
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1597
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_marked_for_deconstruction Online documentation}
|
|
1502
1598
|
*/
|
|
1503
1599
|
interface OnMarkedForDeconstructionEvent extends EventData {
|
|
1504
1600
|
readonly entity: LuaEntity
|
|
1505
1601
|
readonly player_index?: PlayerIndex
|
|
1506
1602
|
/**
|
|
1507
|
-
* Identifier of the event
|
|
1603
|
+
* Identifier of the event.
|
|
1508
1604
|
*/
|
|
1509
1605
|
readonly name: typeof defines.events.on_marked_for_deconstruction
|
|
1510
1606
|
/**
|
|
1511
1607
|
* Tick the event was generated.
|
|
1512
1608
|
*/
|
|
1513
|
-
readonly tick:
|
|
1609
|
+
readonly tick: MapTick
|
|
1514
1610
|
}
|
|
1515
1611
|
/**
|
|
1516
1612
|
* Called when an entity is marked for upgrade with the upgrade planner or via script.
|
|
1517
1613
|
*
|
|
1518
1614
|
* Event filter: [LuaEntityMarkedForUpgradeEventFilter](LuaEntityMarkedForUpgradeEventFilter]
|
|
1519
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1615
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_marked_for_upgrade Online documentation}
|
|
1520
1616
|
*/
|
|
1521
1617
|
interface OnMarkedForUpgradeEvent extends EventData {
|
|
1522
1618
|
readonly player_index?: PlayerIndex
|
|
@@ -1535,17 +1631,17 @@ declare module "factorio:runtime" {
|
|
|
1535
1631
|
*/
|
|
1536
1632
|
readonly previous_quality?: LuaQualityPrototype
|
|
1537
1633
|
/**
|
|
1538
|
-
* Identifier of the event
|
|
1634
|
+
* Identifier of the event.
|
|
1539
1635
|
*/
|
|
1540
1636
|
readonly name: typeof defines.events.on_marked_for_upgrade
|
|
1541
1637
|
/**
|
|
1542
1638
|
* Tick the event was generated.
|
|
1543
1639
|
*/
|
|
1544
|
-
readonly tick:
|
|
1640
|
+
readonly tick: MapTick
|
|
1545
1641
|
}
|
|
1546
1642
|
/**
|
|
1547
1643
|
* Called after a player purchases some offer from a `market` entity.
|
|
1548
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1644
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_market_item_purchased Online documentation}
|
|
1549
1645
|
*/
|
|
1550
1646
|
interface OnMarketItemPurchasedEvent extends EventData {
|
|
1551
1647
|
/**
|
|
@@ -1565,17 +1661,17 @@ declare module "factorio:runtime" {
|
|
|
1565
1661
|
*/
|
|
1566
1662
|
readonly count: uint32
|
|
1567
1663
|
/**
|
|
1568
|
-
* Identifier of the event
|
|
1664
|
+
* Identifier of the event.
|
|
1569
1665
|
*/
|
|
1570
1666
|
readonly name: typeof defines.events.on_market_item_purchased
|
|
1571
1667
|
/**
|
|
1572
1668
|
* Tick the event was generated.
|
|
1573
1669
|
*/
|
|
1574
|
-
readonly tick:
|
|
1670
|
+
readonly tick: MapTick
|
|
1575
1671
|
}
|
|
1576
1672
|
/**
|
|
1577
1673
|
* Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
|
|
1578
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1674
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_mod_item_opened Online documentation}
|
|
1579
1675
|
*/
|
|
1580
1676
|
interface OnModItemOpenedEvent extends EventData {
|
|
1581
1677
|
/**
|
|
@@ -1591,33 +1687,33 @@ declare module "factorio:runtime" {
|
|
|
1591
1687
|
*/
|
|
1592
1688
|
readonly quality: LuaQualityPrototype
|
|
1593
1689
|
/**
|
|
1594
|
-
* Identifier of the event
|
|
1690
|
+
* Identifier of the event.
|
|
1595
1691
|
*/
|
|
1596
1692
|
readonly name: typeof defines.events.on_mod_item_opened
|
|
1597
1693
|
/**
|
|
1598
1694
|
* Tick the event was generated.
|
|
1599
1695
|
*/
|
|
1600
|
-
readonly tick:
|
|
1696
|
+
readonly tick: MapTick
|
|
1601
1697
|
}
|
|
1602
1698
|
/**
|
|
1603
1699
|
* Called when {@link LuaGameScript#is_multiplayer LuaGameScript::is_multiplayer} changes to true. May also be raised when it was already true but a game was loaded from a save file and with hosting.
|
|
1604
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1700
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_multiplayer_init Online documentation}
|
|
1605
1701
|
*/
|
|
1606
1702
|
interface OnMultiplayerInitEvent extends EventData {
|
|
1607
1703
|
/**
|
|
1608
|
-
* Identifier of the event
|
|
1704
|
+
* Identifier of the event.
|
|
1609
1705
|
*/
|
|
1610
1706
|
readonly name: typeof defines.events.on_multiplayer_init
|
|
1611
1707
|
/**
|
|
1612
1708
|
* Tick the event was generated.
|
|
1613
1709
|
*/
|
|
1614
|
-
readonly tick:
|
|
1710
|
+
readonly tick: MapTick
|
|
1615
1711
|
}
|
|
1616
1712
|
/**
|
|
1617
1713
|
* Called after an object is destroyed which was registered with {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed} previously.
|
|
1618
1714
|
*
|
|
1619
1715
|
* Depending on when a given object is destroyed, this event will be fired at the end of the current tick or at the end of the next tick. The event's timing is independent of the in-world object being destroyed.
|
|
1620
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1716
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_object_destroyed Online documentation}
|
|
1621
1717
|
*/
|
|
1622
1718
|
interface OnObjectDestroyedEvent extends EventData {
|
|
1623
1719
|
/**
|
|
@@ -1625,25 +1721,25 @@ declare module "factorio:runtime" {
|
|
|
1625
1721
|
*/
|
|
1626
1722
|
readonly registration_number: RegistrationNumber
|
|
1627
1723
|
/**
|
|
1628
|
-
* The {@link RegistrationTarget useful identifier} of the object. Same as second value returned by {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}
|
|
1724
|
+
* The {@link RegistrationTarget useful identifier} of the object or `0` if the object does not have a useful id. Same as second value returned by {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}.
|
|
1629
1725
|
*/
|
|
1630
1726
|
readonly useful_id: uint64
|
|
1631
1727
|
/**
|
|
1632
|
-
* Type of the object that was destroyed. Same as third value returned by {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}
|
|
1728
|
+
* Type of the object that was destroyed. Same as third value returned by {@link LuaBootstrap#register_on_object_destroyed LuaBootstrap::register_on_object_destroyed}.
|
|
1633
1729
|
*/
|
|
1634
1730
|
readonly type: defines.target_type
|
|
1635
1731
|
/**
|
|
1636
|
-
* Identifier of the event
|
|
1732
|
+
* Identifier of the event.
|
|
1637
1733
|
*/
|
|
1638
1734
|
readonly name: typeof defines.events.on_object_destroyed
|
|
1639
1735
|
/**
|
|
1640
1736
|
* Tick the event was generated.
|
|
1641
1737
|
*/
|
|
1642
|
-
readonly tick:
|
|
1738
|
+
readonly tick: MapTick
|
|
1643
1739
|
}
|
|
1644
1740
|
/**
|
|
1645
1741
|
* Called directly after a permission group is added.
|
|
1646
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1742
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_permission_group_added Online documentation}
|
|
1647
1743
|
*/
|
|
1648
1744
|
interface OnPermissionGroupAddedEvent extends EventData {
|
|
1649
1745
|
/**
|
|
@@ -1655,17 +1751,17 @@ declare module "factorio:runtime" {
|
|
|
1655
1751
|
*/
|
|
1656
1752
|
readonly group: LuaPermissionGroup
|
|
1657
1753
|
/**
|
|
1658
|
-
* Identifier of the event
|
|
1754
|
+
* Identifier of the event.
|
|
1659
1755
|
*/
|
|
1660
1756
|
readonly name: typeof defines.events.on_permission_group_added
|
|
1661
1757
|
/**
|
|
1662
1758
|
* Tick the event was generated.
|
|
1663
1759
|
*/
|
|
1664
|
-
readonly tick:
|
|
1760
|
+
readonly tick: MapTick
|
|
1665
1761
|
}
|
|
1666
1762
|
/**
|
|
1667
1763
|
* Called directly after a permission group is deleted.
|
|
1668
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1764
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_permission_group_deleted Online documentation}
|
|
1669
1765
|
*/
|
|
1670
1766
|
interface OnPermissionGroupDeletedEvent extends EventData {
|
|
1671
1767
|
/**
|
|
@@ -1681,17 +1777,17 @@ declare module "factorio:runtime" {
|
|
|
1681
1777
|
*/
|
|
1682
1778
|
readonly id: uint32
|
|
1683
1779
|
/**
|
|
1684
|
-
* Identifier of the event
|
|
1780
|
+
* Identifier of the event.
|
|
1685
1781
|
*/
|
|
1686
1782
|
readonly name: typeof defines.events.on_permission_group_deleted
|
|
1687
1783
|
/**
|
|
1688
1784
|
* Tick the event was generated.
|
|
1689
1785
|
*/
|
|
1690
|
-
readonly tick:
|
|
1786
|
+
readonly tick: MapTick
|
|
1691
1787
|
}
|
|
1692
1788
|
/**
|
|
1693
1789
|
* Called directly after a permission group is edited in some way.
|
|
1694
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1790
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_permission_group_edited Online documentation}
|
|
1695
1791
|
*/
|
|
1696
1792
|
interface OnPermissionGroupEditedEvent extends EventData {
|
|
1697
1793
|
/**
|
|
@@ -1730,17 +1826,17 @@ declare module "factorio:runtime" {
|
|
|
1730
1826
|
*/
|
|
1731
1827
|
readonly new_name: string
|
|
1732
1828
|
/**
|
|
1733
|
-
* Identifier of the event
|
|
1829
|
+
* Identifier of the event.
|
|
1734
1830
|
*/
|
|
1735
1831
|
readonly name: typeof defines.events.on_permission_group_edited
|
|
1736
1832
|
/**
|
|
1737
1833
|
* Tick the event was generated.
|
|
1738
1834
|
*/
|
|
1739
|
-
readonly tick:
|
|
1835
|
+
readonly tick: MapTick
|
|
1740
1836
|
}
|
|
1741
1837
|
/**
|
|
1742
1838
|
* Called directly after a permission string is imported.
|
|
1743
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1839
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_permission_string_imported Online documentation}
|
|
1744
1840
|
*/
|
|
1745
1841
|
interface OnPermissionStringImportedEvent extends EventData {
|
|
1746
1842
|
/**
|
|
@@ -1748,33 +1844,33 @@ declare module "factorio:runtime" {
|
|
|
1748
1844
|
*/
|
|
1749
1845
|
readonly player_index: PlayerIndex
|
|
1750
1846
|
/**
|
|
1751
|
-
* Identifier of the event
|
|
1847
|
+
* Identifier of the event.
|
|
1752
1848
|
*/
|
|
1753
1849
|
readonly name: typeof defines.events.on_permission_string_imported
|
|
1754
1850
|
/**
|
|
1755
1851
|
* Tick the event was generated.
|
|
1756
1852
|
*/
|
|
1757
|
-
readonly tick:
|
|
1853
|
+
readonly tick: MapTick
|
|
1758
1854
|
}
|
|
1759
1855
|
/**
|
|
1760
1856
|
* Called when a player picks up an item.
|
|
1761
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1857
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_picked_up_item Online documentation}
|
|
1762
1858
|
*/
|
|
1763
1859
|
interface OnPickedUpItemEvent extends EventData {
|
|
1764
1860
|
readonly item_stack: ItemWithQualityCount
|
|
1765
1861
|
readonly player_index: PlayerIndex
|
|
1766
1862
|
/**
|
|
1767
|
-
* Identifier of the event
|
|
1863
|
+
* Identifier of the event.
|
|
1768
1864
|
*/
|
|
1769
1865
|
readonly name: typeof defines.events.on_picked_up_item
|
|
1770
1866
|
/**
|
|
1771
1867
|
* Tick the event was generated.
|
|
1772
1868
|
*/
|
|
1773
|
-
readonly tick:
|
|
1869
|
+
readonly tick: MapTick
|
|
1774
1870
|
}
|
|
1775
1871
|
/**
|
|
1776
1872
|
* Called after a player alt-reverse-selects an area with a selection-tool item.
|
|
1777
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1873
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_alt_reverse_selected_area Online documentation}
|
|
1778
1874
|
*/
|
|
1779
1875
|
interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
|
|
1780
1876
|
/**
|
|
@@ -1802,17 +1898,17 @@ declare module "factorio:runtime" {
|
|
|
1802
1898
|
*/
|
|
1803
1899
|
readonly tiles: LuaTile[]
|
|
1804
1900
|
/**
|
|
1805
|
-
* Identifier of the event
|
|
1901
|
+
* Identifier of the event.
|
|
1806
1902
|
*/
|
|
1807
1903
|
readonly name: typeof defines.events.on_player_alt_reverse_selected_area
|
|
1808
1904
|
/**
|
|
1809
1905
|
* Tick the event was generated.
|
|
1810
1906
|
*/
|
|
1811
|
-
readonly tick:
|
|
1907
|
+
readonly tick: MapTick
|
|
1812
1908
|
}
|
|
1813
1909
|
/**
|
|
1814
1910
|
* Called after a player alt-selects an area with a selection-tool item.
|
|
1815
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1911
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_alt_selected_area Online documentation}
|
|
1816
1912
|
*/
|
|
1817
1913
|
interface OnPlayerAltSelectedAreaEvent extends EventData {
|
|
1818
1914
|
/**
|
|
@@ -1844,47 +1940,47 @@ declare module "factorio:runtime" {
|
|
|
1844
1940
|
*/
|
|
1845
1941
|
readonly tiles: LuaTile[]
|
|
1846
1942
|
/**
|
|
1847
|
-
* Identifier of the event
|
|
1943
|
+
* Identifier of the event.
|
|
1848
1944
|
*/
|
|
1849
1945
|
readonly name: typeof defines.events.on_player_alt_selected_area
|
|
1850
1946
|
/**
|
|
1851
1947
|
* Tick the event was generated.
|
|
1852
1948
|
*/
|
|
1853
|
-
readonly tick:
|
|
1949
|
+
readonly tick: MapTick
|
|
1854
1950
|
}
|
|
1855
1951
|
/**
|
|
1856
1952
|
* Called after a players ammo inventory changed in some way.
|
|
1857
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1953
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_ammo_inventory_changed Online documentation}
|
|
1858
1954
|
*/
|
|
1859
1955
|
interface OnPlayerAmmoInventoryChangedEvent extends EventData {
|
|
1860
1956
|
readonly player_index: PlayerIndex
|
|
1861
1957
|
/**
|
|
1862
|
-
* Identifier of the event
|
|
1958
|
+
* Identifier of the event.
|
|
1863
1959
|
*/
|
|
1864
1960
|
readonly name: typeof defines.events.on_player_ammo_inventory_changed
|
|
1865
1961
|
/**
|
|
1866
1962
|
* Tick the event was generated.
|
|
1867
1963
|
*/
|
|
1868
|
-
readonly tick:
|
|
1964
|
+
readonly tick: MapTick
|
|
1869
1965
|
}
|
|
1870
1966
|
/**
|
|
1871
1967
|
* Called after a players armor inventory changed in some way.
|
|
1872
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1968
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_armor_inventory_changed Online documentation}
|
|
1873
1969
|
*/
|
|
1874
1970
|
interface OnPlayerArmorInventoryChangedEvent extends EventData {
|
|
1875
1971
|
readonly player_index: PlayerIndex
|
|
1876
1972
|
/**
|
|
1877
|
-
* Identifier of the event
|
|
1973
|
+
* Identifier of the event.
|
|
1878
1974
|
*/
|
|
1879
1975
|
readonly name: typeof defines.events.on_player_armor_inventory_changed
|
|
1880
1976
|
/**
|
|
1881
1977
|
* Tick the event was generated.
|
|
1882
1978
|
*/
|
|
1883
|
-
readonly tick:
|
|
1979
|
+
readonly tick: MapTick
|
|
1884
1980
|
}
|
|
1885
1981
|
/**
|
|
1886
1982
|
* Called when a player is banned.
|
|
1887
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
1983
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_banned Online documentation}
|
|
1888
1984
|
*/
|
|
1889
1985
|
interface OnPlayerBannedEvent extends EventData {
|
|
1890
1986
|
/**
|
|
@@ -1904,17 +2000,17 @@ declare module "factorio:runtime" {
|
|
|
1904
2000
|
*/
|
|
1905
2001
|
readonly reason?: string
|
|
1906
2002
|
/**
|
|
1907
|
-
* Identifier of the event
|
|
2003
|
+
* Identifier of the event.
|
|
1908
2004
|
*/
|
|
1909
2005
|
readonly name: typeof defines.events.on_player_banned
|
|
1910
2006
|
/**
|
|
1911
2007
|
* Tick the event was generated.
|
|
1912
2008
|
*/
|
|
1913
|
-
readonly tick:
|
|
2009
|
+
readonly tick: MapTick
|
|
1914
2010
|
}
|
|
1915
2011
|
/**
|
|
1916
2012
|
* Called after a player builds tiles.
|
|
1917
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2013
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_built_tile Online documentation}
|
|
1918
2014
|
*/
|
|
1919
2015
|
interface OnPlayerBuiltTileEvent extends EventData {
|
|
1920
2016
|
readonly player_index: PlayerIndex
|
|
@@ -1943,17 +2039,17 @@ declare module "factorio:runtime" {
|
|
|
1943
2039
|
*/
|
|
1944
2040
|
readonly inventory?: LuaInventory
|
|
1945
2041
|
/**
|
|
1946
|
-
* Identifier of the event
|
|
2042
|
+
* Identifier of the event.
|
|
1947
2043
|
*/
|
|
1948
2044
|
readonly name: typeof defines.events.on_player_built_tile
|
|
1949
2045
|
/**
|
|
1950
2046
|
* Tick the event was generated.
|
|
1951
2047
|
*/
|
|
1952
|
-
readonly tick:
|
|
2048
|
+
readonly tick: MapTick
|
|
1953
2049
|
}
|
|
1954
2050
|
/**
|
|
1955
2051
|
* Called when a player cancels crafting.
|
|
1956
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2052
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_cancelled_crafting Online documentation}
|
|
1957
2053
|
*/
|
|
1958
2054
|
interface OnPlayerCancelledCraftingEvent extends EventData {
|
|
1959
2055
|
/**
|
|
@@ -1973,17 +2069,17 @@ declare module "factorio:runtime" {
|
|
|
1973
2069
|
*/
|
|
1974
2070
|
readonly cancel_count: uint32
|
|
1975
2071
|
/**
|
|
1976
|
-
* Identifier of the event
|
|
2072
|
+
* Identifier of the event.
|
|
1977
2073
|
*/
|
|
1978
2074
|
readonly name: typeof defines.events.on_player_cancelled_crafting
|
|
1979
2075
|
/**
|
|
1980
2076
|
* Tick the event was generated.
|
|
1981
2077
|
*/
|
|
1982
|
-
readonly tick:
|
|
2078
|
+
readonly tick: MapTick
|
|
1983
2079
|
}
|
|
1984
2080
|
/**
|
|
1985
2081
|
* Called after a player changes forces.
|
|
1986
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2082
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_changed_force Online documentation}
|
|
1987
2083
|
*/
|
|
1988
2084
|
interface OnPlayerChangedForceEvent extends EventData {
|
|
1989
2085
|
/**
|
|
@@ -1995,17 +2091,17 @@ declare module "factorio:runtime" {
|
|
|
1995
2091
|
*/
|
|
1996
2092
|
readonly force: LuaForce
|
|
1997
2093
|
/**
|
|
1998
|
-
* Identifier of the event
|
|
2094
|
+
* Identifier of the event.
|
|
1999
2095
|
*/
|
|
2000
2096
|
readonly name: typeof defines.events.on_player_changed_force
|
|
2001
2097
|
/**
|
|
2002
2098
|
* Tick the event was generated.
|
|
2003
2099
|
*/
|
|
2004
|
-
readonly tick:
|
|
2100
|
+
readonly tick: MapTick
|
|
2005
2101
|
}
|
|
2006
2102
|
/**
|
|
2007
2103
|
* Called when the tile position a player is located at changes.
|
|
2008
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2104
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_changed_position Online documentation}
|
|
2009
2105
|
*/
|
|
2010
2106
|
interface OnPlayerChangedPositionEvent extends EventData {
|
|
2011
2107
|
/**
|
|
@@ -2013,17 +2109,17 @@ declare module "factorio:runtime" {
|
|
|
2013
2109
|
*/
|
|
2014
2110
|
readonly player_index: PlayerIndex
|
|
2015
2111
|
/**
|
|
2016
|
-
* Identifier of the event
|
|
2112
|
+
* Identifier of the event.
|
|
2017
2113
|
*/
|
|
2018
2114
|
readonly name: typeof defines.events.on_player_changed_position
|
|
2019
2115
|
/**
|
|
2020
2116
|
* Tick the event was generated.
|
|
2021
2117
|
*/
|
|
2022
|
-
readonly tick:
|
|
2118
|
+
readonly tick: MapTick
|
|
2023
2119
|
}
|
|
2024
2120
|
/**
|
|
2025
2121
|
* Called after a player changes surfaces.
|
|
2026
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2122
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_changed_surface Online documentation}
|
|
2027
2123
|
*/
|
|
2028
2124
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
|
2029
2125
|
/**
|
|
@@ -2035,17 +2131,17 @@ declare module "factorio:runtime" {
|
|
|
2035
2131
|
*/
|
|
2036
2132
|
readonly surface_index?: SurfaceIndex
|
|
2037
2133
|
/**
|
|
2038
|
-
* Identifier of the event
|
|
2134
|
+
* Identifier of the event.
|
|
2039
2135
|
*/
|
|
2040
2136
|
readonly name: typeof defines.events.on_player_changed_surface
|
|
2041
2137
|
/**
|
|
2042
2138
|
* Tick the event was generated.
|
|
2043
2139
|
*/
|
|
2044
|
-
readonly tick:
|
|
2140
|
+
readonly tick: MapTick
|
|
2045
2141
|
}
|
|
2046
2142
|
/**
|
|
2047
2143
|
* Called when cheat mode is disabled on a player.
|
|
2048
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2144
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_cheat_mode_disabled Online documentation}
|
|
2049
2145
|
*/
|
|
2050
2146
|
interface OnPlayerCheatModeDisabledEvent extends EventData {
|
|
2051
2147
|
/**
|
|
@@ -2053,17 +2149,17 @@ declare module "factorio:runtime" {
|
|
|
2053
2149
|
*/
|
|
2054
2150
|
readonly player_index: PlayerIndex
|
|
2055
2151
|
/**
|
|
2056
|
-
* Identifier of the event
|
|
2152
|
+
* Identifier of the event.
|
|
2057
2153
|
*/
|
|
2058
2154
|
readonly name: typeof defines.events.on_player_cheat_mode_disabled
|
|
2059
2155
|
/**
|
|
2060
2156
|
* Tick the event was generated.
|
|
2061
2157
|
*/
|
|
2062
|
-
readonly tick:
|
|
2158
|
+
readonly tick: MapTick
|
|
2063
2159
|
}
|
|
2064
2160
|
/**
|
|
2065
2161
|
* Called when cheat mode is enabled on a player.
|
|
2066
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2162
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_cheat_mode_enabled Online documentation}
|
|
2067
2163
|
*/
|
|
2068
2164
|
interface OnPlayerCheatModeEnabledEvent extends EventData {
|
|
2069
2165
|
/**
|
|
@@ -2071,17 +2167,17 @@ declare module "factorio:runtime" {
|
|
|
2071
2167
|
*/
|
|
2072
2168
|
readonly player_index: PlayerIndex
|
|
2073
2169
|
/**
|
|
2074
|
-
* Identifier of the event
|
|
2170
|
+
* Identifier of the event.
|
|
2075
2171
|
*/
|
|
2076
2172
|
readonly name: typeof defines.events.on_player_cheat_mode_enabled
|
|
2077
2173
|
/**
|
|
2078
2174
|
* Tick the event was generated.
|
|
2079
2175
|
*/
|
|
2080
|
-
readonly tick:
|
|
2176
|
+
readonly tick: MapTick
|
|
2081
2177
|
}
|
|
2082
2178
|
/**
|
|
2083
2179
|
* Called when a player clicks a gps tag
|
|
2084
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2180
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_clicked_gps_tag Online documentation}
|
|
2085
2181
|
*/
|
|
2086
2182
|
interface OnPlayerClickedGpsTagEvent extends EventData {
|
|
2087
2183
|
/**
|
|
@@ -2097,17 +2193,47 @@ declare module "factorio:runtime" {
|
|
|
2097
2193
|
*/
|
|
2098
2194
|
readonly surface: string
|
|
2099
2195
|
/**
|
|
2100
|
-
* Identifier of the event
|
|
2196
|
+
* Identifier of the event.
|
|
2101
2197
|
*/
|
|
2102
2198
|
readonly name: typeof defines.events.on_player_clicked_gps_tag
|
|
2103
2199
|
/**
|
|
2104
2200
|
* Tick the event was generated.
|
|
2105
2201
|
*/
|
|
2106
|
-
readonly tick:
|
|
2202
|
+
readonly tick: MapTick
|
|
2203
|
+
}
|
|
2204
|
+
/**
|
|
2205
|
+
* Called after a player's color changes.
|
|
2206
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_color_changed Online documentation}
|
|
2207
|
+
*/
|
|
2208
|
+
interface OnPlayerColorChangedEvent extends EventData {
|
|
2209
|
+
/**
|
|
2210
|
+
* The player whose color changed.
|
|
2211
|
+
*/
|
|
2212
|
+
readonly player_index: PlayerIndex
|
|
2213
|
+
/**
|
|
2214
|
+
* The old color.
|
|
2215
|
+
*/
|
|
2216
|
+
readonly old_color: Color
|
|
2217
|
+
/**
|
|
2218
|
+
* The old chat color.
|
|
2219
|
+
*/
|
|
2220
|
+
readonly old_chat_color: Color
|
|
2221
|
+
/**
|
|
2222
|
+
* If the change was done by script or the player.
|
|
2223
|
+
*/
|
|
2224
|
+
readonly by_script: boolean
|
|
2225
|
+
/**
|
|
2226
|
+
* Identifier of the event.
|
|
2227
|
+
*/
|
|
2228
|
+
readonly name: typeof defines.events.on_player_color_changed
|
|
2229
|
+
/**
|
|
2230
|
+
* Tick the event was generated.
|
|
2231
|
+
*/
|
|
2232
|
+
readonly tick: MapTick
|
|
2107
2233
|
}
|
|
2108
2234
|
/**
|
|
2109
2235
|
* Called when a player clicks the "confirm" button in the configure Blueprint GUI.
|
|
2110
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2236
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_configured_blueprint Online documentation}
|
|
2111
2237
|
*/
|
|
2112
2238
|
interface OnPlayerConfiguredBlueprintEvent extends EventData {
|
|
2113
2239
|
/**
|
|
@@ -2115,17 +2241,17 @@ declare module "factorio:runtime" {
|
|
|
2115
2241
|
*/
|
|
2116
2242
|
readonly player_index: PlayerIndex
|
|
2117
2243
|
/**
|
|
2118
|
-
* Identifier of the event
|
|
2244
|
+
* Identifier of the event.
|
|
2119
2245
|
*/
|
|
2120
2246
|
readonly name: typeof defines.events.on_player_configured_blueprint
|
|
2121
2247
|
/**
|
|
2122
2248
|
* Tick the event was generated.
|
|
2123
2249
|
*/
|
|
2124
|
-
readonly tick:
|
|
2250
|
+
readonly tick: MapTick
|
|
2125
2251
|
}
|
|
2126
2252
|
/**
|
|
2127
2253
|
* Called after a player changes controller types.
|
|
2128
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2254
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_controller_changed Online documentation}
|
|
2129
2255
|
*/
|
|
2130
2256
|
interface OnPlayerControllerChangedEvent extends EventData {
|
|
2131
2257
|
/**
|
|
@@ -2137,17 +2263,17 @@ declare module "factorio:runtime" {
|
|
|
2137
2263
|
*/
|
|
2138
2264
|
readonly old_type: defines.controllers
|
|
2139
2265
|
/**
|
|
2140
|
-
* Identifier of the event
|
|
2266
|
+
* Identifier of the event.
|
|
2141
2267
|
*/
|
|
2142
2268
|
readonly name: typeof defines.events.on_player_controller_changed
|
|
2143
2269
|
/**
|
|
2144
2270
|
* Tick the event was generated.
|
|
2145
2271
|
*/
|
|
2146
|
-
readonly tick:
|
|
2272
|
+
readonly tick: MapTick
|
|
2147
2273
|
}
|
|
2148
2274
|
/**
|
|
2149
2275
|
* 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}).
|
|
2150
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2276
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_crafted_item Online documentation}
|
|
2151
2277
|
*/
|
|
2152
2278
|
interface OnPlayerCraftedItemEvent extends EventData {
|
|
2153
2279
|
/**
|
|
@@ -2163,49 +2289,49 @@ declare module "factorio:runtime" {
|
|
|
2163
2289
|
*/
|
|
2164
2290
|
readonly recipe: LuaRecipe
|
|
2165
2291
|
/**
|
|
2166
|
-
* Identifier of the event
|
|
2292
|
+
* Identifier of the event.
|
|
2167
2293
|
*/
|
|
2168
2294
|
readonly name: typeof defines.events.on_player_crafted_item
|
|
2169
2295
|
/**
|
|
2170
2296
|
* Tick the event was generated.
|
|
2171
2297
|
*/
|
|
2172
|
-
readonly tick:
|
|
2298
|
+
readonly tick: MapTick
|
|
2173
2299
|
}
|
|
2174
2300
|
/**
|
|
2175
2301
|
* Called after the player was created.
|
|
2176
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2302
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_created Online documentation}
|
|
2177
2303
|
*/
|
|
2178
2304
|
interface OnPlayerCreatedEvent extends EventData {
|
|
2179
2305
|
readonly player_index: PlayerIndex
|
|
2180
2306
|
/**
|
|
2181
|
-
* Identifier of the event
|
|
2307
|
+
* Identifier of the event.
|
|
2182
2308
|
*/
|
|
2183
2309
|
readonly name: typeof defines.events.on_player_created
|
|
2184
2310
|
/**
|
|
2185
2311
|
* Tick the event was generated.
|
|
2186
2312
|
*/
|
|
2187
|
-
readonly tick:
|
|
2313
|
+
readonly tick: MapTick
|
|
2188
2314
|
}
|
|
2189
2315
|
/**
|
|
2190
2316
|
* Called after a player's {@link LuaControl#cursor_stack cursor stack} changed in some way.
|
|
2191
2317
|
*
|
|
2192
2318
|
* This is fired in the same tick that the change happens, but not instantly.
|
|
2193
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2319
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_cursor_stack_changed Online documentation}
|
|
2194
2320
|
*/
|
|
2195
2321
|
interface OnPlayerCursorStackChangedEvent extends EventData {
|
|
2196
2322
|
readonly player_index: PlayerIndex
|
|
2197
2323
|
/**
|
|
2198
|
-
* Identifier of the event
|
|
2324
|
+
* Identifier of the event.
|
|
2199
2325
|
*/
|
|
2200
2326
|
readonly name: typeof defines.events.on_player_cursor_stack_changed
|
|
2201
2327
|
/**
|
|
2202
2328
|
* Tick the event was generated.
|
|
2203
2329
|
*/
|
|
2204
|
-
readonly tick:
|
|
2330
|
+
readonly tick: MapTick
|
|
2205
2331
|
}
|
|
2206
2332
|
/**
|
|
2207
2333
|
* Called when a player selects an area with a deconstruction planner.
|
|
2208
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2334
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_deconstructed_area Online documentation}
|
|
2209
2335
|
*/
|
|
2210
2336
|
interface OnPlayerDeconstructedAreaEvent extends EventData {
|
|
2211
2337
|
/**
|
|
@@ -2241,17 +2367,17 @@ declare module "factorio:runtime" {
|
|
|
2241
2367
|
*/
|
|
2242
2368
|
readonly alt: boolean
|
|
2243
2369
|
/**
|
|
2244
|
-
* Identifier of the event
|
|
2370
|
+
* Identifier of the event.
|
|
2245
2371
|
*/
|
|
2246
2372
|
readonly name: typeof defines.events.on_player_deconstructed_area
|
|
2247
2373
|
/**
|
|
2248
2374
|
* Tick the event was generated.
|
|
2249
2375
|
*/
|
|
2250
|
-
readonly tick:
|
|
2376
|
+
readonly tick: MapTick
|
|
2251
2377
|
}
|
|
2252
2378
|
/**
|
|
2253
2379
|
* Called when a player is demoted.
|
|
2254
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2380
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_demoted Online documentation}
|
|
2255
2381
|
*/
|
|
2256
2382
|
interface OnPlayerDemotedEvent extends EventData {
|
|
2257
2383
|
/**
|
|
@@ -2259,33 +2385,33 @@ declare module "factorio:runtime" {
|
|
|
2259
2385
|
*/
|
|
2260
2386
|
readonly player_index: PlayerIndex
|
|
2261
2387
|
/**
|
|
2262
|
-
* Identifier of the event
|
|
2388
|
+
* Identifier of the event.
|
|
2263
2389
|
*/
|
|
2264
2390
|
readonly name: typeof defines.events.on_player_demoted
|
|
2265
2391
|
/**
|
|
2266
2392
|
* Tick the event was generated.
|
|
2267
2393
|
*/
|
|
2268
|
-
readonly tick:
|
|
2394
|
+
readonly tick: MapTick
|
|
2269
2395
|
}
|
|
2270
2396
|
/**
|
|
2271
2397
|
* Called after a player dies.
|
|
2272
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2398
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_died Online documentation}
|
|
2273
2399
|
*/
|
|
2274
2400
|
interface OnPlayerDiedEvent extends EventData {
|
|
2275
2401
|
readonly player_index: PlayerIndex
|
|
2276
2402
|
readonly cause?: LuaEntity
|
|
2277
2403
|
/**
|
|
2278
|
-
* Identifier of the event
|
|
2404
|
+
* Identifier of the event.
|
|
2279
2405
|
*/
|
|
2280
2406
|
readonly name: typeof defines.events.on_player_died
|
|
2281
2407
|
/**
|
|
2282
2408
|
* Tick the event was generated.
|
|
2283
2409
|
*/
|
|
2284
|
-
readonly tick:
|
|
2410
|
+
readonly tick: MapTick
|
|
2285
2411
|
}
|
|
2286
2412
|
/**
|
|
2287
2413
|
* Called when the display density scale changes for a given player. The display density scale is the scale value automatically applied based on the player's display DPI. This is only relevant on platforms that support high-density displays.
|
|
2288
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2414
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_display_density_scale_changed Online documentation}
|
|
2289
2415
|
*/
|
|
2290
2416
|
interface OnPlayerDisplayDensityScaleChangedEvent extends EventData {
|
|
2291
2417
|
/**
|
|
@@ -2297,17 +2423,17 @@ declare module "factorio:runtime" {
|
|
|
2297
2423
|
*/
|
|
2298
2424
|
readonly old_scale: double
|
|
2299
2425
|
/**
|
|
2300
|
-
* Identifier of the event
|
|
2426
|
+
* Identifier of the event.
|
|
2301
2427
|
*/
|
|
2302
2428
|
readonly name: typeof defines.events.on_player_display_density_scale_changed
|
|
2303
2429
|
/**
|
|
2304
2430
|
* Tick the event was generated.
|
|
2305
2431
|
*/
|
|
2306
|
-
readonly tick:
|
|
2432
|
+
readonly tick: MapTick
|
|
2307
2433
|
}
|
|
2308
2434
|
/**
|
|
2309
2435
|
* Called when the display resolution changes for a given player.
|
|
2310
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2436
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_display_resolution_changed Online documentation}
|
|
2311
2437
|
*/
|
|
2312
2438
|
interface OnPlayerDisplayResolutionChangedEvent extends EventData {
|
|
2313
2439
|
/**
|
|
@@ -2319,17 +2445,17 @@ declare module "factorio:runtime" {
|
|
|
2319
2445
|
*/
|
|
2320
2446
|
readonly old_resolution: DisplayResolution
|
|
2321
2447
|
/**
|
|
2322
|
-
* Identifier of the event
|
|
2448
|
+
* Identifier of the event.
|
|
2323
2449
|
*/
|
|
2324
2450
|
readonly name: typeof defines.events.on_player_display_resolution_changed
|
|
2325
2451
|
/**
|
|
2326
2452
|
* Tick the event was generated.
|
|
2327
2453
|
*/
|
|
2328
|
-
readonly tick:
|
|
2454
|
+
readonly tick: MapTick
|
|
2329
2455
|
}
|
|
2330
2456
|
/**
|
|
2331
2457
|
* Called when the display scale changes for a given player.
|
|
2332
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2458
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_display_scale_changed Online documentation}
|
|
2333
2459
|
*/
|
|
2334
2460
|
interface OnPlayerDisplayScaleChangedEvent extends EventData {
|
|
2335
2461
|
/**
|
|
@@ -2341,19 +2467,19 @@ declare module "factorio:runtime" {
|
|
|
2341
2467
|
*/
|
|
2342
2468
|
readonly old_scale: double
|
|
2343
2469
|
/**
|
|
2344
|
-
* Identifier of the event
|
|
2470
|
+
* Identifier of the event.
|
|
2345
2471
|
*/
|
|
2346
2472
|
readonly name: typeof defines.events.on_player_display_scale_changed
|
|
2347
2473
|
/**
|
|
2348
2474
|
* Tick the event was generated.
|
|
2349
2475
|
*/
|
|
2350
|
-
readonly tick:
|
|
2476
|
+
readonly tick: MapTick
|
|
2351
2477
|
}
|
|
2352
2478
|
/**
|
|
2353
2479
|
* Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
|
|
2354
2480
|
*
|
|
2355
2481
|
* This event is not raised when the player is ejected from a vehicle due to it being destroyed.
|
|
2356
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2482
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_driving_changed_state Online documentation}
|
|
2357
2483
|
*/
|
|
2358
2484
|
interface OnPlayerDrivingChangedStateEvent extends EventData {
|
|
2359
2485
|
readonly player_index: PlayerIndex
|
|
@@ -2362,17 +2488,17 @@ declare module "factorio:runtime" {
|
|
|
2362
2488
|
*/
|
|
2363
2489
|
readonly entity?: LuaEntity
|
|
2364
2490
|
/**
|
|
2365
|
-
* Identifier of the event
|
|
2491
|
+
* Identifier of the event.
|
|
2366
2492
|
*/
|
|
2367
2493
|
readonly name: typeof defines.events.on_player_driving_changed_state
|
|
2368
2494
|
/**
|
|
2369
2495
|
* Tick the event was generated.
|
|
2370
2496
|
*/
|
|
2371
|
-
readonly tick:
|
|
2497
|
+
readonly tick: MapTick
|
|
2372
2498
|
}
|
|
2373
2499
|
/**
|
|
2374
2500
|
* Called when a player drops an item on the ground.
|
|
2375
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2501
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_dropped_item Online documentation}
|
|
2376
2502
|
*/
|
|
2377
2503
|
interface OnPlayerDroppedItemEvent extends EventData {
|
|
2378
2504
|
readonly player_index: PlayerIndex
|
|
@@ -2381,17 +2507,17 @@ declare module "factorio:runtime" {
|
|
|
2381
2507
|
*/
|
|
2382
2508
|
readonly entity: LuaEntity
|
|
2383
2509
|
/**
|
|
2384
|
-
* Identifier of the event
|
|
2510
|
+
* Identifier of the event.
|
|
2385
2511
|
*/
|
|
2386
2512
|
readonly name: typeof defines.events.on_player_dropped_item
|
|
2387
2513
|
/**
|
|
2388
2514
|
* Tick the event was generated.
|
|
2389
2515
|
*/
|
|
2390
|
-
readonly tick:
|
|
2516
|
+
readonly tick: MapTick
|
|
2391
2517
|
}
|
|
2392
2518
|
/**
|
|
2393
2519
|
* Called when a player drops a single item into an entity.
|
|
2394
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2520
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_dropped_item_into_entity Online documentation}
|
|
2395
2521
|
*/
|
|
2396
2522
|
interface OnPlayerDroppedItemIntoEntityEvent extends EventData {
|
|
2397
2523
|
readonly player_index: PlayerIndex
|
|
@@ -2400,17 +2526,17 @@ declare module "factorio:runtime" {
|
|
|
2400
2526
|
*/
|
|
2401
2527
|
readonly entity: LuaEntity
|
|
2402
2528
|
/**
|
|
2403
|
-
* Identifier of the event
|
|
2529
|
+
* Identifier of the event.
|
|
2404
2530
|
*/
|
|
2405
2531
|
readonly name: typeof defines.events.on_player_dropped_item_into_entity
|
|
2406
2532
|
/**
|
|
2407
2533
|
* Tick the event was generated.
|
|
2408
2534
|
*/
|
|
2409
|
-
readonly tick:
|
|
2535
|
+
readonly tick: MapTick
|
|
2410
2536
|
}
|
|
2411
2537
|
/**
|
|
2412
2538
|
* Called when a player fast-transfers something to or from an entity.
|
|
2413
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2539
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_fast_transferred Online documentation}
|
|
2414
2540
|
*/
|
|
2415
2541
|
interface OnPlayerFastTransferredEvent extends EventData {
|
|
2416
2542
|
/**
|
|
@@ -2430,19 +2556,19 @@ declare module "factorio:runtime" {
|
|
|
2430
2556
|
*/
|
|
2431
2557
|
readonly is_split: boolean
|
|
2432
2558
|
/**
|
|
2433
|
-
* Identifier of the event
|
|
2559
|
+
* Identifier of the event.
|
|
2434
2560
|
*/
|
|
2435
2561
|
readonly name: typeof defines.events.on_player_fast_transferred
|
|
2436
2562
|
/**
|
|
2437
2563
|
* Tick the event was generated.
|
|
2438
2564
|
*/
|
|
2439
|
-
readonly tick:
|
|
2565
|
+
readonly tick: MapTick
|
|
2440
2566
|
}
|
|
2441
2567
|
/**
|
|
2442
2568
|
* Called when the player flips an entity. This event is only fired when the entity actually changes its orientation or mirroring, so it won't be triggered when pressing the flip keys on an entity that can't be flipped.
|
|
2443
2569
|
*
|
|
2444
2570
|
* This event reflects a change in the {@link LuaEntity#mirroring LuaEntity::mirroring} property.
|
|
2445
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2571
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_flipped_entity Online documentation}
|
|
2446
2572
|
*/
|
|
2447
2573
|
interface OnPlayerFlippedEntityEvent extends EventData {
|
|
2448
2574
|
/**
|
|
@@ -2455,17 +2581,17 @@ declare module "factorio:runtime" {
|
|
|
2455
2581
|
readonly horizontal: boolean
|
|
2456
2582
|
readonly player_index: PlayerIndex
|
|
2457
2583
|
/**
|
|
2458
|
-
* Identifier of the event
|
|
2584
|
+
* Identifier of the event.
|
|
2459
2585
|
*/
|
|
2460
2586
|
readonly name: typeof defines.events.on_player_flipped_entity
|
|
2461
2587
|
/**
|
|
2462
2588
|
* Tick the event was generated.
|
|
2463
2589
|
*/
|
|
2464
|
-
readonly tick:
|
|
2590
|
+
readonly tick: MapTick
|
|
2465
2591
|
}
|
|
2466
2592
|
/**
|
|
2467
2593
|
* Called after player flushed fluid
|
|
2468
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2594
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_flushed_fluid Online documentation}
|
|
2469
2595
|
*/
|
|
2470
2596
|
interface OnPlayerFlushedFluidEvent extends EventData {
|
|
2471
2597
|
/**
|
|
@@ -2489,32 +2615,32 @@ declare module "factorio:runtime" {
|
|
|
2489
2615
|
*/
|
|
2490
2616
|
readonly only_this_entity: boolean
|
|
2491
2617
|
/**
|
|
2492
|
-
* Identifier of the event
|
|
2618
|
+
* Identifier of the event.
|
|
2493
2619
|
*/
|
|
2494
2620
|
readonly name: typeof defines.events.on_player_flushed_fluid
|
|
2495
2621
|
/**
|
|
2496
2622
|
* Tick the event was generated.
|
|
2497
2623
|
*/
|
|
2498
|
-
readonly tick:
|
|
2624
|
+
readonly tick: MapTick
|
|
2499
2625
|
}
|
|
2500
2626
|
/**
|
|
2501
2627
|
* Called after a players gun inventory changed in some way.
|
|
2502
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2628
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_gun_inventory_changed Online documentation}
|
|
2503
2629
|
*/
|
|
2504
2630
|
interface OnPlayerGunInventoryChangedEvent extends EventData {
|
|
2505
2631
|
readonly player_index: PlayerIndex
|
|
2506
2632
|
/**
|
|
2507
|
-
* Identifier of the event
|
|
2633
|
+
* Identifier of the event.
|
|
2508
2634
|
*/
|
|
2509
2635
|
readonly name: typeof defines.events.on_player_gun_inventory_changed
|
|
2510
2636
|
/**
|
|
2511
2637
|
* Tick the event was generated.
|
|
2512
2638
|
*/
|
|
2513
|
-
readonly tick:
|
|
2639
|
+
readonly tick: MapTick
|
|
2514
2640
|
}
|
|
2515
2641
|
/**
|
|
2516
2642
|
* Called when a player's input method changes. See {@link LuaPlayer#input_method LuaPlayer::input_method}.
|
|
2517
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2643
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_input_method_changed Online documentation}
|
|
2518
2644
|
*/
|
|
2519
2645
|
interface OnPlayerInputMethodChangedEvent extends EventData {
|
|
2520
2646
|
/**
|
|
@@ -2522,32 +2648,32 @@ declare module "factorio:runtime" {
|
|
|
2522
2648
|
*/
|
|
2523
2649
|
readonly player_index: PlayerIndex
|
|
2524
2650
|
/**
|
|
2525
|
-
* Identifier of the event
|
|
2651
|
+
* Identifier of the event.
|
|
2526
2652
|
*/
|
|
2527
2653
|
readonly name: typeof defines.events.on_player_input_method_changed
|
|
2528
2654
|
/**
|
|
2529
2655
|
* Tick the event was generated.
|
|
2530
2656
|
*/
|
|
2531
|
-
readonly tick:
|
|
2657
|
+
readonly tick: MapTick
|
|
2532
2658
|
}
|
|
2533
2659
|
/**
|
|
2534
2660
|
* Called after a player joins the game. This is not called when loading a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
|
|
2535
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2661
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_joined_game Online documentation}
|
|
2536
2662
|
*/
|
|
2537
2663
|
interface OnPlayerJoinedGameEvent extends EventData {
|
|
2538
2664
|
readonly player_index: PlayerIndex
|
|
2539
2665
|
/**
|
|
2540
|
-
* Identifier of the event
|
|
2666
|
+
* Identifier of the event.
|
|
2541
2667
|
*/
|
|
2542
2668
|
readonly name: typeof defines.events.on_player_joined_game
|
|
2543
2669
|
/**
|
|
2544
2670
|
* Tick the event was generated.
|
|
2545
2671
|
*/
|
|
2546
|
-
readonly tick:
|
|
2672
|
+
readonly tick: MapTick
|
|
2547
2673
|
}
|
|
2548
2674
|
/**
|
|
2549
2675
|
* Called when a player is kicked.
|
|
2550
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2676
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_kicked Online documentation}
|
|
2551
2677
|
*/
|
|
2552
2678
|
interface OnPlayerKickedEvent extends EventData {
|
|
2553
2679
|
/**
|
|
@@ -2563,33 +2689,33 @@ declare module "factorio:runtime" {
|
|
|
2563
2689
|
*/
|
|
2564
2690
|
readonly reason?: string
|
|
2565
2691
|
/**
|
|
2566
|
-
* Identifier of the event
|
|
2692
|
+
* Identifier of the event.
|
|
2567
2693
|
*/
|
|
2568
2694
|
readonly name: typeof defines.events.on_player_kicked
|
|
2569
2695
|
/**
|
|
2570
2696
|
* Tick the event was generated.
|
|
2571
2697
|
*/
|
|
2572
|
-
readonly tick:
|
|
2698
|
+
readonly tick: MapTick
|
|
2573
2699
|
}
|
|
2574
2700
|
/**
|
|
2575
2701
|
* Called after a player leaves the game. This is not called when closing a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
|
|
2576
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2702
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_left_game Online documentation}
|
|
2577
2703
|
*/
|
|
2578
2704
|
interface OnPlayerLeftGameEvent extends EventData {
|
|
2579
2705
|
readonly player_index: PlayerIndex
|
|
2580
2706
|
readonly reason: defines.disconnect_reason
|
|
2581
2707
|
/**
|
|
2582
|
-
* Identifier of the event
|
|
2708
|
+
* Identifier of the event.
|
|
2583
2709
|
*/
|
|
2584
2710
|
readonly name: typeof defines.events.on_player_left_game
|
|
2585
2711
|
/**
|
|
2586
2712
|
* Tick the event was generated.
|
|
2587
2713
|
*/
|
|
2588
|
-
readonly tick:
|
|
2714
|
+
readonly tick: MapTick
|
|
2589
2715
|
}
|
|
2590
2716
|
/**
|
|
2591
2717
|
* Called when a player's active locale changes. See {@link LuaPlayer#locale LuaPlayer::locale}.
|
|
2592
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2718
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_locale_changed Online documentation}
|
|
2593
2719
|
*/
|
|
2594
2720
|
interface OnPlayerLocaleChangedEvent extends EventData {
|
|
2595
2721
|
/**
|
|
@@ -2601,28 +2727,28 @@ declare module "factorio:runtime" {
|
|
|
2601
2727
|
*/
|
|
2602
2728
|
readonly old_locale: string
|
|
2603
2729
|
/**
|
|
2604
|
-
* Identifier of the event
|
|
2730
|
+
* Identifier of the event.
|
|
2605
2731
|
*/
|
|
2606
2732
|
readonly name: typeof defines.events.on_player_locale_changed
|
|
2607
2733
|
/**
|
|
2608
2734
|
* Tick the event was generated.
|
|
2609
2735
|
*/
|
|
2610
|
-
readonly tick:
|
|
2736
|
+
readonly tick: MapTick
|
|
2611
2737
|
}
|
|
2612
2738
|
/**
|
|
2613
2739
|
* Called after a players main inventory changed in some way.
|
|
2614
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2740
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_main_inventory_changed Online documentation}
|
|
2615
2741
|
*/
|
|
2616
2742
|
interface OnPlayerMainInventoryChangedEvent extends EventData {
|
|
2617
2743
|
readonly player_index: PlayerIndex
|
|
2618
2744
|
/**
|
|
2619
|
-
* Identifier of the event
|
|
2745
|
+
* Identifier of the event.
|
|
2620
2746
|
*/
|
|
2621
2747
|
readonly name: typeof defines.events.on_player_main_inventory_changed
|
|
2622
2748
|
/**
|
|
2623
2749
|
* Tick the event was generated.
|
|
2624
2750
|
*/
|
|
2625
|
-
readonly tick:
|
|
2751
|
+
readonly tick: MapTick
|
|
2626
2752
|
}
|
|
2627
2753
|
/**
|
|
2628
2754
|
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
|
@@ -2632,7 +2758,7 @@ declare module "factorio:runtime" {
|
|
|
2632
2758
|
* 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.
|
|
2633
2759
|
*
|
|
2634
2760
|
* Event filter: [LuaPlayerMinedEntityEventFilter](LuaPlayerMinedEntityEventFilter]
|
|
2635
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2761
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_mined_entity Online documentation}
|
|
2636
2762
|
*/
|
|
2637
2763
|
interface OnPlayerMinedEntityEvent extends EventData {
|
|
2638
2764
|
/**
|
|
@@ -2648,17 +2774,17 @@ declare module "factorio:runtime" {
|
|
|
2648
2774
|
*/
|
|
2649
2775
|
readonly buffer: LuaInventory
|
|
2650
2776
|
/**
|
|
2651
|
-
* Identifier of the event
|
|
2777
|
+
* Identifier of the event.
|
|
2652
2778
|
*/
|
|
2653
2779
|
readonly name: typeof defines.events.on_player_mined_entity
|
|
2654
2780
|
/**
|
|
2655
2781
|
* Tick the event was generated.
|
|
2656
2782
|
*/
|
|
2657
|
-
readonly tick:
|
|
2783
|
+
readonly tick: MapTick
|
|
2658
2784
|
}
|
|
2659
2785
|
/**
|
|
2660
2786
|
* Called when the player mines something.
|
|
2661
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2787
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_mined_item Online documentation}
|
|
2662
2788
|
*/
|
|
2663
2789
|
interface OnPlayerMinedItemEvent extends EventData {
|
|
2664
2790
|
/**
|
|
@@ -2667,17 +2793,17 @@ declare module "factorio:runtime" {
|
|
|
2667
2793
|
readonly item_stack: ItemWithQualityCount
|
|
2668
2794
|
readonly player_index: PlayerIndex
|
|
2669
2795
|
/**
|
|
2670
|
-
* Identifier of the event
|
|
2796
|
+
* Identifier of the event.
|
|
2671
2797
|
*/
|
|
2672
2798
|
readonly name: typeof defines.events.on_player_mined_item
|
|
2673
2799
|
/**
|
|
2674
2800
|
* Tick the event was generated.
|
|
2675
2801
|
*/
|
|
2676
|
-
readonly tick:
|
|
2802
|
+
readonly tick: MapTick
|
|
2677
2803
|
}
|
|
2678
2804
|
/**
|
|
2679
2805
|
* Called after a player mines tiles.
|
|
2680
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2806
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_mined_tile Online documentation}
|
|
2681
2807
|
*/
|
|
2682
2808
|
interface OnPlayerMinedTileEvent extends EventData {
|
|
2683
2809
|
readonly player_index: PlayerIndex
|
|
@@ -2690,17 +2816,35 @@ declare module "factorio:runtime" {
|
|
|
2690
2816
|
*/
|
|
2691
2817
|
readonly tiles: OldTileAndPosition[]
|
|
2692
2818
|
/**
|
|
2693
|
-
* Identifier of the event
|
|
2819
|
+
* Identifier of the event.
|
|
2694
2820
|
*/
|
|
2695
2821
|
readonly name: typeof defines.events.on_player_mined_tile
|
|
2696
2822
|
/**
|
|
2697
2823
|
* Tick the event was generated.
|
|
2698
2824
|
*/
|
|
2699
|
-
readonly tick:
|
|
2825
|
+
readonly tick: MapTick
|
|
2826
|
+
}
|
|
2827
|
+
/**
|
|
2828
|
+
* Called when a player's current music track (ambient sound) changes. This includes when the music track finishes playing.
|
|
2829
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_music_changed Online documentation}
|
|
2830
|
+
*/
|
|
2831
|
+
interface OnPlayerMusicChangedEvent extends EventData {
|
|
2832
|
+
/**
|
|
2833
|
+
* The player whose current music has changed.
|
|
2834
|
+
*/
|
|
2835
|
+
readonly player_index: PlayerIndex
|
|
2836
|
+
/**
|
|
2837
|
+
* Identifier of the event.
|
|
2838
|
+
*/
|
|
2839
|
+
readonly name: typeof defines.events.on_player_music_changed
|
|
2840
|
+
/**
|
|
2841
|
+
* Tick the event was generated.
|
|
2842
|
+
*/
|
|
2843
|
+
readonly tick: MapTick
|
|
2700
2844
|
}
|
|
2701
2845
|
/**
|
|
2702
2846
|
* Called when a player is muted.
|
|
2703
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2847
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_muted Online documentation}
|
|
2704
2848
|
*/
|
|
2705
2849
|
interface OnPlayerMutedEvent extends EventData {
|
|
2706
2850
|
/**
|
|
@@ -2708,17 +2852,17 @@ declare module "factorio:runtime" {
|
|
|
2708
2852
|
*/
|
|
2709
2853
|
readonly player_index: PlayerIndex
|
|
2710
2854
|
/**
|
|
2711
|
-
* Identifier of the event
|
|
2855
|
+
* Identifier of the event.
|
|
2712
2856
|
*/
|
|
2713
2857
|
readonly name: typeof defines.events.on_player_muted
|
|
2714
2858
|
/**
|
|
2715
2859
|
* Tick the event was generated.
|
|
2716
2860
|
*/
|
|
2717
|
-
readonly tick:
|
|
2861
|
+
readonly tick: MapTick
|
|
2718
2862
|
}
|
|
2719
2863
|
/**
|
|
2720
2864
|
* Called when a player invokes the "smart pipette" over an entity.
|
|
2721
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2865
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_pipette Online documentation}
|
|
2722
2866
|
*/
|
|
2723
2867
|
interface OnPlayerPipetteEvent extends EventData {
|
|
2724
2868
|
/**
|
|
@@ -2738,17 +2882,17 @@ declare module "factorio:runtime" {
|
|
|
2738
2882
|
*/
|
|
2739
2883
|
readonly used_cheat_mode: boolean
|
|
2740
2884
|
/**
|
|
2741
|
-
* Identifier of the event
|
|
2885
|
+
* Identifier of the event.
|
|
2742
2886
|
*/
|
|
2743
2887
|
readonly name: typeof defines.events.on_player_pipette
|
|
2744
2888
|
/**
|
|
2745
2889
|
* Tick the event was generated.
|
|
2746
2890
|
*/
|
|
2747
|
-
readonly tick:
|
|
2891
|
+
readonly tick: MapTick
|
|
2748
2892
|
}
|
|
2749
2893
|
/**
|
|
2750
2894
|
* Called after the player puts equipment in an equipment grid
|
|
2751
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2895
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_placed_equipment Online documentation}
|
|
2752
2896
|
*/
|
|
2753
2897
|
interface OnPlayerPlacedEquipmentEvent extends EventData {
|
|
2754
2898
|
readonly player_index: PlayerIndex
|
|
@@ -2761,17 +2905,17 @@ declare module "factorio:runtime" {
|
|
|
2761
2905
|
*/
|
|
2762
2906
|
readonly grid: LuaEquipmentGrid
|
|
2763
2907
|
/**
|
|
2764
|
-
* Identifier of the event
|
|
2908
|
+
* Identifier of the event.
|
|
2765
2909
|
*/
|
|
2766
2910
|
readonly name: typeof defines.events.on_player_placed_equipment
|
|
2767
2911
|
/**
|
|
2768
2912
|
* Tick the event was generated.
|
|
2769
2913
|
*/
|
|
2770
|
-
readonly tick:
|
|
2914
|
+
readonly tick: MapTick
|
|
2771
2915
|
}
|
|
2772
2916
|
/**
|
|
2773
2917
|
* Called when a player is promoted.
|
|
2774
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2918
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_promoted Online documentation}
|
|
2775
2919
|
*/
|
|
2776
2920
|
interface OnPlayerPromotedEvent extends EventData {
|
|
2777
2921
|
/**
|
|
@@ -2779,17 +2923,17 @@ declare module "factorio:runtime" {
|
|
|
2779
2923
|
*/
|
|
2780
2924
|
readonly player_index: PlayerIndex
|
|
2781
2925
|
/**
|
|
2782
|
-
* Identifier of the event
|
|
2926
|
+
* Identifier of the event.
|
|
2783
2927
|
*/
|
|
2784
2928
|
readonly name: typeof defines.events.on_player_promoted
|
|
2785
2929
|
/**
|
|
2786
2930
|
* Tick the event was generated.
|
|
2787
2931
|
*/
|
|
2788
|
-
readonly tick:
|
|
2932
|
+
readonly tick: MapTick
|
|
2789
2933
|
}
|
|
2790
2934
|
/**
|
|
2791
2935
|
* Called when a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link OnPlayerLeftGameEvent leaving} the game, and instead behaves like the player never existed in the save file.
|
|
2792
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2936
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_removed Online documentation}
|
|
2793
2937
|
*/
|
|
2794
2938
|
interface OnPlayerRemovedEvent extends EventData {
|
|
2795
2939
|
/**
|
|
@@ -2797,17 +2941,17 @@ declare module "factorio:runtime" {
|
|
|
2797
2941
|
*/
|
|
2798
2942
|
readonly player_index: PlayerIndex
|
|
2799
2943
|
/**
|
|
2800
|
-
* Identifier of the event
|
|
2944
|
+
* Identifier of the event.
|
|
2801
2945
|
*/
|
|
2802
2946
|
readonly name: typeof defines.events.on_player_removed
|
|
2803
2947
|
/**
|
|
2804
2948
|
* Tick the event was generated.
|
|
2805
2949
|
*/
|
|
2806
|
-
readonly tick:
|
|
2950
|
+
readonly tick: MapTick
|
|
2807
2951
|
}
|
|
2808
2952
|
/**
|
|
2809
2953
|
* Called after the player removes equipment from an equipment grid
|
|
2810
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2954
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_removed_equipment Online documentation}
|
|
2811
2955
|
*/
|
|
2812
2956
|
interface OnPlayerRemovedEquipmentEvent extends EventData {
|
|
2813
2957
|
readonly player_index: PlayerIndex
|
|
@@ -2828,35 +2972,35 @@ declare module "factorio:runtime" {
|
|
|
2828
2972
|
*/
|
|
2829
2973
|
readonly count: uint32
|
|
2830
2974
|
/**
|
|
2831
|
-
* Identifier of the event
|
|
2975
|
+
* Identifier of the event.
|
|
2832
2976
|
*/
|
|
2833
2977
|
readonly name: typeof defines.events.on_player_removed_equipment
|
|
2834
2978
|
/**
|
|
2835
2979
|
* Tick the event was generated.
|
|
2836
2980
|
*/
|
|
2837
|
-
readonly tick:
|
|
2981
|
+
readonly tick: MapTick
|
|
2838
2982
|
}
|
|
2839
2983
|
/**
|
|
2840
2984
|
* Called when a player repairs an entity.
|
|
2841
2985
|
*
|
|
2842
2986
|
* Event filter: [LuaPlayerRepairedEntityEventFilter](LuaPlayerRepairedEntityEventFilter]
|
|
2843
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
2987
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_repaired_entity Online documentation}
|
|
2844
2988
|
*/
|
|
2845
2989
|
interface OnPlayerRepairedEntityEvent extends EventData {
|
|
2846
2990
|
readonly player_index: PlayerIndex
|
|
2847
2991
|
readonly entity: LuaEntity
|
|
2848
2992
|
/**
|
|
2849
|
-
* Identifier of the event
|
|
2993
|
+
* Identifier of the event.
|
|
2850
2994
|
*/
|
|
2851
2995
|
readonly name: typeof defines.events.on_player_repaired_entity
|
|
2852
2996
|
/**
|
|
2853
2997
|
* Tick the event was generated.
|
|
2854
2998
|
*/
|
|
2855
|
-
readonly tick:
|
|
2999
|
+
readonly tick: MapTick
|
|
2856
3000
|
}
|
|
2857
3001
|
/**
|
|
2858
3002
|
* Called after a player respawns.
|
|
2859
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3003
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_respawned Online documentation}
|
|
2860
3004
|
*/
|
|
2861
3005
|
interface OnPlayerRespawnedEvent extends EventData {
|
|
2862
3006
|
readonly player_index: PlayerIndex
|
|
@@ -2865,17 +3009,17 @@ declare module "factorio:runtime" {
|
|
|
2865
3009
|
*/
|
|
2866
3010
|
readonly player_port?: LuaEntity
|
|
2867
3011
|
/**
|
|
2868
|
-
* Identifier of the event
|
|
3012
|
+
* Identifier of the event.
|
|
2869
3013
|
*/
|
|
2870
3014
|
readonly name: typeof defines.events.on_player_respawned
|
|
2871
3015
|
/**
|
|
2872
3016
|
* Tick the event was generated.
|
|
2873
3017
|
*/
|
|
2874
|
-
readonly tick:
|
|
3018
|
+
readonly tick: MapTick
|
|
2875
3019
|
}
|
|
2876
3020
|
/**
|
|
2877
3021
|
* Called after a player reverse-selects an area with a selection-tool item.
|
|
2878
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3022
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_reverse_selected_area Online documentation}
|
|
2879
3023
|
*/
|
|
2880
3024
|
interface OnPlayerReverseSelectedAreaEvent extends EventData {
|
|
2881
3025
|
/**
|
|
@@ -2903,19 +3047,19 @@ declare module "factorio:runtime" {
|
|
|
2903
3047
|
*/
|
|
2904
3048
|
readonly tiles: LuaTile[]
|
|
2905
3049
|
/**
|
|
2906
|
-
* Identifier of the event
|
|
3050
|
+
* Identifier of the event.
|
|
2907
3051
|
*/
|
|
2908
3052
|
readonly name: typeof defines.events.on_player_reverse_selected_area
|
|
2909
3053
|
/**
|
|
2910
3054
|
* Tick the event was generated.
|
|
2911
3055
|
*/
|
|
2912
|
-
readonly tick:
|
|
3056
|
+
readonly tick: MapTick
|
|
2913
3057
|
}
|
|
2914
3058
|
/**
|
|
2915
3059
|
* 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.
|
|
2916
3060
|
*
|
|
2917
3061
|
* Entities being flipped will not fire this event, even if the flip involves rotating. See {@link OnPlayerFlippedEntityEvent on_player_flipped_entity}.
|
|
2918
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3062
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_rotated_entity Online documentation}
|
|
2919
3063
|
*/
|
|
2920
3064
|
interface OnPlayerRotatedEntityEvent extends EventData {
|
|
2921
3065
|
/**
|
|
@@ -2926,19 +3070,20 @@ declare module "factorio:runtime" {
|
|
|
2926
3070
|
* The previous direction
|
|
2927
3071
|
*/
|
|
2928
3072
|
readonly previous_direction: defines.direction
|
|
3073
|
+
readonly previous_mirroring: boolean
|
|
2929
3074
|
readonly player_index: PlayerIndex
|
|
2930
3075
|
/**
|
|
2931
|
-
* Identifier of the event
|
|
3076
|
+
* Identifier of the event.
|
|
2932
3077
|
*/
|
|
2933
3078
|
readonly name: typeof defines.events.on_player_rotated_entity
|
|
2934
3079
|
/**
|
|
2935
3080
|
* Tick the event was generated.
|
|
2936
3081
|
*/
|
|
2937
|
-
readonly tick:
|
|
3082
|
+
readonly tick: MapTick
|
|
2938
3083
|
}
|
|
2939
3084
|
/**
|
|
2940
3085
|
* Called after a player selects an area with a selection-tool item.
|
|
2941
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3086
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_selected_area Online documentation}
|
|
2942
3087
|
*/
|
|
2943
3088
|
interface OnPlayerSelectedAreaEvent extends EventData {
|
|
2944
3089
|
/**
|
|
@@ -2970,32 +3115,32 @@ declare module "factorio:runtime" {
|
|
|
2970
3115
|
*/
|
|
2971
3116
|
readonly tiles: LuaTile[]
|
|
2972
3117
|
/**
|
|
2973
|
-
* Identifier of the event
|
|
3118
|
+
* Identifier of the event.
|
|
2974
3119
|
*/
|
|
2975
3120
|
readonly name: typeof defines.events.on_player_selected_area
|
|
2976
3121
|
/**
|
|
2977
3122
|
* Tick the event was generated.
|
|
2978
3123
|
*/
|
|
2979
|
-
readonly tick:
|
|
3124
|
+
readonly tick: MapTick
|
|
2980
3125
|
}
|
|
2981
3126
|
/**
|
|
2982
3127
|
* Called when a player sets a quickbar slot to anything (new value, or set to empty).
|
|
2983
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3128
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_set_quick_bar_slot Online documentation}
|
|
2984
3129
|
*/
|
|
2985
3130
|
interface OnPlayerSetQuickBarSlotEvent extends EventData {
|
|
2986
3131
|
readonly player_index: PlayerIndex
|
|
2987
3132
|
/**
|
|
2988
|
-
* Identifier of the event
|
|
3133
|
+
* Identifier of the event.
|
|
2989
3134
|
*/
|
|
2990
3135
|
readonly name: typeof defines.events.on_player_set_quick_bar_slot
|
|
2991
3136
|
/**
|
|
2992
3137
|
* Tick the event was generated.
|
|
2993
3138
|
*/
|
|
2994
|
-
readonly tick:
|
|
3139
|
+
readonly tick: MapTick
|
|
2995
3140
|
}
|
|
2996
3141
|
/**
|
|
2997
3142
|
* Called when a player selects an area with a blueprint.
|
|
2998
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3143
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_setup_blueprint Online documentation}
|
|
2999
3144
|
*/
|
|
3000
3145
|
interface OnPlayerSetupBlueprintEvent extends EventData {
|
|
3001
3146
|
/**
|
|
@@ -3019,7 +3164,7 @@ declare module "factorio:runtime" {
|
|
|
3019
3164
|
*/
|
|
3020
3165
|
readonly stack?: LuaItemStack
|
|
3021
3166
|
/**
|
|
3022
|
-
* The record that is being reassigned.
|
|
3167
|
+
* The record that is being reassigned. This blueprint record is writable even if it is in the "my blueprints" shelf.
|
|
3023
3168
|
*/
|
|
3024
3169
|
readonly record?: LuaRecord
|
|
3025
3170
|
/**
|
|
@@ -3035,17 +3180,17 @@ declare module "factorio:runtime" {
|
|
|
3035
3180
|
*/
|
|
3036
3181
|
readonly mapping: LuaLazyLoadedValue<Record<uint32, LuaEntity>>
|
|
3037
3182
|
/**
|
|
3038
|
-
* Identifier of the event
|
|
3183
|
+
* Identifier of the event.
|
|
3039
3184
|
*/
|
|
3040
3185
|
readonly name: typeof defines.events.on_player_setup_blueprint
|
|
3041
3186
|
/**
|
|
3042
3187
|
* Tick the event was generated.
|
|
3043
3188
|
*/
|
|
3044
|
-
readonly tick:
|
|
3189
|
+
readonly tick: MapTick
|
|
3045
3190
|
}
|
|
3046
3191
|
/**
|
|
3047
3192
|
* Called when a player toggles alt mode, also known as "show entity info".
|
|
3048
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3193
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_toggled_alt_mode Online documentation}
|
|
3049
3194
|
*/
|
|
3050
3195
|
interface OnPlayerToggledAltModeEvent extends EventData {
|
|
3051
3196
|
readonly player_index: PlayerIndex
|
|
@@ -3054,47 +3199,47 @@ declare module "factorio:runtime" {
|
|
|
3054
3199
|
*/
|
|
3055
3200
|
readonly alt_mode: boolean
|
|
3056
3201
|
/**
|
|
3057
|
-
* Identifier of the event
|
|
3202
|
+
* Identifier of the event.
|
|
3058
3203
|
*/
|
|
3059
3204
|
readonly name: typeof defines.events.on_player_toggled_alt_mode
|
|
3060
3205
|
/**
|
|
3061
3206
|
* Tick the event was generated.
|
|
3062
3207
|
*/
|
|
3063
|
-
readonly tick:
|
|
3208
|
+
readonly tick: MapTick
|
|
3064
3209
|
}
|
|
3065
3210
|
/**
|
|
3066
3211
|
* Called when a player toggles the map editor on or off.
|
|
3067
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3212
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_toggled_map_editor Online documentation}
|
|
3068
3213
|
*/
|
|
3069
3214
|
interface OnPlayerToggledMapEditorEvent extends EventData {
|
|
3070
3215
|
readonly player_index: PlayerIndex
|
|
3071
3216
|
/**
|
|
3072
|
-
* Identifier of the event
|
|
3217
|
+
* Identifier of the event.
|
|
3073
3218
|
*/
|
|
3074
3219
|
readonly name: typeof defines.events.on_player_toggled_map_editor
|
|
3075
3220
|
/**
|
|
3076
3221
|
* Tick the event was generated.
|
|
3077
3222
|
*/
|
|
3078
|
-
readonly tick:
|
|
3223
|
+
readonly tick: MapTick
|
|
3079
3224
|
}
|
|
3080
3225
|
/**
|
|
3081
3226
|
* Called after a players trash inventory changed in some way.
|
|
3082
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3227
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_trash_inventory_changed Online documentation}
|
|
3083
3228
|
*/
|
|
3084
3229
|
interface OnPlayerTrashInventoryChangedEvent extends EventData {
|
|
3085
3230
|
readonly player_index: PlayerIndex
|
|
3086
3231
|
/**
|
|
3087
|
-
* Identifier of the event
|
|
3232
|
+
* Identifier of the event.
|
|
3088
3233
|
*/
|
|
3089
3234
|
readonly name: typeof defines.events.on_player_trash_inventory_changed
|
|
3090
3235
|
/**
|
|
3091
3236
|
* Tick the event was generated.
|
|
3092
3237
|
*/
|
|
3093
|
-
readonly tick:
|
|
3238
|
+
readonly tick: MapTick
|
|
3094
3239
|
}
|
|
3095
3240
|
/**
|
|
3096
3241
|
* Called when a player is un-banned.
|
|
3097
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3242
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_unbanned Online documentation}
|
|
3098
3243
|
*/
|
|
3099
3244
|
interface OnPlayerUnbannedEvent extends EventData {
|
|
3100
3245
|
/**
|
|
@@ -3114,17 +3259,17 @@ declare module "factorio:runtime" {
|
|
|
3114
3259
|
*/
|
|
3115
3260
|
readonly reason?: string
|
|
3116
3261
|
/**
|
|
3117
|
-
* Identifier of the event
|
|
3262
|
+
* Identifier of the event.
|
|
3118
3263
|
*/
|
|
3119
3264
|
readonly name: typeof defines.events.on_player_unbanned
|
|
3120
3265
|
/**
|
|
3121
3266
|
* Tick the event was generated.
|
|
3122
3267
|
*/
|
|
3123
|
-
readonly tick:
|
|
3268
|
+
readonly tick: MapTick
|
|
3124
3269
|
}
|
|
3125
3270
|
/**
|
|
3126
3271
|
* Called when a player is unmuted.
|
|
3127
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3272
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_unmuted Online documentation}
|
|
3128
3273
|
*/
|
|
3129
3274
|
interface OnPlayerUnmutedEvent extends EventData {
|
|
3130
3275
|
/**
|
|
@@ -3132,17 +3277,17 @@ declare module "factorio:runtime" {
|
|
|
3132
3277
|
*/
|
|
3133
3278
|
readonly player_index: PlayerIndex
|
|
3134
3279
|
/**
|
|
3135
|
-
* Identifier of the event
|
|
3280
|
+
* Identifier of the event.
|
|
3136
3281
|
*/
|
|
3137
3282
|
readonly name: typeof defines.events.on_player_unmuted
|
|
3138
3283
|
/**
|
|
3139
3284
|
* Tick the event was generated.
|
|
3140
3285
|
*/
|
|
3141
|
-
readonly tick:
|
|
3286
|
+
readonly tick: MapTick
|
|
3142
3287
|
}
|
|
3143
3288
|
/**
|
|
3144
3289
|
* Called when a player uses a capsule that results in some game action.
|
|
3145
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3290
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_used_capsule Online documentation}
|
|
3146
3291
|
*/
|
|
3147
3292
|
interface OnPlayerUsedCapsuleEvent extends EventData {
|
|
3148
3293
|
/**
|
|
@@ -3162,17 +3307,17 @@ declare module "factorio:runtime" {
|
|
|
3162
3307
|
*/
|
|
3163
3308
|
readonly position: MapPosition
|
|
3164
3309
|
/**
|
|
3165
|
-
* Identifier of the event
|
|
3310
|
+
* Identifier of the event.
|
|
3166
3311
|
*/
|
|
3167
3312
|
readonly name: typeof defines.events.on_player_used_capsule
|
|
3168
3313
|
/**
|
|
3169
3314
|
* Tick the event was generated.
|
|
3170
3315
|
*/
|
|
3171
|
-
readonly tick:
|
|
3316
|
+
readonly tick: MapTick
|
|
3172
3317
|
}
|
|
3173
3318
|
/**
|
|
3174
3319
|
* Called when a player uses spidertron remote to send all selected units to a given position
|
|
3175
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3320
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_player_used_spidertron_remote Online documentation}
|
|
3176
3321
|
*/
|
|
3177
3322
|
interface OnPlayerUsedSpidertronRemoteEvent extends EventData {
|
|
3178
3323
|
/**
|
|
@@ -3184,19 +3329,19 @@ declare module "factorio:runtime" {
|
|
|
3184
3329
|
*/
|
|
3185
3330
|
readonly position: MapPosition
|
|
3186
3331
|
/**
|
|
3187
|
-
* Identifier of the event
|
|
3332
|
+
* Identifier of the event.
|
|
3188
3333
|
*/
|
|
3189
3334
|
readonly name: typeof defines.events.on_player_used_spidertron_remote
|
|
3190
3335
|
/**
|
|
3191
3336
|
* Tick the event was generated.
|
|
3192
3337
|
*/
|
|
3193
|
-
readonly tick:
|
|
3338
|
+
readonly tick: MapTick
|
|
3194
3339
|
}
|
|
3195
3340
|
/**
|
|
3196
3341
|
* Called after an entity dies.
|
|
3197
3342
|
*
|
|
3198
3343
|
* Event filter: [LuaPostEntityDiedEventFilter](LuaPostEntityDiedEventFilter]
|
|
3199
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3344
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_post_entity_died Online documentation}
|
|
3200
3345
|
*/
|
|
3201
3346
|
interface OnPostEntityDiedEvent extends EventData {
|
|
3202
3347
|
/**
|
|
@@ -3236,19 +3381,19 @@ declare module "factorio:runtime" {
|
|
|
3236
3381
|
*/
|
|
3237
3382
|
readonly unit_number?: UnitNumber
|
|
3238
3383
|
/**
|
|
3239
|
-
* Identifier of the event
|
|
3384
|
+
* Identifier of the event.
|
|
3240
3385
|
*/
|
|
3241
3386
|
readonly name: typeof defines.events.on_post_entity_died
|
|
3242
3387
|
/**
|
|
3243
3388
|
* Tick the event was generated.
|
|
3244
3389
|
*/
|
|
3245
|
-
readonly tick:
|
|
3390
|
+
readonly tick: MapTick
|
|
3246
3391
|
}
|
|
3247
3392
|
/**
|
|
3248
3393
|
* Called after a segmented unit dies.
|
|
3249
3394
|
*
|
|
3250
3395
|
* Event filter: [LuaPostSegmentedUnitDiedEventFilter](LuaPostSegmentedUnitDiedEventFilter]
|
|
3251
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3396
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_post_segmented_unit_died Online documentation}
|
|
3252
3397
|
*/
|
|
3253
3398
|
interface OnPostSegmentedUnitDiedEvent extends EventData {
|
|
3254
3399
|
/**
|
|
@@ -3280,17 +3425,17 @@ declare module "factorio:runtime" {
|
|
|
3280
3425
|
*/
|
|
3281
3426
|
readonly unit_number: UnitNumber
|
|
3282
3427
|
/**
|
|
3283
|
-
* Identifier of the event
|
|
3428
|
+
* Identifier of the event.
|
|
3284
3429
|
*/
|
|
3285
3430
|
readonly name: typeof defines.events.on_post_segmented_unit_died
|
|
3286
3431
|
/**
|
|
3287
3432
|
* Tick the event was generated.
|
|
3288
3433
|
*/
|
|
3289
|
-
readonly tick:
|
|
3434
|
+
readonly tick: MapTick
|
|
3290
3435
|
}
|
|
3291
3436
|
/**
|
|
3292
3437
|
* Called when players uses an item to build something. Called before {@link OnBuiltEntityEvent on_built_entity}.
|
|
3293
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3438
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_build Online documentation}
|
|
3294
3439
|
*/
|
|
3295
3440
|
interface OnPreBuildEvent extends EventData {
|
|
3296
3441
|
/**
|
|
@@ -3326,17 +3471,17 @@ declare module "factorio:runtime" {
|
|
|
3326
3471
|
*/
|
|
3327
3472
|
readonly created_by_moving: boolean
|
|
3328
3473
|
/**
|
|
3329
|
-
* Identifier of the event
|
|
3474
|
+
* Identifier of the event.
|
|
3330
3475
|
*/
|
|
3331
3476
|
readonly name: typeof defines.events.on_pre_build
|
|
3332
3477
|
/**
|
|
3333
3478
|
* Tick the event was generated.
|
|
3334
3479
|
*/
|
|
3335
|
-
readonly tick:
|
|
3480
|
+
readonly tick: MapTick
|
|
3336
3481
|
}
|
|
3337
3482
|
/**
|
|
3338
3483
|
* Called before one or more chunks are deleted using {@link LuaSurface#delete_chunk LuaSurface::delete_chunk}.
|
|
3339
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3484
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_chunk_deleted Online documentation}
|
|
3340
3485
|
*/
|
|
3341
3486
|
interface OnPreChunkDeletedEvent extends EventData {
|
|
3342
3487
|
readonly surface_index: SurfaceIndex
|
|
@@ -3345,17 +3490,17 @@ declare module "factorio:runtime" {
|
|
|
3345
3490
|
*/
|
|
3346
3491
|
readonly positions: ChunkPosition[]
|
|
3347
3492
|
/**
|
|
3348
|
-
* Identifier of the event
|
|
3493
|
+
* Identifier of the event.
|
|
3349
3494
|
*/
|
|
3350
3495
|
readonly name: typeof defines.events.on_pre_chunk_deleted
|
|
3351
3496
|
/**
|
|
3352
3497
|
* Tick the event was generated.
|
|
3353
3498
|
*/
|
|
3354
|
-
readonly tick:
|
|
3499
|
+
readonly tick: MapTick
|
|
3355
3500
|
}
|
|
3356
3501
|
/**
|
|
3357
3502
|
* Called before entity copy-paste is done.
|
|
3358
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3503
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_entity_settings_pasted Online documentation}
|
|
3359
3504
|
*/
|
|
3360
3505
|
interface OnPreEntitySettingsPastedEvent extends EventData {
|
|
3361
3506
|
readonly player_index: PlayerIndex
|
|
@@ -3368,13 +3513,13 @@ declare module "factorio:runtime" {
|
|
|
3368
3513
|
*/
|
|
3369
3514
|
readonly destination: LuaEntity
|
|
3370
3515
|
/**
|
|
3371
|
-
* Identifier of the event
|
|
3516
|
+
* Identifier of the event.
|
|
3372
3517
|
*/
|
|
3373
3518
|
readonly name: typeof defines.events.on_pre_entity_settings_pasted
|
|
3374
3519
|
/**
|
|
3375
3520
|
* Tick the event was generated.
|
|
3376
3521
|
*/
|
|
3377
|
-
readonly tick:
|
|
3522
|
+
readonly tick: MapTick
|
|
3378
3523
|
}
|
|
3379
3524
|
/**
|
|
3380
3525
|
* Called before a ghost entity is destroyed as a result of being marked for deconstruction.
|
|
@@ -3382,7 +3527,7 @@ declare module "factorio:runtime" {
|
|
|
3382
3527
|
* Also called for item request proxies before they are destroyed as a result of being marked for deconstruction.
|
|
3383
3528
|
*
|
|
3384
3529
|
* Event filter: [LuaPreGhostDeconstructedEventFilter](LuaPreGhostDeconstructedEventFilter]
|
|
3385
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3530
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_ghost_deconstructed Online documentation}
|
|
3386
3531
|
*/
|
|
3387
3532
|
interface OnPreGhostDeconstructedEvent extends EventData {
|
|
3388
3533
|
/**
|
|
@@ -3391,19 +3536,19 @@ declare module "factorio:runtime" {
|
|
|
3391
3536
|
readonly player_index?: PlayerIndex
|
|
3392
3537
|
readonly ghost: LuaEntity
|
|
3393
3538
|
/**
|
|
3394
|
-
* Identifier of the event
|
|
3539
|
+
* Identifier of the event.
|
|
3395
3540
|
*/
|
|
3396
3541
|
readonly name: typeof defines.events.on_pre_ghost_deconstructed
|
|
3397
3542
|
/**
|
|
3398
3543
|
* Tick the event was generated.
|
|
3399
3544
|
*/
|
|
3400
|
-
readonly tick:
|
|
3545
|
+
readonly tick: MapTick
|
|
3401
3546
|
}
|
|
3402
3547
|
/**
|
|
3403
3548
|
* Called before a ghost entity is upgraded.
|
|
3404
3549
|
*
|
|
3405
3550
|
* Event filter: [LuaPreGhostUpgradedEventFilter](LuaPreGhostUpgradedEventFilter]
|
|
3406
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3551
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_ghost_upgraded Online documentation}
|
|
3407
3552
|
*/
|
|
3408
3553
|
interface OnPreGhostUpgradedEvent extends EventData {
|
|
3409
3554
|
/**
|
|
@@ -3414,17 +3559,17 @@ declare module "factorio:runtime" {
|
|
|
3414
3559
|
readonly target: LuaEntityPrototype
|
|
3415
3560
|
readonly quality: LuaQualityPrototype
|
|
3416
3561
|
/**
|
|
3417
|
-
* Identifier of the event
|
|
3562
|
+
* Identifier of the event.
|
|
3418
3563
|
*/
|
|
3419
3564
|
readonly name: typeof defines.events.on_pre_ghost_upgraded
|
|
3420
3565
|
/**
|
|
3421
3566
|
* Tick the event was generated.
|
|
3422
3567
|
*/
|
|
3423
|
-
readonly tick:
|
|
3568
|
+
readonly tick: MapTick
|
|
3424
3569
|
}
|
|
3425
3570
|
/**
|
|
3426
3571
|
* Called directly before a permission group is deleted.
|
|
3427
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3572
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_permission_group_deleted Online documentation}
|
|
3428
3573
|
*/
|
|
3429
3574
|
interface OnPrePermissionGroupDeletedEvent extends EventData {
|
|
3430
3575
|
/**
|
|
@@ -3436,17 +3581,17 @@ declare module "factorio:runtime" {
|
|
|
3436
3581
|
*/
|
|
3437
3582
|
readonly group: LuaPermissionGroup
|
|
3438
3583
|
/**
|
|
3439
|
-
* Identifier of the event
|
|
3584
|
+
* Identifier of the event.
|
|
3440
3585
|
*/
|
|
3441
3586
|
readonly name: typeof defines.events.on_pre_permission_group_deleted
|
|
3442
3587
|
/**
|
|
3443
3588
|
* Tick the event was generated.
|
|
3444
3589
|
*/
|
|
3445
|
-
readonly tick:
|
|
3590
|
+
readonly tick: MapTick
|
|
3446
3591
|
}
|
|
3447
3592
|
/**
|
|
3448
3593
|
* Called directly before a permission string is imported.
|
|
3449
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3594
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_permission_string_imported Online documentation}
|
|
3450
3595
|
*/
|
|
3451
3596
|
interface OnPrePermissionStringImportedEvent extends EventData {
|
|
3452
3597
|
/**
|
|
@@ -3454,17 +3599,17 @@ declare module "factorio:runtime" {
|
|
|
3454
3599
|
*/
|
|
3455
3600
|
readonly player_index: PlayerIndex
|
|
3456
3601
|
/**
|
|
3457
|
-
* Identifier of the event
|
|
3602
|
+
* Identifier of the event.
|
|
3458
3603
|
*/
|
|
3459
3604
|
readonly name: typeof defines.events.on_pre_permission_string_imported
|
|
3460
3605
|
/**
|
|
3461
3606
|
* Tick the event was generated.
|
|
3462
3607
|
*/
|
|
3463
|
-
readonly tick:
|
|
3608
|
+
readonly tick: MapTick
|
|
3464
3609
|
}
|
|
3465
3610
|
/**
|
|
3466
3611
|
* Called when a player queues something to be crafted.
|
|
3467
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3612
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_player_crafted_item Online documentation}
|
|
3468
3613
|
*/
|
|
3469
3614
|
interface OnPrePlayerCraftedItemEvent extends EventData {
|
|
3470
3615
|
/**
|
|
@@ -3484,51 +3629,51 @@ declare module "factorio:runtime" {
|
|
|
3484
3629
|
*/
|
|
3485
3630
|
readonly queued_count: uint32
|
|
3486
3631
|
/**
|
|
3487
|
-
* Identifier of the event
|
|
3632
|
+
* Identifier of the event.
|
|
3488
3633
|
*/
|
|
3489
3634
|
readonly name: typeof defines.events.on_pre_player_crafted_item
|
|
3490
3635
|
/**
|
|
3491
3636
|
* Tick the event was generated.
|
|
3492
3637
|
*/
|
|
3493
|
-
readonly tick:
|
|
3638
|
+
readonly tick: MapTick
|
|
3494
3639
|
}
|
|
3495
3640
|
/**
|
|
3496
3641
|
* Called before a players dies.
|
|
3497
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3642
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_player_died Online documentation}
|
|
3498
3643
|
*/
|
|
3499
3644
|
interface OnPrePlayerDiedEvent extends EventData {
|
|
3500
3645
|
readonly player_index: PlayerIndex
|
|
3501
3646
|
readonly cause?: LuaEntity
|
|
3502
3647
|
/**
|
|
3503
|
-
* Identifier of the event
|
|
3648
|
+
* Identifier of the event.
|
|
3504
3649
|
*/
|
|
3505
3650
|
readonly name: typeof defines.events.on_pre_player_died
|
|
3506
3651
|
/**
|
|
3507
3652
|
* Tick the event was generated.
|
|
3508
3653
|
*/
|
|
3509
|
-
readonly tick:
|
|
3654
|
+
readonly tick: MapTick
|
|
3510
3655
|
}
|
|
3511
3656
|
/**
|
|
3512
3657
|
* Called before a player leaves the game.
|
|
3513
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3658
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_player_left_game Online documentation}
|
|
3514
3659
|
*/
|
|
3515
3660
|
interface OnPrePlayerLeftGameEvent extends EventData {
|
|
3516
3661
|
readonly player_index: PlayerIndex
|
|
3517
3662
|
readonly reason: defines.disconnect_reason
|
|
3518
3663
|
/**
|
|
3519
|
-
* Identifier of the event
|
|
3664
|
+
* Identifier of the event.
|
|
3520
3665
|
*/
|
|
3521
3666
|
readonly name: typeof defines.events.on_pre_player_left_game
|
|
3522
3667
|
/**
|
|
3523
3668
|
* Tick the event was generated.
|
|
3524
3669
|
*/
|
|
3525
|
-
readonly tick:
|
|
3670
|
+
readonly tick: MapTick
|
|
3526
3671
|
}
|
|
3527
3672
|
/**
|
|
3528
3673
|
* Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed.
|
|
3529
3674
|
*
|
|
3530
3675
|
* Event filter: [LuaPrePlayerMinedEntityEventFilter](LuaPrePlayerMinedEntityEventFilter]
|
|
3531
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3676
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_player_mined_item Online documentation}
|
|
3532
3677
|
*/
|
|
3533
3678
|
interface OnPrePlayerMinedItemEvent extends EventData {
|
|
3534
3679
|
/**
|
|
@@ -3537,17 +3682,17 @@ declare module "factorio:runtime" {
|
|
|
3537
3682
|
readonly entity: LuaEntity
|
|
3538
3683
|
readonly player_index: PlayerIndex
|
|
3539
3684
|
/**
|
|
3540
|
-
* Identifier of the event
|
|
3685
|
+
* Identifier of the event.
|
|
3541
3686
|
*/
|
|
3542
3687
|
readonly name: typeof defines.events.on_pre_player_mined_item
|
|
3543
3688
|
/**
|
|
3544
3689
|
* Tick the event was generated.
|
|
3545
3690
|
*/
|
|
3546
|
-
readonly tick:
|
|
3691
|
+
readonly tick: MapTick
|
|
3547
3692
|
}
|
|
3548
3693
|
/**
|
|
3549
3694
|
* Called before a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link OnPlayerLeftGameEvent leaving} the game, and instead behaves like the player never existed in the save file.
|
|
3550
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3695
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_player_removed Online documentation}
|
|
3551
3696
|
*/
|
|
3552
3697
|
interface OnPrePlayerRemovedEvent extends EventData {
|
|
3553
3698
|
/**
|
|
@@ -3555,32 +3700,32 @@ declare module "factorio:runtime" {
|
|
|
3555
3700
|
*/
|
|
3556
3701
|
readonly player_index: PlayerIndex
|
|
3557
3702
|
/**
|
|
3558
|
-
* Identifier of the event
|
|
3703
|
+
* Identifier of the event.
|
|
3559
3704
|
*/
|
|
3560
3705
|
readonly name: typeof defines.events.on_pre_player_removed
|
|
3561
3706
|
/**
|
|
3562
3707
|
* Tick the event was generated.
|
|
3563
3708
|
*/
|
|
3564
|
-
readonly tick:
|
|
3709
|
+
readonly tick: MapTick
|
|
3565
3710
|
}
|
|
3566
3711
|
/**
|
|
3567
3712
|
* Called before a player toggles the map editor on or off.
|
|
3568
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3713
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_player_toggled_map_editor Online documentation}
|
|
3569
3714
|
*/
|
|
3570
3715
|
interface OnPrePlayerToggledMapEditorEvent extends EventData {
|
|
3571
3716
|
readonly player_index: PlayerIndex
|
|
3572
3717
|
/**
|
|
3573
|
-
* Identifier of the event
|
|
3718
|
+
* Identifier of the event.
|
|
3574
3719
|
*/
|
|
3575
3720
|
readonly name: typeof defines.events.on_pre_player_toggled_map_editor
|
|
3576
3721
|
/**
|
|
3577
3722
|
* Tick the event was generated.
|
|
3578
3723
|
*/
|
|
3579
|
-
readonly tick:
|
|
3724
|
+
readonly tick: MapTick
|
|
3580
3725
|
}
|
|
3581
3726
|
/**
|
|
3582
3727
|
* Called directly before a robot explodes cliffs.
|
|
3583
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3728
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_robot_exploded_cliff Online documentation}
|
|
3584
3729
|
*/
|
|
3585
3730
|
interface OnPreRobotExplodedCliffEvent extends EventData {
|
|
3586
3731
|
readonly robot: LuaEntity
|
|
@@ -3594,17 +3739,17 @@ declare module "factorio:runtime" {
|
|
|
3594
3739
|
*/
|
|
3595
3740
|
readonly quality: LuaQualityPrototype
|
|
3596
3741
|
/**
|
|
3597
|
-
* Identifier of the event
|
|
3742
|
+
* Identifier of the event.
|
|
3598
3743
|
*/
|
|
3599
3744
|
readonly name: typeof defines.events.on_pre_robot_exploded_cliff
|
|
3600
3745
|
/**
|
|
3601
3746
|
* Tick the event was generated.
|
|
3602
3747
|
*/
|
|
3603
|
-
readonly tick:
|
|
3748
|
+
readonly tick: MapTick
|
|
3604
3749
|
}
|
|
3605
3750
|
/**
|
|
3606
3751
|
* Called just before the scenario finishes.
|
|
3607
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3752
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_scenario_finished Online documentation}
|
|
3608
3753
|
*/
|
|
3609
3754
|
interface OnPreScenarioFinishedEvent extends EventData {
|
|
3610
3755
|
/**
|
|
@@ -3612,17 +3757,17 @@ declare module "factorio:runtime" {
|
|
|
3612
3757
|
*/
|
|
3613
3758
|
readonly player_won: boolean
|
|
3614
3759
|
/**
|
|
3615
|
-
* Identifier of the event
|
|
3760
|
+
* Identifier of the event.
|
|
3616
3761
|
*/
|
|
3617
3762
|
readonly name: typeof defines.events.on_pre_scenario_finished
|
|
3618
3763
|
/**
|
|
3619
3764
|
* Tick the event was generated.
|
|
3620
3765
|
*/
|
|
3621
|
-
readonly tick:
|
|
3766
|
+
readonly tick: MapTick
|
|
3622
3767
|
}
|
|
3623
3768
|
/**
|
|
3624
3769
|
* Called just before a script inventory is resized.
|
|
3625
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3770
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_script_inventory_resized Online documentation}
|
|
3626
3771
|
*/
|
|
3627
3772
|
interface OnPreScriptInventoryResizedEvent extends EventData {
|
|
3628
3773
|
/**
|
|
@@ -3643,47 +3788,47 @@ declare module "factorio:runtime" {
|
|
|
3643
3788
|
*/
|
|
3644
3789
|
readonly new_size: uint32
|
|
3645
3790
|
/**
|
|
3646
|
-
* Identifier of the event
|
|
3791
|
+
* Identifier of the event.
|
|
3647
3792
|
*/
|
|
3648
3793
|
readonly name: typeof defines.events.on_pre_script_inventory_resized
|
|
3649
3794
|
/**
|
|
3650
3795
|
* Tick the event was generated.
|
|
3651
3796
|
*/
|
|
3652
|
-
readonly tick:
|
|
3797
|
+
readonly tick: MapTick
|
|
3653
3798
|
}
|
|
3654
3799
|
/**
|
|
3655
3800
|
* Called just before a surface is cleared (all entities removed and all chunks deleted).
|
|
3656
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3801
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_surface_cleared Online documentation}
|
|
3657
3802
|
*/
|
|
3658
3803
|
interface OnPreSurfaceClearedEvent extends EventData {
|
|
3659
3804
|
readonly surface_index: SurfaceIndex
|
|
3660
3805
|
/**
|
|
3661
|
-
* Identifier of the event
|
|
3806
|
+
* Identifier of the event.
|
|
3662
3807
|
*/
|
|
3663
3808
|
readonly name: typeof defines.events.on_pre_surface_cleared
|
|
3664
3809
|
/**
|
|
3665
3810
|
* Tick the event was generated.
|
|
3666
3811
|
*/
|
|
3667
|
-
readonly tick:
|
|
3812
|
+
readonly tick: MapTick
|
|
3668
3813
|
}
|
|
3669
3814
|
/**
|
|
3670
3815
|
* Called just before a surface is deleted.
|
|
3671
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3816
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_pre_surface_deleted Online documentation}
|
|
3672
3817
|
*/
|
|
3673
3818
|
interface OnPreSurfaceDeletedEvent extends EventData {
|
|
3674
3819
|
readonly surface_index: SurfaceIndex
|
|
3675
3820
|
/**
|
|
3676
|
-
* Identifier of the event
|
|
3821
|
+
* Identifier of the event.
|
|
3677
3822
|
*/
|
|
3678
3823
|
readonly name: typeof defines.events.on_pre_surface_deleted
|
|
3679
3824
|
/**
|
|
3680
3825
|
* Tick the event was generated.
|
|
3681
3826
|
*/
|
|
3682
|
-
readonly tick:
|
|
3827
|
+
readonly tick: MapTick
|
|
3683
3828
|
}
|
|
3684
3829
|
/**
|
|
3685
3830
|
* Called when the player triggers "redo".
|
|
3686
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3831
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_redo_applied Online documentation}
|
|
3687
3832
|
*/
|
|
3688
3833
|
interface OnRedoAppliedEvent extends EventData {
|
|
3689
3834
|
/**
|
|
@@ -3695,17 +3840,17 @@ declare module "factorio:runtime" {
|
|
|
3695
3840
|
*/
|
|
3696
3841
|
readonly actions: UndoRedoAction[]
|
|
3697
3842
|
/**
|
|
3698
|
-
* Identifier of the event
|
|
3843
|
+
* Identifier of the event.
|
|
3699
3844
|
*/
|
|
3700
3845
|
readonly name: typeof defines.events.on_redo_applied
|
|
3701
3846
|
/**
|
|
3702
3847
|
* Tick the event was generated.
|
|
3703
3848
|
*/
|
|
3704
|
-
readonly tick:
|
|
3849
|
+
readonly tick: MapTick
|
|
3705
3850
|
}
|
|
3706
3851
|
/**
|
|
3707
3852
|
* Called when research is cancelled.
|
|
3708
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3853
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_research_cancelled Online documentation}
|
|
3709
3854
|
*/
|
|
3710
3855
|
interface OnResearchCancelledEvent extends EventData {
|
|
3711
3856
|
/**
|
|
@@ -3721,17 +3866,17 @@ declare module "factorio:runtime" {
|
|
|
3721
3866
|
*/
|
|
3722
3867
|
readonly player_index?: PlayerIndex
|
|
3723
3868
|
/**
|
|
3724
|
-
* Identifier of the event
|
|
3869
|
+
* Identifier of the event.
|
|
3725
3870
|
*/
|
|
3726
3871
|
readonly name: typeof defines.events.on_research_cancelled
|
|
3727
3872
|
/**
|
|
3728
3873
|
* Tick the event was generated.
|
|
3729
3874
|
*/
|
|
3730
|
-
readonly tick:
|
|
3875
|
+
readonly tick: MapTick
|
|
3731
3876
|
}
|
|
3732
3877
|
/**
|
|
3733
3878
|
* Called when a research finishes.
|
|
3734
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3879
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_research_finished Online documentation}
|
|
3735
3880
|
*/
|
|
3736
3881
|
interface OnResearchFinishedEvent extends EventData {
|
|
3737
3882
|
/**
|
|
@@ -3743,17 +3888,17 @@ declare module "factorio:runtime" {
|
|
|
3743
3888
|
*/
|
|
3744
3889
|
readonly by_script: boolean
|
|
3745
3890
|
/**
|
|
3746
|
-
* Identifier of the event
|
|
3891
|
+
* Identifier of the event.
|
|
3747
3892
|
*/
|
|
3748
3893
|
readonly name: typeof defines.events.on_research_finished
|
|
3749
3894
|
/**
|
|
3750
3895
|
* Tick the event was generated.
|
|
3751
3896
|
*/
|
|
3752
|
-
readonly tick:
|
|
3897
|
+
readonly tick: MapTick
|
|
3753
3898
|
}
|
|
3754
3899
|
/**
|
|
3755
3900
|
* Called when research is moved forwards or backwards in the research queue.
|
|
3756
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3901
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_research_moved Online documentation}
|
|
3757
3902
|
*/
|
|
3758
3903
|
interface OnResearchMovedEvent extends EventData {
|
|
3759
3904
|
/**
|
|
@@ -3765,17 +3910,17 @@ declare module "factorio:runtime" {
|
|
|
3765
3910
|
*/
|
|
3766
3911
|
readonly player_index?: PlayerIndex
|
|
3767
3912
|
/**
|
|
3768
|
-
* Identifier of the event
|
|
3913
|
+
* Identifier of the event.
|
|
3769
3914
|
*/
|
|
3770
3915
|
readonly name: typeof defines.events.on_research_moved
|
|
3771
3916
|
/**
|
|
3772
3917
|
* Tick the event was generated.
|
|
3773
3918
|
*/
|
|
3774
|
-
readonly tick:
|
|
3919
|
+
readonly tick: MapTick
|
|
3775
3920
|
}
|
|
3776
3921
|
/**
|
|
3777
3922
|
* Called when research is queued.
|
|
3778
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3923
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_research_queued Online documentation}
|
|
3779
3924
|
*/
|
|
3780
3925
|
interface OnResearchQueuedEvent extends EventData {
|
|
3781
3926
|
/**
|
|
@@ -3791,17 +3936,17 @@ declare module "factorio:runtime" {
|
|
|
3791
3936
|
*/
|
|
3792
3937
|
readonly player_index?: PlayerIndex
|
|
3793
3938
|
/**
|
|
3794
|
-
* Identifier of the event
|
|
3939
|
+
* Identifier of the event.
|
|
3795
3940
|
*/
|
|
3796
3941
|
readonly name: typeof defines.events.on_research_queued
|
|
3797
3942
|
/**
|
|
3798
3943
|
* Tick the event was generated.
|
|
3799
3944
|
*/
|
|
3800
|
-
readonly tick:
|
|
3945
|
+
readonly tick: MapTick
|
|
3801
3946
|
}
|
|
3802
3947
|
/**
|
|
3803
3948
|
* Called when a research is reversed (unresearched).
|
|
3804
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3949
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_research_reversed Online documentation}
|
|
3805
3950
|
*/
|
|
3806
3951
|
interface OnResearchReversedEvent extends EventData {
|
|
3807
3952
|
/**
|
|
@@ -3813,17 +3958,17 @@ declare module "factorio:runtime" {
|
|
|
3813
3958
|
*/
|
|
3814
3959
|
readonly by_script: boolean
|
|
3815
3960
|
/**
|
|
3816
|
-
* Identifier of the event
|
|
3961
|
+
* Identifier of the event.
|
|
3817
3962
|
*/
|
|
3818
3963
|
readonly name: typeof defines.events.on_research_reversed
|
|
3819
3964
|
/**
|
|
3820
3965
|
* Tick the event was generated.
|
|
3821
3966
|
*/
|
|
3822
|
-
readonly tick:
|
|
3967
|
+
readonly tick: MapTick
|
|
3823
3968
|
}
|
|
3824
3969
|
/**
|
|
3825
3970
|
* Called when a technology research starts.
|
|
3826
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3971
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_research_started Online documentation}
|
|
3827
3972
|
*/
|
|
3828
3973
|
interface OnResearchStartedEvent extends EventData {
|
|
3829
3974
|
/**
|
|
@@ -3832,34 +3977,34 @@ declare module "factorio:runtime" {
|
|
|
3832
3977
|
readonly research: LuaTechnology
|
|
3833
3978
|
readonly last_research?: LuaTechnology
|
|
3834
3979
|
/**
|
|
3835
|
-
* Identifier of the event
|
|
3980
|
+
* Identifier of the event.
|
|
3836
3981
|
*/
|
|
3837
3982
|
readonly name: typeof defines.events.on_research_started
|
|
3838
3983
|
/**
|
|
3839
3984
|
* Tick the event was generated.
|
|
3840
3985
|
*/
|
|
3841
|
-
readonly tick:
|
|
3986
|
+
readonly tick: MapTick
|
|
3842
3987
|
}
|
|
3843
3988
|
/**
|
|
3844
3989
|
* Called when a resource entity reaches 0 or its minimum yield for infinite resources.
|
|
3845
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
3990
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_resource_depleted Online documentation}
|
|
3846
3991
|
*/
|
|
3847
3992
|
interface OnResourceDepletedEvent extends EventData {
|
|
3848
3993
|
readonly entity: LuaEntity
|
|
3849
3994
|
/**
|
|
3850
|
-
* Identifier of the event
|
|
3995
|
+
* Identifier of the event.
|
|
3851
3996
|
*/
|
|
3852
3997
|
readonly name: typeof defines.events.on_resource_depleted
|
|
3853
3998
|
/**
|
|
3854
3999
|
* Tick the event was generated.
|
|
3855
4000
|
*/
|
|
3856
|
-
readonly tick:
|
|
4001
|
+
readonly tick: MapTick
|
|
3857
4002
|
}
|
|
3858
4003
|
/**
|
|
3859
4004
|
* Called when a construction robot builds an entity.
|
|
3860
4005
|
*
|
|
3861
4006
|
* Event filter: [LuaRobotBuiltEntityEventFilter](LuaRobotBuiltEntityEventFilter]
|
|
3862
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4007
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_robot_built_entity Online documentation}
|
|
3863
4008
|
*/
|
|
3864
4009
|
interface OnRobotBuiltEntityEvent extends EventData {
|
|
3865
4010
|
/**
|
|
@@ -3879,17 +4024,17 @@ declare module "factorio:runtime" {
|
|
|
3879
4024
|
*/
|
|
3880
4025
|
readonly tags?: Tags
|
|
3881
4026
|
/**
|
|
3882
|
-
* Identifier of the event
|
|
4027
|
+
* Identifier of the event.
|
|
3883
4028
|
*/
|
|
3884
4029
|
readonly name: typeof defines.events.on_robot_built_entity
|
|
3885
4030
|
/**
|
|
3886
4031
|
* Tick the event was generated.
|
|
3887
4032
|
*/
|
|
3888
|
-
readonly tick:
|
|
4033
|
+
readonly tick: MapTick
|
|
3889
4034
|
}
|
|
3890
4035
|
/**
|
|
3891
4036
|
* Called after a robot builds tiles.
|
|
3892
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4037
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_robot_built_tile Online documentation}
|
|
3893
4038
|
*/
|
|
3894
4039
|
interface OnRobotBuiltTileEvent extends EventData {
|
|
3895
4040
|
/**
|
|
@@ -3921,17 +4066,17 @@ declare module "factorio:runtime" {
|
|
|
3921
4066
|
*/
|
|
3922
4067
|
readonly surface_index: SurfaceIndex
|
|
3923
4068
|
/**
|
|
3924
|
-
* Identifier of the event
|
|
4069
|
+
* Identifier of the event.
|
|
3925
4070
|
*/
|
|
3926
4071
|
readonly name: typeof defines.events.on_robot_built_tile
|
|
3927
4072
|
/**
|
|
3928
4073
|
* Tick the event was generated.
|
|
3929
4074
|
*/
|
|
3930
|
-
readonly tick:
|
|
4075
|
+
readonly tick: MapTick
|
|
3931
4076
|
}
|
|
3932
4077
|
/**
|
|
3933
4078
|
* Called directly after a robot explodes cliffs.
|
|
3934
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4079
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_robot_exploded_cliff Online documentation}
|
|
3935
4080
|
*/
|
|
3936
4081
|
interface OnRobotExplodedCliffEvent extends EventData {
|
|
3937
4082
|
readonly robot: LuaEntity
|
|
@@ -3944,17 +4089,17 @@ declare module "factorio:runtime" {
|
|
|
3944
4089
|
*/
|
|
3945
4090
|
readonly quality: LuaQualityPrototype
|
|
3946
4091
|
/**
|
|
3947
|
-
* Identifier of the event
|
|
4092
|
+
* Identifier of the event.
|
|
3948
4093
|
*/
|
|
3949
4094
|
readonly name: typeof defines.events.on_robot_exploded_cliff
|
|
3950
4095
|
/**
|
|
3951
4096
|
* Tick the event was generated.
|
|
3952
4097
|
*/
|
|
3953
|
-
readonly tick:
|
|
4098
|
+
readonly tick: MapTick
|
|
3954
4099
|
}
|
|
3955
4100
|
/**
|
|
3956
4101
|
* Called when a robot mines an entity.
|
|
3957
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4102
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_robot_mined Online documentation}
|
|
3958
4103
|
*/
|
|
3959
4104
|
interface OnRobotMinedEvent extends EventData {
|
|
3960
4105
|
/**
|
|
@@ -3966,13 +4111,13 @@ declare module "factorio:runtime" {
|
|
|
3966
4111
|
*/
|
|
3967
4112
|
readonly item_stack: ItemWithQualityCount
|
|
3968
4113
|
/**
|
|
3969
|
-
* Identifier of the event
|
|
4114
|
+
* Identifier of the event.
|
|
3970
4115
|
*/
|
|
3971
4116
|
readonly name: typeof defines.events.on_robot_mined
|
|
3972
4117
|
/**
|
|
3973
4118
|
* Tick the event was generated.
|
|
3974
4119
|
*/
|
|
3975
|
-
readonly tick:
|
|
4120
|
+
readonly tick: MapTick
|
|
3976
4121
|
}
|
|
3977
4122
|
/**
|
|
3978
4123
|
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
|
@@ -3982,7 +4127,7 @@ declare module "factorio:runtime" {
|
|
|
3982
4127
|
* 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.
|
|
3983
4128
|
*
|
|
3984
4129
|
* Event filter: [LuaRobotMinedEntityEventFilter](LuaRobotMinedEntityEventFilter]
|
|
3985
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4130
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_robot_mined_entity Online documentation}
|
|
3986
4131
|
*/
|
|
3987
4132
|
interface OnRobotMinedEntityEvent extends EventData {
|
|
3988
4133
|
/**
|
|
@@ -3998,17 +4143,17 @@ declare module "factorio:runtime" {
|
|
|
3998
4143
|
*/
|
|
3999
4144
|
readonly buffer: LuaInventory
|
|
4000
4145
|
/**
|
|
4001
|
-
* Identifier of the event
|
|
4146
|
+
* Identifier of the event.
|
|
4002
4147
|
*/
|
|
4003
4148
|
readonly name: typeof defines.events.on_robot_mined_entity
|
|
4004
4149
|
/**
|
|
4005
4150
|
* Tick the event was generated.
|
|
4006
4151
|
*/
|
|
4007
|
-
readonly tick:
|
|
4152
|
+
readonly tick: MapTick
|
|
4008
4153
|
}
|
|
4009
4154
|
/**
|
|
4010
4155
|
* Called after a robot mines tiles.
|
|
4011
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4156
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_robot_mined_tile Online documentation}
|
|
4012
4157
|
*/
|
|
4013
4158
|
interface OnRobotMinedTileEvent extends EventData {
|
|
4014
4159
|
/**
|
|
@@ -4024,19 +4169,19 @@ declare module "factorio:runtime" {
|
|
|
4024
4169
|
*/
|
|
4025
4170
|
readonly surface_index: SurfaceIndex
|
|
4026
4171
|
/**
|
|
4027
|
-
* Identifier of the event
|
|
4172
|
+
* Identifier of the event.
|
|
4028
4173
|
*/
|
|
4029
4174
|
readonly name: typeof defines.events.on_robot_mined_tile
|
|
4030
4175
|
/**
|
|
4031
4176
|
* Tick the event was generated.
|
|
4032
4177
|
*/
|
|
4033
|
-
readonly tick:
|
|
4178
|
+
readonly tick: MapTick
|
|
4034
4179
|
}
|
|
4035
4180
|
/**
|
|
4036
4181
|
* Called before a robot mines an entity.
|
|
4037
4182
|
*
|
|
4038
4183
|
* Event filter: [LuaPreRobotMinedEntityEventFilter](LuaPreRobotMinedEntityEventFilter]
|
|
4039
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4184
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_robot_pre_mined Online documentation}
|
|
4040
4185
|
*/
|
|
4041
4186
|
interface OnRobotPreMinedEvent extends EventData {
|
|
4042
4187
|
/**
|
|
@@ -4048,17 +4193,17 @@ declare module "factorio:runtime" {
|
|
|
4048
4193
|
*/
|
|
4049
4194
|
readonly entity: LuaEntity
|
|
4050
4195
|
/**
|
|
4051
|
-
* Identifier of the event
|
|
4196
|
+
* Identifier of the event.
|
|
4052
4197
|
*/
|
|
4053
4198
|
readonly name: typeof defines.events.on_robot_pre_mined
|
|
4054
4199
|
/**
|
|
4055
4200
|
* Tick the event was generated.
|
|
4056
4201
|
*/
|
|
4057
|
-
readonly tick:
|
|
4202
|
+
readonly tick: MapTick
|
|
4058
4203
|
}
|
|
4059
4204
|
/**
|
|
4060
4205
|
* Called when a rocket silo is ordered to be launched.
|
|
4061
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4206
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_rocket_launch_ordered Online documentation}
|
|
4062
4207
|
*/
|
|
4063
4208
|
interface OnRocketLaunchOrderedEvent extends EventData {
|
|
4064
4209
|
readonly rocket: LuaEntity
|
|
@@ -4068,33 +4213,33 @@ declare module "factorio:runtime" {
|
|
|
4068
4213
|
*/
|
|
4069
4214
|
readonly player_index?: PlayerIndex
|
|
4070
4215
|
/**
|
|
4071
|
-
* Identifier of the event
|
|
4216
|
+
* Identifier of the event.
|
|
4072
4217
|
*/
|
|
4073
4218
|
readonly name: typeof defines.events.on_rocket_launch_ordered
|
|
4074
4219
|
/**
|
|
4075
4220
|
* Tick the event was generated.
|
|
4076
4221
|
*/
|
|
4077
|
-
readonly tick:
|
|
4222
|
+
readonly tick: MapTick
|
|
4078
4223
|
}
|
|
4079
4224
|
/**
|
|
4080
4225
|
* Called when a rocket finishes ascending. (Triggers listening for finished rocket launch past 2.0 have been moved to 'on_cargo_pod_finished_ascending' as rocket and cargo pod are two separate entities)
|
|
4081
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4226
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_rocket_launched Online documentation}
|
|
4082
4227
|
*/
|
|
4083
4228
|
interface OnRocketLaunchedEvent extends EventData {
|
|
4084
4229
|
readonly rocket: LuaEntity
|
|
4085
4230
|
readonly rocket_silo?: LuaEntity
|
|
4086
4231
|
/**
|
|
4087
|
-
* Identifier of the event
|
|
4232
|
+
* Identifier of the event.
|
|
4088
4233
|
*/
|
|
4089
4234
|
readonly name: typeof defines.events.on_rocket_launched
|
|
4090
4235
|
/**
|
|
4091
4236
|
* Tick the event was generated.
|
|
4092
4237
|
*/
|
|
4093
|
-
readonly tick:
|
|
4238
|
+
readonly tick: MapTick
|
|
4094
4239
|
}
|
|
4095
4240
|
/**
|
|
4096
4241
|
* Called when a runtime mod setting is changed by a player.
|
|
4097
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4242
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_runtime_mod_setting_changed Online documentation}
|
|
4098
4243
|
*/
|
|
4099
4244
|
interface OnRuntimeModSettingChangedEvent extends EventData {
|
|
4100
4245
|
/**
|
|
@@ -4107,17 +4252,17 @@ declare module "factorio:runtime" {
|
|
|
4107
4252
|
readonly setting: string
|
|
4108
4253
|
readonly setting_type: "runtime-global" | "runtime-per-user"
|
|
4109
4254
|
/**
|
|
4110
|
-
* Identifier of the event
|
|
4255
|
+
* Identifier of the event.
|
|
4111
4256
|
*/
|
|
4112
4257
|
readonly name: typeof defines.events.on_runtime_mod_setting_changed
|
|
4113
4258
|
/**
|
|
4114
4259
|
* Tick the event was generated.
|
|
4115
4260
|
*/
|
|
4116
|
-
readonly tick:
|
|
4261
|
+
readonly tick: MapTick
|
|
4117
4262
|
}
|
|
4118
4263
|
/**
|
|
4119
4264
|
* Called just after a script inventory is resized.
|
|
4120
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4265
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_script_inventory_resized Online documentation}
|
|
4121
4266
|
*/
|
|
4122
4267
|
interface OnScriptInventoryResizedEvent extends EventData {
|
|
4123
4268
|
/**
|
|
@@ -4142,17 +4287,17 @@ declare module "factorio:runtime" {
|
|
|
4142
4287
|
*/
|
|
4143
4288
|
readonly overflow_inventory: LuaInventory
|
|
4144
4289
|
/**
|
|
4145
|
-
* Identifier of the event
|
|
4290
|
+
* Identifier of the event.
|
|
4146
4291
|
*/
|
|
4147
4292
|
readonly name: typeof defines.events.on_script_inventory_resized
|
|
4148
4293
|
/**
|
|
4149
4294
|
* Tick the event was generated.
|
|
4150
4295
|
*/
|
|
4151
|
-
readonly tick:
|
|
4296
|
+
readonly tick: MapTick
|
|
4152
4297
|
}
|
|
4153
4298
|
/**
|
|
4154
4299
|
* Called when a {@link LuaSurface#request_path LuaSurface::request_path} call completes.
|
|
4155
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4300
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_script_path_request_finished Online documentation}
|
|
4156
4301
|
*/
|
|
4157
4302
|
interface OnScriptPathRequestFinishedEvent extends EventData {
|
|
4158
4303
|
/**
|
|
@@ -4168,17 +4313,17 @@ declare module "factorio:runtime" {
|
|
|
4168
4313
|
*/
|
|
4169
4314
|
readonly try_again_later: boolean
|
|
4170
4315
|
/**
|
|
4171
|
-
* Identifier of the event
|
|
4316
|
+
* Identifier of the event.
|
|
4172
4317
|
*/
|
|
4173
4318
|
readonly name: typeof defines.events.on_script_path_request_finished
|
|
4174
4319
|
/**
|
|
4175
4320
|
* Tick the event was generated.
|
|
4176
4321
|
*/
|
|
4177
|
-
readonly tick:
|
|
4322
|
+
readonly tick: MapTick
|
|
4178
4323
|
}
|
|
4179
4324
|
/**
|
|
4180
4325
|
* Called when a script trigger effect is triggered.
|
|
4181
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4326
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_script_trigger_effect Online documentation}
|
|
4182
4327
|
*/
|
|
4183
4328
|
interface OnScriptTriggerEffectEvent extends EventData {
|
|
4184
4329
|
/**
|
|
@@ -4199,19 +4344,19 @@ declare module "factorio:runtime" {
|
|
|
4199
4344
|
readonly cause_entity?: LuaEntity
|
|
4200
4345
|
readonly quality?: string
|
|
4201
4346
|
/**
|
|
4202
|
-
* Identifier of the event
|
|
4347
|
+
* Identifier of the event.
|
|
4203
4348
|
*/
|
|
4204
4349
|
readonly name: typeof defines.events.on_script_trigger_effect
|
|
4205
4350
|
/**
|
|
4206
4351
|
* Tick the event was generated.
|
|
4207
4352
|
*/
|
|
4208
|
-
readonly tick:
|
|
4353
|
+
readonly tick: MapTick
|
|
4209
4354
|
}
|
|
4210
4355
|
/**
|
|
4211
4356
|
* Called when an entity of type `radar` finishes scanning a sector.
|
|
4212
4357
|
*
|
|
4213
4358
|
* Event filter: [LuaSectorScannedEventFilter](LuaSectorScannedEventFilter]
|
|
4214
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4359
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_sector_scanned Online documentation}
|
|
4215
4360
|
*/
|
|
4216
4361
|
interface OnSectorScannedEvent extends EventData {
|
|
4217
4362
|
/**
|
|
@@ -4227,34 +4372,34 @@ declare module "factorio:runtime" {
|
|
|
4227
4372
|
*/
|
|
4228
4373
|
readonly area: BoundingBox
|
|
4229
4374
|
/**
|
|
4230
|
-
* Identifier of the event
|
|
4375
|
+
* Identifier of the event.
|
|
4231
4376
|
*/
|
|
4232
4377
|
readonly name: typeof defines.events.on_sector_scanned
|
|
4233
4378
|
/**
|
|
4234
4379
|
* Tick the event was generated.
|
|
4235
4380
|
*/
|
|
4236
|
-
readonly tick:
|
|
4381
|
+
readonly tick: MapTick
|
|
4237
4382
|
}
|
|
4238
4383
|
/**
|
|
4239
4384
|
* Called when an individual segment of a SegmentedUnit is created.
|
|
4240
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4385
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_segment_entity_created Online documentation}
|
|
4241
4386
|
*/
|
|
4242
4387
|
interface OnSegmentEntityCreatedEvent extends EventData {
|
|
4243
4388
|
readonly entity: LuaEntity
|
|
4244
4389
|
/**
|
|
4245
|
-
* Identifier of the event
|
|
4390
|
+
* Identifier of the event.
|
|
4246
4391
|
*/
|
|
4247
4392
|
readonly name: typeof defines.events.on_segment_entity_created
|
|
4248
4393
|
/**
|
|
4249
4394
|
* Tick the event was generated.
|
|
4250
4395
|
*/
|
|
4251
|
-
readonly tick:
|
|
4396
|
+
readonly tick: MapTick
|
|
4252
4397
|
}
|
|
4253
4398
|
/**
|
|
4254
4399
|
* Called when a segmented unit is created for any reason.
|
|
4255
4400
|
*
|
|
4256
4401
|
* Event filter: [LuaSegmentedUnitCreatedEventFilter](LuaSegmentedUnitCreatedEventFilter]
|
|
4257
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4402
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_segmented_unit_created Online documentation}
|
|
4258
4403
|
*/
|
|
4259
4404
|
interface OnSegmentedUnitCreatedEvent extends EventData {
|
|
4260
4405
|
/**
|
|
@@ -4270,19 +4415,19 @@ declare module "factorio:runtime" {
|
|
|
4270
4415
|
*/
|
|
4271
4416
|
readonly clone_source?: LuaSegmentedUnit
|
|
4272
4417
|
/**
|
|
4273
|
-
* Identifier of the event
|
|
4418
|
+
* Identifier of the event.
|
|
4274
4419
|
*/
|
|
4275
4420
|
readonly name: typeof defines.events.on_segmented_unit_created
|
|
4276
4421
|
/**
|
|
4277
4422
|
* Tick the event was generated.
|
|
4278
4423
|
*/
|
|
4279
|
-
readonly tick:
|
|
4424
|
+
readonly tick: MapTick
|
|
4280
4425
|
}
|
|
4281
4426
|
/**
|
|
4282
4427
|
* Called when a segmented unit is damaged. This is not called when a segmented unit's health is set directly by another mod.
|
|
4283
4428
|
*
|
|
4284
4429
|
* Event filter: [LuaSegmentedUnitDamagedEventFilter](LuaSegmentedUnitDamagedEventFilter]
|
|
4285
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4430
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_segmented_unit_damaged Online documentation}
|
|
4286
4431
|
*/
|
|
4287
4432
|
interface OnSegmentedUnitDamagedEvent extends EventData {
|
|
4288
4433
|
readonly segmented_unit: LuaSegmentedUnit
|
|
@@ -4312,19 +4457,19 @@ declare module "factorio:runtime" {
|
|
|
4312
4457
|
*/
|
|
4313
4458
|
readonly force?: LuaForce
|
|
4314
4459
|
/**
|
|
4315
|
-
* Identifier of the event
|
|
4460
|
+
* Identifier of the event.
|
|
4316
4461
|
*/
|
|
4317
4462
|
readonly name: typeof defines.events.on_segmented_unit_damaged
|
|
4318
4463
|
/**
|
|
4319
4464
|
* Tick the event was generated.
|
|
4320
4465
|
*/
|
|
4321
|
-
readonly tick:
|
|
4466
|
+
readonly tick: MapTick
|
|
4322
4467
|
}
|
|
4323
4468
|
/**
|
|
4324
4469
|
* Called when a segmented unit dies.
|
|
4325
4470
|
*
|
|
4326
4471
|
* Event filter: [LuaSegmentedUnitDiedEventFilter](LuaSegmentedUnitDiedEventFilter]
|
|
4327
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4472
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_segmented_unit_died Online documentation}
|
|
4328
4473
|
*/
|
|
4329
4474
|
interface OnSegmentedUnitDiedEvent extends EventData {
|
|
4330
4475
|
/**
|
|
@@ -4344,17 +4489,17 @@ declare module "factorio:runtime" {
|
|
|
4344
4489
|
*/
|
|
4345
4490
|
readonly damage_type?: LuaDamagePrototype
|
|
4346
4491
|
/**
|
|
4347
|
-
* Identifier of the event
|
|
4492
|
+
* Identifier of the event.
|
|
4348
4493
|
*/
|
|
4349
4494
|
readonly name: typeof defines.events.on_segmented_unit_died
|
|
4350
4495
|
/**
|
|
4351
4496
|
* Tick the event was generated.
|
|
4352
4497
|
*/
|
|
4353
|
-
readonly tick:
|
|
4498
|
+
readonly tick: MapTick
|
|
4354
4499
|
}
|
|
4355
4500
|
/**
|
|
4356
4501
|
* Called after the selected entity changes for a given player.
|
|
4357
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4502
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_selected_entity_changed Online documentation}
|
|
4358
4503
|
*/
|
|
4359
4504
|
interface OnSelectedEntityChangedEvent extends EventData {
|
|
4360
4505
|
/**
|
|
@@ -4366,33 +4511,33 @@ declare module "factorio:runtime" {
|
|
|
4366
4511
|
*/
|
|
4367
4512
|
readonly last_entity?: LuaEntity
|
|
4368
4513
|
/**
|
|
4369
|
-
* Identifier of the event
|
|
4514
|
+
* Identifier of the event.
|
|
4370
4515
|
*/
|
|
4371
4516
|
readonly name: typeof defines.events.on_selected_entity_changed
|
|
4372
4517
|
/**
|
|
4373
4518
|
* Tick the event was generated.
|
|
4374
4519
|
*/
|
|
4375
|
-
readonly tick:
|
|
4520
|
+
readonly tick: MapTick
|
|
4376
4521
|
}
|
|
4377
4522
|
/**
|
|
4378
4523
|
* Called when {@link LuaGameScript#is_multiplayer LuaGameScript::is_multiplayer} changes to false. May also be raised when it was already false but a game was loaded from a save file without hosting.
|
|
4379
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4524
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_singleplayer_init Online documentation}
|
|
4380
4525
|
*/
|
|
4381
4526
|
interface OnSingleplayerInitEvent extends EventData {
|
|
4382
4527
|
/**
|
|
4383
|
-
* Identifier of the event
|
|
4528
|
+
* Identifier of the event.
|
|
4384
4529
|
*/
|
|
4385
4530
|
readonly name: typeof defines.events.on_singleplayer_init
|
|
4386
4531
|
/**
|
|
4387
4532
|
* Tick the event was generated.
|
|
4388
4533
|
*/
|
|
4389
|
-
readonly tick:
|
|
4534
|
+
readonly tick: MapTick
|
|
4390
4535
|
}
|
|
4391
4536
|
/**
|
|
4392
4537
|
* Called when a space platform builds an entity.
|
|
4393
4538
|
*
|
|
4394
4539
|
* Event filter: [LuaPlatformBuiltEntityEventFilter](LuaPlatformBuiltEntityEventFilter]
|
|
4395
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4540
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_space_platform_built_entity Online documentation}
|
|
4396
4541
|
*/
|
|
4397
4542
|
interface OnSpacePlatformBuiltEntityEvent extends EventData {
|
|
4398
4543
|
/**
|
|
@@ -4412,17 +4557,17 @@ declare module "factorio:runtime" {
|
|
|
4412
4557
|
*/
|
|
4413
4558
|
readonly tags?: Tags
|
|
4414
4559
|
/**
|
|
4415
|
-
* Identifier of the event
|
|
4560
|
+
* Identifier of the event.
|
|
4416
4561
|
*/
|
|
4417
4562
|
readonly name: typeof defines.events.on_space_platform_built_entity
|
|
4418
4563
|
/**
|
|
4419
4564
|
* Tick the event was generated.
|
|
4420
4565
|
*/
|
|
4421
|
-
readonly tick:
|
|
4566
|
+
readonly tick: MapTick
|
|
4422
4567
|
}
|
|
4423
4568
|
/**
|
|
4424
4569
|
* Called after a space platform builds tiles.
|
|
4425
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4570
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_space_platform_built_tile Online documentation}
|
|
4426
4571
|
*/
|
|
4427
4572
|
interface OnSpacePlatformBuiltTileEvent extends EventData {
|
|
4428
4573
|
/**
|
|
@@ -4454,29 +4599,29 @@ declare module "factorio:runtime" {
|
|
|
4454
4599
|
*/
|
|
4455
4600
|
readonly surface_index: SurfaceIndex
|
|
4456
4601
|
/**
|
|
4457
|
-
* Identifier of the event
|
|
4602
|
+
* Identifier of the event.
|
|
4458
4603
|
*/
|
|
4459
4604
|
readonly name: typeof defines.events.on_space_platform_built_tile
|
|
4460
4605
|
/**
|
|
4461
4606
|
* Tick the event was generated.
|
|
4462
4607
|
*/
|
|
4463
|
-
readonly tick:
|
|
4608
|
+
readonly tick: MapTick
|
|
4464
4609
|
}
|
|
4465
4610
|
/**
|
|
4466
4611
|
* Called when a space platform changes state
|
|
4467
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4612
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_space_platform_changed_state Online documentation}
|
|
4468
4613
|
*/
|
|
4469
4614
|
interface OnSpacePlatformChangedStateEvent extends EventData {
|
|
4470
4615
|
readonly platform: LuaSpacePlatform
|
|
4471
4616
|
readonly old_state: defines.space_platform_state
|
|
4472
4617
|
/**
|
|
4473
|
-
* Identifier of the event
|
|
4618
|
+
* Identifier of the event.
|
|
4474
4619
|
*/
|
|
4475
4620
|
readonly name: typeof defines.events.on_space_platform_changed_state
|
|
4476
4621
|
/**
|
|
4477
4622
|
* Tick the event was generated.
|
|
4478
4623
|
*/
|
|
4479
|
-
readonly tick:
|
|
4624
|
+
readonly tick: MapTick
|
|
4480
4625
|
}
|
|
4481
4626
|
/**
|
|
4482
4627
|
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
|
@@ -4486,7 +4631,7 @@ declare module "factorio:runtime" {
|
|
|
4486
4631
|
* 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.
|
|
4487
4632
|
*
|
|
4488
4633
|
* Event filter: [LuaPlatformMinedEntityEventFilter](LuaPlatformMinedEntityEventFilter]
|
|
4489
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4634
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_space_platform_mined_entity Online documentation}
|
|
4490
4635
|
*/
|
|
4491
4636
|
interface OnSpacePlatformMinedEntityEvent extends EventData {
|
|
4492
4637
|
/**
|
|
@@ -4502,17 +4647,17 @@ declare module "factorio:runtime" {
|
|
|
4502
4647
|
*/
|
|
4503
4648
|
readonly buffer: LuaInventory
|
|
4504
4649
|
/**
|
|
4505
|
-
* Identifier of the event
|
|
4650
|
+
* Identifier of the event.
|
|
4506
4651
|
*/
|
|
4507
4652
|
readonly name: typeof defines.events.on_space_platform_mined_entity
|
|
4508
4653
|
/**
|
|
4509
4654
|
* Tick the event was generated.
|
|
4510
4655
|
*/
|
|
4511
|
-
readonly tick:
|
|
4656
|
+
readonly tick: MapTick
|
|
4512
4657
|
}
|
|
4513
4658
|
/**
|
|
4514
4659
|
* Called when a platform mines an entity.
|
|
4515
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4660
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_space_platform_mined_item Online documentation}
|
|
4516
4661
|
*/
|
|
4517
4662
|
interface OnSpacePlatformMinedItemEvent extends EventData {
|
|
4518
4663
|
/**
|
|
@@ -4524,17 +4669,17 @@ declare module "factorio:runtime" {
|
|
|
4524
4669
|
*/
|
|
4525
4670
|
readonly item_stack: ItemWithQualityCount
|
|
4526
4671
|
/**
|
|
4527
|
-
* Identifier of the event
|
|
4672
|
+
* Identifier of the event.
|
|
4528
4673
|
*/
|
|
4529
4674
|
readonly name: typeof defines.events.on_space_platform_mined_item
|
|
4530
4675
|
/**
|
|
4531
4676
|
* Tick the event was generated.
|
|
4532
4677
|
*/
|
|
4533
|
-
readonly tick:
|
|
4678
|
+
readonly tick: MapTick
|
|
4534
4679
|
}
|
|
4535
4680
|
/**
|
|
4536
4681
|
* Called after a platform mines tiles.
|
|
4537
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4682
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_space_platform_mined_tile Online documentation}
|
|
4538
4683
|
*/
|
|
4539
4684
|
interface OnSpacePlatformMinedTileEvent extends EventData {
|
|
4540
4685
|
/**
|
|
@@ -4550,19 +4695,19 @@ declare module "factorio:runtime" {
|
|
|
4550
4695
|
*/
|
|
4551
4696
|
readonly surface_index: SurfaceIndex
|
|
4552
4697
|
/**
|
|
4553
|
-
* Identifier of the event
|
|
4698
|
+
* Identifier of the event.
|
|
4554
4699
|
*/
|
|
4555
4700
|
readonly name: typeof defines.events.on_space_platform_mined_tile
|
|
4556
4701
|
/**
|
|
4557
4702
|
* Tick the event was generated.
|
|
4558
4703
|
*/
|
|
4559
|
-
readonly tick:
|
|
4704
|
+
readonly tick: MapTick
|
|
4560
4705
|
}
|
|
4561
4706
|
/**
|
|
4562
4707
|
* Called before a platform mines an entity.
|
|
4563
4708
|
*
|
|
4564
4709
|
* Event filter: [LuaPrePlatformMinedEntityEventFilter](LuaPrePlatformMinedEntityEventFilter]
|
|
4565
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4710
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_space_platform_pre_mined Online documentation}
|
|
4566
4711
|
*/
|
|
4567
4712
|
interface OnSpacePlatformPreMinedEvent extends EventData {
|
|
4568
4713
|
/**
|
|
@@ -4574,17 +4719,17 @@ declare module "factorio:runtime" {
|
|
|
4574
4719
|
*/
|
|
4575
4720
|
readonly entity: LuaEntity
|
|
4576
4721
|
/**
|
|
4577
|
-
* Identifier of the event
|
|
4722
|
+
* Identifier of the event.
|
|
4578
4723
|
*/
|
|
4579
4724
|
readonly name: typeof defines.events.on_space_platform_pre_mined
|
|
4580
4725
|
/**
|
|
4581
4726
|
* Tick the event was generated.
|
|
4582
4727
|
*/
|
|
4583
|
-
readonly tick:
|
|
4728
|
+
readonly tick: MapTick
|
|
4584
4729
|
}
|
|
4585
4730
|
/**
|
|
4586
4731
|
* Called when a spider finishes moving to its autopilot position.
|
|
4587
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4732
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_spider_command_completed Online documentation}
|
|
4588
4733
|
*/
|
|
4589
4734
|
interface OnSpiderCommandCompletedEvent extends EventData {
|
|
4590
4735
|
/**
|
|
@@ -4592,17 +4737,17 @@ declare module "factorio:runtime" {
|
|
|
4592
4737
|
*/
|
|
4593
4738
|
readonly vehicle: LuaEntity
|
|
4594
4739
|
/**
|
|
4595
|
-
* Identifier of the event
|
|
4740
|
+
* Identifier of the event.
|
|
4596
4741
|
*/
|
|
4597
4742
|
readonly name: typeof defines.events.on_spider_command_completed
|
|
4598
4743
|
/**
|
|
4599
4744
|
* Tick the event was generated.
|
|
4600
4745
|
*/
|
|
4601
|
-
readonly tick:
|
|
4746
|
+
readonly tick: MapTick
|
|
4602
4747
|
}
|
|
4603
4748
|
/**
|
|
4604
4749
|
* Called when a translation request generated through {@link LuaPlayer#request_translation LuaPlayer::request_translation} or {@link LuaPlayer#request_translations LuaPlayer::request_translations} has been completed.
|
|
4605
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4750
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_string_translated Online documentation}
|
|
4606
4751
|
*/
|
|
4607
4752
|
interface OnStringTranslatedEvent extends EventData {
|
|
4608
4753
|
/**
|
|
@@ -4626,64 +4771,64 @@ declare module "factorio:runtime" {
|
|
|
4626
4771
|
*/
|
|
4627
4772
|
readonly translated: boolean
|
|
4628
4773
|
/**
|
|
4629
|
-
* Identifier of the event
|
|
4774
|
+
* Identifier of the event.
|
|
4630
4775
|
*/
|
|
4631
4776
|
readonly name: typeof defines.events.on_string_translated
|
|
4632
4777
|
/**
|
|
4633
4778
|
* Tick the event was generated.
|
|
4634
4779
|
*/
|
|
4635
|
-
readonly tick:
|
|
4780
|
+
readonly tick: MapTick
|
|
4636
4781
|
}
|
|
4637
4782
|
/**
|
|
4638
4783
|
* Called just after a surface is cleared (all entities removed and all chunks deleted).
|
|
4639
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4784
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_surface_cleared Online documentation}
|
|
4640
4785
|
*/
|
|
4641
4786
|
interface OnSurfaceClearedEvent extends EventData {
|
|
4642
4787
|
readonly surface_index: SurfaceIndex
|
|
4643
4788
|
/**
|
|
4644
|
-
* Identifier of the event
|
|
4789
|
+
* Identifier of the event.
|
|
4645
4790
|
*/
|
|
4646
4791
|
readonly name: typeof defines.events.on_surface_cleared
|
|
4647
4792
|
/**
|
|
4648
4793
|
* Tick the event was generated.
|
|
4649
4794
|
*/
|
|
4650
|
-
readonly tick:
|
|
4795
|
+
readonly tick: MapTick
|
|
4651
4796
|
}
|
|
4652
4797
|
/**
|
|
4653
4798
|
* Called when a surface is created.
|
|
4654
4799
|
*
|
|
4655
4800
|
* This is not called when the default surface is created as it will always exist.
|
|
4656
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4801
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_surface_created Online documentation}
|
|
4657
4802
|
*/
|
|
4658
4803
|
interface OnSurfaceCreatedEvent extends EventData {
|
|
4659
4804
|
readonly surface_index: SurfaceIndex
|
|
4660
4805
|
/**
|
|
4661
|
-
* Identifier of the event
|
|
4806
|
+
* Identifier of the event.
|
|
4662
4807
|
*/
|
|
4663
4808
|
readonly name: typeof defines.events.on_surface_created
|
|
4664
4809
|
/**
|
|
4665
4810
|
* Tick the event was generated.
|
|
4666
4811
|
*/
|
|
4667
|
-
readonly tick:
|
|
4812
|
+
readonly tick: MapTick
|
|
4668
4813
|
}
|
|
4669
4814
|
/**
|
|
4670
4815
|
* Called after a surface is deleted.
|
|
4671
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4816
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_surface_deleted Online documentation}
|
|
4672
4817
|
*/
|
|
4673
4818
|
interface OnSurfaceDeletedEvent extends EventData {
|
|
4674
4819
|
readonly surface_index: SurfaceIndex
|
|
4675
4820
|
/**
|
|
4676
|
-
* Identifier of the event
|
|
4821
|
+
* Identifier of the event.
|
|
4677
4822
|
*/
|
|
4678
4823
|
readonly name: typeof defines.events.on_surface_deleted
|
|
4679
4824
|
/**
|
|
4680
4825
|
* Tick the event was generated.
|
|
4681
4826
|
*/
|
|
4682
|
-
readonly tick:
|
|
4827
|
+
readonly tick: MapTick
|
|
4683
4828
|
}
|
|
4684
4829
|
/**
|
|
4685
4830
|
* Called after a surface is imported via the map editor.
|
|
4686
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4831
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_surface_imported Online documentation}
|
|
4687
4832
|
*/
|
|
4688
4833
|
interface OnSurfaceImportedEvent extends EventData {
|
|
4689
4834
|
readonly surface_index: SurfaceIndex
|
|
@@ -4692,49 +4837,49 @@ declare module "factorio:runtime" {
|
|
|
4692
4837
|
*/
|
|
4693
4838
|
readonly original_name: string
|
|
4694
4839
|
/**
|
|
4695
|
-
* Identifier of the event
|
|
4840
|
+
* Identifier of the event.
|
|
4696
4841
|
*/
|
|
4697
4842
|
readonly name: typeof defines.events.on_surface_imported
|
|
4698
4843
|
/**
|
|
4699
4844
|
* Tick the event was generated.
|
|
4700
4845
|
*/
|
|
4701
|
-
readonly tick:
|
|
4846
|
+
readonly tick: MapTick
|
|
4702
4847
|
}
|
|
4703
4848
|
/**
|
|
4704
4849
|
* Called when a surface is renamed.
|
|
4705
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4850
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_surface_renamed Online documentation}
|
|
4706
4851
|
*/
|
|
4707
4852
|
interface OnSurfaceRenamedEvent extends EventData {
|
|
4708
4853
|
readonly surface_index: SurfaceIndex
|
|
4709
4854
|
readonly old_name: string
|
|
4710
4855
|
readonly new_name: string
|
|
4711
4856
|
/**
|
|
4712
|
-
* Identifier of the event
|
|
4857
|
+
* Identifier of the event.
|
|
4713
4858
|
*/
|
|
4714
4859
|
readonly name: typeof defines.events.on_surface_renamed
|
|
4715
4860
|
/**
|
|
4716
4861
|
* Tick the event was generated.
|
|
4717
4862
|
*/
|
|
4718
|
-
readonly tick:
|
|
4863
|
+
readonly tick: MapTick
|
|
4719
4864
|
}
|
|
4720
4865
|
/**
|
|
4721
4866
|
* Called when {@link LuaForce#reset_technology_effects LuaForce::reset_technology_effects} is finished.
|
|
4722
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4867
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_technology_effects_reset Online documentation}
|
|
4723
4868
|
*/
|
|
4724
4869
|
interface OnTechnologyEffectsResetEvent extends EventData {
|
|
4725
4870
|
readonly force: LuaForce
|
|
4726
4871
|
/**
|
|
4727
|
-
* Identifier of the event
|
|
4872
|
+
* Identifier of the event.
|
|
4728
4873
|
*/
|
|
4729
4874
|
readonly name: typeof defines.events.on_technology_effects_reset
|
|
4730
4875
|
/**
|
|
4731
4876
|
* Tick the event was generated.
|
|
4732
4877
|
*/
|
|
4733
|
-
readonly tick:
|
|
4878
|
+
readonly tick: MapTick
|
|
4734
4879
|
}
|
|
4735
4880
|
/**
|
|
4736
4881
|
* Called when a territory is created for any reason.
|
|
4737
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4882
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_territory_created Online documentation}
|
|
4738
4883
|
*/
|
|
4739
4884
|
interface OnTerritoryCreatedEvent extends EventData {
|
|
4740
4885
|
/**
|
|
@@ -4746,17 +4891,17 @@ declare module "factorio:runtime" {
|
|
|
4746
4891
|
*/
|
|
4747
4892
|
readonly territory: LuaTerritory
|
|
4748
4893
|
/**
|
|
4749
|
-
* Identifier of the event
|
|
4894
|
+
* Identifier of the event.
|
|
4750
4895
|
*/
|
|
4751
4896
|
readonly name: typeof defines.events.on_territory_created
|
|
4752
4897
|
/**
|
|
4753
4898
|
* Tick the event was generated.
|
|
4754
4899
|
*/
|
|
4755
|
-
readonly tick:
|
|
4900
|
+
readonly tick: MapTick
|
|
4756
4901
|
}
|
|
4757
4902
|
/**
|
|
4758
4903
|
* Called when a territory is destroyed from a surface.
|
|
4759
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4904
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_territory_destroyed Online documentation}
|
|
4760
4905
|
*/
|
|
4761
4906
|
interface OnTerritoryDestroyedEvent extends EventData {
|
|
4762
4907
|
/**
|
|
@@ -4764,27 +4909,27 @@ declare module "factorio:runtime" {
|
|
|
4764
4909
|
*/
|
|
4765
4910
|
readonly territory: LuaTerritory
|
|
4766
4911
|
/**
|
|
4767
|
-
* Identifier of the event
|
|
4912
|
+
* Identifier of the event.
|
|
4768
4913
|
*/
|
|
4769
4914
|
readonly name: typeof defines.events.on_territory_destroyed
|
|
4770
4915
|
/**
|
|
4771
4916
|
* Tick the event was generated.
|
|
4772
4917
|
*/
|
|
4773
|
-
readonly tick:
|
|
4918
|
+
readonly tick: MapTick
|
|
4774
4919
|
}
|
|
4775
4920
|
/**
|
|
4776
4921
|
* It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
|
|
4777
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4922
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_tick Online documentation}
|
|
4778
4923
|
*/
|
|
4779
4924
|
interface OnTickEvent extends EventData {
|
|
4780
4925
|
/**
|
|
4781
|
-
* Identifier of the event
|
|
4926
|
+
* Identifier of the event.
|
|
4782
4927
|
*/
|
|
4783
4928
|
readonly name: typeof defines.events.on_tick
|
|
4784
4929
|
/**
|
|
4785
4930
|
* Tick the event was generated.
|
|
4786
4931
|
*/
|
|
4787
|
-
readonly tick:
|
|
4932
|
+
readonly tick: MapTick
|
|
4788
4933
|
}
|
|
4789
4934
|
/**
|
|
4790
4935
|
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
|
@@ -4792,7 +4937,7 @@ declare module "factorio:runtime" {
|
|
|
4792
4937
|
* After this event any items in the buffer will be transferred into the tower as if they came from mining the entity.
|
|
4793
4938
|
*
|
|
4794
4939
|
* 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.
|
|
4795
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4940
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_tower_mined_plant Online documentation}
|
|
4796
4941
|
*/
|
|
4797
4942
|
interface OnTowerMinedPlantEvent extends EventData {
|
|
4798
4943
|
/**
|
|
@@ -4808,17 +4953,17 @@ declare module "factorio:runtime" {
|
|
|
4808
4953
|
*/
|
|
4809
4954
|
readonly buffer: LuaInventory
|
|
4810
4955
|
/**
|
|
4811
|
-
* Identifier of the event
|
|
4956
|
+
* Identifier of the event.
|
|
4812
4957
|
*/
|
|
4813
4958
|
readonly name: typeof defines.events.on_tower_mined_plant
|
|
4814
4959
|
/**
|
|
4815
4960
|
* Tick the event was generated.
|
|
4816
4961
|
*/
|
|
4817
|
-
readonly tick:
|
|
4962
|
+
readonly tick: MapTick
|
|
4818
4963
|
}
|
|
4819
4964
|
/**
|
|
4820
4965
|
* Called before an agricultural tower plants a seed.
|
|
4821
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4966
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_tower_planted_seed Online documentation}
|
|
4822
4967
|
*/
|
|
4823
4968
|
interface OnTowerPlantedSeedEvent extends EventData {
|
|
4824
4969
|
/**
|
|
@@ -4834,17 +4979,17 @@ declare module "factorio:runtime" {
|
|
|
4834
4979
|
*/
|
|
4835
4980
|
readonly seed: ItemIDAndQualityIDPair
|
|
4836
4981
|
/**
|
|
4837
|
-
* Identifier of the event
|
|
4982
|
+
* Identifier of the event.
|
|
4838
4983
|
*/
|
|
4839
4984
|
readonly name: typeof defines.events.on_tower_planted_seed
|
|
4840
4985
|
/**
|
|
4841
4986
|
* Tick the event was generated.
|
|
4842
4987
|
*/
|
|
4843
|
-
readonly tick:
|
|
4988
|
+
readonly tick: MapTick
|
|
4844
4989
|
}
|
|
4845
4990
|
/**
|
|
4846
4991
|
* Called before an agricultural tower mines a plant.
|
|
4847
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
4992
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_tower_pre_mined_plant Online documentation}
|
|
4848
4993
|
*/
|
|
4849
4994
|
interface OnTowerPreMinedPlantEvent extends EventData {
|
|
4850
4995
|
/**
|
|
@@ -4856,33 +5001,33 @@ declare module "factorio:runtime" {
|
|
|
4856
5001
|
*/
|
|
4857
5002
|
readonly plant: LuaEntity
|
|
4858
5003
|
/**
|
|
4859
|
-
* Identifier of the event
|
|
5004
|
+
* Identifier of the event.
|
|
4860
5005
|
*/
|
|
4861
5006
|
readonly name: typeof defines.events.on_tower_pre_mined_plant
|
|
4862
5007
|
/**
|
|
4863
5008
|
* Tick the event was generated.
|
|
4864
5009
|
*/
|
|
4865
|
-
readonly tick:
|
|
5010
|
+
readonly tick: MapTick
|
|
4866
5011
|
}
|
|
4867
5012
|
/**
|
|
4868
5013
|
* Called when a train changes state (started to stopped and vice versa)
|
|
4869
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5014
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_train_changed_state Online documentation}
|
|
4870
5015
|
*/
|
|
4871
5016
|
interface OnTrainChangedStateEvent extends EventData {
|
|
4872
5017
|
readonly train: LuaTrain
|
|
4873
5018
|
readonly old_state: defines.train_state
|
|
4874
5019
|
/**
|
|
4875
|
-
* Identifier of the event
|
|
5020
|
+
* Identifier of the event.
|
|
4876
5021
|
*/
|
|
4877
5022
|
readonly name: typeof defines.events.on_train_changed_state
|
|
4878
5023
|
/**
|
|
4879
5024
|
* Tick the event was generated.
|
|
4880
5025
|
*/
|
|
4881
|
-
readonly tick:
|
|
5026
|
+
readonly tick: MapTick
|
|
4882
5027
|
}
|
|
4883
5028
|
/**
|
|
4884
5029
|
* Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
|
|
4885
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5030
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_train_created Online documentation}
|
|
4886
5031
|
*/
|
|
4887
5032
|
interface OnTrainCreatedEvent extends EventData {
|
|
4888
5033
|
readonly train: LuaTrain
|
|
@@ -4895,17 +5040,17 @@ declare module "factorio:runtime" {
|
|
|
4895
5040
|
*/
|
|
4896
5041
|
readonly old_train_id_2?: uint32
|
|
4897
5042
|
/**
|
|
4898
|
-
* Identifier of the event
|
|
5043
|
+
* Identifier of the event.
|
|
4899
5044
|
*/
|
|
4900
5045
|
readonly name: typeof defines.events.on_train_created
|
|
4901
5046
|
/**
|
|
4902
5047
|
* Tick the event was generated.
|
|
4903
5048
|
*/
|
|
4904
|
-
readonly tick:
|
|
5049
|
+
readonly tick: MapTick
|
|
4905
5050
|
}
|
|
4906
5051
|
/**
|
|
4907
5052
|
* Called when a trains schedule is changed either by the player or through script.
|
|
4908
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5053
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_train_schedule_changed Online documentation}
|
|
4909
5054
|
*/
|
|
4910
5055
|
interface OnTrainScheduleChangedEvent extends EventData {
|
|
4911
5056
|
readonly train: LuaTrain
|
|
@@ -4914,49 +5059,49 @@ declare module "factorio:runtime" {
|
|
|
4914
5059
|
*/
|
|
4915
5060
|
readonly player_index?: PlayerIndex
|
|
4916
5061
|
/**
|
|
4917
|
-
* Identifier of the event
|
|
5062
|
+
* Identifier of the event.
|
|
4918
5063
|
*/
|
|
4919
5064
|
readonly name: typeof defines.events.on_train_schedule_changed
|
|
4920
5065
|
/**
|
|
4921
5066
|
* Tick the event was generated.
|
|
4922
5067
|
*/
|
|
4923
|
-
readonly tick:
|
|
5068
|
+
readonly tick: MapTick
|
|
4924
5069
|
}
|
|
4925
5070
|
/**
|
|
4926
5071
|
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.
|
|
4927
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5072
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_trigger_created_entity Online documentation}
|
|
4928
5073
|
*/
|
|
4929
5074
|
interface OnTriggerCreatedEntityEvent extends EventData {
|
|
4930
5075
|
readonly entity: LuaEntity
|
|
4931
5076
|
readonly source?: LuaEntity
|
|
4932
5077
|
/**
|
|
4933
|
-
* Identifier of the event
|
|
5078
|
+
* Identifier of the event.
|
|
4934
5079
|
*/
|
|
4935
5080
|
readonly name: typeof defines.events.on_trigger_created_entity
|
|
4936
5081
|
/**
|
|
4937
5082
|
* Tick the event was generated.
|
|
4938
5083
|
*/
|
|
4939
|
-
readonly tick:
|
|
5084
|
+
readonly tick: MapTick
|
|
4940
5085
|
}
|
|
4941
5086
|
/**
|
|
4942
5087
|
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=true`.
|
|
4943
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5088
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_trigger_fired_artillery Online documentation}
|
|
4944
5089
|
*/
|
|
4945
5090
|
interface OnTriggerFiredArtilleryEvent extends EventData {
|
|
4946
5091
|
readonly entity: LuaEntity
|
|
4947
5092
|
readonly source?: LuaEntity
|
|
4948
5093
|
/**
|
|
4949
|
-
* Identifier of the event
|
|
5094
|
+
* Identifier of the event.
|
|
4950
5095
|
*/
|
|
4951
5096
|
readonly name: typeof defines.events.on_trigger_fired_artillery
|
|
4952
5097
|
/**
|
|
4953
5098
|
* Tick the event was generated.
|
|
4954
5099
|
*/
|
|
4955
|
-
readonly tick:
|
|
5100
|
+
readonly tick: MapTick
|
|
4956
5101
|
}
|
|
4957
5102
|
/**
|
|
4958
5103
|
* Called when new packets are processed by {@link LuaHelpers#recv_udp LuaHelpers::recv_udp}.
|
|
4959
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5104
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_udp_packet_received Online documentation}
|
|
4960
5105
|
*/
|
|
4961
5106
|
interface OnUdpPacketReceivedEvent extends EventData {
|
|
4962
5107
|
/**
|
|
@@ -4972,17 +5117,17 @@ declare module "factorio:runtime" {
|
|
|
4972
5117
|
*/
|
|
4973
5118
|
readonly player_index: PlayerIndex
|
|
4974
5119
|
/**
|
|
4975
|
-
* Identifier of the event
|
|
5120
|
+
* Identifier of the event.
|
|
4976
5121
|
*/
|
|
4977
5122
|
readonly name: typeof defines.events.on_udp_packet_received
|
|
4978
5123
|
/**
|
|
4979
5124
|
* Tick the event was generated.
|
|
4980
5125
|
*/
|
|
4981
|
-
readonly tick:
|
|
5126
|
+
readonly tick: MapTick
|
|
4982
5127
|
}
|
|
4983
5128
|
/**
|
|
4984
5129
|
* Called when the player triggers "undo".
|
|
4985
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5130
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_undo_applied Online documentation}
|
|
4986
5131
|
*/
|
|
4987
5132
|
interface OnUndoAppliedEvent extends EventData {
|
|
4988
5133
|
/**
|
|
@@ -4994,96 +5139,96 @@ declare module "factorio:runtime" {
|
|
|
4994
5139
|
*/
|
|
4995
5140
|
readonly actions: UndoRedoAction[]
|
|
4996
5141
|
/**
|
|
4997
|
-
* Identifier of the event
|
|
5142
|
+
* Identifier of the event.
|
|
4998
5143
|
*/
|
|
4999
5144
|
readonly name: typeof defines.events.on_undo_applied
|
|
5000
5145
|
/**
|
|
5001
5146
|
* Tick the event was generated.
|
|
5002
5147
|
*/
|
|
5003
|
-
readonly tick:
|
|
5148
|
+
readonly tick: MapTick
|
|
5004
5149
|
}
|
|
5005
5150
|
/**
|
|
5006
5151
|
* Called when a unit is added to a unit group.
|
|
5007
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5152
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_unit_added_to_group Online documentation}
|
|
5008
5153
|
*/
|
|
5009
5154
|
interface OnUnitAddedToGroupEvent extends EventData {
|
|
5010
5155
|
readonly unit: LuaEntity
|
|
5011
5156
|
readonly group: LuaCommandable
|
|
5012
5157
|
/**
|
|
5013
|
-
* Identifier of the event
|
|
5158
|
+
* Identifier of the event.
|
|
5014
5159
|
*/
|
|
5015
5160
|
readonly name: typeof defines.events.on_unit_added_to_group
|
|
5016
5161
|
/**
|
|
5017
5162
|
* Tick the event was generated.
|
|
5018
5163
|
*/
|
|
5019
|
-
readonly tick:
|
|
5164
|
+
readonly tick: MapTick
|
|
5020
5165
|
}
|
|
5021
5166
|
/**
|
|
5022
5167
|
* Called when a new unit group is created, before any members are added to it.
|
|
5023
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5168
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_unit_group_created Online documentation}
|
|
5024
5169
|
*/
|
|
5025
5170
|
interface OnUnitGroupCreatedEvent extends EventData {
|
|
5026
5171
|
readonly group: LuaCommandable
|
|
5027
5172
|
/**
|
|
5028
|
-
* Identifier of the event
|
|
5173
|
+
* Identifier of the event.
|
|
5029
5174
|
*/
|
|
5030
5175
|
readonly name: typeof defines.events.on_unit_group_created
|
|
5031
5176
|
/**
|
|
5032
5177
|
* Tick the event was generated.
|
|
5033
5178
|
*/
|
|
5034
|
-
readonly tick:
|
|
5179
|
+
readonly tick: MapTick
|
|
5035
5180
|
}
|
|
5036
5181
|
/**
|
|
5037
5182
|
* Called when a unit group finishes gathering and starts executing its command.
|
|
5038
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5183
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_unit_group_finished_gathering Online documentation}
|
|
5039
5184
|
*/
|
|
5040
5185
|
interface OnUnitGroupFinishedGatheringEvent extends EventData {
|
|
5041
5186
|
readonly group: LuaCommandable
|
|
5042
5187
|
/**
|
|
5043
|
-
* Identifier of the event
|
|
5188
|
+
* Identifier of the event.
|
|
5044
5189
|
*/
|
|
5045
5190
|
readonly name: typeof defines.events.on_unit_group_finished_gathering
|
|
5046
5191
|
/**
|
|
5047
5192
|
* Tick the event was generated.
|
|
5048
5193
|
*/
|
|
5049
|
-
readonly tick:
|
|
5194
|
+
readonly tick: MapTick
|
|
5050
5195
|
}
|
|
5051
5196
|
/**
|
|
5052
5197
|
* Called when a unit is removed from a unit group.
|
|
5053
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5198
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_unit_removed_from_group Online documentation}
|
|
5054
5199
|
*/
|
|
5055
5200
|
interface OnUnitRemovedFromGroupEvent extends EventData {
|
|
5056
5201
|
readonly unit: LuaEntity
|
|
5057
5202
|
readonly group: LuaCommandable
|
|
5058
5203
|
/**
|
|
5059
|
-
* Identifier of the event
|
|
5204
|
+
* Identifier of the event.
|
|
5060
5205
|
*/
|
|
5061
5206
|
readonly name: typeof defines.events.on_unit_removed_from_group
|
|
5062
5207
|
/**
|
|
5063
5208
|
* Tick the event was generated.
|
|
5064
5209
|
*/
|
|
5065
|
-
readonly tick:
|
|
5210
|
+
readonly tick: MapTick
|
|
5066
5211
|
}
|
|
5067
5212
|
/**
|
|
5068
5213
|
* Called when a worker (construction or logistic) robot expires through a lack of energy.
|
|
5069
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5214
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#on_worker_robot_expired Online documentation}
|
|
5070
5215
|
*/
|
|
5071
5216
|
interface OnWorkerRobotExpiredEvent extends EventData {
|
|
5072
5217
|
readonly robot: LuaEntity
|
|
5073
5218
|
/**
|
|
5074
|
-
* Identifier of the event
|
|
5219
|
+
* Identifier of the event.
|
|
5075
5220
|
*/
|
|
5076
5221
|
readonly name: typeof defines.events.on_worker_robot_expired
|
|
5077
5222
|
/**
|
|
5078
5223
|
* Tick the event was generated.
|
|
5079
5224
|
*/
|
|
5080
|
-
readonly tick:
|
|
5225
|
+
readonly tick: MapTick
|
|
5081
5226
|
}
|
|
5082
5227
|
/**
|
|
5083
5228
|
* 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}.
|
|
5084
5229
|
*
|
|
5085
5230
|
* Event filter: [LuaScriptRaisedBuiltEventFilter](LuaScriptRaisedBuiltEventFilter]
|
|
5086
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5231
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#script_raised_built Online documentation}
|
|
5087
5232
|
*/
|
|
5088
5233
|
interface ScriptRaisedBuiltEvent extends EventData {
|
|
5089
5234
|
/**
|
|
@@ -5091,19 +5236,19 @@ declare module "factorio:runtime" {
|
|
|
5091
5236
|
*/
|
|
5092
5237
|
readonly entity: LuaEntity
|
|
5093
5238
|
/**
|
|
5094
|
-
* Identifier of the event
|
|
5239
|
+
* Identifier of the event.
|
|
5095
5240
|
*/
|
|
5096
5241
|
readonly name: typeof defines.events.script_raised_built
|
|
5097
5242
|
/**
|
|
5098
5243
|
* Tick the event was generated.
|
|
5099
5244
|
*/
|
|
5100
|
-
readonly tick:
|
|
5245
|
+
readonly tick: MapTick
|
|
5101
5246
|
}
|
|
5102
5247
|
/**
|
|
5103
5248
|
* 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}.
|
|
5104
5249
|
*
|
|
5105
5250
|
* Event filter: [LuaScriptRaisedDestroyEventFilter](LuaScriptRaisedDestroyEventFilter]
|
|
5106
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5251
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#script_raised_destroy Online documentation}
|
|
5107
5252
|
*/
|
|
5108
5253
|
interface ScriptRaisedDestroyEvent extends EventData {
|
|
5109
5254
|
/**
|
|
@@ -5111,19 +5256,19 @@ declare module "factorio:runtime" {
|
|
|
5111
5256
|
*/
|
|
5112
5257
|
readonly entity: LuaEntity
|
|
5113
5258
|
/**
|
|
5114
|
-
* Identifier of the event
|
|
5259
|
+
* Identifier of the event.
|
|
5115
5260
|
*/
|
|
5116
5261
|
readonly name: typeof defines.events.script_raised_destroy
|
|
5117
5262
|
/**
|
|
5118
5263
|
* Tick the event was generated.
|
|
5119
5264
|
*/
|
|
5120
|
-
readonly tick:
|
|
5265
|
+
readonly tick: MapTick
|
|
5121
5266
|
}
|
|
5122
5267
|
/**
|
|
5123
5268
|
* A static event that mods can use to tell other mods they destroyed a segmented unit by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event}, or {@link LuaBootstrap#raise_script_destroy_segmented_unit LuaBootstrap::raise_script_destroy_segmented_unit}, or when `raise_destroy` is passed to {@link LuaSegmentedUnit#destroy LuaSegmentedUnit::destroy}.
|
|
5124
5269
|
*
|
|
5125
5270
|
* Event filter: [LuaScriptRaisedDestroySegmentedUnitEventFilter](LuaScriptRaisedDestroySegmentedUnitEventFilter]
|
|
5126
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5271
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#script_raised_destroy_segmented_unit Online documentation}
|
|
5127
5272
|
*/
|
|
5128
5273
|
interface ScriptRaisedDestroySegmentedUnitEvent extends EventData {
|
|
5129
5274
|
/**
|
|
@@ -5131,19 +5276,19 @@ declare module "factorio:runtime" {
|
|
|
5131
5276
|
*/
|
|
5132
5277
|
readonly segmented_unit: LuaSegmentedUnit
|
|
5133
5278
|
/**
|
|
5134
|
-
* Identifier of the event
|
|
5279
|
+
* Identifier of the event.
|
|
5135
5280
|
*/
|
|
5136
5281
|
readonly name: typeof defines.events.script_raised_destroy_segmented_unit
|
|
5137
5282
|
/**
|
|
5138
5283
|
* Tick the event was generated.
|
|
5139
5284
|
*/
|
|
5140
|
-
readonly tick:
|
|
5285
|
+
readonly tick: MapTick
|
|
5141
5286
|
}
|
|
5142
5287
|
/**
|
|
5143
5288
|
* 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}.
|
|
5144
5289
|
*
|
|
5145
5290
|
* Event filter: [LuaScriptRaisedReviveEventFilter](LuaScriptRaisedReviveEventFilter]
|
|
5146
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5291
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#script_raised_revive Online documentation}
|
|
5147
5292
|
*/
|
|
5148
5293
|
interface ScriptRaisedReviveEvent extends EventData {
|
|
5149
5294
|
/**
|
|
@@ -5155,17 +5300,17 @@ declare module "factorio:runtime" {
|
|
|
5155
5300
|
*/
|
|
5156
5301
|
readonly tags?: Tags
|
|
5157
5302
|
/**
|
|
5158
|
-
* Identifier of the event
|
|
5303
|
+
* Identifier of the event.
|
|
5159
5304
|
*/
|
|
5160
5305
|
readonly name: typeof defines.events.script_raised_revive
|
|
5161
5306
|
/**
|
|
5162
5307
|
* Tick the event was generated.
|
|
5163
5308
|
*/
|
|
5164
|
-
readonly tick:
|
|
5309
|
+
readonly tick: MapTick
|
|
5165
5310
|
}
|
|
5166
5311
|
/**
|
|
5167
5312
|
* 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}.
|
|
5168
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5313
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#script_raised_set_tiles Online documentation}
|
|
5169
5314
|
*/
|
|
5170
5315
|
interface ScriptRaisedSetTilesEvent extends EventData {
|
|
5171
5316
|
/**
|
|
@@ -5177,19 +5322,19 @@ declare module "factorio:runtime" {
|
|
|
5177
5322
|
*/
|
|
5178
5323
|
readonly tiles: Tile[]
|
|
5179
5324
|
/**
|
|
5180
|
-
* Identifier of the event
|
|
5325
|
+
* Identifier of the event.
|
|
5181
5326
|
*/
|
|
5182
5327
|
readonly name: typeof defines.events.script_raised_set_tiles
|
|
5183
5328
|
/**
|
|
5184
5329
|
* Tick the event was generated.
|
|
5185
5330
|
*/
|
|
5186
|
-
readonly tick:
|
|
5331
|
+
readonly tick: MapTick
|
|
5187
5332
|
}
|
|
5188
5333
|
/**
|
|
5189
5334
|
* A static event mods can use to tell other mods they teleported something by script. This event is only raised if a mod does so with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event} or {@link LuaBootstrap#raise_script_teleported LuaBootstrap::raise_script_teleported}, or when `raise_teleported` is passed to {@link LuaControl#teleport LuaControl::teleport}.
|
|
5190
5335
|
*
|
|
5191
5336
|
* Event filter: [LuaScriptRaisedTeleportedEventFilter](LuaScriptRaisedTeleportedEventFilter]
|
|
5192
|
-
* @see {@link https://lua-api.factorio.com/2.
|
|
5337
|
+
* @see {@link https://lua-api.factorio.com/2.1.7/events.html#script_raised_teleported Online documentation}
|
|
5193
5338
|
*/
|
|
5194
5339
|
interface ScriptRaisedTeleportedEvent extends EventData {
|
|
5195
5340
|
/**
|
|
@@ -5205,12 +5350,12 @@ declare module "factorio:runtime" {
|
|
|
5205
5350
|
*/
|
|
5206
5351
|
readonly old_position: MapPosition
|
|
5207
5352
|
/**
|
|
5208
|
-
* Identifier of the event
|
|
5353
|
+
* Identifier of the event.
|
|
5209
5354
|
*/
|
|
5210
5355
|
readonly name: typeof defines.events.script_raised_teleported
|
|
5211
5356
|
/**
|
|
5212
5357
|
* Tick the event was generated.
|
|
5213
5358
|
*/
|
|
5214
|
-
readonly tick:
|
|
5359
|
+
readonly tick: MapTick
|
|
5215
5360
|
}
|
|
5216
5361
|
}
|