typed-factorio 1.8.1 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.
@@ -618,6 +618,10 @@ interface LuaBurner {
618
618
  * @noSelf
619
619
  */
620
620
  interface LuaBurnerPrototype {
621
+ /**
622
+ * The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
623
+ * @see {@link https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.emissions Online documentation}
624
+ */
621
625
  readonly emissions: double
622
626
  readonly render_no_network_icon: boolean
623
627
  readonly render_no_power_icon: boolean
@@ -680,7 +684,7 @@ interface LuaBurnerPrototype {
680
684
  interface LuaChunkIterator extends LuaIterable<ChunkPositionAndArea> {
681
685
  /**
682
686
  * Gets the next chunk position if the iterator is not yet done and increments the it.
683
- * @see {@link https://lua-api.factorio.com/latest/LuaChunkIterator.html#LuaChunkIterator.operator%20() Online documentation}
687
+ * @see {@link https://lua-api.factorio.com/latest/LuaChunkIterator.html#LuaChunkIterator.call_operator Online documentation}
684
688
  */
685
689
  (): ChunkPositionAndArea | nil
686
690
  /**
@@ -1182,14 +1186,14 @@ interface LuaControl {
1182
1186
  */
1183
1187
  set_vehicle_logistic_slot(slot_index: uint, value: LogisticParameters): boolean
1184
1188
  /**
1185
- * Gets the parameters of a personal logistic request and auto-trash slot. Only used on `spider-vehicle`.
1189
+ * Gets the parameters of a personal logistic request and auto-trash slot.
1186
1190
  * @param slot_index The slot to get.
1187
1191
  * @returns The logistic parameters. If personal logistics are not researched yet, their `name` will be `nil`.
1188
1192
  * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_personal_logistic_slot Online documentation}
1189
1193
  */
1190
1194
  get_personal_logistic_slot(slot_index: uint): LogisticParameters
1191
1195
  /**
1192
- * Gets the parameters of a vehicle logistic request and auto-trash slot.
1196
+ * Gets the parameters of a vehicle logistic request and auto-trash slot. Only used on `spider-vehicle`.
1193
1197
  * @param slot_index The slot to get.
1194
1198
  * @returns The logistic parameters. If the vehicle does not use logistics, their `name` will be `nil`.
1195
1199
  * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_vehicle_logistic_slot Online documentation}
@@ -1265,7 +1269,7 @@ interface LuaControl {
1265
1269
  *
1266
1270
  * **Raised events:**
1267
1271
  * - {@link OnGuiOpenedEvent on_gui_opened}? _instantly_ Raised when writing a valid GUI target to this attribute.
1268
- * @remarks Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory` or `nil`.
1272
+ * @remarks Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory`, `technology`, or `nil`.
1269
1273
  * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.opened Online documentation}
1270
1274
  */
1271
1275
  set opened(
@@ -1277,10 +1281,19 @@ interface LuaControl {
1277
1281
  | LuaPlayer
1278
1282
  | LuaGuiElement
1279
1283
  | LuaInventory
1284
+ | LuaTechnology
1280
1285
  | defines.gui_type
1281
1286
  | nil
1282
1287
  )
1283
- get opened(): LuaEntity | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | LuaInventory | nil
1288
+ get opened():
1289
+ | LuaEntity
1290
+ | LuaEquipment
1291
+ | LuaEquipmentGrid
1292
+ | LuaPlayer
1293
+ | LuaGuiElement
1294
+ | LuaInventory
1295
+ | LuaTechnology
1296
+ | nil
1284
1297
  /**
1285
1298
  * Size of the crafting queue.
1286
1299
  * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.crafting_queue_size Online documentation}
@@ -1311,7 +1324,7 @@ interface LuaControl {
1311
1324
  readonly direction: defines.direction
1312
1325
  }
1313
1326
  /**
1314
- * Current riding state of this car or the vehicle this player is riding in.
1327
+ * Current riding state of this car, or of the car this player is riding in.
1315
1328
  * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.riding_state Online documentation}
1316
1329
  */
1317
1330
  riding_state: RidingState
@@ -1733,7 +1746,7 @@ interface LuaCustomInputPrototype {
1733
1746
  type CustomTableIndexer<K extends string | number, V> =
1734
1747
  /**
1735
1748
  * Access an element of this custom table.
1736
- * @see {@link https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.operator%20[] Online documentation}
1749
+ * @see {@link https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.index_operator Online documentation}
1737
1750
  */
1738
1751
  {
1739
1752
  [P in K]: V
@@ -1745,7 +1758,7 @@ type CustomTableIndexer<K extends string | number, V> =
1745
1758
  interface LuaCustomTableMembers {
1746
1759
  /**
1747
1760
  * Number of elements in this table.
1748
- * @see {@link https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.operator%20# Online documentation}
1761
+ * @see {@link https://lua-api.factorio.com/latest/LuaCustomTable.html#LuaCustomTable.length_operator Online documentation}
1749
1762
  */
1750
1763
  readonly length: LuaLengthMethod<uint>
1751
1764
  /**
@@ -1920,6 +1933,10 @@ interface LuaElectricEnergySourcePrototype {
1920
1933
  readonly input_flow_limit: double
1921
1934
  readonly output_flow_limit: double
1922
1935
  readonly drain: double
1936
+ /**
1937
+ * The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
1938
+ * @see {@link https://lua-api.factorio.com/latest/LuaElectricEnergySourcePrototype.html#LuaElectricEnergySourcePrototype.emissions Online documentation}
1939
+ */
1923
1940
  readonly emissions: double
1924
1941
  readonly render_no_network_icon: boolean
1925
1942
  readonly render_no_power_icon: boolean
@@ -1975,7 +1992,7 @@ interface LuaEntity extends LuaControl {
1975
1992
  * _Can only be used if this is EntityWithHealth_
1976
1993
  * @param damage The amount of damage to be done.
1977
1994
  * @param force The force that will be doing the damage.
1978
- * @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`.
1979
1996
  * @param dealer The entity to consider as the damage dealer. Needs to be on the same surface as the entity being damaged.
1980
1997
  * @returns the total damage actually applied after resistances.
1981
1998
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.damage Online documentation}
@@ -2442,13 +2459,13 @@ interface LuaEntity extends LuaControl {
2442
2459
  /**
2443
2460
  * Set the filter for a slot in an inserter, loader, or logistic storage container.
2444
2461
  * @param slot_index Index of the slot to set the filter for.
2445
- * @param item Prototype name of the item to filter.
2462
+ * @param item Prototype name of the item to filter, or `nil` to clear the filter.
2446
2463
  * @remarks The entity must allow filters.
2447
2464
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_filter Online documentation}
2448
2465
  */
2449
- set_filter(slot_index: uint, item: string): void
2466
+ set_filter(slot_index: uint, item: string | nil): void
2450
2467
  /**
2451
- * Gets the filter for this infinity container at the given index or `nil` if the filter index doesn't exist or is empty.
2468
+ * Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.
2452
2469
  *
2453
2470
  * _Can only be used if this is InfinityContainer_
2454
2471
  * @param index The index to get.
@@ -2460,12 +2477,12 @@ interface LuaEntity extends LuaControl {
2460
2477
  *
2461
2478
  * _Can only be used if this is InfinityContainer_
2462
2479
  * @param index The index to set.
2463
- * @param filter The new filter or `nil` to clear the filter.
2480
+ * @param filter The new filter, or `nil` to clear the filter.
2464
2481
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_infinity_container_filter Online documentation}
2465
2482
  */
2466
2483
  set_infinity_container_filter(index: uint, filter: InfinityInventoryFilter | nil): void
2467
2484
  /**
2468
- * Gets the filter for this infinity pipe or `nil` if the filter is empty.
2485
+ * Gets the filter for this infinity pipe, or `nil` if the filter is empty.
2469
2486
  *
2470
2487
  * _Can only be used if this is InfinityPipe_
2471
2488
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_infinity_pipe_filter Online documentation}
@@ -2475,7 +2492,7 @@ interface LuaEntity extends LuaControl {
2475
2492
  * Sets the filter for this infinity pipe.
2476
2493
  *
2477
2494
  * _Can only be used if this is InfinityPipe_
2478
- * @param filter The new filter or `nil` to clear the filter.
2495
+ * @param filter The new filter, or `nil` to clear the filter.
2479
2496
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_infinity_pipe_filter Online documentation}
2480
2497
  */
2481
2498
  set_infinity_pipe_filter(filter: InfinityPipeFilter | nil): void
@@ -2645,7 +2662,7 @@ interface LuaEntity extends LuaControl {
2645
2662
  /**
2646
2663
  * Gets the passenger of this car or spidertron if any.
2647
2664
  *
2648
- * _Can only be used if this is Vehicle_
2665
+ * _Can only be used if this is Car or SpiderVehicle_
2649
2666
  * @returns `nil` if the vehicle contains no passenger. To check if there's a driver see {@link LuaEntity#get_driver LuaEntity::get_driver}.
2650
2667
  * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
2651
2668
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger Online documentation}
@@ -2657,7 +2674,7 @@ interface LuaEntity extends LuaControl {
2657
2674
  * **Raised events:**
2658
2675
  * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
2659
2676
  *
2660
- * _Can only be used if this is Vehicle_
2677
+ * _Can only be used if this is Car or SpiderVehicle_
2661
2678
  * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
2662
2679
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger Online documentation}
2663
2680
  */
@@ -2946,7 +2963,7 @@ interface LuaEntity extends LuaControl {
2946
2963
  */
2947
2964
  get_spider_legs(): LuaEntity[]
2948
2965
  /**
2949
- * Stops the given SpiderVehicle.
2966
+ * Sets the {@link LuaEntity#speed speed} of the given SpiderVehicle to zero. Notably does not clear its {@link LuaEntity#autopilot_destination autopilot_destination}, which it will continue moving towards if set.
2950
2967
  *
2951
2968
  * _Can only be used if this is SpiderVehicle_
2952
2969
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.stop_spider Online documentation}
@@ -3104,6 +3121,8 @@ interface LuaEntity extends LuaControl {
3104
3121
  friction_modifier: float
3105
3122
  /**
3106
3123
  * Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron.
3124
+ *
3125
+ * _Can only be used if this is Car or SpiderVehicle_
3107
3126
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.driver_is_gunner Online documentation}
3108
3127
  */
3109
3128
  driver_is_gunner?: boolean
@@ -3176,7 +3195,7 @@ interface LuaEntity extends LuaControl {
3176
3195
  /**
3177
3196
  * Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
3178
3197
  *
3179
- * _Can only be used if this is Character or Car_
3198
+ * _Can only be used if this is Character, Car or SpiderVehicle_
3180
3199
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.selected_gun_index Online documentation}
3181
3200
  */
3182
3201
  selected_gun_index?: uint
@@ -3590,7 +3609,7 @@ interface LuaEntity extends LuaControl {
3590
3609
  */
3591
3610
  readonly burner?: LuaBurner
3592
3611
  /**
3593
- * The shooting target for this turret, if any.
3612
+ * The shooting target for this turret, if any. Can't be set to `nil` via script.
3594
3613
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.shooting_target Online documentation}
3595
3614
  */
3596
3615
  shooting_target?: LuaEntity
@@ -4303,11 +4322,11 @@ interface BaseEntity extends LuaControl {
4303
4322
  /**
4304
4323
  * Set the filter for a slot in an inserter, loader, or logistic storage container.
4305
4324
  * @param slot_index Index of the slot to set the filter for.
4306
- * @param item Prototype name of the item to filter.
4325
+ * @param item Prototype name of the item to filter, or `nil` to clear the filter.
4307
4326
  * @remarks The entity must allow filters.
4308
4327
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_filter Online documentation}
4309
4328
  */
4310
- set_filter(slot_index: uint, item: string): void
4329
+ set_filter(slot_index: uint, item: string | nil): void
4311
4330
  /**
4312
4331
  * Gets the control behavior of the entity (if any).
4313
4332
  * @returns The control behavior or `nil`.
@@ -4678,11 +4697,6 @@ interface BaseEntity extends LuaControl {
4678
4697
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.relative_turret_orientation Online documentation}
4679
4698
  */
4680
4699
  relative_turret_orientation?: RealOrientation
4681
- /**
4682
- * Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron.
4683
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.driver_is_gunner Online documentation}
4684
- */
4685
- driver_is_gunner?: boolean
4686
4700
  /**
4687
4701
  * The current speed if this is a car, rolling stock, projectile or spidertron, or the maximum speed if this is a unit. The speed is in tiles per tick. `nil` if this is not a car, rolling stock, unit, projectile or spidertron.
4688
4702
  *
@@ -4946,7 +4960,7 @@ interface BaseEntity extends LuaControl {
4946
4960
  */
4947
4961
  readonly burner?: LuaBurner
4948
4962
  /**
4949
- * The shooting target for this turret, if any.
4963
+ * The shooting target for this turret, if any. Can't be set to `nil` via script.
4950
4964
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.shooting_target Online documentation}
4951
4965
  */
4952
4966
  shooting_target?: LuaEntity
@@ -5116,7 +5130,7 @@ interface EntityWithHealthEntity extends BaseEntity {
5116
5130
  * _Can only be used if this is EntityWithHealth_
5117
5131
  * @param damage The amount of damage to be done.
5118
5132
  * @param force The force that will be doing the damage.
5119
- * @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`.
5120
5134
  * @param dealer The entity to consider as the damage dealer. Needs to be on the same surface as the entity being damaged.
5121
5135
  * @returns the total damage actually applied after resistances.
5122
5136
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.damage Online documentation}
@@ -5589,7 +5603,7 @@ interface RailChainSignalEntity extends BaseEntity {
5589
5603
  */
5590
5604
  interface InfinityContainerEntity extends BaseEntity {
5591
5605
  /**
5592
- * Gets the filter for this infinity container at the given index or `nil` if the filter index doesn't exist or is empty.
5606
+ * Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.
5593
5607
  *
5594
5608
  * _Can only be used if this is InfinityContainer_
5595
5609
  * @param index The index to get.
@@ -5601,7 +5615,7 @@ interface InfinityContainerEntity extends BaseEntity {
5601
5615
  *
5602
5616
  * _Can only be used if this is InfinityContainer_
5603
5617
  * @param index The index to set.
5604
- * @param filter The new filter or `nil` to clear the filter.
5618
+ * @param filter The new filter, or `nil` to clear the filter.
5605
5619
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_infinity_container_filter Online documentation}
5606
5620
  */
5607
5621
  set_infinity_container_filter(index: uint, filter: InfinityInventoryFilter | nil): void
@@ -5626,7 +5640,7 @@ interface InfinityContainerEntity extends BaseEntity {
5626
5640
  */
5627
5641
  interface InfinityPipeEntity extends BaseEntity {
5628
5642
  /**
5629
- * Gets the filter for this infinity pipe or `nil` if the filter is empty.
5643
+ * Gets the filter for this infinity pipe, or `nil` if the filter is empty.
5630
5644
  *
5631
5645
  * _Can only be used if this is InfinityPipe_
5632
5646
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_infinity_pipe_filter Online documentation}
@@ -5636,7 +5650,7 @@ interface InfinityPipeEntity extends BaseEntity {
5636
5650
  * Sets the filter for this infinity pipe.
5637
5651
  *
5638
5652
  * _Can only be used if this is InfinityPipe_
5639
- * @param filter The new filter or `nil` to clear the filter.
5653
+ * @param filter The new filter, or `nil` to clear the filter.
5640
5654
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_infinity_pipe_filter Online documentation}
5641
5655
  */
5642
5656
  set_infinity_pipe_filter(filter: InfinityPipeFilter | nil): void
@@ -5734,9 +5748,22 @@ interface VehicleEntity extends BaseEntity {
5734
5748
  */
5735
5749
  set_driver(driver: LuaEntity | PlayerIdentification | nil): void
5736
5750
  /**
5737
- * Gets the passenger of this car or spidertron if any.
5751
+ * Whether equipment grid logistics are enabled while this vehicle is moving.
5738
5752
  *
5739
5753
  * _Can only be used if this is Vehicle_
5754
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.enable_logistics_while_moving Online documentation}
5755
+ */
5756
+ enable_logistics_while_moving: boolean
5757
+ }
5758
+
5759
+ /**
5760
+ * @noSelf
5761
+ */
5762
+ interface CarEntity extends BaseEntity {
5763
+ /**
5764
+ * Gets the passenger of this car or spidertron if any.
5765
+ *
5766
+ * _Can only be used if this is Car or SpiderVehicle_
5740
5767
  * @returns `nil` if the vehicle contains no passenger. To check if there's a driver see {@link LuaEntity#get_driver LuaEntity::get_driver}.
5741
5768
  * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
5742
5769
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger Online documentation}
@@ -5748,18 +5775,156 @@ interface VehicleEntity extends BaseEntity {
5748
5775
  * **Raised events:**
5749
5776
  * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
5750
5777
  *
5751
- * _Can only be used if this is Vehicle_
5778
+ * _Can only be used if this is Car or SpiderVehicle_
5752
5779
  * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
5753
5780
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger Online documentation}
5754
5781
  */
5755
5782
  set_passenger(passenger: LuaEntity | PlayerIdentification): void
5756
5783
  /**
5757
- * Whether equipment grid logistics are enabled while this vehicle is moving.
5784
+ * Multiplies the acceleration the vehicle can create for one unit of energy. Defaults to `1`.
5758
5785
  *
5759
- * _Can only be used if this is Vehicle_
5760
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.enable_logistics_while_moving Online documentation}
5786
+ * _Can only be used if this is Car_
5787
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.effectivity_modifier Online documentation}
5761
5788
  */
5762
- enable_logistics_while_moving: boolean
5789
+ effectivity_modifier: float
5790
+ /**
5791
+ * Multiplies the energy consumption.
5792
+ *
5793
+ * _Can only be used if this is Car_
5794
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.consumption_modifier Online documentation}
5795
+ */
5796
+ consumption_modifier: float
5797
+ /**
5798
+ * Multiplies the car friction rate.
5799
+ *
5800
+ * _Can only be used if this is Car_
5801
+ * @example This will allow the car to go much faster
5802
+ *
5803
+ * ```
5804
+ * game.player.vehicle.friction_modifier = 0.5
5805
+ * ```
5806
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.friction_modifier Online documentation}
5807
+ */
5808
+ friction_modifier: float
5809
+ /**
5810
+ * Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron.
5811
+ *
5812
+ * _Can only be used if this is Car or SpiderVehicle_
5813
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.driver_is_gunner Online documentation}
5814
+ */
5815
+ driver_is_gunner?: boolean
5816
+ /**
5817
+ * Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
5818
+ *
5819
+ * _Can only be used if this is Character, Car or SpiderVehicle_
5820
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.selected_gun_index Online documentation}
5821
+ */
5822
+ selected_gun_index?: uint
5823
+ }
5824
+
5825
+ /**
5826
+ * @noSelf
5827
+ */
5828
+ interface SpiderVehicleEntity extends BaseEntity {
5829
+ /**
5830
+ * Gets the passenger of this car or spidertron if any.
5831
+ *
5832
+ * _Can only be used if this is Car or SpiderVehicle_
5833
+ * @returns `nil` if the vehicle contains no passenger. To check if there's a driver see {@link LuaEntity#get_driver LuaEntity::get_driver}.
5834
+ * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
5835
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger Online documentation}
5836
+ */
5837
+ get_passenger(): LuaEntity | LuaPlayer | nil
5838
+ /**
5839
+ * Sets the passenger of this car or spidertron.
5840
+ *
5841
+ * **Raised events:**
5842
+ * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
5843
+ *
5844
+ * _Can only be used if this is Car or SpiderVehicle_
5845
+ * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
5846
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger Online documentation}
5847
+ */
5848
+ set_passenger(passenger: LuaEntity | PlayerIdentification): void
5849
+ /**
5850
+ * Adds the given position to this spidertron's autopilot's queue of destinations.
5851
+ *
5852
+ * _Can only be used if this is SpiderVehicle_
5853
+ * @param position The position the spidertron should move to.
5854
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.add_autopilot_destination Online documentation}
5855
+ */
5856
+ add_autopilot_destination(position: MapPosition | MapPositionArray): void
5857
+ /**
5858
+ * Gets legs of given SpiderVehicle.
5859
+ *
5860
+ * _Can only be used if this is SpiderVehicle_
5861
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_spider_legs Online documentation}
5862
+ */
5863
+ get_spider_legs(): LuaEntity[]
5864
+ /**
5865
+ * Sets the {@link LuaEntity#speed speed} of the given SpiderVehicle to zero. Notably does not clear its {@link LuaEntity#autopilot_destination autopilot_destination}, which it will continue moving towards if set.
5866
+ *
5867
+ * _Can only be used if this is SpiderVehicle_
5868
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.stop_spider Online documentation}
5869
+ */
5870
+ stop_spider(): void
5871
+ /**
5872
+ * The torso orientation of this spider vehicle.
5873
+ *
5874
+ * _Can only be used if this is SpiderVehicle_
5875
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.torso_orientation Online documentation}
5876
+ */
5877
+ torso_orientation: RealOrientation
5878
+ /**
5879
+ * Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron.
5880
+ *
5881
+ * _Can only be used if this is Car or SpiderVehicle_
5882
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.driver_is_gunner Online documentation}
5883
+ */
5884
+ driver_is_gunner?: boolean
5885
+ /**
5886
+ * Read when this spidertron auto-targets enemies
5887
+ *
5888
+ * _Can only be used if this is SpiderVehicle_
5889
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.vehicle_automatic_targeting_parameters Online documentation}
5890
+ */
5891
+ vehicle_automatic_targeting_parameters: VehicleAutomaticTargetingParameters
5892
+ /**
5893
+ * Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
5894
+ *
5895
+ * _Can only be used if this is Character, Car or SpiderVehicle_
5896
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.selected_gun_index Online documentation}
5897
+ */
5898
+ selected_gun_index?: uint
5899
+ /**
5900
+ * Destination of this spidertron's autopilot, if any.
5901
+ *
5902
+ * _Can only be used if this is SpiderVehicle_
5903
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.autopilot_destination Online documentation}
5904
+ */
5905
+ get autopilot_destination(): MapPosition | nil
5906
+ set autopilot_destination(value: MapPosition | MapPositionArray | nil)
5907
+ /**
5908
+ * The queued destination positions of spidertron's autopilot.
5909
+ *
5910
+ * _Can only be used if this is SpiderVehicle_
5911
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.autopilot_destinations Online documentation}
5912
+ */
5913
+ readonly autopilot_destinations: MapPosition[]
5914
+ /**
5915
+ * The follow target of this spidertron, if any.
5916
+ *
5917
+ * _Can only be used if this is SpiderVehicle_
5918
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.follow_target Online documentation}
5919
+ */
5920
+ follow_target?: LuaEntity
5921
+ /**
5922
+ * The follow offset of this spidertron, if any entity is being followed. This is randomized each time the follow entity is set.
5923
+ *
5924
+ * _Can only be used if this is SpiderVehicle_
5925
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.follow_offset Online documentation}
5926
+ */
5927
+ follow_offset?: Vector
5763
5928
  }
5764
5929
 
5765
5930
  /**
@@ -5877,77 +6042,6 @@ interface ResourceEntity extends BaseEntity {
5877
6042
  initial_amount?: uint
5878
6043
  }
5879
6044
 
5880
- /**
5881
- * @noSelf
5882
- */
5883
- interface SpiderVehicleEntity extends BaseEntity {
5884
- /**
5885
- * Adds the given position to this spidertron's autopilot's queue of destinations.
5886
- *
5887
- * _Can only be used if this is SpiderVehicle_
5888
- * @param position The position the spidertron should move to.
5889
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.add_autopilot_destination Online documentation}
5890
- */
5891
- add_autopilot_destination(position: MapPosition | MapPositionArray): void
5892
- /**
5893
- * Gets legs of given SpiderVehicle.
5894
- *
5895
- * _Can only be used if this is SpiderVehicle_
5896
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_spider_legs Online documentation}
5897
- */
5898
- get_spider_legs(): LuaEntity[]
5899
- /**
5900
- * Stops the given SpiderVehicle.
5901
- *
5902
- * _Can only be used if this is SpiderVehicle_
5903
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.stop_spider Online documentation}
5904
- */
5905
- stop_spider(): void
5906
- /**
5907
- * The torso orientation of this spider vehicle.
5908
- *
5909
- * _Can only be used if this is SpiderVehicle_
5910
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.torso_orientation Online documentation}
5911
- */
5912
- torso_orientation: RealOrientation
5913
- /**
5914
- * Read when this spidertron auto-targets enemies
5915
- *
5916
- * _Can only be used if this is SpiderVehicle_
5917
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.vehicle_automatic_targeting_parameters Online documentation}
5918
- */
5919
- vehicle_automatic_targeting_parameters: VehicleAutomaticTargetingParameters
5920
- /**
5921
- * Destination of this spidertron's autopilot, if any.
5922
- *
5923
- * _Can only be used if this is SpiderVehicle_
5924
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.autopilot_destination Online documentation}
5925
- */
5926
- get autopilot_destination(): MapPosition | nil
5927
- set autopilot_destination(value: MapPosition | MapPositionArray | nil)
5928
- /**
5929
- * The queued destination positions of spidertron's autopilot.
5930
- *
5931
- * _Can only be used if this is SpiderVehicle_
5932
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.autopilot_destinations Online documentation}
5933
- */
5934
- readonly autopilot_destinations: MapPosition[]
5935
- /**
5936
- * The follow target of this spidertron, if any.
5937
- *
5938
- * _Can only be used if this is SpiderVehicle_
5939
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.follow_target Online documentation}
5940
- */
5941
- follow_target?: LuaEntity
5942
- /**
5943
- * The follow offset of this spidertron, if any entity is being followed. This is randomized each time the follow entity is set.
5944
- *
5945
- * _Can only be used if this is SpiderVehicle_
5946
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.follow_offset Online documentation}
5947
- */
5948
- follow_offset?: Vector
5949
- }
5950
-
5951
6045
  /**
5952
6046
  * @noSelf
5953
6047
  */
@@ -6025,42 +6119,6 @@ interface GhostEntity extends BaseEntity {
6025
6119
  readonly ghost_prototype: LuaEntityPrototype | LuaTilePrototype
6026
6120
  }
6027
6121
 
6028
- interface CarEntity extends BaseEntity {
6029
- /**
6030
- * Multiplies the acceleration the vehicle can create for one unit of energy. Defaults to `1`.
6031
- *
6032
- * _Can only be used if this is Car_
6033
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.effectivity_modifier Online documentation}
6034
- */
6035
- effectivity_modifier: float
6036
- /**
6037
- * Multiplies the energy consumption.
6038
- *
6039
- * _Can only be used if this is Car_
6040
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.consumption_modifier Online documentation}
6041
- */
6042
- consumption_modifier: float
6043
- /**
6044
- * Multiplies the car friction rate.
6045
- *
6046
- * _Can only be used if this is Car_
6047
- * @example This will allow the car to go much faster
6048
- *
6049
- * ```
6050
- * game.player.vehicle.friction_modifier = 0.5
6051
- * ```
6052
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.friction_modifier Online documentation}
6053
- */
6054
- friction_modifier: float
6055
- /**
6056
- * Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
6057
- *
6058
- * _Can only be used if this is Character or Car_
6059
- * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.selected_gun_index Online documentation}
6060
- */
6061
- selected_gun_index?: uint
6062
- }
6063
-
6064
6122
  interface ItemEntity extends BaseEntity {
6065
6123
  /**
6066
6124
  * _Can only be used if this is ItemEntity_
@@ -6120,7 +6178,7 @@ interface CharacterEntity extends BaseEntity {
6120
6178
  /**
6121
6179
  * Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
6122
6180
  *
6123
- * _Can only be used if this is Character or Car_
6181
+ * _Can only be used if this is Character, Car or SpiderVehicle_
6124
6182
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.selected_gun_index Online documentation}
6125
6183
  */
6126
6184
  selected_gun_index?: uint
@@ -7351,6 +7409,13 @@ interface LuaEntityPrototype {
7351
7409
  * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.create_ghost_on_death Online documentation}
7352
7410
  */
7353
7411
  readonly create_ghost_on_death: boolean
7412
+ /**
7413
+ * Name of the ammo category of this land mine.
7414
+ *
7415
+ * _Can only be used if this is LandMine_
7416
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.ammo_category Online documentation}
7417
+ */
7418
+ readonly ammo_category?: string
7354
7419
  /**
7355
7420
  * The time it takes this land mine to arm.
7356
7421
  *
@@ -7390,6 +7455,53 @@ interface LuaEntityPrototype {
7390
7455
  * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.belt_length Online documentation}
7391
7456
  */
7392
7457
  readonly belt_length?: double
7458
+ /**
7459
+ * Everything in the following list is considered a building.
7460
+ *
7461
+ * - AccumulatorPrototype
7462
+ * - ArtilleryTurretPrototype
7463
+ * - BeaconPrototype
7464
+ * - BoilerPrototype
7465
+ * - BurnerGeneratorPrototype
7466
+ * - CombinatorPrototype → ArithmeticCombinator, DeciderCombinator
7467
+ * - ConstantCombinatorPrototype
7468
+ * - ContainerPrototype → LogisticContainer, InfinityContainer
7469
+ * - CraftingMachinePrototype → AssemblingMachine, RocketSilo, Furnace
7470
+ * - ElectricEnergyInterfacePrototype
7471
+ * - ElectricPolePrototype
7472
+ * - EnemySpawnerPrototype
7473
+ * - GatePrototype
7474
+ * - GeneratorPrototype
7475
+ * - HeatInterfacePrototype
7476
+ * - HeatPipePrototype
7477
+ * - InserterPrototype
7478
+ * - LabPrototype
7479
+ * - LampPrototype
7480
+ * - LinkedContainerPrototype
7481
+ * - MarketPrototype
7482
+ * - MiningDrillPrototype
7483
+ * - OffshorePumpPrototype
7484
+ * - PipePrototype → InfinityPipe
7485
+ * - PipeToGroundPrototype
7486
+ * - PlayerPortPrototype
7487
+ * - PowerSwitchPrototype
7488
+ * - ProgrammableSpeakerPrototype
7489
+ * - PumpPrototype
7490
+ * - RadarPrototype
7491
+ * - RailPrototype → CurvedRail, StraightRail
7492
+ * - RailSignalBasePrototype → RailChainSignal, RailSignal
7493
+ * - ReactorPrototype
7494
+ * - RoboportPrototype
7495
+ * - SimpleEntityPrototype
7496
+ * - SimpleEntityWithOwnerPrototype → SimpleEntityWithForce
7497
+ * - SolarPanelPrototype
7498
+ * - StorageTankPrototype
7499
+ * - TrainStopPrototype
7500
+ * - TransportBeltConnectablePrototype → LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt
7501
+ * - TurretPrototype → AmmoTurret, ElectricTurret, FluidTurret
7502
+ * - WallPrototype
7503
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.is_building Online documentation}
7504
+ */
7393
7505
  readonly is_building: boolean
7394
7506
  /**
7395
7507
  * The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.
@@ -8288,6 +8400,53 @@ interface BaseEntityPrototype {
8288
8400
  * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluidbox_prototypes Online documentation}
8289
8401
  */
8290
8402
  readonly fluidbox_prototypes: LuaFluidBoxPrototype[]
8403
+ /**
8404
+ * Everything in the following list is considered a building.
8405
+ *
8406
+ * - AccumulatorPrototype
8407
+ * - ArtilleryTurretPrototype
8408
+ * - BeaconPrototype
8409
+ * - BoilerPrototype
8410
+ * - BurnerGeneratorPrototype
8411
+ * - CombinatorPrototype → ArithmeticCombinator, DeciderCombinator
8412
+ * - ConstantCombinatorPrototype
8413
+ * - ContainerPrototype → LogisticContainer, InfinityContainer
8414
+ * - CraftingMachinePrototype → AssemblingMachine, RocketSilo, Furnace
8415
+ * - ElectricEnergyInterfacePrototype
8416
+ * - ElectricPolePrototype
8417
+ * - EnemySpawnerPrototype
8418
+ * - GatePrototype
8419
+ * - GeneratorPrototype
8420
+ * - HeatInterfacePrototype
8421
+ * - HeatPipePrototype
8422
+ * - InserterPrototype
8423
+ * - LabPrototype
8424
+ * - LampPrototype
8425
+ * - LinkedContainerPrototype
8426
+ * - MarketPrototype
8427
+ * - MiningDrillPrototype
8428
+ * - OffshorePumpPrototype
8429
+ * - PipePrototype → InfinityPipe
8430
+ * - PipeToGroundPrototype
8431
+ * - PlayerPortPrototype
8432
+ * - PowerSwitchPrototype
8433
+ * - ProgrammableSpeakerPrototype
8434
+ * - PumpPrototype
8435
+ * - RadarPrototype
8436
+ * - RailPrototype → CurvedRail, StraightRail
8437
+ * - RailSignalBasePrototype → RailChainSignal, RailSignal
8438
+ * - ReactorPrototype
8439
+ * - RoboportPrototype
8440
+ * - SimpleEntityPrototype
8441
+ * - SimpleEntityWithOwnerPrototype → SimpleEntityWithForce
8442
+ * - SolarPanelPrototype
8443
+ * - StorageTankPrototype
8444
+ * - TrainStopPrototype
8445
+ * - TransportBeltConnectablePrototype → LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt
8446
+ * - TurretPrototype → AmmoTurret, ElectricTurret, FluidTurret
8447
+ * - WallPrototype
8448
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.is_building Online documentation}
8449
+ */
8291
8450
  readonly is_building: boolean
8292
8451
  /**
8293
8452
  * The radius of this entity prototype.
@@ -9553,6 +9712,13 @@ interface RoboportEntityPrototype extends BaseEntityPrototype {
9553
9712
  }
9554
9713
 
9555
9714
  interface LandMineEntityPrototype extends BaseEntityPrototype {
9715
+ /**
9716
+ * Name of the ammo category of this land mine.
9717
+ *
9718
+ * _Can only be used if this is LandMine_
9719
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.ammo_category Online documentation}
9720
+ */
9721
+ readonly ammo_category?: string
9556
9722
  /**
9557
9723
  * The time it takes this land mine to arm.
9558
9724
  *
@@ -10139,10 +10305,12 @@ interface LuaEquipmentPrototype {
10139
10305
  readonly energy_per_shield: double
10140
10306
  /**
10141
10307
  * The logistic parameters for this roboport equipment.
10308
+ *
10309
+ * _Can only be used if this is RoboportEquipment_
10142
10310
  * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10143
10311
  * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters Online documentation}
10144
10312
  */
10145
- readonly logistic_parameters: {
10313
+ readonly logistic_parameters?: {
10146
10314
  readonly spawn_and_station_height: float
10147
10315
  readonly spawn_and_station_shadow_height_offset: float
10148
10316
  readonly charge_approach_distance: float
@@ -10161,10 +10329,10 @@ interface LuaEquipmentPrototype {
10161
10329
  }
10162
10330
  readonly energy_consumption: double
10163
10331
  /**
10164
- * _Can only be used if this is MovementBonusEquipmentPrototype_
10332
+ * _Can only be used if this is MovementBonusEquipment_
10165
10333
  * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.movement_bonus Online documentation}
10166
10334
  */
10167
- readonly movement_bonus: float
10335
+ readonly movement_bonus?: float
10168
10336
  /**
10169
10337
  * The energy source prototype for the equipment.
10170
10338
  * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.energy_source Online documentation}
@@ -10269,28 +10437,6 @@ interface BaseEquipmentPrototype {
10269
10437
  * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.energy_per_shield Online documentation}
10270
10438
  */
10271
10439
  readonly energy_per_shield: double
10272
- /**
10273
- * The logistic parameters for this roboport equipment.
10274
- * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10275
- * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters Online documentation}
10276
- */
10277
- readonly logistic_parameters: {
10278
- readonly spawn_and_station_height: float
10279
- readonly spawn_and_station_shadow_height_offset: float
10280
- readonly charge_approach_distance: float
10281
- readonly logistic_radius: float
10282
- readonly construction_radius: float
10283
- readonly charging_station_count: uint
10284
- readonly charging_distance: float
10285
- readonly charging_station_shift: Vector
10286
- readonly charging_energy: double
10287
- readonly charging_threshold_distance: float
10288
- readonly robot_vertical_acceleration: float
10289
- readonly stationing_offset: Vector
10290
- readonly robot_limit: uint
10291
- readonly logistics_connection_distance: float
10292
- readonly robots_shrink_when_entering_and_exiting: boolean
10293
- }
10294
10440
  readonly energy_consumption: double
10295
10441
  /**
10296
10442
  * The energy source prototype for the equipment.
@@ -10336,12 +10482,39 @@ interface BaseEquipmentPrototype {
10336
10482
  help(): string
10337
10483
  }
10338
10484
 
10485
+ interface RoboportEquipmentPrototype extends BaseEquipmentPrototype {
10486
+ /**
10487
+ * The logistic parameters for this roboport equipment.
10488
+ *
10489
+ * _Can only be used if this is RoboportEquipment_
10490
+ * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10491
+ * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters Online documentation}
10492
+ */
10493
+ readonly logistic_parameters?: {
10494
+ readonly spawn_and_station_height: float
10495
+ readonly spawn_and_station_shadow_height_offset: float
10496
+ readonly charge_approach_distance: float
10497
+ readonly logistic_radius: float
10498
+ readonly construction_radius: float
10499
+ readonly charging_station_count: uint
10500
+ readonly charging_distance: float
10501
+ readonly charging_station_shift: Vector
10502
+ readonly charging_energy: double
10503
+ readonly charging_threshold_distance: float
10504
+ readonly robot_vertical_acceleration: float
10505
+ readonly stationing_offset: Vector
10506
+ readonly robot_limit: uint
10507
+ readonly logistics_connection_distance: float
10508
+ readonly robots_shrink_when_entering_and_exiting: boolean
10509
+ }
10510
+ }
10511
+
10339
10512
  interface MovementBonusEquipmentPrototype extends BaseEquipmentPrototype {
10340
10513
  /**
10341
- * _Can only be used if this is MovementBonusEquipmentPrototype_
10514
+ * _Can only be used if this is MovementBonusEquipment_
10342
10515
  * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.movement_bonus Online documentation}
10343
10516
  */
10344
- readonly movement_bonus: float
10517
+ readonly movement_bonus?: float
10345
10518
  }
10346
10519
 
10347
10520
  interface ActiveDefenseEquipmentPrototype extends BaseEquipmentPrototype {
@@ -10507,7 +10680,7 @@ interface LuaFluidBox extends Array<Fluid | nil> {
10507
10680
  * @remarks Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
10508
10681
  * @see {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.set_filter Online documentation}
10509
10682
  */
10510
- set_filter(index: uint, filter?: FluidBoxFilterSpec): boolean
10683
+ set_filter(index: uint, filter: FluidBoxFilterSpec | nil): boolean
10511
10684
  /**
10512
10685
  * Flow through the fluidbox in the last tick. It is the larger of in-flow and out-flow.
10513
10686
  * @remarks Fluid wagons do not track it and will return 0.
@@ -10534,14 +10707,14 @@ interface LuaFluidBox extends Array<Fluid | nil> {
10534
10707
  flush(index: uint, fluid?: FluidIdentification): Record<string, float>
10535
10708
  /**
10536
10709
  * Number of fluid boxes.
10537
- * @see {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.operator%20# Online documentation}
10710
+ * @see {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.length_operator Online documentation}
10538
10711
  */
10539
10712
  readonly length: uint
10540
10713
  /**
10541
- * Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox#index LuaFluidBox::index}). New fluidboxes may not be added or removed using this operator.
10714
+ * Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox#length LuaFluidBox::length_operator}). New fluidboxes may not be added or removed using this operator.
10542
10715
  *
10543
10716
  * Is `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.
10544
- * @see {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.operator%20[] Online documentation}
10717
+ * @see {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.index_operator Online documentation}
10545
10718
  */
10546
10719
  [index: number]: Fluid | nil
10547
10720
  /**
@@ -10638,6 +10811,10 @@ interface LuaFluidBoxPrototype {
10638
10811
  * @noSelf
10639
10812
  */
10640
10813
  interface LuaFluidEnergySourcePrototype {
10814
+ /**
10815
+ * The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
10816
+ * @see {@link https://lua-api.factorio.com/latest/LuaFluidEnergySourcePrototype.html#LuaFluidEnergySourcePrototype.emissions Online documentation}
10817
+ */
10641
10818
  readonly emissions: double
10642
10819
  readonly render_no_network_icon: boolean
10643
10820
  readonly render_no_power_icon: boolean
@@ -11018,7 +11195,7 @@ interface LuaForce {
11018
11195
  */
11019
11196
  print(message: LocalisedString, color?: Color | ColorArray): void
11020
11197
  /**
11021
- * @param surface If given only trains on the surface are returned.
11198
+ * @param surface The surface to search. Not providing a surface will match trains on any surface.
11022
11199
  * @see {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_trains Online documentation}
11023
11200
  */
11024
11201
  get_trains(surface?: SurfaceIdentification): LuaTrain[]
@@ -11084,7 +11261,13 @@ interface LuaForce {
11084
11261
  * @see {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_train_stops Online documentation}
11085
11262
  */
11086
11263
  get_train_stops(params?: {
11264
+ /**
11265
+ * The name(s) of the train stops. Not providing names will match any stop.
11266
+ */
11087
11267
  readonly name?: string | readonly string[]
11268
+ /**
11269
+ * The surface to search. Not providing a surface will match stops on any surface.
11270
+ */
11088
11271
  readonly surface?: SurfaceIdentification
11089
11272
  }): LuaEntity[]
11090
11273
  /**
@@ -11443,15 +11626,15 @@ interface LuaFuelCategoryPrototype {
11443
11626
  */
11444
11627
  interface LuaGameScript {
11445
11628
  /**
11446
- * Set scenario state.
11629
+ * Set scenario state. Any parameters not provided do not change the current state.
11447
11630
  * @see {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.set_game_state Online documentation}
11448
11631
  */
11449
11632
  set_game_state(params: {
11450
- readonly game_finished: boolean
11451
- readonly player_won: boolean
11452
- readonly next_level: string
11453
- readonly can_continue: boolean
11454
- readonly victorious_force: ForceIdentification
11633
+ readonly game_finished?: boolean
11634
+ readonly player_won?: boolean
11635
+ readonly next_level?: string
11636
+ readonly can_continue?: boolean
11637
+ readonly victorious_force?: ForceIdentification
11455
11638
  }): void
11456
11639
  /**
11457
11640
  * Reset scenario state (game_finished, player_won, etc.).
@@ -11682,14 +11865,14 @@ interface LuaGameScript {
11682
11865
  */
11683
11866
  create_force(force: string): LuaForce
11684
11867
  /**
11685
- * 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.
11686
11869
  *
11687
11870
  * **Raised events:**
11688
11871
  * - {@link OnForcesMergingEvent on_forces_merging} _future_tick_
11689
11872
  * - {@link OnForcesMergedEvent on_forces_merged} _future_tick_
11690
11873
  * @param source The force to remove.
11691
11874
  * @param destination The force to reassign all entities to.
11692
- * @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.
11693
11876
  * @see {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.merge_forces Online documentation}
11694
11877
  */
11695
11878
  merge_forces(source: ForceIdentification, destination: ForceIdentification): void
@@ -11868,7 +12051,7 @@ interface LuaGameScript {
11868
12051
  is_multiplayer(): boolean
11869
12052
  /**
11870
12053
  * Gets the number of entities that are active (updated each tick).
11871
- * @param surface If give, only the entities active on this surface are counted.
12054
+ * @param surface If given, only the entities active on this surface are counted.
11872
12055
  * @remarks This is very expensive to determine.
11873
12056
  * @see {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_active_entities_count Online documentation}
11874
12057
  */
@@ -11888,8 +12071,17 @@ interface LuaGameScript {
11888
12071
  * @see {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_train_stops Online documentation}
11889
12072
  */
11890
12073
  get_train_stops(params?: {
12074
+ /**
12075
+ * The name(s) of the train stops. Not providing names will match any stop.
12076
+ */
11891
12077
  readonly name?: string | readonly string[]
12078
+ /**
12079
+ * The surface to search. Not providing a surface will match stops on any surface.
12080
+ */
11892
12081
  readonly surface?: SurfaceIdentification
12082
+ /**
12083
+ * The force to search. Not providing a force will match stops in any force.
12084
+ */
11893
12085
  readonly force?: ForceIdentification
11894
12086
  }): LuaEntity[]
11895
12087
  /**
@@ -12454,17 +12646,15 @@ interface LuaGroup {
12454
12646
  */
12455
12647
  readonly group?: LuaGroup
12456
12648
  /**
12457
- * Subgroups of this group.
12458
- * @remarks Can only be used on groups, not on subgroups.
12649
+ * Subgroups of this group. Can only be used on groups, not on subgroups.
12459
12650
  * @see {@link https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.subgroups Online documentation}
12460
12651
  */
12461
- readonly subgroups: LuaGroup[]
12652
+ readonly subgroups?: LuaGroup[]
12462
12653
  /**
12463
- * The additional order value used in recipe ordering.
12464
- * @remarks Can only be used on groups, not on subgroups.
12654
+ * The additional order value used in recipe ordering. Can only be used on groups, not on subgroups.
12465
12655
  * @see {@link https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.order_in_recipe Online documentation}
12466
12656
  */
12467
- readonly order_in_recipe: string
12657
+ readonly order_in_recipe?: string
12468
12658
  /**
12469
12659
  * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
12470
12660
  * @see {@link https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.order Online documentation}
@@ -12613,7 +12803,7 @@ interface BaseGuiSpec {
12613
12803
  */
12614
12804
  readonly ignored_by_interaction?: boolean
12615
12805
  /**
12616
- * Style of the child element.
12806
+ * The name of the style prototype to apply to the new element.
12617
12807
  */
12618
12808
  readonly style?: string
12619
12809
  /**
@@ -13143,7 +13333,7 @@ type GuiSpec =
13143
13333
  interface GuiElementIndexer {
13144
13334
  /**
13145
13335
  * The indexing operator. Gets children by name.
13146
- * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.operator%20[] Online documentation}
13336
+ * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.index_operator Online documentation}
13147
13337
  */
13148
13338
  readonly [name: string]: LuaGuiElement | nil
13149
13339
  }
@@ -13412,17 +13602,23 @@ interface DropDownGuiElementMembers extends BaseGuiElement {
13412
13602
  readonly type: "drop-down"
13413
13603
  /**
13414
13604
  * Removes the items in this dropdown or listbox.
13605
+ *
13606
+ * _Can only be used if this is drop-down or list-box_
13415
13607
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear_items Online documentation}
13416
13608
  */
13417
13609
  clear_items(): void
13418
13610
  /**
13419
13611
  * Gets the item at the given index from this dropdown or listbox.
13612
+ *
13613
+ * _Can only be used if this is drop-down or list-box_
13420
13614
  * @param index The index to get
13421
13615
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_item Online documentation}
13422
13616
  */
13423
13617
  get_item(index: uint): LocalisedString
13424
13618
  /**
13425
13619
  * Sets the given string at the given index in this dropdown or listbox.
13620
+ *
13621
+ * _Can only be used if this is drop-down or list-box_
13426
13622
  * @param index The index whose text to replace.
13427
13623
  * @param string The text to set at the given index.
13428
13624
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_item Online documentation}
@@ -13430,6 +13626,8 @@ interface DropDownGuiElementMembers extends BaseGuiElement {
13430
13626
  set_item(index: uint, string: LocalisedString): void
13431
13627
  /**
13432
13628
  * Inserts a string at the end or at the given index of this dropdown or listbox.
13629
+ *
13630
+ * _Can only be used if this is drop-down or list-box_
13433
13631
  * @param string The text to insert.
13434
13632
  * @param index The index at which to insert the item.
13435
13633
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add_item Online documentation}
@@ -13437,17 +13635,28 @@ interface DropDownGuiElementMembers extends BaseGuiElement {
13437
13635
  add_item(string: LocalisedString, index?: uint): void
13438
13636
  /**
13439
13637
  * Removes the item at the given index from this dropdown or listbox.
13638
+ *
13639
+ * _Can only be used if this is drop-down or list-box_
13440
13640
  * @param index The index
13441
13641
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_item Online documentation}
13442
13642
  */
13443
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
13444
13649
  /**
13445
13650
  * The items in this dropdown or listbox.
13651
+ *
13652
+ * _Can only be used if this is drop-down or list-box_
13446
13653
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.items Online documentation}
13447
13654
  */
13448
13655
  items: LocalisedString[]
13449
13656
  /**
13450
13657
  * The selected index for this dropdown or listbox. Returns `0` if none is selected.
13658
+ *
13659
+ * _Can only be used if this is drop-down or list-box_
13451
13660
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_index Online documentation}
13452
13661
  */
13453
13662
  selected_index: uint
@@ -13489,6 +13698,8 @@ interface EntityPreviewGuiElementMembers extends BaseGuiElement {
13489
13698
  readonly type: "entity-preview"
13490
13699
  /**
13491
13700
  * The entity associated with this entity-preview, camera, minimap, if any.
13701
+ *
13702
+ * _Can only be used if this is entity-preview, camera or minimap_
13492
13703
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity Online documentation}
13493
13704
  */
13494
13705
  entity: LuaEntity
@@ -13507,17 +13718,23 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
13507
13718
  readonly type: "list-box"
13508
13719
  /**
13509
13720
  * Removes the items in this dropdown or listbox.
13721
+ *
13722
+ * _Can only be used if this is drop-down or list-box_
13510
13723
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear_items Online documentation}
13511
13724
  */
13512
13725
  clear_items(): void
13513
13726
  /**
13514
13727
  * Gets the item at the given index from this dropdown or listbox.
13728
+ *
13729
+ * _Can only be used if this is drop-down or list-box_
13515
13730
  * @param index The index to get
13516
13731
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_item Online documentation}
13517
13732
  */
13518
13733
  get_item(index: uint): LocalisedString
13519
13734
  /**
13520
13735
  * Sets the given string at the given index in this dropdown or listbox.
13736
+ *
13737
+ * _Can only be used if this is drop-down or list-box_
13521
13738
  * @param index The index whose text to replace.
13522
13739
  * @param string The text to set at the given index.
13523
13740
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_item Online documentation}
@@ -13525,6 +13742,8 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
13525
13742
  set_item(index: uint, string: LocalisedString): void
13526
13743
  /**
13527
13744
  * Inserts a string at the end or at the given index of this dropdown or listbox.
13745
+ *
13746
+ * _Can only be used if this is drop-down or list-box_
13528
13747
  * @param string The text to insert.
13529
13748
  * @param index The index at which to insert the item.
13530
13749
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add_item Online documentation}
@@ -13532,6 +13751,8 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
13532
13751
  add_item(string: LocalisedString, index?: uint): void
13533
13752
  /**
13534
13753
  * Removes the item at the given index from this dropdown or listbox.
13754
+ *
13755
+ * _Can only be used if this is drop-down or list-box_
13535
13756
  * @param index The index
13536
13757
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_item Online documentation}
13537
13758
  */
@@ -13547,11 +13768,15 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
13547
13768
  scroll_to_item(index: int, scroll_mode?: "in-view" | "top-third"): void
13548
13769
  /**
13549
13770
  * The items in this dropdown or listbox.
13771
+ *
13772
+ * _Can only be used if this is drop-down or list-box_
13550
13773
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.items Online documentation}
13551
13774
  */
13552
13775
  items: LocalisedString[]
13553
13776
  /**
13554
13777
  * The selected index for this dropdown or listbox. Returns `0` if none is selected.
13778
+ *
13779
+ * _Can only be used if this is drop-down or list-box_
13555
13780
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_index Online documentation}
13556
13781
  */
13557
13782
  selected_index: uint
@@ -13630,34 +13855,44 @@ interface SpriteButtonGuiElementMembers extends BaseGuiElement {
13630
13855
  */
13631
13856
  readonly type: "sprite-button"
13632
13857
  /**
13633
- * The image to display on this sprite-button or sprite in the default state.
13858
+ * The sprite to display on this sprite-button or sprite in the default state.
13859
+ *
13860
+ * _Can only be used if this is sprite-button or sprite_
13634
13861
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.sprite Online documentation}
13635
13862
  */
13636
13863
  sprite: SpritePath
13637
13864
  /**
13638
- * The image to display on this sprite-button when it is hovered.
13865
+ * The sprite to display on this sprite-button when it is hovered.
13639
13866
  *
13640
13867
  * _Can only be used if this is sprite-button_
13641
13868
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.hovered_sprite Online documentation}
13642
13869
  */
13643
13870
  hovered_sprite: SpritePath
13644
13871
  /**
13645
- * The image to display on this sprite-button when it is clicked.
13872
+ * The sprite to display on this sprite-button when it is clicked.
13873
+ *
13874
+ * _Can only be used if this is sprite-button_
13646
13875
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clicked_sprite Online documentation}
13647
13876
  */
13648
13877
  clicked_sprite: SpritePath
13649
13878
  /**
13650
13879
  * The number to be shown in the bottom right corner of this sprite-button. Set this to `nil` to show nothing.
13880
+ *
13881
+ * _Can only be used if this is sprite-button_
13651
13882
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.number Online documentation}
13652
13883
  */
13653
13884
  number: double | nil
13654
13885
  /**
13655
13886
  * Related to the number to be shown in the bottom right corner of this sprite-button. When set to `true`, numbers that are non-zero and smaller than one are shown as a percentage rather than the value. For example, `0.5` will be shown as `50%` instead.
13887
+ *
13888
+ * _Can only be used if this is sprite-button_
13656
13889
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.show_percent_for_small_numbers Online documentation}
13657
13890
  */
13658
13891
  show_percent_for_small_numbers: boolean
13659
13892
  /**
13660
13893
  * The mouse button filters for this button or sprite-button.
13894
+ *
13895
+ * _Can only be used if this is button or sprite-button_
13661
13896
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.mouse_button_filter Online documentation}
13662
13897
  */
13663
13898
  get mouse_button_filter(): MouseButtonFlags
@@ -13702,6 +13937,8 @@ interface TabbedPaneGuiElementMembers extends BaseGuiElement {
13702
13937
  selected_tab_index?: uint
13703
13938
  /**
13704
13939
  * The tabs and contents being shown in this tabbed-pane.
13940
+ *
13941
+ * _Can only be used if this is tabbed-pane_
13705
13942
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tabs Online documentation}
13706
13943
  */
13707
13944
  readonly tabs: TabAndContent[]
@@ -13819,6 +14056,8 @@ interface ButtonGuiElementMembers extends BaseGuiElement {
13819
14056
  readonly type: "button"
13820
14057
  /**
13821
14058
  * The mouse button filters for this button or sprite-button.
14059
+ *
14060
+ * _Can only be used if this is button or sprite-button_
13822
14061
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.mouse_button_filter Online documentation}
13823
14062
  */
13824
14063
  get mouse_button_filter(): MouseButtonFlags
@@ -13835,22 +14074,30 @@ interface CameraGuiElementMembers extends BaseGuiElement {
13835
14074
  readonly type: "camera"
13836
14075
  /**
13837
14076
  * The position this camera or minimap is focused on, if any.
14077
+ *
14078
+ * _Can only be used if this is camera or minimap_
13838
14079
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.position Online documentation}
13839
14080
  */
13840
14081
  get position(): MapPosition
13841
14082
  set position(value: MapPosition | MapPositionArray)
13842
14083
  /**
13843
14084
  * The surface index this camera or minimap is using.
14085
+ *
14086
+ * _Can only be used if this is camera or minimap_
13844
14087
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index Online documentation}
13845
14088
  */
13846
14089
  surface_index: SurfaceIndex
13847
14090
  /**
13848
14091
  * The zoom this camera or minimap is using. This value must be positive.
14092
+ *
14093
+ * _Can only be used if this is camera or minimap_
13849
14094
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom Online documentation}
13850
14095
  */
13851
14096
  zoom: double
13852
14097
  /**
13853
14098
  * The entity associated with this entity-preview, camera, minimap, if any.
14099
+ *
14100
+ * _Can only be used if this is entity-preview, camera or minimap_
13854
14101
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity Online documentation}
13855
14102
  */
13856
14103
  entity: LuaEntity
@@ -13867,7 +14114,7 @@ interface CheckboxGuiElementMembers extends BaseGuiElement {
13867
14114
  /**
13868
14115
  * Is this checkbox or radiobutton checked?
13869
14116
  *
13870
- * _Can only be used if this is CheckBox or RadioButton_
14117
+ * _Can only be used if this is checkbox or radiobutton_
13871
14118
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.state Online documentation}
13872
14119
  */
13873
14120
  state: boolean
@@ -14012,17 +14259,23 @@ interface MinimapGuiElementMembers extends BaseGuiElement {
14012
14259
  readonly type: "minimap"
14013
14260
  /**
14014
14261
  * The position this camera or minimap is focused on, if any.
14262
+ *
14263
+ * _Can only be used if this is camera or minimap_
14015
14264
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.position Online documentation}
14016
14265
  */
14017
14266
  get position(): MapPosition
14018
14267
  set position(value: MapPosition | MapPositionArray)
14019
14268
  /**
14020
14269
  * The surface index this camera or minimap is using.
14270
+ *
14271
+ * _Can only be used if this is camera or minimap_
14021
14272
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index Online documentation}
14022
14273
  */
14023
14274
  surface_index: SurfaceIndex
14024
14275
  /**
14025
14276
  * The zoom this camera or minimap is using. This value must be positive.
14277
+ *
14278
+ * _Can only be used if this is camera or minimap_
14026
14279
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom Online documentation}
14027
14280
  */
14028
14281
  zoom: double
@@ -14035,11 +14288,15 @@ interface MinimapGuiElementMembers extends BaseGuiElement {
14035
14288
  minimap_player_index: uint
14036
14289
  /**
14037
14290
  * The force this minimap is using, if any.
14291
+ *
14292
+ * _Can only be used if this is minimap_
14038
14293
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.force Online documentation}
14039
14294
  */
14040
14295
  force: string
14041
14296
  /**
14042
14297
  * The entity associated with this entity-preview, camera, minimap, if any.
14298
+ *
14299
+ * _Can only be used if this is entity-preview, camera or minimap_
14043
14300
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity Online documentation}
14044
14301
  */
14045
14302
  entity: LuaEntity
@@ -14073,7 +14330,7 @@ interface RadioButtonGuiElementMembers extends BaseGuiElement {
14073
14330
  /**
14074
14331
  * Is this checkbox or radiobutton checked?
14075
14332
  *
14076
- * _Can only be used if this is CheckBox or RadioButton_
14333
+ * _Can only be used if this is checkbox or radiobutton_
14077
14334
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.state Online documentation}
14078
14335
  */
14079
14336
  state: boolean
@@ -14155,12 +14412,16 @@ interface SpriteGuiElementMembers extends BaseGuiElement {
14155
14412
  */
14156
14413
  readonly type: "sprite"
14157
14414
  /**
14158
- * The image to display on this sprite-button or sprite in the default state.
14415
+ * The sprite to display on this sprite-button or sprite in the default state.
14416
+ *
14417
+ * _Can only be used if this is sprite-button or sprite_
14159
14418
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.sprite Online documentation}
14160
14419
  */
14161
14420
  sprite: SpritePath
14162
14421
  /**
14163
- * Whether the image widget should resize according to the sprite in it. Defaults to `true`.
14422
+ * Whether the sprite widget should resize according to the sprite in it. Defaults to `true`.
14423
+ *
14424
+ * _Can only be used if this is sprite_
14164
14425
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.resize_to_sprite Online documentation}
14165
14426
  */
14166
14427
  resize_to_sprite: boolean
@@ -14503,6 +14764,10 @@ interface LuaHeatBufferPrototype {
14503
14764
  * @noSelf
14504
14765
  */
14505
14766
  interface LuaHeatEnergySourcePrototype {
14767
+ /**
14768
+ * The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
14769
+ * @see {@link https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.emissions Online documentation}
14770
+ */
14506
14771
  readonly emissions: double
14507
14772
  readonly render_no_network_icon: boolean
14508
14773
  readonly render_no_power_icon: boolean
@@ -14733,7 +14998,7 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
14733
14998
  * ```
14734
14999
  * game.player.print(#game.player.get_main_inventory())
14735
15000
  * ```
14736
- * @see {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.operator%20# Online documentation}
15001
+ * @see {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.length_operator Online documentation}
14737
15002
  */
14738
15003
  readonly length: uint
14739
15004
  /**
@@ -14743,7 +15008,7 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
14743
15008
  * ```
14744
15009
  * game.player.get_main_inventory()[1]
14745
15010
  * ```
14746
- * @see {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.operator%20[] Online documentation}
15011
+ * @see {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.index_operator Online documentation}
14747
15012
  */
14748
15013
  readonly [index: number]: LuaItemStack
14749
15014
  /**
@@ -14806,7 +15071,7 @@ interface LuaItemPrototype {
14806
15071
  * The type of this ammo prototype.
14807
15072
  *
14808
15073
  * _Can only be used if this is AmmoItem_
14809
- * @param ammo_source_type "default", "player", "turret", or "vehicle"
15074
+ * @param ammo_source_type One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
14810
15075
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.get_ammo_type Online documentation}
14811
15076
  */
14812
15077
  get_ammo_type(ammo_source_type?: "default" | "player" | "turret" | "vehicle"): AmmoType | nil
@@ -15114,6 +15379,13 @@ interface LuaItemPrototype {
15114
15379
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color Online documentation}
15115
15380
  */
15116
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
15117
15389
  /**
15118
15390
  * Flags that affect which entities will be selected.
15119
15391
  *
@@ -15135,6 +15407,13 @@ interface LuaItemPrototype {
15135
15407
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags Online documentation}
15136
15408
  */
15137
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
15138
15417
  /**
15139
15418
  * _Can only be used if this is SelectionTool_
15140
15419
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.selection_cursor_box_type Online documentation}
@@ -15150,6 +15429,11 @@ interface LuaItemPrototype {
15150
15429
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type Online documentation}
15151
15430
  */
15152
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
15153
15437
  /**
15154
15438
  * If tiles area always included when doing selection with this selection tool prototype.
15155
15439
  *
@@ -15178,6 +15462,13 @@ interface LuaItemPrototype {
15178
15462
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode Online documentation}
15179
15463
  */
15180
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
15181
15472
  /**
15182
15473
  * The tile filter mode used by this selection tool.
15183
15474
  *
@@ -15199,6 +15490,13 @@ interface LuaItemPrototype {
15199
15490
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode Online documentation}
15200
15491
  */
15201
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
15202
15500
  /**
15203
15501
  * The entity filters used by this selection tool indexed by entity name.
15204
15502
  *
@@ -15220,6 +15518,13 @@ interface LuaItemPrototype {
15220
15518
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters Online documentation}
15221
15519
  */
15222
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>
15223
15528
  /**
15224
15529
  * The entity type filters used by this selection tool indexed by entity type.
15225
15530
  *
@@ -15244,6 +15549,14 @@ interface LuaItemPrototype {
15244
15549
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters Online documentation}
15245
15550
  */
15246
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>
15247
15560
  /**
15248
15561
  * The tile filters used by this selection tool indexed by tile name.
15249
15562
  *
@@ -15265,6 +15578,13 @@ interface LuaItemPrototype {
15265
15578
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters Online documentation}
15266
15579
  */
15267
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>
15268
15588
  /**
15269
15589
  * The number of entity filters this deconstruction item has.
15270
15590
  *
@@ -15460,7 +15780,7 @@ interface AmmoItemPrototype extends BaseItemPrototype {
15460
15780
  * The type of this ammo prototype.
15461
15781
  *
15462
15782
  * _Can only be used if this is AmmoItem_
15463
- * @param ammo_source_type "default", "player", "turret", or "vehicle"
15783
+ * @param ammo_source_type One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
15464
15784
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.get_ammo_type Online documentation}
15465
15785
  */
15466
15786
  get_ammo_type(ammo_source_type?: "default" | "player" | "turret" | "vehicle"): AmmoType | nil
@@ -15688,6 +16008,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15688
16008
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color Online documentation}
15689
16009
  */
15690
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
15691
16018
  /**
15692
16019
  * Flags that affect which entities will be selected.
15693
16020
  *
@@ -15709,6 +16036,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15709
16036
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags Online documentation}
15710
16037
  */
15711
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
15712
16046
  /**
15713
16047
  * _Can only be used if this is SelectionTool_
15714
16048
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.selection_cursor_box_type Online documentation}
@@ -15724,6 +16058,11 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15724
16058
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type Online documentation}
15725
16059
  */
15726
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
15727
16066
  /**
15728
16067
  * If tiles area always included when doing selection with this selection tool prototype.
15729
16068
  *
@@ -15752,6 +16091,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15752
16091
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode Online documentation}
15753
16092
  */
15754
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
15755
16101
  /**
15756
16102
  * The tile filter mode used by this selection tool.
15757
16103
  *
@@ -15773,6 +16119,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15773
16119
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode Online documentation}
15774
16120
  */
15775
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
15776
16129
  /**
15777
16130
  * The entity filters used by this selection tool indexed by entity name.
15778
16131
  *
@@ -15794,6 +16147,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15794
16147
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters Online documentation}
15795
16148
  */
15796
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>
15797
16157
  /**
15798
16158
  * The entity type filters used by this selection tool indexed by entity type.
15799
16159
  *
@@ -15818,6 +16178,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15818
16178
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters Online documentation}
15819
16179
  */
15820
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>
15821
16189
  /**
15822
16190
  * The tile filters used by this selection tool indexed by tile name.
15823
16191
  *
@@ -15839,6 +16207,13 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15839
16207
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters Online documentation}
15840
16208
  */
15841
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>
15842
16217
  }
15843
16218
 
15844
16219
  interface DeconstructionItemPrototype extends BaseItemPrototype {
@@ -17531,7 +17906,7 @@ interface LuaLogisticCell {
17531
17906
  */
17532
17907
  interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
17533
17908
  /**
17534
- * 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".
17535
17910
  * @see {@link https://lua-api.factorio.com/latest/LuaLogisticContainerControlBehavior.html#LuaLogisticContainerControlBehavior.circuit_mode_of_operation Online documentation}
17536
17911
  */
17537
17912
  circuit_mode_of_operation: defines.control_behavior.logistic_container.circuit_mode_of_operation
@@ -18435,20 +18810,20 @@ interface LuaPlayer extends LuaControl {
18435
18810
  */
18436
18811
  pipette_entity(entity: string | LuaEntity | LuaEntityPrototype): boolean
18437
18812
  /**
18438
- * 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.
18439
18814
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_place_entity Online documentation}
18440
18815
  */
18441
18816
  can_place_entity(params: {
18442
18817
  /**
18443
- * Name of the entity to check
18818
+ * Name of the entity to check.
18444
18819
  */
18445
18820
  readonly name: string
18446
18821
  /**
18447
- * Where the entity would be placed
18822
+ * Where the entity would be placed.
18448
18823
  */
18449
18824
  readonly position: MapPosition | MapPositionArray
18450
18825
  /**
18451
- * Direction the entity would be placed
18826
+ * Direction the entity would be placed. Defaults to `north`.
18452
18827
  */
18453
18828
  readonly direction?: defines.direction
18454
18829
  }): boolean
@@ -18710,8 +19085,6 @@ interface LuaPlayer extends LuaControl {
18710
19085
  get_infinity_inventory_filter(index: uint): InfinityInventoryFilter | nil
18711
19086
  /**
18712
19087
  * Sets the filter for this map editor infinity filters at the given index.
18713
- *
18714
- * _Can only be used if this is InfinityContainer_
18715
19088
  * @param index The index to set.
18716
19089
  * @param filter The new filter or `nil` to clear the filter.
18717
19090
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_infinity_inventory_filter Online documentation}
@@ -19157,7 +19530,7 @@ interface LuaRandomGenerator {
19157
19530
  * Generates a random number. If no parameters are given a number in the [0, 1) range is returned. If a single parameter is given a floored number in the [1, N] range is returned. If 2 parameters are given a floored number in the [N1, N2] range is returned.
19158
19531
  * @param lower Inclusive lower bound on the result
19159
19532
  * @param upper Inclusive upper bound on the result
19160
- * @see {@link https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.operator%20() Online documentation}
19533
+ * @see {@link https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.call_operator Online documentation}
19161
19534
  */
19162
19535
  (lower?: int, upper?: int): double
19163
19536
  /**
@@ -19476,9 +19849,8 @@ interface LuaRecipePrototype {
19476
19849
  interface LuaRemote {
19477
19850
  /**
19478
19851
  * Add a remote interface.
19479
- * @param name Name of the interface.
19852
+ * @param name Name of the interface. If the name matches any existing interface, an error is thrown.
19480
19853
  * @param functions List of functions that are members of the new interface.
19481
- * @remarks It is an error if the given interface `name` is already registered.
19482
19854
  * @see {@link https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.add_interface Online documentation}
19483
19855
  */
19484
19856
  add_interface(name: string, functions: Record<string, (...args: any) => void>): void
@@ -19492,14 +19864,14 @@ interface LuaRemote {
19492
19864
  /**
19493
19865
  * Call a function of an interface.
19494
19866
  * @param _interface Interface to look up `function` in.
19495
- * @param _function Function name that belongs to `interface`.
19496
- * @param args Arguments to pass to the called function.
19867
+ * @param _function Function name that belongs to the `interface`.
19868
+ * @param args Arguments to pass to the called function. Note that any arguments passed through the interface are a copy of the original, not a reference. Metatables are not retained, while references to LuaObjects stay intact.
19497
19869
  * @see {@link https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.call Online documentation}
19498
19870
  */
19499
19871
  call<T extends (...args: any) => any>(_interface: string, _function: string, ...args: Parameters<T>): ReturnType<T>
19500
19872
  call(_interface: string, _function: string, ...args: readonly Any[]): Any | nil
19501
19873
  /**
19502
- * List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to the value `true`.
19874
+ * List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to `true`.
19503
19875
  * @example Assuming the "human interactor" interface is registered as above
19504
19876
  *
19505
19877
  * ```
@@ -19508,7 +19880,7 @@ interface LuaRemote {
19508
19880
  * ```
19509
19881
  * @see {@link https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.interfaces Online documentation}
19510
19882
  */
19511
- readonly interfaces: Record<string, Record<string, boolean>>
19883
+ readonly interfaces: Record<string, Record<string, true>>
19512
19884
  /**
19513
19885
  * This object's name.
19514
19886
  */
@@ -21808,6 +22180,24 @@ interface BeamSurfaceCreateEntity extends BaseSurfaceCreateEntity {
21808
22180
  readonly source_offset?: Vector
21809
22181
  }
21810
22182
 
22183
+ /**
22184
+ * `"stream"` variant of {@link SurfaceCreateEntity}.
22185
+ */
22186
+ interface StreamSurfaceCreateEntity extends BaseSurfaceCreateEntity {
22187
+ /**
22188
+ * Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).
22189
+ */
22190
+ readonly target_position?: MapPosition | MapPositionArray
22191
+ /**
22192
+ * Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).
22193
+ */
22194
+ readonly source_position?: MapPosition | MapPositionArray
22195
+ /**
22196
+ * Source position will be offset by this value when rendering the stream.
22197
+ */
22198
+ readonly source_offset?: Vector
22199
+ }
22200
+
21811
22201
  /**
21812
22202
  * `"container"` variant of {@link SurfaceCreateEntity}.
21813
22203
  */
@@ -21955,7 +22345,15 @@ interface ArtilleryFlareSurfaceCreateEntity extends BaseSurfaceCreateEntity {
21955
22345
  */
21956
22346
  interface ProjectileSurfaceCreateEntity extends BaseSurfaceCreateEntity {
21957
22347
  readonly speed: double
21958
- readonly max_range: double
22348
+ readonly max_range?: double
22349
+ }
22350
+
22351
+ /**
22352
+ * `"artillery-projectile"` variant of {@link SurfaceCreateEntity}.
22353
+ */
22354
+ interface ArtilleryProjectileSurfaceCreateEntity extends BaseSurfaceCreateEntity {
22355
+ readonly speed: double
22356
+ readonly max_range?: double
21959
22357
  }
21960
22358
 
21961
22359
  /**
@@ -22054,6 +22452,7 @@ interface SimpleEntityWithForceSurfaceCreateEntity extends BaseSurfaceCreateEnti
22054
22452
  type SurfaceCreateEntity =
22055
22453
  | AssemblingMachineSurfaceCreateEntity
22056
22454
  | BeamSurfaceCreateEntity
22455
+ | StreamSurfaceCreateEntity
22057
22456
  | ContainerSurfaceCreateEntity
22058
22457
  | CliffSurfaceCreateEntity
22059
22458
  | FlyingTextSurfaceCreateEntity
@@ -22068,6 +22467,7 @@ type SurfaceCreateEntity =
22068
22467
  | ParticleSurfaceCreateEntity
22069
22468
  | ArtilleryFlareSurfaceCreateEntity
22070
22469
  | ProjectileSurfaceCreateEntity
22470
+ | ArtilleryProjectileSurfaceCreateEntity
22071
22471
  | ResourceSurfaceCreateEntity
22072
22472
  | UndergroundBeltSurfaceCreateEntity
22073
22473
  | ProgrammableSpeakerSurfaceCreateEntity
@@ -22108,19 +22508,19 @@ interface LuaSurface {
22108
22508
  */
22109
22509
  readonly position: MapPosition | MapPositionArray
22110
22510
  /**
22111
- * Direction of the placed entity.
22511
+ * Direction of the placed entity. Defaults to `north`.
22112
22512
  */
22113
22513
  readonly direction?: defines.direction
22114
22514
  /**
22115
- * The force that would place the entity. If not specified, the enemy force is assumed.
22515
+ * The force that would place the entity. Defaults to the `"neutral"` force.
22116
22516
  */
22117
22517
  readonly force?: ForceIdentification
22118
22518
  /**
22119
- * Which type of check should be carried out.
22519
+ * Which type of check should be carried out. Defaults to `ghost_revive`.
22120
22520
  */
22121
22521
  readonly build_check_type?: defines.build_check_type
22122
22522
  /**
22123
- * If `true`, entities that can be marked for deconstruction are ignored. Only used if `build_check_type` is either `manual_ghost`, `script_ghost` or `blueprint_ghost`.
22523
+ * If `true`, entities that can be marked for deconstruction are ignored. Only used if `build_check_type` is either `manual_ghost`, `script_ghost` or `blueprint_ghost`. Defaults to `false`.
22124
22524
  */
22125
22525
  readonly forced?: boolean
22126
22526
  /**
@@ -22134,19 +22534,19 @@ interface LuaSurface {
22134
22534
  */
22135
22535
  can_fast_replace(params: {
22136
22536
  /**
22137
- * Name of the entity to check
22537
+ * Name of the entity to check.
22138
22538
  */
22139
22539
  readonly name: string
22140
22540
  /**
22141
- * Where the entity would be placed
22541
+ * Where the entity would be placed.
22142
22542
  */
22143
22543
  readonly position: MapPosition | MapPositionArray
22144
22544
  /**
22145
- * Direction the entity would be placed
22545
+ * Direction the entity would be placed. Defaults to `north`.
22146
22546
  */
22147
22547
  readonly direction?: defines.direction
22148
22548
  /**
22149
- * The force that would place the entity. If not specified, the enemy force is assumed.
22549
+ * The force that would place the entity. Defaults to the `"neutral"` force.
22150
22550
  */
22151
22551
  readonly force?: ForceIdentification
22152
22552
  }): boolean
@@ -22477,6 +22877,7 @@ interface LuaSurface {
22477
22877
  * Other attributes may be specified depending on the type of entity:
22478
22878
  * - `"assembling-machine"`: {@link AssemblingMachineSurfaceCreateEntity}
22479
22879
  * - `"beam"`: {@link BeamSurfaceCreateEntity}
22880
+ * - `"stream"`: {@link StreamSurfaceCreateEntity}
22480
22881
  * - `"container"`: {@link ContainerSurfaceCreateEntity}
22481
22882
  * - `"cliff"`: {@link CliffSurfaceCreateEntity}
22482
22883
  * - `"flying-text"`: {@link FlyingTextSurfaceCreateEntity}
@@ -22491,6 +22892,7 @@ interface LuaSurface {
22491
22892
  * - `"particle"`: {@link ParticleSurfaceCreateEntity}
22492
22893
  * - `"artillery-flare"`: {@link ArtilleryFlareSurfaceCreateEntity}
22493
22894
  * - `"projectile"`: {@link ProjectileSurfaceCreateEntity}
22895
+ * - `"artillery-projectile"`: {@link ArtilleryProjectileSurfaceCreateEntity}
22494
22896
  * - `"resource"`: {@link ResourceSurfaceCreateEntity}
22495
22897
  * - `"underground-belt"`: {@link UndergroundBeltSurfaceCreateEntity}
22496
22898
  * - `"programmable-speaker"`: {@link ProgrammableSpeakerSurfaceCreateEntity}
@@ -22596,8 +22998,8 @@ interface LuaSurface {
22596
22998
  */
22597
22999
  build_enemy_base(position: MapPosition | MapPositionArray, unit_count: uint, force?: ForceIdentification): void
22598
23000
  /**
22599
- * Get the tile at a given position.
22600
- * @remarks The input position params can also be a single tile position.
23001
+ * Get the tile at a given position. An alternative call signature for this method is passing it a single {@link TilePosition}.
23002
+ * @remarks Non-integer values will result in them being rounded down.
22601
23003
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_tile Online documentation}
22602
23004
  */
22603
23005
  get_tile(x: int, y: int): LuaTile
@@ -22916,7 +23318,7 @@ interface LuaSurface {
22916
23318
  readonly invert?: boolean
22917
23319
  }): DecorativeResult[]
22918
23320
  /**
22919
- * @param force If given only trains matching this force are returned.
23321
+ * @param force The force to search. Not providing a force will match trains in any force.
22920
23322
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_trains Online documentation}
22921
23323
  */
22922
23324
  get_trains(force?: ForceIdentification): LuaTrain[]
@@ -23204,7 +23606,13 @@ interface LuaSurface {
23204
23606
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_train_stops Online documentation}
23205
23607
  */
23206
23608
  get_train_stops(params?: {
23609
+ /**
23610
+ * The name(s) of the train stops. Not providing names will match any stop.
23611
+ */
23207
23612
  readonly name?: string | readonly string[]
23613
+ /**
23614
+ * The force to search. Not providing a force will match stops in any force.
23615
+ */
23208
23616
  readonly force?: ForceIdentification
23209
23617
  }): LuaEntity[]
23210
23618
  /**
@@ -24184,12 +24592,12 @@ interface LuaTransportLine extends ReadonlyArray<LuaItemStack> {
24184
24592
  line_equals(other: LuaTransportLine): boolean
24185
24593
  /**
24186
24594
  * Get the number of items on this transport line.
24187
- * @see {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.operator%20# Online documentation}
24595
+ * @see {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.length_operator Online documentation}
24188
24596
  */
24189
24597
  readonly length: uint
24190
24598
  /**
24191
24599
  * The indexing operator.
24192
- * @see {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.operator%20[] Online documentation}
24600
+ * @see {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.index_operator Online documentation}
24193
24601
  */
24194
24602
  readonly [index: number]: LuaItemStack
24195
24603
  /**
@@ -24382,7 +24790,7 @@ interface LuaVirtualSignalPrototype {
24382
24790
  readonly localised_name: LocalisedString
24383
24791
  readonly localised_description: LocalisedString
24384
24792
  /**
24385
- * If this is a special signal
24793
+ * Whether this is a special signal. The `everything`, `anything`, `each`, and `unknown` signals are considered special.
24386
24794
  * @see {@link https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.special Online documentation}
24387
24795
  */
24388
24796
  readonly special: boolean
@@ -24407,6 +24815,10 @@ interface LuaVirtualSignalPrototype {
24407
24815
  * @noSelf
24408
24816
  */
24409
24817
  interface LuaVoidEnergySourcePrototype {
24818
+ /**
24819
+ * The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
24820
+ * @see {@link https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html#LuaVoidEnergySourcePrototype.emissions Online documentation}
24821
+ */
24410
24822
  readonly emissions: double
24411
24823
  readonly render_no_network_icon: boolean
24412
24824
  readonly render_no_power_icon: boolean