factorio-types 0.0.21 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/classes.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 1.1.54
5
+ // Factorio version 1.1.60
6
6
  // API version 2
7
7
 
8
8
  /**
@@ -97,7 +97,7 @@ interface LuaAchievementPrototype {
97
97
  readonly object_name: string
98
98
 
99
99
  /**
100
- * Order string of this prototype.
100
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
101
101
  */
102
102
  readonly order: string
103
103
 
@@ -134,7 +134,7 @@ interface LuaAmmoCategoryPrototype {
134
134
  readonly object_name: string
135
135
 
136
136
  /**
137
- * Order string of this prototype.
137
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
138
138
  */
139
139
  readonly order: string
140
140
 
@@ -160,9 +160,9 @@ interface LuaArithmeticCombinatorControlBehavior extends LuaCombinatorControlBeh
160
160
  readonly object_name: string
161
161
 
162
162
  /**
163
- * The arithmetic combinator parameters.
163
+ * This arithmetic combinator's parameters.
164
164
  * @remarks
165
- * `parameters` may be `nil` in order to clear the parameters.
165
+ * Writing `nil` clears the combinator's parameters.
166
166
  *
167
167
  */
168
168
  parameters: ArithmeticCombinatorParameters
@@ -207,7 +207,7 @@ interface LuaAutoplaceControlPrototype {
207
207
  readonly object_name: string
208
208
 
209
209
  /**
210
- * Order string of this prototype.
210
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
211
211
  */
212
212
  readonly order: string
213
213
 
@@ -249,7 +249,10 @@ interface LuaBootstrap {
249
249
  get_event_order(this: void): void
250
250
 
251
251
  /**
252
- * Register a function to be run when mod configuration changes. This is called when the game version or any mod version changes; when any mod is added or removed; or when prototypes or startup mod settings have changed. It allows the mod to make any changes it deems appropriate to both the data structures in its `global` table or to the game state through {@link LuaGameScript | LuaGameScript}.
252
+ * 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 {@link global | global} table or to the game state through {@link LuaGameScript | LuaGameScript}.
253
+ * @remarks
254
+ * For more context, refer to the {@link Data Lifecycle | data-lifecycle} page.
255
+ *
253
256
  * @param f - The handler for this event. Passing `nil` will unregister it.
254
257
  */
255
258
  on_configuration_changed(this: void,
@@ -282,7 +285,10 @@ interface LuaBootstrap {
282
285
  filters?: EventFilter[]): void
283
286
 
284
287
  /**
285
- * Register a callback 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 | LuaGameScript} and the `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.
288
+ * 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 | LuaGameScript} and the {@link global | 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.
289
+ * @remarks
290
+ * For more context, refer to the {@link Data Lifecycle | data-lifecycle} page.
291
+ *
286
292
  * @param f - The handler for this event. Passing `nil` will unregister it.
287
293
  * @example
288
294
  * Initialize a `players` table in `global` for later use.
@@ -297,14 +303,17 @@ interface LuaBootstrap {
297
303
  f: (this: void) => any): void
298
304
 
299
305
  /**
300
- * 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 | LuaGameScript} and {@link LuaRendering | LuaRendering} is not available. The `global` table can be accessed and is safe to read from, but not write to.
306
+ * 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 | LuaGameScript} is not available. The {@link global | global} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
301
307
  *
302
- * The only legitimate uses of this event are these three:
303
- * - Re-setup {@link metatables | https://www.lua.org/pil/13.html} as they are not persisted through save-load.
304
- * - Re-setup conditional event handlers.
305
- * - Create local references to data stored in the {@link global | Global.html} table.
308
+ * The only legitimate uses of this event are the following:
309
+ * - Re-setup {@link metatables | https://www.lua.org/pil/13.html} as they are not persisted through the save/load cycle.
310
+ * - Re-setup conditional event handlers, meaning subscribing to an event only when some condition is met to save processing time.
311
+ * - Create local references to data stored in the {@link global | global} table.
306
312
  *
307
- * For all other purposes, {@link LuaBootstrap::on_init | LuaBootstrap::on_init}, {@link LuaBootstrap::on_configuration_changed | LuaBootstrap::on_configuration_changed} or migration scripts should be used instead.
313
+ * For all other purposes, {@link LuaBootstrap::on_init | LuaBootstrap::on_init}, {@link LuaBootstrap::on_configuration_changed | LuaBootstrap::on_configuration_changed} or {@link migrations | migrations} should be used instead.
314
+ * @remarks
315
+ * For more context, refer to the {@link Data Lifecycle | data-lifecycle} page.
316
+ *
308
317
  * @param f - The handler for this event. Passing `nil` will unregister it.
309
318
  */
310
319
  on_load(this: void,
@@ -819,12 +828,12 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
819
828
  readonly object_name: string
820
829
 
821
830
  /**
822
- * The constant combinator parameters
831
+ * This constant combinator's parameters, or `nil` if the {@link item_slot_count | LuaEntityPrototype::item_slot_count} of the combinator's prototype is `0`.
823
832
  * @remarks
824
- * Setting to `nil` clears the parameters.
833
+ * Writing `nil` clears the combinator's parameters.
825
834
  *
826
835
  */
827
- parameters: ConstantCombinatorParameters[]
836
+ parameters?: ConstantCombinatorParameters[]
828
837
 
829
838
  /**
830
839
  * The number of signals this constant combinator supports
@@ -977,7 +986,7 @@ interface LuaControl {
977
986
  get_main_inventory(this: void): void
978
987
 
979
988
  /**
980
- * Gets the parameters of a personal logistic request and auto-trash slot.
989
+ * Gets the parameters of a personal logistic request and auto-trash slot. Only used on `spider-vehicle`.
981
990
  * @param slot_index - The slot to get.
982
991
  */
983
992
  get_personal_logistic_slot(this: void,
@@ -1073,7 +1082,7 @@ interface LuaControl {
1073
1082
  value: LogisticParameters): void
1074
1083
 
1075
1084
  /**
1076
- * Sets a vehicle logistic request and auto-trash slot to the given value. Only used on `spider-vehicule`s.
1085
+ * Sets a vehicle logistic request and auto-trash slot to the given value. Only used on `spider-vehicle`.
1077
1086
  * @param slot_index - The slot to set.
1078
1087
  * @param value - The logistic request parameters.
1079
1088
  */
@@ -1498,22 +1507,22 @@ interface LuaCustomInputPrototype {
1498
1507
  readonly consuming: string
1499
1508
 
1500
1509
  /**
1501
- * If this custom input is enabled. Disabled custom inputs exist but are not used by the game.
1510
+ * Whether this custom input is enabled. Disabled custom inputs exist but are not used by the game.
1502
1511
  */
1503
1512
  readonly enabled: boolean
1504
1513
 
1505
1514
  /**
1506
- * If this custom input is enabled while using the cutscene controller.
1515
+ * Whether this custom input is enabled while using the cutscene controller.
1507
1516
  */
1508
1517
  readonly enabled_while_in_cutscene: boolean
1509
1518
 
1510
1519
  /**
1511
- * If this custom input is enabled while using the spectator controller.
1520
+ * Whether this custom input is enabled while using the spectator controller.
1512
1521
  */
1513
1522
  readonly enabled_while_spectating: boolean
1514
1523
 
1515
1524
  /**
1516
- * If this custom input will include the selected prototype (if any) when triggered.
1525
+ * Whether this custom input will include the selected prototype (if any) when triggered.
1517
1526
  */
1518
1527
  readonly include_selected_prototype: boolean
1519
1528
 
@@ -1547,7 +1556,7 @@ interface LuaCustomInputPrototype {
1547
1556
  readonly object_name: string
1548
1557
 
1549
1558
  /**
1550
- * Order string of this prototype.
1559
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
1551
1560
  */
1552
1561
  readonly order: string
1553
1562
 
@@ -1647,7 +1656,7 @@ interface LuaDamagePrototype {
1647
1656
  readonly object_name: string
1648
1657
 
1649
1658
  /**
1650
- * Order string of this prototype.
1659
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
1651
1660
  */
1652
1661
  readonly order: string
1653
1662
 
@@ -1673,9 +1682,9 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
1673
1682
  readonly object_name: string
1674
1683
 
1675
1684
  /**
1676
- * The decider combinator parameters
1685
+ * This decider combinator's parameters.
1677
1686
  * @remarks
1678
- * Setting to `nil` clears the parameters.
1687
+ * Writing `nil` clears the combinator's parameters.
1679
1688
  *
1680
1689
  */
1681
1690
  parameters: DeciderCombinatorParameters
@@ -1728,7 +1737,7 @@ interface LuaDecorativePrototype {
1728
1737
  readonly object_name: string
1729
1738
 
1730
1739
  /**
1731
- * Order string of this prototype.
1740
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
1732
1741
  */
1733
1742
  readonly order: string
1734
1743
 
@@ -2199,7 +2208,7 @@ interface LuaEntity extends LuaControl {
2199
2208
  get_or_create_control_behavior(this: void): void
2200
2209
 
2201
2210
  /**
2202
- * Gets the entities output inventory if it has one.
2211
+ * Gets the entity's output inventory if it has one.
2203
2212
  */
2204
2213
  get_output_inventory(this: void): void
2205
2214
 
@@ -2375,12 +2384,12 @@ interface LuaEntity extends LuaControl {
2375
2384
  is_closing(this: void): void
2376
2385
 
2377
2386
  /**
2378
- * Returns true if this entity is connected to an electric network.
2387
+ * Returns `true` if this entity produces or consumes electricity and is connected to an electric network that has at least one entity that can produce power.
2379
2388
  */
2380
2389
  is_connected_to_electric_network(this: void): void
2381
2390
 
2382
2391
  /**
2383
- * Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether any crafting action has made progress in this machine.
2392
+ * Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether a crafting process has been started in this machine.
2384
2393
  * @remarks
2385
2394
  * Applies to subclasses: CraftingMachine
2386
2395
  *
@@ -2788,14 +2797,17 @@ interface LuaEntity extends LuaControl {
2788
2797
  readonly armed: boolean
2789
2798
 
2790
2799
  /**
2791
- * The player this character is associated with or `nil` if none. When the player logs off in multiplayer all of the associated characters will be logged off with him.
2800
+ * The player this character is associated with, or `nil` if there isn't one. Set to `nil` to clear.
2801
+ *
2802
+ * The player will be automatically disassociated when a controller is set on the character. Also, all characters associated to a player will be logged off when the player logs off in multiplayer.
2803
+ *
2804
+ * Reading this property will return a {@link LuaPlayer | LuaPlayer}, while {@link PlayerIdentification | PlayerIdentification} can be used when writing.
2792
2805
  * @remarks
2793
2806
  * A character associated with a player is not directly controlled by any player.
2794
- * Set to `nil` to clear. The player will be automatically disassociated when a controller is set on the character.
2795
2807
  * Applies to subclasses: Character
2796
2808
  *
2797
2809
  */
2798
- associated_player?: LuaPlayer
2810
+ associated_player?: LuaPlayer | PlayerIdentification
2799
2811
 
2800
2812
  /**
2801
2813
  * Whether this rocket silo automatically launches the rocket when cargo is inserted.
@@ -3349,12 +3361,14 @@ interface LuaEntity extends LuaControl {
3349
3361
  kills: number
3350
3362
 
3351
3363
  /**
3352
- * The last player that changed any setting on this entity. This includes building the entity, changing its color, or configuring its circuit network. Can be `nil` if the last user is not part of the save anymore. Mods can overwrite it if desired.
3364
+ * The last player that changed any setting on this entity. This includes building the entity, changing its color, or configuring its circuit network. Can be `nil` if the last user is not part of the save anymore.
3365
+ *
3366
+ * Reading this property will return a {@link LuaPlayer | LuaPlayer}, while {@link PlayerIdentification | PlayerIdentification} can be used when writing.
3353
3367
  * @remarks
3354
3368
  * Applies to subclasses: EntityWithOwner
3355
3369
  *
3356
3370
  */
3357
- last_user: LuaPlayer
3371
+ last_user: LuaPlayer | PlayerIdentification
3358
3372
 
3359
3373
  /**
3360
3374
  * The link ID this linked container is using.
@@ -3582,6 +3596,14 @@ interface LuaEntity extends LuaControl {
3582
3596
  */
3583
3597
  readonly pump_rail_target?: LuaEntity
3584
3598
 
3599
+ /**
3600
+ * The current radar scan progress, as a number in range [0, 1].
3601
+ * @remarks
3602
+ * Applies to subclasses: Radar
3603
+ *
3604
+ */
3605
+ readonly radar_scan_progress: number
3606
+
3585
3607
  /**
3586
3608
  * When locked; the recipe in this assembling machine can't be changed by the player.
3587
3609
  * @remarks
@@ -3608,8 +3630,10 @@ interface LuaEntity extends LuaControl {
3608
3630
 
3609
3631
  /**
3610
3632
  * The player that this `simple-entity-with-owner`, `simple-entity-with-force`, `flying-text`, or `highlight-box` is visible to. `nil` means it is rendered for every player.
3633
+ *
3634
+ * Reading this property will return a {@link LuaPlayer | LuaPlayer}, while {@link PlayerIdentification | PlayerIdentification} can be used when writing.
3611
3635
  */
3612
- render_player: LuaPlayer
3636
+ render_player: LuaPlayer | PlayerIdentification
3613
3637
 
3614
3638
  /**
3615
3639
  * The forces that this `simple-entity-with-owner`, `simple-entity-with-force`, or `flying-text` is visible to. `nil` or an empty array means it is rendered for every force.
@@ -3649,12 +3673,12 @@ interface LuaEntity extends LuaControl {
3649
3673
  rotatable: boolean
3650
3674
 
3651
3675
  /**
3652
- * The secondary bounding box of this entity or `nil` if it doesn't have one.
3676
+ * The secondary bounding box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.
3653
3677
  */
3654
3678
  readonly secondary_bounding_box?: BoundingBox
3655
3679
 
3656
3680
  /**
3657
- * The secondary selection box of this entity or `nil` if it doesn't have one.
3681
+ * The secondary selection box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.
3658
3682
  */
3659
3683
  readonly secondary_selection_box?: BoundingBox
3660
3684
 
@@ -4051,6 +4075,11 @@ interface LuaEntityPrototype {
4051
4075
  */
4052
4076
  readonly always_on?: boolean
4053
4077
 
4078
+ /**
4079
+ * Gets the animation speed coefficient of this belt . `nil` if this is not transport belt connectable.
4080
+ */
4081
+ readonly animation_speed_coefficient: number
4082
+
4054
4083
  /**
4055
4084
  * The attack parameters for this entity or `nil` if the entity doesn't use attack parameters.
4056
4085
  */
@@ -4066,6 +4095,11 @@ interface LuaEntityPrototype {
4066
4095
  */
4067
4096
  readonly automated_ammo_count?: number
4068
4097
 
4098
+ /**
4099
+ * Does this prototoype automaticly cycle weapons. `nil` if this is not a spider vechicle.
4100
+ */
4101
+ readonly automatic_weapon_cycling: boolean
4102
+
4069
4103
  /**
4070
4104
  * Autoplace specification for this entity prototype. `nil` if none.
4071
4105
  */
@@ -4122,6 +4156,11 @@ interface LuaEntityPrototype {
4122
4156
  */
4123
4157
  readonly burner_prototype?: LuaBurnerPrototype
4124
4158
 
4159
+ /**
4160
+ * If this generator prototype burns fluid.
4161
+ */
4162
+ readonly burns_fluid: boolean
4163
+
4125
4164
  readonly call_for_help_radius: number
4126
4165
 
4127
4166
  /**
@@ -4137,6 +4176,11 @@ interface LuaEntityPrototype {
4137
4176
  */
4138
4177
  readonly center_collision_mask: CollisionMask
4139
4178
 
4179
+ /**
4180
+ * Gets the chain shooting cooldown modifier of this prototype. `nil` if this is not a spider vechicle.
4181
+ */
4182
+ readonly chain_shooting_cooldown_modifier: number
4183
+
4140
4184
  /**
4141
4185
  * @remarks
4142
4186
  * Applies to subclasses: Character
@@ -4144,6 +4188,11 @@ interface LuaEntityPrototype {
4144
4188
  */
4145
4189
  readonly character_corpse: LuaEntityPrototype
4146
4190
 
4191
+ /**
4192
+ * Gets the chunk exploration radius of this prototype. `nil` if this is not a spider vechicle.
4193
+ */
4194
+ readonly chunk_exploration_radius: number
4195
+
4147
4196
  /**
4148
4197
  * The item prototype name used to destroy this cliff or `nil`.
4149
4198
  */
@@ -4261,6 +4310,11 @@ interface LuaEntityPrototype {
4261
4310
  */
4262
4311
  readonly default_collision_mask_with_flags: CollisionMaskWithFlags
4263
4312
 
4313
+ /**
4314
+ * If this generator prototype destroys non fuel fluids.
4315
+ */
4316
+ readonly destroy_non_fuel_fluid: boolean
4317
+
4264
4318
  /**
4265
4319
  * The distraction cooldown of this unit prototype or `nil`.
4266
4320
  */
@@ -4293,6 +4347,14 @@ interface LuaEntityPrototype {
4293
4347
  */
4294
4348
  readonly drop_item_distance: number
4295
4349
 
4350
+ /**
4351
+ * The dying time of this corpse prototype. `nil` if not a corpse prototype.
4352
+ * @remarks
4353
+ * Applies to subclasses: Corpse
4354
+ *
4355
+ */
4356
+ readonly dying_speed: number
4357
+
4296
4358
  /**
4297
4359
  * The effectivity of this car prototype, generator prototype or `nil`.
4298
4360
  */
@@ -4453,11 +4515,21 @@ interface LuaEntityPrototype {
4453
4515
  */
4454
4516
  readonly healing_per_tick: number
4455
4517
 
4518
+ /**
4519
+ * The heat buffer prototype this entity uses or `nil`.
4520
+ */
4521
+ readonly heat_buffer_prototype?: LuaHeatBufferPrototype
4522
+
4456
4523
  /**
4457
4524
  * The heat energy source prototype this entity uses or `nil`.
4458
4525
  */
4459
4526
  readonly heat_energy_source_prototype?: LuaHeatEnergySourcePrototype
4460
4527
 
4528
+ /**
4529
+ * Gets the height of this prototype. `nil` if this is not a spider vechicle.
4530
+ */
4531
+ readonly height: number
4532
+
4461
4533
  /**
4462
4534
  * Every time this infinite resource 'ticks' down it is reduced by this amount. `nil` when not a resource. Meaningless if this isn't an infinite type resource.
4463
4535
  */
@@ -4564,6 +4636,14 @@ interface LuaEntityPrototype {
4564
4636
  */
4565
4637
  readonly logistic_mode?: string
4566
4638
 
4639
+ /**
4640
+ * The logistic parameters for this roboport. or `nil`.
4641
+ * @remarks
4642
+ * Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
4643
+ *
4644
+ */
4645
+ readonly logistic_parameters?: { charge_approach_distance: number, charging_distance: number, charging_energy: number, charging_station_count: number, charging_station_shift: Vector, charging_threshold_distance: number, construction_radius: number, logistic_radius: number, logistics_connection_distance: number, robot_limit: number, robot_vertical_acceleration: number, robots_shrink_when_entering_and_exiting: boolean, spawn_and_station_height: number, spawn_and_station_shadow_height_offset: number, stationing_offset: Vector }
4646
+
4567
4647
  /**
4568
4648
  * The logistic radius for this roboport prototype or `nil`.
4569
4649
  */
@@ -4581,6 +4661,13 @@ interface LuaEntityPrototype {
4581
4661
  */
4582
4662
  readonly loot_pickup_distance: number
4583
4663
 
4664
+ /**
4665
+ * Get the manual range modifier for artillery turret and artillery wagon prototypes. `nil` if not artillery type prototype
4666
+ *
4667
+ * subclass(ArtilleryWagon, ArtilleryTurret)
4668
+ */
4669
+ readonly manual_range_modifier: number
4670
+
4584
4671
  /**
4585
4672
  * The map color used when charting this entity if a friendly or enemy color isn't defined or `nil`.
4586
4673
  */
@@ -4651,6 +4738,11 @@ interface LuaEntityPrototype {
4651
4738
  */
4652
4739
  readonly max_polyphony?: number
4653
4740
 
4741
+ /**
4742
+ * The default maximum power output of this generator prototype or `nil`.
4743
+ */
4744
+ readonly max_power_output?: number
4745
+
4654
4746
  /**
4655
4747
  * The maximum pursue distance of this unit prototype or `nil`.
4656
4748
  */
@@ -4761,7 +4853,7 @@ interface LuaEntityPrototype {
4761
4853
  readonly object_name: string
4762
4854
 
4763
4855
  /**
4764
- * Order string of this prototype.
4856
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
4765
4857
  */
4766
4858
  readonly order: string
4767
4859
 
@@ -4894,6 +4986,11 @@ interface LuaEntityPrototype {
4894
4986
  */
4895
4987
  readonly running_speed: number
4896
4988
 
4989
+ /**
4990
+ * If this generator prototype scales fluid usage.
4991
+ */
4992
+ readonly scale_fluid_usage: boolean
4993
+
4897
4994
  /**
4898
4995
  * The secondary bounding box used for collision checking, or `nil` if it doesn't have one. This is only used in rails and rail remnants.
4899
4996
  */
@@ -5023,6 +5120,11 @@ interface LuaEntityPrototype {
5023
5120
  */
5024
5121
  readonly timeout: number
5025
5122
 
5123
+ /**
5124
+ * Gets the torso rotation speed of this prototype. `nil` if this is not a spider vechicle.
5125
+ */
5126
+ readonly torso_rotation_speed: number
5127
+
5026
5128
  /**
5027
5129
  * If it is a tree, return the number of colors it supports. `nil` otherwise.
5028
5130
  */
@@ -5182,7 +5284,7 @@ interface LuaEquipmentCategoryPrototype {
5182
5284
  readonly object_name: string
5183
5285
 
5184
5286
  /**
5185
- * Order string of this prototype.
5287
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
5186
5288
  */
5187
5289
  readonly order: string
5188
5290
 
@@ -5376,7 +5478,7 @@ interface LuaEquipmentGridPrototype {
5376
5478
  readonly object_name: string
5377
5479
 
5378
5480
  /**
5379
- * Order string of this prototype.
5481
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
5380
5482
  */
5381
5483
  readonly order: string
5382
5484
 
@@ -5475,7 +5577,7 @@ interface LuaEquipmentPrototype {
5475
5577
  readonly object_name: string
5476
5578
 
5477
5579
  /**
5478
- * Order string of this prototype.
5580
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
5479
5581
  */
5480
5582
  readonly order: string
5481
5583
 
@@ -5511,7 +5613,7 @@ interface LuaEquipmentPrototype {
5511
5613
  *
5512
5614
  * Examples:
5513
5615
  * - The item production GUI shows "consumption" on the right, thus `output` describes the item consumption numbers. The same goes for fluid consumption.
5514
- * - The kills gui shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
5616
+ * - The kills GUI shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
5515
5617
  * - The electric network GUI shows "power consumption" on the left side, so in this case `input` describes the power consumption numbers.
5516
5618
  */
5517
5619
  interface LuaFlowStatistics {
@@ -5521,17 +5623,23 @@ interface LuaFlowStatistics {
5521
5623
  clear(this: void): void
5522
5624
 
5523
5625
  /**
5524
- * Gets the flow count value for the given time frame.
5525
- * @param table.count - If true, the count is returned instead of the per-time-frame value.
5626
+ * Gets the flow count value for the given time frame. If `sample_index` is not provided, then the value returned is the average across the provided precision time period. These are the values shown in the bottom section of the statistics GUIs.
5627
+ *
5628
+ * Use `sample_index` to access the data used to generate the statistics graphs. Each precision level contains 300 samples of data so at a precision of 1 minute, each sample contains data averaged across 60s / 300 = 0.2s = 12 ticks.
5629
+ *
5630
+ * All return values are normalized to be per-tick for electric networks and per-minute for all other types.
5631
+ * @param table.count - If true, the count of items/fluids/entities is returned instead of the per-time-frame value.
5526
5632
  * @param table.input - Read the input values or the output values
5527
5633
  * @param table.name - The prototype name.
5528
- * @param table.precision_index - The precision to read.
5634
+ * @param table.precision_index - The precision range to read.
5635
+ * @param table.sample_index - The sample index to read from within the precision range. If not provided, the entire precision range is read. Must be between 1 and 300 where 1 is the most recent sample and 300 is the oldest.
5529
5636
  */
5530
5637
  get_flow_count(this: void,
5531
5638
  table: {
5532
5639
  name: string,
5533
5640
  input: boolean,
5534
5641
  precision_index: defines.flow_precision_index,
5642
+ sample_index?: number,
5535
5643
  count?: boolean
5536
5644
  }): void
5537
5645
 
@@ -5639,7 +5747,7 @@ interface LuaFluidBox {
5639
5747
  index: number): void
5640
5748
 
5641
5749
  /**
5642
- * The fluidbox connections for the given fluidbox index.
5750
+ * The fluidboxes to which the fluidbox at the given index is connected.
5643
5751
  */
5644
5752
  get_connections(this: void,
5645
5753
  index: number): void
@@ -5916,7 +6024,7 @@ interface LuaFluidPrototype {
5916
6024
  readonly object_name: string
5917
6025
 
5918
6026
  /**
5919
- * Order string for this prototype.
6027
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
5920
6028
  */
5921
6029
  readonly order: string
5922
6030
 
@@ -6664,7 +6772,7 @@ interface LuaFuelCategoryPrototype {
6664
6772
  readonly object_name: string
6665
6773
 
6666
6774
  /**
6667
- * Order string of this prototype.
6775
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
6668
6776
  */
6669
6777
  readonly order: string
6670
6778
 
@@ -7026,10 +7134,7 @@ interface LuaGameScript {
7026
7134
  sound_path: SoundPath): void
7027
7135
 
7028
7136
  /**
7029
- * Checks if the given SpritePath is valid and contains a loaded sprite.
7030
- * @remarks
7031
- * The existence of the image is not checked for paths of type `file`.
7032
- *
7137
+ * Checks if the given SpritePath is valid and contains a loaded sprite. The existence of the image is not checked for paths of type `file`.
7033
7138
  * @param sprite_path - Path to the image.
7034
7139
  */
7035
7140
  is_valid_sprite_path(this: void,
@@ -7145,8 +7250,8 @@ interface LuaGameScript {
7145
7250
  players?: Array<LuaPlayer | string>): void
7146
7251
 
7147
7252
  /**
7148
- * Remove file or directory. Given path is taken relative to the script output directory. Can be used to remove files created by {@link LuaGameScript::write_file | LuaGameScript::write_file}.
7149
- * @param path - Path to remove, relative to the script output directory
7253
+ * Remove a file or directory in the `script-output` folder, located in the game's {@link user data directory | https://wiki.factorio.com/User_data_directory}. Can be used to remove files created by {@link LuaGameScript::write_file | LuaGameScript::write_file}.
7254
+ * @param path - The path to the file or directory to remove, relative to `script-output`.
7150
7255
  */
7151
7256
  remove_path(this: void,
7152
7257
  path: string): void
@@ -7220,7 +7325,7 @@ interface LuaGameScript {
7220
7325
  data: Table): void
7221
7326
 
7222
7327
  /**
7223
- * Take a screenshot and save it to a file. The filename should include a file extension indicating the desired image format. Supports `.png`, `.jpg` / `.jpeg`, `.tga` and `.bmp`.
7328
+ * Take a screenshot of the game and save it to the `script-output` folder, located in the game's {@link user data directory | https://wiki.factorio.com/User_data_directory}. The name of the image file can be specified via the `path` parameter.
7224
7329
  * @remarks
7225
7330
  * If Factorio is running headless, this function will do nothing.
7226
7331
  *
@@ -7229,7 +7334,7 @@ interface LuaGameScript {
7229
7334
  * @param table.by_player - If defined, the screenshot will only be taken for this player.
7230
7335
  * @param table.daytime - Overrides the current surface daytime for the duration of screenshot rendering.
7231
7336
  * @param table.force_render - Screenshot requests are processed in between game update and render. The game may skip rendering (ie. drop frames) if the previous frame has not finished rendering or the game simulation starts to fall below 60 updates per second. If `force_render` is set to `true`, the game won't drop frames and process the screenshot request at the end of the update in which the request was created. This is not honored on multiplayer clients that are catching up to server. Defaults to `false`.
7232
- * @param table.path - The sub-path in `"script-output"` to save the screenshot to. Defaults to `"screenshot.png"`.
7337
+ * @param table.path - The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `"save/here/screenshot.png"`) will create the necessary folder structure in `script-output`. Defaults to `"screenshot.png"`.
7233
7338
  * @param table.player - The player to focus on. Defaults to the local player.
7234
7339
  * @param table.position - If defined, the screenshot will be centered on this position. Otherwise, the screenshot will center on `player`.
7235
7340
  * @param table.quality - The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.
@@ -7262,10 +7367,10 @@ interface LuaGameScript {
7262
7367
  }): void
7263
7368
 
7264
7369
  /**
7265
- * Take a screenshot of the technology screen and save it to a file. The filename should include a file extension indicating the desired image format. Supports `.png`, `.jpg` / `.jpeg`, `.tga` and `.bmp`.
7370
+ * Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's {@link user data directory | https://wiki.factorio.com/User_data_directory}. The name of the image file can be specified via the `path` parameter.
7266
7371
  * @param table.by_player - If given, the screenshot will only be taken for this player.
7267
7372
  * @param table.force - The force whose technology to screenshot. If not given, the `"player`" force is used.
7268
- * @param table.path - The sub-path in `"script-output"` to save the screenshot to. Defaults to `"technology-screenshot.png"`.
7373
+ * @param table.path - The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `"save/here/screenshot.png"`) will create the necessary folder structure in `script-output`. Defaults to `"technology-screenshot.png"`.
7269
7374
  * @param table.quality - The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.
7270
7375
  * @param table.selected_technology - The technology to highlight.
7271
7376
  * @param table.skip_disabled - If `true`, disabled technologies will be skipped. Their successors will be attached to the disabled technology's parents. Defaults to `false`.
@@ -7295,11 +7400,11 @@ interface LuaGameScript {
7295
7400
  player: PlayerIdentification): void
7296
7401
 
7297
7402
  /**
7298
- * Write a string to a file.
7299
- * @param append - When `true`, this will append to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new data.
7300
- * @param data - File content
7301
- * @param filename - Path to the file to write to.
7302
- * @param for_player - If given, the file will only be written for this player_index. 0 means only the server if one exists.
7403
+ * Write a file to the `script-output` folder, located in the game's {@link user data directory | https://wiki.factorio.com/User_data_directory}. The name and file extension of the file can be specified via the `filename` parameter.
7404
+ * @param append - If `true`, `data` will be appended to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new `data`.
7405
+ * @param data - The content to write to the file.
7406
+ * @param filename - The name of the file. Providing a directory path (ex. `"save/here/example.txt"`) will create the necessary folder structure in `script-output`.
7407
+ * @param for_player - If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present.
7303
7408
  */
7304
7409
  write_file(this: void,
7305
7410
  filename: string,
@@ -7533,7 +7638,9 @@ interface LuaGameScript {
7533
7638
  readonly permissions: LuaPermissionGroups
7534
7639
 
7535
7640
  /**
7536
- * The player typing at the console - `nil` in all other instances. See {@link LuaGameScript::players | LuaGameScript::players} for accessing all players.
7641
+ * This property is only populated inside {@link custom command | LuaCommandProcessor} handlers and when writing {@link Lua console commands | https://wiki.factorio.com/Console#Scripting_and_cheat_commands}. Returns the player that is typing the command, `nil` in all other instances.
7642
+ *
7643
+ * See {@link LuaGameScript::players | LuaGameScript::players} for accessing all players.
7537
7644
  */
7538
7645
  readonly player: LuaPlayer
7539
7646
 
@@ -7720,6 +7827,9 @@ interface LuaGroup {
7720
7827
  */
7721
7828
  readonly object_name: string
7722
7829
 
7830
+ /**
7831
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
7832
+ */
7723
7833
  readonly order: string
7724
7834
 
7725
7835
  /**
@@ -7761,6 +7871,8 @@ interface LuaGui {
7761
7871
 
7762
7872
  /**
7763
7873
  * Returns `true` if sprite_path is valid and contains loaded sprite, otherwise `false`. Sprite path of type `file` doesn't validate if file exists.
7874
+ *
7875
+ * If you want to avoid needing a LuaGui object, {@link LuaGameScript::is_valid_sprite_path | LuaGameScript::is_valid_sprite_path} can be used instead.
7764
7876
  * @param sprite_path - Path to a image.
7765
7877
  */
7766
7878
  is_valid_sprite_path(this: void,
@@ -8293,20 +8405,7 @@ interface LuaGuiElement {
8293
8405
  draw_vertical_lines: boolean
8294
8406
 
8295
8407
  /**
8296
- * The elem filters of this choose-elem-button or `nil` if there are no filters.
8297
- *
8298
- * The compatible type of filter is determined by elem_type:
8299
- * - Type `"item"` - {@link ItemPrototypeFilter | ItemPrototypeFilter}
8300
- * - Type `"tile"` - {@link TilePrototypeFilter | TilePrototypeFilter}
8301
- * - Type `"entity"` - {@link EntityPrototypeFilter | EntityPrototypeFilter}
8302
- * - Type `"signal"` - Does not support filters
8303
- * - Type `"fluid"` - {@link FluidPrototypeFilter | FluidPrototypeFilter}
8304
- * - Type `"recipe"` - {@link RecipePrototypeFilter | RecipePrototypeFilter}
8305
- * - Type `"decorative"` - {@link DecorativePrototypeFilter | DecorativePrototypeFilter}
8306
- * - Type `"item-group"` - Does not support filters
8307
- * - Type `"achievement"` - {@link AchievementPrototypeFilter | AchievementPrototypeFilter}
8308
- * - Type `"equipment"` - {@link EquipmentPrototypeFilter | EquipmentPrototypeFilter}
8309
- * - Type `"technology"` - {@link TechnologyPrototypeFilter | TechnologyPrototypeFilter}
8408
+ * The elem filters of this choose-elem-button, or `nil` if there are no filters. The compatible type of filter is determined by `elem_type`.
8310
8409
  * @remarks
8311
8410
  * Writing to this field does not change or clear the currently selected element.
8312
8411
  * Applies to subclasses: choose-elem-button
@@ -8459,7 +8558,7 @@ interface LuaGuiElement {
8459
8558
  mouse_button_filter: MouseButtonFlags
8460
8559
 
8461
8560
  /**
8462
- * The name of this element.
8561
+ * The name of this element. `""` if no name was set.
8463
8562
  * @example
8464
8563
  * ```
8465
8564
  * game.player.gui.top.greeting.name == "greeting"
@@ -8664,7 +8763,7 @@ interface LuaGuiElement {
8664
8763
  word_wrap: boolean
8665
8764
 
8666
8765
  /**
8667
- * The zoom this camera or minimap is using.
8766
+ * The zoom this camera or minimap is using. This value must be positive.
8668
8767
  */
8669
8768
  zoom: number
8670
8769
 
@@ -8678,6 +8777,43 @@ interface LuaGuiElement {
8678
8777
 
8679
8778
  }
8680
8779
 
8780
+ /**
8781
+ * Prototype of a heat buffer.
8782
+ */
8783
+ interface LuaHeatBufferPrototype {
8784
+ /**
8785
+ * All methods and properties that this object supports.
8786
+ */
8787
+ help(this: void): void
8788
+
8789
+ readonly connections: HeatConnection[]
8790
+
8791
+ readonly default_temperature: number
8792
+
8793
+ readonly max_temperature: number
8794
+
8795
+ readonly max_transfer: number
8796
+
8797
+ readonly min_temperature_gradient: number
8798
+
8799
+ readonly min_working_temperature: number
8800
+
8801
+ readonly minimum_glow_temperature: number
8802
+
8803
+ /**
8804
+ * The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
8805
+ */
8806
+ readonly object_name: string
8807
+
8808
+ readonly specific_heat: number
8809
+
8810
+ /**
8811
+ * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
8812
+ */
8813
+ readonly valid: boolean
8814
+
8815
+ }
8816
+
8681
8817
  /**
8682
8818
  * Prototype of a heat energy source.
8683
8819
  */
@@ -8693,6 +8829,8 @@ interface LuaHeatEnergySourcePrototype {
8693
8829
 
8694
8830
  readonly emissions: number
8695
8831
 
8832
+ readonly heat_buffer_prototype: LuaHeatBufferPrototype
8833
+
8696
8834
  readonly max_temperature: number
8697
8835
 
8698
8836
  readonly max_transfer: number
@@ -9359,7 +9497,7 @@ interface LuaItemPrototype {
9359
9497
  readonly mapper_count: number
9360
9498
 
9361
9499
  /**
9362
- * Effects of this module; `nil` if this is not a module.
9500
+ * Effects of this module.
9363
9501
  * @remarks
9364
9502
  * Applies to subclasses: ModuleItem
9365
9503
  *
@@ -9377,7 +9515,7 @@ interface LuaItemPrototype {
9377
9515
  readonly object_name: string
9378
9516
 
9379
9517
  /**
9380
- * Order string.
9518
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
9381
9519
  */
9382
9520
  readonly order: string
9383
9521
 
@@ -9414,6 +9552,70 @@ interface LuaItemPrototype {
9414
9552
  */
9415
9553
  readonly resistances: {[key: string]: Resistance}
9416
9554
 
9555
+ /**
9556
+ * The reverse entity filter mode used by this selection tool.
9557
+ * @remarks
9558
+ * Applies to subclasses: SelectionTool
9559
+ *
9560
+ */
9561
+ readonly reverse_alt_entity_filter_mode: string
9562
+
9563
+ /**
9564
+ * The reverse entity filters used by this selection tool indexed by entity name.
9565
+ * @remarks
9566
+ * Applies to subclasses: SelectionTool
9567
+ *
9568
+ */
9569
+ readonly reverse_entity_filters: {[key: string]: LuaEntityPrototype}
9570
+
9571
+ /**
9572
+ * The reverse entity type filters used by this selection tool indexed by entity type.
9573
+ * @remarks
9574
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
9575
+ * Applies to subclasses: SelectionTool
9576
+ *
9577
+ */
9578
+ readonly reverse_entity_type_filters: {[key: string]: boolean}
9579
+
9580
+ /**
9581
+ * The color used when doing reverse selection with this selection tool prototype.
9582
+ * @remarks
9583
+ * Applies to subclasses: SelectionTool
9584
+ *
9585
+ */
9586
+ readonly reverse_selection_border_color: Color
9587
+
9588
+ /**
9589
+ * @remarks
9590
+ * Applies to subclasses: SelectionTool
9591
+ *
9592
+ */
9593
+ readonly reverse_selection_cursor_box_type: string
9594
+
9595
+ /**
9596
+ * Flags that affect which entities will be selected during reverse selection.
9597
+ * @remarks
9598
+ * Applies to subclasses: SelectionTool
9599
+ *
9600
+ */
9601
+ readonly reverse_selection_mode_flags: SelectionModeFlags
9602
+
9603
+ /**
9604
+ * The reverse tile filter mode used by this selection tool.
9605
+ * @remarks
9606
+ * Applies to subclasses: SelectionTool
9607
+ *
9608
+ */
9609
+ readonly reverse_tile_filter_mode: string
9610
+
9611
+ /**
9612
+ * The reverse tile filters used by this selection tool indexed by tile name.
9613
+ * @remarks
9614
+ * Applies to subclasses: SelectionTool
9615
+ *
9616
+ */
9617
+ readonly reverse_tile_filters: {[key: string]: LuaTilePrototype}
9618
+
9417
9619
  /**
9418
9620
  * The results from launching this item in a rocket.
9419
9621
  */
@@ -9889,7 +10091,7 @@ interface LuaItemStack {
9889
10091
 
9890
10092
  /**
9891
10093
  * Set this item stack to another item stack.
9892
- * @param stack - Item stack to set this one to. Omitting this parameter or passing `nil` will clear this item stack, as if by calling [LuaItemStack::clear](LuaItemStack::clear).
10094
+ * @param stack - Item stack to set it to. Omitting this parameter or passing `nil` will clear this item stack, as if [LuaItemStack::clear](LuaItemStack::clear) was called.
9893
10095
  */
9894
10096
  set_stack(this: void,
9895
10097
  stack?: ItemStackIdentification): void
@@ -10812,7 +11014,7 @@ interface LuaModSettingPrototype {
10812
11014
  readonly object_name: string
10813
11015
 
10814
11016
  /**
10815
- * Order string of this prototype.
11017
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10816
11018
  */
10817
11019
  readonly order: string
10818
11020
 
@@ -10849,7 +11051,7 @@ interface LuaModuleCategoryPrototype {
10849
11051
  readonly object_name: string
10850
11052
 
10851
11053
  /**
10852
- * Order string of this prototype.
11054
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10853
11055
  */
10854
11056
  readonly order: string
10855
11057
 
@@ -10894,7 +11096,7 @@ interface LuaNamedNoiseExpression {
10894
11096
  readonly object_name: string
10895
11097
 
10896
11098
  /**
10897
- * Order string of this prototype.
11099
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10898
11100
  */
10899
11101
  readonly order: string
10900
11102
 
@@ -10929,7 +11131,7 @@ interface LuaNoiseLayerPrototype {
10929
11131
  readonly object_name: string
10930
11132
 
10931
11133
  /**
10932
- * Order string of this prototype.
11134
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10933
11135
  */
10934
11136
  readonly order: string
10935
11137
 
@@ -10974,7 +11176,7 @@ interface LuaParticlePrototype {
10974
11176
  readonly object_name: string
10975
11177
 
10976
11178
  /**
10977
- * Order string of this prototype.
11179
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10978
11180
  */
10979
11181
  readonly order: string
10980
11182
 
@@ -11737,7 +11939,7 @@ interface LuaPlayer extends LuaControl {
11737
11939
  hand_location: ItemStackLocation
11738
11940
 
11739
11941
  /**
11740
- * This player's index in {@link LuaGameScript::players | LuaGameScript::players}.
11942
+ * This player's unique index in {@link LuaGameScript::players | LuaGameScript::players}. It is given to them when they are {@link created | on_player_created} and remains assigned to them until they are {@link removed | on_player_removed}.
11741
11943
  */
11742
11944
  readonly index: number
11743
11945
 
@@ -12196,7 +12398,7 @@ interface LuaRecipe {
12196
12398
  readonly object_name: string
12197
12399
 
12198
12400
  /**
12199
- * Order string. This is used to sort the crafting menu.
12401
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
12200
12402
  */
12201
12403
  readonly order: string
12202
12404
 
@@ -12246,7 +12448,7 @@ interface LuaRecipeCategoryPrototype {
12246
12448
  readonly object_name: string
12247
12449
 
12248
12450
  /**
12249
- * Order string of this prototype.
12451
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
12250
12452
  */
12251
12453
  readonly order: string
12252
12454
 
@@ -12364,7 +12566,7 @@ interface LuaRecipePrototype {
12364
12566
  readonly object_name: string
12365
12567
 
12366
12568
  /**
12367
- * Order string. This is used to sort the crafting menu.
12569
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
12368
12570
  */
12369
12571
  readonly order: string
12370
12572
 
@@ -12500,13 +12702,13 @@ interface LuaRendering {
12500
12702
  * @param table.animation - Name of an [animation prototype](https://wiki.factorio.com/Prototype/Animation).
12501
12703
  * @param table.animation_offset - Offset of the animation in frames. Default is 0.
12502
12704
  * @param table.animation_speed - How many frames the animation goes forward per tick. Default is 1.
12503
- * @param table.forces - The forces that this object is rendered to.
12705
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12504
12706
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12505
12707
  * @param table.orientation - The orientation of the animation. Default is 0.
12506
12708
  * @param table.orientation_target - If given, the animation rotates so that it faces this target. Note that `orientation` is still applied to the animation.
12507
12709
  * @param table.orientation_target_offset - Only used if `orientation_target` is a LuaEntity.
12508
12710
  * @param table.oriented_offset - Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation.
12509
- * @param table.players - The players that this object is rendered to.
12711
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12510
12712
  * @param table.target - Center of the animation.
12511
12713
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12512
12714
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12541,11 +12743,11 @@ interface LuaRendering {
12541
12743
  * Create an arc.
12542
12744
  * @param table.angle - The angle of the arc, in radian.
12543
12745
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12544
- * @param table.forces - The forces that this object is rendered to.
12746
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12545
12747
  * @param table.max_radius - The radius of the outer edge of the arc, in tiles.
12546
12748
  * @param table.min_radius - The radius of the inner edge of the arc, in tiles.
12547
12749
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12548
- * @param table.players - The players that this object is rendered to.
12750
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12549
12751
  * @param table.start_angle - Where the arc starts, in radian.
12550
12752
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12551
12753
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12573,9 +12775,9 @@ interface LuaRendering {
12573
12775
  * Create a circle.
12574
12776
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12575
12777
  * @param table.filled - If the circle should be filled.
12576
- * @param table.forces - The forces that this object is rendered to.
12778
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12577
12779
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12578
- * @param table.players - The players that this object is rendered to.
12780
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12579
12781
  * @param table.radius - In tiles.
12580
12782
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12581
12783
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12605,13 +12807,13 @@ interface LuaRendering {
12605
12807
  * The base game uses the utility sprites `light_medium` and `light_small` for lights.
12606
12808
  *
12607
12809
  * @param table.color - Defaults to white (no tint).
12608
- * @param table.forces - The forces that this object is rendered to.
12810
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12609
12811
  * @param table.intensity - Default is 1.
12610
12812
  * @param table.minimum_darkness - The minimum darkness at which this light is rendered. Default is 0.
12611
12813
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12612
12814
  * @param table.orientation - The orientation of the light. Default is 0.
12613
12815
  * @param table.oriented - If this light has the same orientation as the entity target, default is false. Note that `orientation` is still applied to the sprite.
12614
- * @param table.players - The players that this object is rendered to.
12816
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12615
12817
  * @param table.scale - Default is 1.
12616
12818
  * @param table.target - Center of the light.
12617
12819
  * @param table.target_offset - Only used if `target` is a LuaEntity.
@@ -12641,11 +12843,11 @@ interface LuaRendering {
12641
12843
  * Create a line.
12642
12844
  * @param table.dash_length - Length of the dashes that this line has. Used only if gap_length > 0. Default is 0.
12643
12845
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12644
- * @param table.forces - The forces that this object is rendered to.
12846
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12645
12847
  * @param table.from_offset - Only used if `from` is a LuaEntity.
12646
12848
  * @param table.gap_length - Length of the gaps that this line has, in tiles. Default is 0.
12647
12849
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12648
- * @param table.players - The players that this object is rendered to.
12850
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12649
12851
  * @param table.time_to_live - In ticks. Defaults to living forever.
12650
12852
  * @param table.to_offset - Only used if `to` is a LuaEntity.
12651
12853
  * @param table.visible - If this is rendered to anyone at all. Defaults to true.
@@ -12685,12 +12887,12 @@ interface LuaRendering {
12685
12887
  /**
12686
12888
  * Create a triangle mesh defined by a triangle strip.
12687
12889
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12688
- * @param table.forces - The forces that this object is rendered to.
12890
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12689
12891
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12690
12892
  * @param table.orientation - The orientation applied to all vertices. Default is 0.
12691
12893
  * @param table.orientation_target - If given, the vertices (that are not set to an entity) rotate so that it faces this target. Note that `orientation` is still applied.
12692
12894
  * @param table.orientation_target_offset - Only used if `orientation_target` is a LuaEntity.
12693
- * @param table.players - The players that this object is rendered to.
12895
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12694
12896
  * @param table.target - Acts like an offset applied to all vertices that are not set to an entity.
12695
12897
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12696
12898
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12718,10 +12920,10 @@ interface LuaRendering {
12718
12920
  * Create a rectangle.
12719
12921
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12720
12922
  * @param table.filled - If the rectangle should be filled.
12721
- * @param table.forces - The forces that this object is rendered to.
12923
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12722
12924
  * @param table.left_top_offset - Only used if `left_top` is a LuaEntity.
12723
12925
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12724
- * @param table.players - The players that this object is rendered to.
12926
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12725
12927
  * @param table.right_bottom_offset - Only used if `right_bottom` is a LuaEntity.
12726
12928
  * @param table.time_to_live - In ticks. Defaults to living forever.
12727
12929
  * @param table.visible - If this is rendered to anyone at all. Defaults to true.
@@ -12747,13 +12949,13 @@ interface LuaRendering {
12747
12949
 
12748
12950
  /**
12749
12951
  * Create a sprite.
12750
- * @param table.forces - The forces that this object is rendered to.
12952
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12751
12953
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12752
12954
  * @param table.orientation - The orientation of the sprite. Default is 0.
12753
12955
  * @param table.orientation_target - If given, the sprite rotates so that it faces this target. Note that `orientation` is still applied to the sprite.
12754
12956
  * @param table.orientation_target_offset - Only used if `orientation_target` is a LuaEntity.
12755
12957
  * @param table.oriented_offset - Offsets the center of the sprite if `orientation_target` is given. This offset will rotate together with the sprite.
12756
- * @param table.players - The players that this object is rendered to.
12958
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12757
12959
  * @param table.target - Center of the sprite.
12758
12960
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12759
12961
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12802,10 +13004,10 @@ interface LuaRendering {
12802
13004
  * @param table.alignment - Defaults to "left". Other options are "right" and "center".
12803
13005
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12804
13006
  * @param table.font - Name of font to use. Defaults to the same font as flying-text.
12805
- * @param table.forces - The forces that this object is rendered to.
13007
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12806
13008
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12807
13009
  * @param table.orientation - The orientation of the text. Default is 0.
12808
- * @param table.players - The players that this object is rendered to.
13010
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12809
13011
  * @param table.scale_with_zoom - Defaults to false. If true, the text scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes.
12810
13012
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12811
13013
  * @param table.text - The text to display.
@@ -13689,7 +13891,7 @@ interface LuaResourceCategoryPrototype {
13689
13891
  readonly object_name: string
13690
13892
 
13691
13893
  /**
13692
- * Order string of this prototype.
13894
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
13693
13895
  */
13694
13896
  readonly order: string
13695
13897
 
@@ -13808,7 +14010,7 @@ interface LuaShortcutPrototype {
13808
14010
  readonly object_name: string
13809
14011
 
13810
14012
  /**
13811
- * Order string of this prototype.
14013
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
13812
14014
  */
13813
14015
  readonly order: string
13814
14016
 
@@ -13975,12 +14177,12 @@ interface LuaStyle {
13975
14177
  extra_left_padding_when_activated: number
13976
14178
 
13977
14179
  /**
13978
- * Sets extra_top/right/bottom/left_margin_when_activated to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
14180
+ * Sets `extra_top/right/bottom/left_margin_when_activated` to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
13979
14181
  */
13980
14182
  extra_margin_when_activated: number | number[]
13981
14183
 
13982
14184
  /**
13983
- * Sets extra_top/right/bottom/left_padding_when_actived to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
14185
+ * Sets `extra_top/right/bottom/left_padding_when_activated` to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
13984
14186
  */
13985
14187
  extra_padding_when_activated: number | number[]
13986
14188
 
@@ -14034,7 +14236,7 @@ interface LuaStyle {
14034
14236
  /**
14035
14237
  * Horizontal space between individual cells.
14036
14238
  * @remarks
14037
- * Applies to subclasses: LuaTableStyle,LuaFlowStyle,LuaHorizontalFlow
14239
+ * Applies to subclasses: LuaTableStyle,LuaFlowStyle,LuaHorizontalFlowStyle
14038
14240
  *
14039
14241
  */
14040
14242
  horizontal_spacing: number
@@ -14725,10 +14927,12 @@ interface LuaSurface {
14725
14927
  *
14726
14928
  * If no filters (`name`, `type`, `force`, etc.) are given, this returns all entities in the search area. If multiple filters are specified, only entities matching all given filters are returned.
14727
14929
  *
14728
- * If no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns the entities within the radius of the position. If `area` is specified, this returns the entities colliding with that area.
14729
- * @param table.invert - If the filters should be inverted.
14930
+ * - If no `area` or `position` are given, the entire surface is searched.
14931
+ * - If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box).
14932
+ * - If `position` and `radius` are given, this returns the entities within the radius of the position. Looks for the center of entities.
14933
+ * - If `area` is specified, this returns the entities colliding with that area.
14934
+ * @param table.invert - Whether the filters should be inverted.
14730
14935
  * @param table.position - Has precedence over area field.
14731
- * @param table.radius - If given with position, will return all entities within the radius of the position.
14732
14936
  * @example
14733
14937
  * ```
14734
14938
  * game.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, type = "resource"} -- gets all resources in the rectangle
@@ -15113,7 +15317,7 @@ interface LuaSurface {
15113
15317
  id: number): void
15114
15318
 
15115
15319
  /**
15116
- * Generates a path with the specified constraints (as an array of {@link PathfinderWaypoints | PathfinderWaypoint}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities. If you want to command actual units to move, use the {@link LuaEntity::set_command | LuaEntity::set_command} functionality instead.
15320
+ * Generates a path with the specified constraints (as an array of {@link PathfinderWaypoints | PathfinderWaypoint}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use {@link LuaEntity::set_command | LuaEntity::set_command} instead.
15117
15321
  *
15118
15322
  * The resulting path is ultimately returned asynchronously via {@link on_script_path_request_finished | on_script_path_request_finished}.
15119
15323
  * @param table.bounding_box - The dimensions of the object that's supposed to travel the path.
@@ -15421,7 +15625,7 @@ interface LuaTechnology {
15421
15625
  readonly object_name: string
15422
15626
 
15423
15627
  /**
15424
- * Order string for this prototype.
15628
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
15425
15629
  */
15426
15630
  readonly order: string
15427
15631
 
@@ -15540,7 +15744,7 @@ interface LuaTechnologyPrototype {
15540
15744
  readonly object_name: string
15541
15745
 
15542
15746
  /**
15543
- * Order string for this prototype.
15747
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
15544
15748
  */
15545
15749
  readonly order: string
15546
15750
 
@@ -15713,7 +15917,7 @@ interface LuaTilePrototype {
15713
15917
  readonly emissions_per_second: number
15714
15918
 
15715
15919
  /**
15716
- * Items that when placed will produce this tile. It is a dictionary indexed by the item prototype name.
15920
+ * Items that when placed will produce this tile. It is a dictionary indexed by the item prototype name. `nil` (instead of an empty table) if no items can place this tile.
15717
15921
  */
15718
15922
  readonly items_to_place_this: SimpleItemStack[]
15719
15923
 
@@ -15725,7 +15929,7 @@ interface LuaTilePrototype {
15725
15929
 
15726
15930
  readonly map_color: Color
15727
15931
 
15728
- readonly mineable_properties: { minable: boolean, miningparticle?: string, miningtime: number, products: Product[] }
15932
+ readonly mineable_properties: { minable: boolean, mining_particle?: string, mining_time: number, products: Product[] }
15729
15933
 
15730
15934
  /**
15731
15935
  * Name of this prototype.
@@ -15748,7 +15952,7 @@ interface LuaTilePrototype {
15748
15952
  readonly object_name: string
15749
15953
 
15750
15954
  /**
15751
- * Order string of this prototype.
15955
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
15752
15956
  */
15753
15957
  readonly order: string
15754
15958
 
@@ -16261,7 +16465,7 @@ interface LuaTrivialSmokePrototype {
16261
16465
  readonly object_name: string
16262
16466
 
16263
16467
  /**
16264
- * Order string of this prototype.
16468
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
16265
16469
  */
16266
16470
  readonly order: string
16267
16471
 
@@ -16406,7 +16610,7 @@ interface LuaVirtualSignalPrototype {
16406
16610
  readonly object_name: string
16407
16611
 
16408
16612
  /**
16409
- * Order string of this prototype.
16613
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
16410
16614
  */
16411
16615
  readonly order: string
16412
16616
 
@@ -16593,7 +16797,7 @@ interface LuaGuiElementAddParams {
16593
16797
  'index'?: number
16594
16798
 
16595
16799
  /**
16596
- * Name of the child element.
16800
+ * Name of the child element. It must be unique within the parent element.
16597
16801
  */
16598
16802
  'name'?: string
16599
16803
 
@@ -16690,7 +16894,7 @@ interface LuaGuiElementAddParamsChooseElemButton extends LuaGuiElementAddParams
16690
16894
  'decorative'?: string
16691
16895
 
16692
16896
  /**
16693
- * Filters describing what to show in the selection window. See {@link LuaGuiElement::elem_filters | LuaGuiElement::elem_filters}.
16897
+ * Filters describing what to show in the selection window. The applicable filter depends on the `elem_type`.
16694
16898
  */
16695
16899
  'elem_filters'?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter[]
16696
16900
 
@@ -17184,7 +17388,7 @@ interface LuaSurfaceCreateEntityParams {
17184
17388
  /**
17185
17389
  * Source entity. Used for beams and highlight-boxes.
17186
17390
  */
17187
- 'source'?: LuaEntity
17391
+ 'source'?: LuaEntity | MapPosition
17188
17392
 
17189
17393
  /**
17190
17394
  * If true, entity types that have spawn_decorations property will apply triggers defined in the property.
@@ -17199,7 +17403,7 @@ interface LuaSurfaceCreateEntityParams {
17199
17403
  /**
17200
17404
  * Entity with health for the new entity to target.
17201
17405
  */
17202
- 'target'?: LuaEntity
17406
+ 'target'?: LuaEntity | MapPosition
17203
17407
 
17204
17408
  }
17205
17409
 
@@ -17363,7 +17567,7 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends LuaSurfaceCreateEntit
17363
17567
  'blink_interval'?: number
17364
17568
 
17365
17569
  /**
17366
- * The bounding box defining the highlight box using absolute map coordinates. If specified, the `position` parameter is ignored, but needs to be present anyways. If not specified, the game falls back to the `source` parameter first, then the `target` parameter second. One of these three parameters need to be specified.
17570
+ * The bounding box defining the highlight box using absolute map coordinates. If specified, the general `position` parameter still needs to be present, but will be ignored. If not specified, the game falls back to the `source` parameter first, then the `target` parameter second. One of these three parameters need to be specified.
17367
17571
  */
17368
17572
  'bounding_box'?: BoundingBox
17369
17573