factorio-types 1.2.57 → 1.2.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 2.0.76
5
+ // Factorio version 2.1.7
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -61,15 +61,35 @@ interface ActivatePasteTipTrigger extends CountBasedTipTrigger {
61
61
  ```
62
62
  */
63
63
  type ActiveTriggerID = string;
64
+ /**
65
+ * Root style: `"activity_bar"`
66
+ */
64
67
  interface ActivityBarStyleSpecification extends BaseStyleSpecification {
68
+ /**
69
+ * Required on the root style.
70
+ */
65
71
  bar?: ElementImageSet;
72
+ /**
73
+ * Required on the root style.
74
+ */
66
75
  bar_background?: ElementImageSet;
76
+ /**
77
+ * Required on the root style.
78
+ */
67
79
  bar_size_ratio?: float;
68
80
  /**
69
81
  * The thickness of the bar, not the horizontal size.
82
+ *
83
+ * Required on the root style.
70
84
  */
71
85
  bar_width?: uint32;
86
+ /**
87
+ * Required on the root style.
88
+ */
72
89
  color?: Color;
90
+ /**
91
+ * Required on the root style.
92
+ */
73
93
  speed?: float;
74
94
  type: 'activity_bar_style';
75
95
  }
@@ -213,7 +233,10 @@ type AmbientSoundType = /**
213
233
  'hero-track' | /**
214
234
  * This track is played interleaved (alternating) with `"main-track"` tracks.
215
235
  */
216
- 'interlude';
236
+ 'interlude' | /**
237
+ * This track is only played by script.
238
+ */
239
+ 'script-track';
217
240
  /**
218
241
  * The name of an {@link AmmoCategory | prototype:AmmoCategory}.
219
242
  * @example ```
@@ -267,6 +290,10 @@ interface AmmoType {
267
290
  * Energy consumption of a single shot, if applicable.
268
291
  */
269
292
  energy_consumption?: Energy;
293
+ /**
294
+ * If true, attacks will always be clamped to max range even if the target is within range. Used for shotguns.
295
+ */
296
+ force_clamp_to_max_range?: boolean;
270
297
  /**
271
298
  * Affects the `range` value of the shooting gun prototype's {@link BaseAttackParameters | prototype:BaseAttackParameters} to give a modified maximum range. The `min_range` value of the gun is unaffected.
272
299
  *
@@ -442,6 +469,10 @@ layers =
442
469
  */
443
470
  type AnimationFrameSequence = uint16[];
444
471
  interface AnimationParameters extends SpriteParameters {
472
+ /**
473
+ * If `true`, the animation frame count may be cut to half depending on detected hardware and other graphics settings.
474
+ */
475
+ allow_reducing_frames?: boolean;
445
476
  /**
446
477
  * Modifier of the animation playing speed, the default of `1` means one animation frame per tick (60 fps). The speed of playing can often vary depending on the usage (output of steam engine for example). Has to be greater than `0`.
447
478
  */
@@ -826,6 +857,9 @@ DontUseEntityInEnergyProductionAchievementPrototype | /**
826
857
  * `'editor-controller'`
827
858
  */
828
859
  EditorControllerPrototype | /**
860
+ * `'electric-energy-interface-equipment'`
861
+ */
862
+ ElectricEnergyInterfaceEquipmentPrototype | /**
829
863
  * `'electric-energy-interface'`
830
864
  */
831
865
  ElectricEnergyInterfacePrototype | /**
@@ -1372,9 +1406,14 @@ WallPrototype;
1372
1406
  interface ApplyStarterPackTipTrigger extends CountBasedTipTrigger {
1373
1407
  type: 'apply-starter-pack';
1374
1408
  }
1409
+ /**
1410
+ * Refers to tints defined in {@link TilePrototype::particle_tints | prototype:TilePrototype::particle_tints}.
1411
+ */
1412
+ type ApplyTileTint = 'primary' | 'secondary';
1375
1413
  interface AreaTriggerItem extends TriggerItem {
1376
1414
  collision_mode?: 'distance-from-collision-box' | 'distance-from-center';
1377
1415
  radius: double;
1416
+ require_origin_is_valid?: boolean;
1378
1417
  show_in_tooltip?: boolean;
1379
1418
  target_enemies?: boolean;
1380
1419
  target_entities?: boolean;
@@ -1625,7 +1664,7 @@ interface BaseAttackParameters {
1625
1664
  */
1626
1665
  fire_penalty?: float;
1627
1666
  /**
1628
- * A higher penalty will discourage turrets from targeting units with higher health. A negative penalty will encourage turrets to target units with higher health.
1667
+ * A higher penalty will discourage turrets from targeting units with higher health ratio. A negative penalty will encourage turrets to target units with higher health ratio.
1629
1668
  */
1630
1669
  health_penalty?: float;
1631
1670
  /**
@@ -1663,6 +1702,10 @@ interface BaseAttackParameters {
1663
1702
  * Played once at the start of the attack if these are {@link ProjectileAttackParameters | prototype:ProjectileAttackParameters}.
1664
1703
  */
1665
1704
  sound?: LayeredSound;
1705
+ /**
1706
+ * A higher penalty will discourage turrets from targeting asteroids that are threatening. A negative penalty will encourage turrets to target threatening asteroids.
1707
+ */
1708
+ threatening_asteroid_penalty?: float;
1666
1709
  /**
1667
1710
  * Projectile will be creation position and orientation will be collinear with shooter and target (unless offset projectile center is specified). Used for railgun turrets to avoid unexpected friendly fire incidents.
1668
1711
  */
@@ -1718,6 +1761,16 @@ interface BaseModifier {
1718
1761
  */
1719
1762
  icons?: IconData[];
1720
1763
  }
1764
+ interface BasePumpWagonConnectionAnimations {
1765
+ input?: BasePumpWagonConnectionAnimations4Way;
1766
+ output?: BasePumpWagonConnectionAnimations4Way;
1767
+ }
1768
+ interface BasePumpWagonConnectionAnimations4Way {
1769
+ east: Animation;
1770
+ north: Animation;
1771
+ south: Animation;
1772
+ west: Animation;
1773
+ }
1721
1774
  /**
1722
1775
  * The abstract base of all {@link StyleSpecifications | prototype:StyleSpecification}.
1723
1776
  * @example ```
@@ -2030,19 +2083,19 @@ interface BoilerPictures {
2030
2083
  patch?: Sprite;
2031
2084
  structure: Animation;
2032
2085
  }
2033
- interface BonusGuiOrdering {
2034
- artillery_range: Order;
2035
- beacon_distribution: Order;
2036
- bulk_inserter: Order;
2037
- character: Order;
2038
- follower_robots: Order;
2039
- inserter: Order;
2040
- mining_productivity: Order;
2041
- research_speed: Order;
2042
- stack_inserter: Order;
2043
- train_braking_force: Order;
2044
- turret_attack: Order;
2045
- worker_robots: Order;
2086
+ interface BonusUtilityConstants {
2087
+ artillery_range: string;
2088
+ beacon_distribution: string;
2089
+ bulk_inserter: string;
2090
+ character: string;
2091
+ follower_robots: string;
2092
+ inserter: string;
2093
+ mining_productivity: string;
2094
+ research_speed: string;
2095
+ stack_inserter: string;
2096
+ train_braking_force: string;
2097
+ turret_attack: string;
2098
+ worker_robots: string;
2046
2099
  }
2047
2100
  interface BoolModifier extends BaseModifier {
2048
2101
  /**
@@ -2152,6 +2205,10 @@ interface BulkInserterCapacityBonusModifier extends SimpleModifier {
2152
2205
  use_icon_overlay_constant?: boolean;
2153
2206
  }
2154
2207
  interface BurnerEnergySource extends BaseEnergySource {
2208
+ /**
2209
+ * If this burner attempts to auto-refill fuel from the owner character, car, spider vehicle, cargo wagon, or artillery wagon.
2210
+ */
2211
+ auto_refuel?: boolean;
2155
2212
  burner_usage?: BurnerUsageID;
2156
2213
  burnt_inventory_size?: ItemStackIndex;
2157
2214
  /**
@@ -2179,25 +2236,57 @@ interface BurnerEnergySource extends BaseEnergySource {
2179
2236
  ```
2180
2237
  */
2181
2238
  type BurnerUsageID = string;
2239
+ /**
2240
+ * Root style: `"button"`
2241
+ */
2182
2242
  interface ButtonStyleSpecificationBase extends StyleWithClickableGraphicalSetSpecification {
2243
+ /**
2244
+ * Required on the root style.
2245
+ */
2183
2246
  clicked_font_color?: Color;
2184
2247
  clicked_vertical_offset?: uint32;
2248
+ /**
2249
+ * Required on the root style.
2250
+ */
2185
2251
  default_font_color?: Color;
2252
+ /**
2253
+ * Required on the root style.
2254
+ */
2186
2255
  disabled_font_color?: Color;
2187
2256
  draw_grayscale_picture?: boolean;
2188
2257
  draw_shadow_under_picture?: boolean;
2189
2258
  /**
2190
2259
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
2260
+ *
2261
+ * Required on the root style.
2191
2262
  */
2192
2263
  font?: string;
2264
+ /**
2265
+ * Required on the root style.
2266
+ */
2193
2267
  hovered_font_color?: Color;
2194
2268
  icon_horizontal_align?: HorizontalAlign;
2195
2269
  invert_colors_of_picture_when_disabled?: boolean;
2196
2270
  invert_colors_of_picture_when_hovered_or_toggled?: boolean;
2271
+ /**
2272
+ * Required on the root style.
2273
+ */
2197
2274
  pie_progress_color?: Color;
2275
+ /**
2276
+ * Required on the root style.
2277
+ */
2198
2278
  selected_clicked_font_color?: Color;
2279
+ /**
2280
+ * Required on the root style.
2281
+ */
2199
2282
  selected_font_color?: Color;
2283
+ /**
2284
+ * Required on the root style.
2285
+ */
2200
2286
  selected_hovered_font_color?: Color;
2287
+ /**
2288
+ * Required on the root style.
2289
+ */
2201
2290
  strikethrough_color?: Color;
2202
2291
  type: string;
2203
2292
  }
@@ -2211,6 +2300,9 @@ interface CameraEffectTriggerEffectItem extends TriggerEffectItem {
2211
2300
  strength?: float;
2212
2301
  type: 'camera-effect';
2213
2302
  }
2303
+ /**
2304
+ * Root style: `"camera"`
2305
+ */
2214
2306
  interface CameraStyleSpecification extends EmptyWidgetStyleSpecificationBase {
2215
2307
  type: 'camera_style';
2216
2308
  }
@@ -2241,33 +2333,32 @@ interface CargoBayConnectableGraphicsSet {
2241
2333
  animation?: Animation;
2242
2334
  animation_render_layer?: RenderLayer;
2243
2335
  connections?: CargoBayConnections;
2244
- picture?: LayeredSprite;
2336
+ picture?: LayeredSprite4Way;
2245
2337
  /**
2246
2338
  * Only loaded if this graphics set is used in a property called `graphics_set`, refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
2247
2339
  */
2248
2340
  water_reflection?: WaterReflectionDefinition;
2249
2341
  }
2250
- /**
2251
- * Walls should have an even number of variations because they are interleaved.
2252
- */
2253
2342
  interface CargoBayConnections {
2254
- bottom_left_inner_corner?: LayeredSpriteVariations;
2255
- bottom_left_outer_corner?: LayeredSpriteVariations;
2256
- bottom_right_inner_corner?: LayeredSpriteVariations;
2257
- bottom_right_outer_corner?: LayeredSpriteVariations;
2258
- bottom_wall?: LayeredSpriteVariations;
2259
2343
  bridge_crossing?: LayeredSpriteVariations;
2260
2344
  bridge_horizontal_narrow?: LayeredSpriteVariations;
2261
2345
  bridge_horizontal_wide?: LayeredSpriteVariations;
2262
2346
  bridge_vertical_narrow?: LayeredSpriteVariations;
2263
2347
  bridge_vertical_wide?: LayeredSpriteVariations;
2264
- left_wall?: LayeredSpriteVariations;
2265
- right_wall?: LayeredSpriteVariations;
2266
- top_left_inner_corner?: LayeredSpriteVariations;
2267
- top_left_outer_corner?: LayeredSpriteVariations;
2268
- top_right_inner_corner?: LayeredSpriteVariations;
2269
- top_right_outer_corner?: LayeredSpriteVariations;
2270
- top_wall?: LayeredSpriteVariations;
2348
+ /**
2349
+ * An array of LayeredSpriteVariations groups. One tile can have a maximum of two groups. A group is selected based on tile position and a random variation is picked from that group. This allows having interleaved variations and makes sure the same variation isn't picked for surrounding tiles.
2350
+ *
2351
+ * Supports at most 255 items.
2352
+ */
2353
+ tileset?: LayeredSpriteVariations[][];
2354
+ /**
2355
+ * A mapping from a bitmask index to a tileset index. A bitmask index mapped to 0 won't be drawn.
2356
+ *
2357
+ * Tile bitmask uses 8 bits. Bits are assigned from the top-left corner and going clockwise (top-left tile has bit 0 and right tile has bit 7).
2358
+ *
2359
+ * Mandatory if `tileset` is defined.
2360
+ */
2361
+ tileset_mapping?: LuaTable<uint8, uint8 | uint8[]>;
2271
2362
  }
2272
2363
  interface CargoHatchDefinition {
2273
2364
  busy_timeout_ticks?: uint32;
@@ -2386,7 +2477,7 @@ interface CharacterArmorAnimation {
2386
2477
  /**
2387
2478
  * List of positions in the mining with tool animation when the mining sound and mining particles are created.
2388
2479
  *
2389
- * Overrides {@link CharacterPrototype::mining_with_tool_particles_animation_positions | prototype:CharacterPrototype::mining_with_tool_particles_animation_positions} if defined
2480
+ * Overrides {@link CharacterPrototype::mining_with_tool_particles_animation_positions | prototype:CharacterPrototype::mining_with_tool_particles_animation_positions} if defined.
2390
2481
  */
2391
2482
  mining_with_tool_particles_animation_positions?: float[];
2392
2483
  running?: RotatedAnimation;
@@ -2521,7 +2612,13 @@ interface ChartUtilityConstants {
2521
2612
  chart_train_stop_text_color: Color;
2522
2613
  circuit_network_member_color: Color;
2523
2614
  copper_wire_color: Color;
2615
+ /**
2616
+ * Defaults to `1.0`.
2617
+ */
2524
2618
  custom_tag_max_scale?: float;
2619
+ /**
2620
+ * Defaults to `1.0`.
2621
+ */
2525
2622
  custom_tag_scale?: float;
2526
2623
  custom_tag_selected_overlay_tint?: Color;
2527
2624
  /**
@@ -2566,16 +2663,39 @@ interface ChartUtilityConstants {
2566
2663
  yellow_signal_color: Color;
2567
2664
  zoom_threshold_to_draw_spider_path: double;
2568
2665
  }
2666
+ /**
2667
+ * Root style: `"checkbox"`
2668
+ */
2569
2669
  interface CheckBoxStyleSpecification extends StyleWithClickableGraphicalSetSpecification {
2670
+ /**
2671
+ * Required on the root style.
2672
+ */
2570
2673
  checkmark?: Sprite;
2674
+ /**
2675
+ * Required on the root style.
2676
+ */
2571
2677
  disabled_checkmark?: Sprite;
2678
+ /**
2679
+ * Required on the root style.
2680
+ */
2572
2681
  disabled_font_color?: Color;
2573
2682
  /**
2574
2683
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
2684
+ *
2685
+ * Required on the root style.
2575
2686
  */
2576
2687
  font?: string;
2688
+ /**
2689
+ * Required on the root style.
2690
+ */
2577
2691
  font_color?: Color;
2692
+ /**
2693
+ * Required on the root style.
2694
+ */
2578
2695
  intermediate_mark?: Sprite;
2696
+ /**
2697
+ * Required on the root style.
2698
+ */
2579
2699
  text_padding?: uint32;
2580
2700
  type: 'checkbox_style';
2581
2701
  }
@@ -3325,15 +3445,20 @@ interface CreateEntityTriggerEffectItemBase extends TriggerEffectItem {
3325
3445
  * Create the entity only when they are within a 200 tile range of any connected player.
3326
3446
  */
3327
3447
  only_when_visible?: boolean;
3448
+ /**
3449
+ * If `true`, colliding ghosts and corpses will not be removed by the creation of some entity types.
3450
+ */
3451
+ preserve_ghosts_and_corpses?: boolean;
3328
3452
  /**
3329
3453
  * The result entity will be protected from automated attacks of enemies.
3330
3454
  */
3331
3455
  protected?: boolean;
3456
+ show_details_in_tooltip?: boolean;
3332
3457
  show_in_tooltip?: boolean;
3333
3458
  /**
3334
3459
  * Entity creation will not occur if any tile matches the collision condition. Defaults to no collisions.
3335
3460
  */
3336
- tile_collision_mask?: CollisionMaskConnector;
3461
+ tile_collision_mask?: TileCollisionMaskConnector;
3337
3462
  /**
3338
3463
  * If `true`, the {@link on_trigger_created_entity | runtime:on_trigger_created_entity} event will be raised.
3339
3464
  */
@@ -3359,7 +3484,7 @@ interface CreateGhostOnEntityDeathModifier extends BoolModifier {
3359
3484
  use_icon_overlay_constant?: boolean;
3360
3485
  }
3361
3486
  interface CreateParticleTriggerEffectItemBase extends TriggerEffectItem {
3362
- apply_tile_tint?: 'primary' | 'secondary';
3487
+ apply_tile_tint?: ApplyTileTint;
3363
3488
  frame_speed?: float;
3364
3489
  frame_speed_deviation?: float;
3365
3490
  initial_height: float;
@@ -3394,6 +3519,21 @@ interface CreateParticleTriggerEffectItemBase extends TriggerEffectItem {
3394
3519
  tint?: Color;
3395
3520
  type: string;
3396
3521
  }
3522
+ interface CreatePollutionTriggerEffectItem extends TriggerEffectItem {
3523
+ /**
3524
+ * This may be negative which will reduce pollution when run.
3525
+ */
3526
+ amount: double;
3527
+ /**
3528
+ * If not defined, and use_entity_from_trigger is false, the pollution does not show in statistics.
3529
+ */
3530
+ entity?: EntityID;
3531
+ type: 'create-pollution';
3532
+ /**
3533
+ * If not set, and entity is not set, the pollution does not show in statistics.
3534
+ */
3535
+ use_entity_from_trigger?: boolean;
3536
+ }
3397
3537
  interface CreateSmokeTriggerEffectItem extends CreateEntityTriggerEffectItemBase {
3398
3538
  initial_height?: float;
3399
3539
  speed?: Vector;
@@ -3589,7 +3729,7 @@ type DamageTypeID = string;
3589
3729
  /**
3590
3730
  * The data table is read by the game to load all prototypes.
3591
3731
  *
3592
- * At the end of the prototype stage, the data table is loaded by the game engine and the format of the prototypes is validated. Any extra properties are ignored. See {@link Data Lifecycle | runtime:data-lifecycle} for more information.
3732
+ * At the end of the prototype stage, the data table is loaded by the game engine and the format of the prototypes is validated. Any extra properties are ignored. See {@link Data Lifecycle | auxiliary:data-lifecycle} for more information.
3593
3733
  *
3594
3734
  * The data table and its properties are defined in Lua, so their source code can be viewed in {@link dataloader.lua | https://github.com/wube/factorio-data/blob/master/core/lualib/dataloader.lua}.
3595
3735
  */
@@ -3749,14 +3889,35 @@ interface DirectionShift {
3749
3889
  * One of the 16 directions, specified with a string.
3750
3890
  */
3751
3891
  type DirectionString = 'north' | 'north_north_east' | 'north_east' | 'east_north_east' | 'east' | 'east_south_east' | 'south_east' | 'south_south_east' | 'south' | 'south_south_west' | 'south_west' | 'west_south_west' | 'west' | 'west_north_west' | 'north_west' | 'north_north_west';
3892
+ /**
3893
+ * Root style: `"double_slider"`
3894
+ */
3752
3895
  interface DoubleSliderStyleSpecification extends SliderStyleSpecificationBase {
3753
3896
  type: 'double_slider_style';
3754
3897
  }
3898
+ /**
3899
+ * Root style: `"dropdown"`
3900
+ */
3755
3901
  interface DropDownStyleSpecification extends BaseStyleSpecification {
3902
+ /**
3903
+ * Required on the root style.
3904
+ */
3756
3905
  button_style?: ButtonStyleSpecification;
3906
+ /**
3907
+ * Required on the root style.
3908
+ */
3757
3909
  icon?: Sprite;
3910
+ /**
3911
+ * Required on the root style.
3912
+ */
3758
3913
  list_box_style?: ListBoxStyleSpecification;
3914
+ /**
3915
+ * Required on the root style.
3916
+ */
3759
3917
  opened_sound?: Sound;
3918
+ /**
3919
+ * Required on the root style.
3920
+ */
3760
3921
  selector_and_title_spacing?: int16;
3761
3922
  type: 'dropdown_style';
3762
3923
  }
@@ -3764,11 +3925,29 @@ interface DropItemTipTrigger extends CountBasedTipTrigger {
3764
3925
  drop_into_entity?: boolean;
3765
3926
  type: 'drop-item';
3766
3927
  }
3928
+ interface EditorUtilityConstants {
3929
+ cliff_editor_remove_cliffs_color: Color;
3930
+ clone_editor_brush_cursor_preview_tint: Color;
3931
+ clone_editor_brush_destination_color: Color;
3932
+ clone_editor_brush_source_color: Color;
3933
+ clone_editor_brush_world_preview_tint: Color;
3934
+ clone_editor_copy_destination_allowed_color: Color;
3935
+ clone_editor_copy_destination_not_allowed_color: Color;
3936
+ clone_editor_copy_source_color: Color;
3937
+ decorative_editor_selection_preview_radius: uint8;
3938
+ decorative_editor_selection_preview_tint: Color;
3939
+ force_editor_select_area_color: Color;
3940
+ script_editor_drag_area_color: Color;
3941
+ script_editor_select_area_color: Color;
3942
+ tile_editor_area_selection_color: Color;
3943
+ tile_editor_selection_preview_radius: uint8;
3944
+ tile_editor_selection_preview_tint: Color;
3945
+ }
3767
3946
  /**
3768
- * When applied to {@link modules | prototype:ModulePrototype}, the resulting effect is a sum of all module effects, multiplied through calculations: `(1 + sum module effects)`, or `(0 + sum)` for productivity. Quality calculations follow their own separate logic.
3947
+ * When applied to {@link modules | prototype:ModulePrototype}, the resulting effect is a sum of all module effects, multiplied through calculations: `(1 + sum module effects)`, or `(0 + sum)` for productivity.
3769
3948
  * @example ```
3770
3949
  -- These are the effects of the vanilla Speed Module 3
3771
- {speed = 0.5, consumption = 0.7, quality = -0.25}
3950
+ {speed = 0.5, consumption = 0.7, quality = -0.025}
3772
3951
  ```
3773
3952
  */
3774
3953
  interface Effect {
@@ -3785,7 +3964,7 @@ interface Effect {
3785
3964
  */
3786
3965
  productivity?: EffectValue;
3787
3966
  /**
3788
- * Adds a bonus chance to increase a product's quality. The minimum possible sum is 0%. The quality effect is is multiplied by {@link QualityPrototype::next_probability | prototype:QualityPrototype::next_probability}. For example, if a module's quality effect is 0.2 and the current quality's next_probability is 0.1, then the chance to get the next quality item is 2%.
3967
+ * Adds a bonus chance to increase a product's quality. The minimum possible sum is 0%.
3789
3968
  */
3790
3969
  quality?: EffectValue;
3791
3970
  /**
@@ -3795,6 +3974,36 @@ interface Effect {
3795
3974
  }
3796
3975
  interface EffectReceiver {
3797
3976
  base_effect?: Effect;
3977
+ /**
3978
+ * Limits total consumption effect value.
3979
+ *
3980
+ * Low limit cannot be less than `-0.9999`. High limit cannot be greater than `1000`.
3981
+ */
3982
+ consumption_limits?: EffectValueRange;
3983
+ /**
3984
+ * Limits total pollution effect value.
3985
+ *
3986
+ * Low limit cannot be less than `-0.9999`. High limit cannot be greater than `1000`.
3987
+ */
3988
+ pollution_limits?: EffectValueRange;
3989
+ /**
3990
+ * Limits total productivity effect value. This limit is applied before any productivity gained from research is added. Afterwards, productivity is clamped again to be non-negative. For crafting machines, it is also clamped to {@link RecipePrototype::maximum_productivity | prototype:RecipePrototype::maximum_productivity}.
3991
+ *
3992
+ * Low limit cannot be less than `-0.9999`. High limit cannot be greater than `1000`.
3993
+ */
3994
+ productivity_limits?: EffectValueRange;
3995
+ /**
3996
+ * Limits total quality effect value.
3997
+ *
3998
+ * Low limit cannot be less than `-1000`. High limit cannot be greater than `1000`.
3999
+ */
4000
+ quality_limits?: EffectValueRange;
4001
+ /**
4002
+ * Limits total speed effect value.
4003
+ *
4004
+ * Low limit cannot be less than `-0.9999`. High limit cannot be greater than `1000`.
4005
+ */
4006
+ speed_limits?: EffectValueRange;
3798
4007
  uses_beacon_effects?: boolean;
3799
4008
  uses_module_effects?: boolean;
3800
4009
  /**
@@ -3860,17 +4069,19 @@ type EffectTypeLimitation = (/**
3860
4069
  */
3861
4070
  'quality')[];
3862
4071
  /**
3863
- * Precision is ignored beyond two decimals - `0.567` results in `0.56` and means 56% etc. Values can range from `-327.68` to `327.67`. Numbers outside of this range will wrap around.
3864
- *
3865
- * Quality values are multiplied by {@link QualityPrototype::next_probability | prototype:QualityPrototype::next_probability}. For example, if a module's quality effect is 0.2 and the current quality's next_probability is 0.1, then the chance to get the next quality item is 2%.
4072
+ * Precision is ignored beyond four decimals - `0.56789` results in `0.5678` and means 56.78% etc. Values can range from `-1000.0000` to `1000.0000`.
3866
4073
  * @example ```
3867
4074
  {speed = 0.07} -- 7% bonus
3868
4075
  ```
3869
4076
  * @example ```
3870
- {quality = 0.25} -- multiplied by quality normal next_probability = 0.1 -> 2.5% bonus
4077
+ {quality = 0.025} -- 2.5% bonus
3871
4078
  ```
3872
4079
  */
3873
4080
  type EffectValue = float;
4081
+ interface EffectValueRange {
4082
+ high?: EffectValue;
4083
+ low?: EffectValue;
4084
+ }
3874
4085
  type EffectVariation = /**
3875
4086
  * Valid only when {@link expansion_shaders | prototype:FeatureFlags::expansion_shaders} feature flag is enabled.
3876
4087
  */
@@ -3917,7 +4128,7 @@ interface ElectricEnergySource extends BaseEnergySource {
3917
4128
  */
3918
4129
  buffer_capacity?: Energy;
3919
4130
  /**
3920
- * How much energy (per second) will be continuously removed from the energy buffer. In-game, this is shown in the tooltip as "Min. [Minimum] Consumption". Applied as a constant consumption-per-tick, even when the entity has the property {@link active | runtime:LuaEntity::active} set to `false`.
4131
+ * How much energy (per second) will be continuously removed from the energy buffer. In-game, this is shown in the tooltip as "Min. [Minimum] Consumption". Applied as a constant consumption-per-tick, even when the entity is not {@link active | runtime:LuaEntity::active}.
3921
4132
  * @example ```
3922
4133
  drain = "1kW"
3923
4134
  ```
@@ -3969,7 +4180,10 @@ type ElectricUsagePriority = /**
3969
4180
  'solar' | /**
3970
4181
  * Can only be used by {@link LampPrototype | prototype:LampPrototype}, will be ignored otherwise.
3971
4182
  */
3972
- 'lamp';
4183
+ 'lamp' | /**
4184
+ * Can only be used by {@link ElectricEnergyInterfacePrototype | prototype:ElectricEnergyInterfacePrototype}, will be ignored otherwise.
4185
+ */
4186
+ 'dynamic';
3973
4187
  /**
3974
4188
  * If this is loaded as a single ElementImageSetLayer, it gets used as `base`.
3975
4189
  */
@@ -4135,7 +4349,13 @@ type ElementImageSetLayer = {
4135
4349
  top_width?: SpriteSizeType;
4136
4350
  type?: 'none' | 'composition';
4137
4351
  } | Sprite;
4352
+ /**
4353
+ * Root style: `"empty_widget"`
4354
+ */
4138
4355
  interface EmptyWidgetStyleSpecificationBase extends BaseStyleSpecification {
4356
+ /**
4357
+ * Required on the root style.
4358
+ */
4139
4359
  graphical_set?: ElementImageSet;
4140
4360
  type: string;
4141
4361
  }
@@ -4158,11 +4378,18 @@ interface EnemyExpansionSettings {
4158
4378
  building_coefficient: double;
4159
4379
  enabled: boolean;
4160
4380
  enemy_building_influence_radius: uint32;
4381
+ /**
4382
+ * Exponential factor used to determine the size of the settler group based on the evolution factor. The size is calculated as: `size = random(min_size, max_size) * (evolution_group_size_factor ^ evolution_factor)`
4383
+ */
4384
+ evolution_group_size_factor: double;
4161
4385
  friendly_base_influence_radius: uint32;
4162
4386
  /**
4163
4387
  * A chunk has to have at most this much percent unbuildable tiles for it to be considered a candidate. This is to avoid chunks full of water to be marked as candidates.
4164
4388
  */
4165
4389
  max_colliding_tiles_coefficient: double;
4390
+ /**
4391
+ * In ticks.
4392
+ */
4166
4393
  max_expansion_cooldown: uint32;
4167
4394
  /**
4168
4395
  * Distance in chunks from the furthest base around. This prevents expansions from reaching too far into the player's territory.
@@ -4172,12 +4399,16 @@ interface EnemyExpansionSettings {
4172
4399
  * Ticks to expand to a single position for a base is used. Cooldown is calculated as follows: `cooldown = lerp(max_expansion_cooldown, min_expansion_cooldown, -e^2 + 2 * e)` where `lerp` is the linear interpolation function, and e is the current evolution factor.
4173
4400
  */
4174
4401
  min_expansion_cooldown: uint32;
4402
+ /**
4403
+ * Distance in chunks from the furthest base around to prevent expansions from being too close to existing bases.
4404
+ */
4405
+ min_expansion_distance: uint32;
4175
4406
  neighbouring_base_chunk_coefficient: double;
4176
4407
  neighbouring_chunk_coefficient: double;
4177
4408
  other_base_coefficient: double;
4178
4409
  settler_group_max_size: uint32;
4179
4410
  /**
4180
- * Size of the group that goes to build new base (the game interpolates between min size and max size based on evolution factor).
4411
+ * Size of the group that goes to build new base.
4181
4412
  */
4182
4413
  settler_group_min_size: uint32;
4183
4414
  }
@@ -4351,6 +4582,9 @@ type EntityPrototypeFlags = (/**
4351
4582
  * The entity can not be used in blueprints.
4352
4583
  */
4353
4584
  'not-blueprintable' | /**
4585
+ * Always show the entity in selection lists/Factoriopedia.
4586
+ */
4587
+ 'always-show' | /**
4354
4588
  * Hides the alt-info of an entity in alt-mode, for example the recipe icon.
4355
4589
  */
4356
4590
  'hide-alt-info' | /**
@@ -4374,10 +4608,19 @@ type EntityPrototypeFlags = (/**
4374
4608
  'not-upgradable' | /**
4375
4609
  * The entity is not shown in the kill statistics.
4376
4610
  */
4377
- 'not-in-kill-statistics' | 'building-direction-16-way' | 'snap-to-rail-support-spot' | /**
4378
- * The entity is not shown in the made in property of recipe tooltips.
4611
+ 'not-in-kill-statistics' | 'building-direction-16-way' | /**
4612
+ * For entities with control behavior that supports logistic connection, if this flag is set then entity will not be able to connect to logistic network.
4613
+ */
4614
+ 'no-logistic-connection' | 'snap-to-rail-support-spot' | /**
4615
+ * The entity is not shown in the made in property of recipe tooltips and Factoriopedia.
4616
+ */
4617
+ 'not-in-made-in' | /**
4618
+ * The entity is not shown in the bonus GUI.
4619
+ */
4620
+ 'not-in-bonus-gui' | /**
4621
+ * The entity is not shown in the mined-by tooltip for resources.
4379
4622
  */
4380
- 'not-in-made-in')[];
4623
+ 'not-in-mined-by')[];
4381
4624
  /**
4382
4625
  * How far (in tiles) entities should be rendered outside the visible area of the screen.
4383
4626
  */
@@ -4399,7 +4642,7 @@ interface EntityRendererSearchBoxLimits {
4399
4642
  */
4400
4643
  top: uint8;
4401
4644
  }
4402
- type EntityStatus = 'working' | 'normal' | 'ghost' | 'not-plugged-in-electric-network' | 'networks-connected' | 'networks-disconnected' | 'no-ammo' | 'waiting-for-target-to-be-built' | 'waiting-for-train' | 'no-power' | 'low-temperature' | 'charging' | 'discharging' | 'fully-charged' | 'no-fuel' | 'no-food' | 'out-of-logistic-network' | 'no-recipe' | 'no-ingredients' | 'no-input-fluid' | 'no-research-in-progress' | 'no-minable-resources' | 'low-input-fluid' | 'low-power' | 'not-connected-to-rail' | 'cant-divide-segments' | 'recharging-after-power-outage' | 'no-modules-to-transmit' | 'disabled-by-control-behavior' | 'opened-by-circuit-network' | 'closed-by-circuit-network' | 'disabled-by-script' | 'disabled' | 'turned-off-during-daytime' | 'fluid-ingredient-shortage' | 'item-ingredient-shortage' | 'full-output' | 'not-enough-space-in-output' | 'full-burnt-result-output' | 'marked-for-deconstruction' | 'missing-required-fluid' | 'missing-science-packs' | 'waiting-for-source-items' | 'waiting-for-space-in-destination' | 'preparing-rocket-for-launch' | 'waiting-to-launch-rocket' | 'waiting-for-space-in-platform-hub' | 'launching-rocket' | 'thrust-not-required' | 'not-enough-thrust' | 'on-the-way' | 'waiting-in-orbit' | 'waiting-for-rocket-to-arrive' | 'no-path' | 'broken' | 'none' | 'frozen' | 'paused' | 'not-connected-to-hub-or-pad' | 'computing-navigation' | 'no-filter' | 'waiting-at-stop' | 'destination-stop-full' | 'pipeline-overextended' | 'no-spot-seedable-by-inputs' | 'waiting-for-plants-to-grow' | 'recipe-not-researched';
4645
+ type EntityStatus = 'working' | 'normal' | 'ghost' | 'not-plugged-in-electric-network' | 'networks-connected' | 'networks-disconnected' | 'no-ammo' | 'waiting-for-target-to-be-built' | 'waiting-for-train' | 'no-power' | 'low-temperature' | 'charging' | 'discharging' | 'fully-charged' | 'no-fuel' | 'no-food' | 'out-of-logistic-network' | 'no-recipe' | 'no-ingredients' | 'no-input-fluid' | 'no-research-in-progress' | 'no-minable-resources' | 'low-input-fluid' | 'low-power' | 'not-connected-to-rail' | 'cant-divide-segments' | 'recharging-after-power-outage' | 'no-modules-to-transmit' | 'disabled-by-control-behavior' | 'opened-by-circuit-network' | 'closed-by-circuit-network' | 'disabled-by-script' | 'disabled' | 'turned-off-during-daytime' | 'fluid-ingredient-shortage' | 'item-ingredient-shortage' | 'full-output' | 'not-enough-space-in-output' | 'full-burnt-result-output' | 'marked-for-deconstruction' | 'missing-required-fluid' | 'missing-science-packs' | 'waiting-for-source-items' | 'waiting-for-space-in-destination' | 'preparing-rocket-for-launch' | 'waiting-to-launch-rocket' | 'waiting-for-space-in-platform-hub' | 'launching-rocket' | 'thrust-not-required' | 'not-enough-thrust' | 'on-the-way' | 'waiting-in-orbit' | 'waiting-for-rocket-to-arrive' | 'waiting-to-clear-drop-slots' | 'no-path' | 'broken' | 'none' | 'frozen' | 'paused' | 'not-connected-to-hub-or-pad' | 'too-far-from-pad-to-unload' | 'computing-navigation' | 'no-filter' | 'waiting-at-stop' | 'waiting-for-upgrade' | 'destination-stop-full' | 'pipeline-overextended' | 'no-spot-seedable-by-inputs' | 'waiting-for-plants-to-grow' | 'recipe-not-researched' | 'armed';
4403
4646
  interface EntityTransferTipTrigger extends CountBasedTipTrigger {
4404
4647
  transfer?: 'in' | 'out';
4405
4648
  type: 'entity-transfer';
@@ -4485,6 +4728,8 @@ interface FastReplaceTipTrigger extends CountBasedTipTrigger {
4485
4728
  }
4486
4729
  /**
4487
4730
  * A dictionary of feature flags and their status. It can be used to adjust prototypes based on whether the feature flags are enabled. It is accessible through the global object named `feature_flags`.
4731
+ *
4732
+ * See the {@link mod structure | auxiliary:mod-structure} documentation for more information on what each feature flag affects.
4488
4733
  * @example ```
4489
4734
  -- sets coal to spoil only when the spoiling feature flag is enabled
4490
4735
  if feature_flags["spoiling"] then
@@ -4493,6 +4738,7 @@ end
4493
4738
  ```
4494
4739
  */
4495
4740
  interface FeatureFlags {
4741
+ expansion: boolean;
4496
4742
  expansion_shaders: boolean;
4497
4743
  freezing: boolean;
4498
4744
  quality: boolean;
@@ -4509,6 +4755,8 @@ interface FeatureFlags {
4509
4755
  * - **base**: A path starting with `__base__` will access the resources in the base mod in data/base directory. These resources are usually available, as long as the base mod isn't removed/deactivated.
4510
4756
  *
4511
4757
  * - **mod path**: The format `__<mod-name>__` is placeholder for root of any other mod (mods/<mod-name>), and is accessible as long as the mod is active.
4758
+ *
4759
+ * Relative paths using `..` are not supported.
4512
4760
  * @example ```
4513
4761
  filename = "__base__/graphics/entity/accumulator/accumulator.png"
4514
4762
  ```
@@ -4520,10 +4768,22 @@ type FileName = string;
4520
4768
  interface FlipEntityTipTrigger extends CountBasedTipTrigger {
4521
4769
  type: 'flip-entity';
4522
4770
  }
4771
+ /**
4772
+ * Root style: `"flow"`
4773
+ */
4523
4774
  interface FlowStyleSpecification extends BaseStyleSpecification {
4775
+ /**
4776
+ * Required on the root style.
4777
+ */
4524
4778
  horizontal_spacing?: int32;
4779
+ /**
4780
+ * Required on the root style.
4781
+ */
4525
4782
  max_on_row?: int32;
4526
4783
  type: 'flow_style';
4784
+ /**
4785
+ * Required on the root style.
4786
+ */
4527
4787
  vertical_spacing?: int32;
4528
4788
  }
4529
4789
  /**
@@ -4565,10 +4825,6 @@ interface FluidBox {
4565
4825
  * Can be used to specify which fluid is allowed to enter this fluid box. See {@link here | https://forums.factorio.com/viewtopic.php?f=28&t=46302}.
4566
4826
  */
4567
4827
  filter?: FluidID;
4568
- /**
4569
- * Hides the blue input/output arrows and icons at each connection point.
4570
- */
4571
- hide_connection_info?: boolean;
4572
4828
  /**
4573
4829
  * The max extent that a pipeline with this fluidbox can span. A given pipeline's extent is calculated as the min extent of all the fluidboxes that comprise it.
4574
4830
  */
@@ -4668,11 +4924,16 @@ interface FluidEnergySource extends BaseEnergySource {
4668
4924
  * Only loaded if `burns_fluid` is `false`.
4669
4925
  */
4670
4926
  maximum_temperature?: float;
4927
+ output_fluid_box?: FluidBox;
4671
4928
  /**
4672
4929
  * If set to `true`, the energy source will consume as much fluid as required to produce the desired power, otherwise it will consume as much as it is allowed to, wasting any excess.
4673
4930
  */
4674
4931
  scale_fluid_usage?: boolean;
4675
4932
  smoke?: SmokeSource[];
4933
+ /**
4934
+ * Fluid and amount produced per 1 unit of fluid consumed. Only used when `output_fluid_box` is defined. If this value is not provided, {@link FluidPrototype::spent_fluid | prototype:FluidPrototype::spent_fluid} will be used based on the input fluid being consumed.
4935
+ */
4936
+ spent_fluid?: SpentFluidSpecification;
4676
4937
  type: 'fluid';
4677
4938
  }
4678
4939
  type FluidFlowDirection = 'input-output' | 'input' | 'output';
@@ -4721,6 +4982,12 @@ interface FluidIngredientPrototype {
4721
4982
  * The name of a {@link FluidPrototype | prototype:FluidPrototype}.
4722
4983
  */
4723
4984
  name: FluidID;
4985
+ /**
4986
+ * Additional fluid boxes that will be also used by this fluid ingredient. If a machine does not have a fluid box with that index, then this index will be silently skipped without making recipe uncraftable.
4987
+ *
4988
+ * Only loaded if `fluidbox_index` is defined.
4989
+ */
4990
+ optional_fluidbox_indexes?: uint32[];
4724
4991
  /**
4725
4992
  * Sets the expected temperature of the fluid ingredient.
4726
4993
  */
@@ -4730,7 +4997,7 @@ interface FluidIngredientPrototype {
4730
4997
  /**
4731
4998
  * A fluid product definition.
4732
4999
  */
4733
- interface FluidProductPrototype {
5000
+ interface FluidProductPrototype extends ProductPrototypeBase {
4734
5001
  /**
4735
5002
  * Can not be `< 0`.
4736
5003
  */
@@ -4751,6 +5018,10 @@ interface FluidProductPrototype {
4751
5018
  * Used to specify which {@link CraftingMachinePrototype::fluid_boxes | prototype:CraftingMachinePrototype::fluid_boxes} this product should use. It will use this one fluidbox. The index is 1-based and separate for input and output fluidboxes.
4752
5019
  */
4753
5020
  fluidbox_index?: uint32;
5021
+ /**
5022
+ * Used to set crafting machine fluidbox volumes. Must be at least 1.
5023
+ */
5024
+ fluidbox_multiplier?: uint8;
4754
5025
  /**
4755
5026
  * Amount that should be deducted from any productivity induced bonus crafts.
4756
5027
  *
@@ -4772,27 +5043,17 @@ interface FluidProductPrototype {
4772
5043
  */
4773
5044
  name: FluidID;
4774
5045
  /**
4775
- * Value between 0 and 1, `0` for 0% chance and `1` for 100% chance.
5046
+ * Additional fluid boxes that will be also used by this fluid product. If a machine does not have a fluid box with that index, then this index will be silently skipped without making recipe uncraftable.
4776
5047
  *
4777
- * The effect of probability is no product, or a linear distribution on [min, max]. For a recipe with probability `p`, amount_min `min`, and amount_max `max`, the Expected Value of this product can be expressed as `p * (0.5 * (max + min))`. This is what will be shown in a recipe tooltip. The effect of `ignored_by_productivity` on the product is not shown.
4778
- *
4779
- * When `amount_min` and `amount_max` are not provided, `amount` applies as min and max. The Expected Value simplifies to `p * amount`, providing `0` product, or `amount` product, on recipe completion.
4780
- */
4781
- probability?: double;
4782
- /**
4783
- * When hovering over a recipe in the crafting menu the recipe tooltip will be shown. An additional item tooltip will be shown for every product, as a separate tooltip, if the item tooltip has a description and/or properties to show and if `show_details_in_recipe_tooltip` is `true`.
5048
+ * Only loaded if `fluidbox_index` is defined.
4784
5049
  */
4785
- show_details_in_recipe_tooltip?: boolean;
5050
+ optional_fluidbox_indexes?: uint32[];
4786
5051
  /**
4787
5052
  * The temperature of the fluid product.
4788
5053
  */
4789
5054
  temperature?: float;
4790
5055
  type: 'fluid';
4791
5056
  }
4792
- interface FluidWagonConnectorGraphics {
4793
- load_animations: PumpConnectorGraphics;
4794
- unload_animations: PumpConnectorGraphics;
4795
- }
4796
5057
  interface FogEffectProperties {
4797
5058
  color1?: Color;
4798
5059
  color2?: Color;
@@ -4926,18 +5187,48 @@ type ForceCondition = /**
4926
5187
  * The non-same forces pass.
4927
5188
  */
4928
5189
  'not-same';
5190
+ /**
5191
+ * Root style: `"frame"`
5192
+ */
4929
5193
  interface FrameStyleSpecification extends BaseStyleSpecification {
4930
5194
  background_graphical_set?: ElementImageSet;
5195
+ /**
5196
+ * Required on the root style.
5197
+ */
4931
5198
  border?: BorderImageSet;
5199
+ /**
5200
+ * Required on the root style.
5201
+ */
4932
5202
  drag_by_title?: boolean;
5203
+ /**
5204
+ * Required on the root style.
5205
+ */
4933
5206
  graphical_set?: ElementImageSet;
4934
5207
  header_background?: ElementImageSet;
5208
+ /**
5209
+ * Required on the root style.
5210
+ */
4935
5211
  header_filler_style?: EmptyWidgetStyleSpecification;
5212
+ /**
5213
+ * Required on the root style.
5214
+ */
4936
5215
  header_flow_style?: HorizontalFlowStyleSpecification;
5216
+ /**
5217
+ * Required on the root style.
5218
+ */
4937
5219
  horizontal_flow_style?: HorizontalFlowStyleSpecification;
5220
+ /**
5221
+ * Required on the root style.
5222
+ */
4938
5223
  title_style?: LabelStyleSpecification;
4939
5224
  type: 'frame_style';
5225
+ /**
5226
+ * Required on the root style.
5227
+ */
4940
5228
  use_header_filler?: boolean;
5229
+ /**
5230
+ * Required on the root style.
5231
+ */
4941
5232
  vertical_flow_style?: VerticalFlowStyleSpecification;
4942
5233
  }
4943
5234
  interface FrequencySizeRichness {
@@ -5026,6 +5317,7 @@ interface GameViewSettings {
5026
5317
  * If this is defined then it sets the default value for all other properties.
5027
5318
  */
5028
5319
  default_show_value?: boolean;
5320
+ hide_tall_entities?: boolean;
5029
5321
  show_alert_gui?: boolean;
5030
5322
  show_controller_gui?: boolean;
5031
5323
  show_crafting_queue?: boolean;
@@ -5034,6 +5326,7 @@ interface GameViewSettings {
5034
5326
  show_hotkey_suggestions?: boolean;
5035
5327
  show_map_view_options?: boolean;
5036
5328
  show_minimap?: boolean;
5329
+ show_pins_gui?: boolean;
5037
5330
  show_quickbar?: boolean;
5038
5331
  show_rail_block_visualisation?: boolean;
5039
5332
  show_research_info?: boolean;
@@ -5049,6 +5342,16 @@ interface GateOverRailBuildTipTrigger extends CountBasedTipTrigger {
5049
5342
  interface GeneratingPowerTipTrigger extends CountBasedTipTrigger {
5050
5343
  type: 'generating-power';
5051
5344
  }
5345
+ interface GeneratorPictureSet {
5346
+ east?: GeneratorPictures;
5347
+ north?: GeneratorPictures;
5348
+ south?: GeneratorPictures;
5349
+ west?: GeneratorPictures;
5350
+ }
5351
+ interface GeneratorPictures {
5352
+ animation?: Animation;
5353
+ frozen_patch?: Sprite;
5354
+ }
5052
5355
  interface GhostShimmerConfig {
5053
5356
  blend_mode: int32;
5054
5357
  distortion: float;
@@ -5137,29 +5440,82 @@ interface GlobalTintEffectProperties {
5137
5440
  zoom_factor: float;
5138
5441
  zoom_intensity: float;
5139
5442
  }
5443
+ /**
5444
+ * Root style: `"glow"`
5445
+ */
5140
5446
  interface GlowStyleSpecification extends BaseStyleSpecification {
5447
+ /**
5448
+ * Required on the root style.
5449
+ */
5141
5450
  image_set?: ElementImageSet;
5142
5451
  type: 'glow_style';
5143
5452
  }
5453
+ /**
5454
+ * Root style: `"graph"`
5455
+ */
5144
5456
  interface GraphStyleSpecification extends BaseStyleSpecification {
5457
+ /**
5458
+ * Required on the root style.
5459
+ */
5145
5460
  background_color?: Color;
5461
+ /**
5462
+ * Required on the root style.
5463
+ */
5146
5464
  data_line_highlight_distance?: uint32;
5147
5465
  /**
5148
5466
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
5467
+ *
5468
+ * Required on the root style.
5149
5469
  */
5150
5470
  font?: string;
5471
+ /**
5472
+ * Required on the root style.
5473
+ */
5151
5474
  graph_right_margin?: uint32;
5475
+ /**
5476
+ * Required on the root style.
5477
+ */
5152
5478
  graph_top_margin?: uint32;
5479
+ /**
5480
+ * Required on the root style.
5481
+ */
5153
5482
  grid_lines_color?: Color;
5483
+ /**
5484
+ * Required on the root style.
5485
+ */
5154
5486
  guide_lines_color?: Color;
5487
+ /**
5488
+ * Required on the root style.
5489
+ */
5155
5490
  horizontal_label_style?: LabelStyleSpecification;
5491
+ /**
5492
+ * Required on the root style.
5493
+ */
5156
5494
  horizontal_labels_margin?: uint32;
5495
+ /**
5496
+ * Required on the root style.
5497
+ */
5157
5498
  line_colors?: Color[];
5499
+ /**
5500
+ * Required on the root style.
5501
+ */
5158
5502
  minimal_horizontal_label_spacing?: uint32;
5503
+ /**
5504
+ * Required on the root style.
5505
+ */
5159
5506
  minimal_vertical_label_spacing?: uint32;
5507
+ /**
5508
+ * Required on the root style.
5509
+ */
5160
5510
  selection_dot_radius?: uint32;
5161
5511
  type: 'graph_style';
5512
+ /**
5513
+ * Required on the root style.
5514
+ */
5162
5515
  vertical_label_style?: LabelStyleSpecification;
5516
+ /**
5517
+ * Required on the root style.
5518
+ */
5163
5519
  vertical_labels_margin?: uint32;
5164
5520
  }
5165
5521
  interface GroupAttackTipTrigger extends CountBasedTipTrigger {
@@ -5197,7 +5553,7 @@ interface HeatBuffer {
5197
5553
  /**
5198
5554
  * May contain up to 32 connections.
5199
5555
  */
5200
- connections?: HeatConnection[];
5556
+ connections?: HeatConnectionDefinition[];
5201
5557
  default_temperature?: double;
5202
5558
  heat_glow?: Sprite4Way;
5203
5559
  heat_picture?: Sprite4Way;
@@ -5219,7 +5575,7 @@ interface HeatBuffer {
5219
5575
  /**
5220
5576
  * Defines the connections for {@link HeatEnergySource | prototype:HeatEnergySource} and {@link HeatBuffer | prototype:HeatBuffer}.
5221
5577
  */
5222
- interface HeatConnection {
5578
+ interface HeatConnectionDefinition {
5223
5579
  /**
5224
5580
  * The "outward" direction of this heat connection. For a connection to succeed, the other heat connection must face the opposite direction (a south-facing connection needs a north-facing connection to succeed). A connection rotates with the entity.
5225
5581
  */
@@ -5233,7 +5589,7 @@ interface HeatEnergySource extends BaseEnergySource {
5233
5589
  /**
5234
5590
  * May contain up to 32 connections.
5235
5591
  */
5236
- connections?: HeatConnection[];
5592
+ connections?: HeatConnectionDefinition[];
5237
5593
  default_temperature?: double;
5238
5594
  emissions_per_minute?: Record<AirbornePollutantID, double>;
5239
5595
  heat_glow?: Sprite4Way;
@@ -5255,10 +5611,19 @@ interface HeatEnergySource extends BaseEnergySource {
5255
5611
  type: 'heat';
5256
5612
  }
5257
5613
  type HorizontalAlign = 'left' | 'center' | 'right';
5614
+ /**
5615
+ * Root style: `"horizontal_flow"`
5616
+ */
5258
5617
  interface HorizontalFlowStyleSpecification extends BaseStyleSpecification {
5618
+ /**
5619
+ * Required on the root style.
5620
+ */
5259
5621
  horizontal_spacing?: int32;
5260
5622
  type: 'horizontal_flow_style';
5261
5623
  }
5624
+ /**
5625
+ * Root style: `"horizontal_scrollbar"`
5626
+ */
5262
5627
  interface HorizontalScrollBarStyleSpecification extends ScrollBarStyleSpecification {
5263
5628
  type: 'horizontal_scrollbar_style';
5264
5629
  }
@@ -5386,6 +5751,7 @@ interface IconSequencePositioning {
5386
5751
  shift?: Vector;
5387
5752
  }
5388
5753
  /**
5754
+ * Root style: `"image"`
5389
5755
  * @example ```
5390
5756
  data.raw["gui-style"]["default"]["stretchy-sprite"] =
5391
5757
  {
@@ -5397,8 +5763,14 @@ data.raw["gui-style"]["default"]["stretchy-sprite"] =
5397
5763
  ```
5398
5764
  */
5399
5765
  interface ImageStyleSpecification extends BaseStyleSpecification {
5766
+ /**
5767
+ * Required on the root style.
5768
+ */
5400
5769
  graphical_set?: ElementImageSet;
5401
5770
  invert_colors_of_picture_when_hovered_or_toggled?: boolean;
5771
+ /**
5772
+ * Required on the root style.
5773
+ */
5402
5774
  stretch_image_to_widget_size?: boolean;
5403
5775
  type: 'image_style';
5404
5776
  }
@@ -5459,7 +5831,7 @@ interface InterruptibleSound {
5459
5831
  }
5460
5832
  interface InventoryWithCustomStackSizeSpecification {
5461
5833
  /**
5462
- * Must be >= stack_size_min.
5834
+ * Must be >= stack_size_min and <= 1000000000.
5463
5835
  */
5464
5836
  stack_size_max?: ItemCountType;
5465
5837
  /**
@@ -5477,7 +5849,7 @@ interface InventoryWithCustomStackSizeSpecification {
5477
5849
  with_bar?: boolean;
5478
5850
  }
5479
5851
  interface InvokeTileEffectTriggerEffectItem extends TriggerEffectItem {
5480
- tile_collision_mask?: CollisionMaskConnector;
5852
+ tile_collision_mask?: TileCollisionMaskConnector;
5481
5853
  type: 'invoke-tile-trigger';
5482
5854
  }
5483
5855
  type ItemCountType = uint32;
@@ -5535,12 +5907,46 @@ interface ItemIngredientPrototype {
5535
5907
  */
5536
5908
  ignored_by_stats?: uint16;
5537
5909
  name: ItemID;
5538
- type: 'item';
5910
+ /**
5911
+ * Amount of quality levels up or down this ingredient will be adjusted.
5912
+ *
5913
+ * This is the difference between the quality of the recipe and the quality of the ingredient. For a vanilla example, when legendary is selected for recipe quality, an ingredient with quality change `-1` would need to be epic quality, not legendary.
5914
+ *
5915
+ * If `quality_min` is equal to `quality_max`, this is silently set to `0` as it does not make sense to define a quality jump when ingredient quality is fixed to one value for all qualities of recipe.
5916
+ */
5917
+ quality_change?: int8;
5918
+ /**
5919
+ * Highest possible quality of ingredient that will be accepted. If not provided but `quality_min` is given, it will be set to the highest quality from a quality chain to which `quality_min` belongs. Must belong to the same quality chain as `quality_min` and be equal or better, meaning later in the chain when following {@link QualityPrototype::next | prototype:QualityPrototype::next}.
5920
+ */
5921
+ quality_max?: QualityID;
5922
+ /**
5923
+ * Lowest possible quality of ingredient that will be accepted. If not provided but `quality_max` is given, it will be set to the lowest quality from a quality chain to which `quality_max` belongs. When set, if the recipe would require ingredient from a different quality chain (due to quality of the recipe or quality roll), `quality_min` will be used for the quality instead.
5924
+ */
5925
+ quality_min?: QualityID;
5926
+ /**
5927
+ * Controls how much spoil percent of this ingredient should influence spoil percent of spoilable products.
5928
+ *
5929
+ * Must be in range `[0, 1]`.
5930
+ */
5931
+ spoil_weight?: float;
5932
+ type: 'item';
5539
5933
  }
5540
5934
  /**
5541
5935
  * An item product definition.
5542
5936
  */
5543
- interface ItemProductPrototype {
5937
+ interface ItemProductPrototype extends ProductPrototypeBase {
5938
+ /**
5939
+ * Whether quality roll affects quality of products given. If set to `false`, result of a quality roll will be ignored and an item of quality based on quality of selected recipe will be given.
5940
+ *
5941
+ * Note: This may not work as expected outside of recipes (e.g. in mining drills).
5942
+ */
5943
+ affected_by_quality?: boolean;
5944
+ /**
5945
+ * When set to true, the item produced will be produced fresh (using percent_spoiled) even when ingredients were spoiled.
5946
+ *
5947
+ * Note: This may not work as expected outside of recipes (e.g. in mining drills).
5948
+ */
5949
+ always_fresh?: boolean;
5544
5950
  amount?: uint16;
5545
5951
  /**
5546
5952
  * Only loaded, and mandatory if `amount` is not defined.
@@ -5581,17 +5987,31 @@ interface ItemProductPrototype {
5581
5987
  */
5582
5988
  percent_spoiled?: float;
5583
5989
  /**
5584
- * Value between 0 and 1, `0` for 0% chance and `1` for 100% chance.
5990
+ * Amount of quality levels up or down this product will be adjusted.
5585
5991
  *
5586
- * The effect of probability is no product, or a linear distribution on [min, max]. For a recipe with probability `p`, amount_min `min`, and amount_max `max`, the Expected Value of this product can be expressed as `p * (0.5 * (max + min))`. This is what will be shown in a recipe tooltip. The effect of `ignored_by_productivity` on the product is not shown.
5992
+ * This is the difference between the quality of the recipe and the quality of the product. For a vanilla example, when epic is selected for recipe quality, a product with quality change `1` would be legendary quality, not epic.
5587
5993
  *
5588
- * When `amount_min` and `amount_max` are not provided, `amount` applies as min and max. The Expected Value simplifies to `p * amount`, providing `0` product, or `amount` product, on recipe completion.
5994
+ * Note: This may not work as expected outside of recipes (e.g. in mining drills).
5589
5995
  */
5590
- probability?: double;
5996
+ quality_change?: int8;
5591
5997
  /**
5592
- * When hovering over a recipe in the crafting menu the recipe tooltip will be shown. An additional item tooltip will be shown for every product, as a separate tooltip, if the item tooltip has a description and/or properties to show and if `show_details_in_recipe_tooltip` is `true`.
5998
+ * Highest possible quality of item that will be given. If not provided but `quality_min` is given, it will be set to the highest quality from a quality chain to which `quality_min` belongs. Must belong to the same quality chain as `quality_min` and be equal or better, meaning later in the chain when following {@link QualityPrototype::next | prototype:QualityPrototype::next}.
5999
+ *
6000
+ * Note: If this is used outside of recipes (e.g. by mining drills), setting this to a custom quality chain will discard the quality roll.
5593
6001
  */
5594
- show_details_in_recipe_tooltip?: boolean;
6002
+ quality_max?: QualityID;
6003
+ /**
6004
+ * Lowest possible quality of item that will be given. If not provided but `quality_max` is given, it will be set to the lowest quality from a quality chain to which `quality_max` belongs. When set, if the recipe would produce items from a different quality chain (due to quality of the recipe or quality roll), `quality_min` will be used for the quality instead.
6005
+ *
6006
+ * Note: If this is used outside of recipes (e.g. by mining drills), setting this to a custom quality chain will discard the quality roll.
6007
+ */
6008
+ quality_min?: QualityID;
6009
+ /**
6010
+ * When set to true, if the recipe successfully finishes crafting without spoiling, the result is produced fresh (non-spoiled).
6011
+ *
6012
+ * Note: This may not work as expected outside of recipes (e.g. in mining drills).
6013
+ */
6014
+ reset_freshness_on_craft?: boolean;
5595
6015
  type: 'item';
5596
6016
  }
5597
6017
  /**
@@ -5604,6 +6024,9 @@ type ItemPrototypeFlags = (/**
5604
6024
  * Whether the trash-unrequested feature skips this item.
5605
6025
  */
5606
6026
  'excluded-from-trash-unrequested' | /**
6027
+ * Whether the rocket passenger feature skips this item when checking lift weight.
6028
+ */
6029
+ 'excluded-from-character-lift-weight' | /**
5607
6030
  * Always show the item in selection lists (item filter, logistic request etc.) even when locked recipe for that item is present.
5608
6031
  */
5609
6032
  'always-show' | /**
@@ -5630,7 +6053,7 @@ type ItemPrototypeFlags = (/**
5630
6053
  'spawnable' | 'spoil-result' | /**
5631
6054
  * Controls whether the spoil time ignores the spoil time modifier in the {@link DifficultySettings | runtime:DifficultySettings}.
5632
6055
  */
5633
- 'ignore-spoil-time-modifier')[];
6056
+ 'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world')[];
5634
6057
  type ItemStackIndex = uint16;
5635
6058
  /**
5636
6059
  * The name of an {@link ItemSubGroup | prototype:ItemSubGroup}.
@@ -5659,26 +6082,52 @@ interface ItemToPlace {
5659
6082
  item: ItemID;
5660
6083
  }
5661
6084
  interface KillTipTrigger extends CountBasedTipTrigger {
6085
+ /**
6086
+ * If this is not set, any damage type will fulfill the trigger condition.
6087
+ */
5662
6088
  damage_type?: DamageTypeID;
5663
6089
  entity?: EntityID;
5664
6090
  match_type_only?: boolean;
5665
6091
  type: 'kill';
5666
6092
  }
6093
+ /**
6094
+ * Root style: `"label"`
6095
+ */
5667
6096
  interface LabelStyleSpecification extends BaseStyleSpecification {
5668
6097
  clicked_font_color?: Color;
5669
6098
  disabled_font_color?: Color;
5670
6099
  /**
5671
6100
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
6101
+ *
6102
+ * Required on the root style.
5672
6103
  */
5673
6104
  font?: string;
6105
+ /**
6106
+ * Required on the root style.
6107
+ */
5674
6108
  font_color?: Color;
5675
6109
  game_controller_hovered_font_color?: Color;
5676
6110
  hovered_font_color?: Color;
5677
6111
  parent_hovered_font_color?: Color;
6112
+ /**
6113
+ * Required on the root style.
6114
+ */
5678
6115
  rich_text_highlight_error_color?: Color;
6116
+ /**
6117
+ * Required on the root style.
6118
+ */
5679
6119
  rich_text_highlight_ok_color?: Color;
6120
+ /**
6121
+ * Required on the root style.
6122
+ */
5680
6123
  rich_text_highlight_warning_color?: Color;
6124
+ /**
6125
+ * Required on the root style.
6126
+ */
5681
6127
  rich_text_setting?: RichTextSetting;
6128
+ /**
6129
+ * Required on the root style.
6130
+ */
5682
6131
  single_line?: boolean;
5683
6132
  type: 'label_style';
5684
6133
  underlined?: boolean;
@@ -5711,6 +6160,15 @@ type LayeredSound = {
5711
6160
  type LayeredSprite = {
5712
6161
  render_layer: RenderLayer;
5713
6162
  } | LayeredSprite[];
6163
+ /**
6164
+ * Sprites for the 4 major directions of the entity. If this is loaded as a single LayeredSprite, it applies to all directions.
6165
+ */
6166
+ type LayeredSprite4Way = {
6167
+ east: LayeredSprite;
6168
+ north: LayeredSprite;
6169
+ south: LayeredSprite;
6170
+ west: LayeredSprite;
6171
+ } | LayeredSprite;
5714
6172
  type LayeredSpriteVariations = LayeredSprite[];
5715
6173
  /**
5716
6174
  * Specifies a light source. This is loaded either as a single light source or as an array of light sources.
@@ -5939,7 +6397,13 @@ interface LightningShaderConfiguration {
5939
6397
  interface LimitChestTipTrigger extends CountBasedTipTrigger {
5940
6398
  type: 'limit-chest';
5941
6399
  }
6400
+ /**
6401
+ * Root style: `"line"`
6402
+ */
5942
6403
  interface LineStyleSpecification extends BaseStyleSpecification {
6404
+ /**
6405
+ * Required on the root style.
6406
+ */
5943
6407
  border?: BorderImageSet;
5944
6408
  type: 'line_style';
5945
6409
  }
@@ -5986,12 +6450,21 @@ interface LinkedBeltStructure {
5986
6450
  /**
5987
6451
  * The internal name of a game control (key binding).
5988
6452
  */
5989
- type LinkedGameControl = 'move-up' | 'move-down' | 'move-left' | 'move-right' | 'alternative-gui-move-up' | 'alternative-gui-move-down' | 'alternative-gui-move-left' | 'alternative-gui-move-right' | 'open-character-gui' | 'open-gui' | 'confirm-gui' | 'toggle-free-cursor' | 'mine' | 'build' | 'build-ghost' | 'super-forced-build' | 'clear-cursor' | 'pipette' | 'rotate' | 'reverse-rotate' | 'flip-horizontal' | 'flip-vertical' | 'pick-items' | 'drop-cursor' | 'show-info' | 'shoot-enemy' | 'shoot-selected' | 'next-weapon' | 'toggle-driving' | 'zoom-in' | 'zoom-out' | 'use-item' | 'alternative-use-item' | 'toggle-console' | 'copy-entity-settings' | 'paste-entity-settings' | 'controller-gui-logistics-tab' | 'controller-gui-character-tab' | 'controller-gui-crafting-tab' | 'toggle-rail-layer' | 'select-for-blueprint' | 'select-for-cancel-deconstruct' | 'select-for-super-forced-deconstruct' | 'reverse-select' | 'alt-reverse-select' | 'deselect' | 'cycle-blueprint-forwards' | 'cycle-blueprint-backwards' | 'focus-search' | 'larger-terrain-building-area' | 'smaller-terrain-building-area' | 'remove-pole-cables' | 'build-with-obstacle-avoidance' | 'add-station' | 'add-temporary-station' | 'rename-all' | 'fast-wait-condition' | 'drag-map' | 'move-tag' | 'place-in-chat' | 'place-ping' | 'pin' | 'activate-tooltip' | 'next-surface' | 'previous-surface' | 'cycle-quality-up' | 'cycle-quality-down' | 'scroll-tooltip-up' | 'scroll-tooltip-down' | 'craft' | 'craft-5' | 'craft-all' | 'cancel-craft' | 'cancel-craft-5' | 'cancel-craft-all' | 'pick-item' | 'stack-transfer' | 'inventory-transfer' | 'fast-entity-transfer' | 'cursor-split' | 'stack-split' | 'inventory-split' | 'fast-entity-split' | 'toggle-filter' | 'open-item' | 'copy-inventory-filter' | 'paste-inventory-filter' | 'show-quick-panel' | 'next-quick-panel-page' | 'previous-quick-panel-page' | 'next-quick-panel-tab' | 'previous-quick-panel-tab' | 'rotate-active-quick-bars' | 'next-active-quick-bar' | 'previous-active-quick-bar' | 'quick-bar-button-1' | 'quick-bar-button-2' | 'quick-bar-button-3' | 'quick-bar-button-4' | 'quick-bar-button-5' | 'quick-bar-button-6' | 'quick-bar-button-7' | 'quick-bar-button-8' | 'quick-bar-button-9' | 'quick-bar-button-10' | 'quick-bar-button-1-secondary' | 'quick-bar-button-2-secondary' | 'quick-bar-button-3-secondary' | 'quick-bar-button-4-secondary' | 'quick-bar-button-5-secondary' | 'quick-bar-button-6-secondary' | 'quick-bar-button-7-secondary' | 'quick-bar-button-8-secondary' | 'quick-bar-button-9-secondary' | 'quick-bar-button-10-secondary' | 'action-bar-select-page-1' | 'action-bar-select-page-2' | 'action-bar-select-page-3' | 'action-bar-select-page-4' | 'action-bar-select-page-5' | 'action-bar-select-page-6' | 'action-bar-select-page-7' | 'action-bar-select-page-8' | 'action-bar-select-page-9' | 'action-bar-select-page-10' | 'copy' | 'cut' | 'paste' | 'cycle-clipboard-forwards' | 'cycle-clipboard-backwards' | 'undo' | 'redo' | 'toggle-menu' | 'toggle-map' | 'close-menu' | 'open-technology-gui' | 'production-statistics' | 'logistic-networks' | 'toggle-blueprint-library' | 'open-trains-gui' | 'open-factoriopedia' | 'back' | 'forward' | 'pause-game' | 'confirm-message' | 'previous-mod' | 'connect-train' | 'disconnect-train' | 'submit-feedback' | 'editor-next-variation' | 'editor-previous-variation' | 'editor-clone-item' | 'editor-delete-item' | 'editor-toggle-pause' | 'editor-tick-once' | 'editor-speed-up' | 'editor-speed-down' | 'editor-reset-speed' | 'editor-set-clone-brush-source' | 'editor-set-clone-brush-destination' | 'editor-switch-to-surface' | 'editor-remove-scripting-object' | 'debug-toggle-atlas-gui' | 'debug-toggle-gui-visibility' | 'debug-toggle-debug-settings' | 'debug-toggle-basic' | 'debug-reset-zoom' | 'debug-reset-zoom-2x' | 'toggle-gui-debug' | 'toggle-gui-style-view' | 'toggle-gui-shadows' | 'toggle-gui-glows' | 'open-prototypes-gui' | 'open-prototype-explorer-gui' | 'increase-ui-scale' | 'decrease-ui-scale' | 'reset-ui-scale' | 'slash-editor' | 'toggle-entity' | 'next-player-in-replay' | 'move-blueprint-absolute-grid-up' | 'move-blueprint-absolute-grid-down' | 'move-blueprint-absolute-grid-left' | 'move-blueprint-absolute-grid-right' | 'move-blueprint-entities-up' | 'move-blueprint-entities-down' | 'move-blueprint-entities-left' | 'move-blueprint-entities-right' | 'play-next-track' | 'play-previous-track' | 'pause-resume-music' | /**
6453
+ type LinkedGameControl = 'move-up' | 'move-down' | 'move-left' | 'move-right' | 'alternative-gui-move-up' | 'alternative-gui-move-down' | 'alternative-gui-move-left' | 'alternative-gui-move-right' | 'open-character-gui' | 'open-gui' | 'confirm-gui' | 'toggle-free-cursor' | 'mine' | 'build' | 'build-ghost' | 'super-forced-build' | 'clear-cursor' | 'pipette' | 'rotate' | 'reverse-rotate' | 'flip-horizontal' | 'flip-vertical' | 'pick-items' | 'drop-cursor' | 'show-info' | 'hide-tall-entities' | 'shoot-enemy' | 'shoot-selected' | 'next-weapon' | 'toggle-driving' | 'zoom-in' | 'zoom-out' | 'use-item' | 'alternative-use-item' | 'toggle-console' | 'copy-entity-settings' | 'paste-entity-settings' | 'controller-gui-logistics-tab' | 'controller-gui-character-tab' | 'controller-gui-crafting-tab' | 'toggle-rail-layer' | 'select-for-blueprint' | 'select-for-cancel-deconstruct' | 'select-for-super-forced-deconstruct' | 'reverse-select' | 'alt-reverse-select' | 'deselect' | 'cycle-blueprint-forwards' | 'cycle-blueprint-backwards' | 'focus-search' | 'larger-terrain-building-area' | 'smaller-terrain-building-area' | 'remove-pole-cables' | 'build-with-obstacle-avoidance' | 'add-station' | 'add-temporary-station' | 'rename-all' | 'fast-wait-condition' | 'drag-map' | 'move-tag' | 'place-in-chat' | 'place-ping' | 'pin' | 'activate-tooltip' | 'next-surface' | 'previous-surface' | 'cycle-quality-up' | 'cycle-quality-down' | 'scroll-tooltip-up' | 'scroll-tooltip-down' | 'visualize-entity-fluid-segments' | 'craft' | 'craft-5' | 'craft-all' | 'cancel-craft' | 'cancel-craft-5' | 'cancel-craft-all' | 'pick-item' | 'stack-transfer' | 'inventory-transfer' | 'fast-entity-transfer' | 'cursor-split' | 'stack-split' | 'inventory-split' | 'fast-entity-split' | 'toggle-filter' | 'open-item' | 'copy-inventory-filter' | 'paste-inventory-filter' | 'show-quick-panel' | 'next-quick-panel-page' | 'previous-quick-panel-page' | 'next-quick-panel-tab' | 'previous-quick-panel-tab' | 'rotate-active-quick-bars' | 'next-active-quick-bar' | 'previous-active-quick-bar' | 'quick-bar-button-1' | 'quick-bar-button-2' | 'quick-bar-button-3' | 'quick-bar-button-4' | 'quick-bar-button-5' | 'quick-bar-button-6' | 'quick-bar-button-7' | 'quick-bar-button-8' | 'quick-bar-button-9' | 'quick-bar-button-10' | 'quick-bar-button-1-secondary' | 'quick-bar-button-2-secondary' | 'quick-bar-button-3-secondary' | 'quick-bar-button-4-secondary' | 'quick-bar-button-5-secondary' | 'quick-bar-button-6-secondary' | 'quick-bar-button-7-secondary' | 'quick-bar-button-8-secondary' | 'quick-bar-button-9-secondary' | 'quick-bar-button-10-secondary' | 'action-bar-select-page-1' | 'action-bar-select-page-2' | 'action-bar-select-page-3' | 'action-bar-select-page-4' | 'action-bar-select-page-5' | 'action-bar-select-page-6' | 'action-bar-select-page-7' | 'action-bar-select-page-8' | 'action-bar-select-page-9' | 'action-bar-select-page-10' | 'copy' | 'cut' | 'paste' | 'cycle-clipboard-forwards' | 'cycle-clipboard-backwards' | 'undo' | 'redo' | 'toggle-menu' | 'toggle-map' | 'close-menu' | 'open-technology-gui' | 'production-statistics' | 'logistic-networks' | 'toggle-blueprint-library' | 'open-trains-gui' | 'open-factoriopedia' | 'back' | 'forward' | 'pause-game' | 'confirm-message' | 'previous-mod' | 'connect-train' | 'disconnect-train' | 'submit-feedback' | 'editor-next-variation' | 'editor-previous-variation' | 'editor-clone-item' | 'editor-delete-item' | 'editor-toggle-pause' | 'editor-tick-once' | 'editor-speed-up' | 'editor-speed-down' | 'editor-reset-speed' | 'editor-set-clone-brush-source' | 'editor-set-clone-brush-destination' | 'editor-switch-to-surface' | 'editor-remove-scripting-object' | 'debug-toggle-atlas-gui' | 'debug-toggle-gui-visibility' | 'debug-toggle-debug-settings' | 'debug-toggle-basic' | 'debug-reset-zoom' | 'debug-reset-zoom-2x' | 'toggle-gui-debug' | 'toggle-gui-style-view' | 'toggle-gui-shadows' | 'toggle-gui-glows' | 'open-prototypes-gui' | 'open-prototype-explorer-gui' | 'increase-ui-scale' | 'decrease-ui-scale' | 'reset-ui-scale' | 'slash-editor' | 'toggle-entity' | 'next-player-in-replay' | 'move-blueprint-absolute-grid-up' | 'move-blueprint-absolute-grid-down' | 'move-blueprint-absolute-grid-left' | 'move-blueprint-absolute-grid-right' | 'move-blueprint-entities-up' | 'move-blueprint-entities-down' | 'move-blueprint-entities-left' | 'move-blueprint-entities-right' | 'toggle-blueprint-snap-to-grid' | 'play-next-track' | 'play-previous-track' | 'pause-resume-music' | /**
5990
6454
  * Indicates no linked game control.
5991
6455
  */
5992
6456
  '';
6457
+ /**
6458
+ * Root style: `"list_box"`
6459
+ */
5993
6460
  interface ListBoxStyleSpecification extends BaseStyleSpecification {
6461
+ /**
6462
+ * Required on the root style.
6463
+ */
5994
6464
  item_style?: ButtonStyleSpecification;
6465
+ /**
6466
+ * Required on the root style.
6467
+ */
5995
6468
  scroll_pane_style?: ScrollPaneStyleSpecification;
5996
6469
  type: 'list_box_style';
5997
6470
  }
@@ -6044,24 +6517,7 @@ localised_description = {"", {"item-name.iron-plate"}, ": ", tostring(60)}
6044
6517
  */
6045
6518
  type LocalisedString = string | LocalisedString[];
6046
6519
  type LogisticFilterIndex = uint16;
6047
- /**
6048
- * The items generated when an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype} is killed.
6049
- */
6050
- interface LootItem {
6051
- /**
6052
- * Must be `> 0`.
6053
- */
6054
- count_max?: double;
6055
- count_min?: double;
6056
- /**
6057
- * The item to spawn.
6058
- */
6059
- item: ItemID;
6060
- /**
6061
- * `0` is 0% and `1` is 100%. Must be `> 0`.
6062
- */
6063
- probability?: double;
6064
- }
6520
+ type LogisticMode = 'active-provider' | 'passive-provider' | 'requester' | 'storage' | 'buffer';
6065
6521
  interface LowPowerTipTrigger extends CountBasedTipTrigger {
6066
6522
  type: 'low-power';
6067
6523
  }
@@ -6082,6 +6538,12 @@ interface MainSound {
6082
6538
  match_progress_to_activity?: boolean;
6083
6539
  match_speed_to_activity?: boolean;
6084
6540
  match_volume_to_activity?: boolean;
6541
+ /**
6542
+ * The `sound` is played when the entity has one the specified direction.
6543
+ *
6544
+ * Unused when {@link WorkingSound::persistent | prototype:WorkingSound::persistent} is `true`.
6545
+ */
6546
+ play_for_directions?: defines.direction[];
6085
6547
  /**
6086
6548
  * Array of {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}s, individual names cannot be empty.
6087
6549
  *
@@ -6120,24 +6582,6 @@ interface ManualWireDragTipTrigger extends CountBasedTipTrigger {
6120
6582
  type: 'manual-wire-drag';
6121
6583
  wire_type?: 'red' | 'green' | 'copper';
6122
6584
  }
6123
- interface MapEditorConstants {
6124
- cliff_editor_remove_cliffs_color: Color;
6125
- clone_editor_brush_cursor_preview_tint: Color;
6126
- clone_editor_brush_destination_color: Color;
6127
- clone_editor_brush_source_color: Color;
6128
- clone_editor_brush_world_preview_tint: Color;
6129
- clone_editor_copy_destination_allowed_color: Color;
6130
- clone_editor_copy_destination_not_allowed_color: Color;
6131
- clone_editor_copy_source_color: Color;
6132
- decorative_editor_selection_preview_radius: uint8;
6133
- decorative_editor_selection_preview_tint: Color;
6134
- force_editor_select_area_color: Color;
6135
- script_editor_drag_area_color: Color;
6136
- script_editor_select_area_color: Color;
6137
- tile_editor_area_selection_color: Color;
6138
- tile_editor_selection_preview_radius: uint8;
6139
- tile_editor_selection_preview_tint: Color;
6140
- }
6141
6585
  interface MapGenPreset {
6142
6586
  /**
6143
6587
  * If any setting is not set, it will use the default values.
@@ -6182,6 +6626,10 @@ interface MapGenPresetEnemyEvolutionSettings {
6182
6626
  }
6183
6627
  interface MapGenPresetEnemyExpansionSettings {
6184
6628
  enabled?: boolean;
6629
+ /**
6630
+ * Factor by which the evolution factor influences the size of the settler group
6631
+ */
6632
+ evolution_group_size_factor?: double;
6185
6633
  /**
6186
6634
  * In ticks.
6187
6635
  */
@@ -6194,6 +6642,10 @@ interface MapGenPresetEnemyExpansionSettings {
6194
6642
  * Ticks to expand to a single position for a base is used. Cooldown is calculated as follows: `cooldown = lerp(max_expansion_cooldown, min_expansion_cooldown, -e^2 + 2 * e)` where `lerp` is the linear interpolation function, and e is the current evolution factor.
6195
6643
  */
6196
6644
  min_expansion_cooldown?: uint32;
6645
+ /**
6646
+ * Distance in chunks from the furthest base around to prevent expansions from being too close to existing bases.
6647
+ */
6648
+ min_expansion_distance?: uint32;
6197
6649
  settler_group_max_size?: uint32;
6198
6650
  /**
6199
6651
  * Size of the group that goes to build new base (the game interpolates between min size and max size based on evolution factor).
@@ -6417,6 +6869,13 @@ interface MaterialTextureParameters {
6417
6869
  ```
6418
6870
  */
6419
6871
  type MathExpression = string;
6872
+ interface MaxCargoBayUnloadingDistanceModifier extends SimpleModifier {
6873
+ type: 'max-cargo-bay-unloading-distance';
6874
+ /**
6875
+ * If `false`, do not draw the small "constant" icon over the technology effect icon.
6876
+ */
6877
+ use_icon_overlay_constant?: boolean;
6878
+ }
6420
6879
  interface MaxFailedAttemptsPerTickPerConstructionQueueModifier extends SimpleModifier {
6421
6880
  type: 'max-failed-attempts-per-tick-per-construction-queue';
6422
6881
  /**
@@ -6500,12 +6959,18 @@ interface MinableProperties {
6500
6959
  transfer_entity_health_to_products?: boolean;
6501
6960
  }
6502
6961
  interface MineEntityTechnologyTrigger {
6503
- entity: EntityID;
6962
+ /**
6963
+ * Must contain at least 1 element. The trigger is considered fulfilled if at least one of these entities is mined.
6964
+ */
6965
+ entities: EntityID[];
6504
6966
  type: 'mine-entity';
6505
6967
  }
6506
6968
  interface MineItemByRobotTipTrigger extends CountBasedTipTrigger {
6507
6969
  type: 'mine-item-by-robot';
6508
6970
  }
6971
+ /**
6972
+ * Root style: `"minimap"`
6973
+ */
6509
6974
  interface MinimapStyleSpecification extends EmptyWidgetStyleSpecificationBase {
6510
6975
  type: 'minimap_style';
6511
6976
  }
@@ -6548,7 +7013,6 @@ interface MiningWithFluidModifier extends BoolModifier {
6548
7013
  */
6549
7014
  use_icon_overlay_constant?: boolean;
6550
7015
  }
6551
- type Mirroring = 'horizontal' | 'vertical' | 'diagonal-pos' | 'diagonal-neg';
6552
7016
  /**
6553
7017
  * The user-set value of a startup {@link mod setting | https://wiki.factorio.com/Tutorial:Mod_settings}.
6554
7018
  */
@@ -6678,12 +7142,18 @@ UnlockQualityModifier | /**
6678
7142
  * Loaded when the `type` is `"unlock-space-platforms"`.
6679
7143
  */
6680
7144
  SpacePlatformsModifier | /**
7145
+ * Loaded when the `type` is `"unlock-travel-to-space-platforms"`
7146
+ */
7147
+ TravelToSpacePlatformsModifier | /**
6681
7148
  * Loaded when the `type` is `"unlock-circuit-network"`.
6682
7149
  */
6683
7150
  CircuitNetworkModifier | /**
6684
7151
  * Loaded when the `type` is `"cargo-landing-pad-count"`.
6685
7152
  */
6686
7153
  CargoLandingPadLimitModifier | /**
7154
+ * Loaded when the `type` is `"max-cargo-bay-unloading-distance"`.
7155
+ */
7156
+ MaxCargoBayUnloadingDistanceModifier | /**
6687
7157
  * Loaded when the `type` is `"change-recipe-productivity"`.
6688
7158
  */
6689
7159
  ChangeRecipeProductivityModifier | /**
@@ -6707,7 +7177,10 @@ BeaconDistributionModifier | /**
6707
7177
  CreateGhostOnEntityDeathModifier | /**
6708
7178
  * Loaded when the `type` is `"belt-stack-size-bonus"`.
6709
7179
  */
6710
- BeltStackSizeBonusModifier;
7180
+ BeltStackSizeBonusModifier | /**
7181
+ * Loaded when the `type` is `"unlock-logistic-network"`.
7182
+ */
7183
+ UnlockLogisticNetworkModifier;
6711
7184
  /**
6712
7185
  * A dictionary of mod names to mod versions of all active mods. It can be used to adjust mod functionality based on the presence of other mods.
6713
7186
  * @example ```
@@ -6722,6 +7195,12 @@ end
6722
7195
  for name, version in pairs(mods) do
6723
7196
  log(name .. " version " .. version) -- => space-age version 2.0.7
6724
7197
  end
7198
+ ```
7199
+ * @example ```
7200
+ -- uses a features only available past a certain base mod version
7201
+ if helpers.compare_version(mods["base"], "2.0.56") >= 0 then
7202
+ use_new_features()
7203
+ end
6725
7204
  ```
6726
7205
  */
6727
7206
  type Mods = Record<string, string>;
@@ -6798,10 +7277,12 @@ interface NestedTriggerEffectItem extends TriggerEffectItem {
6798
7277
  *
6799
7278
  * - **Operator:** See the list below
6800
7279
  *
6801
- * Identifiers are used to name functions and variables. The built-in functions and variables are documented in the {@link auxiliary docs | runtime:noise-expressions}. Mods can define their own noise expressions which can be used as variables and functions. The entry points for this are {@link NamedNoiseFunction | prototype:NamedNoiseFunction} and {@link NamedNoiseExpression | prototype:NamedNoiseExpression} as well as local functions and expressions.
7280
+ * Identifiers are used to name functions and variables. The built-in functions and variables are documented in the {@link auxiliary docs | auxiliary:noise-expressions}. Mods can define their own noise expressions which can be used as variables and functions. The entry points for this are {@link NamedNoiseFunction | prototype:NamedNoiseFunction} and {@link NamedNoiseExpression | prototype:NamedNoiseExpression} as well as local functions and expressions.
6802
7281
  *
6803
7282
  * All functions accept both named and positional arguments. To differentiate between these function calls, positional arguments start/end with `(`/`)` and named arguments with `{`/`}`, e.g. `clamp(x, -1, 1)` and `clamp{min = -1, max = 1, value = x}` are the same function call. Because of this, positional arguments can't be mixed with named arguments. A function can't have more than 255 parameters.
6804
7283
  *
7284
+ * Recursion is not supported.
7285
+ *
6805
7286
  * The following operators are available, ordered by precedence:
6806
7287
  *
6807
7288
  * - `x^y`: Exponentiation (fast, inaccurate), equivalent to the built-in `pow(x, y)` noise function
@@ -6911,6 +7392,44 @@ interface OrTipTrigger {
6911
7392
  * The order property is a simple `string`. When the game needs to sort prototypes (of the same type), it looks at their order properties and sorts those alphabetically. A prototype with an order string of `"a"` will be listed before other prototypes with order string `"b"` or `"c"`. The `"-"` or `"[]"` structures that can be found in vanilla order strings do *not* have any special meaning.
6912
7393
  *
6913
7394
  * The alphabetical sorting uses {@link lexicographical comparison | https://en.wikipedia.org/wiki/Lexicographic_order} to determine if a given prototype is shown before or after another. If the order strings are equal then the game falls back to comparing the prototype names to determine order.
7395
+ *
7396
+ * The order of special characters can be identified by looking at a UTF-8 character list. This is the order some common characters are sorted in:
7397
+ *
7398
+ * - "-"
7399
+ *
7400
+ * - "0"
7401
+ *
7402
+ * - "9"
7403
+ *
7404
+ * - "A"
7405
+ *
7406
+ * - "Z"
7407
+ *
7408
+ * - "["
7409
+ *
7410
+ * - "]"
7411
+ *
7412
+ * - "a"
7413
+ *
7414
+ * - "z"
7415
+ *
7416
+ * The following order strings would be ordered thusly then:
7417
+ *
7418
+ * - "-"
7419
+ *
7420
+ * - "a"
7421
+ *
7422
+ * - "ab"
7423
+ *
7424
+ * - "azaaa" (`b` is sorted before `z`, so "ab" comes before "az", regardless of the letters following it)
7425
+ *
7426
+ * - "b"
7427
+ *
7428
+ * - "b-zzz"
7429
+ *
7430
+ * - "b[aaa]" (`[` is sorted after `-` in UTF-8)
7431
+ *
7432
+ * - "bb" (`b` is sorted after `[` in UTF-8)
6914
7433
  * @example ```
6915
7434
  { -- This item will be shown after the below one
6916
7435
  type = "item",
@@ -6922,28 +7441,6 @@ interface OrTipTrigger {
6922
7441
  name = "item-2",
6923
7442
  order = "ab",
6924
7443
  }
6925
- ```
6926
- * @example ```
6927
- -- The order of special characters can be identified by looking at a UTF-8 character list.
6928
- -- This is the order some common characters are sorted in:
6929
- "-"
6930
- "0"
6931
- "9"
6932
- "A"
6933
- "Z"
6934
- "["
6935
- "]"
6936
- "a"
6937
- "z"
6938
- -- The following order strings would be ordered thusly then:
6939
- "a"
6940
- "ab"
6941
- "azaaa" -- "b" is sorted before "z", so "ab" comes before "az", regardless of the letters following it
6942
- "b"
6943
- "b-zzz"
6944
- "b[aaa]" -- "[" is sorted after "-" in UTF-8
6945
- "bb" -- "b" is sorted after "[" in UTF-8
6946
- ]
6947
7444
  ```
6948
7445
  */
6949
7446
  type Order = string;
@@ -7153,6 +7650,18 @@ type PersistentWorldAmbientSoundsDefinitionCrossfade = Fade & {
7153
7650
  ];
7154
7651
  };
7155
7652
  interface PipeConnectionDefinition {
7653
+ /**
7654
+ * Direction this connection should be facing when entity direction is north-east. When entity is rotated, effective direction will be computed based on this value.
7655
+ *
7656
+ * Only loaded if `connection_type` is `"normal"` or `"underground"`.
7657
+ */
7658
+ alt_direction?: defines.direction;
7659
+ /**
7660
+ * Relative position of the pipe connection when entity direction is north-east.
7661
+ *
7662
+ * Only loaded if `connection_type` is `"normal"` or `"underground"`.
7663
+ */
7664
+ alt_position?: MapPosition;
7156
7665
  /**
7157
7666
  * Fluidboxes' pipe connections are only allowed to connect with each other if they share a connection category. For example a mod could have a "steam pipes" and "cryogenic pipes" category that should not connect with each other.
7158
7667
  *
@@ -7185,6 +7694,10 @@ interface PipeConnectionDefinition {
7185
7694
  * Allowed direction of fluid flow at this connection. Pipeline entities (`pipe`, `pipe-to-ground`, and `storage-tank`) do not support this property.
7186
7695
  */
7187
7696
  flow_direction?: FluidFlowDirection;
7697
+ /**
7698
+ * If true, connection arrows and fluid icons will not be drawn for this connection when the entity is selected or in alt-mode.
7699
+ */
7700
+ hide_connection_info?: boolean;
7188
7701
  /**
7189
7702
  * Expected to be unique inside of a single entity. Used to uniquely identify where a linked connection should connect to.
7190
7703
  *
@@ -7366,6 +7879,170 @@ interface PlanetPrototypeMapGenSettings {
7366
7879
  property_expression_names?: Record<string, string | boolean | double>;
7367
7880
  territory_settings?: TerritorySettings;
7368
7881
  }
7882
+ interface PlatformBackdrop {
7883
+ /**
7884
+ * Color of atmospheric light. Multiplied by 10 in shader.
7885
+ */
7886
+ atmosphere_color?: Color;
7887
+ /**
7888
+ * Color of dawn side of terminator light. Multiplied by 10 in shader.
7889
+ */
7890
+ atmosphere_ray_light_color_1?: Color;
7891
+ /**
7892
+ * Color of dusk side of terminator light. Multiplied by 10 in shader.
7893
+ */
7894
+ atmosphere_ray_light_color_2?: Color;
7895
+ /**
7896
+ * Width of the atmosphere layer as portion of the total radius.
7897
+ */
7898
+ atmosphere_thickness?: float;
7899
+ /**
7900
+ * Intensity of the flow map effect. Begins to degenerate at high values.
7901
+ */
7902
+ cloud_flow_intensity?: float;
7903
+ /**
7904
+ * How many seconds it takes the flow effect to loop.
7905
+ */
7906
+ cloud_flow_seconds?: float;
7907
+ cloud_normal_intensity?: float;
7908
+ /**
7909
+ * Rotational speed of the clouds laterally across the planet relative to `rotation_seconds` of the planet. `-1.0` means it counteracts the rotation rate and makes clouds remain in place. `0.0` means it drifts along with planet surface.
7910
+ */
7911
+ cloud_panning_rate?: float;
7912
+ /**
7913
+ * How far below the atmosphere layer should the clouds be.
7914
+ */
7915
+ cloud_vertical_offset?: float;
7916
+ /**
7917
+ * Amount of cloud texture to be used based off of the alpha channel of the cloud texture.
7918
+ */
7919
+ cloudiness?: float;
7920
+ emission_scalar?: float;
7921
+ /**
7922
+ * When true only the dark side will receive emission.
7923
+ */
7924
+ emission_scales_with_shadow?: boolean;
7925
+ /**
7926
+ * Scales the speed at which the planet appears in view when flown towards.
7927
+ */
7928
+ flight_approach_speed?: float;
7929
+ /**
7930
+ * Cloud mapped over the planet as the surface texture.
7931
+ */
7932
+ global_cloud?: EffectTexture;
7933
+ /**
7934
+ * Flow map distorting the global cloud.
7935
+ */
7936
+ global_cloud_flow?: EffectTexture;
7937
+ global_cloud_normal?: EffectTexture;
7938
+ /**
7939
+ * Sprite or Animation to be referenced by `hero_clouds` definitions with `sprite_index` 1.
7940
+ */
7941
+ hero_cloud_texture_1?: Animation;
7942
+ /**
7943
+ * Sprite or Animation to be referenced by `hero_clouds` definitions with `sprite_index` 2.
7944
+ */
7945
+ hero_cloud_texture_2?: Animation;
7946
+ /**
7947
+ * Sprite or Animation to be referenced by `hero_clouds` definitions with `sprite_index` 3.
7948
+ */
7949
+ hero_cloud_texture_3?: Animation;
7950
+ /**
7951
+ * Individual Hero Cloud decals over the planet surface. The maximum number is four.
7952
+ */
7953
+ hero_clouds?: PlatformBackdropHeroCloud[];
7954
+ /**
7955
+ * When true the hero clouds will add their color to emission as well.
7956
+ */
7957
+ hero_clouds_are_emissive?: boolean;
7958
+ /**
7959
+ * Color of light. Multiplied by 10 in shader.
7960
+ */
7961
+ light_color?: Color;
7962
+ light_direction?: Vector3D;
7963
+ /**
7964
+ * Harshness of the terminator. Functions like atmosphere thickness.
7965
+ */
7966
+ light_intensity_contrast?: float;
7967
+ /**
7968
+ * Perceived size of the light. Also affects size of the specular spot.
7969
+ */
7970
+ light_radius?: float;
7971
+ /**
7972
+ * How strongly the planet moves with camera. `{1.0, 1.0}` means it tracks the starfield. `{0.0, 0.0}` means it tracks the foreground tiles.
7973
+ */
7974
+ parallax_strength?: Vector;
7975
+ /**
7976
+ * Tilt and pitch of the planet axis.
7977
+ */
7978
+ planet_axis?: Vector;
7979
+ /**
7980
+ * How much tilt and pitch vary over time.
7981
+ */
7982
+ planet_axis_deviation_amplitude?: Vector;
7983
+ /**
7984
+ * Number of seconds it takes for tilt and pitch to complete one cycle of deviation.
7985
+ */
7986
+ planet_axis_deviation_seconds?: Vector;
7987
+ /**
7988
+ * Emissive light added to the surface. Can be disabled on lit side using the `emission_scales_with_shadow` property.
7989
+ */
7990
+ planet_emission?: EffectTexture;
7991
+ /**
7992
+ * Normal map of the surface deforming local sphere normal.
7993
+ */
7994
+ planet_normal?: EffectTexture;
7995
+ /**
7996
+ * Glossiness of the surface in red channel.
7997
+ */
7998
+ planet_reflectivity?: EffectTexture;
7999
+ /**
8000
+ * Wrapped around the surface of the sphere using equirectangular projection.
8001
+ */
8002
+ planet_surface?: EffectTexture;
8003
+ position?: Vector;
8004
+ radius?: float;
8005
+ /**
8006
+ * How many seconds it takes for the planet to do one revolution.
8007
+ */
8008
+ rotation_seconds?: float;
8009
+ /**
8010
+ * Color of specular light. Multiplied by 10 in shader.
8011
+ */
8012
+ specular_color?: Color;
8013
+ specular_intensity?: float;
8014
+ surface_normal_intensity?: float;
8015
+ /**
8016
+ * How far below the atmosphere layer should the surface be.
8017
+ */
8018
+ surface_vertical_offset?: float;
8019
+ }
8020
+ interface PlatformBackdropHeroCloud {
8021
+ /**
8022
+ * Random position offset of the cloud animation. Refreshed every loop.
8023
+ */
8024
+ position_deviation?: Vector;
8025
+ /**
8026
+ * With each planet revolution, the cloud smoothly travels along this path by approximating the provided points. If only single position is provided, it remains stationary at that point.
8027
+ */
8028
+ positions?: Vector[];
8029
+ projection_style?: 'none' | 'front-only' | 'front-and-back' | 'front-and-back-inverted';
8030
+ rotate_with_planet?: boolean;
8031
+ rotation_deviation?: float;
8032
+ rotation_speed?: float;
8033
+ /**
8034
+ * Cloud size as a proportion of the total planet size, meaning `1` spans whole planet.
8035
+ */
8036
+ size?: Vector;
8037
+ /**
8038
+ * 1, 2, 3 use cloud sprites 1, 2, 3 respectively. 0 will disable this cloud. Anything else is invalid.
8039
+ */
8040
+ sprite_index?: uint8;
8041
+ /**
8042
+ * Random frame offset of the cloud animation if the graphic is an animation.
8043
+ */
8044
+ starting_frame_offset?: uint16;
8045
+ }
7369
8046
  /**
7370
8047
  * Defines when controller vibrations should be played.
7371
8048
  */
@@ -7869,7 +8546,29 @@ ItemProductPrototype | /**
7869
8546
  * Loaded when the `type` is `"fluid"`.
7870
8547
  */
7871
8548
  FluidProductPrototype;
8549
+ interface ProductPrototypeBase {
8550
+ /**
8551
+ * Value between 0 and 1. When a product has probability set, a probability roll is performed when trying to give product: if probability roll fails then product is not given. This value controls threshold of the independent probability roll, which means if there are multiple products to be given, they may use different roll value causing products to all be given, some of them given or none of them given at all.
8552
+ */
8553
+ independent_probability?: double;
8554
+ /**
8555
+ * A range of values where lower end is at at least at value of 0 and upper end is at most at value of 1. This range is used as part of shared probability test: When a set of products is attempted to be given, there is a single random generator roll performed that gives a value from range `[0, 1)`. This rolled value is compared to ranges of all products that are given at the same time. In order for the product to be given, the roll must test to be within this range, meaning `roll >= min && roll < max` must be true. If the test fails, then the product is not given.
8556
+ *
8557
+ * Note: for a product to be given, both independent_probability test and shared_probability tests must pass. That means probability values seen in gui are equal to `independent_probability * (shared_probability.max - shared_probability.min)`
8558
+ *
8559
+ * Note: ranges between different products are independent, that means they are allowed to overlap. This may be used to create set of products that are always given in pairs if ranges are equal or to make products that are given exclusively (one or the other) if the ranges do not overlap.
8560
+ */
8561
+ shared_probability?: SharedProbabilityDefinition;
8562
+ /**
8563
+ * When hovering over a recipe in the crafting menu the recipe tooltip will be shown. An additional item tooltip will be shown for every product, as a separate tooltip, if the item tooltip has a description and/or properties to show and if `show_details_in_recipe_tooltip` is `true`.
8564
+ */
8565
+ show_details_in_recipe_tooltip?: boolean;
8566
+ }
7872
8567
  interface ProductionHealthEffect {
8568
+ /**
8569
+ * Defaults to "physical" damage.
8570
+ */
8571
+ damage_type?: DamageTypeID;
7873
8572
  not_producing?: float;
7874
8573
  producing?: float;
7875
8574
  }
@@ -7899,22 +8598,50 @@ interface ProgrammableSpeakerNote {
7899
8598
  */
7900
8599
  sound?: Sound;
7901
8600
  }
8601
+ /**
8602
+ * Root style: `"progressbar"`
8603
+ */
7902
8604
  interface ProgressBarStyleSpecification extends BaseStyleSpecification {
8605
+ /**
8606
+ * Required on the root style.
8607
+ */
7903
8608
  bar?: ElementImageSet;
8609
+ /**
8610
+ * Required on the root style.
8611
+ */
7904
8612
  bar_background?: ElementImageSet;
7905
8613
  /**
7906
8614
  * The thickness of the bar, not the horizontal size.
8615
+ *
8616
+ * Required on the root style.
7907
8617
  */
7908
8618
  bar_width?: uint32;
8619
+ /**
8620
+ * Required on the root style.
8621
+ */
7909
8622
  color?: Color;
8623
+ /**
8624
+ * Required on the root style.
8625
+ */
7910
8626
  embed_text_in_bar?: boolean;
7911
8627
  filled_font_color?: Color;
7912
8628
  /**
7913
8629
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
8630
+ *
8631
+ * Required on the root style.
7914
8632
  */
7915
8633
  font?: string;
8634
+ /**
8635
+ * Required on the root style.
8636
+ */
7916
8637
  font_color?: Color;
8638
+ /**
8639
+ * Required on the root style.
8640
+ */
7917
8641
  other_colors?: OtherColors[];
8642
+ /**
8643
+ * Required on the root style.
8644
+ */
7918
8645
  side_text_padding?: int16;
7919
8646
  type: 'progressbar_style';
7920
8647
  }
@@ -7950,6 +8677,10 @@ interface ProjectileTriggerDelivery extends TriggerDeliveryItem {
7950
8677
  * Maximum deviation of the projectile from source orientation, in +/- (`x radians / 2`). Example: `3.14 radians -> +/- (180° / 2)`, meaning up to 90° deviation in either direction of rotation.
7951
8678
  */
7952
8679
  direction_deviation?: float;
8680
+ /**
8681
+ * If `true`, the projectile will inherit any positive speed component from the source entity's movement toward the target.
8682
+ */
8683
+ inherit_speed?: boolean;
7953
8684
  max_range?: double;
7954
8685
  min_range?: double;
7955
8686
  /**
@@ -8009,77 +8740,54 @@ interface PuddleTileEffectParameters {
8009
8740
  water_effect?: TileEffectDefinitionID;
8010
8741
  water_effect_parameters?: WaterTileEffectParameters;
8011
8742
  }
8012
- /**
8013
- * A mapping of arrays of {@link PumpConnectorGraphicsAnimations | prototype:PumpConnectorGraphicsAnimation} to all 4 directions of the pump connection (to a fluid wagon).
8014
- * @example ```
8015
- load_animations =
8016
- {
8017
- west =
8018
- {
8019
- [1] =
8020
- {
8021
- standup_base =
8022
- {
8023
- filename = "__base__/graphics/entity/pump/connector/V-R-135-load-standup-base.png",
8024
- width = 110,
8025
- height = 126,
8026
- scale = 0.5,
8027
- line_length = 1,
8028
- frame_count = 20,
8029
- shift = util.by_pixel(-23.5, -13.5)
8030
- },
8031
- standup_shadow =
8032
- {
8033
- filename = "__base__/graphics/entity/pump/connector/V-R-1-load-standup-base-shadow.png",
8034
- width = 157,
8035
- height = 136,
8036
- scale = 0.5,
8037
- line_length = 1,
8038
- frame_count = 20,
8039
- shift = util.by_pixel(-8.75, 8.5)
8040
- },
8041
- },
8042
- [2] =
8043
- {
8044
- standup_base = { ... },
8045
- standup_shadow = { ... },
8046
- connector_shadow = { ... },
8047
- },
8048
- [3] = { ... },
8049
- [4] = { ... },
8050
- [5] = { ... },
8051
- [6] = { ... },
8052
- },
8053
- north = { ... },
8054
- east = { ... },
8055
- south = { ... },
8056
- }
8057
- ```
8058
- */
8059
- interface PumpConnectorGraphics {
8743
+ interface PumpWagonConnectionGraphics {
8744
+ base?: BasePumpWagonConnectionAnimations;
8745
+ /**
8746
+ * Value between 0 and 1 (both exclusive). The base animation will play up until the connecting progress reaches the value. Needs to be less than `clamp_animation_starts_at_progress`. The arm (`part_1` and `part_2`) will rotate and extend in the time in between.
8747
+ */
8748
+ base_animation_finished_at_progress?: double;
8749
+ /**
8750
+ * Value between 0 and 1 (both exclusive). The clamp animation will play up starting when the connecting progress reaches the value. Needs to be larger than `base_animation_finished_at_progress`. The arm (`part_1` and `part_2`) will rotate and extend in the time in between.
8751
+ */
8752
+ clamp_animation_starts_at_progress?: double;
8753
+ clamp_y_shift?: float;
8754
+ height_diff_to_wagon?: float;
8755
+ part1_to_2_shift?: Vector;
8060
8756
  /**
8061
- * Size of the array must be 6 or more.
8757
+ * Adjusts where the sprites will be cropped
8062
8758
  */
8063
- east: PumpConnectorGraphicsAnimation[];
8759
+ part2_crop_adjustment?: float;
8064
8760
  /**
8065
- * Size of the array must be 6 or more.
8761
+ * Adjusts where the sprites will be cropped
8066
8762
  */
8067
- north: PumpConnectorGraphicsAnimation[];
8763
+ part2_shadow_crop_adjustment?: float;
8068
8764
  /**
8069
- * Size of the array must be 6 or more.
8765
+ * Rotating top part.
8070
8766
  */
8071
- south: PumpConnectorGraphicsAnimation[];
8767
+ part_1?: RotatedSprite;
8768
+ part_1_shadow?: RotatedSprite;
8072
8769
  /**
8073
- * Size of the array must be 6 or more.
8770
+ * Rotating arm.
8074
8771
  */
8075
- west: PumpConnectorGraphicsAnimation[];
8772
+ part_2?: RotatedSprite;
8773
+ part_2_shadow?: RotatedSprite;
8774
+ /**
8775
+ * Projected render rest position of `suction_clamp` relative to the parent pump position.
8776
+ */
8777
+ resting_position_shift?: PumpWagonConnectionShift4Way;
8778
+ shadow_shift?: Vector;
8779
+ suction_clamp?: Animation;
8780
+ suction_clamp_shadow?: Animation;
8781
+ /**
8782
+ * Relative projected render position of `part_1` to the parent pump position.
8783
+ */
8784
+ top_pivot_shift?: PumpWagonConnectionShift4Way;
8076
8785
  }
8077
- interface PumpConnectorGraphicsAnimation {
8078
- connector?: Animation;
8079
- connector_shadow?: Animation;
8080
- standup_base?: Animation;
8081
- standup_shadow?: Animation;
8082
- standup_top?: Animation;
8786
+ interface PumpWagonConnectionShift4Way {
8787
+ east: Vector;
8788
+ north: Vector;
8789
+ south: Vector;
8790
+ west: Vector;
8083
8791
  }
8084
8792
  /**
8085
8793
  * The push back effect used by the {@link discharge defense | https://wiki.factorio.com/Discharge_defense}.
@@ -8100,27 +8808,73 @@ interface PushBackTriggerEffectItem extends TriggerEffectItem {
8100
8808
  ```
8101
8809
  */
8102
8810
  type QualityID = string;
8811
+ /**
8812
+ * Root style: `"radiobutton"`
8813
+ */
8103
8814
  interface RadioButtonStyleSpecification extends StyleWithClickableGraphicalSetSpecification {
8815
+ /**
8816
+ * Required on the root style.
8817
+ */
8104
8818
  disabled_font_color?: Color;
8105
8819
  /**
8106
8820
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
8821
+ *
8822
+ * Required on the root style.
8107
8823
  */
8108
8824
  font?: string;
8825
+ /**
8826
+ * Required on the root style.
8827
+ */
8109
8828
  font_color?: Color;
8829
+ /**
8830
+ * Required on the root style.
8831
+ */
8110
8832
  text_padding?: uint32;
8111
8833
  type: 'radiobutton_style';
8112
8834
  }
8113
8835
  /**
8114
8836
  * Sprite to be shown around the entity when it is selected/held in the cursor.
8837
+ * @example ```
8838
+ radius_visualisation_specification =
8839
+ {
8840
+ sprite =
8841
+ {
8842
+ filename = "__base__/graphics/entity/electric-mining-drill/electric-mining-drill-radius-visualization.png",
8843
+ size = 10
8844
+ },
8845
+ distance = 5,
8846
+ offset = {0, -5}
8847
+ }
8848
+ ```
8115
8849
  */
8116
8850
  interface RadiusVisualisationSpecification {
8117
8851
  /**
8118
8852
  * Must be greater than or equal to 0.
8853
+ *
8854
+ * This distance is silently overwritten by prototypes with a custom distance: {@link AgriculturalTowerPrototype::radius | prototype:AgriculturalTowerPrototype::radius}, {@link AsteroidCollectorPrototype::collection_radius | prototype:AsteroidCollectorPrototype::collection_radius}, {@link BeaconPrototype::supply_area_distance | prototype:BeaconPrototype::supply_area_distance}, {@link ElectricPolePrototype::supply_area_distance | prototype:ElectricPolePrototype::supply_area_distance}, {@link MiningDrillPrototype::resource_searching_radius | prototype:MiningDrillPrototype::resource_searching_radius}.
8119
8855
  */
8120
8856
  distance?: double;
8857
+ /**
8858
+ * Each value must be >= 0.01.
8859
+ *
8860
+ * If value is not provided for a quality, then `1` will be used as a multiplier instead.
8861
+ *
8862
+ * This does not affect the visualisation of prototypes with a custom distance specification because their distance automatically scales based on quality: agricultural tower (no quality scaling), {@link asteroid collector | prototype:QualityPrototype::asteroid_collector_collection_radius_bonus}, {@link beacon | prototype:QualityPrototype::beacon_supply_area_distance_bonus}, cargo landing pad (no quality scaling), {@link electric pole | prototype:QualityPrototype::electric_pole_supply_area_distance_bonus}, and {@link mining drill | prototype:QualityPrototype::mining_drill_mining_radius_bonus}.
8863
+ */
8864
+ distance_quality_multiplier?: LuaTable<QualityID, double>;
8121
8865
  draw_in_cursor?: boolean;
8122
8866
  draw_on_selection?: boolean;
8867
+ /**
8868
+ * Offset of the sprite from the position of the entity. The offset is rotated by the entity's current direction.
8869
+ *
8870
+ * This offset is silently overwritten by prototypes with a custom offset: {@link MiningDrillPrototype::resource_searching_offset | prototype:MiningDrillPrototype::resource_searching_offset}.
8871
+ */
8123
8872
  offset?: Vector;
8873
+ /**
8874
+ * The sprite to show.
8875
+ *
8876
+ * This sprite is silently overwritten by prototypes with a custom radius picture: {@link AgriculturalTowerPrototype::radius_visualisation_picture | prototype:AgriculturalTowerPrototype::radius_visualisation_picture}, {@link AsteroidCollectorPrototype::radius_visualisation_picture | prototype:AsteroidCollectorPrototype::radius_visualisation_picture}, {@link BeaconPrototype::radius_visualisation_picture | prototype:BeaconPrototype::radius_visualisation_picture}, {@link CargoLandingPadPrototype::radius_visualisation_picture | prototype:CargoLandingPadPrototype::radius_visualisation_picture}, {@link ElectricPolePrototype::radius_visualisation_picture | prototype:ElectricPolePrototype::radius_visualisation_picture}, {@link MiningDrillPrototype::radius_visualisation_picture | prototype:MiningDrillPrototype::radius_visualisation_picture}.
8877
+ */
8124
8878
  sprite?: Sprite;
8125
8879
  }
8126
8880
  interface RailFenceDirectionSet {
@@ -8435,6 +9189,21 @@ interface Resistance {
8435
9189
  */
8436
9190
  type ResourceCategoryID = string;
8437
9191
  type RichTextSetting = 'enabled' | 'disabled' | 'highlight';
9192
+ interface RobotDoorSpecification {
9193
+ /**
9194
+ * Drawn when a robot brings/takes items from this entity.
9195
+ */
9196
+ animation?: Animation;
9197
+ /**
9198
+ * Played when a robot brings/takes items from this entity. Only loaded if `animation` is defined.
9199
+ */
9200
+ animation_sound?: Sound;
9201
+ /**
9202
+ * The offset from the center of this entity where a robot visually brings/takes items.
9203
+ */
9204
+ location_offset?: Vector;
9205
+ opened_duration?: uint8;
9206
+ }
8438
9207
  interface RollingStockRotatedSlopedGraphics {
8439
9208
  rotated: RotatedSprite;
8440
9209
  slope_angle_between_frames?: double;
@@ -8705,8 +9474,14 @@ interface ScrollBarStyleSpecification extends BaseStyleSpecification {
8705
9474
  background_graphical_set?: ElementImageSet;
8706
9475
  thumb_button_style?: ButtonStyleSpecification;
8707
9476
  }
9477
+ /**
9478
+ * Root style: `"scroll_pane"`
9479
+ */
8708
9480
  interface ScrollPaneStyleSpecification extends BaseStyleSpecification {
8709
9481
  always_draw_borders?: boolean;
9482
+ /**
9483
+ * Required on the root style.
9484
+ */
8710
9485
  background_graphical_set?: ElementImageSet;
8711
9486
  dont_force_clipping_rect_for_contents?: boolean;
8712
9487
  extra_bottom_margin_when_activated?: int32;
@@ -8725,11 +9500,23 @@ interface ScrollPaneStyleSpecification extends BaseStyleSpecification {
8725
9500
  extra_right_padding_when_activated?: int32;
8726
9501
  extra_top_margin_when_activated?: int32;
8727
9502
  extra_top_padding_when_activated?: int32;
9503
+ /**
9504
+ * Required on the root style.
9505
+ */
8728
9506
  graphical_set?: ElementImageSet;
9507
+ /**
9508
+ * Required on the root style.
9509
+ */
8729
9510
  horizontal_scrollbar_style?: HorizontalScrollBarStyleSpecification;
8730
9511
  scrollbars_go_outside?: boolean;
8731
9512
  type: 'scroll_pane_style';
9513
+ /**
9514
+ * Required on the root style.
9515
+ */
8732
9516
  vertical_flow_style?: VerticalFlowStyleSpecification;
9517
+ /**
9518
+ * Required on the root style.
9519
+ */
8733
9520
  vertical_scrollbar_style?: VerticalScrollBarStyleSpecification;
8734
9521
  }
8735
9522
  /**
@@ -8759,6 +9546,18 @@ interface SelectionModeData {
8759
9546
  entity_filter_mode?: 'whitelist' | 'blacklist';
8760
9547
  entity_filters?: EntityID[];
8761
9548
  entity_type_filters?: string[];
9549
+ /**
9550
+ * If this is `false`, using any of the mode flags `"blueprint"`, `"deconstruct"`, `"cancel-deconstruct"`, `"upgrade"`, `"cancel-upgrade"` or `"downgrade"` without also specifying another flag that selects entities will result in an error, because the selection tool cannot select any entities and this is likely undesired behavior.
9551
+ *
9552
+ * Setting this to `true` disables this error.
9553
+ */
9554
+ ignore_cannot_select_entities?: boolean;
9555
+ /**
9556
+ * If this is `false`, using any of the mode flags `"blueprint"` or `"deconstruct"` without also specifying any flag that selects tiles will result in an error, because the selection tool cannot select any tiles and this is likely undesired behavior.
9557
+ *
9558
+ * Setting this to `true` disables this error.
9559
+ */
9560
+ ignore_cannot_select_tiles?: boolean;
8762
9561
  mode: SelectionModeFlags;
8763
9562
  play_ended_sound_when_nothing_selected?: boolean;
8764
9563
  started_sound?: Sound;
@@ -8771,13 +9570,13 @@ interface SelectionModeData {
8771
9570
  * Some flags only exclude objects from the selection, meaning they need to be combined with another flag to select anything.
8772
9571
  */
8773
9572
  type SelectionModeFlags = (/**
8774
- * Selects entities and tiles as if selecting them for a blueprint.
9573
+ * Excludes entities and tiles that can't be selected for blueprinting.
8775
9574
  */
8776
9575
  'blueprint' | /**
8777
- * Selects entities and tiles as if selecting them for deconstruction.
9576
+ * Excludes entities and tiles that can't be selected for deconstruction.
8778
9577
  */
8779
9578
  'deconstruct' | /**
8780
- * Selects entities and tiles as if selecting them for deconstruction cancellation.
9579
+ * Excludes entities that can't be selected for deconstruction cancellation.
8781
9580
  */
8782
9581
  'cancel-deconstruct' | /**
8783
9582
  * Selects items on the ground.
@@ -8813,13 +9612,13 @@ type SelectionModeFlags = (/**
8813
9612
  * Excludes entities that are not from an enemy force from the selection.
8814
9613
  */
8815
9614
  'enemy' | /**
8816
- * Selects entities as if selecting them for upgrading.
9615
+ * Excludes entities that can't be selected for upgrading.
8817
9616
  */
8818
9617
  'upgrade' | /**
8819
- * Selects entities as if selecting them for upgrade cancellation.
9618
+ * Excludes entities that can't be selected for upgrade cancellation.
8820
9619
  */
8821
9620
  'cancel-upgrade' | /**
8822
- * Selects entities as if selecting them for downgrading.
9621
+ * Excludes entities that can't be selected for downgrading.
8823
9622
  */
8824
9623
  'downgrade' | /**
8825
9624
  * Selects entities that are an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype}.
@@ -8843,13 +9642,13 @@ type SelectionModeFlags = (/**
8843
9642
  * Selects entities that are a {@link TileGhostPrototype | prototype:TileGhostPrototype}.
8844
9643
  */
8845
9644
  'tile-ghost') | (/**
8846
- * Selects entities and tiles as if selecting them for a blueprint.
9645
+ * Excludes entities and tiles that can't be selected for blueprinting.
8847
9646
  */
8848
9647
  'blueprint' | /**
8849
- * Selects entities and tiles as if selecting them for deconstruction.
9648
+ * Excludes entities and tiles that can't be selected for deconstruction.
8850
9649
  */
8851
9650
  'deconstruct' | /**
8852
- * Selects entities and tiles as if selecting them for deconstruction cancellation.
9651
+ * Excludes entities that can't be selected for deconstruction cancellation.
8853
9652
  */
8854
9653
  'cancel-deconstruct' | /**
8855
9654
  * Selects items on the ground.
@@ -8885,13 +9684,13 @@ type SelectionModeFlags = (/**
8885
9684
  * Excludes entities that are not from an enemy force from the selection.
8886
9685
  */
8887
9686
  'enemy' | /**
8888
- * Selects entities as if selecting them for upgrading.
9687
+ * Excludes entities that can't be selected for upgrading.
8889
9688
  */
8890
9689
  'upgrade' | /**
8891
- * Selects entities as if selecting them for upgrade cancellation.
9690
+ * Excludes entities that can't be selected for upgrade cancellation.
8892
9691
  */
8893
9692
  'cancel-upgrade' | /**
8894
- * Selects entities as if selecting them for downgrading.
9693
+ * Excludes entities that can't be selected for downgrading.
8895
9694
  */
8896
9695
  'downgrade' | /**
8897
9696
  * Selects entities that are an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype}.
@@ -8959,7 +9758,7 @@ interface SetTileTriggerEffectItem extends TriggerEffectItem {
8959
9758
  apply_on_space_platform?: boolean;
8960
9759
  apply_projection?: boolean;
8961
9760
  radius: float;
8962
- tile_collision_mask?: CollisionMaskConnector;
9761
+ tile_collision_mask?: TileCollisionMaskConnector;
8963
9762
  tile_name: TileID;
8964
9763
  type: 'set-tile';
8965
9764
  }
@@ -8976,6 +9775,16 @@ interface Settings {
8976
9775
  */
8977
9776
  startup: Record<string, ModSetting>;
8978
9777
  }
9778
+ interface SharedProbabilityDefinition {
9779
+ /**
9780
+ * Upper end of the range of shared roll values that will allow product to be given. Must be >= `min` and <= `1`.
9781
+ */
9782
+ max: double;
9783
+ /**
9784
+ * Lower end of the range of shared roll values that will allow product to be given. Must be >= `0` and <= `max`.
9785
+ */
9786
+ min: double;
9787
+ }
8979
9788
  interface ShiftAnimationWaypoints {
8980
9789
  east: Vector[];
8981
9790
  north: Vector[];
@@ -8998,6 +9807,10 @@ interface SignalIDConnectorBase {
8998
9807
  * Name of the signal.
8999
9808
  */
9000
9809
  name: VirtualSignalID | ItemID | FluidID | RecipeID | EntityID | SpaceLocationID | AsteroidChunkID | QualityID;
9810
+ /**
9811
+ * Defaults to `normal`.
9812
+ */
9813
+ quality?: QualityID;
9001
9814
  type: string;
9002
9815
  }
9003
9816
  /**
@@ -9048,11 +9861,11 @@ interface SimulationDefinition {
9048
9861
  /**
9049
9862
  * Only loaded if `init_file` is not defined.
9050
9863
  *
9051
- * This code is run as a (silent) console command inside the simulation when it is first initialized. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see {@link here | runtime:libraries}.
9864
+ * This code is run as a (silent) console command inside the simulation when it is first initialized. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see {@link here | auxiliary:libraries}.
9052
9865
  */
9053
9866
  init?: string;
9054
9867
  /**
9055
- * This code is run as a (silent) console command inside the simulation when it is first initialized. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see {@link here | runtime:libraries}.
9868
+ * This code is run as a (silent) console command inside the simulation when it is first initialized. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see {@link here | auxiliary:libraries}.
9056
9869
  */
9057
9870
  init_file?: FileName;
9058
9871
  /**
@@ -9087,11 +9900,11 @@ interface SimulationDefinition {
9087
9900
  /**
9088
9901
  * Only loaded if `update_file` is not defined.
9089
9902
  *
9090
- * This code is run as a (silent) console command inside the simulation every time the simulation is updated. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see {@link here | runtime:libraries}.
9903
+ * This code is run as a (silent) console command inside the simulation every time the simulation is updated. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see {@link here | auxiliary:libraries}.
9091
9904
  */
9092
9905
  update?: string;
9093
9906
  /**
9094
- * This code is run as a (silent) console command inside the simulation every time the simulation is updated. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see {@link here | runtime:libraries}.
9907
+ * This code is run as a (silent) console command inside the simulation every time the simulation is updated. Since this is run as a console command, the restrictions of console commands apply, e.g. `require` is not available, see {@link here | auxiliary:libraries}.
9095
9908
  */
9096
9909
  update_file?: FileName;
9097
9910
  /**
@@ -9185,14 +9998,41 @@ interface SingleGraphicProcessionLayer {
9185
9998
  shift_rotates_with_pod?: boolean;
9186
9999
  type: 'single-graphic';
9187
10000
  }
10001
+ /**
10002
+ * Root style: `"slider"`
10003
+ */
9188
10004
  interface SliderStyleSpecificationBase extends BaseStyleSpecification {
10005
+ /**
10006
+ * Required on the root style.
10007
+ */
9189
10008
  button?: ButtonStyleSpecification;
10009
+ /**
10010
+ * Required on the root style.
10011
+ */
9190
10012
  draw_notches?: boolean;
10013
+ /**
10014
+ * Required on the root style.
10015
+ */
9191
10016
  empty_bar?: ElementImageSet;
10017
+ /**
10018
+ * Required on the root style.
10019
+ */
9192
10020
  empty_bar_disabled?: ElementImageSet;
10021
+ /**
10022
+ * Required on the root style.
10023
+ */
9193
10024
  full_bar?: ElementImageSet;
10025
+ /**
10026
+ * Required on the root style.
10027
+ */
9194
10028
  full_bar_disabled?: ElementImageSet;
10029
+ /**
10030
+ * Required on the root style.
10031
+ */
9195
10032
  high_button?: ButtonStyleSpecification;
10033
+ /**
10034
+ * Required on the root style.
10035
+ */
9196
10036
  notch?: ElementImageSet;
9197
10037
  type: string;
9198
10038
  }
@@ -9331,6 +10171,10 @@ type Sound = {
9331
10171
  } | SoundDefinition | SoundDefinition[];
9332
10172
  interface SoundAccent {
9333
10173
  frame?: uint16;
10174
+ /**
10175
+ * The `sound` is played when the entity has one the specified direction.
10176
+ */
10177
+ play_for_directions?: defines.direction[];
9334
10178
  /**
9335
10179
  * Play the `sound` for a working visualisation of a given {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}.
9336
10180
  *
@@ -9385,7 +10229,7 @@ interface SoundModifier {
9385
10229
  type: SoundModifierType;
9386
10230
  volume_multiplier: float;
9387
10231
  }
9388
- type SoundModifierType = 'game' | 'main-menu' | 'tips-and-tricks' | 'driving' | 'elevation' | 'space-platform';
10232
+ type SoundModifierType = 'game' | 'main-menu' | 'tips-and-tricks' | 'driving' | 'elevation' | 'space-platform' | 'tall-entities-hidden';
9389
10233
  /**
9390
10234
  * This defines which slider in the sound settings affects the volume of this sound. Furthermore, some sound types are mixed differently than others, e.g. zoom level effects are applied.
9391
10235
  */
@@ -9495,15 +10339,41 @@ type SpawnPoint = {
9495
10339
  double,
9496
10340
  double
9497
10341
  ];
10342
+ /**
10343
+ * Root style: `"speech_bubble"`
10344
+ */
9498
10345
  interface SpeechBubbleStyleSpecification extends BaseStyleSpecification {
10346
+ /**
10347
+ * Required on the root style.
10348
+ */
9499
10349
  arrow_graphical_set?: ElementImageSet;
10350
+ /**
10351
+ * Required on the root style.
10352
+ */
9500
10353
  arrow_indent?: double;
10354
+ /**
10355
+ * Required on the root style.
10356
+ */
9501
10357
  close_color?: Color;
10358
+ /**
10359
+ * Required on the root style.
10360
+ */
9502
10361
  frame_style?: FrameStyleSpecification;
10362
+ /**
10363
+ * Required on the root style.
10364
+ */
9503
10365
  label_style?: LabelStyleSpecification;
10366
+ /**
10367
+ * Required on the root style.
10368
+ */
9504
10369
  pass_through_mouse?: boolean;
9505
10370
  type: 'speech_bubble_style';
9506
10371
  }
10372
+ interface SpentFluidSpecification {
10373
+ amount?: double;
10374
+ name: FluidID;
10375
+ temperature?: float;
10376
+ }
9507
10377
  /**
9508
10378
  * Used by {@link SpiderVehiclePrototype | prototype:SpiderVehiclePrototype}.
9509
10379
  */
@@ -9602,7 +10472,13 @@ interface SpiderTorsoGraphicsSet {
9602
10472
  base_animation?: RotatedAnimation;
9603
10473
  base_render_layer?: RenderLayer;
9604
10474
  render_layer?: RenderLayer;
10475
+ /**
10476
+ * If no sprite flags are defined, then this animation is loaded and treated as a shadow by default.
10477
+ */
9605
10478
  shadow_animation?: RotatedAnimation;
10479
+ /**
10480
+ * If no sprite flags are defined, then this animation is loaded and treated as a shadow by default.
10481
+ */
9606
10482
  shadow_base_animation?: RotatedAnimation;
9607
10483
  /**
9608
10484
  * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
@@ -9855,14 +10731,56 @@ type Sprite4Way = {
9855
10731
  *
9856
10732
  * Only loaded if `north` is defined.
9857
10733
  */
9858
- south?: Sprite;
10734
+ south?: Sprite;
10735
+ /**
10736
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10737
+ *
10738
+ * Only loaded if `north` is defined.
10739
+ */
10740
+ west?: Sprite;
10741
+ } | Sprite;
10742
+ /**
10743
+ * A map of sprites for 8 directions of the entity.
10744
+ */
10745
+ interface Sprite8Way {
10746
+ /**
10747
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10748
+ */
10749
+ east?: Sprite;
10750
+ /**
10751
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10752
+ */
10753
+ north?: Sprite;
10754
+ /**
10755
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10756
+ */
10757
+ north_east?: Sprite;
10758
+ /**
10759
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10760
+ */
10761
+ north_west?: Sprite;
10762
+ /**
10763
+ * Only loaded if `sheets` is not defined.
10764
+ */
10765
+ sheet?: SpriteNWaySheet;
10766
+ sheets?: SpriteNWaySheet[];
10767
+ /**
10768
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10769
+ */
10770
+ south?: Sprite;
10771
+ /**
10772
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10773
+ */
10774
+ south_east?: Sprite;
10775
+ /**
10776
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10777
+ */
10778
+ south_west?: Sprite;
9859
10779
  /**
9860
10780
  * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
9861
- *
9862
- * Only loaded if `north` is defined.
9863
10781
  */
9864
10782
  west?: Sprite;
9865
- } | Sprite;
10783
+ }
9866
10784
  /**
9867
10785
  * An array containing the following values.
9868
10786
  * @example ```
@@ -9902,7 +10820,13 @@ type SpriteFlags = (/**
9902
10820
  'smoke' | /**
9903
10821
  * This flag will internally set these flags: `"group=decal"`
9904
10822
  */
9905
- 'decal' | 'low-object' | 'corpse-decay' | 'trilinear-filtering' | 'group=none' | 'group=terrain' | 'group=shadow' | 'group=smoke' | 'group=decal' | 'group=low-object' | 'group=gui' | 'group=icon' | 'group=icon-background' | 'group=effect-texture')[];
10823
+ 'decal' | 'low-object' | 'corpse-decay' | 'trilinear-filtering' | /**
10824
+ * This flag will internally set these flags: `"linear-minification"`, `"linear-magnification"`, `"group=procession-cover"`
10825
+ */
10826
+ 'procession-cover' | /**
10827
+ * This flag will internally limit colors to only RG and set these flags: `"no-crop"`, `"not-compressed"`
10828
+ */
10829
+ 'normal-map' | 'group=none' | 'group=terrain' | 'group=shadow' | 'group=smoke' | 'group=decal' | 'group=low-object' | 'group=gui' | 'group=icon' | 'group=icon-background' | 'group=procession' | 'group=procession-cover' | 'group=effect-texture')[];
9906
10830
  /**
9907
10831
  * @example ```
9908
10832
  sheet =
@@ -9917,6 +10841,10 @@ sheet =
9917
10841
  ```
9918
10842
  */
9919
10843
  interface SpriteNWaySheet extends SpriteParameters {
10844
+ /**
10845
+ * Specifies for how many directions each frame is used. Silently forced to always be at least `1`.
10846
+ */
10847
+ frame_repeat?: uint32;
9920
10848
  /**
9921
10849
  * Specifies how many of the directions of the SpriteNWay are filled up with this sheet.
9922
10850
  */
@@ -9985,7 +10913,7 @@ interface SpriteParameters extends SpriteSource {
9985
10913
  usage?: SpriteUsageHint;
9986
10914
  }
9987
10915
  /**
9988
- * This sets the "caching priority" of a sprite, so deciding priority of it being included in VRAM instead of streaming it and is therefore a purely technical value. See {@link here | https://forums.factorio.com/viewtopic.php?p=437380#p437380} and {@link here | https://www.factorio.com/blog/post/fff-264}. The possible values are listed below.
10916
+ * This sets the caching priority of a sprite, influencing whether it is kept in VRAM or streamed from disk in VRAM-limited situations. See {@link here | https://forums.factorio.com/viewtopic.php?p=437380#p437380} and {@link here | https://www.factorio.com/blog/post/fff-264} for context.
9989
10917
  */
9990
10918
  type SpritePriority = 'extra-high-no-scale' | 'extra-high' | 'high' | 'medium' | 'low' | 'very-low' | 'no-atlas';
9991
10919
  interface SpriteSheet extends SpriteParameters {
@@ -10028,6 +10956,12 @@ interface SpriteSource {
10028
10956
  * If `true`, the sprite may be downsampled to half its size on load even when 'Sprite quality' graphics setting is set to 'High'. Whether downsampling happens depends on detected hardware and other graphics settings.
10029
10957
  */
10030
10958
  allow_forced_downscale?: boolean;
10959
+ /**
10960
+ * All textures have 4 channels by default. This property can be used for no-atlas textures to force their format to R, RG, RGB or RGBA with 8 bytes for each channel and save VRAM space. Compression setting is based on player config.
10961
+ *
10962
+ * We use BC4 compression for R, BC5 for RG, BC1 for RGB, and DXT5_BC3 for RGBA, see "{@link S3 Texture Compression | https://en.wikipedia.org/wiki/S3_Texture_Compression}" to read more about compression ratios.
10963
+ */
10964
+ color_channels?: 1 | 2 | 3 | 4;
10031
10965
  /**
10032
10966
  * The path to the sprite file to use.
10033
10967
  * This property is required, but marked as optional due to typescript inheritance limitations
@@ -10118,16 +11052,12 @@ interface StackTransferTipTrigger extends CountBasedTipTrigger {
10118
11052
  type: 'stack-transfer';
10119
11053
  }
10120
11054
  interface StateSteeringSettings {
10121
- /**
10122
- * Used only for special "to look good" purposes (like in trailer).
10123
- */
10124
- force_unit_fuzzy_goto_behavior: boolean;
10125
11055
  /**
10126
11056
  * Not including the radius of the unit.
10127
11057
  */
10128
- radius: double;
10129
- separation_factor: double;
10130
- separation_force: double;
11058
+ radius?: double;
11059
+ separation_factor?: double;
11060
+ separation_force?: double;
10131
11061
  }
10132
11062
  interface StatelessVisualisation {
10133
11063
  acceleration_x?: float;
@@ -10210,8 +11140,12 @@ interface StatusColors {
10210
11140
  working?: Color;
10211
11141
  }
10212
11142
  interface SteeringSettings {
10213
- default: StateSteeringSettings;
10214
- moving: StateSteeringSettings;
11143
+ /**
11144
+ * Used only for special "to look good" purposes (like in trailer).
11145
+ */
11146
+ force_unit_fuzzy_goto_behavior?: boolean;
11147
+ move?: StateSteeringSettings;
11148
+ stay?: StateSteeringSettings;
10215
11149
  }
10216
11150
  interface StorageTankPictures {
10217
11151
  flow_sprite?: Sprite;
@@ -10416,60 +11350,164 @@ interface SurfaceRenderParameters {
10416
11350
  */
10417
11351
  draw_sprite_clouds?: boolean;
10418
11352
  fog?: FogEffectProperties;
11353
+ platform_backdrop?: PlatformBackdrop;
10419
11354
  shadow_opacity?: float;
10420
11355
  space_dust_background?: SpaceDustEffectProperties;
10421
11356
  space_dust_foreground?: SpaceDustEffectProperties;
10422
11357
  terrain_tint_effect?: GlobalTintEffectProperties;
10423
11358
  }
11359
+ /**
11360
+ * Root style: `"switch"`
11361
+ */
10424
11362
  interface SwitchStyleSpecification extends BaseStyleSpecification {
11363
+ /**
11364
+ * Required on the root style.
11365
+ */
10425
11366
  active_label?: LabelStyleSpecification;
11367
+ /**
11368
+ * Required on the root style.
11369
+ */
10426
11370
  button?: ButtonStyleSpecification;
11371
+ /**
11372
+ * Required on the root style.
11373
+ */
10427
11374
  default_background?: Sprite;
11375
+ /**
11376
+ * Required on the root style.
11377
+ */
10428
11378
  disabled_background?: Sprite;
11379
+ /**
11380
+ * Required on the root style.
11381
+ */
10429
11382
  hover_background?: Sprite;
11383
+ /**
11384
+ * Required on the root style.
11385
+ */
10430
11386
  inactive_label?: LabelStyleSpecification;
11387
+ /**
11388
+ * Required on the root style.
11389
+ */
10431
11390
  left_button_position?: uint32;
11391
+ /**
11392
+ * Required on the root style.
11393
+ */
10432
11394
  middle_button_position?: uint32;
11395
+ /**
11396
+ * Required on the root style.
11397
+ */
10433
11398
  right_button_position?: uint32;
10434
11399
  type: 'switch_style';
10435
11400
  }
11401
+ /**
11402
+ * Root style: `"tab"`
11403
+ */
10436
11404
  interface TabStyleSpecification extends StyleWithClickableGraphicalSetSpecification {
10437
11405
  /**
10438
11406
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11407
+ *
11408
+ * Required on the root style.
10439
11409
  */
10440
11410
  badge_font?: string;
11411
+ /**
11412
+ * Required on the root style.
11413
+ */
10441
11414
  badge_horizontal_spacing?: int16;
11415
+ /**
11416
+ * Required on the root style.
11417
+ */
10442
11418
  default_badge_font_color?: Color;
11419
+ /**
11420
+ * Required on the root style.
11421
+ */
10443
11422
  default_badge_graphical_set?: ElementImageSet;
11423
+ /**
11424
+ * Required on the root style.
11425
+ */
10444
11426
  default_font_color?: Color;
11427
+ /**
11428
+ * Required on the root style.
11429
+ */
10445
11430
  disabled_badge_font_color?: Color;
11431
+ /**
11432
+ * Required on the root style.
11433
+ */
10446
11434
  disabled_badge_graphical_set?: ElementImageSet;
11435
+ /**
11436
+ * Required on the root style.
11437
+ */
10447
11438
  disabled_font_color?: Color;
10448
11439
  draw_grayscale_picture?: boolean;
10449
11440
  /**
10450
11441
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11442
+ *
11443
+ * Required on the root style.
10451
11444
  */
10452
11445
  font?: string;
11446
+ /**
11447
+ * Required on the root style.
11448
+ */
10453
11449
  hover_badge_graphical_set?: ElementImageSet;
11450
+ /**
11451
+ * Required on the root style.
11452
+ */
10454
11453
  increase_height_when_selected?: boolean;
11454
+ /**
11455
+ * Required on the root style.
11456
+ */
10455
11457
  left_edge_selected_graphical_set?: ElementImageSet;
11458
+ /**
11459
+ * Required on the root style.
11460
+ */
10456
11461
  override_graphics_on_edges?: boolean;
11462
+ /**
11463
+ * Required on the root style.
11464
+ */
10457
11465
  press_badge_graphical_set?: ElementImageSet;
11466
+ /**
11467
+ * Required on the root style.
11468
+ */
10458
11469
  right_edge_selected_graphical_set?: ElementImageSet;
11470
+ /**
11471
+ * Required on the root style.
11472
+ */
10459
11473
  selected_badge_font_color?: Color;
11474
+ /**
11475
+ * Required on the root style.
11476
+ */
10460
11477
  selected_badge_graphical_set?: ElementImageSet;
11478
+ /**
11479
+ * Required on the root style.
11480
+ */
10461
11481
  selected_font_color?: Color;
10462
11482
  type: 'tab_style';
10463
11483
  }
11484
+ /**
11485
+ * Root style: `"tabbed_pane"`
11486
+ */
10464
11487
  interface TabbedPaneStyleSpecification extends BaseStyleSpecification {
11488
+ /**
11489
+ * Required on the root style.
11490
+ */
10465
11491
  tab_container?: TableStyleSpecification;
11492
+ /**
11493
+ * Required on the root style.
11494
+ */
10466
11495
  tab_content_frame?: FrameStyleSpecification;
10467
11496
  type: 'tabbed_pane_style';
11497
+ /**
11498
+ * Required on the root style.
11499
+ */
10468
11500
  vertical_spacing?: uint32;
10469
11501
  }
11502
+ /**
11503
+ * Root style: `"table"`
11504
+ */
10470
11505
  interface TableStyleSpecification extends BaseStyleSpecification {
10471
11506
  apply_row_graphical_set_per_column?: boolean;
10472
11507
  background_graphical_set?: ElementImageSet;
11508
+ /**
11509
+ * Required on the root style.
11510
+ */
10473
11511
  border?: BorderImageSet;
10474
11512
  bottom_cell_padding?: int16;
10475
11513
  /**
@@ -10485,6 +11523,9 @@ interface TableStyleSpecification extends BaseStyleSpecification {
10485
11523
  default_row_graphical_set?: ElementImageSet;
10486
11524
  even_row_graphical_set?: ElementImageSet;
10487
11525
  horizontal_line_color?: Color;
11526
+ /**
11527
+ * Required on the root style.
11528
+ */
10488
11529
  horizontal_spacing?: int32 | SpacingItem[];
10489
11530
  hovered_graphical_set?: ElementImageSet;
10490
11531
  hovered_row_color?: Color;
@@ -10500,6 +11541,9 @@ interface TableStyleSpecification extends BaseStyleSpecification {
10500
11541
  top_cell_padding?: int16;
10501
11542
  type: 'table_style';
10502
11543
  vertical_line_color?: Color;
11544
+ /**
11545
+ * Required on the root style.
11546
+ */
10503
11547
  vertical_spacing?: int32 | SpacingItem[];
10504
11548
  wide_as_column_count?: boolean;
10505
11549
  }
@@ -10513,46 +11557,149 @@ interface TableStyleSpecification extends BaseStyleSpecification {
10513
11557
  ```
10514
11558
  */
10515
11559
  type TechnologyID = string;
11560
+ /**
11561
+ * Root style: `"technology_slot"`
11562
+ */
10516
11563
  interface TechnologySlotStyleSpecification extends ButtonStyleSpecificationBase {
11564
+ /**
11565
+ * Required on the root style.
11566
+ */
10517
11567
  clicked_ingredients_background?: ElementImageSet;
11568
+ /**
11569
+ * Required on the root style.
11570
+ */
10518
11571
  clicked_overlay?: ElementImageSet;
11572
+ /**
11573
+ * Required on the root style.
11574
+ */
10519
11575
  default_background_shadow?: ElementImageSet;
11576
+ /**
11577
+ * Required on the root style.
11578
+ */
10520
11579
  default_ingredients_background?: ElementImageSet;
11580
+ /**
11581
+ * Required on the root style.
11582
+ */
10521
11583
  disabled_ingredients_background?: ElementImageSet;
11584
+ /**
11585
+ * Required on the root style.
11586
+ */
10522
11587
  drag_handle_style?: EmptyWidgetStyleSpecification;
11588
+ /**
11589
+ * Required on the root style.
11590
+ */
10523
11591
  highlighted_graphical_set?: ElementImageSet;
11592
+ /**
11593
+ * Required on the root style.
11594
+ */
10524
11595
  highlighted_ingredients_background?: ElementImageSet;
11596
+ /**
11597
+ * Required on the root style.
11598
+ */
10525
11599
  hovered_ingredients_background?: ElementImageSet;
11600
+ /**
11601
+ * Required on the root style.
11602
+ */
10526
11603
  hovered_level_band?: ElementImageSet;
11604
+ /**
11605
+ * Required on the root style.
11606
+ */
10527
11607
  hovered_level_font_color?: Color;
11608
+ /**
11609
+ * Required on the root style.
11610
+ */
10528
11611
  hovered_level_range_band?: ElementImageSet;
11612
+ /**
11613
+ * Required on the root style.
11614
+ */
10529
11615
  hovered_level_range_font_color?: Color;
11616
+ /**
11617
+ * Required on the root style.
11618
+ */
10530
11619
  ingredient_icon_overlap?: uint32;
11620
+ /**
11621
+ * Required on the root style.
11622
+ */
10531
11623
  ingredient_icon_size?: uint32;
11624
+ /**
11625
+ * Required on the root style.
11626
+ */
10532
11627
  ingredients_height?: uint32;
11628
+ /**
11629
+ * Required on the root style.
11630
+ */
10533
11631
  ingredients_padding?: uint32;
11632
+ /**
11633
+ * Required on the root style.
11634
+ */
10534
11635
  level_band?: ElementImageSet;
11636
+ /**
11637
+ * Required on the root style.
11638
+ */
10535
11639
  level_band_height?: uint32;
11640
+ /**
11641
+ * Required on the root style.
11642
+ */
10536
11643
  level_band_width?: uint32;
10537
11644
  /**
10538
11645
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11646
+ *
11647
+ * Required on the root style.
10539
11648
  */
10540
11649
  level_font?: string;
11650
+ /**
11651
+ * Required on the root style.
11652
+ */
10541
11653
  level_font_color?: Color;
11654
+ /**
11655
+ * Required on the root style.
11656
+ */
10542
11657
  level_offset_x?: int32;
11658
+ /**
11659
+ * Required on the root style.
11660
+ */
10543
11661
  level_offset_y?: int32;
11662
+ /**
11663
+ * Required on the root style.
11664
+ */
10544
11665
  level_range_band?: ElementImageSet;
10545
11666
  /**
10546
11667
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11668
+ *
11669
+ * Required on the root style.
10547
11670
  */
10548
11671
  level_range_font?: string;
11672
+ /**
11673
+ * Required on the root style.
11674
+ */
10549
11675
  level_range_font_color?: Color;
11676
+ /**
11677
+ * Required on the root style.
11678
+ */
10550
11679
  level_range_offset_x?: int32;
11680
+ /**
11681
+ * Required on the root style.
11682
+ */
10551
11683
  level_range_offset_y?: int32;
11684
+ /**
11685
+ * Required on the root style.
11686
+ */
10552
11687
  progress_bar?: ElementImageSet;
11688
+ /**
11689
+ * Required on the root style.
11690
+ */
10553
11691
  progress_bar_background?: ElementImageSet;
11692
+ /**
11693
+ * Required on the root style.
11694
+ */
10554
11695
  progress_bar_color?: Color;
11696
+ /**
11697
+ * Required on the root style.
11698
+ */
10555
11699
  progress_bar_height?: uint32;
11700
+ /**
11701
+ * Required on the root style.
11702
+ */
10556
11703
  progress_bar_shadow?: ElementImageSet;
10557
11704
  type: 'technology_slot_style';
10558
11705
  }
@@ -10624,7 +11771,7 @@ interface TechnologyUnit {
10624
11771
  */
10625
11772
  count_formula?: MathExpression;
10626
11773
  /**
10627
- * List of ingredients needed for one unit of research. The items must all be {@link ToolPrototypes | prototype:ToolPrototype}.
11774
+ * List of ingredients needed for one unit of research.
10628
11775
  */
10629
11776
  ingredients: ResearchIngredient[];
10630
11777
  /**
@@ -10650,24 +11797,71 @@ interface TerritorySettings {
10650
11797
  */
10651
11798
  units?: EntityID[];
10652
11799
  }
11800
+ /**
11801
+ * Root style: `"textbox"`
11802
+ */
10653
11803
  interface TextBoxStyleSpecification extends BaseStyleSpecification {
11804
+ /**
11805
+ * Required on the root style.
11806
+ */
10654
11807
  active_background?: ElementImageSet;
11808
+ /**
11809
+ * Required on the root style.
11810
+ */
10655
11811
  default_background?: ElementImageSet;
11812
+ /**
11813
+ * Required on the root style.
11814
+ */
10656
11815
  disabled_background?: ElementImageSet;
11816
+ /**
11817
+ * Required on the root style.
11818
+ */
10657
11819
  disabled_font_color?: Color;
10658
11820
  /**
10659
11821
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11822
+ *
11823
+ * Required on the root style.
10660
11824
  */
10661
11825
  font?: string;
11826
+ /**
11827
+ * Required on the root style.
11828
+ */
10662
11829
  font_color?: Color;
11830
+ /**
11831
+ * Required on the root style.
11832
+ */
10663
11833
  game_controller_hovered_background?: ElementImageSet;
11834
+ /**
11835
+ * Required on the root style.
11836
+ */
10664
11837
  rich_text_highlight_error_color?: Color;
11838
+ /**
11839
+ * Required on the root style.
11840
+ */
10665
11841
  rich_text_highlight_ok_color?: Color;
11842
+ /**
11843
+ * Required on the root style.
11844
+ */
10666
11845
  rich_text_highlight_warning_color?: Color;
11846
+ /**
11847
+ * Required on the root style.
11848
+ */
10667
11849
  rich_text_setting?: RichTextSetting;
11850
+ /**
11851
+ * Required on the root style.
11852
+ */
10668
11853
  selected_rich_text_highlight_error_color?: Color;
11854
+ /**
11855
+ * Required on the root style.
11856
+ */
10669
11857
  selected_rich_text_highlight_ok_color?: Color;
11858
+ /**
11859
+ * Required on the root style.
11860
+ */
10670
11861
  selected_rich_text_highlight_warning_color?: Color;
11862
+ /**
11863
+ * Required on the root style.
11864
+ */
10671
11865
  selection_background_color?: Color;
10672
11866
  type: 'textbox_style';
10673
11867
  }
@@ -10725,9 +11919,18 @@ interface TileBuildSound {
10725
11919
  */
10726
11920
  interface TileBuildabilityRule {
10727
11921
  area: SimpleBoundingBox;
10728
- colliding_tiles?: CollisionMaskConnector;
11922
+ colliding_tiles?: TileCollisionMaskConnector;
10729
11923
  remove_on_collision?: boolean;
10730
- required_tiles?: CollisionMaskConnector;
11924
+ required_tiles?: TileCollisionMaskConnector;
11925
+ }
11926
+ /**
11927
+ * The base game provides common collision mask functions in a Lua file in the core {@link lualib | https://github.com/wube/factorio-data/blob/master/core/lualib/collision-mask-util.lua}.
11928
+ */
11929
+ interface TileCollisionMaskConnector {
11930
+ /**
11931
+ * Every key in the dictionary is the name of one {@link layer | prototype:CollisionLayerPrototype} the object collides with. The value is meaningless and always `true`. An empty table means that no layers are set.
11932
+ */
11933
+ layers: Record<CollisionLayerID, true>;
10731
11934
  }
10732
11935
  /**
10733
11936
  * The name of an {@link TileEffectDefinition | prototype:TileEffectDefinition}.
@@ -11690,6 +12893,85 @@ interface TransportBeltConnectorFrame {
11690
12893
  frame_main_scanner_vertical_y_scale: float;
11691
12894
  frame_shadow: AnimationVariations;
11692
12895
  }
12896
+ interface TravelToSpacePlatformsModifier extends BoolModifier {
12897
+ type: 'unlock-travel-to-space-platforms';
12898
+ /**
12899
+ * If `false`, do not draw the small "constant" icon over the technology effect icon.
12900
+ */
12901
+ use_icon_overlay_constant?: boolean;
12902
+ }
12903
+ /**
12904
+ * {@link TreePrototype | prototype:TreePrototype}s develop over time. To introduce visual fidelity, the shape of the plant is shrunk and distorted using a warp texture, and it slowly retracts back into its grown state.
12905
+ */
12906
+ interface TreeGrowth {
12907
+ /**
12908
+ * Encodes the initial UV offset at a given pixel, used to sample {@link TreeGrowth::trunk_warp | prototype:TreeGrowth::trunk_warp}.
12909
+ *
12910
+ * The offset is calculated like in the following pseudocode:
12911
+ * ```
12912
+ * vec2 growthWarpLinear = vec2((growthWarp.r - 0.5) * 2 * pow(time, 2.546872), 0);
12913
+ * vec2 growthWarpQuadratic = (uv - vec2(0.3, 0.2)) * pow(growthWarp.g * pow(time, 4.06187), 2) * 1000;
12914
+ * vec2 growthWarpUVOffset = clamp(growthWarpLinear + growthWarpQuadratic + uv, 0, 1);
12915
+ * ```
12916
+ */
12917
+ growth_warp: Sprite;
12918
+ /**
12919
+ * Encodes the point in time (0-1) since the plant started growing, at which a given pixel of the *leaves* texture becomes visible.
12920
+ *
12921
+ * This is a grayscale texture where white is t=0 (beginning of growth) and black is t=1 (end of growth).
12922
+ */
12923
+ harvest_alpha: Sprite;
12924
+ /**
12925
+ * Encodes the UV offset at a given pixel, used to sample the leaves texture.
12926
+ *
12927
+ * The final UV is calculated like in the following pseudocode:
12928
+ * ```
12929
+ * vec2 harvestWarpLinear = (harvestWarp.rg - 0.5) * 2 * pow(time, 2.546872);
12930
+ * vec2 harvestUV = clamp(trunkUV + harvestWarpLinear, 0, 1);
12931
+ * ```
12932
+ *
12933
+ * See {@link TreeGrowth::trunk_warp | prototype:TreeGrowth::trunk_warp} for how `trunkUV` is calculated.
12934
+ */
12935
+ harvest_warp: Sprite;
12936
+ /**
12937
+ * Exponent for the easing function of the growth progress (progress ^ progressExponent) which is used by the growth animation.
12938
+ */
12939
+ progress_exponent: float;
12940
+ /**
12941
+ * Encodes the point in time (0-1) since the plant started growing, at which a given pixel of the *shadow* texture becomes visible.
12942
+ *
12943
+ * This is a grayscale texture where white is t=0 (beginning of growth) and black is t=1 (end of growth).
12944
+ */
12945
+ shadow_alpha: Sprite;
12946
+ /**
12947
+ * Encodes the UV offset at a given pixel, used to sample the shadow texture.
12948
+ *
12949
+ * The final UV is calculated like in the following pseudocode:
12950
+ * ```
12951
+ * vec2 shadowWarpLinear = (shadowWarp.rg - 0.5) * 2 * pow(time, 2.546872);
12952
+ * vec2 shadowUV = clamp(uv + shadowWarpLinear, 0, 1);
12953
+ * ```
12954
+ */
12955
+ shadow_warp: Sprite;
12956
+ /**
12957
+ * Encodes the point in time (0-1) since the plant started growing, at which a given pixel of the *trunk* texture becomes visible.
12958
+ *
12959
+ * This is a grayscale texture where white is t=0 (beginning of growth) and black is t=1 (end of growth).
12960
+ */
12961
+ trunk_alpha: Sprite;
12962
+ /**
12963
+ * Encodes the UV offset at a given pixel, used to sample the trunk texture, and {@link TreeGrowth::harvest_warp | prototype:TreeGrowth::harvest_warp}.
12964
+ *
12965
+ * The final UV is calculated like in the following pseudocode:
12966
+ * ```
12967
+ * vec2 trunkWarpLinear = (trunkWarp.rg - 0.5) * 2 * pow(time, 2.546872);
12968
+ * vec2 trunkUV = clamp(growthWarpUVOffset + trunkWarpLinear + growthWarpQuadratic, 0, 1);
12969
+ * ```
12970
+ *
12971
+ * See {@link TreeGrowth::growth_warp | prototype:TreeGrowth::growth_warp} for how `growthWarpQuadratic` and `growthWarpUVOffset` are calculated.
12972
+ */
12973
+ trunk_warp: Sprite;
12974
+ }
11693
12975
  /**
11694
12976
  * Tree has number of "dying" stages, which is deduced from frame count of `shadow` if shadow is defined, otherwise from frame count of `trunk`. Frame count of `leaves` has to be one less than deduced number stages, as last stage is always assumed to be leafless.
11695
12977
  */
@@ -11793,7 +13075,7 @@ DelayedTriggerDelivery;
11793
13075
  */
11794
13076
  interface TriggerDeliveryItem {
11795
13077
  /**
11796
- * Provides the source of the TriggerDelivery as as both the source and target of the effect.
13078
+ * Provides the source of the TriggerDelivery as both the source and target of the effect.
11797
13079
  */
11798
13080
  source_effects?: TriggerEffect;
11799
13081
  target_effects?: TriggerEffect;
@@ -11870,7 +13152,10 @@ DestroyDecorativesTriggerEffectItem | /**
11870
13152
  CameraEffectTriggerEffectItem | /**
11871
13153
  * Loaded when the `type` is `"activate-impact"`.
11872
13154
  */
11873
- ActivateImpactTriggerEffectItem) | (/**
13155
+ ActivateImpactTriggerEffectItem | /**
13156
+ * Loaded when the `type` is `"create-pollution"`.
13157
+ */
13158
+ CreatePollutionTriggerEffectItem) | (/**
11874
13159
  * Loaded when the `type` is `"damage"`.
11875
13160
  */
11876
13161
  DamageEntityTriggerEffectItem | /**
@@ -11939,7 +13224,10 @@ DestroyDecorativesTriggerEffectItem | /**
11939
13224
  CameraEffectTriggerEffectItem | /**
11940
13225
  * Loaded when the `type` is `"activate-impact"`.
11941
13226
  */
11942
- ActivateImpactTriggerEffectItem)[];
13227
+ ActivateImpactTriggerEffectItem | /**
13228
+ * Loaded when the `type` is `"create-pollution"`.
13229
+ */
13230
+ CreatePollutionTriggerEffectItem)[];
11943
13231
  /**
11944
13232
  * The abstract base of all {@link TriggerEffects | prototype:TriggerEffect}.
11945
13233
  */
@@ -12242,6 +13530,13 @@ type UnitSpawnDefinition = {
12242
13530
  EntityID,
12243
13531
  SpawnPoint[]
12244
13532
  ];
13533
+ interface UnlockLogisticNetworkModifier extends BoolModifier {
13534
+ type: 'unlock-logistic-network';
13535
+ /**
13536
+ * If `false`, do not draw the small "constant" icon over the technology effect icon.
13537
+ */
13538
+ use_icon_overlay_constant?: boolean;
13539
+ }
12245
13540
  interface UnlockQualityModifier extends BaseModifier {
12246
13541
  quality: QualityID;
12247
13542
  type: 'unlock-quality';
@@ -12394,6 +13689,8 @@ interface VariableAmbientSoundLayer {
12394
13689
  * Number of samples must be the same across all variants.
12395
13690
  *
12396
13691
  * Samples cannot have variable volume and all samples must have the same default volume.
13692
+ *
13693
+ * Samples are required to have sampling frequency of 44.1kHz. This is checked at runtime.
12397
13694
  */
12398
13695
  variants: Sound[];
12399
13696
  }
@@ -12583,7 +13880,7 @@ type VariableAmbientSoundStateType = 'regular' | /**
12583
13880
  'stop';
12584
13881
  interface VariableAmbientSoundVariableSound {
12585
13882
  /**
12586
- * Number of audio signal samples (default sampling frequency is 44.1kHz) defining a time grid. Music samples are aligned with this grid when queued.
13883
+ * Number of audio signal samples (sampling frequency is 44.1kHz) defining a time grid. Music samples are aligned with this grid when queued.
12587
13884
  */
12588
13885
  alignment_samples?: uint32;
12589
13886
  intermezzo?: Sound;
@@ -12659,10 +13956,19 @@ interface VehicleLogisticsModifier extends BoolModifier {
12659
13956
  use_icon_overlay_constant?: boolean;
12660
13957
  }
12661
13958
  type VerticalAlign = 'top' | 'center' | 'bottom';
13959
+ /**
13960
+ * Root style: `"vertical_flow"`
13961
+ */
12662
13962
  interface VerticalFlowStyleSpecification extends BaseStyleSpecification {
12663
13963
  type: 'vertical_flow_style';
13964
+ /**
13965
+ * Required on the root style.
13966
+ */
12664
13967
  vertical_spacing?: int32;
12665
13968
  }
13969
+ /**
13970
+ * Root style: `"vertical_scrollbar"`
13971
+ */
12666
13972
  interface VerticalScrollBarStyleSpecification extends ScrollBarStyleSpecification {
12667
13973
  type: 'vertical_scrollbar_style';
12668
13974
  }
@@ -13013,7 +14319,7 @@ type WorldAmbientSoundDefinition = {
13013
14319
  sound?: Sound;
13014
14320
  } | Sound;
13015
14321
  /**
13016
- * Format uses a dot as its decimal delimiter. Doubles are stored in the {@link double precision | http://en.wikipedia.org/wiki/Double-precision_floating-point_format} floating point format.
14322
+ * Format uses a dot as its decimal delimiter. Doubles are stored in the {@link double precision | https://en.wikipedia.org/wiki/Double-precision_floating-point_format} floating point format.
13017
14323
  *
13018
14324
  * May not be {@link NaN | https://en.wikipedia.org/wiki/NaN}.
13019
14325
  * @example ```
@@ -13051,7 +14357,7 @@ type int32 = number;
13051
14357
  */
13052
14358
  type int8 = number;
13053
14359
  /**
13054
- * A simple {@link Lua table | http://www.lua.org/pil/2.5.html}. An array is a table that uses continuous integer keys starting at `1`, while a dictionary can use numeric or string keys in any order or combination.
14360
+ * A simple {@link Lua table | https://www.lua.org/pil/2.5.html}. An array is a table that uses continuous integer keys starting at `1`, while a dictionary can use numeric or string keys in any order or combination.
13055
14361
  *
13056
14362
  * Tables used by prototypes may be parsed via an internal class called "property tree". Errors that reference this class treat tables as 0-indexed. For example `Value must be a number in property tree at ROOT.technology.steel-plate-productivity.effects[0].change` refers to element 0 of the property tree array which in Lua is at index 1.
13057
14363
  */