typed-factorio 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
package/Changelog.md CHANGED
@@ -1,6 +1,18 @@
1
+ # v1.4.0
2
+
3
+ - Improve doc comments for enum concepts
4
+ - Improve doc comment formatting
5
+ - Improve types of concepts with literal union types
6
+ - Add read-specific types to AutoplaceControl and ComparatorString
7
+
8
+ # v1.3.2
9
+
10
+ - Move "notes" comment into the main body of doc comment, instead of in @remarks. This works around #13.
11
+ - Add manually defined overload for LuaControl::teleport().
12
+
1
13
  # v1.3.1
2
14
 
3
- - Use @linkplain instead of @link for web links. This works around issue #13
15
+ - Use @linkplain instead of @link for web links. This hopefully works around issue #13
4
16
 
5
17
  # v1.3.0
6
18
 
@@ -403,7 +403,6 @@ interface LuaBootstrap {
403
403
  * **Raised events:**
404
404
  * - {@link OnConsoleChatEvent on_console_chat} _instantly_ Raised with the provided arguments.
405
405
  *
406
- *
407
406
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_console_chat View documentation}
408
407
  */
409
408
  raise_console_chat(params: {
@@ -420,7 +419,6 @@ interface LuaBootstrap {
420
419
  * **Raised events:**
421
420
  * - {@link OnPlayerCraftedItemEvent on_player_crafted_item} _instantly_ Raised with the provided arguments.
422
421
  *
423
- *
424
422
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_crafted_item View documentation}
425
423
  */
426
424
  raise_player_crafted_item(params: {
@@ -441,7 +439,6 @@ interface LuaBootstrap {
441
439
  * **Raised events:**
442
440
  * - {@link OnPlayerFastTransferredEvent on_player_fast_transferred} _instantly_ Raised with the provided arguments.
443
441
  *
444
- *
445
442
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_fast_transferred View documentation}
446
443
  */
447
444
  raise_player_fast_transferred(params: {
@@ -462,7 +459,6 @@ interface LuaBootstrap {
462
459
  * **Raised events:**
463
460
  * - {@link OnBiterBaseBuiltEvent on_biter_base_built} _instantly_ Raised with the provided arguments.
464
461
  *
465
- *
466
462
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_biter_base_built View documentation}
467
463
  */
468
464
  raise_biter_base_built(params: {
@@ -475,7 +471,6 @@ interface LuaBootstrap {
475
471
  * **Raised events:**
476
472
  * - {@link OnMarketItemPurchasedEvent on_market_item_purchased} _instantly_ Raised with the provided arguments.
477
473
  *
478
- *
479
474
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_market_item_purchased View documentation}
480
475
  */
481
476
  raise_market_item_purchased(params: {
@@ -500,7 +495,6 @@ interface LuaBootstrap {
500
495
  * **Raised events:**
501
496
  * - {@link ScriptRaisedBuiltEvent script_raised_built} _instantly_ Raised with the provided arguments.
502
497
  *
503
- *
504
498
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_built View documentation}
505
499
  */
506
500
  raise_script_built(params: {
@@ -513,7 +507,6 @@ interface LuaBootstrap {
513
507
  * **Raised events:**
514
508
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy} _instantly_ Raised with the provided arguments.
515
509
  *
516
- *
517
510
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_destroy View documentation}
518
511
  */
519
512
  raise_script_destroy(params: {
@@ -526,7 +519,6 @@ interface LuaBootstrap {
526
519
  * **Raised events:**
527
520
  * - {@link ScriptRaisedReviveEvent script_raised_revive} _instantly_ Raised with the provided arguments.
528
521
  *
529
- *
530
522
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_revive View documentation}
531
523
  */
532
524
  raise_script_revive(params: {
@@ -543,7 +535,6 @@ interface LuaBootstrap {
543
535
  * **Raised events:**
544
536
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles} _instantly_ Raised with the provided arguments.
545
537
  *
546
- *
547
538
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_set_tiles View documentation}
548
539
  */
549
540
  raise_script_set_tiles(params: {
@@ -1179,7 +1170,6 @@ interface LuaControl {
1179
1170
  * **Raised events:**
1180
1171
  * - {@link OnSelectedEntityChangedEvent on_selected_entity_changed}? _instantly_ Raised if there is an entity at the given position to select.
1181
1172
  *
1182
- *
1183
1173
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.update_selected_entity View documentation}
1184
1174
  * @param position Position of the entity to select.
1185
1175
  */
@@ -1190,7 +1180,6 @@ interface LuaControl {
1190
1180
  * **Raised events:**
1191
1181
  * - {@link OnSelectedEntityChangedEvent on_selected_entity_changed}? _instantly_ Raised if there is a currently selected entity.
1192
1182
  *
1193
- *
1194
1183
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_selected_entity View documentation}
1195
1184
  */
1196
1185
  clear_selected_entity(): void
@@ -1227,7 +1216,6 @@ interface LuaControl {
1227
1216
  * - {@link OnPrePlayerCraftedItemEvent on_pre_player_crafted_item}? _instantly_ Raised if crafting was able to be started.
1228
1217
  * - {@link OnPlayerMainInventoryChangedEvent on_player_main_inventory_changed}? _current_tick_ Raised if crafting was able to be started.
1229
1218
  *
1230
- *
1231
1219
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.begin_crafting View documentation}
1232
1220
  * @returns The count that was actually started crafting.
1233
1221
  */
@@ -1252,7 +1240,6 @@ interface LuaControl {
1252
1240
  * - {@link OnPlayerCancelledCraftingEvent on_player_cancelled_crafting}? _instantly_ Raised if crafting was able to be cancelled.
1253
1241
  * - {@link OnPlayerMainInventoryChangedEvent on_player_main_inventory_changed}? _current_tick_ Raised if crafting was able to be cancelled.
1254
1242
  *
1255
- *
1256
1243
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cancel_crafting View documentation}
1257
1244
  */
1258
1245
  cancel_crafting(params: {
@@ -1273,7 +1260,6 @@ interface LuaControl {
1273
1260
  * - {@link OnPlayerMinedEntityEvent on_player_mined_entity}? _instantly_ Raised if mining is successful.
1274
1261
  * - {@link OnPlayerMinedItemEvent on_player_mined_item}? _instantly_ Raised if mining is successful.
1275
1262
  *
1276
- *
1277
1263
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mine_entity View documentation}
1278
1264
  * @param entity The entity to mine
1279
1265
  * @param force Forces mining the entity even if the items can't fit in the player.
@@ -1287,7 +1273,6 @@ interface LuaControl {
1287
1273
  * - {@link OnPlayerMinedItemEvent on_player_mined_item}? _instantly_ Raised if mining is successful.
1288
1274
  * - {@link OnPlayerMinedTileEvent on_player_mined_tile}? _instantly_ Raised if mining is successful.
1289
1275
  *
1290
- *
1291
1276
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mine_tile View documentation}
1292
1277
  * @param tile The tile to mine.
1293
1278
  * @returns Whether the mining succeeded.
@@ -1328,7 +1313,6 @@ interface LuaControl {
1328
1313
  * **Raised events:**
1329
1314
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if setting of logistic slot was successful.
1330
1315
  *
1331
- *
1332
1316
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_vehicle_logistic_slot View documentation}
1333
1317
  * @param slot_index The slot to set.
1334
1318
  * @param value The logistic request parameters.
@@ -1427,7 +1411,6 @@ interface LuaControl {
1427
1411
  * **Raised events:**
1428
1412
  * - {@link OnSelectedEntityChangedEvent on_selected_entity_changed}? _instantly_ Raised when a selectable entity is written to this attribute.
1429
1413
  *
1430
- *
1431
1414
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.selected View documentation}
1432
1415
  */
1433
1416
  selected: LuaEntity | undefined
@@ -1608,7 +1591,6 @@ interface LuaControl {
1608
1591
  * **Raised events:**
1609
1592
  * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_ Raised if the driving state successfully changed.
1610
1593
  *
1611
- *
1612
1594
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.driving View documentation}
1613
1595
  */
1614
1596
  driving: boolean
@@ -2144,7 +2126,8 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
2144
2126
  *
2145
2127
  * {@link https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html#LuaDeciderCombinatorControlBehavior.parameters View documentation}
2146
2128
  */
2147
- parameters: DeciderCombinatorParameters
2129
+ get parameters(): DeciderCombinatorParametersRead
2130
+ set parameters(value: DeciderCombinatorParameters)
2148
2131
  /**
2149
2132
  * 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.
2150
2133
  */
@@ -2355,7 +2338,6 @@ interface LuaEntity extends LuaControl {
2355
2338
  * - {@link OnEntityDiedEvent on_entity_died}? _instantly_ Raised if the entity was successfully killed. If `force` is not specified, the event will blame the `"neutral"` force.
2356
2339
  * - {@link OnPostEntityDiedEvent on_post_entity_died}? _instantly_ Raised if the entity was successfully killed.
2357
2340
  *
2358
- *
2359
2341
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.die View documentation}
2360
2342
  * @param force The force to attribute the kill to.
2361
2343
  * @param cause The cause to attribute the kill to.
@@ -2466,7 +2448,6 @@ interface LuaEntity extends LuaControl {
2466
2448
  * **Raised events:**
2467
2449
  * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the entity way successfully marked for deconstruction.
2468
2450
  *
2469
- *
2470
2451
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_deconstruction View documentation}
2471
2452
  * @param force The force whose robots are supposed to do the deconstruction.
2472
2453
  * @param player The player to set the `last_user` to if any.
@@ -2479,7 +2460,6 @@ interface LuaEntity extends LuaControl {
2479
2460
  * **Raised events:**
2480
2461
  * - {@link OnCancelledDeconstructionEvent on_cancelled_deconstruction}? _instantly_ Raised if the entity's deconstruction was successfully cancelled.
2481
2462
  *
2482
- *
2483
2463
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_deconstruction View documentation}
2484
2464
  * @param force The force who did the deconstruction order.
2485
2465
  * @param player The player to set the `last_user` to if any.
@@ -2497,7 +2477,6 @@ interface LuaEntity extends LuaControl {
2497
2477
  * **Raised events:**
2498
2478
  * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised if the entity way successfully marked for upgrade.
2499
2479
  *
2500
- *
2501
2480
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade View documentation}
2502
2481
  * @returns Whether the entity was marked for upgrade.
2503
2482
  */
@@ -2522,7 +2501,6 @@ interface LuaEntity extends LuaControl {
2522
2501
  * **Raised events:**
2523
2502
  * - {@link OnCancelledUpgradeEvent on_cancelled_upgrade}? _instantly_ Raised if the entity way previously marked for upgrade.
2524
2503
  *
2525
- *
2526
2504
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_upgrade View documentation}
2527
2505
  * @param force The force who did the upgrade order.
2528
2506
  * @param player The player to set the last_user to if any.
@@ -2656,7 +2634,6 @@ interface LuaEntity extends LuaControl {
2656
2634
  * - {@link ScriptRaisedReviveEvent script_raised_revive}? _instantly_ Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.
2657
2635
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.
2658
2636
  *
2659
- *
2660
2637
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive View documentation}
2661
2638
  * @returns Any items the new real entity collided with or `nil` if the ghost could not be revived.
2662
2639
  * @returns The revived entity if an entity ghost was successfully revived.
@@ -2679,7 +2656,6 @@ interface LuaEntity extends LuaControl {
2679
2656
  * - {@link ScriptRaisedReviveEvent script_raised_revive}? _instantly_ Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.
2680
2657
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.
2681
2658
  *
2682
- *
2683
2659
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.silent_revive View documentation}
2684
2660
  * @returns Any items the new real entity collided with or `nil` if the ghost could not be revived.
2685
2661
  * @returns The revived entity if an entity ghost was successfully revived.
@@ -2964,7 +2940,6 @@ interface LuaEntity extends LuaControl {
2964
2940
  * **Raised events:**
2965
2941
  * - {@link OnPlayerRotatedEntityEvent on_player_rotated_entity}? _instantly_ Raised if the `by_player` argument was given and the rotation was successful.
2966
2942
  *
2967
- *
2968
2943
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate View documentation}
2969
2944
  * @returns Whether the rotation was successful.
2970
2945
  * @returns Count of spilled items indexed by their prototype names if `spill_items` was `true`.
@@ -3072,7 +3047,6 @@ interface LuaEntity extends LuaControl {
3072
3047
  * **Raised events:**
3073
3048
  * - {@link OnEntityClonedEvent on_entity_cloned}? _instantly_ Raised if the entity was successfully cloned.
3074
3049
  *
3075
- *
3076
3050
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone View documentation}
3077
3051
  * @returns The cloned entity or `nil` if this entity can't be cloned/can't be cloned to the given location.
3078
3052
  */
@@ -4796,7 +4770,6 @@ interface BaseEntity extends LuaControl {
4796
4770
  * - {@link OnEntityDiedEvent on_entity_died}? _instantly_ Raised if the entity was successfully killed. If `force` is not specified, the event will blame the `"neutral"` force.
4797
4771
  * - {@link OnPostEntityDiedEvent on_post_entity_died}? _instantly_ Raised if the entity was successfully killed.
4798
4772
  *
4799
- *
4800
4773
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.die View documentation}
4801
4774
  * @param force The force to attribute the kill to.
4802
4775
  * @param cause The cause to attribute the kill to.
@@ -4849,7 +4822,6 @@ interface BaseEntity extends LuaControl {
4849
4822
  * **Raised events:**
4850
4823
  * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the entity way successfully marked for deconstruction.
4851
4824
  *
4852
- *
4853
4825
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_deconstruction View documentation}
4854
4826
  * @param force The force whose robots are supposed to do the deconstruction.
4855
4827
  * @param player The player to set the `last_user` to if any.
@@ -4862,7 +4834,6 @@ interface BaseEntity extends LuaControl {
4862
4834
  * **Raised events:**
4863
4835
  * - {@link OnCancelledDeconstructionEvent on_cancelled_deconstruction}? _instantly_ Raised if the entity's deconstruction was successfully cancelled.
4864
4836
  *
4865
- *
4866
4837
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_deconstruction View documentation}
4867
4838
  * @param force The force who did the deconstruction order.
4868
4839
  * @param player The player to set the `last_user` to if any.
@@ -4880,7 +4851,6 @@ interface BaseEntity extends LuaControl {
4880
4851
  * **Raised events:**
4881
4852
  * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised if the entity way successfully marked for upgrade.
4882
4853
  *
4883
- *
4884
4854
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade View documentation}
4885
4855
  * @returns Whether the entity was marked for upgrade.
4886
4856
  */
@@ -4905,7 +4875,6 @@ interface BaseEntity extends LuaControl {
4905
4875
  * **Raised events:**
4906
4876
  * - {@link OnCancelledUpgradeEvent on_cancelled_upgrade}? _instantly_ Raised if the entity way previously marked for upgrade.
4907
4877
  *
4908
- *
4909
4878
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_upgrade View documentation}
4910
4879
  * @param force The force who did the upgrade order.
4911
4880
  * @param player The player to set the last_user to if any.
@@ -4961,7 +4930,6 @@ interface BaseEntity extends LuaControl {
4961
4930
  * - {@link ScriptRaisedReviveEvent script_raised_revive}? _instantly_ Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.
4962
4931
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.
4963
4932
  *
4964
- *
4965
4933
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive View documentation}
4966
4934
  * @returns Any items the new real entity collided with or `nil` if the ghost could not be revived.
4967
4935
  * @returns The revived entity if an entity ghost was successfully revived.
@@ -4984,7 +4952,6 @@ interface BaseEntity extends LuaControl {
4984
4952
  * - {@link ScriptRaisedReviveEvent script_raised_revive}? _instantly_ Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.
4985
4953
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.
4986
4954
  *
4987
- *
4988
4955
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.silent_revive View documentation}
4989
4956
  * @returns Any items the new real entity collided with or `nil` if the ghost could not be revived.
4990
4957
  * @returns The revived entity if an entity ghost was successfully revived.
@@ -5118,7 +5085,6 @@ interface BaseEntity extends LuaControl {
5118
5085
  * **Raised events:**
5119
5086
  * - {@link OnPlayerRotatedEntityEvent on_player_rotated_entity}? _instantly_ Raised if the `by_player` argument was given and the rotation was successful.
5120
5087
  *
5121
- *
5122
5088
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate View documentation}
5123
5089
  * @returns Whether the rotation was successful.
5124
5090
  * @returns Count of spilled items indexed by their prototype names if `spill_items` was `true`.
@@ -5157,7 +5123,6 @@ interface BaseEntity extends LuaControl {
5157
5123
  * **Raised events:**
5158
5124
  * - {@link OnEntityClonedEvent on_entity_cloned}? _instantly_ Raised if the entity was successfully cloned.
5159
5125
  *
5160
- *
5161
5126
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone View documentation}
5162
5127
  * @returns The cloned entity or `nil` if this entity can't be cloned/can't be cloned to the given location.
5163
5128
  */
@@ -11473,7 +11438,6 @@ interface LuaForce {
11473
11438
  * **Raised events:**
11474
11439
  * - {@link OnResearchFinishedEvent on_research_finished} _instantly_
11475
11440
  *
11476
- *
11477
11441
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_all_technologies View documentation}
11478
11442
  * @param include_disabled_prototypes Whether technologies that are explicitly disabled in the prototype should also be researched. Defaults to `false`.
11479
11443
  */
@@ -11490,7 +11454,6 @@ interface LuaForce {
11490
11454
  * **Raised events:**
11491
11455
  * - {@link OnForceResetEvent on_force_reset} _instantly_
11492
11456
  *
11493
- *
11494
11457
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset View documentation}
11495
11458
  */
11496
11459
  reset(): void
@@ -11500,7 +11463,6 @@ interface LuaForce {
11500
11463
  * **Raised events:**
11501
11464
  * - {@link OnTechnologyEffectsResetEvent on_technology_effects_reset} _instantly_
11502
11465
  *
11503
- *
11504
11466
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_technology_effects View documentation}
11505
11467
  */
11506
11468
  reset_technology_effects(): void
@@ -11603,7 +11565,6 @@ interface LuaForce {
11603
11565
  * **Raised events:**
11604
11566
  * - {@link OnForceCeaseFireChangedEvent on_force_cease_fire_changed} _instantly_
11605
11567
  *
11606
- *
11607
11568
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_cease_fire View documentation}
11608
11569
  */
11609
11570
  set_cease_fire(other: ForceIdentification, cease_fire: boolean): void
@@ -11619,7 +11580,6 @@ interface LuaForce {
11619
11580
  * **Raised events:**
11620
11581
  * - {@link OnForceFriendsChangedEvent on_force_friends_changed} _instantly_
11621
11582
  *
11622
- *
11623
11583
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_friend View documentation}
11624
11584
  */
11625
11585
  set_friend(other: ForceIdentification, friend: boolean): void
@@ -11796,7 +11756,6 @@ interface LuaForce {
11796
11756
  * **Raised events:**
11797
11757
  * - {@link OnResearchStartedEvent on_research_started}? _instantly_ Raised if the technology was successfully added.
11798
11758
  *
11799
- *
11800
11759
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.add_research View documentation}
11801
11760
  * @returns Whether the technology was successfully added.
11802
11761
  */
@@ -12441,7 +12400,6 @@ interface LuaGameScript {
12441
12400
  * - {@link OnPrePlayerRemovedEvent on_pre_player_removed} _instantly_
12442
12401
  * - {@link OnPlayerRemovedEvent on_player_removed} _instantly_
12443
12402
  *
12444
- *
12445
12403
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.remove_offline_players View documentation}
12446
12404
  * @param players List of players to remove. If not specified, remove all offline players.
12447
12405
  */
@@ -12524,7 +12482,6 @@ interface LuaGameScript {
12524
12482
  * - {@link OnPreSurfaceDeletedEvent on_pre_surface_deleted} _future_tick_
12525
12483
  * - {@link OnSurfaceDeletedEvent on_surface_deleted} _future_tick_
12526
12484
  *
12527
- *
12528
12485
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.delete_surface View documentation}
12529
12486
  * @param surface The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted.
12530
12487
  */
@@ -12621,7 +12578,6 @@ interface LuaGameScript {
12621
12578
  * - {@link OnPlayerKickedEvent on_player_kicked} _instantly_
12622
12579
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12623
12580
  *
12624
- *
12625
12581
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.kick_player View documentation}
12626
12582
  * @param player The player to kick.
12627
12583
  * @param reason The reason given if any.
@@ -12634,7 +12590,6 @@ interface LuaGameScript {
12634
12590
  * - {@link OnPlayerBannedEvent on_player_banned} _instantly_
12635
12591
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12636
12592
  *
12637
- *
12638
12593
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.ban_player View documentation}
12639
12594
  * @param player The player to ban.
12640
12595
  * @param reason The reason given if any.
@@ -12647,7 +12602,6 @@ interface LuaGameScript {
12647
12602
  * - {@link OnPlayerUnbannedEvent on_player_unbanned} _instantly_
12648
12603
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12649
12604
  *
12650
- *
12651
12605
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.unban_player View documentation}
12652
12606
  * @param player The player to unban.
12653
12607
  */
@@ -12658,7 +12612,6 @@ interface LuaGameScript {
12658
12612
  * **Raised events:**
12659
12613
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12660
12614
  *
12661
- *
12662
12615
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.purge_player View documentation}
12663
12616
  * @param player The player to purge.
12664
12617
  */
@@ -12670,7 +12623,6 @@ interface LuaGameScript {
12670
12623
  * - {@link OnPlayerMutedEvent on_player_muted} _instantly_
12671
12624
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12672
12625
  *
12673
- *
12674
12626
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.mute_player View documentation}
12675
12627
  * @param player The player to mute.
12676
12628
  */
@@ -12682,7 +12634,6 @@ interface LuaGameScript {
12682
12634
  * - {@link OnPlayerUnmutedEvent on_player_unmuted} _instantly_
12683
12635
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12684
12636
  *
12685
- *
12686
12637
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.unmute_player View documentation}
12687
12638
  * @param player The player to unmute.
12688
12639
  */
@@ -13343,7 +13294,8 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
13343
13294
  * constant=4}}
13344
13295
  * ```
13345
13296
  */
13346
- circuit_condition: CircuitConditionDefinition
13297
+ get circuit_condition(): CircuitConditionDefinitionRead
13298
+ set circuit_condition(value: CircuitConditionDefinition)
13347
13299
  /**
13348
13300
  * The logistic condition.
13349
13301
  *
@@ -13360,7 +13312,8 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
13360
13312
  * constant=4}}
13361
13313
  * ```
13362
13314
  */
13363
- logistic_condition: CircuitConditionDefinition
13315
+ get logistic_condition(): CircuitConditionDefinitionRead
13316
+ set logistic_condition(value: CircuitConditionDefinition)
13364
13317
  /**
13365
13318
  * `true` if this should connect to the logistic network.
13366
13319
  *
@@ -19934,7 +19887,6 @@ interface LuaPlayer extends LuaControl {
19934
19887
  * **Raised events:**
19935
19888
  * - {@link OnPlayerCursorStackChangedEvent on_player_cursor_stack_changed}? _current_tick_ Raised when the cursor was successfully cleared.
19936
19889
  *
19937
- *
19938
19890
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.clear_cursor View documentation}
19939
19891
  * @returns Whether the cursor is now empty.
19940
19892
  */
@@ -20037,7 +19989,6 @@ interface LuaPlayer extends LuaControl {
20037
19989
  * **Raised events:**
20038
19990
  * - {@link OnPlayerPipetteEvent on_player_pipette}? _instantly_ Raised if the entity was successfully pipetted.
20039
19991
  *
20040
- *
20041
19992
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.pipette_entity View documentation}
20042
19993
  * @returns Whether the smart pipette found something to place.
20043
19994
  */
@@ -20068,7 +20019,6 @@ interface LuaPlayer extends LuaControl {
20068
20019
  * - {@link OnPreBuildEvent on_pre_build}? _instantly_ Raised if the cursor was successfully built.
20069
20020
  * - {@link OnBuiltEntityEvent on_built_entity}? _instantly_ Raised if the cursor was successfully built.
20070
20021
  *
20071
- *
20072
20022
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor View documentation}
20073
20023
  */
20074
20024
  can_build_from_cursor(params: {
@@ -20341,7 +20291,6 @@ interface LuaPlayer extends LuaControl {
20341
20291
  * - {@link OnPrePlayerToggledMapEditorEvent on_pre_player_toggled_map_editor}? _instantly_ Raised if the map editor was successfully toggled.
20342
20292
  * - {@link OnPlayerToggledMapEditorEvent on_player_toggled_map_editor}? _instantly_ Raised if the map editor was successfully toggled.
20343
20293
  *
20344
- *
20345
20294
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.toggle_map_editor View documentation}
20346
20295
  */
20347
20296
  toggle_map_editor(): void
@@ -20733,7 +20682,8 @@ interface LuaProfiler {
20733
20682
  */
20734
20683
  interface LuaProgrammableSpeakerControlBehavior extends LuaControlBehavior {
20735
20684
  circuit_parameters: ProgrammableSpeakerCircuitParameters
20736
- circuit_condition: CircuitConditionDefinition
20685
+ get circuit_condition(): CircuitConditionDefinitionRead
20686
+ set circuit_condition(value: CircuitConditionDefinition)
20737
20687
  /**
20738
20688
  * 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.
20739
20689
  */
@@ -20870,7 +20820,8 @@ interface LuaRailSignalControlBehavior extends LuaControlBehavior {
20870
20820
  *
20871
20821
  * {@link https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.circuit_condition View documentation}
20872
20822
  */
20873
- circuit_condition: CircuitConditionDefinition
20823
+ get circuit_condition(): CircuitConditionDefinitionRead
20824
+ set circuit_condition(value: CircuitConditionDefinition)
20874
20825
  /**
20875
20826
  * 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.
20876
20827
  */
@@ -24494,7 +24445,6 @@ interface LuaSurface {
24494
24445
  * **Raised events:**
24495
24446
  * - {@link ScriptRaisedBuiltEvent script_raised_built}? _instantly_ Raised if the `raise_built` flag was set and the entity was successfully created.
24496
24447
  *
24497
- *
24498
24448
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity View documentation}
24499
24449
  * @returns The created entity or `nil` if the creation failed.
24500
24450
  * @example
@@ -24569,7 +24519,6 @@ interface LuaSurface {
24569
24519
  * **Raised events:**
24570
24520
  * - {@link OnUnitGroupCreatedEvent on_unit_group_created} _instantly_
24571
24521
  *
24572
- *
24573
24522
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_unit_group View documentation}
24574
24523
  */
24575
24524
  create_unit_group(params: {
@@ -24694,7 +24643,6 @@ interface LuaSurface {
24694
24643
  * **Raised events:**
24695
24644
  * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised for every entity that has been successfully marked for deconstruction.
24696
24645
  *
24697
- *
24698
24646
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area View documentation}
24699
24647
  */
24700
24648
  deconstruct_area(params: {
@@ -24725,7 +24673,6 @@ interface LuaSurface {
24725
24673
  * **Raised events:**
24726
24674
  * - {@link OnCancelledDeconstructionEvent on_cancelled_deconstruction}? _instantly_ Raised for every entity whose deconstruction has been successfully cancelled.
24727
24675
  *
24728
- *
24729
24676
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area View documentation}
24730
24677
  */
24731
24678
  cancel_deconstruct_area(params: {
@@ -24756,7 +24703,6 @@ interface LuaSurface {
24756
24703
  * **Raised events:**
24757
24704
  * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised for every entity that has been successfully marked for upgrade.
24758
24705
  *
24759
- *
24760
24706
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area View documentation}
24761
24707
  */
24762
24708
  upgrade_area(params: {
@@ -24787,7 +24733,6 @@ interface LuaSurface {
24787
24733
  * **Raised events:**
24788
24734
  * - {@link OnCancelledUpgradeEvent on_cancelled_upgrade}? _instantly_ Raised for every entity whose upgrade has been successfully cancelled.
24789
24735
  *
24790
- *
24791
24736
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area View documentation}
24792
24737
  */
24793
24738
  cancel_upgrade_area(params: {
@@ -24846,7 +24791,6 @@ interface LuaSurface {
24846
24791
  * - {@link OnPreChunkDeletedEvent on_pre_chunk_deleted} _future_tick_
24847
24792
  * - {@link OnChunkDeletedEvent on_chunk_deleted} _future_tick_
24848
24793
  *
24849
- *
24850
24794
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk View documentation}
24851
24795
  * @param position The chunk position to delete
24852
24796
  */
@@ -25126,7 +25070,6 @@ interface LuaSurface {
25126
25070
  * - {@link OnPreSurfaceClearedEvent on_pre_surface_cleared} _future_tick_
25127
25071
  * - {@link OnSurfaceClearedEvent on_surface_cleared} _future_tick_
25128
25072
  *
25129
- *
25130
25073
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clear View documentation}
25131
25074
  * @param ignore_characters Whether characters on this surface that are connected to or associated with players should be ignored (not destroyed).
25132
25075
  */
@@ -25139,7 +25082,6 @@ interface LuaSurface {
25139
25082
  * **Raised events:**
25140
25083
  * - {@link OnScriptPathRequestFinishedEvent on_script_path_request_finished} _future_tick_
25141
25084
  *
25142
- *
25143
25085
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path View documentation}
25144
25086
  * @returns A unique handle to identify this call when {@link OnScriptPathRequestFinishedEvent on_script_path_request_finished} fires.
25145
25087
  */
@@ -25784,7 +25726,6 @@ interface LuaTile {
25784
25726
  * **Raised events:**
25785
25727
  * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the tile was successfully marked for deconstruction.
25786
25728
  *
25787
- *
25788
25729
  * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.order_deconstruction View documentation}
25789
25730
  * @param force The force whose robots are supposed to do the deconstruction.
25790
25731
  * @param player The player to set the last_user to if any.
@@ -25797,7 +25738,6 @@ interface LuaTile {
25797
25738
  * **Raised events:**
25798
25739
  * - {@link OnCancelledDeconstructionEvent on_cancelled_deconstruction}? _instantly_ Raised if the tile's deconstruction was successfully cancelled.
25799
25740
  *
25800
- *
25801
25741
  * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.cancel_deconstruction View documentation}
25802
25742
  * @param force The force who did the deconstruction order.
25803
25743
  * @param player The player to set the last_user to if any.
@@ -26725,7 +26665,8 @@ interface LuaWallControlBehavior extends LuaControlBehavior {
26725
26665
  *
26726
26666
  * {@link https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.circuit_condition View documentation}
26727
26667
  */
26728
- circuit_condition: CircuitConditionDefinition
26668
+ get circuit_condition(): CircuitConditionDefinitionRead
26669
+ set circuit_condition(value: CircuitConditionDefinition)
26729
26670
  open_gate: boolean
26730
26671
  read_sensor: boolean
26731
26672
  output_signal: SignalID
@@ -1635,6 +1635,21 @@ interface AutoplaceControl {
1635
1635
  readonly richness: MapGenSize
1636
1636
  }
1637
1637
 
1638
+ interface AutoplaceControlRead extends AutoplaceControl {
1639
+ /**
1640
+ * For things that are placed as spots such as ores and enemy bases, frequency is generally proportional to number of spots placed per unit area. For continuous features such as forests, frequency is how compressed the probability function is over distance, i.e. the inverse of 'scale' (similar to terrain_segmentation). When the {@link LuaAutoplaceControlPrototype} is of the category `"terrain"`, then scale is shown in the map generator GUI instead of frequency.
1641
+ */
1642
+ readonly frequency: number
1643
+ /**
1644
+ * For things that are placed as spots, size is proportional to the area of each spot. For continuous features, size affects how much of the map is covered with the thing, and is called 'coverage' in the GUI.
1645
+ */
1646
+ readonly size: number
1647
+ /**
1648
+ * Has different effects for different things, but generally affects the 'health' or density of a thing that is placed without affecting where it is placed. For trees, richness affects tree health. For ores, richness multiplies the amount of ore at any given tile in a patch. Metadata about autoplace controls (such as whether or not 'richness' does anything for them) can be found in the {@link LuaAutoplaceControlPrototype} by looking up `game.autoplace_control_prototypes[(control prototype name)]`, e.g. `game.autoplace_control_prototypes["enemy-base"].richness` is false, because enemy base autoplacement doesn't use richness.
1649
+ */
1650
+ readonly richness: number
1651
+ }
1652
+
1638
1653
  interface AutoplaceSettings {
1639
1654
  /**
1640
1655
  * Whether missing autoplace names for this type should be default enabled.
@@ -1643,6 +1658,10 @@ interface AutoplaceSettings {
1643
1658
  readonly settings: Record<string, AutoplaceControl>
1644
1659
  }
1645
1660
 
1661
+ interface AutoplaceSettingsRead extends AutoplaceSettings {
1662
+ readonly settings: Record<string, AutoplaceControlRead>
1663
+ }
1664
+
1646
1665
  interface CliffPlacementSettings {
1647
1666
  /**
1648
1667
  * Name of the cliff prototype.
@@ -1662,6 +1681,13 @@ interface CliffPlacementSettings {
1662
1681
  readonly richness: MapGenSize
1663
1682
  }
1664
1683
 
1684
+ interface CliffPlacementSettingsRead extends CliffPlacementSettings {
1685
+ /**
1686
+ * Corresponds to 'continuity' in the GUI. This value is not used directly, but is used by the 'cliffiness' noise expression, which in combination with elevation and the two cliff elevation properties drives cliff placement (cliffs are placed when elevation crosses the elevation contours defined by `cliff_elevation_0` and `cliff_elevation_interval` when 'cliffiness' is greater than `0.5`). The default 'cliffiness' expression interprets this value such that larger values result in longer unbroken walls of cliffs, and smaller values (between `0` and `1`) result in larger gaps in cliff walls.
1687
+ */
1688
+ readonly richness: number
1689
+ }
1690
+
1665
1691
  /**
1666
1692
  * The 'map type' dropdown in the map generation GUI is actually a selector for elevation generator. The base game sets `property_expression_names.elevation` to `"0_16-elevation"` to reproduce terrain from 0.16 or to `"0_17-island"` for the island preset. If generators are available for other properties, the 'map type' dropdown in the GUI will be renamed to 'elevation' and shown along with selectors for the other selectable properties.
1667
1693
  *
@@ -1755,6 +1781,30 @@ interface MapGenSettings {
1755
1781
  }
1756
1782
 
1757
1783
  interface MapGenSettingsRead extends MapGenSettings {
1784
+ /**
1785
+ * The inverse of 'water scale' in the map generator GUI. Lower `terrain_segmentation` increases the scale of elevation features (lakes, continents, etc). This behavior can be overridden with alternate elevation generators (see `property_expression_names`, below).
1786
+ */
1787
+ readonly terrain_segmentation: number
1788
+ /**
1789
+ * The equivalent to 'water coverage' in the map generator GUI. Specifically, when this value is non-zero, `water_level = 10 * log2` (the value of this field), and the elevation generator subtracts water level from elevation before adding starting lakes. If water is set to 'none', elevation is clamped to a small positive value before adding starting lakes. This behavior can be overridden with alternate elevation generators (see `property_expression_names`, below).
1790
+ */
1791
+ readonly water: number
1792
+ /**
1793
+ * Indexed by autoplace control prototype name.
1794
+ */
1795
+ readonly autoplace_controls: Record<string, AutoplaceControlRead>
1796
+ /**
1797
+ * Each setting in this dictionary maps the string type to the settings for that type. Valid types are `"entity"`, `"tile"` and `"decorative"`.
1798
+ */
1799
+ readonly autoplace_settings: Record<string, AutoplaceSettingsRead>
1800
+ /**
1801
+ * Map generation settings for entities of the type "cliff".
1802
+ */
1803
+ readonly cliff_settings: CliffPlacementSettingsRead
1804
+ /**
1805
+ * Size of the starting area.
1806
+ */
1807
+ readonly starting_area: number
1758
1808
  /**
1759
1809
  * Positions of the starting areas.
1760
1810
  */
@@ -1985,49 +2035,34 @@ interface ConstantCombinatorParameters {
1985
2035
  }
1986
2036
 
1987
2037
  /**
2038
+ * - `"="`: "equal to"
2039
+ *
2040
+ * - `">"`: "greater than"
2041
+ *
2042
+ * - `"<"`: "lesser than"
2043
+ *
2044
+ * - `"≥"`: "greater than or equal to"
2045
+ *
2046
+ * - `">="`: "greater than or equal to"
2047
+ *
2048
+ * - `"≤"`: "lesser than or equal to"
2049
+ *
2050
+ * - `"<="`: "lesser than or equal to"
2051
+ *
2052
+ * - `"≠"`: "not equal to"
2053
+ *
2054
+ * - `"!="`: "not equal to"
2055
+ *
1988
2056
  * **Note**
1989
2057
  *
1990
2058
  * While the API accepts both versions for `"less/greater than or equal to"` and `"not equal"`, it'll always return `"≥"`, `"≤"` or `"≠"` respectively when reading them back.
1991
2059
  *
1992
2060
  * {@link https://lua-api.factorio.com/latest/Concepts.html#ComparatorString View documentation}
1993
2061
  */
1994
- type ComparatorString
1995
- /**
1996
- * "equal to"
1997
- */ =
1998
- | "="
1999
- /**
2000
- * "greater than"
2001
- */
2002
- | ">"
2003
- /**
2004
- * "lesser than"
2005
- */
2006
- | "<"
2007
- /**
2008
- * "greater than or equal to"
2009
- */
2010
- | "\u2265"
2011
- /**
2012
- * "greater than or equal to"
2013
- */
2014
- | ">="
2015
- /**
2016
- * "lesser than or equal to"
2017
- */
2018
- | "\u2264"
2019
- /**
2020
- * "lesser than or equal to"
2021
- */
2022
- | "<="
2023
- /**
2024
- * "not equal to"
2025
- */
2026
- | "\u2260"
2027
- /**
2028
- * "not equal to"
2029
- */
2030
- | "!="
2062
+ type ComparatorString = "=" | ">" | "<" | "≥" | ">=" | "≤" | "<=" | "≠" | "!="
2063
+
2064
+ /** @see ComparatorString */
2065
+ type ComparatorStringRead = "=" | ">" | "<" | "≥" | "≤" | "≠"
2031
2066
 
2032
2067
  interface DeciderCombinatorParameters {
2033
2068
  /**
@@ -2056,6 +2091,13 @@ interface DeciderCombinatorParameters {
2056
2091
  readonly copy_count_from_input?: boolean
2057
2092
  }
2058
2093
 
2094
+ interface DeciderCombinatorParametersRead extends DeciderCombinatorParameters {
2095
+ /**
2096
+ * Specifies how the inputs should be compared. If not specified, defaults to `"<"`.
2097
+ */
2098
+ readonly comparator?: ComparatorStringRead
2099
+ }
2100
+
2059
2101
  interface InserterCircuitConditions {
2060
2102
  readonly circuit?: CircuitCondition
2061
2103
  readonly logistics?: CircuitCondition
@@ -2080,6 +2122,13 @@ interface CircuitCondition {
2080
2122
  readonly constant?: int
2081
2123
  }
2082
2124
 
2125
+ interface CircuitConditionRead extends CircuitCondition {
2126
+ /**
2127
+ * Specifies how the inputs should be compared. If not specified, defaults to `"<"`.
2128
+ */
2129
+ readonly comparator?: ComparatorStringRead
2130
+ }
2131
+
2083
2132
  interface CircuitConditionDefinition {
2084
2133
  readonly condition: CircuitCondition
2085
2134
  /**
@@ -2088,6 +2137,10 @@ interface CircuitConditionDefinition {
2088
2137
  readonly fulfilled?: boolean
2089
2138
  }
2090
2139
 
2140
+ interface CircuitConditionDefinitionRead extends CircuitConditionDefinition {
2141
+ readonly condition: CircuitConditionRead
2142
+ }
2143
+
2091
2144
  interface CircuitConnectionDefinition {
2092
2145
  /**
2093
2146
  * Wire color, either {@link defines.wire_type.red} or {@link defines.wire_type.green}.
@@ -2568,6 +2621,13 @@ interface WaitCondition {
2568
2621
  readonly condition?: CircuitCondition
2569
2622
  }
2570
2623
 
2624
+ interface WaitConditionRead extends WaitCondition {
2625
+ /**
2626
+ * Only present when `type` is `"item_count"`, `"circuit"` or `"fluid_count"`.
2627
+ */
2628
+ readonly condition?: CircuitConditionRead
2629
+ }
2630
+
2571
2631
  interface TrainScheduleRecord {
2572
2632
  /**
2573
2633
  * Name of the station.
@@ -2749,7 +2809,11 @@ type SpriteType =
2749
2809
  *
2750
2810
  * {@link https://lua-api.factorio.com/latest/Concepts.html#SpritePath View documentation}
2751
2811
  */
2752
- type SpritePath = string | `${SpriteType}/${string}`
2812
+ type SpritePath =
2813
+ | (string & {
2814
+ _?: never
2815
+ })
2816
+ | `${SpriteType}/${string}`
2753
2817
 
2754
2818
  /**
2755
2819
  * A sound defined by a {@link string}. It can be either the name of a {@linkplain https://wiki.factorio.com/Prototype/Sound sound prototype} defined in the data stage or a path in the form `"type/name"`. The latter option can be sorted into three categories.
@@ -2782,7 +2846,11 @@ type SpritePath = string | `${SpriteType}/${string}`
2782
2846
  *
2783
2847
  * {@link https://lua-api.factorio.com/latest/Concepts.html#SoundPath View documentation}
2784
2848
  */
2785
- type SoundPath = string | `${SoundType}/${string}`
2849
+ type SoundPath =
2850
+ | (string & {
2851
+ _?: never
2852
+ })
2853
+ | `${SoundType}/${string}`
2786
2854
 
2787
2855
  interface ModuleEffectValue {
2788
2856
  /**
@@ -3012,7 +3080,7 @@ type CollisionMaskLayer =
3012
3080
  | "rail-layer"
3013
3081
  | "transport-belt-layer"
3014
3082
  | "not-setup"
3015
- | `layer-${number}`
3083
+ | `layer-${bigint}`
3016
3084
 
3017
3085
  /**
3018
3086
  * This is a set of masks given as a dictionary[{@link CollisionMaskLayer} &rarr; {@link boolean}]. Only set masks are present in the dictionary and they have the value `true`. Unset flags aren't present at all.
@@ -3375,27 +3443,24 @@ interface ProgrammableSpeakerInstrument {
3375
3443
  /**
3376
3444
  * A {@link string} that specifies where a GUI element should be.
3377
3445
  *
3446
+ * - `"left"`: The same as `"middle-left"`
3447
+ *
3448
+ * - `"center"`: The same as `"middle-center"`
3449
+ *
3450
+ * - `"right"`: The same as `"middle-right"`
3451
+ *
3378
3452
  * {@link https://lua-api.factorio.com/latest/Concepts.html#Alignment View documentation}
3379
3453
  */
3380
3454
  type Alignment =
3381
3455
  | "top-left"
3382
3456
  | "middle-left"
3383
- /**
3384
- * The same as `"middle-left"`
3385
- */
3386
3457
  | "left"
3387
3458
  | "bottom-left"
3388
3459
  | "top-center"
3389
3460
  | "middle-center"
3390
- /**
3391
- * The same as `"middle-center"`
3392
- */
3393
3461
  | "center"
3394
3462
  | "bottom-center"
3395
3463
  | "top-right"
3396
- /**
3397
- * The same as `"middle-right"`
3398
- */
3399
3464
  | "right"
3400
3465
  | "bottom-right"
3401
3466
 
@@ -3543,69 +3608,53 @@ type MouseButtonFlagsArray = readonly (MouseButtonFlag | "left-and-right")[]
3543
3608
  */
3544
3609
  type MouseButtonFlags = MouseButtonFlagsTable | MouseButtonFlagsArray
3545
3610
 
3546
- type CursorBoxRenderType
3547
3611
  /**
3548
- * Yellow box.
3549
- */ =
3612
+ * - `"entity"`: Yellow box.
3613
+ *
3614
+ * - `"not-allowed"`: Red box.
3615
+ *
3616
+ * - `"electricity"`: Light blue box.
3617
+ *
3618
+ * - `"pair"`: Light blue box.
3619
+ *
3620
+ * - `"copy"`: Green box.
3621
+ *
3622
+ * - `"train-visualization"`: White box.
3623
+ *
3624
+ * - `"logistics"`: Light blue box.
3625
+ *
3626
+ * - `"blueprint-snap-rectangle"`: Green box.
3627
+ *
3628
+ * {@link https://lua-api.factorio.com/latest/Concepts.html#CursorBoxRenderType View documentation}
3629
+ */
3630
+ type CursorBoxRenderType =
3550
3631
  | "entity"
3551
- /**
3552
- * Red box.
3553
- */
3554
3632
  | "not-allowed"
3555
- /**
3556
- * Light blue box.
3557
- */
3558
3633
  | "electricity"
3559
- /**
3560
- * Light blue box.
3561
- */
3562
3634
  | "pair"
3563
- /**
3564
- * Green box.
3565
- */
3566
3635
  | "copy"
3567
- /**
3568
- * White box.
3569
- */
3570
3636
  | "train-visualization"
3571
- /**
3572
- * Light blue box.
3573
- */
3574
3637
  | "logistics"
3575
- /**
3576
- * Green box.
3577
- */
3578
3638
  | "blueprint-snap-rectangle"
3579
3639
 
3580
- type ForceCondition
3581
3640
  /**
3582
- * All forces pass.
3583
- */ =
3584
- | "all"
3585
- /**
3586
- * Forces which will attack pass.
3587
- */
3588
- | "enemy"
3589
- /**
3590
- * Forces which won't attack pass.
3591
- */
3592
- | "ally"
3593
- /**
3594
- * Forces which are friends pass.
3595
- */
3596
- | "friend"
3597
- /**
3598
- * Forces which are not friends pass.
3599
- */
3600
- | "not-friend"
3601
- /**
3602
- * The same force pass.
3603
- */
3604
- | "same"
3605
- /**
3606
- * The non-same forces pass.
3607
- */
3608
- | "not-same"
3641
+ * - `"all"`: All forces pass.
3642
+ *
3643
+ * - `"enemy"`: Forces which will attack pass.
3644
+ *
3645
+ * - `"ally"`: Forces which won't attack pass.
3646
+ *
3647
+ * - `"friend"`: Forces which are friends pass.
3648
+ *
3649
+ * - `"not-friend"`: Forces which are not friends pass.
3650
+ *
3651
+ * - `"same"`: The same force pass.
3652
+ *
3653
+ * - `"not-same"`: The non-same forces pass.
3654
+ *
3655
+ * {@link https://lua-api.factorio.com/latest/Concepts.html#ForceCondition View documentation}
3656
+ */
3657
+ type ForceCondition = "all" | "enemy" | "ally" | "friend" | "not-friend" | "same" | "not-same"
3609
3658
 
3610
3659
  /**
3611
3660
  * A value between 0 and 255 inclusive represented by one of the following named {@link string} or string version of the value (for example `"27"` and `"decals"` are both valid). Higher values are rendered on top of lower values.
@@ -3658,7 +3707,7 @@ type ForceCondition
3658
3707
  */
3659
3708
  type RenderLayer =
3660
3709
  | number
3661
- | `${number}`
3710
+ | `${bigint}`
3662
3711
  | "water-tile"
3663
3712
  | "ground-tile"
3664
3713
  | "tile-transition"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",