typed-factorio 1.8.1 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -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
@@ -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.).
@@ -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,23 @@ 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
13444
13644
  /**
13445
13645
  * The items in this dropdown or listbox.
13646
+ *
13647
+ * _Can only be used if this is drop-down or list-box_
13446
13648
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.items Online documentation}
13447
13649
  */
13448
13650
  items: LocalisedString[]
13449
13651
  /**
13450
13652
  * The selected index for this dropdown or listbox. Returns `0` if none is selected.
13653
+ *
13654
+ * _Can only be used if this is drop-down or list-box_
13451
13655
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_index Online documentation}
13452
13656
  */
13453
13657
  selected_index: uint
@@ -13489,6 +13693,8 @@ interface EntityPreviewGuiElementMembers extends BaseGuiElement {
13489
13693
  readonly type: "entity-preview"
13490
13694
  /**
13491
13695
  * The entity associated with this entity-preview, camera, minimap, if any.
13696
+ *
13697
+ * _Can only be used if this is entity-preview, camera or minimap_
13492
13698
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity Online documentation}
13493
13699
  */
13494
13700
  entity: LuaEntity
@@ -13507,17 +13713,23 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
13507
13713
  readonly type: "list-box"
13508
13714
  /**
13509
13715
  * Removes the items in this dropdown or listbox.
13716
+ *
13717
+ * _Can only be used if this is drop-down or list-box_
13510
13718
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear_items Online documentation}
13511
13719
  */
13512
13720
  clear_items(): void
13513
13721
  /**
13514
13722
  * Gets the item at the given index from this dropdown or listbox.
13723
+ *
13724
+ * _Can only be used if this is drop-down or list-box_
13515
13725
  * @param index The index to get
13516
13726
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_item Online documentation}
13517
13727
  */
13518
13728
  get_item(index: uint): LocalisedString
13519
13729
  /**
13520
13730
  * Sets the given string at the given index in this dropdown or listbox.
13731
+ *
13732
+ * _Can only be used if this is drop-down or list-box_
13521
13733
  * @param index The index whose text to replace.
13522
13734
  * @param string The text to set at the given index.
13523
13735
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_item Online documentation}
@@ -13525,6 +13737,8 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
13525
13737
  set_item(index: uint, string: LocalisedString): void
13526
13738
  /**
13527
13739
  * Inserts a string at the end or at the given index of this dropdown or listbox.
13740
+ *
13741
+ * _Can only be used if this is drop-down or list-box_
13528
13742
  * @param string The text to insert.
13529
13743
  * @param index The index at which to insert the item.
13530
13744
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add_item Online documentation}
@@ -13532,6 +13746,8 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
13532
13746
  add_item(string: LocalisedString, index?: uint): void
13533
13747
  /**
13534
13748
  * Removes the item at the given index from this dropdown or listbox.
13749
+ *
13750
+ * _Can only be used if this is drop-down or list-box_
13535
13751
  * @param index The index
13536
13752
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_item Online documentation}
13537
13753
  */
@@ -13547,11 +13763,15 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
13547
13763
  scroll_to_item(index: int, scroll_mode?: "in-view" | "top-third"): void
13548
13764
  /**
13549
13765
  * The items in this dropdown or listbox.
13766
+ *
13767
+ * _Can only be used if this is drop-down or list-box_
13550
13768
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.items Online documentation}
13551
13769
  */
13552
13770
  items: LocalisedString[]
13553
13771
  /**
13554
13772
  * The selected index for this dropdown or listbox. Returns `0` if none is selected.
13773
+ *
13774
+ * _Can only be used if this is drop-down or list-box_
13555
13775
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_index Online documentation}
13556
13776
  */
13557
13777
  selected_index: uint
@@ -13630,34 +13850,44 @@ interface SpriteButtonGuiElementMembers extends BaseGuiElement {
13630
13850
  */
13631
13851
  readonly type: "sprite-button"
13632
13852
  /**
13633
- * The image to display on this sprite-button or sprite in the default state.
13853
+ * The sprite to display on this sprite-button or sprite in the default state.
13854
+ *
13855
+ * _Can only be used if this is sprite-button or sprite_
13634
13856
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.sprite Online documentation}
13635
13857
  */
13636
13858
  sprite: SpritePath
13637
13859
  /**
13638
- * The image to display on this sprite-button when it is hovered.
13860
+ * The sprite to display on this sprite-button when it is hovered.
13639
13861
  *
13640
13862
  * _Can only be used if this is sprite-button_
13641
13863
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.hovered_sprite Online documentation}
13642
13864
  */
13643
13865
  hovered_sprite: SpritePath
13644
13866
  /**
13645
- * The image to display on this sprite-button when it is clicked.
13867
+ * The sprite to display on this sprite-button when it is clicked.
13868
+ *
13869
+ * _Can only be used if this is sprite-button_
13646
13870
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clicked_sprite Online documentation}
13647
13871
  */
13648
13872
  clicked_sprite: SpritePath
13649
13873
  /**
13650
13874
  * The number to be shown in the bottom right corner of this sprite-button. Set this to `nil` to show nothing.
13875
+ *
13876
+ * _Can only be used if this is sprite-button_
13651
13877
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.number Online documentation}
13652
13878
  */
13653
13879
  number: double | nil
13654
13880
  /**
13655
13881
  * 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.
13882
+ *
13883
+ * _Can only be used if this is sprite-button_
13656
13884
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.show_percent_for_small_numbers Online documentation}
13657
13885
  */
13658
13886
  show_percent_for_small_numbers: boolean
13659
13887
  /**
13660
13888
  * The mouse button filters for this button or sprite-button.
13889
+ *
13890
+ * _Can only be used if this is button or sprite-button_
13661
13891
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.mouse_button_filter Online documentation}
13662
13892
  */
13663
13893
  get mouse_button_filter(): MouseButtonFlags
@@ -13702,6 +13932,8 @@ interface TabbedPaneGuiElementMembers extends BaseGuiElement {
13702
13932
  selected_tab_index?: uint
13703
13933
  /**
13704
13934
  * The tabs and contents being shown in this tabbed-pane.
13935
+ *
13936
+ * _Can only be used if this is tabbed-pane_
13705
13937
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tabs Online documentation}
13706
13938
  */
13707
13939
  readonly tabs: TabAndContent[]
@@ -13819,6 +14051,8 @@ interface ButtonGuiElementMembers extends BaseGuiElement {
13819
14051
  readonly type: "button"
13820
14052
  /**
13821
14053
  * The mouse button filters for this button or sprite-button.
14054
+ *
14055
+ * _Can only be used if this is button or sprite-button_
13822
14056
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.mouse_button_filter Online documentation}
13823
14057
  */
13824
14058
  get mouse_button_filter(): MouseButtonFlags
@@ -13835,22 +14069,30 @@ interface CameraGuiElementMembers extends BaseGuiElement {
13835
14069
  readonly type: "camera"
13836
14070
  /**
13837
14071
  * The position this camera or minimap is focused on, if any.
14072
+ *
14073
+ * _Can only be used if this is camera or minimap_
13838
14074
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.position Online documentation}
13839
14075
  */
13840
14076
  get position(): MapPosition
13841
14077
  set position(value: MapPosition | MapPositionArray)
13842
14078
  /**
13843
14079
  * The surface index this camera or minimap is using.
14080
+ *
14081
+ * _Can only be used if this is camera or minimap_
13844
14082
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index Online documentation}
13845
14083
  */
13846
14084
  surface_index: SurfaceIndex
13847
14085
  /**
13848
14086
  * The zoom this camera or minimap is using. This value must be positive.
14087
+ *
14088
+ * _Can only be used if this is camera or minimap_
13849
14089
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom Online documentation}
13850
14090
  */
13851
14091
  zoom: double
13852
14092
  /**
13853
14093
  * The entity associated with this entity-preview, camera, minimap, if any.
14094
+ *
14095
+ * _Can only be used if this is entity-preview, camera or minimap_
13854
14096
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity Online documentation}
13855
14097
  */
13856
14098
  entity: LuaEntity
@@ -13867,7 +14109,7 @@ interface CheckboxGuiElementMembers extends BaseGuiElement {
13867
14109
  /**
13868
14110
  * Is this checkbox or radiobutton checked?
13869
14111
  *
13870
- * _Can only be used if this is CheckBox or RadioButton_
14112
+ * _Can only be used if this is checkbox or radiobutton_
13871
14113
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.state Online documentation}
13872
14114
  */
13873
14115
  state: boolean
@@ -14012,17 +14254,23 @@ interface MinimapGuiElementMembers extends BaseGuiElement {
14012
14254
  readonly type: "minimap"
14013
14255
  /**
14014
14256
  * The position this camera or minimap is focused on, if any.
14257
+ *
14258
+ * _Can only be used if this is camera or minimap_
14015
14259
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.position Online documentation}
14016
14260
  */
14017
14261
  get position(): MapPosition
14018
14262
  set position(value: MapPosition | MapPositionArray)
14019
14263
  /**
14020
14264
  * The surface index this camera or minimap is using.
14265
+ *
14266
+ * _Can only be used if this is camera or minimap_
14021
14267
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index Online documentation}
14022
14268
  */
14023
14269
  surface_index: SurfaceIndex
14024
14270
  /**
14025
14271
  * The zoom this camera or minimap is using. This value must be positive.
14272
+ *
14273
+ * _Can only be used if this is camera or minimap_
14026
14274
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom Online documentation}
14027
14275
  */
14028
14276
  zoom: double
@@ -14035,11 +14283,15 @@ interface MinimapGuiElementMembers extends BaseGuiElement {
14035
14283
  minimap_player_index: uint
14036
14284
  /**
14037
14285
  * The force this minimap is using, if any.
14286
+ *
14287
+ * _Can only be used if this is minimap_
14038
14288
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.force Online documentation}
14039
14289
  */
14040
14290
  force: string
14041
14291
  /**
14042
14292
  * The entity associated with this entity-preview, camera, minimap, if any.
14293
+ *
14294
+ * _Can only be used if this is entity-preview, camera or minimap_
14043
14295
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity Online documentation}
14044
14296
  */
14045
14297
  entity: LuaEntity
@@ -14073,7 +14325,7 @@ interface RadioButtonGuiElementMembers extends BaseGuiElement {
14073
14325
  /**
14074
14326
  * Is this checkbox or radiobutton checked?
14075
14327
  *
14076
- * _Can only be used if this is CheckBox or RadioButton_
14328
+ * _Can only be used if this is checkbox or radiobutton_
14077
14329
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.state Online documentation}
14078
14330
  */
14079
14331
  state: boolean
@@ -14155,12 +14407,16 @@ interface SpriteGuiElementMembers extends BaseGuiElement {
14155
14407
  */
14156
14408
  readonly type: "sprite"
14157
14409
  /**
14158
- * The image to display on this sprite-button or sprite in the default state.
14410
+ * The sprite to display on this sprite-button or sprite in the default state.
14411
+ *
14412
+ * _Can only be used if this is sprite-button or sprite_
14159
14413
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.sprite Online documentation}
14160
14414
  */
14161
14415
  sprite: SpritePath
14162
14416
  /**
14163
- * Whether the image widget should resize according to the sprite in it. Defaults to `true`.
14417
+ * Whether the sprite widget should resize according to the sprite in it. Defaults to `true`.
14418
+ *
14419
+ * _Can only be used if this is sprite_
14164
14420
  * @see {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.resize_to_sprite Online documentation}
14165
14421
  */
14166
14422
  resize_to_sprite: boolean
@@ -14503,6 +14759,10 @@ interface LuaHeatBufferPrototype {
14503
14759
  * @noSelf
14504
14760
  */
14505
14761
  interface LuaHeatEnergySourcePrototype {
14762
+ /**
14763
+ * The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
14764
+ * @see {@link https://lua-api.factorio.com/latest/LuaHeatEnergySourcePrototype.html#LuaHeatEnergySourcePrototype.emissions Online documentation}
14765
+ */
14506
14766
  readonly emissions: double
14507
14767
  readonly render_no_network_icon: boolean
14508
14768
  readonly render_no_power_icon: boolean
@@ -14733,7 +14993,7 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
14733
14993
  * ```
14734
14994
  * game.player.print(#game.player.get_main_inventory())
14735
14995
  * ```
14736
- * @see {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.operator%20# Online documentation}
14996
+ * @see {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.length_operator Online documentation}
14737
14997
  */
14738
14998
  readonly length: uint
14739
14999
  /**
@@ -14743,7 +15003,7 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
14743
15003
  * ```
14744
15004
  * game.player.get_main_inventory()[1]
14745
15005
  * ```
14746
- * @see {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.operator%20[] Online documentation}
15006
+ * @see {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.index_operator Online documentation}
14747
15007
  */
14748
15008
  readonly [index: number]: LuaItemStack
14749
15009
  /**
@@ -14806,7 +15066,7 @@ interface LuaItemPrototype {
14806
15066
  * The type of this ammo prototype.
14807
15067
  *
14808
15068
  * _Can only be used if this is AmmoItem_
14809
- * @param ammo_source_type "default", "player", "turret", or "vehicle"
15069
+ * @param ammo_source_type One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
14810
15070
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.get_ammo_type Online documentation}
14811
15071
  */
14812
15072
  get_ammo_type(ammo_source_type?: "default" | "player" | "turret" | "vehicle"): AmmoType | nil
@@ -15460,7 +15720,7 @@ interface AmmoItemPrototype extends BaseItemPrototype {
15460
15720
  * The type of this ammo prototype.
15461
15721
  *
15462
15722
  * _Can only be used if this is AmmoItem_
15463
- * @param ammo_source_type "default", "player", "turret", or "vehicle"
15723
+ * @param ammo_source_type One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
15464
15724
  * @see {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.get_ammo_type Online documentation}
15465
15725
  */
15466
15726
  get_ammo_type(ammo_source_type?: "default" | "player" | "turret" | "vehicle"): AmmoType | nil
@@ -18440,15 +18700,15 @@ interface LuaPlayer extends LuaControl {
18440
18700
  */
18441
18701
  can_place_entity(params: {
18442
18702
  /**
18443
- * Name of the entity to check
18703
+ * Name of the entity to check.
18444
18704
  */
18445
18705
  readonly name: string
18446
18706
  /**
18447
- * Where the entity would be placed
18707
+ * Where the entity would be placed.
18448
18708
  */
18449
18709
  readonly position: MapPosition | MapPositionArray
18450
18710
  /**
18451
- * Direction the entity would be placed
18711
+ * Direction the entity would be placed. Defaults to `north`.
18452
18712
  */
18453
18713
  readonly direction?: defines.direction
18454
18714
  }): boolean
@@ -19157,7 +19417,7 @@ interface LuaRandomGenerator {
19157
19417
  * 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
19418
  * @param lower Inclusive lower bound on the result
19159
19419
  * @param upper Inclusive upper bound on the result
19160
- * @see {@link https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.operator%20() Online documentation}
19420
+ * @see {@link https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.call_operator Online documentation}
19161
19421
  */
19162
19422
  (lower?: int, upper?: int): double
19163
19423
  /**
@@ -19476,9 +19736,8 @@ interface LuaRecipePrototype {
19476
19736
  interface LuaRemote {
19477
19737
  /**
19478
19738
  * Add a remote interface.
19479
- * @param name Name of the interface.
19739
+ * @param name Name of the interface. If the name matches any existing interface, an error is thrown.
19480
19740
  * @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
19741
  * @see {@link https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.add_interface Online documentation}
19483
19742
  */
19484
19743
  add_interface(name: string, functions: Record<string, (...args: any) => void>): void
@@ -19492,14 +19751,14 @@ interface LuaRemote {
19492
19751
  /**
19493
19752
  * Call a function of an interface.
19494
19753
  * @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.
19754
+ * @param _function Function name that belongs to the `interface`.
19755
+ * @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
19756
  * @see {@link https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.call Online documentation}
19498
19757
  */
19499
19758
  call<T extends (...args: any) => any>(_interface: string, _function: string, ...args: Parameters<T>): ReturnType<T>
19500
19759
  call(_interface: string, _function: string, ...args: readonly Any[]): Any | nil
19501
19760
  /**
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`.
19761
+ * List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to `true`.
19503
19762
  * @example Assuming the "human interactor" interface is registered as above
19504
19763
  *
19505
19764
  * ```
@@ -19508,7 +19767,7 @@ interface LuaRemote {
19508
19767
  * ```
19509
19768
  * @see {@link https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.interfaces Online documentation}
19510
19769
  */
19511
- readonly interfaces: Record<string, Record<string, boolean>>
19770
+ readonly interfaces: Record<string, Record<string, true>>
19512
19771
  /**
19513
19772
  * This object's name.
19514
19773
  */
@@ -21808,6 +22067,24 @@ interface BeamSurfaceCreateEntity extends BaseSurfaceCreateEntity {
21808
22067
  readonly source_offset?: Vector
21809
22068
  }
21810
22069
 
22070
+ /**
22071
+ * `"stream"` variant of {@link SurfaceCreateEntity}.
22072
+ */
22073
+ interface StreamSurfaceCreateEntity extends BaseSurfaceCreateEntity {
22074
+ /**
22075
+ * Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).
22076
+ */
22077
+ readonly target_position?: MapPosition | MapPositionArray
22078
+ /**
22079
+ * Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).
22080
+ */
22081
+ readonly source_position?: MapPosition | MapPositionArray
22082
+ /**
22083
+ * Source position will be offset by this value when rendering the stream.
22084
+ */
22085
+ readonly source_offset?: Vector
22086
+ }
22087
+
21811
22088
  /**
21812
22089
  * `"container"` variant of {@link SurfaceCreateEntity}.
21813
22090
  */
@@ -21955,7 +22232,15 @@ interface ArtilleryFlareSurfaceCreateEntity extends BaseSurfaceCreateEntity {
21955
22232
  */
21956
22233
  interface ProjectileSurfaceCreateEntity extends BaseSurfaceCreateEntity {
21957
22234
  readonly speed: double
21958
- readonly max_range: double
22235
+ readonly max_range?: double
22236
+ }
22237
+
22238
+ /**
22239
+ * `"artillery-projectile"` variant of {@link SurfaceCreateEntity}.
22240
+ */
22241
+ interface ArtilleryProjectileSurfaceCreateEntity extends BaseSurfaceCreateEntity {
22242
+ readonly speed: double
22243
+ readonly max_range?: double
21959
22244
  }
21960
22245
 
21961
22246
  /**
@@ -22054,6 +22339,7 @@ interface SimpleEntityWithForceSurfaceCreateEntity extends BaseSurfaceCreateEnti
22054
22339
  type SurfaceCreateEntity =
22055
22340
  | AssemblingMachineSurfaceCreateEntity
22056
22341
  | BeamSurfaceCreateEntity
22342
+ | StreamSurfaceCreateEntity
22057
22343
  | ContainerSurfaceCreateEntity
22058
22344
  | CliffSurfaceCreateEntity
22059
22345
  | FlyingTextSurfaceCreateEntity
@@ -22068,6 +22354,7 @@ type SurfaceCreateEntity =
22068
22354
  | ParticleSurfaceCreateEntity
22069
22355
  | ArtilleryFlareSurfaceCreateEntity
22070
22356
  | ProjectileSurfaceCreateEntity
22357
+ | ArtilleryProjectileSurfaceCreateEntity
22071
22358
  | ResourceSurfaceCreateEntity
22072
22359
  | UndergroundBeltSurfaceCreateEntity
22073
22360
  | ProgrammableSpeakerSurfaceCreateEntity
@@ -22108,19 +22395,19 @@ interface LuaSurface {
22108
22395
  */
22109
22396
  readonly position: MapPosition | MapPositionArray
22110
22397
  /**
22111
- * Direction of the placed entity.
22398
+ * Direction of the placed entity. Defaults to `north`.
22112
22399
  */
22113
22400
  readonly direction?: defines.direction
22114
22401
  /**
22115
- * The force that would place the entity. If not specified, the enemy force is assumed.
22402
+ * The force that would place the entity. Defaults to the `"neutral"` force.
22116
22403
  */
22117
22404
  readonly force?: ForceIdentification
22118
22405
  /**
22119
- * Which type of check should be carried out.
22406
+ * Which type of check should be carried out. Defaults to `ghost_revive`.
22120
22407
  */
22121
22408
  readonly build_check_type?: defines.build_check_type
22122
22409
  /**
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`.
22410
+ * 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
22411
  */
22125
22412
  readonly forced?: boolean
22126
22413
  /**
@@ -22134,19 +22421,19 @@ interface LuaSurface {
22134
22421
  */
22135
22422
  can_fast_replace(params: {
22136
22423
  /**
22137
- * Name of the entity to check
22424
+ * Name of the entity to check.
22138
22425
  */
22139
22426
  readonly name: string
22140
22427
  /**
22141
- * Where the entity would be placed
22428
+ * Where the entity would be placed.
22142
22429
  */
22143
22430
  readonly position: MapPosition | MapPositionArray
22144
22431
  /**
22145
- * Direction the entity would be placed
22432
+ * Direction the entity would be placed. Defaults to `north`.
22146
22433
  */
22147
22434
  readonly direction?: defines.direction
22148
22435
  /**
22149
- * The force that would place the entity. If not specified, the enemy force is assumed.
22436
+ * The force that would place the entity. Defaults to the `"neutral"` force.
22150
22437
  */
22151
22438
  readonly force?: ForceIdentification
22152
22439
  }): boolean
@@ -22477,6 +22764,7 @@ interface LuaSurface {
22477
22764
  * Other attributes may be specified depending on the type of entity:
22478
22765
  * - `"assembling-machine"`: {@link AssemblingMachineSurfaceCreateEntity}
22479
22766
  * - `"beam"`: {@link BeamSurfaceCreateEntity}
22767
+ * - `"stream"`: {@link StreamSurfaceCreateEntity}
22480
22768
  * - `"container"`: {@link ContainerSurfaceCreateEntity}
22481
22769
  * - `"cliff"`: {@link CliffSurfaceCreateEntity}
22482
22770
  * - `"flying-text"`: {@link FlyingTextSurfaceCreateEntity}
@@ -22491,6 +22779,7 @@ interface LuaSurface {
22491
22779
  * - `"particle"`: {@link ParticleSurfaceCreateEntity}
22492
22780
  * - `"artillery-flare"`: {@link ArtilleryFlareSurfaceCreateEntity}
22493
22781
  * - `"projectile"`: {@link ProjectileSurfaceCreateEntity}
22782
+ * - `"artillery-projectile"`: {@link ArtilleryProjectileSurfaceCreateEntity}
22494
22783
  * - `"resource"`: {@link ResourceSurfaceCreateEntity}
22495
22784
  * - `"underground-belt"`: {@link UndergroundBeltSurfaceCreateEntity}
22496
22785
  * - `"programmable-speaker"`: {@link ProgrammableSpeakerSurfaceCreateEntity}
@@ -22596,8 +22885,8 @@ interface LuaSurface {
22596
22885
  */
22597
22886
  build_enemy_base(position: MapPosition | MapPositionArray, unit_count: uint, force?: ForceIdentification): void
22598
22887
  /**
22599
- * Get the tile at a given position.
22600
- * @remarks The input position params can also be a single tile position.
22888
+ * Get the tile at a given position. An alternative call signature for this method is passing it a single {@link TilePosition}.
22889
+ * @remarks Non-integer values will result in them being rounded down.
22601
22890
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_tile Online documentation}
22602
22891
  */
22603
22892
  get_tile(x: int, y: int): LuaTile
@@ -22916,7 +23205,7 @@ interface LuaSurface {
22916
23205
  readonly invert?: boolean
22917
23206
  }): DecorativeResult[]
22918
23207
  /**
22919
- * @param force If given only trains matching this force are returned.
23208
+ * @param force The force to search. Not providing a force will match trains in any force.
22920
23209
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_trains Online documentation}
22921
23210
  */
22922
23211
  get_trains(force?: ForceIdentification): LuaTrain[]
@@ -23204,7 +23493,13 @@ interface LuaSurface {
23204
23493
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_train_stops Online documentation}
23205
23494
  */
23206
23495
  get_train_stops(params?: {
23496
+ /**
23497
+ * The name(s) of the train stops. Not providing names will match any stop.
23498
+ */
23207
23499
  readonly name?: string | readonly string[]
23500
+ /**
23501
+ * The force to search. Not providing a force will match stops in any force.
23502
+ */
23208
23503
  readonly force?: ForceIdentification
23209
23504
  }): LuaEntity[]
23210
23505
  /**
@@ -24184,12 +24479,12 @@ interface LuaTransportLine extends ReadonlyArray<LuaItemStack> {
24184
24479
  line_equals(other: LuaTransportLine): boolean
24185
24480
  /**
24186
24481
  * 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}
24482
+ * @see {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.length_operator Online documentation}
24188
24483
  */
24189
24484
  readonly length: uint
24190
24485
  /**
24191
24486
  * The indexing operator.
24192
- * @see {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.operator%20[] Online documentation}
24487
+ * @see {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.index_operator Online documentation}
24193
24488
  */
24194
24489
  readonly [index: number]: LuaItemStack
24195
24490
  /**
@@ -24382,7 +24677,7 @@ interface LuaVirtualSignalPrototype {
24382
24677
  readonly localised_name: LocalisedString
24383
24678
  readonly localised_description: LocalisedString
24384
24679
  /**
24385
- * If this is a special signal
24680
+ * Whether this is a special signal. The `everything`, `anything`, `each`, and `unknown` signals are considered special.
24386
24681
  * @see {@link https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.special Online documentation}
24387
24682
  */
24388
24683
  readonly special: boolean
@@ -24407,6 +24702,10 @@ interface LuaVirtualSignalPrototype {
24407
24702
  * @noSelf
24408
24703
  */
24409
24704
  interface LuaVoidEnergySourcePrototype {
24705
+ /**
24706
+ * The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
24707
+ * @see {@link https://lua-api.factorio.com/latest/LuaVoidEnergySourcePrototype.html#LuaVoidEnergySourcePrototype.emissions Online documentation}
24708
+ */
24410
24709
  readonly emissions: double
24411
24710
  readonly render_no_network_icon: boolean
24412
24711
  readonly render_no_power_icon: boolean