typed-factorio 1.9.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",
@@ -33,22 +33,22 @@
33
33
  "typescript-to-lua": "^1.6.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/jest": "^29.1.2",
37
- "@types/node": "^18.8.4",
36
+ "@types/jest": "^29.2.2",
37
+ "@types/node": "^18.11.9",
38
38
  "@types/prettier": "^2.7.1",
39
- "@typescript-eslint/eslint-plugin": "^5.40.0",
40
- "@typescript-eslint/parser": "^5.40.0",
41
- "chalk": "^5.1.0",
42
- "eslint": "~8.25.0",
39
+ "@typescript-eslint/eslint-plugin": "^5.42.0",
40
+ "@typescript-eslint/parser": "^5.42.0",
41
+ "chalk": "^5.1.2",
42
+ "eslint": "~8.26.0",
43
43
  "eslint-config-prettier": "^8.5.0",
44
44
  "eslint-config-standard": "^17.0.0",
45
- "eslint-import-resolver-typescript": "^3.5.1",
45
+ "eslint-import-resolver-typescript": "^3.5.2",
46
46
  "eslint-plugin-import": "^2.26.0",
47
- "eslint-plugin-n": "^15.3.0",
47
+ "eslint-plugin-n": "^15.4.0",
48
48
  "eslint-plugin-node": "^11.1.0",
49
49
  "eslint-plugin-prettier": "^4.2.1",
50
- "eslint-plugin-promise": "^6.0.1",
51
- "jest": "^29.1.2",
50
+ "eslint-plugin-promise": "^6.1.1",
51
+ "jest": "^29.2.2",
52
52
  "lua-types": "^2.13.0",
53
53
  "prettier": "^2.7.1",
54
54
  "rimraf": "^3.0.2",
