typed-factorio 1.0.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -83,7 +83,7 @@ interface LuaAchievementPrototype {
83
83
  */
84
84
  readonly name: string
85
85
  /**
86
- * Order string of this prototype.
86
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
87
87
  *
88
88
  * {@link https://lua-api.factorio.com/latest/LuaAchievementPrototype.html#LuaAchievementPrototype.order View documentation}
89
89
  */
@@ -120,7 +120,7 @@ interface LuaAmmoCategoryPrototype {
120
120
  */
121
121
  readonly name: string
122
122
  /**
123
- * Order string of this prototype.
123
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
124
124
  *
125
125
  * {@link https://lua-api.factorio.com/latest/LuaAmmoCategoryPrototype.html#LuaAmmoCategoryPrototype.order View documentation}
126
126
  */
@@ -150,10 +150,10 @@ interface LuaAmmoCategoryPrototype {
150
150
  */
151
151
  interface LuaArithmeticCombinatorControlBehavior extends LuaCombinatorControlBehavior {
152
152
  /**
153
- * The arithmetic combinator parameters.
153
+ * This arithmetic combinator's parameters.
154
154
  *
155
155
  * {@link https://lua-api.factorio.com/latest/LuaArithmeticCombinatorControlBehavior.html#LuaArithmeticCombinatorControlBehavior.parameters View documentation}
156
- * @remarks `parameters` may be `nil` in order to clear the parameters.
156
+ * @remarks Writing `nil` clears the combinator's parameters.
157
157
  */
158
158
  parameters: ArithmeticCombinatorParameters
159
159
  /**
@@ -184,7 +184,7 @@ interface LuaAutoplaceControlPrototype {
184
184
  */
185
185
  readonly name: string
186
186
  /**
187
- * Order string of this prototype.
187
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
188
188
  *
189
189
  * {@link https://lua-api.factorio.com/latest/LuaAutoplaceControlPrototype.html#LuaAutoplaceControlPrototype.order View documentation}
190
190
  */
@@ -222,10 +222,11 @@ interface LuaAutoplaceControlPrototype {
222
222
  */
223
223
  interface LuaBootstrap {
224
224
  /**
225
- * 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} 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.
225
+ * Register a function to be run on mod initialization. This is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to {@link LuaGameScript} and the {@link https://lua-api.factorio.com/latest/Global.html global} table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.
226
226
  *
227
227
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_init View documentation}
228
228
  * @param f The handler for this event. Passing `nil` will unregister it.
229
+ * @remarks For more context, refer to the {@link https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
229
230
  * @example Initialize a `players` table in `global` for later use.
230
231
  *
231
232
  * ```
@@ -236,24 +237,26 @@ interface LuaBootstrap {
236
237
  */
237
238
  on_init(f: (() => void) | undefined): void
238
239
  /**
239
- * 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} and {@link LuaRendering} is not available. The `global` table can be accessed and is safe to read from, but not write to.
240
+ * Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to {@link LuaGameScript} is not available. The {@link https://lua-api.factorio.com/latest/Global.html global} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
240
241
  *
241
- * The only legitimate uses of this event are these three:
242
- * - Re-setup {@link https://www.lua.org/pil/13.html metatables} as they are not persisted through save-load.
243
- * - Re-setup conditional event handlers.
242
+ * The only legitimate uses of this event are the following:
243
+ * - Re-setup {@link https://www.lua.org/pil/13.html metatables} as they are not persisted through the save/load cycle.
244
+ * - Re-setup conditional event handlers, meaning subscribing to an event only when some condition is met to save processing time.
244
245
  * - Create local references to data stored in the {@link https://lua-api.factorio.com/latest/Global.html global} table.
245
246
  *
246
- * 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.
247
+ * For all other purposes, {@link LuaBootstrap#on_init LuaBootstrap::on_init}, {@link LuaBootstrap#on_configuration_changed LuaBootstrap::on_configuration_changed} or {@link https://lua-api.factorio.com/latest/Migrations.html migrations} should be used instead.
247
248
  *
248
249
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_load View documentation}
249
250
  * @param f The handler for this event. Passing `nil` will unregister it.
251
+ * @remarks For more context, refer to the {@link https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
250
252
  */
251
253
  on_load(f: (() => void) | undefined): void
252
254
  /**
253
- * 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}.
255
+ * 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 https://lua-api.factorio.com/latest/Global.html global} table or to the game state through {@link LuaGameScript}.
254
256
  *
255
257
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_configuration_changed View documentation}
256
258
  * @param f The handler for this event. Passing `nil` will unregister it.
259
+ * @remarks For more context, refer to the {@link https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
257
260
  */
258
261
  on_configuration_changed(f: ((param1: ConfigurationChangedData) => void) | undefined): void
259
262
  /**
@@ -915,12 +918,12 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
915
918
  */
916
919
  get_signal(index: uint): Signal
917
920
  /**
918
- * The constant combinator parameters
921
+ * This constant combinator's parameters, or `nil` if the {@link LuaEntityPrototype#item_slot_count item_slot_count} of the combinator's prototype is `0`.
919
922
  *
920
923
  * {@link https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.parameters View documentation}
921
- * @remarks Setting to `nil` clears the parameters.
924
+ * @remarks Writing `nil` clears the combinator's parameters.
922
925
  */
923
- parameters: ConstantCombinatorParameters[]
926
+ parameters: ConstantCombinatorParameters[] | undefined
924
927
  /**
925
928
  * Turns this constant combinator on and off.
926
929
  *
@@ -1281,7 +1284,7 @@ interface LuaControl {
1281
1284
  */
1282
1285
  set_personal_logistic_slot(slot_index: uint, value: LogisticParameters): boolean
1283
1286
  /**
1284
- * Sets a vehicle logistic request and auto-trash slot to the given value. Only used on `spider-vehicule`s.
1287
+ * Sets a vehicle logistic request and auto-trash slot to the given value. Only used on `spider-vehicle`.
1285
1288
  *
1286
1289
  * **Raised events:**
1287
1290
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if setting of logistic slot was successful.
@@ -1294,7 +1297,7 @@ interface LuaControl {
1294
1297
  */
1295
1298
  set_vehicle_logistic_slot(slot_index: uint, value: LogisticParameters): boolean
1296
1299
  /**
1297
- * Gets the parameters of a personal logistic request and auto-trash slot.
1300
+ * Gets the parameters of a personal logistic request and auto-trash slot. Only used on `spider-vehicle`.
1298
1301
  *
1299
1302
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_personal_logistic_slot View documentation}
1300
1303
  * @param slot_index The slot to get.
@@ -1420,7 +1423,7 @@ interface LuaControl {
1420
1423
  *
1421
1424
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.crafting_queue_progress View documentation}
1422
1425
  */
1423
- readonly crafting_queue_progress: double
1426
+ crafting_queue_progress: double
1424
1427
  /**
1425
1428
  * Current walking state.
1426
1429
  *
@@ -1551,6 +1554,10 @@ interface LuaControl {
1551
1554
  /**
1552
1555
  * `true` if the player is in a vehicle. Writing to this attribute puts the player in or out of a vehicle.
1553
1556
  *
1557
+ * **Raised events:**
1558
+ * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_ Raised if the driving state successfully changed.
1559
+ *
1560
+ *
1554
1561
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.driving View documentation}
1555
1562
  */
1556
1563
  driving: boolean
@@ -1857,7 +1864,7 @@ interface LuaCustomInputPrototype {
1857
1864
  */
1858
1865
  readonly name: string
1859
1866
  /**
1860
- * Order string of this prototype.
1867
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
1861
1868
  *
1862
1869
  * {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.order View documentation}
1863
1870
  */
@@ -2021,7 +2028,7 @@ interface LuaDamagePrototype {
2021
2028
  */
2022
2029
  readonly name: string
2023
2030
  /**
2024
- * Order string of this prototype.
2031
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
2025
2032
  *
2026
2033
  * {@link https://lua-api.factorio.com/latest/LuaDamagePrototype.html#LuaDamagePrototype.order View documentation}
2027
2034
  */
@@ -2056,10 +2063,10 @@ interface LuaDamagePrototype {
2056
2063
  */
2057
2064
  interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavior {
2058
2065
  /**
2059
- * The decider combinator parameters
2066
+ * This decider combinator's parameters.
2060
2067
  *
2061
2068
  * {@link https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html#LuaDeciderCombinatorControlBehavior.parameters View documentation}
2062
- * @remarks Setting to `nil` clears the parameters.
2069
+ * @remarks Writing `nil` clears the combinator's parameters.
2063
2070
  */
2064
2071
  parameters: DeciderCombinatorParameters
2065
2072
  /**
@@ -2090,7 +2097,7 @@ interface LuaDecorativePrototype {
2090
2097
  */
2091
2098
  readonly name: string
2092
2099
  /**
2093
- * Order string of this prototype.
2100
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
2094
2101
  *
2095
2102
  * {@link https://lua-api.factorio.com/latest/LuaDecorativePrototype.html#LuaDecorativePrototype.order View documentation}
2096
2103
  */
@@ -2169,7 +2176,7 @@ interface LuaElectricEnergySourcePrototype {
2169
2176
  */
2170
2177
  interface LuaEntity extends LuaControl {
2171
2178
  /**
2172
- * Gets the entities output inventory if it has one.
2179
+ * Gets the entity's output inventory if it has one.
2173
2180
  *
2174
2181
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_output_inventory View documentation}
2175
2182
  * @returns A reference to the entity's output inventory.
@@ -2882,6 +2889,9 @@ interface LuaEntity extends LuaControl {
2882
2889
  /**
2883
2890
  * Sets the driver of this vehicle.
2884
2891
  *
2892
+ * **Raised events:**
2893
+ * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
2894
+ *
2885
2895
  * _Can only be used if this is Vehicle_
2886
2896
  *
2887
2897
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver View documentation}
@@ -2902,6 +2912,9 @@ interface LuaEntity extends LuaControl {
2902
2912
  /**
2903
2913
  * Sets the passenger of this car or spidertron.
2904
2914
  *
2915
+ * **Raised events:**
2916
+ * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
2917
+ *
2905
2918
  * _Can only be used if this is Vehicle_
2906
2919
  *
2907
2920
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger View documentation}
@@ -2909,7 +2922,7 @@ interface LuaEntity extends LuaControl {
2909
2922
  */
2910
2923
  set_passenger(passenger: LuaEntity | PlayerIdentification): void
2911
2924
  /**
2912
- * Returns true if this entity is connected to an electric network.
2925
+ * 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.
2913
2926
  *
2914
2927
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_connected_to_electric_network View documentation}
2915
2928
  */
@@ -3755,13 +3768,16 @@ interface LuaEntity extends LuaControl {
3755
3768
  */
3756
3769
  kills: uint
3757
3770
  /**
3758
- * 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.
3771
+ * 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.
3772
+ *
3773
+ * Reading this property will return a {@link LuaPlayer}, while {@link PlayerIdentification} can be used when writing.
3759
3774
  *
3760
3775
  * _Can only be used if this is EntityWithOwner_
3761
3776
  *
3762
3777
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.last_user View documentation}
3763
3778
  */
3764
- last_user: LuaPlayer | undefined
3779
+ get last_user(): LuaPlayer | LuaPlayer | undefined
3780
+ set last_user(value: LuaPlayer | PlayerIdentification | undefined)
3765
3781
  /**
3766
3782
  * The buffer size for the electric energy source or nil if the entity doesn't have an electric energy source.
3767
3783
  *
@@ -3842,7 +3858,7 @@ interface LuaEntity extends LuaControl {
3842
3858
  */
3843
3859
  readonly bounding_box: BoundingBoxRead
3844
3860
  /**
3845
- * The secondary bounding box of this entity or `nil` if it doesn't have one.
3861
+ * 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.
3846
3862
  *
3847
3863
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_bounding_box View documentation}
3848
3864
  */
@@ -3854,7 +3870,7 @@ interface LuaEntity extends LuaControl {
3854
3870
  */
3855
3871
  readonly selection_box: BoundingBoxRead
3856
3872
  /**
3857
- * The secondary selection box of this entity or `nil` if it doesn't have one.
3873
+ * 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.
3858
3874
  *
3859
3875
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_selection_box View documentation}
3860
3876
  */
@@ -4087,14 +4103,19 @@ interface LuaEntity extends LuaControl {
4087
4103
  */
4088
4104
  character_corpse_death_cause: LocalisedString
4089
4105
  /**
4090
- * 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.
4106
+ * The player this character is associated with, or `nil` if there isn't one. Set to `nil` to clear.
4107
+ *
4108
+ * 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.
4109
+ *
4110
+ * Reading this property will return a {@link LuaPlayer}, while {@link PlayerIdentification} can be used when writing.
4091
4111
  *
4092
4112
  * _Can only be used if this is Character_
4093
4113
  *
4094
4114
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.associated_player View documentation}
4095
- * @remarks A character associated with a player is not directly controlled by any player.<br>Set to `nil` to clear. The player will be automatically disassociated when a controller is set on the character.
4115
+ * @remarks A character associated with a player is not directly controlled by any player.
4096
4116
  */
4097
- associated_player: LuaPlayer | undefined
4117
+ get associated_player(): LuaPlayer | LuaPlayer | undefined
4118
+ set associated_player(value: LuaPlayer | PlayerIdentification | undefined)
4098
4119
  /**
4099
4120
  * The last tick this character entity was attacked.
4100
4121
  *
@@ -4240,9 +4261,12 @@ interface LuaEntity extends LuaControl {
4240
4261
  /**
4241
4262
  * 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.
4242
4263
  *
4264
+ * Reading this property will return a {@link LuaPlayer}, while {@link PlayerIdentification} can be used when writing.
4265
+ *
4243
4266
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.render_player View documentation}
4244
4267
  */
4245
- render_player: LuaPlayer | undefined
4268
+ get render_player(): LuaPlayer | LuaPlayer | undefined
4269
+ set render_player(value: LuaPlayer | PlayerIdentification | undefined)
4246
4270
  /**
4247
4271
  * 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.
4248
4272
  *
@@ -4486,7 +4510,7 @@ interface LuaEntity extends LuaControl {
4486
4510
  */
4487
4511
  interface BaseEntity extends LuaControl {
4488
4512
  /**
4489
- * Gets the entities output inventory if it has one.
4513
+ * Gets the entity's output inventory if it has one.
4490
4514
  *
4491
4515
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_output_inventory View documentation}
4492
4516
  * @returns A reference to the entity's output inventory.
@@ -4876,7 +4900,7 @@ interface BaseEntity extends LuaControl {
4876
4900
  readonly force?: LuaForce | string
4877
4901
  }): LuaMultiReturn<[boolean, Record<string, uint> | undefined]>
4878
4902
  /**
4879
- * Returns true if this entity is connected to an electric network.
4903
+ * 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.
4880
4904
  *
4881
4905
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_connected_to_electric_network View documentation}
4882
4906
  */
@@ -5388,7 +5412,7 @@ interface BaseEntity extends LuaControl {
5388
5412
  */
5389
5413
  readonly bounding_box: BoundingBoxRead
5390
5414
  /**
5391
- * The secondary bounding box of this entity or `nil` if it doesn't have one.
5415
+ * 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.
5392
5416
  *
5393
5417
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_bounding_box View documentation}
5394
5418
  */
@@ -5400,7 +5424,7 @@ interface BaseEntity extends LuaControl {
5400
5424
  */
5401
5425
  readonly selection_box: BoundingBoxRead
5402
5426
  /**
5403
- * The secondary selection box of this entity or `nil` if it doesn't have one.
5427
+ * 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.
5404
5428
  *
5405
5429
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_selection_box View documentation}
5406
5430
  */
@@ -5556,9 +5580,12 @@ interface BaseEntity extends LuaControl {
5556
5580
  /**
5557
5581
  * 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.
5558
5582
  *
5583
+ * Reading this property will return a {@link LuaPlayer}, while {@link PlayerIdentification} can be used when writing.
5584
+ *
5559
5585
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.render_player View documentation}
5560
5586
  */
5561
- render_player: LuaPlayer | undefined
5587
+ get render_player(): LuaPlayer | LuaPlayer | undefined
5588
+ set render_player(value: LuaPlayer | PlayerIdentification | undefined)
5562
5589
  /**
5563
5590
  * 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.
5564
5591
  *
@@ -6276,6 +6303,9 @@ interface VehicleEntity extends BaseEntity {
6276
6303
  /**
6277
6304
  * Sets the driver of this vehicle.
6278
6305
  *
6306
+ * **Raised events:**
6307
+ * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
6308
+ *
6279
6309
  * _Can only be used if this is Vehicle_
6280
6310
  *
6281
6311
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver View documentation}
@@ -6296,6 +6326,9 @@ interface VehicleEntity extends BaseEntity {
6296
6326
  /**
6297
6327
  * Sets the passenger of this car or spidertron.
6298
6328
  *
6329
+ * **Raised events:**
6330
+ * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
6331
+ *
6299
6332
  * _Can only be used if this is Vehicle_
6300
6333
  *
6301
6334
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger View documentation}
@@ -6718,14 +6751,19 @@ interface CharacterEntity extends BaseEntity {
6718
6751
  */
6719
6752
  readonly player: LuaPlayer | undefined
6720
6753
  /**
6721
- * 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.
6754
+ * The player this character is associated with, or `nil` if there isn't one. Set to `nil` to clear.
6755
+ *
6756
+ * 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.
6757
+ *
6758
+ * Reading this property will return a {@link LuaPlayer}, while {@link PlayerIdentification} can be used when writing.
6722
6759
  *
6723
6760
  * _Can only be used if this is Character_
6724
6761
  *
6725
6762
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.associated_player View documentation}
6726
- * @remarks A character associated with a player is not directly controlled by any player.<br>Set to `nil` to clear. The player will be automatically disassociated when a controller is set on the character.
6763
+ * @remarks A character associated with a player is not directly controlled by any player.
6727
6764
  */
6728
- associated_player: LuaPlayer | undefined
6765
+ get associated_player(): LuaPlayer | LuaPlayer | undefined
6766
+ set associated_player(value: LuaPlayer | PlayerIdentification | undefined)
6729
6767
  /**
6730
6768
  * The last tick this character entity was attacked.
6731
6769
  *
@@ -6825,13 +6863,16 @@ interface TurretEntity extends BaseEntity {
6825
6863
 
6826
6864
  interface EntityWithOwnerEntity extends BaseEntity {
6827
6865
  /**
6828
- * 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.
6866
+ * 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.
6867
+ *
6868
+ * Reading this property will return a {@link LuaPlayer}, while {@link PlayerIdentification} can be used when writing.
6829
6869
  *
6830
6870
  * _Can only be used if this is EntityWithOwner_
6831
6871
  *
6832
6872
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.last_user View documentation}
6833
6873
  */
6834
- last_user: LuaPlayer | undefined
6874
+ get last_user(): LuaPlayer | LuaPlayer | undefined
6875
+ set last_user(value: LuaPlayer | PlayerIdentification | undefined)
6835
6876
  }
6836
6877
 
6837
6878
  interface ElectricEnergyInterfaceEntity extends BaseEntity {
@@ -7186,7 +7227,7 @@ interface LuaEntityPrototype {
7186
7227
  */
7187
7228
  readonly default_collision_mask_with_flags: CollisionMaskWithFlags
7188
7229
  /**
7189
- * Order string of this prototype.
7230
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
7190
7231
  *
7191
7232
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.order View documentation}
7192
7233
  */
@@ -7570,6 +7611,12 @@ interface LuaEntityPrototype {
7570
7611
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.guns View documentation}
7571
7612
  */
7572
7613
  readonly guns: Record<string, LuaItemPrototype> | undefined
7614
+ /**
7615
+ * A vector of the gun prototypes this prototype uses, or `nil`.
7616
+ *
7617
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.indexed_guns View documentation}
7618
+ */
7619
+ readonly indexed_guns: LuaItemPrototype[] | undefined
7573
7620
  /**
7574
7621
  * The default speed of this flying robot, rolling stock or unit, `nil` if not one of these.
7575
7622
  *
@@ -8309,6 +8356,58 @@ interface LuaEntityPrototype {
8309
8356
  readonly robots_shrink_when_entering_and_exiting: boolean
8310
8357
  }
8311
8358
  | undefined
8359
+ /**
8360
+ * Gets the height of this prototype. `nil` if this is not a spider vechicle.
8361
+ *
8362
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.height View documentation}
8363
+ */
8364
+ readonly height: double | undefined
8365
+ /**
8366
+ * Gets the torso rotation speed of this prototype. `nil` if this is not a spider vechicle.
8367
+ *
8368
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.torso_rotation_speed View documentation}
8369
+ */
8370
+ readonly torso_rotation_speed: double | undefined
8371
+ /**
8372
+ * Does this prototoype automaticly cycle weapons. `nil` if this is not a spider vechicle.
8373
+ *
8374
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.automatic_weapon_cycling View documentation}
8375
+ */
8376
+ readonly automatic_weapon_cycling: boolean | undefined
8377
+ /**
8378
+ * Gets the chain shooting cooldown modifier of this prototype. `nil` if this is not a spider vechicle.
8379
+ *
8380
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chain_shooting_cooldown_modifier View documentation}
8381
+ */
8382
+ readonly chain_shooting_cooldown_modifier: double | undefined
8383
+ /**
8384
+ * Gets the chunk exploration radius of this prototype. `nil` if this is not a spider vechicle.
8385
+ *
8386
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chunk_exploration_radius View documentation}
8387
+ */
8388
+ readonly chunk_exploration_radius: double | undefined
8389
+ /**
8390
+ * Gets the animation speed coefficient of this belt . `nil` if this is not transport belt connectable.
8391
+ *
8392
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.animation_speed_coefficient View documentation}
8393
+ */
8394
+ readonly animation_speed_coefficient: double | undefined
8395
+ /**
8396
+ * Get the manual range modifier for artillery turret and artillery wagon prototypes. `nil` if not artillery type prototype
8397
+ *
8398
+ * subclass(ArtilleryWagon, ArtilleryTurret)
8399
+ *
8400
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.manual_range_modifier View documentation}
8401
+ */
8402
+ readonly manual_range_modifier: double | undefined
8403
+ /**
8404
+ * The dying time of this corpse prototype. `nil` if not a corpse prototype.
8405
+ *
8406
+ * _Can only be used if this is Corpse_
8407
+ *
8408
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.dying_speed View documentation}
8409
+ */
8410
+ readonly dying_speed: float | undefined
8312
8411
  /**
8313
8412
  * Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
8314
8413
  *
@@ -8575,7 +8674,7 @@ interface BaseEntityPrototype {
8575
8674
  */
8576
8675
  readonly default_collision_mask_with_flags: CollisionMaskWithFlags
8577
8676
  /**
8578
- * Order string of this prototype.
8677
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
8579
8678
  *
8580
8679
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.order View documentation}
8581
8680
  */
@@ -8959,6 +9058,12 @@ interface BaseEntityPrototype {
8959
9058
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.guns View documentation}
8960
9059
  */
8961
9060
  readonly guns: Record<string, LuaItemPrototype> | undefined
9061
+ /**
9062
+ * A vector of the gun prototypes this prototype uses, or `nil`.
9063
+ *
9064
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.indexed_guns View documentation}
9065
+ */
9066
+ readonly indexed_guns: LuaItemPrototype[] | undefined
8962
9067
  /**
8963
9068
  * The default speed of this flying robot, rolling stock or unit, `nil` if not one of these.
8964
9069
  *
@@ -9620,6 +9725,50 @@ interface BaseEntityPrototype {
9620
9725
  readonly robots_shrink_when_entering_and_exiting: boolean
9621
9726
  }
9622
9727
  | undefined
9728
+ /**
9729
+ * Gets the height of this prototype. `nil` if this is not a spider vechicle.
9730
+ *
9731
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.height View documentation}
9732
+ */
9733
+ readonly height: double | undefined
9734
+ /**
9735
+ * Gets the torso rotation speed of this prototype. `nil` if this is not a spider vechicle.
9736
+ *
9737
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.torso_rotation_speed View documentation}
9738
+ */
9739
+ readonly torso_rotation_speed: double | undefined
9740
+ /**
9741
+ * Does this prototoype automaticly cycle weapons. `nil` if this is not a spider vechicle.
9742
+ *
9743
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.automatic_weapon_cycling View documentation}
9744
+ */
9745
+ readonly automatic_weapon_cycling: boolean | undefined
9746
+ /**
9747
+ * Gets the chain shooting cooldown modifier of this prototype. `nil` if this is not a spider vechicle.
9748
+ *
9749
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chain_shooting_cooldown_modifier View documentation}
9750
+ */
9751
+ readonly chain_shooting_cooldown_modifier: double | undefined
9752
+ /**
9753
+ * Gets the chunk exploration radius of this prototype. `nil` if this is not a spider vechicle.
9754
+ *
9755
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chunk_exploration_radius View documentation}
9756
+ */
9757
+ readonly chunk_exploration_radius: double | undefined
9758
+ /**
9759
+ * Gets the animation speed coefficient of this belt . `nil` if this is not transport belt connectable.
9760
+ *
9761
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.animation_speed_coefficient View documentation}
9762
+ */
9763
+ readonly animation_speed_coefficient: double | undefined
9764
+ /**
9765
+ * Get the manual range modifier for artillery turret and artillery wagon prototypes. `nil` if not artillery type prototype
9766
+ *
9767
+ * subclass(ArtilleryWagon, ArtilleryTurret)
9768
+ *
9769
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.manual_range_modifier View documentation}
9770
+ */
9771
+ readonly manual_range_modifier: double | undefined
9623
9772
  /**
9624
9773
  * 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.
9625
9774
  */
@@ -9727,6 +9876,17 @@ interface EntityWithOwnerEntityPrototype extends BaseEntityPrototype {
9727
9876
  readonly allow_run_time_change_of_is_military_target: boolean
9728
9877
  }
9729
9878
 
9879
+ interface CorpseEntityPrototype extends BaseEntityPrototype {
9880
+ /**
9881
+ * The dying time of this corpse prototype. `nil` if not a corpse prototype.
9882
+ *
9883
+ * _Can only be used if this is Corpse_
9884
+ *
9885
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.dying_speed View documentation}
9886
+ */
9887
+ readonly dying_speed: float | undefined
9888
+ }
9889
+
9730
9890
  interface CharacterEntityPrototype extends BaseEntityPrototype {
9731
9891
  /**
9732
9892
  * Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
@@ -9936,7 +10096,7 @@ interface LuaEquipmentCategoryPrototype {
9936
10096
  */
9937
10097
  readonly name: string
9938
10098
  /**
9939
- * Order string of this prototype.
10099
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
9940
10100
  *
9941
10101
  * {@link https://lua-api.factorio.com/latest/LuaEquipmentCategoryPrototype.html#LuaEquipmentCategoryPrototype.order View documentation}
9942
10102
  */
@@ -10154,7 +10314,7 @@ interface LuaEquipmentGridPrototype {
10154
10314
  */
10155
10315
  readonly name: string
10156
10316
  /**
10157
- * Order string of this prototype.
10317
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10158
10318
  *
10159
10319
  * {@link https://lua-api.factorio.com/latest/LuaEquipmentGridPrototype.html#LuaEquipmentGridPrototype.order View documentation}
10160
10320
  */
@@ -10209,7 +10369,7 @@ interface LuaEquipmentPrototype {
10209
10369
  */
10210
10370
  readonly type: string
10211
10371
  /**
10212
- * Order string of this prototype.
10372
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10213
10373
  *
10214
10374
  * {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.order View documentation}
10215
10375
  */
@@ -10344,7 +10504,7 @@ interface LuaEquipmentPrototype {
10344
10504
  *
10345
10505
  * Examples:
10346
10506
  * - The item production GUI shows "consumption" on the right, thus `output` describes the item consumption numbers. The same goes for fluid consumption.
10347
- * - The kills gui shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
10507
+ * - The kills GUI shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
10348
10508
  * - The electric network GUI shows "power consumption" on the left side, so in this case `input` describes the power consumption numbers.
10349
10509
  *
10350
10510
  * {@link https://lua-api.factorio.com/latest/LuaFlowStatistics.html View documentation}
@@ -10382,7 +10542,11 @@ interface LuaFlowStatistics {
10382
10542
  */
10383
10543
  set_output_count(name: string, count: uint64 | double): void
10384
10544
  /**
10385
- * Gets the flow count value for the given time frame.
10545
+ * 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.
10546
+ *
10547
+ * 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.
10548
+ *
10549
+ * All return values are normalized to be per-tick for electric networks and per-minute for all other types.
10386
10550
  *
10387
10551
  * {@link https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count View documentation}
10388
10552
  */
@@ -10396,11 +10560,15 @@ interface LuaFlowStatistics {
10396
10560
  */
10397
10561
  readonly input: boolean
10398
10562
  /**
10399
- * The precision to read.
10563
+ * The precision range to read.
10400
10564
  */
10401
10565
  readonly precision_index: defines.flow_precision_index
10402
10566
  /**
10403
- * If true, the count is returned instead of the per-time-frame value.
10567
+ * 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.
10568
+ */
10569
+ readonly sample_index?: uint16
10570
+ /**
10571
+ * If true, the count of items/fluids/entities is returned instead of the per-time-frame value.
10404
10572
  */
10405
10573
  readonly count?: boolean
10406
10574
  }): double
@@ -10481,7 +10649,7 @@ interface LuaFluidBox extends Array<Fluid | undefined> {
10481
10649
  */
10482
10650
  get_capacity(index: uint): double
10483
10651
  /**
10484
- * The fluidbox connections for the given fluidbox index.
10652
+ * The fluidboxes to which the fluidbox at the given index is connected.
10485
10653
  *
10486
10654
  * {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_connections View documentation}
10487
10655
  */
@@ -10719,7 +10887,7 @@ interface LuaFluidPrototype {
10719
10887
  */
10720
10888
  readonly heat_capacity: double
10721
10889
  /**
10722
- * Order string for this prototype.
10890
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
10723
10891
  *
10724
10892
  * {@link https://lua-api.factorio.com/latest/LuaFluidPrototype.html#LuaFluidPrototype.order View documentation}
10725
10893
  */
@@ -11546,7 +11714,7 @@ interface LuaFuelCategoryPrototype {
11546
11714
  */
11547
11715
  readonly name: string
11548
11716
  /**
11549
- * Order string of this prototype.
11717
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
11550
11718
  *
11551
11719
  * {@link https://lua-api.factorio.com/latest/LuaFuelCategoryPrototype.html#LuaFuelCategoryPrototype.order View documentation}
11552
11720
  */
@@ -11959,11 +12127,10 @@ interface LuaGameScript {
11959
12127
  */
11960
12128
  is_valid_sound_path(sound_path: SoundPath): boolean
11961
12129
  /**
11962
- * Checks if the given SpritePath is valid and contains a loaded sprite.
12130
+ * 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`.
11963
12131
  *
11964
12132
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_valid_sprite_path View documentation}
11965
12133
  * @param sprite_path Path to the image.
11966
- * @remarks The existence of the image is not checked for paths of type `file`.
11967
12134
  */
11968
12135
  is_valid_sprite_path(sprite_path: SpritePath): boolean
11969
12136
  /**
@@ -12279,7 +12446,9 @@ interface LuaGameScript {
12279
12446
  */
12280
12447
  decode_string(string: string): string | undefined
12281
12448
  /**
12282
- * The player typing at the console - `nil` in all other instances. See {@link LuaGameScript#players LuaGameScript::players} for accessing all players.
12449
+ * This property is only populated inside {@link LuaCommandProcessor custom command} handlers and when writing {@link https://wiki.factorio.com/Console#Scripting_and_cheat_commands Lua console commands}. Returns the player that is typing the command, `nil` in all other instances.
12450
+ *
12451
+ * See {@link LuaGameScript#players LuaGameScript::players} for accessing all players.
12283
12452
  *
12284
12453
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.player View documentation}
12285
12454
  */
@@ -12727,6 +12896,11 @@ interface LuaGroup {
12727
12896
  * @remarks Can only be used on groups, not on subgroups.
12728
12897
  */
12729
12898
  readonly order_in_recipe: string
12899
+ /**
12900
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
12901
+ *
12902
+ * {@link https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.order View documentation}
12903
+ */
12730
12904
  readonly order: string
12731
12905
  /**
12732
12906
  * 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.
@@ -12753,6 +12927,8 @@ interface LuaGui {
12753
12927
  /**
12754
12928
  * Returns `true` if sprite_path is valid and contains loaded sprite, otherwise `false`. Sprite path of type `file` doesn't validate if file exists.
12755
12929
  *
12930
+ * If you want to avoid needing a LuaGui object, {@link LuaGameScript#is_valid_sprite_path LuaGameScript::is_valid_sprite_path} can be used instead.
12931
+ *
12756
12932
  * {@link https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.is_valid_sprite_path View documentation}
12757
12933
  * @param sprite_path Path to a image.
12758
12934
  */
@@ -12852,7 +13028,7 @@ interface BaseGuiSpec {
12852
13028
  */
12853
13029
  readonly type: GuiElementType
12854
13030
  /**
12855
- * Name of the child element.
13031
+ * Name of the child element. It must be unique within the parent element.
12856
13032
  */
12857
13033
  readonly name?: string
12858
13034
  /**
@@ -13371,7 +13547,7 @@ interface BaseGuiElement {
13371
13547
  * Other attributes may be specified depending on `type`:
13372
13548
  *
13373
13549
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add View documentation}
13374
- * @returns The added GUI element.
13550
+ * @returns The GUI element that was added.
13375
13551
  */
13376
13552
  add<Type extends GuiElementType>(
13377
13553
  element: GuiSpec & {
@@ -13460,7 +13636,7 @@ interface BaseGuiElement {
13460
13636
  */
13461
13637
  readonly parent: LuaGuiElement | undefined
13462
13638
  /**
13463
- * The name of this element.
13639
+ * The name of this element. `""` if no name was set.
13464
13640
  *
13465
13641
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.name View documentation}
13466
13642
  * @example
@@ -13585,20 +13761,7 @@ interface ChooseElemButtonGuiElementMembers extends BaseGuiElement {
13585
13761
  */
13586
13762
  elem_value: (this["elem_type"] extends "signal" ? SignalID : string) | undefined
13587
13763
  /**
13588
- * The elem filters of this choose-elem-button or `nil` if there are no filters.
13589
- *
13590
- * The compatible type of filter is determined by elem_type:
13591
- * - Type `"item"` - {@link ItemPrototypeFilter}
13592
- * - Type `"tile"` - {@link TilePrototypeFilter}
13593
- * - Type `"entity"` - {@link EntityPrototypeFilter}
13594
- * - Type `"signal"` - Does not support filters
13595
- * - Type `"fluid"` - {@link FluidPrototypeFilter}
13596
- * - Type `"recipe"` - {@link RecipePrototypeFilter}
13597
- * - Type `"decorative"` - {@link DecorativePrototypeFilter}
13598
- * - Type `"item-group"` - Does not support filters
13599
- * - Type `"achievement"` - {@link AchievementPrototypeFilter}
13600
- * - Type `"equipment"` - {@link EquipmentPrototypeFilter}
13601
- * - Type `"technology"` - {@link TechnologyPrototypeFilter}
13764
+ * 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`.
13602
13765
  *
13603
13766
  * _Can only be used if this is choose-elem-button_
13604
13767
  *
@@ -15223,7 +15386,7 @@ interface LuaItemPrototype {
15223
15386
  readonly localised_name: LocalisedString
15224
15387
  readonly localised_description: LocalisedString
15225
15388
  /**
15226
- * Order string.
15389
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
15227
15390
  *
15228
15391
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.order View documentation}
15229
15392
  */
@@ -15461,13 +15624,13 @@ interface LuaItemPrototype {
15461
15624
  */
15462
15625
  readonly speed: float | undefined
15463
15626
  /**
15464
- * Effects of this module; `nil` if this is not a module.
15627
+ * Effects of this module.
15465
15628
  *
15466
15629
  * _Can only be used if this is ModuleItem_
15467
15630
  *
15468
15631
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.module_effects View documentation}
15469
15632
  */
15470
- readonly module_effects: ModuleEffects | undefined
15633
+ readonly module_effects: ModuleEffects
15471
15634
  /**
15472
15635
  * The name of a {@link LuaModuleCategoryPrototype}. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules of the same category with higher tier modules.
15473
15636
  *
@@ -15816,7 +15979,7 @@ interface BaseItemPrototype {
15816
15979
  readonly localised_name: LocalisedString
15817
15980
  readonly localised_description: LocalisedString
15818
15981
  /**
15819
- * Order string.
15982
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
15820
15983
  *
15821
15984
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.order View documentation}
15822
15985
  */
@@ -16078,13 +16241,13 @@ interface ItemWithLabelItemPrototype extends BaseItemPrototype {
16078
16241
 
16079
16242
  interface ModuleItemPrototype extends BaseItemPrototype {
16080
16243
  /**
16081
- * Effects of this module; `nil` if this is not a module.
16244
+ * Effects of this module.
16082
16245
  *
16083
16246
  * _Can only be used if this is ModuleItem_
16084
16247
  *
16085
16248
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.module_effects View documentation}
16086
16249
  */
16087
- readonly module_effects: ModuleEffects | undefined
16250
+ readonly module_effects: ModuleEffects
16088
16251
  /**
16089
16252
  * The name of a {@link LuaModuleCategoryPrototype}. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules of the same category with higher tier modules.
16090
16253
  *
@@ -16484,8 +16647,8 @@ interface LuaItemStack {
16484
16647
  * Set this item stack to another item stack.
16485
16648
  *
16486
16649
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_stack View documentation}
16487
- * @param stack Item stack to set this one to. Omitting this parameter or passing `nil` will clear this item stack, as if by calling {@link LuaItemStack#clear LuaItemStack::clear}.
16488
- * @returns Was the stack set successfully?
16650
+ * @param stack Item stack to set it to. Omitting this parameter or passing `nil` will clear this item stack, as if {@link LuaItemStack#clear LuaItemStack::clear} was called.
16651
+ * @returns Whether the stack was set successfully. Returns `false` if this stack was not {@link LuaItemStack#can_set_stack valid for write}.
16489
16652
  */
16490
16653
  set_stack(stack?: ItemStackIdentification): boolean
16491
16654
  /**
@@ -17219,8 +17382,8 @@ interface BaseItemStack {
17219
17382
  * Set this item stack to another item stack.
17220
17383
  *
17221
17384
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.set_stack View documentation}
17222
- * @param stack Item stack to set this one to. Omitting this parameter or passing `nil` will clear this item stack, as if by calling {@link LuaItemStack#clear LuaItemStack::clear}.
17223
- * @returns Was the stack set successfully?
17385
+ * @param stack Item stack to set it to. Omitting this parameter or passing `nil` will clear this item stack, as if {@link LuaItemStack#clear LuaItemStack::clear} was called.
17386
+ * @returns Whether the stack was set successfully. Returns `false` if this stack was not {@link LuaItemStack#can_set_stack valid for write}.
17224
17387
  */
17225
17388
  set_stack(stack?: ItemStackIdentification): boolean
17226
17389
  /**
@@ -18619,7 +18782,7 @@ interface LuaModSettingPrototype {
18619
18782
  */
18620
18783
  readonly name: string
18621
18784
  /**
18622
- * Order string of this prototype.
18785
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
18623
18786
  *
18624
18787
  * {@link https://lua-api.factorio.com/latest/LuaModSettingPrototype.html#LuaModSettingPrototype.order View documentation}
18625
18788
  */
@@ -18703,7 +18866,7 @@ interface LuaModuleCategoryPrototype {
18703
18866
  */
18704
18867
  readonly name: string
18705
18868
  /**
18706
- * Order string of this prototype.
18869
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
18707
18870
  *
18708
18871
  * {@link https://lua-api.factorio.com/latest/LuaModuleCategoryPrototype.html#LuaModuleCategoryPrototype.order View documentation}
18709
18872
  */
@@ -18738,7 +18901,7 @@ interface LuaNamedNoiseExpression {
18738
18901
  */
18739
18902
  readonly name: string
18740
18903
  /**
18741
- * Order string of this prototype.
18904
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
18742
18905
  *
18743
18906
  * {@link https://lua-api.factorio.com/latest/LuaNamedNoiseExpression.html#LuaNamedNoiseExpression.order View documentation}
18744
18907
  */
@@ -18785,7 +18948,7 @@ interface LuaNoiseLayerPrototype {
18785
18948
  */
18786
18949
  readonly name: string
18787
18950
  /**
18788
- * Order string of this prototype.
18951
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
18789
18952
  *
18790
18953
  * {@link https://lua-api.factorio.com/latest/LuaNoiseLayerPrototype.html#LuaNoiseLayerPrototype.order View documentation}
18791
18954
  */
@@ -18820,7 +18983,7 @@ interface LuaParticlePrototype {
18820
18983
  */
18821
18984
  readonly name: string
18822
18985
  /**
18823
- * Order string of this prototype.
18986
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
18824
18987
  *
18825
18988
  * {@link https://lua-api.factorio.com/latest/LuaParticlePrototype.html#LuaParticlePrototype.order View documentation}
18826
18989
  */
@@ -19123,6 +19286,10 @@ interface LuaPlayer extends LuaControl {
19123
19286
  /**
19124
19287
  * Invokes the "clear cursor" action on the player as if the user pressed it.
19125
19288
  *
19289
+ * **Raised events:**
19290
+ * - {@link OnPlayerCursorStackChangedEvent on_player_cursor_stack_changed}? _current_tick_ Raised when the cursor was successfully cleared.
19291
+ *
19292
+ *
19126
19293
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.clear_cursor View documentation}
19127
19294
  * @returns Whether the cursor is now empty.
19128
19295
  */
@@ -19595,7 +19762,7 @@ interface LuaPlayer extends LuaControl {
19595
19762
  */
19596
19763
  readonly cutscene_character: LuaEntity | undefined
19597
19764
  /**
19598
- * This player's index in {@link LuaGameScript#players LuaGameScript::players}.
19765
+ * This player's unique index in {@link LuaGameScript#players LuaGameScript::players}. It is given to them when they are {@link OnPlayerCreatedEvent created} and remains assigned to them until they are {@link OnPlayerRemovedEvent removed}.
19599
19766
  *
19600
19767
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.index View documentation}
19601
19768
  */
@@ -20143,7 +20310,7 @@ interface LuaRecipe {
20143
20310
  */
20144
20311
  readonly energy: double
20145
20312
  /**
20146
- * Order string. This is used to sort the crafting menu.
20313
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
20147
20314
  *
20148
20315
  * {@link https://lua-api.factorio.com/latest/LuaRecipe.html#LuaRecipe.order View documentation}
20149
20316
  */
@@ -20194,7 +20361,7 @@ interface LuaRecipeCategoryPrototype {
20194
20361
  */
20195
20362
  readonly name: string
20196
20363
  /**
20197
- * Order string of this prototype.
20364
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
20198
20365
  *
20199
20366
  * {@link https://lua-api.factorio.com/latest/LuaRecipeCategoryPrototype.html#LuaRecipeCategoryPrototype.order View documentation}
20200
20367
  */
@@ -20296,7 +20463,7 @@ interface LuaRecipePrototype {
20296
20463
  */
20297
20464
  readonly energy: double
20298
20465
  /**
20299
- * Order string. This is used to sort the crafting menu.
20466
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
20300
20467
  *
20301
20468
  * {@link https://lua-api.factorio.com/latest/LuaRecipePrototype.html#LuaRecipePrototype.order View documentation}
20302
20469
  */
@@ -20502,11 +20669,11 @@ interface LuaRendering {
20502
20669
  */
20503
20670
  readonly time_to_live?: uint
20504
20671
  /**
20505
- * The forces that this object is rendered to.
20672
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
20506
20673
  */
20507
20674
  readonly forces?: readonly ForceIdentification[]
20508
20675
  /**
20509
- * The players that this object is rendered to.
20676
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
20510
20677
  */
20511
20678
  readonly players?: readonly PlayerIdentification[]
20512
20679
  /**
@@ -20551,11 +20718,11 @@ interface LuaRendering {
20551
20718
  */
20552
20719
  readonly time_to_live?: uint
20553
20720
  /**
20554
- * The forces that this object is rendered to.
20721
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
20555
20722
  */
20556
20723
  readonly forces?: readonly ForceIdentification[]
20557
20724
  /**
20558
- * The players that this object is rendered to.
20725
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
20559
20726
  */
20560
20727
  readonly players?: readonly PlayerIdentification[]
20561
20728
  /**
@@ -20618,11 +20785,11 @@ interface LuaRendering {
20618
20785
  */
20619
20786
  readonly time_to_live?: uint
20620
20787
  /**
20621
- * The forces that this object is rendered to.
20788
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
20622
20789
  */
20623
20790
  readonly forces?: readonly ForceIdentification[]
20624
20791
  /**
20625
- * The players that this object is rendered to.
20792
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
20626
20793
  */
20627
20794
  readonly players?: readonly PlayerIdentification[]
20628
20795
  /**
@@ -20670,11 +20837,11 @@ interface LuaRendering {
20670
20837
  */
20671
20838
  readonly time_to_live?: uint
20672
20839
  /**
20673
- * The forces that this object is rendered to.
20840
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
20674
20841
  */
20675
20842
  readonly forces?: readonly ForceIdentification[]
20676
20843
  /**
20677
- * The players that this object is rendered to.
20844
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
20678
20845
  */
20679
20846
  readonly players?: readonly PlayerIdentification[]
20680
20847
  /**
@@ -20725,11 +20892,11 @@ interface LuaRendering {
20725
20892
  */
20726
20893
  readonly time_to_live?: uint
20727
20894
  /**
20728
- * The forces that this object is rendered to.
20895
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
20729
20896
  */
20730
20897
  readonly forces?: readonly ForceIdentification[]
20731
20898
  /**
20732
- * The players that this object is rendered to.
20899
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
20733
20900
  */
20734
20901
  readonly players?: readonly PlayerIdentification[]
20735
20902
  /**
@@ -20780,11 +20947,11 @@ interface LuaRendering {
20780
20947
  */
20781
20948
  readonly time_to_live?: uint
20782
20949
  /**
20783
- * The forces that this object is rendered to.
20950
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
20784
20951
  */
20785
20952
  readonly forces?: readonly ForceIdentification[]
20786
20953
  /**
20787
- * The players that this object is rendered to.
20954
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
20788
20955
  */
20789
20956
  readonly players?: readonly PlayerIdentification[]
20790
20957
  /**
@@ -20858,11 +21025,11 @@ interface LuaRendering {
20858
21025
  */
20859
21026
  readonly time_to_live?: uint
20860
21027
  /**
20861
- * The forces that this object is rendered to.
21028
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
20862
21029
  */
20863
21030
  readonly forces?: readonly ForceIdentification[]
20864
21031
  /**
20865
- * The players that this object is rendered to.
21032
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
20866
21033
  */
20867
21034
  readonly players?: readonly PlayerIdentification[]
20868
21035
  /**
@@ -20921,11 +21088,11 @@ interface LuaRendering {
20921
21088
  */
20922
21089
  readonly time_to_live?: uint
20923
21090
  /**
20924
- * The forces that this object is rendered to.
21091
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
20925
21092
  */
20926
21093
  readonly forces?: readonly ForceIdentification[]
20927
21094
  /**
20928
- * The players that this object is rendered to.
21095
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
20929
21096
  */
20930
21097
  readonly players?: readonly PlayerIdentification[]
20931
21098
  /**
@@ -20996,11 +21163,11 @@ interface LuaRendering {
20996
21163
  */
20997
21164
  readonly time_to_live?: uint
20998
21165
  /**
20999
- * The forces that this object is rendered to.
21166
+ * The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
21000
21167
  */
21001
21168
  readonly forces?: readonly ForceIdentification[]
21002
21169
  /**
21003
- * The players that this object is rendered to.
21170
+ * The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
21004
21171
  */
21005
21172
  readonly players?: readonly PlayerIdentification[]
21006
21173
  /**
@@ -21793,7 +21960,7 @@ interface LuaResourceCategoryPrototype {
21793
21960
  */
21794
21961
  readonly name: string
21795
21962
  /**
21796
- * Order string of this prototype.
21963
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
21797
21964
  *
21798
21965
  * {@link https://lua-api.factorio.com/latest/LuaResourceCategoryPrototype.html#LuaResourceCategoryPrototype.order View documentation}
21799
21966
  */
@@ -21907,7 +22074,7 @@ interface LuaShortcutPrototype {
21907
22074
  */
21908
22075
  readonly name: string
21909
22076
  /**
21910
- * Order string of this prototype.
22077
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
21911
22078
  *
21912
22079
  * {@link https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.order View documentation}
21913
22080
  */
@@ -22161,7 +22328,7 @@ interface LuaStyle {
22161
22328
  /**
22162
22329
  * Horizontal space between individual cells.
22163
22330
  *
22164
- * _Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlow_
22331
+ * _Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlowStyle_
22165
22332
  *
22166
22333
  * {@link https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.horizontal_spacing View documentation}
22167
22334
  */
@@ -22336,13 +22503,13 @@ interface LuaStyle {
22336
22503
  */
22337
22504
  set cell_padding(value: int)
22338
22505
  /**
22339
- * 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.
22506
+ * 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.
22340
22507
  *
22341
22508
  * {@link https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_padding_when_activated View documentation}
22342
22509
  */
22343
22510
  set extra_padding_when_activated(value: int | StyleValuesArray)
22344
22511
  /**
22345
- * 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.
22512
+ * 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.
22346
22513
  *
22347
22514
  * {@link https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_margin_when_activated View documentation}
22348
22515
  */
@@ -22551,7 +22718,7 @@ interface TableStyle extends BaseStyle {
22551
22718
  /**
22552
22719
  * Horizontal space between individual cells.
22553
22720
  *
22554
- * _Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlow_
22721
+ * _Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlowStyle_
22555
22722
  *
22556
22723
  * {@link https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.horizontal_spacing View documentation}
22557
22724
  */
@@ -22725,7 +22892,7 @@ interface FlowStyle extends BaseStyle {
22725
22892
  /**
22726
22893
  * Horizontal space between individual cells.
22727
22894
  *
22728
- * _Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlow_
22895
+ * _Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlowStyle_
22729
22896
  *
22730
22897
  * {@link https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.horizontal_spacing View documentation}
22731
22898
  */
@@ -22744,7 +22911,7 @@ interface HorizontalFlowStyle extends BaseStyle {
22744
22911
  /**
22745
22912
  * Horizontal space between individual cells.
22746
22913
  *
22747
- * _Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlow_
22914
+ * _Can only be used if this is LuaTableStyle, LuaFlowStyle or LuaHorizontalFlowStyle_
22748
22915
  *
22749
22916
  * {@link https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.horizontal_spacing View documentation}
22750
22917
  */
@@ -22848,13 +23015,13 @@ interface ScrollPaneStyle extends BaseStyle {
22848
23015
  */
22849
23016
  extra_right_margin_when_activated: int
22850
23017
  /**
22851
- * 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.
23018
+ * 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.
22852
23019
  *
22853
23020
  * {@link https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_padding_when_activated View documentation}
22854
23021
  */
22855
23022
  set extra_padding_when_activated(value: int | StyleValuesArray)
22856
23023
  /**
22857
- * 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.
23024
+ * 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.
22858
23025
  *
22859
23026
  * {@link https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.extra_margin_when_activated View documentation}
22860
23027
  */
@@ -22890,11 +23057,11 @@ interface BaseSurfaceCreateEntity {
22890
23057
  /**
22891
23058
  * Entity with health for the new entity to target.
22892
23059
  */
22893
- readonly target?: LuaEntity
23060
+ readonly target?: LuaEntity | MapPosition
22894
23061
  /**
22895
23062
  * Source entity. Used for beams and highlight-boxes.
22896
23063
  */
22897
- readonly source?: LuaEntity
23064
+ readonly source?: LuaEntity | MapPosition
22898
23065
  /**
22899
23066
  * If true, building will attempt to simulate fast-replace building.
22900
23067
  */
@@ -23099,7 +23266,7 @@ interface CharacterCorpseSurfaceCreateEntity extends BaseSurfaceCreateEntity {
23099
23266
 
23100
23267
  interface HighlightBoxSurfaceCreateEntity extends BaseSurfaceCreateEntity {
23101
23268
  /**
23102
- * 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.
23269
+ * 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.
23103
23270
  */
23104
23271
  readonly bounding_box?: BoundingBox
23105
23272
  /**
@@ -23268,7 +23435,10 @@ interface LuaSurface {
23268
23435
  *
23269
23436
  * 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.
23270
23437
  *
23271
- * 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.
23438
+ * - If no `area` or `position` are given, the entire surface is searched.
23439
+ * - If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box).
23440
+ * - If `position` and `radius` are given, this returns the entities within the radius of the position. Looks for the center of entities.
23441
+ * - If `area` is specified, this returns the entities colliding with that area.
23272
23442
  *
23273
23443
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_entities_filtered View documentation}
23274
23444
  * @example
@@ -23288,9 +23458,6 @@ interface LuaSurface {
23288
23458
  * Has precedence over area field.
23289
23459
  */
23290
23460
  readonly position?: MapPosition
23291
- /**
23292
- * If given with position, will return all entities within the radius of the position.
23293
- */
23294
23461
  readonly radius?: double
23295
23462
  readonly name?: string | readonly string[]
23296
23463
  readonly type?: string | readonly string[]
@@ -23304,7 +23471,7 @@ interface LuaSurface {
23304
23471
  readonly limit?: uint
23305
23472
  readonly is_military_target?: boolean
23306
23473
  /**
23307
- * If the filters should be inverted.
23474
+ * Whether the filters should be inverted.
23308
23475
  */
23309
23476
  readonly invert?: boolean
23310
23477
  }): LuaEntity[]
@@ -23328,9 +23495,22 @@ interface LuaSurface {
23328
23495
  */
23329
23496
  readonly radius?: double
23330
23497
  readonly name?: string | readonly string[]
23498
+ readonly force?: ForceIdentification | readonly ForceIdentification[]
23331
23499
  readonly limit?: uint
23332
23500
  readonly has_hidden_tile?: boolean
23501
+ /**
23502
+ * Can be further filtered by supplying a `force` filter.
23503
+ */
23504
+ readonly has_tile_ghost?: boolean
23505
+ /**
23506
+ * Can be further filtered by supplying a `force` filter.
23507
+ */
23508
+ readonly to_be_deconstructed?: boolean
23333
23509
  readonly collision_mask?: CollisionMaskLayer | readonly CollisionMaskLayer[]
23510
+ /**
23511
+ * Whether the filters should be inverted.
23512
+ */
23513
+ readonly invert?: boolean
23334
23514
  }): LuaTile[]
23335
23515
  /**
23336
23516
  * 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.
@@ -23358,7 +23538,7 @@ interface LuaSurface {
23358
23538
  readonly limit?: uint
23359
23539
  readonly is_military_target?: boolean
23360
23540
  /**
23361
- * If the filters should be inverted.
23541
+ * Whether the filters should be inverted.
23362
23542
  */
23363
23543
  readonly invert?: boolean
23364
23544
  }): uint
@@ -23380,9 +23560,22 @@ interface LuaSurface {
23380
23560
  */
23381
23561
  readonly radius?: double
23382
23562
  readonly name?: string | readonly string[]
23563
+ readonly force?: ForceIdentification | readonly ForceIdentification[]
23383
23564
  readonly limit?: uint
23384
23565
  readonly has_hidden_tile?: boolean
23566
+ /**
23567
+ * Can be further filtered by supplying a `force` filter.
23568
+ */
23569
+ readonly has_tile_ghost?: boolean
23570
+ /**
23571
+ * Can be further filtered by supplying a `force` filter.
23572
+ */
23573
+ readonly to_be_deconstructed?: boolean
23385
23574
  readonly collision_mask?: CollisionMaskLayer | readonly CollisionMaskLayer[]
23575
+ /**
23576
+ * If the filters should be inverted.
23577
+ */
23578
+ readonly invert?: boolean
23386
23579
  }): uint
23387
23580
  /**
23388
23581
  * Find a non-colliding position within a given radius.
@@ -23931,6 +24124,13 @@ interface LuaSurface {
23931
24124
  readonly area?: BoundingBox
23932
24125
  readonly position?: TilePosition
23933
24126
  readonly name?: string | readonly string[] | LuaDecorativePrototype | readonly LuaDecorativePrototype[]
24127
+ readonly collision_mask?: CollisionMaskLayer | readonly CollisionMaskLayer[]
24128
+ readonly from_layer?: string
24129
+ readonly to_layer?: string
24130
+ /**
24131
+ * Soft decoratives can be drawn over rails.
24132
+ */
24133
+ readonly exclude_soft?: boolean
23934
24134
  readonly limit?: uint
23935
24135
  /**
23936
24136
  * If the filters should be inverted.
@@ -23967,6 +24167,13 @@ interface LuaSurface {
23967
24167
  readonly area?: BoundingBox
23968
24168
  readonly position?: TilePosition
23969
24169
  readonly name?: string | readonly string[] | LuaDecorativePrototype | readonly LuaDecorativePrototype[]
24170
+ readonly collision_mask?: CollisionMaskLayer | readonly CollisionMaskLayer[]
24171
+ readonly from_layer?: string
24172
+ readonly to_layer?: string
24173
+ /**
24174
+ * Soft decoratives can be drawn over rails.
24175
+ */
24176
+ readonly exclude_soft?: boolean
23970
24177
  readonly limit?: uint
23971
24178
  /**
23972
24179
  * If the filters should be inverted.
@@ -24597,7 +24804,7 @@ interface LuaTechnology {
24597
24804
  */
24598
24805
  readonly research_unit_energy: double
24599
24806
  /**
24600
- * Order string for this prototype.
24807
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
24601
24808
  *
24602
24809
  * {@link https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.order View documentation}
24603
24810
  */
@@ -24711,7 +24918,7 @@ interface LuaTechnologyPrototype {
24711
24918
  */
24712
24919
  readonly research_unit_energy: double
24713
24920
  /**
24714
- * Order string for this prototype.
24921
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
24715
24922
  *
24716
24923
  * {@link https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.order View documentation}
24717
24924
  */
@@ -24770,8 +24977,9 @@ interface LuaTile {
24770
24977
  * Is this tile marked for deconstruction?
24771
24978
  *
24772
24979
  * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.to_be_deconstructed View documentation}
24980
+ * @param force The force who did the deconstruction order.
24773
24981
  */
24774
- to_be_deconstructed(): boolean
24982
+ to_be_deconstructed(force?: ForceIdentification): boolean
24775
24983
  /**
24776
24984
  * Orders deconstruction of this tile by the given force.
24777
24985
  *
@@ -24797,6 +25005,20 @@ interface LuaTile {
24797
25005
  * @param player The player to set the last_user to if any.
24798
25006
  */
24799
25007
  cancel_deconstruction(force: ForceIdentification, player?: PlayerIdentification): void
25008
+ /**
25009
+ * Does this tile have any tile ghosts on it.
25010
+ *
25011
+ * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.has_tile_ghost View documentation}
25012
+ * @param force Check for tile ghosts of this force.
25013
+ */
25014
+ has_tile_ghost(force?: ForceIdentification): boolean
25015
+ /**
25016
+ * Gets all tile ghosts on this tile.
25017
+ *
25018
+ * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.get_tile_ghosts View documentation}
25019
+ * @param force Get tile ghosts of this force.
25020
+ */
25021
+ get_tile_ghosts(force?: ForceIdentification): LuaTile[]
24800
25022
  /**
24801
25023
  * Prototype name of this tile. E.g. `"sand-3"` or `"grass-2"`.
24802
25024
  *
@@ -24850,7 +25072,7 @@ interface LuaTilePrototype {
24850
25072
  */
24851
25073
  readonly name: string
24852
25074
  /**
24853
- * Order string of this prototype.
25075
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
24854
25076
  *
24855
25077
  * {@link https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.order View documentation}
24856
25078
  */
@@ -24896,11 +25118,11 @@ interface LuaTilePrototype {
24896
25118
  /**
24897
25119
  * Energy required to mine a tile.
24898
25120
  */
24899
- readonly miningtime: double
25121
+ readonly mining_time: double
24900
25122
  /**
24901
25123
  * Prototype name of the particle produced when mining this tile. Will only be present if this tile produces any particle during mining.
24902
25124
  */
24903
- readonly miningparticle?: string
25125
+ readonly mining_particle?: string
24904
25126
  /**
24905
25127
  * Products obtained by mining this tile.
24906
25128
  */
@@ -24913,11 +25135,11 @@ interface LuaTilePrototype {
24913
25135
  */
24914
25136
  readonly next_direction: LuaTilePrototype | undefined
24915
25137
  /**
24916
- * Items that when placed will produce this tile. It is a dictionary indexed by the item prototype name.
25138
+ * 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.
24917
25139
  *
24918
25140
  * {@link https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.items_to_place_this View documentation}
24919
25141
  */
24920
- readonly items_to_place_this: SimpleItemStack[]
25142
+ readonly items_to_place_this: SimpleItemStack[] | undefined
24921
25143
  /**
24922
25144
  * False if this tile is not allowed in blueprints regardless of the ability to build it.
24923
25145
  *
@@ -25465,7 +25687,7 @@ interface LuaTrivialSmokePrototype {
25465
25687
  */
25466
25688
  readonly name: string
25467
25689
  /**
25468
- * Order string of this prototype.
25690
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
25469
25691
  *
25470
25692
  * {@link https://lua-api.factorio.com/latest/LuaTrivialSmokePrototype.html#LuaTrivialSmokePrototype.order View documentation}
25471
25693
  */
@@ -25626,7 +25848,7 @@ interface LuaVirtualSignalPrototype {
25626
25848
  */
25627
25849
  readonly name: string
25628
25850
  /**
25629
- * Order string of this prototype.
25851
+ * The string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
25630
25852
  *
25631
25853
  * {@link https://lua-api.factorio.com/latest/LuaVirtualSignalPrototype.html#LuaVirtualSignalPrototype.order View documentation}
25632
25854
  */