factorio-types 0.0.22 → 0.0.25

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.57
5
+ // Factorio version 1.1.61
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
  */
@@ -1233,7 +1242,7 @@ interface LuaControl {
1233
1242
  /**
1234
1243
  * The crafting queue progress [0-1] 0 when no recipe is being crafted.
1235
1244
  */
1236
- readonly crafting_queue_progress: number
1245
+ crafting_queue_progress: number
1237
1246
 
1238
1247
  /**
1239
1248
  * Size of the crafting queue.
@@ -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,7 +2384,7 @@ 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
 
@@ -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.
@@ -3616,8 +3630,10 @@ interface LuaEntity extends LuaControl {
3616
3630
 
3617
3631
  /**
3618
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.
3619
3635
  */
3620
- render_player: LuaPlayer
3636
+ render_player: LuaPlayer | PlayerIdentification
3621
3637
 
3622
3638
  /**
3623
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.
@@ -3657,12 +3673,12 @@ interface LuaEntity extends LuaControl {
3657
3673
  rotatable: boolean
3658
3674
 
3659
3675
  /**
3660
- * 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.
3661
3677
  */
3662
3678
  readonly secondary_bounding_box?: BoundingBox
3663
3679
 
3664
3680
  /**
3665
- * 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.
3666
3682
  */
3667
3683
  readonly secondary_selection_box?: BoundingBox
3668
3684
 
@@ -4059,6 +4075,11 @@ interface LuaEntityPrototype {
4059
4075
  */
4060
4076
  readonly always_on?: boolean
4061
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
+
4062
4083
  /**
4063
4084
  * The attack parameters for this entity or `nil` if the entity doesn't use attack parameters.
4064
4085
  */
@@ -4074,6 +4095,11 @@ interface LuaEntityPrototype {
4074
4095
  */
4075
4096
  readonly automated_ammo_count?: number
4076
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
+
4077
4103
  /**
4078
4104
  * Autoplace specification for this entity prototype. `nil` if none.
4079
4105
  */
@@ -4150,6 +4176,11 @@ interface LuaEntityPrototype {
4150
4176
  */
4151
4177
  readonly center_collision_mask: CollisionMask
4152
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
+
4153
4184
  /**
4154
4185
  * @remarks
4155
4186
  * Applies to subclasses: Character
@@ -4157,6 +4188,11 @@ interface LuaEntityPrototype {
4157
4188
  */
4158
4189
  readonly character_corpse: LuaEntityPrototype
4159
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
+
4160
4196
  /**
4161
4197
  * The item prototype name used to destroy this cliff or `nil`.
4162
4198
  */
@@ -4311,6 +4347,14 @@ interface LuaEntityPrototype {
4311
4347
  */
4312
4348
  readonly drop_item_distance: number
4313
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
+
4314
4358
  /**
4315
4359
  * The effectivity of this car prototype, generator prototype or `nil`.
4316
4360
  */
@@ -4481,6 +4525,16 @@ interface LuaEntityPrototype {
4481
4525
  */
4482
4526
  readonly heat_energy_source_prototype?: LuaHeatEnergySourcePrototype
4483
4527
 
4528
+ /**
4529
+ * Gets the height of this prototype. `nil` if this is not a spider vechicle.
4530
+ */
4531
+ readonly height: number
4532
+
4533
+ /**
4534
+ * A vector of the gun prototypes this prototype uses, or `nil`.
4535
+ */
4536
+ readonly indexed_guns?: LuaItemPrototype[]
4537
+
4484
4538
  /**
4485
4539
  * 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.
4486
4540
  */
@@ -4612,6 +4666,13 @@ interface LuaEntityPrototype {
4612
4666
  */
4613
4667
  readonly loot_pickup_distance: number
4614
4668
 
4669
+ /**
4670
+ * Get the manual range modifier for artillery turret and artillery wagon prototypes. `nil` if not artillery type prototype
4671
+ *
4672
+ * subclass(ArtilleryWagon, ArtilleryTurret)
4673
+ */
4674
+ readonly manual_range_modifier: number
4675
+
4615
4676
  /**
4616
4677
  * The map color used when charting this entity if a friendly or enemy color isn't defined or `nil`.
4617
4678
  */
@@ -4797,7 +4858,7 @@ interface LuaEntityPrototype {
4797
4858
  readonly object_name: string
4798
4859
 
4799
4860
  /**
4800
- * Order string of this prototype.
4861
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
4801
4862
  */
4802
4863
  readonly order: string
4803
4864
 
@@ -5064,6 +5125,11 @@ interface LuaEntityPrototype {
5064
5125
  */
5065
5126
  readonly timeout: number
5066
5127
 
5128
+ /**
5129
+ * Gets the torso rotation speed of this prototype. `nil` if this is not a spider vechicle.
5130
+ */
5131
+ readonly torso_rotation_speed: number
5132
+
5067
5133
  /**
5068
5134
  * If it is a tree, return the number of colors it supports. `nil` otherwise.
5069
5135
  */
@@ -5223,7 +5289,7 @@ interface LuaEquipmentCategoryPrototype {
5223
5289
  readonly object_name: string
5224
5290
 
5225
5291
  /**
5226
- * Order string of this prototype.
5292
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
5227
5293
  */
5228
5294
  readonly order: string
5229
5295
 
@@ -5417,7 +5483,7 @@ interface LuaEquipmentGridPrototype {
5417
5483
  readonly object_name: string
5418
5484
 
5419
5485
  /**
5420
- * Order string of this prototype.
5486
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
5421
5487
  */
5422
5488
  readonly order: string
5423
5489
 
@@ -5516,7 +5582,7 @@ interface LuaEquipmentPrototype {
5516
5582
  readonly object_name: string
5517
5583
 
5518
5584
  /**
5519
- * Order string of this prototype.
5585
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
5520
5586
  */
5521
5587
  readonly order: string
5522
5588
 
@@ -5552,7 +5618,7 @@ interface LuaEquipmentPrototype {
5552
5618
  *
5553
5619
  * Examples:
5554
5620
  * - The item production GUI shows "consumption" on the right, thus `output` describes the item consumption numbers. The same goes for fluid consumption.
5555
- * - The kills gui shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
5621
+ * - The kills GUI shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
5556
5622
  * - The electric network GUI shows "power consumption" on the left side, so in this case `input` describes the power consumption numbers.
5557
5623
  */
5558
5624
  interface LuaFlowStatistics {
@@ -5562,17 +5628,23 @@ interface LuaFlowStatistics {
5562
5628
  clear(this: void): void
5563
5629
 
5564
5630
  /**
5565
- * Gets the flow count value for the given time frame.
5566
- * @param table.count - If true, the count is returned instead of the per-time-frame value.
5631
+ * 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.
5632
+ *
5633
+ * 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.
5634
+ *
5635
+ * All return values are normalized to be per-tick for electric networks and per-minute for all other types.
5636
+ * @param table.count - If true, the count of items/fluids/entities is returned instead of the per-time-frame value.
5567
5637
  * @param table.input - Read the input values or the output values
5568
5638
  * @param table.name - The prototype name.
5569
- * @param table.precision_index - The precision to read.
5639
+ * @param table.precision_index - The precision range to read.
5640
+ * @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.
5570
5641
  */
5571
5642
  get_flow_count(this: void,
5572
5643
  table: {
5573
5644
  name: string,
5574
5645
  input: boolean,
5575
5646
  precision_index: defines.flow_precision_index,
5647
+ sample_index?: number,
5576
5648
  count?: boolean
5577
5649
  }): void
5578
5650
 
@@ -5680,7 +5752,7 @@ interface LuaFluidBox {
5680
5752
  index: number): void
5681
5753
 
5682
5754
  /**
5683
- * The fluidbox connections for the given fluidbox index.
5755
+ * The fluidboxes to which the fluidbox at the given index is connected.
5684
5756
  */
5685
5757
  get_connections(this: void,
5686
5758
  index: number): void
@@ -5957,7 +6029,7 @@ interface LuaFluidPrototype {
5957
6029
  readonly object_name: string
5958
6030
 
5959
6031
  /**
5960
- * Order string for this prototype.
6032
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
5961
6033
  */
5962
6034
  readonly order: string
5963
6035
 
@@ -6705,7 +6777,7 @@ interface LuaFuelCategoryPrototype {
6705
6777
  readonly object_name: string
6706
6778
 
6707
6779
  /**
6708
- * Order string of this prototype.
6780
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
6709
6781
  */
6710
6782
  readonly order: string
6711
6783
 
@@ -7067,10 +7139,7 @@ interface LuaGameScript {
7067
7139
  sound_path: SoundPath): void
7068
7140
 
7069
7141
  /**
7070
- * Checks if the given SpritePath is valid and contains a loaded sprite.
7071
- * @remarks
7072
- * The existence of the image is not checked for paths of type `file`.
7073
- *
7142
+ * 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`.
7074
7143
  * @param sprite_path - Path to the image.
7075
7144
  */
7076
7145
  is_valid_sprite_path(this: void,
@@ -7574,7 +7643,9 @@ interface LuaGameScript {
7574
7643
  readonly permissions: LuaPermissionGroups
7575
7644
 
7576
7645
  /**
7577
- * The player typing at the console - `nil` in all other instances. See {@link LuaGameScript::players | LuaGameScript::players} for accessing all players.
7646
+ * 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.
7647
+ *
7648
+ * See {@link LuaGameScript::players | LuaGameScript::players} for accessing all players.
7578
7649
  */
7579
7650
  readonly player: LuaPlayer
7580
7651
 
@@ -7761,6 +7832,9 @@ interface LuaGroup {
7761
7832
  */
7762
7833
  readonly object_name: string
7763
7834
 
7835
+ /**
7836
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
7837
+ */
7764
7838
  readonly order: string
7765
7839
 
7766
7840
  /**
@@ -7802,6 +7876,8 @@ interface LuaGui {
7802
7876
 
7803
7877
  /**
7804
7878
  * Returns `true` if sprite_path is valid and contains loaded sprite, otherwise `false`. Sprite path of type `file` doesn't validate if file exists.
7879
+ *
7880
+ * If you want to avoid needing a LuaGui object, {@link LuaGameScript::is_valid_sprite_path | LuaGameScript::is_valid_sprite_path} can be used instead.
7805
7881
  * @param sprite_path - Path to a image.
7806
7882
  */
7807
7883
  is_valid_sprite_path(this: void,
@@ -8334,20 +8410,7 @@ interface LuaGuiElement {
8334
8410
  draw_vertical_lines: boolean
8335
8411
 
8336
8412
  /**
8337
- * The elem filters of this choose-elem-button or `nil` if there are no filters.
8338
- *
8339
- * The compatible type of filter is determined by elem_type:
8340
- * - Type `"item"` - {@link ItemPrototypeFilter | ItemPrototypeFilter}
8341
- * - Type `"tile"` - {@link TilePrototypeFilter | TilePrototypeFilter}
8342
- * - Type `"entity"` - {@link EntityPrototypeFilter | EntityPrototypeFilter}
8343
- * - Type `"signal"` - Does not support filters
8344
- * - Type `"fluid"` - {@link FluidPrototypeFilter | FluidPrototypeFilter}
8345
- * - Type `"recipe"` - {@link RecipePrototypeFilter | RecipePrototypeFilter}
8346
- * - Type `"decorative"` - {@link DecorativePrototypeFilter | DecorativePrototypeFilter}
8347
- * - Type `"item-group"` - Does not support filters
8348
- * - Type `"achievement"` - {@link AchievementPrototypeFilter | AchievementPrototypeFilter}
8349
- * - Type `"equipment"` - {@link EquipmentPrototypeFilter | EquipmentPrototypeFilter}
8350
- * - Type `"technology"` - {@link TechnologyPrototypeFilter | TechnologyPrototypeFilter}
8413
+ * 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`.
8351
8414
  * @remarks
8352
8415
  * Writing to this field does not change or clear the currently selected element.
8353
8416
  * Applies to subclasses: choose-elem-button
@@ -8500,7 +8563,7 @@ interface LuaGuiElement {
8500
8563
  mouse_button_filter: MouseButtonFlags
8501
8564
 
8502
8565
  /**
8503
- * The name of this element.
8566
+ * The name of this element. `""` if no name was set.
8504
8567
  * @example
8505
8568
  * ```
8506
8569
  * game.player.gui.top.greeting.name == "greeting"
@@ -9439,7 +9502,7 @@ interface LuaItemPrototype {
9439
9502
  readonly mapper_count: number
9440
9503
 
9441
9504
  /**
9442
- * Effects of this module; `nil` if this is not a module.
9505
+ * Effects of this module.
9443
9506
  * @remarks
9444
9507
  * Applies to subclasses: ModuleItem
9445
9508
  *
@@ -9457,7 +9520,7 @@ interface LuaItemPrototype {
9457
9520
  readonly object_name: string
9458
9521
 
9459
9522
  /**
9460
- * Order string.
9523
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
9461
9524
  */
9462
9525
  readonly order: string
9463
9526
 
@@ -10033,7 +10096,7 @@ interface LuaItemStack {
10033
10096
 
10034
10097
  /**
10035
10098
  * Set this item stack to another item stack.
10036
- * @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).
10099
+ * @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.
10037
10100
  */
10038
10101
  set_stack(this: void,
10039
10102
  stack?: ItemStackIdentification): void
@@ -10956,7 +11019,7 @@ interface LuaModSettingPrototype {
10956
11019
  readonly object_name: string
10957
11020
 
10958
11021
  /**
10959
- * Order string of this prototype.
11022
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10960
11023
  */
10961
11024
  readonly order: string
10962
11025
 
@@ -10993,7 +11056,7 @@ interface LuaModuleCategoryPrototype {
10993
11056
  readonly object_name: string
10994
11057
 
10995
11058
  /**
10996
- * Order string of this prototype.
11059
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10997
11060
  */
10998
11061
  readonly order: string
10999
11062
 
@@ -11038,7 +11101,7 @@ interface LuaNamedNoiseExpression {
11038
11101
  readonly object_name: string
11039
11102
 
11040
11103
  /**
11041
- * Order string of this prototype.
11104
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
11042
11105
  */
11043
11106
  readonly order: string
11044
11107
 
@@ -11073,7 +11136,7 @@ interface LuaNoiseLayerPrototype {
11073
11136
  readonly object_name: string
11074
11137
 
11075
11138
  /**
11076
- * Order string of this prototype.
11139
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
11077
11140
  */
11078
11141
  readonly order: string
11079
11142
 
@@ -11118,7 +11181,7 @@ interface LuaParticlePrototype {
11118
11181
  readonly object_name: string
11119
11182
 
11120
11183
  /**
11121
- * Order string of this prototype.
11184
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
11122
11185
  */
11123
11186
  readonly order: string
11124
11187
 
@@ -11881,7 +11944,7 @@ interface LuaPlayer extends LuaControl {
11881
11944
  hand_location: ItemStackLocation
11882
11945
 
11883
11946
  /**
11884
- * This player's index in {@link LuaGameScript::players | LuaGameScript::players}.
11947
+ * 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}.
11885
11948
  */
11886
11949
  readonly index: number
11887
11950
 
@@ -12340,7 +12403,7 @@ interface LuaRecipe {
12340
12403
  readonly object_name: string
12341
12404
 
12342
12405
  /**
12343
- * Order string. This is used to sort the crafting menu.
12406
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
12344
12407
  */
12345
12408
  readonly order: string
12346
12409
 
@@ -12390,7 +12453,7 @@ interface LuaRecipeCategoryPrototype {
12390
12453
  readonly object_name: string
12391
12454
 
12392
12455
  /**
12393
- * Order string of this prototype.
12456
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
12394
12457
  */
12395
12458
  readonly order: string
12396
12459
 
@@ -12508,7 +12571,7 @@ interface LuaRecipePrototype {
12508
12571
  readonly object_name: string
12509
12572
 
12510
12573
  /**
12511
- * Order string. This is used to sort the crafting menu.
12574
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
12512
12575
  */
12513
12576
  readonly order: string
12514
12577
 
@@ -12644,13 +12707,13 @@ interface LuaRendering {
12644
12707
  * @param table.animation - Name of an [animation prototype](https://wiki.factorio.com/Prototype/Animation).
12645
12708
  * @param table.animation_offset - Offset of the animation in frames. Default is 0.
12646
12709
  * @param table.animation_speed - How many frames the animation goes forward per tick. Default is 1.
12647
- * @param table.forces - The forces that this object is rendered to.
12710
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12648
12711
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12649
12712
  * @param table.orientation - The orientation of the animation. Default is 0.
12650
12713
  * @param table.orientation_target - If given, the animation rotates so that it faces this target. Note that `orientation` is still applied to the animation.
12651
12714
  * @param table.orientation_target_offset - Only used if `orientation_target` is a LuaEntity.
12652
12715
  * @param table.oriented_offset - Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation.
12653
- * @param table.players - The players that this object is rendered to.
12716
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12654
12717
  * @param table.target - Center of the animation.
12655
12718
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12656
12719
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12685,11 +12748,11 @@ interface LuaRendering {
12685
12748
  * Create an arc.
12686
12749
  * @param table.angle - The angle of the arc, in radian.
12687
12750
  * @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.
12751
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12689
12752
  * @param table.max_radius - The radius of the outer edge of the arc, in tiles.
12690
12753
  * @param table.min_radius - The radius of the inner edge of the arc, in tiles.
12691
12754
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12692
- * @param table.players - The players that this object is rendered to.
12755
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12693
12756
  * @param table.start_angle - Where the arc starts, in radian.
12694
12757
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12695
12758
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12717,9 +12780,9 @@ interface LuaRendering {
12717
12780
  * Create a circle.
12718
12781
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12719
12782
  * @param table.filled - If the circle should be filled.
12720
- * @param table.forces - The forces that this object is rendered to.
12783
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12721
12784
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12722
- * @param table.players - The players that this object is rendered to.
12785
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12723
12786
  * @param table.radius - In tiles.
12724
12787
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12725
12788
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12749,13 +12812,13 @@ interface LuaRendering {
12749
12812
  * The base game uses the utility sprites `light_medium` and `light_small` for lights.
12750
12813
  *
12751
12814
  * @param table.color - Defaults to white (no tint).
12752
- * @param table.forces - The forces that this object is rendered to.
12815
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12753
12816
  * @param table.intensity - Default is 1.
12754
12817
  * @param table.minimum_darkness - The minimum darkness at which this light is rendered. Default is 0.
12755
12818
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12756
12819
  * @param table.orientation - The orientation of the light. Default is 0.
12757
12820
  * @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.
12758
- * @param table.players - The players that this object is rendered to.
12821
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12759
12822
  * @param table.scale - Default is 1.
12760
12823
  * @param table.target - Center of the light.
12761
12824
  * @param table.target_offset - Only used if `target` is a LuaEntity.
@@ -12785,11 +12848,11 @@ interface LuaRendering {
12785
12848
  * Create a line.
12786
12849
  * @param table.dash_length - Length of the dashes that this line has. Used only if gap_length > 0. Default is 0.
12787
12850
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12788
- * @param table.forces - The forces that this object is rendered to.
12851
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12789
12852
  * @param table.from_offset - Only used if `from` is a LuaEntity.
12790
12853
  * @param table.gap_length - Length of the gaps that this line has, in tiles. Default is 0.
12791
12854
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12792
- * @param table.players - The players that this object is rendered to.
12855
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12793
12856
  * @param table.time_to_live - In ticks. Defaults to living forever.
12794
12857
  * @param table.to_offset - Only used if `to` is a LuaEntity.
12795
12858
  * @param table.visible - If this is rendered to anyone at all. Defaults to true.
@@ -12829,12 +12892,12 @@ interface LuaRendering {
12829
12892
  /**
12830
12893
  * Create a triangle mesh defined by a triangle strip.
12831
12894
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12832
- * @param table.forces - The forces that this object is rendered to.
12895
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12833
12896
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12834
12897
  * @param table.orientation - The orientation applied to all vertices. Default is 0.
12835
12898
  * @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.
12836
12899
  * @param table.orientation_target_offset - Only used if `orientation_target` is a LuaEntity.
12837
- * @param table.players - The players that this object is rendered to.
12900
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12838
12901
  * @param table.target - Acts like an offset applied to all vertices that are not set to an entity.
12839
12902
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12840
12903
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12862,10 +12925,10 @@ interface LuaRendering {
12862
12925
  * Create a rectangle.
12863
12926
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12864
12927
  * @param table.filled - If the rectangle should be filled.
12865
- * @param table.forces - The forces that this object is rendered to.
12928
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12866
12929
  * @param table.left_top_offset - Only used if `left_top` is a LuaEntity.
12867
12930
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12868
- * @param table.players - The players that this object is rendered to.
12931
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12869
12932
  * @param table.right_bottom_offset - Only used if `right_bottom` is a LuaEntity.
12870
12933
  * @param table.time_to_live - In ticks. Defaults to living forever.
12871
12934
  * @param table.visible - If this is rendered to anyone at all. Defaults to true.
@@ -12891,13 +12954,13 @@ interface LuaRendering {
12891
12954
 
12892
12955
  /**
12893
12956
  * Create a sprite.
12894
- * @param table.forces - The forces that this object is rendered to.
12957
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12895
12958
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12896
12959
  * @param table.orientation - The orientation of the sprite. Default is 0.
12897
12960
  * @param table.orientation_target - If given, the sprite rotates so that it faces this target. Note that `orientation` is still applied to the sprite.
12898
12961
  * @param table.orientation_target_offset - Only used if `orientation_target` is a LuaEntity.
12899
12962
  * @param table.oriented_offset - Offsets the center of the sprite if `orientation_target` is given. This offset will rotate together with the sprite.
12900
- * @param table.players - The players that this object is rendered to.
12963
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12901
12964
  * @param table.target - Center of the sprite.
12902
12965
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12903
12966
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -12946,10 +13009,10 @@ interface LuaRendering {
12946
13009
  * @param table.alignment - Defaults to "left". Other options are "right" and "center".
12947
13010
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
12948
13011
  * @param table.font - Name of font to use. Defaults to the same font as flying-text.
12949
- * @param table.forces - The forces that this object is rendered to.
13012
+ * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
12950
13013
  * @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
12951
13014
  * @param table.orientation - The orientation of the text. Default is 0.
12952
- * @param table.players - The players that this object is rendered to.
13015
+ * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
12953
13016
  * @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.
12954
13017
  * @param table.target_offset - Only used if `target` is a LuaEntity.
12955
13018
  * @param table.text - The text to display.
@@ -13833,7 +13896,7 @@ interface LuaResourceCategoryPrototype {
13833
13896
  readonly object_name: string
13834
13897
 
13835
13898
  /**
13836
- * Order string of this prototype.
13899
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
13837
13900
  */
13838
13901
  readonly order: string
13839
13902
 
@@ -13952,7 +14015,7 @@ interface LuaShortcutPrototype {
13952
14015
  readonly object_name: string
13953
14016
 
13954
14017
  /**
13955
- * Order string of this prototype.
14018
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
13956
14019
  */
13957
14020
  readonly order: string
13958
14021
 
@@ -14119,12 +14182,12 @@ interface LuaStyle {
14119
14182
  extra_left_padding_when_activated: number
14120
14183
 
14121
14184
  /**
14122
- * 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.
14185
+ * 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.
14123
14186
  */
14124
14187
  extra_margin_when_activated: number | number[]
14125
14188
 
14126
14189
  /**
14127
- * 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.
14190
+ * 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.
14128
14191
  */
14129
14192
  extra_padding_when_activated: number | number[]
14130
14193
 
@@ -14178,7 +14241,7 @@ interface LuaStyle {
14178
14241
  /**
14179
14242
  * Horizontal space between individual cells.
14180
14243
  * @remarks
14181
- * Applies to subclasses: LuaTableStyle,LuaFlowStyle,LuaHorizontalFlow
14244
+ * Applies to subclasses: LuaTableStyle,LuaFlowStyle,LuaHorizontalFlowStyle
14182
14245
  *
14183
14246
  */
14184
14247
  horizontal_spacing: number
@@ -14605,7 +14668,7 @@ interface LuaSurface {
14605
14668
  * Count entities of given type or name in a given area. Works just like {@link LuaSurface::find_entities_filtered | LuaSurface::find_entities_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities.
14606
14669
  *
14607
14670
  * 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 entities in the radius of the position. If `area` is specified, this returns entities colliding with that area.
14608
- * @param table.invert - If the filters should be inverted.
14671
+ * @param table.invert - Whether the filters should be inverted.
14609
14672
  * @param table.radius - If given with position, will count all entities within the radius of the position.
14610
14673
  */
14611
14674
  count_entities_filtered(this: void,
@@ -14631,8 +14694,11 @@ interface LuaSurface {
14631
14694
  * Count tiles of a given name in a given area. Works just like {@link LuaSurface::find_tiles_filtered | LuaSurface::find_tiles_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of tiles.
14632
14695
  *
14633
14696
  * If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
14697
+ * @param table.has_tile_ghost - Can be further filtered by supplying a `force` filter.
14698
+ * @param table.invert - If the filters should be inverted.
14634
14699
  * @param table.position - Ignored if not given with radius.
14635
14700
  * @param table.radius - If given with position, will return all entities within the radius of the position.
14701
+ * @param table.to_be_deconstructed - Can be further filtered by supplying a `force` filter.
14636
14702
  */
14637
14703
  count_tiles_filtered(this: void,
14638
14704
  table: {
@@ -14640,9 +14706,13 @@ interface LuaSurface {
14640
14706
  position?: MapPosition,
14641
14707
  radius?: number,
14642
14708
  name?: string | string[],
14709
+ force?: ForceIdentification | ForceIdentification[],
14643
14710
  limit?: number,
14644
14711
  has_hidden_tile?: boolean,
14645
- collision_mask?: CollisionMaskLayer | CollisionMaskLayer[]
14712
+ has_tile_ghost?: boolean,
14713
+ to_be_deconstructed?: boolean,
14714
+ collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
14715
+ invert?: boolean
14646
14716
  }): void
14647
14717
 
14648
14718
  /**
@@ -14771,6 +14841,7 @@ interface LuaSurface {
14771
14841
 
14772
14842
  /**
14773
14843
  * Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched.
14844
+ * @param table.exclude_soft - Soft decoratives can be drawn over rails.
14774
14845
  * @param table.invert - If the filters should be inverted.
14775
14846
  */
14776
14847
  destroy_decoratives(this: void,
@@ -14778,6 +14849,10 @@ interface LuaSurface {
14778
14849
  area?: BoundingBox,
14779
14850
  position?: TilePosition,
14780
14851
  name?: string | string[] | LuaDecorativePrototype | LuaDecorativePrototype[],
14852
+ collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
14853
+ from_layer?: string,
14854
+ to_layer?: string,
14855
+ exclude_soft?: boolean,
14781
14856
  limit?: number,
14782
14857
  invert?: boolean
14783
14858
  }): void
@@ -14813,6 +14888,7 @@ interface LuaSurface {
14813
14888
  * Find decoratives of a given name in a given area.
14814
14889
  *
14815
14890
  * If no filters are given, returns all decoratives in the search area. If multiple filters are specified, returns only decoratives matching every given filter. If no area and no position are given, the entire surface is searched.
14891
+ * @param table.exclude_soft - Soft decoratives can be drawn over rails.
14816
14892
  * @param table.invert - If the filters should be inverted.
14817
14893
  * @example
14818
14894
  * ```
@@ -14826,6 +14902,10 @@ interface LuaSurface {
14826
14902
  area?: BoundingBox,
14827
14903
  position?: TilePosition,
14828
14904
  name?: string | string[] | LuaDecorativePrototype | LuaDecorativePrototype[],
14905
+ collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
14906
+ from_layer?: string,
14907
+ to_layer?: string,
14908
+ exclude_soft?: boolean,
14829
14909
  limit?: number,
14830
14910
  invert?: boolean
14831
14911
  }): void
@@ -14869,10 +14949,12 @@ interface LuaSurface {
14869
14949
  *
14870
14950
  * 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.
14871
14951
  *
14872
- * 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.
14873
- * @param table.invert - If the filters should be inverted.
14952
+ * - If no `area` or `position` are given, the entire surface is searched.
14953
+ * - If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box).
14954
+ * - If `position` and `radius` are given, this returns the entities within the radius of the position. Looks for the center of entities.
14955
+ * - If `area` is specified, this returns the entities colliding with that area.
14956
+ * @param table.invert - Whether the filters should be inverted.
14874
14957
  * @param table.position - Has precedence over area field.
14875
- * @param table.radius - If given with position, will return all entities within the radius of the position.
14876
14958
  * @example
14877
14959
  * ```
14878
14960
  * game.surfaces[1].find_entities_filtered{area = {{-10, -10}, {10, 10}}, type = "resource"} -- gets all resources in the rectangle
@@ -14996,8 +15078,11 @@ interface LuaSurface {
14996
15078
  * If no filters are given, this returns all tiles in the search area.
14997
15079
  *
14998
15080
  * If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
15081
+ * @param table.has_tile_ghost - Can be further filtered by supplying a `force` filter.
15082
+ * @param table.invert - Whether the filters should be inverted.
14999
15083
  * @param table.position - Ignored if not given with radius.
15000
15084
  * @param table.radius - If given with position, will return all entities within the radius of the position.
15085
+ * @param table.to_be_deconstructed - Can be further filtered by supplying a `force` filter.
15001
15086
  */
15002
15087
  find_tiles_filtered(this: void,
15003
15088
  table: {
@@ -15005,9 +15090,13 @@ interface LuaSurface {
15005
15090
  position?: MapPosition,
15006
15091
  radius?: number,
15007
15092
  name?: string | string[],
15093
+ force?: ForceIdentification | ForceIdentification[],
15008
15094
  limit?: number,
15009
15095
  has_hidden_tile?: boolean,
15010
- collision_mask?: CollisionMaskLayer | CollisionMaskLayer[]
15096
+ has_tile_ghost?: boolean,
15097
+ to_be_deconstructed?: boolean,
15098
+ collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
15099
+ invert?: boolean
15011
15100
  }): void
15012
15101
 
15013
15102
  /**
@@ -15565,7 +15654,7 @@ interface LuaTechnology {
15565
15654
  readonly object_name: string
15566
15655
 
15567
15656
  /**
15568
- * Order string for this prototype.
15657
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
15569
15658
  */
15570
15659
  readonly order: string
15571
15660
 
@@ -15684,7 +15773,7 @@ interface LuaTechnologyPrototype {
15684
15773
  readonly object_name: string
15685
15774
 
15686
15775
  /**
15687
- * Order string for this prototype.
15776
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
15688
15777
  */
15689
15778
  readonly order: string
15690
15779
 
@@ -15758,6 +15847,20 @@ interface LuaTile {
15758
15847
  collides_with(this: void,
15759
15848
  layer: CollisionMaskLayer): void
15760
15849
 
15850
+ /**
15851
+ * Gets all tile ghosts on this tile.
15852
+ * @param force - Get tile ghosts of this force.
15853
+ */
15854
+ get_tile_ghosts(this: void,
15855
+ force?: ForceIdentification): void
15856
+
15857
+ /**
15858
+ * Does this tile have any tile ghosts on it.
15859
+ * @param force - Check for tile ghosts of this force.
15860
+ */
15861
+ has_tile_ghost(this: void,
15862
+ force?: ForceIdentification): void
15863
+
15761
15864
  /**
15762
15865
  * All methods and properties that this object supports.
15763
15866
  */
@@ -15774,8 +15877,10 @@ interface LuaTile {
15774
15877
 
15775
15878
  /**
15776
15879
  * Is this tile marked for deconstruction?
15880
+ * @param force - The force who did the deconstruction order.
15777
15881
  */
15778
- to_be_deconstructed(this: void): void
15882
+ to_be_deconstructed(this: void,
15883
+ force?: ForceIdentification): void
15779
15884
 
15780
15885
  /**
15781
15886
  * The name of the {@link LuaTilePrototype | LuaTilePrototype} hidden under this tile or `nil` if there is no hidden tile. During normal gameplay, only {@link non-mineable | LuaTilePrototype::mineable_properties} tiles can become hidden. This can however be circumvented with {@link LuaSurface::set_hidden_tile | LuaSurface::set_hidden_tile}.
@@ -15857,7 +15962,7 @@ interface LuaTilePrototype {
15857
15962
  readonly emissions_per_second: number
15858
15963
 
15859
15964
  /**
15860
- * Items that when placed will produce this tile. It is a dictionary indexed by the item prototype name.
15965
+ * 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.
15861
15966
  */
15862
15967
  readonly items_to_place_this: SimpleItemStack[]
15863
15968
 
@@ -15869,7 +15974,7 @@ interface LuaTilePrototype {
15869
15974
 
15870
15975
  readonly map_color: Color
15871
15976
 
15872
- readonly mineable_properties: { minable: boolean, miningparticle?: string, miningtime: number, products: Product[] }
15977
+ readonly mineable_properties: { minable: boolean, mining_particle?: string, mining_time: number, products: Product[] }
15873
15978
 
15874
15979
  /**
15875
15980
  * Name of this prototype.
@@ -15892,7 +15997,7 @@ interface LuaTilePrototype {
15892
15997
  readonly object_name: string
15893
15998
 
15894
15999
  /**
15895
- * Order string of this prototype.
16000
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
15896
16001
  */
15897
16002
  readonly order: string
15898
16003
 
@@ -16405,7 +16510,7 @@ interface LuaTrivialSmokePrototype {
16405
16510
  readonly object_name: string
16406
16511
 
16407
16512
  /**
16408
- * Order string of this prototype.
16513
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
16409
16514
  */
16410
16515
  readonly order: string
16411
16516
 
@@ -16550,7 +16655,7 @@ interface LuaVirtualSignalPrototype {
16550
16655
  readonly object_name: string
16551
16656
 
16552
16657
  /**
16553
- * Order string of this prototype.
16658
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
16554
16659
  */
16555
16660
  readonly order: string
16556
16661
 
@@ -16737,7 +16842,7 @@ interface LuaGuiElementAddParams {
16737
16842
  'index'?: number
16738
16843
 
16739
16844
  /**
16740
- * Name of the child element.
16845
+ * Name of the child element. It must be unique within the parent element.
16741
16846
  */
16742
16847
  'name'?: string
16743
16848
 
@@ -16834,7 +16939,7 @@ interface LuaGuiElementAddParamsChooseElemButton extends LuaGuiElementAddParams
16834
16939
  'decorative'?: string
16835
16940
 
16836
16941
  /**
16837
- * Filters describing what to show in the selection window. See {@link LuaGuiElement::elem_filters | LuaGuiElement::elem_filters}.
16942
+ * Filters describing what to show in the selection window. The applicable filter depends on the `elem_type`.
16838
16943
  */
16839
16944
  'elem_filters'?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter[]
16840
16945
 
@@ -17328,7 +17433,7 @@ interface LuaSurfaceCreateEntityParams {
17328
17433
  /**
17329
17434
  * Source entity. Used for beams and highlight-boxes.
17330
17435
  */
17331
- 'source'?: LuaEntity
17436
+ 'source'?: LuaEntity | MapPosition
17332
17437
 
17333
17438
  /**
17334
17439
  * If true, entity types that have spawn_decorations property will apply triggers defined in the property.
@@ -17343,7 +17448,7 @@ interface LuaSurfaceCreateEntityParams {
17343
17448
  /**
17344
17449
  * Entity with health for the new entity to target.
17345
17450
  */
17346
- 'target'?: LuaEntity
17451
+ 'target'?: LuaEntity | MapPosition
17347
17452
 
17348
17453
  }
17349
17454
 
@@ -17507,7 +17612,7 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends LuaSurfaceCreateEntit
17507
17612
  'blink_interval'?: number
17508
17613
 
17509
17614
  /**
17510
- * 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.
17615
+ * 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.
17511
17616
  */
17512
17617
  'bounding_box'?: BoundingBox
17513
17618