@@ -204,7 +204,7 @@ interface LuaAutoplaceControlPrototype {
204
204
  interface LuaBootstrap {
205
205
  /**
206
206
  * Register a function to be run on mod initialization. This is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to {@link LuaGameScript} and the {@linkplain https://lua-api.factorio.com/latest/Global.html global} table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.
207
- * @param f The handler for this event. Passing `nil` will unregister it.
207
+ * @param handler The handler for this event. Passing `nil` will unregister it.
208
208
  * @example Initialize a `players` table in `global` for later use.
209
209
  *
210
210
  * ```
@@ -215,7 +215,7 @@ interface LuaBootstrap {
215
215
  * @remarks For more context, refer to the {@linkplain https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
216
216
  * @see {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_init Online documentation}
217
217
  */
218
- on_init(f: (() => void) | nil): void
218
+ on_init(handler: (() => void) | nil): void
219
219
  /**
220
220
  * Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to {@link LuaGameScript} is not available. The {@linkplain https://lua-api.factorio.com/latest/Global.html global} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
221
221
  *
@@ -225,11 +225,11 @@ interface LuaBootstrap {
225
225
  * - Create local references to data stored in the {@linkplain https://lua-api.factorio.com/latest/Global.html global} table.
226
226
  *
227
227
  * For all other purposes, {@link LuaBootstrap#on_init LuaBootstrap::on_init}, {@link LuaBootstrap#on_configuration_changed LuaBootstrap::on_configuration_changed} or {@linkplain https://lua-api.factorio.com/latest/Migrations.html migrations} should be used instead.
228
- * @param f The handler for this event. Passing `nil` will unregister it.
228
+ * @param handler The handler for this event. Passing `nil` will unregister it.
229
229
  * @remarks For more context, refer to the {@linkplain https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
230
230
  * @see {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_load Online documentation}
231
231
  */
232
- on_load(f: (() => void) | nil): void
232
+ on_load(handler: (() => void) | nil): void
233
233
  /**
234
234
  * Register a metatable to have linkage recorded and restored when saving/loading. The metatable itself will not be saved. Instead, only the linkage to a registered metatable is saved, and the metatable registered under that name will be used when loading the table.
235
235
  * @param name The name of this metatable. Names must be unique per mod.
@@ -240,15 +240,15 @@ interface LuaBootstrap {
240
240
  register_metatable(name: string, metatable: table): void
241
241
  /**
242
242
  * Register a function to be run when mod configuration changes. This is called when the major game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, or when any prototypes have been added or removed. It allows the mod to make any changes it deems appropriate to both the data structures in its {@linkplain https://lua-api.factorio.com/latest/Global.html global} table or to the game state through {@link LuaGameScript}.
243
- * @param f The handler for this event. Passing `nil` will unregister it.
243
+ * @param handler The handler for this event. Passing `nil` will unregister it.
244
244
  * @remarks For more context, refer to the {@linkplain https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
245
245
  * @see {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_configuration_changed Online documentation}
246
246
  */
247
- on_configuration_changed(f: ((arg1: ConfigurationChangedData) => void) | nil): void
247
+ on_configuration_changed(handler: ((arg1: ConfigurationChangedData) => void) | nil): void
248
248
  /**
249
249
  * Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
250
250
  * @param event The event(s) or custom-input to invoke the handler on.
251
- * @param f The handler for this event. Passing `nil` will unregister it.
251
+ * @param handler The handler for this event. Passing `nil` will unregister it.
252
252
  * @param filters The filters for this event. Can only be used when registering for individual events.
253
253
  * @example Register for the {@link OnTickEvent on_tick} event to print the current tick to console each tick.
254
254
  *
@@ -275,10 +275,10 @@ interface LuaBootstrap {
275
275
  /**
276
276
  * Register a handler to run every nth-tick(s). When the game is on tick 0 it will trigger all registered handlers.
277
277
  * @param tick The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.
278
- * @param f The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).
278
+ * @param handler The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).
279
279
  * @see {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_nth_tick Online documentation}
280
280
  */
281
- on_nth_tick(tick: uint | readonly uint[] | nil, f: ((arg1: NthTickEventData) => void) | nil): void
281
+ on_nth_tick(tick: uint | readonly uint[] | nil, handler: ((arg1: NthTickEventData) => void) | nil): void
282
282
  /**
283
283
  * Registers an entity so that after it's destroyed, {@link OnEntityDestroyedEvent on_entity_destroyed} is called. Once an entity is registered, it stays registered until it is actually destroyed, even through save/load cycles. The registration is global across all mods, meaning once one mod registers an entity, all mods listening to {@link OnEntityDestroyedEvent on_entity_destroyed} will receive the event when it is destroyed. Registering the same entity multiple times will still only fire the destruction event once, and will return the same registration number.
284
284
  * @param entity The entity to register.
@@ -1992,7 +1992,7 @@ interface LuaEntity extends LuaControl {
1992
1992
  * _Can only be used if this is EntityWithHealth_
1993
1993
  * @param damage The amount of damage to be done.
1994
1994
  * @param force The force that will be doing the damage.
1995
- * @param type The type of damage to be done, defaults to "impact".
1995
+ * @param type The type of damage to be done, defaults to "impact". Can't be `nil`.
1996
1996
  * @param dealer The entity to consider as the damage dealer. Needs to be on the same surface as the entity being damaged.
1997
1997
  * @returns the total damage actually applied after resistances.
1998
1998
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.damage Online documentation}
@@ -5130,7 +5130,7 @@ interface EntityWithHealthEntity extends BaseEntity {
5130
5130
  * _Can only be used if this is EntityWithHealth_
5131
5131
  * @param damage The amount of damage to be done.
5132
5132
  * @param force The force that will be doing the damage.
5133
- * @param type The type of damage to be done, defaults to "impact".
5133
+ * @param type The type of damage to be done, defaults to "impact". Can't be `nil`.
5134
5134
  * @param dealer The entity to consider as the damage dealer. Needs to be on the same surface as the entity being damaged.
5135
5135
  * @returns the total damage actually applied after resistances.
5136
5136
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.damage Online documentation}
@@ -11865,14 +11865,14 @@ interface LuaGameScript {
11865
11865
  */
11866
11866
  create_force(force: string): LuaForce
11867
11867
  /**
11868
- * Marks two forces to be merged together. All entities in the source force will be reassigned to the target force. The source force will then be destroyed.
11868
+ * Marks two forces to be merged together. All players and entities in the source force will be reassigned to the target force. The source force will then be destroyed. Importantly, this does not merge technologies or bonuses, which are instead retained from the target force.
11869
11869
  *
11870
11870
  * **Raised events:**
11871
11871
  * - {@link OnForcesMergingEvent on_forces_merging} _future_tick_
11872
11872
  * - {@link OnForcesMergedEvent on_forces_merged} _future_tick_
11873
11873
  * @param source The force to remove.
11874
11874
  * @param destination The force to reassign all entities to.
11875
- * @remarks The three built-in forces -- player, enemy and neutral -- can't be destroyed. I.e. they can't be used as the source argument to this function.<br>The source force is not removed until the end of the current tick, or if called during the {@link OnForcesMergingEvent on_forces_merging} or {@link OnForcesMergedEvent on_forces_merged} event, the end of the next tick.
11875
+ * @remarks The three built-in forces (player, enemy and neutral) can't be destroyed, meaning they can't be used as the source argument to this function.<br>The source force is not removed until the end of the current tick, or if called during the {@link OnForcesMergingEvent on_forces_merging} or {@link OnForcesMergedEvent on_forces_merged} event, the end of the next tick.
11876
11876
  * @see {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.merge_forces Online documentation}
11877
11877
  */
11878
11878
  merge_forces(source: ForceIdentification, destination: ForceIdentification): void
@@ -13641,6 +13641,11 @@ interface DropDownGuiElementMembers extends BaseGuiElement {
13641
13641
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_item Online documentation}
13642
13642
  */
13643
13643
  remove_item(index: uint): void
13644
+ /**
13645
+ * Closes the dropdown list if this is a dropdown and it is open.
13646
+ * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.close_dropdown Online documentation}
13647
+ */
13648
+ close_dropdown(): void
13644
13649
  /**
13645
13650
  * The items in this dropdown or listbox.
13646
13651
  *
@@ -15374,6 +15379,13 @@ interface LuaItemPrototype {
15374
15379
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color Online documentation}
15375
15380
  */
15376
15381
  readonly reverse_selection_border_color?: Color
15382
+ /**
15383
+ * The color used when doing alt reverse selection with this selection tool prototype.
15384
+ *
15385
+ * _Can only be used if this is SelectionTool_
15386
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_border_color Online documentation}
15387
+ */
15388
+ readonly alt_reverse_selection_border_color?: Color
15377
15389
  /**
15378
15390
  * Flags that affect which entities will be selected.
15379
15391
  *
@@ -15395,6 +15407,13 @@ interface LuaItemPrototype {
15395
15407
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags Online documentation}
15396
15408
  */
15397
15409
  readonly reverse_selection_mode_flags?: SelectionModeFlags
15410
+ /**
15411
+ * Flags that affect which entities will be selected during alt reverse selection.
15412
+ *
15413
+ * _Can only be used if this is SelectionTool_
15414
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_mode_flags Online documentation}
15415
+ */
15416
+ readonly alt_reverse_selection_mode_flags?: SelectionModeFlags
15398
15417
  /**
15399
15418
  * _Can only be used if this is SelectionTool_
15400
15419
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.selection_cursor_box_type Online documentation}
@@ -15410,6 +15429,11 @@ interface LuaItemPrototype {
15410
15429
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type Online documentation}
15411
15430
  */
15412
15431
  readonly reverse_selection_cursor_box_type?: string
15432
+ /**
15433
+ * _Can only be used if this is SelectionTool_
15434
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_cursor_box_type Online documentation}
15435
+ */
15436
+ readonly alt_reverse_selection_cursor_box_type?: string
15413
15437
  /**
15414
15438
  * If tiles area always included when doing selection with this selection tool prototype.
15415
15439
  *
@@ -15438,6 +15462,13 @@ interface LuaItemPrototype {
15438
15462
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode Online documentation}
15439
15463
  */
15440
15464
  readonly reverse_alt_entity_filter_mode?: string
15465
+ /**
15466
+ * The alt reverse entity filter mode used by this selection tool.
15467
+ *
15468
+ * _Can only be used if this is SelectionTool_
15469
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_alt_entity_filter_mode Online documentation}
15470
+ */
15471
+ readonly alt_reverse_alt_entity_filter_mode?: string
15441
15472
  /**
15442
15473
  * The tile filter mode used by this selection tool.
15443
15474
  *
@@ -15459,6 +15490,13 @@ interface LuaItemPrototype {
15459
15490
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode Online documentation}
15460
15491
  */
15461
15492
  readonly reverse_tile_filter_mode?: string
15493
+ /**
15494
+ * The alt reverse tile filter mode used by this selection tool.
15495
+ *
15496
+ * _Can only be used if this is SelectionTool_
15497
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_tile_filter_mode Online documentation}
15498
+ */
15499
+ readonly alt_reverse_tile_filter_mode?: string
15462
15500
  /**
15463
15501
  * The entity filters used by this selection tool indexed by entity name.
15464
15502
  *
@@ -15480,6 +15518,13 @@ interface LuaItemPrototype {
15480
15518
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters Online documentation}
15481
15519
  */
15482
15520
  readonly reverse_entity_filters?: Record<string, LuaEntityPrototype>
15521
+ /**
15522
+ * The alt reverse entity filters used by this selection tool indexed by entity name.
15523
+ *
15524
+ * _Can only be used if this is SelectionTool_
15525
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_entity_filters Online documentation}
15526
+ */
15527
+ readonly alt_reverse_entity_filters?: Record<string, LuaEntityPrototype>
15483
15528
  /**
15484
15529
  * The entity type filters used by this selection tool indexed by entity type.
15485
15530
  *
@@ -15504,6 +15549,14 @@ interface LuaItemPrototype {
15504
15549
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters Online documentation}
15505
15550
  */
15506
15551
  readonly reverse_entity_type_filters?: Record<string, boolean>
15552
+ /**
15553
+ * The alt reverse entity type filters used by this selection tool indexed by entity type.
15554
+ *
15555
+ * _Can only be used if this is SelectionTool_
15556
+ * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15557
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_entity_type_filters Online documentation}
15558
+ */
15559
+ readonly alt_reverse_entity_type_filters?: Record<string, boolean>
15507
15560
  /**
15508
15561
  * The tile filters used by this selection tool indexed by tile name.
15509
15562
  *
@@ -15525,6 +15578,13 @@ interface LuaItemPrototype {
15525
15578
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters Online documentation}
15526
15579
  */
15527
15580
  readonly reverse_tile_filters?: Record<string, LuaTilePrototype>
15581
+ /**
15582
+ * The alt reverse tile filters used by this selection tool indexed by tile name.
15583
+ *
15584
+ * _Can only be used if this is SelectionTool_
15585
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_tile_filters Online documentation}
15586
+ */
15587
+ readonly alt_reverse_tile_filters?: Record<string, LuaTilePrototype>
15528
15588
  /**
15529
15589
  * The number of entity filters this deconstruction item has.
15530
15590
  *
@@ -15948,6 +16008,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15948
16008
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color Online documentation}
15949
16009
  */
15950
16010
  readonly reverse_selection_border_color?: Color
16011
+ /**
16012
+ * The color used when doing alt reverse selection with this selection tool prototype.
16013
+ *
16014
+ * _Can only be used if this is SelectionTool_
16015
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_border_color Online documentation}
16016
+ */
16017
+ readonly alt_reverse_selection_border_color?: Color
15951
16018
  /**
15952
16019
  * Flags that affect which entities will be selected.
15953
16020
  *
@@ -15969,6 +16036,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15969
16036
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags Online documentation}
15970
16037
  */
15971
16038
  readonly reverse_selection_mode_flags?: SelectionModeFlags
16039
+ /**
16040
+ * Flags that affect which entities will be selected during alt reverse selection.
16041
+ *
16042
+ * _Can only be used if this is SelectionTool_
16043
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_mode_flags Online documentation}
16044
+ */
16045
+ readonly alt_reverse_selection_mode_flags?: SelectionModeFlags
15972
16046
  /**
15973
16047
  * _Can only be used if this is SelectionTool_
15974
16048
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.selection_cursor_box_type Online documentation}
@@ -15984,6 +16058,11 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15984
16058
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type Online documentation}
15985
16059
  */
15986
16060
  readonly reverse_selection_cursor_box_type?: string
16061
+ /**
16062
+ * _Can only be used if this is SelectionTool_
16063
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_selection_cursor_box_type Online documentation}
16064
+ */
16065
+ readonly alt_reverse_selection_cursor_box_type?: string
15987
16066
  /**
15988
16067
  * If tiles area always included when doing selection with this selection tool prototype.
15989
16068
  *
@@ -16012,6 +16091,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16012
16091
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode Online documentation}
16013
16092
  */
16014
16093
  readonly reverse_alt_entity_filter_mode?: string
16094
+ /**
16095
+ * The alt reverse entity filter mode used by this selection tool.
16096
+ *
16097
+ * _Can only be used if this is SelectionTool_
16098
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_alt_entity_filter_mode Online documentation}
16099
+ */
16100
+ readonly alt_reverse_alt_entity_filter_mode?: string
16015
16101
  /**
16016
16102
  * The tile filter mode used by this selection tool.
16017
16103
  *
@@ -16033,6 +16119,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16033
16119
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode Online documentation}
16034
16120
  */
16035
16121
  readonly reverse_tile_filter_mode?: string
16122
+ /**
16123
+ * The alt reverse tile filter mode used by this selection tool.
16124
+ *
16125
+ * _Can only be used if this is SelectionTool_
16126
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_tile_filter_mode Online documentation}
16127
+ */
16128
+ readonly alt_reverse_tile_filter_mode?: string
16036
16129
  /**
16037
16130
  * The entity filters used by this selection tool indexed by entity name.
16038
16131
  *
@@ -16054,6 +16147,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16054
16147
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters Online documentation}
16055
16148
  */
16056
16149
  readonly reverse_entity_filters?: Record<string, LuaEntityPrototype>
16150
+ /**
16151
+ * The alt reverse entity filters used by this selection tool indexed by entity name.
16152
+ *
16153
+ * _Can only be used if this is SelectionTool_
16154
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_entity_filters Online documentation}
16155
+ */
16156
+ readonly alt_reverse_entity_filters?: Record<string, LuaEntityPrototype>
16057
16157
  /**
16058
16158
  * The entity type filters used by this selection tool indexed by entity type.
16059
16159
  *
@@ -16078,6 +16178,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16078
16178
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters Online documentation}
16079
16179
  */
16080
16180
  readonly reverse_entity_type_filters?: Record<string, boolean>
16181
+ /**
16182
+ * The alt reverse entity type filters used by this selection tool indexed by entity type.
16183
+ *
16184
+ * _Can only be used if this is SelectionTool_
16185
+ * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16186
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_entity_type_filters Online documentation}
16187
+ */
16188
+ readonly alt_reverse_entity_type_filters?: Record<string, boolean>
16081
16189
  /**
16082
16190
  * The tile filters used by this selection tool indexed by tile name.
16083
16191
  *
@@ -16099,6 +16207,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16099
16207
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters Online documentation}
16100
16208
  */
16101
16209
  readonly reverse_tile_filters?: Record<string, LuaTilePrototype>
16210
+ /**
16211
+ * The alt reverse tile filters used by this selection tool indexed by tile name.
16212
+ *
16213
+ * _Can only be used if this is SelectionTool_
16214
+ * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_reverse_tile_filters Online documentation}
16215
+ */
16216
+ readonly alt_reverse_tile_filters?: Record<string, LuaTilePrototype>
16102
16217
  }
16103
16218
 
16104
16219
  interface DeconstructionItemPrototype extends BaseItemPrototype {
@@ -17791,7 +17906,7 @@ interface LuaLogisticCell {
17791
17906
  */
17792
17907
  interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
17793
17908
  /**
17794
- * The circuit mode of operations for the logistic container.
17909
+ * The circuit mode of operations for the logistic container. Can only be set on containers whose {@link LuaEntityPrototype#logistic_mode logistic_mode} is set to "requester".
17795
17910
  * @see {@link https://lua-api.factorio.com/latest/LuaLogisticContainerControlBehavior.html#LuaLogisticContainerControlBehavior.circuit_mode_of_operation Online documentation}
17796
17911
  */
17797
17912
  circuit_mode_of_operation: defines.control_behavior.logistic_container.circuit_mode_of_operation
@@ -18695,7 +18810,7 @@ interface LuaPlayer extends LuaControl {
18695
18810
  */
18696
18811
  pipette_entity(entity: string | LuaEntity | LuaEntityPrototype): boolean
18697
18812
  /**
18698
- * Checks if this player can build the give entity at the given location on the surface the player is on.
18813
+ * Checks if this player can build the given entity at the given location on the surface the player is on.
18699
18814
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_place_entity Online documentation}
18700
18815
  */
18701
18816
  can_place_entity(params: {
@@ -18970,8 +19085,6 @@ interface LuaPlayer extends LuaControl {
18970
19085
  get_infinity_inventory_filter(index: uint): InfinityInventoryFilter | nil
18971
19086
  /**
18972
19087
  * Sets the filter for this map editor infinity filters at the given index.
18973
- *
18974
- * _Can only be used if this is InfinityContainer_
18975
19088
  * @param index The index to set.
18976
19089
  * @param filter The new filter or `nil` to clear the filter.
18977
19090
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_infinity_inventory_filter Online documentation}
@@ -1134,11 +1134,11 @@ interface BlueprintEntity {
1134
1134
  readonly bar?: uint16
1135
1135
  /** Cargo wagon inventory configuration */
1136
1136
  readonly inventory?: BlueprintInventory
1137
- /** Used by {@link https://wiki.factorio.com/Prototype/InfinityContainer Prototype/InfinityContainer}. */
1138
- readonly infinity_settings?: BlueprintInfinitySettings
1139
- /** Type of the underground belt or loader. Either "input" or "output". */
1137
+ /** ;Used by {@link https://wiki.factorio.com/Prototype/InfinityContainer Prototype/InfinityContainer}. */
1138
+ readonly infinity_settings?: BlueprintInfinitySettings | InfinityPipeFilter
1139
+ /** ;Type of the underground belt or loader. Either "input" or "output". */
1140
1140
  readonly type?: "input" | "output"
1141
- /** Input priority of the splitter. Either "right" or "left", "none" is omitted. */
1141
+ /** ;Input priority of the splitter. Either "right" or "left", "none" is omitted. */
1142
1142
  readonly input_priority?: "right" | "left"
1143
1143
  /** Output priority of the splitter. Either "right" or "left", "none" is omitted. */
1144
1144
  readonly output_priority?: "right" | "left"
@@ -1320,11 +1320,11 @@ interface BlueprintEntityWrite {
1320
1320
  readonly bar?: uint16
1321
1321
  /** Cargo wagon inventory configuration */
1322
1322
  readonly inventory?: BlueprintInventory
1323
- /** Used by {@link https://wiki.factorio.com/Prototype/InfinityContainer Prototype/InfinityContainer}. */
1324
- readonly infinity_settings?: BlueprintInfinitySettings
1325
- /** Type of the underground belt or loader. Either "input" or "output". */
1323
+ /** ;Used by {@link https://wiki.factorio.com/Prototype/InfinityContainer Prototype/InfinityContainer}. */
1324
+ readonly infinity_settings?: BlueprintInfinitySettings | InfinityPipeFilter
1325
+ /** ;Type of the underground belt or loader. Either "input" or "output". */
1326
1326
  readonly type?: "input" | "output"
1327
- /** Input priority of the splitter. Either "right" or "left", "none" is omitted. */
1327
+ /** ;Input priority of the splitter. Either "right" or "left", "none" is omitted. */
1328
1328
  readonly input_priority?: "right" | "left"
1329
1329
  /** Output priority of the splitter. Either "right" or "left", "none" is omitted. */
1330
1330
  readonly output_priority?: "right" | "left"
@@ -2290,7 +2290,7 @@ interface InfinityInventoryFilter {
2290
2290
  */
2291
2291
  readonly mode?: "at-least" | "at-most" | "exactly"
2292
2292
  /**
2293
- * The index of this filter in the filters list.
2293
+ * The index of this filter in the filters list. Not required when writing a filter.
2294
2294
  */
2295
2295
  readonly index: uint
2296
2296
  }
@@ -1323,6 +1323,10 @@ declare namespace defines {
1323
1323
  * Event type: {@link OnPlayerReverseSelectedAreaEvent}
1324
1324
  */
1325
1325
  const on_player_reverse_selected_area: EventId<OnPlayerReverseSelectedAreaEvent>
1326
+ /**
1327
+ * Event type: {@link OnPlayerAltReverseSelectedAreaEvent}
1328
+ */
1329
+ const on_player_alt_reverse_selected_area: EventId<OnPlayerAltReverseSelectedAreaEvent>
1326
1330
  }
1327
1331
  /**
1328
1332
  * See the {@linkplain https://lua-api.factorio.com/latest/events.html events page} for more info on what events contain and when they get raised.
@@ -1377,6 +1381,7 @@ declare namespace defines {
1377
1381
  add_permission_group,
1378
1382
  add_train_station,
1379
1383
  admin_action,
1384
+ alt_reverse_select_area,
1380
1385
  alt_select_area,
1381
1386
  alt_select_blueprint_entities,
1382
1387
  alternative_copy,
@@ -1537,6 +1537,45 @@ interface OnPickedUpItemEvent extends EventData {
1537
1537
  readonly tick: uint
1538
1538
  }
1539
1539
 
1540
+ /**
1541
+ * Called after a player alt-reverse-selects an area with a selection-tool item.
1542
+ * @see {@link https://lua-api.factorio.com/latest/events.html#on_player_alt_reverse_selected_area Online documentation}
1543
+ */
1544
+ interface OnPlayerAltReverseSelectedAreaEvent extends EventData {
1545
+ /**
1546
+ * The player doing the selection.
1547
+ */
1548
+ readonly player_index: PlayerIndex
1549
+ /**
1550
+ * The surface selected.
1551
+ */
1552
+ readonly surface: LuaSurface
1553
+ /**
1554
+ * The area selected.
1555
+ */
1556
+ readonly area: BoundingBox
1557
+ /**
1558
+ * The item used to select the area.
1559
+ */
1560
+ readonly item: string
1561
+ /**
1562
+ * The entities selected.
1563
+ */
1564
+ readonly entities: LuaEntity[]
1565
+ /**
1566
+ * The tiles selected.
1567
+ */
1568
+ readonly tiles: LuaTile[]
1569
+ /**
1570
+ * Identifier of the event
1571
+ */
1572
+ readonly name: typeof defines.events.on_player_alt_reverse_selected_area
1573
+ /**
1574
+ * Tick the event was generated.
1575
+ */
1576
+ readonly tick: uint
1577
+ }
1578
+
1540
1579
  /**
1541
1580
  * Called after a player alt-selects an area with a selection-tool item.
1542
1581
  * @see {@link https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area Online documentation}