factorio-types 1.2.58 → 1.2.60

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.77
5
+ // Factorio version 2.1.8
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
  }
@@ -195,6 +215,9 @@ type Alignment = 'top-left' | 'middle-left' | /**
195
215
  * The same as `"middle-right"`
196
216
  */
197
217
  'right' | 'bottom-right';
218
+ /**
219
+ * Triggered when using the "build ghost" hotkey to build something.
220
+ */
198
221
  interface AlternativeBuildTipTrigger extends CountBasedTipTrigger {
199
222
  type: 'alternative-build';
200
223
  }
@@ -213,7 +236,10 @@ type AmbientSoundType = /**
213
236
  'hero-track' | /**
214
237
  * This track is played interleaved (alternating) with `"main-track"` tracks.
215
238
  */
216
- 'interlude';
239
+ 'interlude' | /**
240
+ * This track is only played by script.
241
+ */
242
+ 'script-track';
217
243
  /**
218
244
  * The name of an {@link AmmoCategory | prototype:AmmoCategory}.
219
245
  * @example ```
@@ -267,6 +293,10 @@ interface AmmoType {
267
293
  * Energy consumption of a single shot, if applicable.
268
294
  */
269
295
  energy_consumption?: Energy;
296
+ /**
297
+ * If true, attacks will always be clamped to max range even if the target is within range. Used for shotguns.
298
+ */
299
+ force_clamp_to_max_range?: boolean;
270
300
  /**
271
301
  * 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
302
  *
@@ -442,6 +472,10 @@ layers =
442
472
  */
443
473
  type AnimationFrameSequence = uint16[];
444
474
  interface AnimationParameters extends SpriteParameters {
475
+ /**
476
+ * If `true`, the animation frame count may be cut to half depending on detected hardware and other graphics settings.
477
+ */
478
+ allow_reducing_frames?: boolean;
445
479
  /**
446
480
  * 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
481
  */
@@ -826,6 +860,9 @@ DontUseEntityInEnergyProductionAchievementPrototype | /**
826
860
  * `'editor-controller'`
827
861
  */
828
862
  EditorControllerPrototype | /**
863
+ * `'electric-energy-interface-equipment'`
864
+ */
865
+ ElectricEnergyInterfaceEquipmentPrototype | /**
829
866
  * `'electric-energy-interface'`
830
867
  */
831
868
  ElectricEnergyInterfacePrototype | /**
@@ -1369,6 +1406,9 @@ VirtualSignalPrototype | /**
1369
1406
  * `'wall'`
1370
1407
  */
1371
1408
  WallPrototype;
1409
+ /**
1410
+ * Triggered when a {@link space platform starter pack | prototype:SpacePlatformStarterPackPrototype} is used to create a space platform.
1411
+ */
1372
1412
  interface ApplyStarterPackTipTrigger extends CountBasedTipTrigger {
1373
1413
  type: 'apply-starter-pack';
1374
1414
  }
@@ -1379,6 +1419,7 @@ type ApplyTileTint = 'primary' | 'secondary';
1379
1419
  interface AreaTriggerItem extends TriggerItem {
1380
1420
  collision_mode?: 'distance-from-collision-box' | 'distance-from-center';
1381
1421
  radius: double;
1422
+ require_origin_is_valid?: boolean;
1382
1423
  show_in_tooltip?: boolean;
1383
1424
  target_enemies?: boolean;
1384
1425
  target_entities?: boolean;
@@ -1629,7 +1670,7 @@ interface BaseAttackParameters {
1629
1670
  */
1630
1671
  fire_penalty?: float;
1631
1672
  /**
1632
- * A higher penalty will discourage turrets from targeting units with higher health. A negative penalty will encourage turrets to target units with higher health.
1673
+ * 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.
1633
1674
  */
1634
1675
  health_penalty?: float;
1635
1676
  /**
@@ -1667,6 +1708,10 @@ interface BaseAttackParameters {
1667
1708
  * Played once at the start of the attack if these are {@link ProjectileAttackParameters | prototype:ProjectileAttackParameters}.
1668
1709
  */
1669
1710
  sound?: LayeredSound;
1711
+ /**
1712
+ * A higher penalty will discourage turrets from targeting asteroids that are threatening. A negative penalty will encourage turrets to target threatening asteroids.
1713
+ */
1714
+ threatening_asteroid_penalty?: float;
1670
1715
  /**
1671
1716
  * 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.
1672
1717
  */
@@ -1722,6 +1767,16 @@ interface BaseModifier {
1722
1767
  */
1723
1768
  icons?: IconData[];
1724
1769
  }
1770
+ interface BasePumpWagonConnectionAnimations {
1771
+ input?: BasePumpWagonConnectionAnimations4Way;
1772
+ output?: BasePumpWagonConnectionAnimations4Way;
1773
+ }
1774
+ interface BasePumpWagonConnectionAnimations4Way {
1775
+ east: Animation;
1776
+ north: Animation;
1777
+ south: Animation;
1778
+ west: Animation;
1779
+ }
1725
1780
  /**
1726
1781
  * The abstract base of all {@link StyleSpecifications | prototype:StyleSpecification}.
1727
1782
  * @example ```
@@ -2034,19 +2089,19 @@ interface BoilerPictures {
2034
2089
  patch?: Sprite;
2035
2090
  structure: Animation;
2036
2091
  }
2037
- interface BonusGuiOrdering {
2038
- artillery_range: Order;
2039
- beacon_distribution: Order;
2040
- bulk_inserter: Order;
2041
- character: Order;
2042
- follower_robots: Order;
2043
- inserter: Order;
2044
- mining_productivity: Order;
2045
- research_speed: Order;
2046
- stack_inserter: Order;
2047
- train_braking_force: Order;
2048
- turret_attack: Order;
2049
- worker_robots: Order;
2092
+ interface BonusUtilityConstants {
2093
+ artillery_range: string;
2094
+ beacon_distribution: string;
2095
+ bulk_inserter: string;
2096
+ character: string;
2097
+ follower_robots: string;
2098
+ inserter: string;
2099
+ mining_productivity: string;
2100
+ research_speed: string;
2101
+ stack_inserter: string;
2102
+ train_braking_force: string;
2103
+ turret_attack: string;
2104
+ worker_robots: string;
2050
2105
  }
2051
2106
  interface BoolModifier extends BaseModifier {
2052
2107
  /**
@@ -2156,6 +2211,10 @@ interface BulkInserterCapacityBonusModifier extends SimpleModifier {
2156
2211
  use_icon_overlay_constant?: boolean;
2157
2212
  }
2158
2213
  interface BurnerEnergySource extends BaseEnergySource {
2214
+ /**
2215
+ * If this burner attempts to auto-refill fuel from the owner character, car, spider vehicle, cargo wagon, or artillery wagon.
2216
+ */
2217
+ auto_refuel?: boolean;
2159
2218
  burner_usage?: BurnerUsageID;
2160
2219
  burnt_inventory_size?: ItemStackIndex;
2161
2220
  /**
@@ -2183,25 +2242,57 @@ interface BurnerEnergySource extends BaseEnergySource {
2183
2242
  ```
2184
2243
  */
2185
2244
  type BurnerUsageID = string;
2245
+ /**
2246
+ * Root style: `"button"`
2247
+ */
2186
2248
  interface ButtonStyleSpecificationBase extends StyleWithClickableGraphicalSetSpecification {
2249
+ /**
2250
+ * Required on the root style.
2251
+ */
2187
2252
  clicked_font_color?: Color;
2188
2253
  clicked_vertical_offset?: uint32;
2254
+ /**
2255
+ * Required on the root style.
2256
+ */
2189
2257
  default_font_color?: Color;
2258
+ /**
2259
+ * Required on the root style.
2260
+ */
2190
2261
  disabled_font_color?: Color;
2191
2262
  draw_grayscale_picture?: boolean;
2192
2263
  draw_shadow_under_picture?: boolean;
2193
2264
  /**
2194
2265
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
2266
+ *
2267
+ * Required on the root style.
2195
2268
  */
2196
2269
  font?: string;
2270
+ /**
2271
+ * Required on the root style.
2272
+ */
2197
2273
  hovered_font_color?: Color;
2198
2274
  icon_horizontal_align?: HorizontalAlign;
2199
2275
  invert_colors_of_picture_when_disabled?: boolean;
2200
2276
  invert_colors_of_picture_when_hovered_or_toggled?: boolean;
2277
+ /**
2278
+ * Required on the root style.
2279
+ */
2201
2280
  pie_progress_color?: Color;
2281
+ /**
2282
+ * Required on the root style.
2283
+ */
2202
2284
  selected_clicked_font_color?: Color;
2285
+ /**
2286
+ * Required on the root style.
2287
+ */
2203
2288
  selected_font_color?: Color;
2289
+ /**
2290
+ * Required on the root style.
2291
+ */
2204
2292
  selected_hovered_font_color?: Color;
2293
+ /**
2294
+ * Required on the root style.
2295
+ */
2205
2296
  strikethrough_color?: Color;
2206
2297
  type: string;
2207
2298
  }
@@ -2215,6 +2306,9 @@ interface CameraEffectTriggerEffectItem extends TriggerEffectItem {
2215
2306
  strength?: float;
2216
2307
  type: 'camera-effect';
2217
2308
  }
2309
+ /**
2310
+ * Root style: `"camera"`
2311
+ */
2218
2312
  interface CameraStyleSpecification extends EmptyWidgetStyleSpecificationBase {
2219
2313
  type: 'camera_style';
2220
2314
  }
@@ -2245,33 +2339,32 @@ interface CargoBayConnectableGraphicsSet {
2245
2339
  animation?: Animation;
2246
2340
  animation_render_layer?: RenderLayer;
2247
2341
  connections?: CargoBayConnections;
2248
- picture?: LayeredSprite;
2342
+ picture?: LayeredSprite4Way;
2249
2343
  /**
2250
2344
  * Only loaded if this graphics set is used in a property called `graphics_set`, refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
2251
2345
  */
2252
2346
  water_reflection?: WaterReflectionDefinition;
2253
2347
  }
2254
- /**
2255
- * Walls should have an even number of variations because they are interleaved.
2256
- */
2257
2348
  interface CargoBayConnections {
2258
- bottom_left_inner_corner?: LayeredSpriteVariations;
2259
- bottom_left_outer_corner?: LayeredSpriteVariations;
2260
- bottom_right_inner_corner?: LayeredSpriteVariations;
2261
- bottom_right_outer_corner?: LayeredSpriteVariations;
2262
- bottom_wall?: LayeredSpriteVariations;
2263
2349
  bridge_crossing?: LayeredSpriteVariations;
2264
2350
  bridge_horizontal_narrow?: LayeredSpriteVariations;
2265
2351
  bridge_horizontal_wide?: LayeredSpriteVariations;
2266
2352
  bridge_vertical_narrow?: LayeredSpriteVariations;
2267
2353
  bridge_vertical_wide?: LayeredSpriteVariations;
2268
- left_wall?: LayeredSpriteVariations;
2269
- right_wall?: LayeredSpriteVariations;
2270
- top_left_inner_corner?: LayeredSpriteVariations;
2271
- top_left_outer_corner?: LayeredSpriteVariations;
2272
- top_right_inner_corner?: LayeredSpriteVariations;
2273
- top_right_outer_corner?: LayeredSpriteVariations;
2274
- top_wall?: LayeredSpriteVariations;
2354
+ /**
2355
+ * 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.
2356
+ *
2357
+ * Supports at most 255 items.
2358
+ */
2359
+ tileset?: LayeredSpriteVariations[][];
2360
+ /**
2361
+ * A mapping from a bitmask index to a tileset index. A bitmask index mapped to 0 won't be drawn.
2362
+ *
2363
+ * 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).
2364
+ *
2365
+ * Mandatory if `tileset` is defined.
2366
+ */
2367
+ tileset_mapping?: LuaTable<uint8, uint8 | uint8[]>;
2275
2368
  }
2276
2369
  interface CargoHatchDefinition {
2277
2370
  busy_timeout_ticks?: uint32;
@@ -2525,7 +2618,13 @@ interface ChartUtilityConstants {
2525
2618
  chart_train_stop_text_color: Color;
2526
2619
  circuit_network_member_color: Color;
2527
2620
  copper_wire_color: Color;
2621
+ /**
2622
+ * Defaults to `1.0`.
2623
+ */
2528
2624
  custom_tag_max_scale?: float;
2625
+ /**
2626
+ * Defaults to `1.0`.
2627
+ */
2529
2628
  custom_tag_scale?: float;
2530
2629
  custom_tag_selected_overlay_tint?: Color;
2531
2630
  /**
@@ -2570,16 +2669,39 @@ interface ChartUtilityConstants {
2570
2669
  yellow_signal_color: Color;
2571
2670
  zoom_threshold_to_draw_spider_path: double;
2572
2671
  }
2672
+ /**
2673
+ * Root style: `"checkbox"`
2674
+ */
2573
2675
  interface CheckBoxStyleSpecification extends StyleWithClickableGraphicalSetSpecification {
2676
+ /**
2677
+ * Required on the root style.
2678
+ */
2574
2679
  checkmark?: Sprite;
2680
+ /**
2681
+ * Required on the root style.
2682
+ */
2575
2683
  disabled_checkmark?: Sprite;
2684
+ /**
2685
+ * Required on the root style.
2686
+ */
2576
2687
  disabled_font_color?: Color;
2577
2688
  /**
2578
2689
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
2690
+ *
2691
+ * Required on the root style.
2579
2692
  */
2580
2693
  font?: string;
2694
+ /**
2695
+ * Required on the root style.
2696
+ */
2581
2697
  font_color?: Color;
2698
+ /**
2699
+ * Required on the root style.
2700
+ */
2582
2701
  intermediate_mark?: Sprite;
2702
+ /**
2703
+ * Required on the root style.
2704
+ */
2583
2705
  text_padding?: uint32;
2584
2706
  type: 'checkbox_style';
2585
2707
  }
@@ -3329,15 +3451,20 @@ interface CreateEntityTriggerEffectItemBase extends TriggerEffectItem {
3329
3451
  * Create the entity only when they are within a 200 tile range of any connected player.
3330
3452
  */
3331
3453
  only_when_visible?: boolean;
3454
+ /**
3455
+ * If `true`, colliding ghosts and corpses will not be removed by the creation of some entity types.
3456
+ */
3457
+ preserve_ghosts_and_corpses?: boolean;
3332
3458
  /**
3333
3459
  * The result entity will be protected from automated attacks of enemies.
3334
3460
  */
3335
3461
  protected?: boolean;
3462
+ show_details_in_tooltip?: boolean;
3336
3463
  show_in_tooltip?: boolean;
3337
3464
  /**
3338
3465
  * Entity creation will not occur if any tile matches the collision condition. Defaults to no collisions.
3339
3466
  */
3340
- tile_collision_mask?: CollisionMaskConnector;
3467
+ tile_collision_mask?: TileCollisionMaskConnector;
3341
3468
  /**
3342
3469
  * If `true`, the {@link on_trigger_created_entity | runtime:on_trigger_created_entity} event will be raised.
3343
3470
  */
@@ -3398,6 +3525,21 @@ interface CreateParticleTriggerEffectItemBase extends TriggerEffectItem {
3398
3525
  tint?: Color;
3399
3526
  type: string;
3400
3527
  }
3528
+ interface CreatePollutionTriggerEffectItem extends TriggerEffectItem {
3529
+ /**
3530
+ * This may be negative which will reduce pollution when run.
3531
+ */
3532
+ amount: double;
3533
+ /**
3534
+ * If not defined, and use_entity_from_trigger is false, the pollution does not show in statistics.
3535
+ */
3536
+ entity?: EntityID;
3537
+ type: 'create-pollution';
3538
+ /**
3539
+ * If not set, and entity is not set, the pollution does not show in statistics.
3540
+ */
3541
+ use_entity_from_trigger?: boolean;
3542
+ }
3401
3543
  interface CreateSmokeTriggerEffectItem extends CreateEntityTriggerEffectItemBase {
3402
3544
  initial_height?: float;
3403
3545
  speed?: Vector;
@@ -3593,7 +3735,7 @@ type DamageTypeID = string;
3593
3735
  /**
3594
3736
  * The data table is read by the game to load all prototypes.
3595
3737
  *
3596
- * 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.
3738
+ * 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.
3597
3739
  *
3598
3740
  * 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}.
3599
3741
  */
@@ -3735,7 +3877,7 @@ interface DifficultySettings {
3735
3877
  */
3736
3878
  spoil_time_modifier?: double;
3737
3879
  /**
3738
- * Must be >= 0.001 and <= 1000.
3880
+ * Must be >= 0.001 and <= 100000.
3739
3881
  */
3740
3882
  technology_price_multiplier?: double;
3741
3883
  }
@@ -3753,14 +3895,35 @@ interface DirectionShift {
3753
3895
  * One of the 16 directions, specified with a string.
3754
3896
  */
3755
3897
  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';
3898
+ /**
3899
+ * Root style: `"double_slider"`
3900
+ */
3756
3901
  interface DoubleSliderStyleSpecification extends SliderStyleSpecificationBase {
3757
3902
  type: 'double_slider_style';
3758
3903
  }
3904
+ /**
3905
+ * Root style: `"dropdown"`
3906
+ */
3759
3907
  interface DropDownStyleSpecification extends BaseStyleSpecification {
3908
+ /**
3909
+ * Required on the root style.
3910
+ */
3760
3911
  button_style?: ButtonStyleSpecification;
3912
+ /**
3913
+ * Required on the root style.
3914
+ */
3761
3915
  icon?: Sprite;
3916
+ /**
3917
+ * Required on the root style.
3918
+ */
3762
3919
  list_box_style?: ListBoxStyleSpecification;
3920
+ /**
3921
+ * Required on the root style.
3922
+ */
3763
3923
  opened_sound?: Sound;
3924
+ /**
3925
+ * Required on the root style.
3926
+ */
3764
3927
  selector_and_title_spacing?: int16;
3765
3928
  type: 'dropdown_style';
3766
3929
  }
@@ -3768,11 +3931,29 @@ interface DropItemTipTrigger extends CountBasedTipTrigger {
3768
3931
  drop_into_entity?: boolean;
3769
3932
  type: 'drop-item';
3770
3933
  }
3934
+ interface EditorUtilityConstants {
3935
+ cliff_editor_remove_cliffs_color: Color;
3936
+ clone_editor_brush_cursor_preview_tint: Color;
3937
+ clone_editor_brush_destination_color: Color;
3938
+ clone_editor_brush_source_color: Color;
3939
+ clone_editor_brush_world_preview_tint: Color;
3940
+ clone_editor_copy_destination_allowed_color: Color;
3941
+ clone_editor_copy_destination_not_allowed_color: Color;
3942
+ clone_editor_copy_source_color: Color;
3943
+ decorative_editor_selection_preview_radius: uint8;
3944
+ decorative_editor_selection_preview_tint: Color;
3945
+ force_editor_select_area_color: Color;
3946
+ script_editor_drag_area_color: Color;
3947
+ script_editor_select_area_color: Color;
3948
+ tile_editor_area_selection_color: Color;
3949
+ tile_editor_selection_preview_radius: uint8;
3950
+ tile_editor_selection_preview_tint: Color;
3951
+ }
3771
3952
  /**
3772
- * 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.
3953
+ * 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.
3773
3954
  * @example ```
3774
3955
  -- These are the effects of the vanilla Speed Module 3
3775
- {speed = 0.5, consumption = 0.7, quality = -0.25}
3956
+ {speed = 0.5, consumption = 0.7, quality = -0.025}
3776
3957
  ```
3777
3958
  */
3778
3959
  interface Effect {
@@ -3789,7 +3970,7 @@ interface Effect {
3789
3970
  */
3790
3971
  productivity?: EffectValue;
3791
3972
  /**
3792
- * 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%.
3973
+ * Adds a bonus chance to increase a product's quality. The minimum possible sum is 0%.
3793
3974
  */
3794
3975
  quality?: EffectValue;
3795
3976
  /**
@@ -3799,6 +3980,36 @@ interface Effect {
3799
3980
  }
3800
3981
  interface EffectReceiver {
3801
3982
  base_effect?: Effect;
3983
+ /**
3984
+ * Limits total consumption effect value.
3985
+ *
3986
+ * Low limit cannot be less than `-0.9999`. High limit cannot be greater than `1000`.
3987
+ */
3988
+ consumption_limits?: EffectValueRange;
3989
+ /**
3990
+ * Limits total pollution effect value.
3991
+ *
3992
+ * Low limit cannot be less than `-0.9999`. High limit cannot be greater than `1000`.
3993
+ */
3994
+ pollution_limits?: EffectValueRange;
3995
+ /**
3996
+ * 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}.
3997
+ *
3998
+ * Low limit cannot be less than `-0.9999`. High limit cannot be greater than `1000`.
3999
+ */
4000
+ productivity_limits?: EffectValueRange;
4001
+ /**
4002
+ * Limits total quality effect value.
4003
+ *
4004
+ * Low limit cannot be less than `-1000`. High limit cannot be greater than `1000`.
4005
+ */
4006
+ quality_limits?: EffectValueRange;
4007
+ /**
4008
+ * Limits total speed effect value.
4009
+ *
4010
+ * Low limit cannot be less than `-0.9999`. High limit cannot be greater than `1000`.
4011
+ */
4012
+ speed_limits?: EffectValueRange;
3802
4013
  uses_beacon_effects?: boolean;
3803
4014
  uses_module_effects?: boolean;
3804
4015
  /**
@@ -3864,17 +4075,19 @@ type EffectTypeLimitation = (/**
3864
4075
  */
3865
4076
  'quality')[];
3866
4077
  /**
3867
- * 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.
3868
- *
3869
- * 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%.
4078
+ * 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`.
3870
4079
  * @example ```
3871
4080
  {speed = 0.07} -- 7% bonus
3872
4081
  ```
3873
4082
  * @example ```
3874
- {quality = 0.25} -- multiplied by quality normal next_probability = 0.1 -> 2.5% bonus
4083
+ {quality = 0.025} -- 2.5% bonus
3875
4084
  ```
3876
4085
  */
3877
4086
  type EffectValue = float;
4087
+ interface EffectValueRange {
4088
+ high?: EffectValue;
4089
+ low?: EffectValue;
4090
+ }
3878
4091
  type EffectVariation = /**
3879
4092
  * Valid only when {@link expansion_shaders | prototype:FeatureFlags::expansion_shaders} feature flag is enabled.
3880
4093
  */
@@ -3973,7 +4186,10 @@ type ElectricUsagePriority = /**
3973
4186
  'solar' | /**
3974
4187
  * Can only be used by {@link LampPrototype | prototype:LampPrototype}, will be ignored otherwise.
3975
4188
  */
3976
- 'lamp';
4189
+ 'lamp' | /**
4190
+ * Can only be used by {@link ElectricEnergyInterfacePrototype | prototype:ElectricEnergyInterfacePrototype}, will be ignored otherwise.
4191
+ */
4192
+ 'dynamic';
3977
4193
  /**
3978
4194
  * If this is loaded as a single ElementImageSetLayer, it gets used as `base`.
3979
4195
  */
@@ -4139,7 +4355,13 @@ type ElementImageSetLayer = {
4139
4355
  top_width?: SpriteSizeType;
4140
4356
  type?: 'none' | 'composition';
4141
4357
  } | Sprite;
4358
+ /**
4359
+ * Root style: `"empty_widget"`
4360
+ */
4142
4361
  interface EmptyWidgetStyleSpecificationBase extends BaseStyleSpecification {
4362
+ /**
4363
+ * Required on the root style.
4364
+ */
4143
4365
  graphical_set?: ElementImageSet;
4144
4366
  type: string;
4145
4367
  }
@@ -4162,6 +4384,10 @@ interface EnemyExpansionSettings {
4162
4384
  building_coefficient: double;
4163
4385
  enabled: boolean;
4164
4386
  enemy_building_influence_radius: uint32;
4387
+ /**
4388
+ * 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)`
4389
+ */
4390
+ evolution_group_size_factor: double;
4165
4391
  friendly_base_influence_radius: uint32;
4166
4392
  /**
4167
4393
  * 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.
@@ -4179,12 +4405,16 @@ interface EnemyExpansionSettings {
4179
4405
  * 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.
4180
4406
  */
4181
4407
  min_expansion_cooldown: uint32;
4408
+ /**
4409
+ * Distance in chunks from the furthest base around to prevent expansions from being too close to existing bases.
4410
+ */
4411
+ min_expansion_distance: uint32;
4182
4412
  neighbouring_base_chunk_coefficient: double;
4183
4413
  neighbouring_chunk_coefficient: double;
4184
4414
  other_base_coefficient: double;
4185
4415
  settler_group_max_size: uint32;
4186
4416
  /**
4187
- * Size of the group that goes to build new base (the game interpolates between min size and max size based on evolution factor).
4417
+ * Size of the group that goes to build new base.
4188
4418
  */
4189
4419
  settler_group_min_size: uint32;
4190
4420
  }
@@ -4358,6 +4588,9 @@ type EntityPrototypeFlags = (/**
4358
4588
  * The entity can not be used in blueprints.
4359
4589
  */
4360
4590
  'not-blueprintable' | /**
4591
+ * Always show the entity in selection lists/Factoriopedia.
4592
+ */
4593
+ 'always-show' | /**
4361
4594
  * Hides the alt-info of an entity in alt-mode, for example the recipe icon.
4362
4595
  */
4363
4596
  'hide-alt-info' | /**
@@ -4381,10 +4614,19 @@ type EntityPrototypeFlags = (/**
4381
4614
  'not-upgradable' | /**
4382
4615
  * The entity is not shown in the kill statistics.
4383
4616
  */
4384
- 'not-in-kill-statistics' | 'building-direction-16-way' | 'snap-to-rail-support-spot' | /**
4385
- * The entity is not shown in the made in property of recipe tooltips.
4617
+ 'not-in-kill-statistics' | 'building-direction-16-way' | /**
4618
+ * 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.
4386
4619
  */
4387
- 'not-in-made-in')[];
4620
+ 'no-logistic-connection' | 'snap-to-rail-support-spot' | /**
4621
+ * The entity is not shown in the made in property of recipe tooltips and Factoriopedia.
4622
+ */
4623
+ 'not-in-made-in' | /**
4624
+ * The entity is not shown in the bonus GUI.
4625
+ */
4626
+ 'not-in-bonus-gui' | /**
4627
+ * The entity is not shown in the mined-by tooltip for resources.
4628
+ */
4629
+ 'not-in-mined-by')[];
4388
4630
  /**
4389
4631
  * How far (in tiles) entities should be rendered outside the visible area of the screen.
4390
4632
  */
@@ -4406,8 +4648,14 @@ interface EntityRendererSearchBoxLimits {
4406
4648
  */
4407
4649
  top: uint8;
4408
4650
  }
4409
- 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';
4651
+ 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';
4652
+ /**
4653
+ * Triggered when a player fast-transfers something to or from an entity, similar to the {@link on_player_fast_transferred | runtime:on_player_fast_transferred} event.
4654
+ */
4410
4655
  interface EntityTransferTipTrigger extends CountBasedTipTrigger {
4656
+ /**
4657
+ * Whether the transfer should be into or out of the player.
4658
+ */
4411
4659
  transfer?: 'in' | 'out';
4412
4660
  type: 'entity-transfer';
4413
4661
  }
@@ -4492,6 +4740,8 @@ interface FastReplaceTipTrigger extends CountBasedTipTrigger {
4492
4740
  }
4493
4741
  /**
4494
4742
  * 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`.
4743
+ *
4744
+ * See the {@link mod structure | auxiliary:mod-structure} documentation for more information on what each feature flag affects.
4495
4745
  * @example ```
4496
4746
  -- sets coal to spoil only when the spoiling feature flag is enabled
4497
4747
  if feature_flags["spoiling"] then
@@ -4500,6 +4750,7 @@ end
4500
4750
  ```
4501
4751
  */
4502
4752
  interface FeatureFlags {
4753
+ expansion: boolean;
4503
4754
  expansion_shaders: boolean;
4504
4755
  freezing: boolean;
4505
4756
  quality: boolean;
@@ -4516,6 +4767,8 @@ interface FeatureFlags {
4516
4767
  * - **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.
4517
4768
  *
4518
4769
  * - **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.
4770
+ *
4771
+ * Relative paths using `..` are not supported.
4519
4772
  * @example ```
4520
4773
  filename = "__base__/graphics/entity/accumulator/accumulator.png"
4521
4774
  ```
@@ -4527,10 +4780,22 @@ type FileName = string;
4527
4780
  interface FlipEntityTipTrigger extends CountBasedTipTrigger {
4528
4781
  type: 'flip-entity';
4529
4782
  }
4783
+ /**
4784
+ * Root style: `"flow"`
4785
+ */
4530
4786
  interface FlowStyleSpecification extends BaseStyleSpecification {
4787
+ /**
4788
+ * Required on the root style.
4789
+ */
4531
4790
  horizontal_spacing?: int32;
4791
+ /**
4792
+ * Required on the root style.
4793
+ */
4532
4794
  max_on_row?: int32;
4533
4795
  type: 'flow_style';
4796
+ /**
4797
+ * Required on the root style.
4798
+ */
4534
4799
  vertical_spacing?: int32;
4535
4800
  }
4536
4801
  /**
@@ -4572,10 +4837,6 @@ interface FluidBox {
4572
4837
  * 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}.
4573
4838
  */
4574
4839
  filter?: FluidID;
4575
- /**
4576
- * Hides the blue input/output arrows and icons at each connection point.
4577
- */
4578
- hide_connection_info?: boolean;
4579
4840
  /**
4580
4841
  * 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.
4581
4842
  */
@@ -4675,11 +4936,16 @@ interface FluidEnergySource extends BaseEnergySource {
4675
4936
  * Only loaded if `burns_fluid` is `false`.
4676
4937
  */
4677
4938
  maximum_temperature?: float;
4939
+ output_fluid_box?: FluidBox;
4678
4940
  /**
4679
4941
  * 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.
4680
4942
  */
4681
4943
  scale_fluid_usage?: boolean;
4682
4944
  smoke?: SmokeSource[];
4945
+ /**
4946
+ * 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.
4947
+ */
4948
+ spent_fluid?: SpentFluidSpecification;
4683
4949
  type: 'fluid';
4684
4950
  }
4685
4951
  type FluidFlowDirection = 'input-output' | 'input' | 'output';
@@ -4728,6 +4994,12 @@ interface FluidIngredientPrototype {
4728
4994
  * The name of a {@link FluidPrototype | prototype:FluidPrototype}.
4729
4995
  */
4730
4996
  name: FluidID;
4997
+ /**
4998
+ * 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.
4999
+ *
5000
+ * Only loaded if `fluidbox_index` is defined.
5001
+ */
5002
+ optional_fluidbox_indexes?: uint32[];
4731
5003
  /**
4732
5004
  * Sets the expected temperature of the fluid ingredient.
4733
5005
  */
@@ -4737,7 +5009,7 @@ interface FluidIngredientPrototype {
4737
5009
  /**
4738
5010
  * A fluid product definition.
4739
5011
  */
4740
- interface FluidProductPrototype {
5012
+ interface FluidProductPrototype extends ProductPrototypeBase {
4741
5013
  /**
4742
5014
  * Can not be `< 0`.
4743
5015
  */
@@ -4758,6 +5030,10 @@ interface FluidProductPrototype {
4758
5030
  * 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.
4759
5031
  */
4760
5032
  fluidbox_index?: uint32;
5033
+ /**
5034
+ * Used to set crafting machine fluidbox volumes. Must be at least 1.
5035
+ */
5036
+ fluidbox_multiplier?: uint8;
4761
5037
  /**
4762
5038
  * Amount that should be deducted from any productivity induced bonus crafts.
4763
5039
  *
@@ -4779,27 +5055,17 @@ interface FluidProductPrototype {
4779
5055
  */
4780
5056
  name: FluidID;
4781
5057
  /**
4782
- * Value between 0 and 1, `0` for 0% chance and `1` for 100% chance.
4783
- *
4784
- * 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.
5058
+ * 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.
4785
5059
  *
4786
- * 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.
4787
- */
4788
- probability?: double;
4789
- /**
4790
- * 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`.
5060
+ * Only loaded if `fluidbox_index` is defined.
4791
5061
  */
4792
- show_details_in_recipe_tooltip?: boolean;
5062
+ optional_fluidbox_indexes?: uint32[];
4793
5063
  /**
4794
5064
  * The temperature of the fluid product.
4795
5065
  */
4796
5066
  temperature?: float;
4797
5067
  type: 'fluid';
4798
5068
  }
4799
- interface FluidWagonConnectorGraphics {
4800
- load_animations: PumpConnectorGraphics;
4801
- unload_animations: PumpConnectorGraphics;
4802
- }
4803
5069
  interface FogEffectProperties {
4804
5070
  color1?: Color;
4805
5071
  color2?: Color;
@@ -4933,18 +5199,48 @@ type ForceCondition = /**
4933
5199
  * The non-same forces pass.
4934
5200
  */
4935
5201
  'not-same';
5202
+ /**
5203
+ * Root style: `"frame"`
5204
+ */
4936
5205
  interface FrameStyleSpecification extends BaseStyleSpecification {
4937
5206
  background_graphical_set?: ElementImageSet;
5207
+ /**
5208
+ * Required on the root style.
5209
+ */
4938
5210
  border?: BorderImageSet;
5211
+ /**
5212
+ * Required on the root style.
5213
+ */
4939
5214
  drag_by_title?: boolean;
5215
+ /**
5216
+ * Required on the root style.
5217
+ */
4940
5218
  graphical_set?: ElementImageSet;
4941
5219
  header_background?: ElementImageSet;
5220
+ /**
5221
+ * Required on the root style.
5222
+ */
4942
5223
  header_filler_style?: EmptyWidgetStyleSpecification;
5224
+ /**
5225
+ * Required on the root style.
5226
+ */
4943
5227
  header_flow_style?: HorizontalFlowStyleSpecification;
5228
+ /**
5229
+ * Required on the root style.
5230
+ */
4944
5231
  horizontal_flow_style?: HorizontalFlowStyleSpecification;
5232
+ /**
5233
+ * Required on the root style.
5234
+ */
4945
5235
  title_style?: LabelStyleSpecification;
4946
5236
  type: 'frame_style';
5237
+ /**
5238
+ * Required on the root style.
5239
+ */
4947
5240
  use_header_filler?: boolean;
5241
+ /**
5242
+ * Required on the root style.
5243
+ */
4948
5244
  vertical_flow_style?: VerticalFlowStyleSpecification;
4949
5245
  }
4950
5246
  interface FrequencySizeRichness {
@@ -5033,6 +5329,7 @@ interface GameViewSettings {
5033
5329
  * If this is defined then it sets the default value for all other properties.
5034
5330
  */
5035
5331
  default_show_value?: boolean;
5332
+ hide_tall_entities?: boolean;
5036
5333
  show_alert_gui?: boolean;
5037
5334
  show_controller_gui?: boolean;
5038
5335
  show_crafting_queue?: boolean;
@@ -5041,6 +5338,7 @@ interface GameViewSettings {
5041
5338
  show_hotkey_suggestions?: boolean;
5042
5339
  show_map_view_options?: boolean;
5043
5340
  show_minimap?: boolean;
5341
+ show_pins_gui?: boolean;
5044
5342
  show_quickbar?: boolean;
5045
5343
  show_rail_block_visualisation?: boolean;
5046
5344
  show_research_info?: boolean;
@@ -5056,6 +5354,16 @@ interface GateOverRailBuildTipTrigger extends CountBasedTipTrigger {
5056
5354
  interface GeneratingPowerTipTrigger extends CountBasedTipTrigger {
5057
5355
  type: 'generating-power';
5058
5356
  }
5357
+ interface GeneratorPictureSet {
5358
+ east?: GeneratorPictures;
5359
+ north?: GeneratorPictures;
5360
+ south?: GeneratorPictures;
5361
+ west?: GeneratorPictures;
5362
+ }
5363
+ interface GeneratorPictures {
5364
+ animation?: Animation;
5365
+ frozen_patch?: Sprite;
5366
+ }
5059
5367
  interface GhostShimmerConfig {
5060
5368
  blend_mode: int32;
5061
5369
  distortion: float;
@@ -5144,29 +5452,82 @@ interface GlobalTintEffectProperties {
5144
5452
  zoom_factor: float;
5145
5453
  zoom_intensity: float;
5146
5454
  }
5455
+ /**
5456
+ * Root style: `"glow"`
5457
+ */
5147
5458
  interface GlowStyleSpecification extends BaseStyleSpecification {
5459
+ /**
5460
+ * Required on the root style.
5461
+ */
5148
5462
  image_set?: ElementImageSet;
5149
5463
  type: 'glow_style';
5150
5464
  }
5465
+ /**
5466
+ * Root style: `"graph"`
5467
+ */
5151
5468
  interface GraphStyleSpecification extends BaseStyleSpecification {
5469
+ /**
5470
+ * Required on the root style.
5471
+ */
5152
5472
  background_color?: Color;
5473
+ /**
5474
+ * Required on the root style.
5475
+ */
5153
5476
  data_line_highlight_distance?: uint32;
5154
5477
  /**
5155
5478
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
5479
+ *
5480
+ * Required on the root style.
5156
5481
  */
5157
5482
  font?: string;
5483
+ /**
5484
+ * Required on the root style.
5485
+ */
5158
5486
  graph_right_margin?: uint32;
5487
+ /**
5488
+ * Required on the root style.
5489
+ */
5159
5490
  graph_top_margin?: uint32;
5491
+ /**
5492
+ * Required on the root style.
5493
+ */
5160
5494
  grid_lines_color?: Color;
5495
+ /**
5496
+ * Required on the root style.
5497
+ */
5161
5498
  guide_lines_color?: Color;
5499
+ /**
5500
+ * Required on the root style.
5501
+ */
5162
5502
  horizontal_label_style?: LabelStyleSpecification;
5503
+ /**
5504
+ * Required on the root style.
5505
+ */
5163
5506
  horizontal_labels_margin?: uint32;
5507
+ /**
5508
+ * Required on the root style.
5509
+ */
5164
5510
  line_colors?: Color[];
5511
+ /**
5512
+ * Required on the root style.
5513
+ */
5165
5514
  minimal_horizontal_label_spacing?: uint32;
5515
+ /**
5516
+ * Required on the root style.
5517
+ */
5166
5518
  minimal_vertical_label_spacing?: uint32;
5519
+ /**
5520
+ * Required on the root style.
5521
+ */
5167
5522
  selection_dot_radius?: uint32;
5168
5523
  type: 'graph_style';
5524
+ /**
5525
+ * Required on the root style.
5526
+ */
5169
5527
  vertical_label_style?: LabelStyleSpecification;
5528
+ /**
5529
+ * Required on the root style.
5530
+ */
5170
5531
  vertical_labels_margin?: uint32;
5171
5532
  }
5172
5533
  interface GroupAttackTipTrigger extends CountBasedTipTrigger {
@@ -5204,7 +5565,7 @@ interface HeatBuffer {
5204
5565
  /**
5205
5566
  * May contain up to 32 connections.
5206
5567
  */
5207
- connections?: HeatConnection[];
5568
+ connections?: HeatConnectionDefinition[];
5208
5569
  default_temperature?: double;
5209
5570
  heat_glow?: Sprite4Way;
5210
5571
  heat_picture?: Sprite4Way;
@@ -5226,7 +5587,7 @@ interface HeatBuffer {
5226
5587
  /**
5227
5588
  * Defines the connections for {@link HeatEnergySource | prototype:HeatEnergySource} and {@link HeatBuffer | prototype:HeatBuffer}.
5228
5589
  */
5229
- interface HeatConnection {
5590
+ interface HeatConnectionDefinition {
5230
5591
  /**
5231
5592
  * 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.
5232
5593
  */
@@ -5240,7 +5601,7 @@ interface HeatEnergySource extends BaseEnergySource {
5240
5601
  /**
5241
5602
  * May contain up to 32 connections.
5242
5603
  */
5243
- connections?: HeatConnection[];
5604
+ connections?: HeatConnectionDefinition[];
5244
5605
  default_temperature?: double;
5245
5606
  emissions_per_minute?: Record<AirbornePollutantID, double>;
5246
5607
  heat_glow?: Sprite4Way;
@@ -5262,10 +5623,19 @@ interface HeatEnergySource extends BaseEnergySource {
5262
5623
  type: 'heat';
5263
5624
  }
5264
5625
  type HorizontalAlign = 'left' | 'center' | 'right';
5626
+ /**
5627
+ * Root style: `"horizontal_flow"`
5628
+ */
5265
5629
  interface HorizontalFlowStyleSpecification extends BaseStyleSpecification {
5630
+ /**
5631
+ * Required on the root style.
5632
+ */
5266
5633
  horizontal_spacing?: int32;
5267
5634
  type: 'horizontal_flow_style';
5268
5635
  }
5636
+ /**
5637
+ * Root style: `"horizontal_scrollbar"`
5638
+ */
5269
5639
  interface HorizontalScrollBarStyleSpecification extends ScrollBarStyleSpecification {
5270
5640
  type: 'horizontal_scrollbar_style';
5271
5641
  }
@@ -5393,6 +5763,7 @@ interface IconSequencePositioning {
5393
5763
  shift?: Vector;
5394
5764
  }
5395
5765
  /**
5766
+ * Root style: `"image"`
5396
5767
  * @example ```
5397
5768
  data.raw["gui-style"]["default"]["stretchy-sprite"] =
5398
5769
  {
@@ -5404,9 +5775,15 @@ data.raw["gui-style"]["default"]["stretchy-sprite"] =
5404
5775
  ```
5405
5776
  */
5406
5777
  interface ImageStyleSpecification extends BaseStyleSpecification {
5778
+ /**
5779
+ * Required on the root style.
5780
+ */
5407
5781
  graphical_set?: ElementImageSet;
5408
5782
  invert_colors_of_picture_when_hovered_or_toggled?: boolean;
5409
- stretch_image_to_widget_size?: boolean;
5783
+ /**
5784
+ * Required on the root style.
5785
+ */
5786
+ stretch_image_to_widget_size?: boolean;
5410
5787
  type: 'image_style';
5411
5788
  }
5412
5789
  /**
@@ -5466,7 +5843,7 @@ interface InterruptibleSound {
5466
5843
  }
5467
5844
  interface InventoryWithCustomStackSizeSpecification {
5468
5845
  /**
5469
- * Must be >= stack_size_min.
5846
+ * Must be >= stack_size_min and <= 1000000000.
5470
5847
  */
5471
5848
  stack_size_max?: ItemCountType;
5472
5849
  /**
@@ -5484,7 +5861,7 @@ interface InventoryWithCustomStackSizeSpecification {
5484
5861
  with_bar?: boolean;
5485
5862
  }
5486
5863
  interface InvokeTileEffectTriggerEffectItem extends TriggerEffectItem {
5487
- tile_collision_mask?: CollisionMaskConnector;
5864
+ tile_collision_mask?: TileCollisionMaskConnector;
5488
5865
  type: 'invoke-tile-trigger';
5489
5866
  }
5490
5867
  type ItemCountType = uint32;
@@ -5542,12 +5919,46 @@ interface ItemIngredientPrototype {
5542
5919
  */
5543
5920
  ignored_by_stats?: uint16;
5544
5921
  name: ItemID;
5922
+ /**
5923
+ * Amount of quality levels up or down this ingredient will be adjusted.
5924
+ *
5925
+ * 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.
5926
+ *
5927
+ * 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.
5928
+ */
5929
+ quality_change?: int8;
5930
+ /**
5931
+ * 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}.
5932
+ */
5933
+ quality_max?: QualityID;
5934
+ /**
5935
+ * 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.
5936
+ */
5937
+ quality_min?: QualityID;
5938
+ /**
5939
+ * Controls how much spoil percent of this ingredient should influence spoil percent of spoilable products.
5940
+ *
5941
+ * Must be in range `[0, 1]`.
5942
+ */
5943
+ spoil_weight?: float;
5545
5944
  type: 'item';
5546
5945
  }
5547
5946
  /**
5548
5947
  * An item product definition.
5549
5948
  */
5550
- interface ItemProductPrototype {
5949
+ interface ItemProductPrototype extends ProductPrototypeBase {
5950
+ /**
5951
+ * 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.
5952
+ *
5953
+ * Note: This may not work as expected outside of recipes (e.g. in mining drills).
5954
+ */
5955
+ affected_by_quality?: boolean;
5956
+ /**
5957
+ * When set to true, the item produced will be produced fresh (using percent_spoiled) even when ingredients were spoiled.
5958
+ *
5959
+ * Note: This may not work as expected outside of recipes (e.g. in mining drills).
5960
+ */
5961
+ always_fresh?: boolean;
5551
5962
  amount?: uint16;
5552
5963
  /**
5553
5964
  * Only loaded, and mandatory if `amount` is not defined.
@@ -5588,17 +5999,31 @@ interface ItemProductPrototype {
5588
5999
  */
5589
6000
  percent_spoiled?: float;
5590
6001
  /**
5591
- * Value between 0 and 1, `0` for 0% chance and `1` for 100% chance.
6002
+ * Amount of quality levels up or down this product will be adjusted.
5592
6003
  *
5593
- * 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.
6004
+ * 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.
5594
6005
  *
5595
- * 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.
6006
+ * Note: This may not work as expected outside of recipes (e.g. in mining drills).
5596
6007
  */
5597
- probability?: double;
6008
+ quality_change?: int8;
5598
6009
  /**
5599
- * 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`.
6010
+ * 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}.
6011
+ *
6012
+ * 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.
5600
6013
  */
5601
- show_details_in_recipe_tooltip?: boolean;
6014
+ quality_max?: QualityID;
6015
+ /**
6016
+ * 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.
6017
+ *
6018
+ * 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.
6019
+ */
6020
+ quality_min?: QualityID;
6021
+ /**
6022
+ * When set to true, if the recipe successfully finishes crafting without spoiling, the result is produced fresh (non-spoiled).
6023
+ *
6024
+ * Note: This may not work as expected outside of recipes (e.g. in mining drills).
6025
+ */
6026
+ reset_freshness_on_craft?: boolean;
5602
6027
  type: 'item';
5603
6028
  }
5604
6029
  /**
@@ -5611,6 +6036,9 @@ type ItemPrototypeFlags = (/**
5611
6036
  * Whether the trash-unrequested feature skips this item.
5612
6037
  */
5613
6038
  'excluded-from-trash-unrequested' | /**
6039
+ * Whether the rocket passenger feature skips this item when checking lift weight.
6040
+ */
6041
+ 'excluded-from-character-lift-weight' | /**
5614
6042
  * Always show the item in selection lists (item filter, logistic request etc.) even when locked recipe for that item is present.
5615
6043
  */
5616
6044
  'always-show' | /**
@@ -5637,7 +6065,7 @@ type ItemPrototypeFlags = (/**
5637
6065
  'spawnable' | 'spoil-result' | /**
5638
6066
  * Controls whether the spoil time ignores the spoil time modifier in the {@link DifficultySettings | runtime:DifficultySettings}.
5639
6067
  */
5640
- 'ignore-spoil-time-modifier')[];
6068
+ 'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world')[];
5641
6069
  type ItemStackIndex = uint16;
5642
6070
  /**
5643
6071
  * The name of an {@link ItemSubGroup | prototype:ItemSubGroup}.
@@ -5666,26 +6094,52 @@ interface ItemToPlace {
5666
6094
  item: ItemID;
5667
6095
  }
5668
6096
  interface KillTipTrigger extends CountBasedTipTrigger {
6097
+ /**
6098
+ * If this is not set, any damage type will fulfill the trigger condition.
6099
+ */
5669
6100
  damage_type?: DamageTypeID;
5670
6101
  entity?: EntityID;
5671
6102
  match_type_only?: boolean;
5672
6103
  type: 'kill';
5673
6104
  }
6105
+ /**
6106
+ * Root style: `"label"`
6107
+ */
5674
6108
  interface LabelStyleSpecification extends BaseStyleSpecification {
5675
6109
  clicked_font_color?: Color;
5676
6110
  disabled_font_color?: Color;
5677
6111
  /**
5678
6112
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
6113
+ *
6114
+ * Required on the root style.
5679
6115
  */
5680
6116
  font?: string;
6117
+ /**
6118
+ * Required on the root style.
6119
+ */
5681
6120
  font_color?: Color;
5682
6121
  game_controller_hovered_font_color?: Color;
5683
6122
  hovered_font_color?: Color;
5684
6123
  parent_hovered_font_color?: Color;
6124
+ /**
6125
+ * Required on the root style.
6126
+ */
5685
6127
  rich_text_highlight_error_color?: Color;
6128
+ /**
6129
+ * Required on the root style.
6130
+ */
5686
6131
  rich_text_highlight_ok_color?: Color;
6132
+ /**
6133
+ * Required on the root style.
6134
+ */
5687
6135
  rich_text_highlight_warning_color?: Color;
6136
+ /**
6137
+ * Required on the root style.
6138
+ */
5688
6139
  rich_text_setting?: RichTextSetting;
6140
+ /**
6141
+ * Required on the root style.
6142
+ */
5689
6143
  single_line?: boolean;
5690
6144
  type: 'label_style';
5691
6145
  underlined?: boolean;
@@ -5718,6 +6172,15 @@ type LayeredSound = {
5718
6172
  type LayeredSprite = {
5719
6173
  render_layer: RenderLayer;
5720
6174
  } | LayeredSprite[];
6175
+ /**
6176
+ * Sprites for the 4 major directions of the entity. If this is loaded as a single LayeredSprite, it applies to all directions.
6177
+ */
6178
+ type LayeredSprite4Way = {
6179
+ east: LayeredSprite;
6180
+ north: LayeredSprite;
6181
+ south: LayeredSprite;
6182
+ west: LayeredSprite;
6183
+ } | LayeredSprite;
5721
6184
  type LayeredSpriteVariations = LayeredSprite[];
5722
6185
  /**
5723
6186
  * Specifies a light source. This is loaded either as a single light source or as an array of light sources.
@@ -5946,7 +6409,13 @@ interface LightningShaderConfiguration {
5946
6409
  interface LimitChestTipTrigger extends CountBasedTipTrigger {
5947
6410
  type: 'limit-chest';
5948
6411
  }
6412
+ /**
6413
+ * Root style: `"line"`
6414
+ */
5949
6415
  interface LineStyleSpecification extends BaseStyleSpecification {
6416
+ /**
6417
+ * Required on the root style.
6418
+ */
5950
6419
  border?: BorderImageSet;
5951
6420
  type: 'line_style';
5952
6421
  }
@@ -5993,12 +6462,21 @@ interface LinkedBeltStructure {
5993
6462
  /**
5994
6463
  * The internal name of a game control (key binding).
5995
6464
  */
5996
- 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' | /**
6465
+ 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' | /**
5997
6466
  * Indicates no linked game control.
5998
6467
  */
5999
6468
  '';
6469
+ /**
6470
+ * Root style: `"list_box"`
6471
+ */
6000
6472
  interface ListBoxStyleSpecification extends BaseStyleSpecification {
6473
+ /**
6474
+ * Required on the root style.
6475
+ */
6001
6476
  item_style?: ButtonStyleSpecification;
6477
+ /**
6478
+ * Required on the root style.
6479
+ */
6002
6480
  scroll_pane_style?: ScrollPaneStyleSpecification;
6003
6481
  type: 'list_box_style';
6004
6482
  }
@@ -6051,24 +6529,7 @@ localised_description = {"", {"item-name.iron-plate"}, ": ", tostring(60)}
6051
6529
  */
6052
6530
  type LocalisedString = string | LocalisedString[];
6053
6531
  type LogisticFilterIndex = uint16;
6054
- /**
6055
- * The items generated when an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype} is killed.
6056
- */
6057
- interface LootItem {
6058
- /**
6059
- * Must be `> 0`.
6060
- */
6061
- count_max?: double;
6062
- count_min?: double;
6063
- /**
6064
- * The item to spawn.
6065
- */
6066
- item: ItemID;
6067
- /**
6068
- * `0` is 0% and `1` is 100%. Must be `> 0`.
6069
- */
6070
- probability?: double;
6071
- }
6532
+ type LogisticMode = 'active-provider' | 'passive-provider' | 'requester' | 'storage' | 'buffer';
6072
6533
  interface LowPowerTipTrigger extends CountBasedTipTrigger {
6073
6534
  type: 'low-power';
6074
6535
  }
@@ -6089,6 +6550,12 @@ interface MainSound {
6089
6550
  match_progress_to_activity?: boolean;
6090
6551
  match_speed_to_activity?: boolean;
6091
6552
  match_volume_to_activity?: boolean;
6553
+ /**
6554
+ * The `sound` is played when the entity has one the specified direction.
6555
+ *
6556
+ * Unused when {@link WorkingSound::persistent | prototype:WorkingSound::persistent} is `true`.
6557
+ */
6558
+ play_for_directions?: defines.direction[];
6092
6559
  /**
6093
6560
  * Array of {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}s, individual names cannot be empty.
6094
6561
  *
@@ -6117,6 +6584,9 @@ interface MainSound {
6117
6584
  */
6118
6585
  volume_smoothing_window_size?: uint32;
6119
6586
  }
6587
+ /**
6588
+ * Triggered when the player manually moves item with the cursor, *without* using shortcuts such as entity transfer or stack split.
6589
+ */
6120
6590
  interface ManualTransferTipTrigger extends CountBasedTipTrigger {
6121
6591
  type: 'manual-transfer';
6122
6592
  }
@@ -6127,24 +6597,6 @@ interface ManualWireDragTipTrigger extends CountBasedTipTrigger {
6127
6597
  type: 'manual-wire-drag';
6128
6598
  wire_type?: 'red' | 'green' | 'copper';
6129
6599
  }
6130
- interface MapEditorConstants {
6131
- cliff_editor_remove_cliffs_color: Color;
6132
- clone_editor_brush_cursor_preview_tint: Color;
6133
- clone_editor_brush_destination_color: Color;
6134
- clone_editor_brush_source_color: Color;
6135
- clone_editor_brush_world_preview_tint: Color;
6136
- clone_editor_copy_destination_allowed_color: Color;
6137
- clone_editor_copy_destination_not_allowed_color: Color;
6138
- clone_editor_copy_source_color: Color;
6139
- decorative_editor_selection_preview_radius: uint8;
6140
- decorative_editor_selection_preview_tint: Color;
6141
- force_editor_select_area_color: Color;
6142
- script_editor_drag_area_color: Color;
6143
- script_editor_select_area_color: Color;
6144
- tile_editor_area_selection_color: Color;
6145
- tile_editor_selection_preview_radius: uint8;
6146
- tile_editor_selection_preview_tint: Color;
6147
- }
6148
6600
  interface MapGenPreset {
6149
6601
  /**
6150
6602
  * If any setting is not set, it will use the default values.
@@ -6189,6 +6641,10 @@ interface MapGenPresetEnemyEvolutionSettings {
6189
6641
  }
6190
6642
  interface MapGenPresetEnemyExpansionSettings {
6191
6643
  enabled?: boolean;
6644
+ /**
6645
+ * Factor by which the evolution factor influences the size of the settler group
6646
+ */
6647
+ evolution_group_size_factor?: double;
6192
6648
  /**
6193
6649
  * In ticks.
6194
6650
  */
@@ -6201,6 +6657,10 @@ interface MapGenPresetEnemyExpansionSettings {
6201
6657
  * 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.
6202
6658
  */
6203
6659
  min_expansion_cooldown?: uint32;
6660
+ /**
6661
+ * Distance in chunks from the furthest base around to prevent expansions from being too close to existing bases.
6662
+ */
6663
+ min_expansion_distance?: uint32;
6204
6664
  settler_group_max_size?: uint32;
6205
6665
  /**
6206
6666
  * Size of the group that goes to build new base (the game interpolates between min size and max size based on evolution factor).
@@ -6424,6 +6884,13 @@ interface MaterialTextureParameters {
6424
6884
  ```
6425
6885
  */
6426
6886
  type MathExpression = string;
6887
+ interface MaxCargoBayUnloadingDistanceModifier extends SimpleModifier {
6888
+ type: 'max-cargo-bay-unloading-distance';
6889
+ /**
6890
+ * If `false`, do not draw the small "constant" icon over the technology effect icon.
6891
+ */
6892
+ use_icon_overlay_constant?: boolean;
6893
+ }
6427
6894
  interface MaxFailedAttemptsPerTickPerConstructionQueueModifier extends SimpleModifier {
6428
6895
  type: 'max-failed-attempts-per-tick-per-construction-queue';
6429
6896
  /**
@@ -6507,12 +6974,18 @@ interface MinableProperties {
6507
6974
  transfer_entity_health_to_products?: boolean;
6508
6975
  }
6509
6976
  interface MineEntityTechnologyTrigger {
6510
- entity: EntityID;
6977
+ /**
6978
+ * Must contain at least 1 element. The trigger is considered fulfilled if at least one of these entities is mined.
6979
+ */
6980
+ entities: EntityID[];
6511
6981
  type: 'mine-entity';
6512
6982
  }
6513
6983
  interface MineItemByRobotTipTrigger extends CountBasedTipTrigger {
6514
6984
  type: 'mine-item-by-robot';
6515
6985
  }
6986
+ /**
6987
+ * Root style: `"minimap"`
6988
+ */
6516
6989
  interface MinimapStyleSpecification extends EmptyWidgetStyleSpecificationBase {
6517
6990
  type: 'minimap_style';
6518
6991
  }
@@ -6555,7 +7028,6 @@ interface MiningWithFluidModifier extends BoolModifier {
6555
7028
  */
6556
7029
  use_icon_overlay_constant?: boolean;
6557
7030
  }
6558
- type Mirroring = 'horizontal' | 'vertical' | 'diagonal-pos' | 'diagonal-neg';
6559
7031
  /**
6560
7032
  * The user-set value of a startup {@link mod setting | https://wiki.factorio.com/Tutorial:Mod_settings}.
6561
7033
  */
@@ -6685,12 +7157,18 @@ UnlockQualityModifier | /**
6685
7157
  * Loaded when the `type` is `"unlock-space-platforms"`.
6686
7158
  */
6687
7159
  SpacePlatformsModifier | /**
7160
+ * Loaded when the `type` is `"unlock-travel-to-space-platforms"`
7161
+ */
7162
+ TravelToSpacePlatformsModifier | /**
6688
7163
  * Loaded when the `type` is `"unlock-circuit-network"`.
6689
7164
  */
6690
7165
  CircuitNetworkModifier | /**
6691
7166
  * Loaded when the `type` is `"cargo-landing-pad-count"`.
6692
7167
  */
6693
7168
  CargoLandingPadLimitModifier | /**
7169
+ * Loaded when the `type` is `"max-cargo-bay-unloading-distance"`.
7170
+ */
7171
+ MaxCargoBayUnloadingDistanceModifier | /**
6694
7172
  * Loaded when the `type` is `"change-recipe-productivity"`.
6695
7173
  */
6696
7174
  ChangeRecipeProductivityModifier | /**
@@ -6714,7 +7192,10 @@ BeaconDistributionModifier | /**
6714
7192
  CreateGhostOnEntityDeathModifier | /**
6715
7193
  * Loaded when the `type` is `"belt-stack-size-bonus"`.
6716
7194
  */
6717
- BeltStackSizeBonusModifier;
7195
+ BeltStackSizeBonusModifier | /**
7196
+ * Loaded when the `type` is `"unlock-logistic-network"`.
7197
+ */
7198
+ UnlockLogisticNetworkModifier;
6718
7199
  /**
6719
7200
  * 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.
6720
7201
  * @example ```
@@ -6729,6 +7210,12 @@ end
6729
7210
  for name, version in pairs(mods) do
6730
7211
  log(name .. " version " .. version) -- => space-age version 2.0.7
6731
7212
  end
7213
+ ```
7214
+ * @example ```
7215
+ -- uses a features only available past a certain base mod version
7216
+ if helpers.compare_version(mods["base"], "2.0.56") >= 0 then
7217
+ use_new_features()
7218
+ end
6732
7219
  ```
6733
7220
  */
6734
7221
  type Mods = Record<string, string>;
@@ -6805,7 +7292,7 @@ interface NestedTriggerEffectItem extends TriggerEffectItem {
6805
7292
  *
6806
7293
  * - **Operator:** See the list below
6807
7294
  *
6808
- * 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.
7295
+ * 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.
6809
7296
  *
6810
7297
  * 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.
6811
7298
  *
@@ -7178,6 +7665,18 @@ type PersistentWorldAmbientSoundsDefinitionCrossfade = Fade & {
7178
7665
  ];
7179
7666
  };
7180
7667
  interface PipeConnectionDefinition {
7668
+ /**
7669
+ * 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.
7670
+ *
7671
+ * Only loaded if `connection_type` is `"normal"` or `"underground"`.
7672
+ */
7673
+ alt_direction?: defines.direction;
7674
+ /**
7675
+ * Relative position of the pipe connection when entity direction is north-east.
7676
+ *
7677
+ * Only loaded if `connection_type` is `"normal"` or `"underground"`.
7678
+ */
7679
+ alt_position?: MapPosition;
7181
7680
  /**
7182
7681
  * 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.
7183
7682
  *
@@ -7210,6 +7709,10 @@ interface PipeConnectionDefinition {
7210
7709
  * Allowed direction of fluid flow at this connection. Pipeline entities (`pipe`, `pipe-to-ground`, and `storage-tank`) do not support this property.
7211
7710
  */
7212
7711
  flow_direction?: FluidFlowDirection;
7712
+ /**
7713
+ * If true, connection arrows and fluid icons will not be drawn for this connection when the entity is selected or in alt-mode.
7714
+ */
7715
+ hide_connection_info?: boolean;
7213
7716
  /**
7214
7717
  * Expected to be unique inside of a single entity. Used to uniquely identify where a linked connection should connect to.
7215
7718
  *
@@ -7391,6 +7894,170 @@ interface PlanetPrototypeMapGenSettings {
7391
7894
  property_expression_names?: Record<string, string | boolean | double>;
7392
7895
  territory_settings?: TerritorySettings;
7393
7896
  }
7897
+ interface PlatformBackdrop {
7898
+ /**
7899
+ * Color of atmospheric light. Multiplied by 10 in shader.
7900
+ */
7901
+ atmosphere_color?: Color;
7902
+ /**
7903
+ * Color of dawn side of terminator light. Multiplied by 10 in shader.
7904
+ */
7905
+ atmosphere_ray_light_color_1?: Color;
7906
+ /**
7907
+ * Color of dusk side of terminator light. Multiplied by 10 in shader.
7908
+ */
7909
+ atmosphere_ray_light_color_2?: Color;
7910
+ /**
7911
+ * Width of the atmosphere layer as portion of the total radius.
7912
+ */
7913
+ atmosphere_thickness?: float;
7914
+ /**
7915
+ * Intensity of the flow map effect. Begins to degenerate at high values.
7916
+ */
7917
+ cloud_flow_intensity?: float;
7918
+ /**
7919
+ * How many seconds it takes the flow effect to loop.
7920
+ */
7921
+ cloud_flow_seconds?: float;
7922
+ cloud_normal_intensity?: float;
7923
+ /**
7924
+ * 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.
7925
+ */
7926
+ cloud_panning_rate?: float;
7927
+ /**
7928
+ * How far below the atmosphere layer should the clouds be.
7929
+ */
7930
+ cloud_vertical_offset?: float;
7931
+ /**
7932
+ * Amount of cloud texture to be used based off of the alpha channel of the cloud texture.
7933
+ */
7934
+ cloudiness?: float;
7935
+ emission_scalar?: float;
7936
+ /**
7937
+ * When true only the dark side will receive emission.
7938
+ */
7939
+ emission_scales_with_shadow?: boolean;
7940
+ /**
7941
+ * Scales the speed at which the planet appears in view when flown towards.
7942
+ */
7943
+ flight_approach_speed?: float;
7944
+ /**
7945
+ * Cloud mapped over the planet as the surface texture.
7946
+ */
7947
+ global_cloud?: EffectTexture;
7948
+ /**
7949
+ * Flow map distorting the global cloud.
7950
+ */
7951
+ global_cloud_flow?: EffectTexture;
7952
+ global_cloud_normal?: EffectTexture;
7953
+ /**
7954
+ * Sprite or Animation to be referenced by `hero_clouds` definitions with `sprite_index` 1.
7955
+ */
7956
+ hero_cloud_texture_1?: Animation;
7957
+ /**
7958
+ * Sprite or Animation to be referenced by `hero_clouds` definitions with `sprite_index` 2.
7959
+ */
7960
+ hero_cloud_texture_2?: Animation;
7961
+ /**
7962
+ * Sprite or Animation to be referenced by `hero_clouds` definitions with `sprite_index` 3.
7963
+ */
7964
+ hero_cloud_texture_3?: Animation;
7965
+ /**
7966
+ * Individual Hero Cloud decals over the planet surface. The maximum number is four.
7967
+ */
7968
+ hero_clouds?: PlatformBackdropHeroCloud[];
7969
+ /**
7970
+ * When true the hero clouds will add their color to emission as well.
7971
+ */
7972
+ hero_clouds_are_emissive?: boolean;
7973
+ /**
7974
+ * Color of light. Multiplied by 10 in shader.
7975
+ */
7976
+ light_color?: Color;
7977
+ light_direction?: Vector3D;
7978
+ /**
7979
+ * Harshness of the terminator. Functions like atmosphere thickness.
7980
+ */
7981
+ light_intensity_contrast?: float;
7982
+ /**
7983
+ * Perceived size of the light. Also affects size of the specular spot.
7984
+ */
7985
+ light_radius?: float;
7986
+ /**
7987
+ * 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.
7988
+ */
7989
+ parallax_strength?: Vector;
7990
+ /**
7991
+ * Tilt and pitch of the planet axis.
7992
+ */
7993
+ planet_axis?: Vector;
7994
+ /**
7995
+ * How much tilt and pitch vary over time.
7996
+ */
7997
+ planet_axis_deviation_amplitude?: Vector;
7998
+ /**
7999
+ * Number of seconds it takes for tilt and pitch to complete one cycle of deviation.
8000
+ */
8001
+ planet_axis_deviation_seconds?: Vector;
8002
+ /**
8003
+ * Emissive light added to the surface. Can be disabled on lit side using the `emission_scales_with_shadow` property.
8004
+ */
8005
+ planet_emission?: EffectTexture;
8006
+ /**
8007
+ * Normal map of the surface deforming local sphere normal.
8008
+ */
8009
+ planet_normal?: EffectTexture;
8010
+ /**
8011
+ * Glossiness of the surface in red channel.
8012
+ */
8013
+ planet_reflectivity?: EffectTexture;
8014
+ /**
8015
+ * Wrapped around the surface of the sphere using equirectangular projection.
8016
+ */
8017
+ planet_surface?: EffectTexture;
8018
+ position?: Vector;
8019
+ radius?: float;
8020
+ /**
8021
+ * How many seconds it takes for the planet to do one revolution.
8022
+ */
8023
+ rotation_seconds?: float;
8024
+ /**
8025
+ * Color of specular light. Multiplied by 10 in shader.
8026
+ */
8027
+ specular_color?: Color;
8028
+ specular_intensity?: float;
8029
+ surface_normal_intensity?: float;
8030
+ /**
8031
+ * How far below the atmosphere layer should the surface be.
8032
+ */
8033
+ surface_vertical_offset?: float;
8034
+ }
8035
+ interface PlatformBackdropHeroCloud {
8036
+ /**
8037
+ * Random position offset of the cloud animation. Refreshed every loop.
8038
+ */
8039
+ position_deviation?: Vector;
8040
+ /**
8041
+ * 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.
8042
+ */
8043
+ positions?: Vector[];
8044
+ projection_style?: 'none' | 'front-only' | 'front-and-back' | 'front-and-back-inverted';
8045
+ rotate_with_planet?: boolean;
8046
+ rotation_deviation?: float;
8047
+ rotation_speed?: float;
8048
+ /**
8049
+ * Cloud size as a proportion of the total planet size, meaning `1` spans whole planet.
8050
+ */
8051
+ size?: Vector;
8052
+ /**
8053
+ * 1, 2, 3 use cloud sprites 1, 2, 3 respectively. 0 will disable this cloud. Anything else is invalid.
8054
+ */
8055
+ sprite_index?: uint8;
8056
+ /**
8057
+ * Random frame offset of the cloud animation if the graphic is an animation.
8058
+ */
8059
+ starting_frame_offset?: uint16;
8060
+ }
7394
8061
  /**
7395
8062
  * Defines when controller vibrations should be played.
7396
8063
  */
@@ -7894,7 +8561,29 @@ ItemProductPrototype | /**
7894
8561
  * Loaded when the `type` is `"fluid"`.
7895
8562
  */
7896
8563
  FluidProductPrototype;
8564
+ interface ProductPrototypeBase {
8565
+ /**
8566
+ * 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.
8567
+ */
8568
+ independent_probability?: double;
8569
+ /**
8570
+ * 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.
8571
+ *
8572
+ * 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)`
8573
+ *
8574
+ * 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.
8575
+ */
8576
+ shared_probability?: SharedProbabilityDefinition;
8577
+ /**
8578
+ * 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`.
8579
+ */
8580
+ show_details_in_recipe_tooltip?: boolean;
8581
+ }
7897
8582
  interface ProductionHealthEffect {
8583
+ /**
8584
+ * Defaults to "physical" damage.
8585
+ */
8586
+ damage_type?: DamageTypeID;
7898
8587
  not_producing?: float;
7899
8588
  producing?: float;
7900
8589
  }
@@ -7924,22 +8613,50 @@ interface ProgrammableSpeakerNote {
7924
8613
  */
7925
8614
  sound?: Sound;
7926
8615
  }
8616
+ /**
8617
+ * Root style: `"progressbar"`
8618
+ */
7927
8619
  interface ProgressBarStyleSpecification extends BaseStyleSpecification {
8620
+ /**
8621
+ * Required on the root style.
8622
+ */
7928
8623
  bar?: ElementImageSet;
8624
+ /**
8625
+ * Required on the root style.
8626
+ */
7929
8627
  bar_background?: ElementImageSet;
7930
8628
  /**
7931
8629
  * The thickness of the bar, not the horizontal size.
8630
+ *
8631
+ * Required on the root style.
7932
8632
  */
7933
8633
  bar_width?: uint32;
8634
+ /**
8635
+ * Required on the root style.
8636
+ */
7934
8637
  color?: Color;
8638
+ /**
8639
+ * Required on the root style.
8640
+ */
7935
8641
  embed_text_in_bar?: boolean;
7936
8642
  filled_font_color?: Color;
7937
8643
  /**
7938
8644
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
8645
+ *
8646
+ * Required on the root style.
7939
8647
  */
7940
8648
  font?: string;
8649
+ /**
8650
+ * Required on the root style.
8651
+ */
7941
8652
  font_color?: Color;
8653
+ /**
8654
+ * Required on the root style.
8655
+ */
7942
8656
  other_colors?: OtherColors[];
8657
+ /**
8658
+ * Required on the root style.
8659
+ */
7943
8660
  side_text_padding?: int16;
7944
8661
  type: 'progressbar_style';
7945
8662
  }
@@ -7975,6 +8692,10 @@ interface ProjectileTriggerDelivery extends TriggerDeliveryItem {
7975
8692
  * 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.
7976
8693
  */
7977
8694
  direction_deviation?: float;
8695
+ /**
8696
+ * If `true`, the projectile will inherit any positive speed component from the source entity's movement toward the target.
8697
+ */
8698
+ inherit_speed?: boolean;
7978
8699
  max_range?: double;
7979
8700
  min_range?: double;
7980
8701
  /**
@@ -8034,77 +8755,54 @@ interface PuddleTileEffectParameters {
8034
8755
  water_effect?: TileEffectDefinitionID;
8035
8756
  water_effect_parameters?: WaterTileEffectParameters;
8036
8757
  }
8037
- /**
8038
- * A mapping of arrays of {@link PumpConnectorGraphicsAnimations | prototype:PumpConnectorGraphicsAnimation} to all 4 directions of the pump connection (to a fluid wagon).
8039
- * @example ```
8040
- load_animations =
8041
- {
8042
- west =
8043
- {
8044
- [1] =
8045
- {
8046
- standup_base =
8047
- {
8048
- filename = "__base__/graphics/entity/pump/connector/V-R-135-load-standup-base.png",
8049
- width = 110,
8050
- height = 126,
8051
- scale = 0.5,
8052
- line_length = 1,
8053
- frame_count = 20,
8054
- shift = util.by_pixel(-23.5, -13.5)
8055
- },
8056
- standup_shadow =
8057
- {
8058
- filename = "__base__/graphics/entity/pump/connector/V-R-1-load-standup-base-shadow.png",
8059
- width = 157,
8060
- height = 136,
8061
- scale = 0.5,
8062
- line_length = 1,
8063
- frame_count = 20,
8064
- shift = util.by_pixel(-8.75, 8.5)
8065
- },
8066
- },
8067
- [2] =
8068
- {
8069
- standup_base = { ... },
8070
- standup_shadow = { ... },
8071
- connector_shadow = { ... },
8072
- },
8073
- [3] = { ... },
8074
- [4] = { ... },
8075
- [5] = { ... },
8076
- [6] = { ... },
8077
- },
8078
- north = { ... },
8079
- east = { ... },
8080
- south = { ... },
8081
- }
8082
- ```
8083
- */
8084
- interface PumpConnectorGraphics {
8758
+ interface PumpWagonConnectionGraphics {
8759
+ base?: BasePumpWagonConnectionAnimations;
8760
+ /**
8761
+ * 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.
8762
+ */
8763
+ base_animation_finished_at_progress?: double;
8085
8764
  /**
8086
- * Size of the array must be 6 or more.
8765
+ * 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.
8087
8766
  */
8088
- east: PumpConnectorGraphicsAnimation[];
8767
+ clamp_animation_starts_at_progress?: double;
8768
+ clamp_y_shift?: float;
8769
+ height_diff_to_wagon?: float;
8770
+ part1_to_2_shift?: Vector;
8089
8771
  /**
8090
- * Size of the array must be 6 or more.
8772
+ * Adjusts where the sprites will be cropped
8091
8773
  */
8092
- north: PumpConnectorGraphicsAnimation[];
8774
+ part2_crop_adjustment?: float;
8093
8775
  /**
8094
- * Size of the array must be 6 or more.
8776
+ * Adjusts where the sprites will be cropped
8095
8777
  */
8096
- south: PumpConnectorGraphicsAnimation[];
8778
+ part2_shadow_crop_adjustment?: float;
8097
8779
  /**
8098
- * Size of the array must be 6 or more.
8780
+ * Rotating top part.
8099
8781
  */
8100
- west: PumpConnectorGraphicsAnimation[];
8782
+ part_1?: RotatedSprite;
8783
+ part_1_shadow?: RotatedSprite;
8784
+ /**
8785
+ * Rotating arm.
8786
+ */
8787
+ part_2?: RotatedSprite;
8788
+ part_2_shadow?: RotatedSprite;
8789
+ /**
8790
+ * Projected render rest position of `suction_clamp` relative to the parent pump position.
8791
+ */
8792
+ resting_position_shift?: PumpWagonConnectionShift4Way;
8793
+ shadow_shift?: Vector;
8794
+ suction_clamp?: Animation;
8795
+ suction_clamp_shadow?: Animation;
8796
+ /**
8797
+ * Relative projected render position of `part_1` to the parent pump position.
8798
+ */
8799
+ top_pivot_shift?: PumpWagonConnectionShift4Way;
8101
8800
  }
8102
- interface PumpConnectorGraphicsAnimation {
8103
- connector?: Animation;
8104
- connector_shadow?: Animation;
8105
- standup_base?: Animation;
8106
- standup_shadow?: Animation;
8107
- standup_top?: Animation;
8801
+ interface PumpWagonConnectionShift4Way {
8802
+ east: Vector;
8803
+ north: Vector;
8804
+ south: Vector;
8805
+ west: Vector;
8108
8806
  }
8109
8807
  /**
8110
8808
  * The push back effect used by the {@link discharge defense | https://wiki.factorio.com/Discharge_defense}.
@@ -8125,13 +8823,27 @@ interface PushBackTriggerEffectItem extends TriggerEffectItem {
8125
8823
  ```
8126
8824
  */
8127
8825
  type QualityID = string;
8826
+ /**
8827
+ * Root style: `"radiobutton"`
8828
+ */
8128
8829
  interface RadioButtonStyleSpecification extends StyleWithClickableGraphicalSetSpecification {
8830
+ /**
8831
+ * Required on the root style.
8832
+ */
8129
8833
  disabled_font_color?: Color;
8130
8834
  /**
8131
8835
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
8836
+ *
8837
+ * Required on the root style.
8132
8838
  */
8133
8839
  font?: string;
8840
+ /**
8841
+ * Required on the root style.
8842
+ */
8134
8843
  font_color?: Color;
8844
+ /**
8845
+ * Required on the root style.
8846
+ */
8135
8847
  text_padding?: uint32;
8136
8848
  type: 'radiobutton_style';
8137
8849
  }
@@ -8157,6 +8869,14 @@ interface RadiusVisualisationSpecification {
8157
8869
  * 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}.
8158
8870
  */
8159
8871
  distance?: double;
8872
+ /**
8873
+ * Each value must be >= 0.01.
8874
+ *
8875
+ * If value is not provided for a quality, then `1` will be used as a multiplier instead.
8876
+ *
8877
+ * 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}.
8878
+ */
8879
+ distance_quality_multiplier?: LuaTable<QualityID, double>;
8160
8880
  draw_in_cursor?: boolean;
8161
8881
  draw_on_selection?: boolean;
8162
8882
  /**
@@ -8168,7 +8888,7 @@ interface RadiusVisualisationSpecification {
8168
8888
  /**
8169
8889
  * The sprite to show.
8170
8890
  *
8171
- * 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 ElectricPolePrototype::radius_visualisation_picture | prototype:ElectricPolePrototype::radius_visualisation_picture}, {@link MiningDrillPrototype::radius_visualisation_picture | prototype:MiningDrillPrototype::radius_visualisation_picture}.
8891
+ * 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}.
8172
8892
  */
8173
8893
  sprite?: Sprite;
8174
8894
  }
@@ -8484,6 +9204,21 @@ interface Resistance {
8484
9204
  */
8485
9205
  type ResourceCategoryID = string;
8486
9206
  type RichTextSetting = 'enabled' | 'disabled' | 'highlight';
9207
+ interface RobotDoorSpecification {
9208
+ /**
9209
+ * Drawn when a robot brings/takes items from this entity.
9210
+ */
9211
+ animation?: Animation;
9212
+ /**
9213
+ * Played when a robot brings/takes items from this entity. Only loaded if `animation` is defined.
9214
+ */
9215
+ animation_sound?: Sound;
9216
+ /**
9217
+ * The offset from the center of this entity where a robot visually brings/takes items.
9218
+ */
9219
+ location_offset?: Vector;
9220
+ opened_duration?: uint8;
9221
+ }
8487
9222
  interface RollingStockRotatedSlopedGraphics {
8488
9223
  rotated: RotatedSprite;
8489
9224
  slope_angle_between_frames?: double;
@@ -8754,8 +9489,14 @@ interface ScrollBarStyleSpecification extends BaseStyleSpecification {
8754
9489
  background_graphical_set?: ElementImageSet;
8755
9490
  thumb_button_style?: ButtonStyleSpecification;
8756
9491
  }
9492
+ /**
9493
+ * Root style: `"scroll_pane"`
9494
+ */
8757
9495
  interface ScrollPaneStyleSpecification extends BaseStyleSpecification {
8758
9496
  always_draw_borders?: boolean;
9497
+ /**
9498
+ * Required on the root style.
9499
+ */
8759
9500
  background_graphical_set?: ElementImageSet;
8760
9501
  dont_force_clipping_rect_for_contents?: boolean;
8761
9502
  extra_bottom_margin_when_activated?: int32;
@@ -8774,11 +9515,23 @@ interface ScrollPaneStyleSpecification extends BaseStyleSpecification {
8774
9515
  extra_right_padding_when_activated?: int32;
8775
9516
  extra_top_margin_when_activated?: int32;
8776
9517
  extra_top_padding_when_activated?: int32;
9518
+ /**
9519
+ * Required on the root style.
9520
+ */
8777
9521
  graphical_set?: ElementImageSet;
9522
+ /**
9523
+ * Required on the root style.
9524
+ */
8778
9525
  horizontal_scrollbar_style?: HorizontalScrollBarStyleSpecification;
8779
9526
  scrollbars_go_outside?: boolean;
8780
9527
  type: 'scroll_pane_style';
9528
+ /**
9529
+ * Required on the root style.
9530
+ */
8781
9531
  vertical_flow_style?: VerticalFlowStyleSpecification;
9532
+ /**
9533
+ * Required on the root style.
9534
+ */
8782
9535
  vertical_scrollbar_style?: VerticalScrollBarStyleSpecification;
8783
9536
  }
8784
9537
  /**
@@ -8808,6 +9561,18 @@ interface SelectionModeData {
8808
9561
  entity_filter_mode?: 'whitelist' | 'blacklist';
8809
9562
  entity_filters?: EntityID[];
8810
9563
  entity_type_filters?: string[];
9564
+ /**
9565
+ * 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.
9566
+ *
9567
+ * Setting this to `true` disables this error.
9568
+ */
9569
+ ignore_cannot_select_entities?: boolean;
9570
+ /**
9571
+ * 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.
9572
+ *
9573
+ * Setting this to `true` disables this error.
9574
+ */
9575
+ ignore_cannot_select_tiles?: boolean;
8811
9576
  mode: SelectionModeFlags;
8812
9577
  play_ended_sound_when_nothing_selected?: boolean;
8813
9578
  started_sound?: Sound;
@@ -8820,13 +9585,13 @@ interface SelectionModeData {
8820
9585
  * Some flags only exclude objects from the selection, meaning they need to be combined with another flag to select anything.
8821
9586
  */
8822
9587
  type SelectionModeFlags = (/**
8823
- * Selects entities and tiles as if selecting them for a blueprint.
9588
+ * Excludes entities and tiles that can't be selected for blueprinting.
8824
9589
  */
8825
9590
  'blueprint' | /**
8826
- * Selects entities and tiles as if selecting them for deconstruction.
9591
+ * Excludes entities and tiles that can't be selected for deconstruction.
8827
9592
  */
8828
9593
  'deconstruct' | /**
8829
- * Selects entities and tiles as if selecting them for deconstruction cancellation.
9594
+ * Excludes entities that can't be selected for deconstruction cancellation.
8830
9595
  */
8831
9596
  'cancel-deconstruct' | /**
8832
9597
  * Selects items on the ground.
@@ -8862,13 +9627,13 @@ type SelectionModeFlags = (/**
8862
9627
  * Excludes entities that are not from an enemy force from the selection.
8863
9628
  */
8864
9629
  'enemy' | /**
8865
- * Selects entities as if selecting them for upgrading.
9630
+ * Excludes entities that can't be selected for upgrading.
8866
9631
  */
8867
9632
  'upgrade' | /**
8868
- * Selects entities as if selecting them for upgrade cancellation.
9633
+ * Excludes entities that can't be selected for upgrade cancellation.
8869
9634
  */
8870
9635
  'cancel-upgrade' | /**
8871
- * Selects entities as if selecting them for downgrading.
9636
+ * Excludes entities that can't be selected for downgrading.
8872
9637
  */
8873
9638
  'downgrade' | /**
8874
9639
  * Selects entities that are an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype}.
@@ -8892,13 +9657,13 @@ type SelectionModeFlags = (/**
8892
9657
  * Selects entities that are a {@link TileGhostPrototype | prototype:TileGhostPrototype}.
8893
9658
  */
8894
9659
  'tile-ghost') | (/**
8895
- * Selects entities and tiles as if selecting them for a blueprint.
9660
+ * Excludes entities and tiles that can't be selected for blueprinting.
8896
9661
  */
8897
9662
  'blueprint' | /**
8898
- * Selects entities and tiles as if selecting them for deconstruction.
9663
+ * Excludes entities and tiles that can't be selected for deconstruction.
8899
9664
  */
8900
9665
  'deconstruct' | /**
8901
- * Selects entities and tiles as if selecting them for deconstruction cancellation.
9666
+ * Excludes entities that can't be selected for deconstruction cancellation.
8902
9667
  */
8903
9668
  'cancel-deconstruct' | /**
8904
9669
  * Selects items on the ground.
@@ -8934,13 +9699,13 @@ type SelectionModeFlags = (/**
8934
9699
  * Excludes entities that are not from an enemy force from the selection.
8935
9700
  */
8936
9701
  'enemy' | /**
8937
- * Selects entities as if selecting them for upgrading.
9702
+ * Excludes entities that can't be selected for upgrading.
8938
9703
  */
8939
9704
  'upgrade' | /**
8940
- * Selects entities as if selecting them for upgrade cancellation.
9705
+ * Excludes entities that can't be selected for upgrade cancellation.
8941
9706
  */
8942
9707
  'cancel-upgrade' | /**
8943
- * Selects entities as if selecting them for downgrading.
9708
+ * Excludes entities that can't be selected for downgrading.
8944
9709
  */
8945
9710
  'downgrade' | /**
8946
9711
  * Selects entities that are an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype}.
@@ -8978,6 +9743,9 @@ interface SendSpidertronTipTrigger extends CountBasedTipTrigger {
8978
9743
  type: 'send-spidertron';
8979
9744
  }
8980
9745
  type SendToOrbitMode = 'not-sendable' | 'manual' | 'automated';
9746
+ /**
9747
+ * Triggered when the triggers listed in `triggers` are triggered in order.
9748
+ */
8981
9749
  interface SequenceTipTrigger {
8982
9750
  /**
8983
9751
  * List of triggers to fulfill.
@@ -9008,7 +9776,7 @@ interface SetTileTriggerEffectItem extends TriggerEffectItem {
9008
9776
  apply_on_space_platform?: boolean;
9009
9777
  apply_projection?: boolean;
9010
9778
  radius: float;
9011
- tile_collision_mask?: CollisionMaskConnector;
9779
+ tile_collision_mask?: TileCollisionMaskConnector;
9012
9780
  tile_name: TileID;
9013
9781
  type: 'set-tile';
9014
9782
  }
@@ -9025,6 +9793,16 @@ interface Settings {
9025
9793
  */
9026
9794
  startup: Record<string, ModSetting>;
9027
9795
  }
9796
+ interface SharedProbabilityDefinition {
9797
+ /**
9798
+ * Upper end of the range of shared roll values that will allow product to be given. Must be >= `min` and <= `1`.
9799
+ */
9800
+ max: double;
9801
+ /**
9802
+ * Lower end of the range of shared roll values that will allow product to be given. Must be >= `0` and <= `max`.
9803
+ */
9804
+ min: double;
9805
+ }
9028
9806
  interface ShiftAnimationWaypoints {
9029
9807
  east: Vector[];
9030
9808
  north: Vector[];
@@ -9047,6 +9825,10 @@ interface SignalIDConnectorBase {
9047
9825
  * Name of the signal.
9048
9826
  */
9049
9827
  name: VirtualSignalID | ItemID | FluidID | RecipeID | EntityID | SpaceLocationID | AsteroidChunkID | QualityID;
9828
+ /**
9829
+ * Defaults to `normal`.
9830
+ */
9831
+ quality?: QualityID;
9050
9832
  type: string;
9051
9833
  }
9052
9834
  /**
@@ -9097,11 +9879,11 @@ interface SimulationDefinition {
9097
9879
  /**
9098
9880
  * Only loaded if `init_file` is not defined.
9099
9881
  *
9100
- * 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}.
9882
+ * 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}.
9101
9883
  */
9102
9884
  init?: string;
9103
9885
  /**
9104
- * 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}.
9886
+ * 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}.
9105
9887
  */
9106
9888
  init_file?: FileName;
9107
9889
  /**
@@ -9136,11 +9918,11 @@ interface SimulationDefinition {
9136
9918
  /**
9137
9919
  * Only loaded if `update_file` is not defined.
9138
9920
  *
9139
- * 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}.
9921
+ * 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}.
9140
9922
  */
9141
9923
  update?: string;
9142
9924
  /**
9143
- * 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}.
9925
+ * 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}.
9144
9926
  */
9145
9927
  update_file?: FileName;
9146
9928
  /**
@@ -9234,14 +10016,41 @@ interface SingleGraphicProcessionLayer {
9234
10016
  shift_rotates_with_pod?: boolean;
9235
10017
  type: 'single-graphic';
9236
10018
  }
10019
+ /**
10020
+ * Root style: `"slider"`
10021
+ */
9237
10022
  interface SliderStyleSpecificationBase extends BaseStyleSpecification {
10023
+ /**
10024
+ * Required on the root style.
10025
+ */
9238
10026
  button?: ButtonStyleSpecification;
10027
+ /**
10028
+ * Required on the root style.
10029
+ */
9239
10030
  draw_notches?: boolean;
10031
+ /**
10032
+ * Required on the root style.
10033
+ */
9240
10034
  empty_bar?: ElementImageSet;
10035
+ /**
10036
+ * Required on the root style.
10037
+ */
9241
10038
  empty_bar_disabled?: ElementImageSet;
10039
+ /**
10040
+ * Required on the root style.
10041
+ */
9242
10042
  full_bar?: ElementImageSet;
10043
+ /**
10044
+ * Required on the root style.
10045
+ */
9243
10046
  full_bar_disabled?: ElementImageSet;
10047
+ /**
10048
+ * Required on the root style.
10049
+ */
9244
10050
  high_button?: ButtonStyleSpecification;
10051
+ /**
10052
+ * Required on the root style.
10053
+ */
9245
10054
  notch?: ElementImageSet;
9246
10055
  type: string;
9247
10056
  }
@@ -9380,6 +10189,10 @@ type Sound = {
9380
10189
  } | SoundDefinition | SoundDefinition[];
9381
10190
  interface SoundAccent {
9382
10191
  frame?: uint16;
10192
+ /**
10193
+ * The `sound` is played when the entity has one the specified direction.
10194
+ */
10195
+ play_for_directions?: defines.direction[];
9383
10196
  /**
9384
10197
  * Play the `sound` for a working visualisation of a given {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}.
9385
10198
  *
@@ -9434,7 +10247,7 @@ interface SoundModifier {
9434
10247
  type: SoundModifierType;
9435
10248
  volume_multiplier: float;
9436
10249
  }
9437
- type SoundModifierType = 'game' | 'main-menu' | 'tips-and-tricks' | 'driving' | 'elevation' | 'space-platform';
10250
+ type SoundModifierType = 'game' | 'main-menu' | 'tips-and-tricks' | 'driving' | 'elevation' | 'space-platform' | 'tall-entities-hidden';
9438
10251
  /**
9439
10252
  * 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.
9440
10253
  */
@@ -9544,15 +10357,41 @@ type SpawnPoint = {
9544
10357
  double,
9545
10358
  double
9546
10359
  ];
10360
+ /**
10361
+ * Root style: `"speech_bubble"`
10362
+ */
9547
10363
  interface SpeechBubbleStyleSpecification extends BaseStyleSpecification {
10364
+ /**
10365
+ * Required on the root style.
10366
+ */
9548
10367
  arrow_graphical_set?: ElementImageSet;
10368
+ /**
10369
+ * Required on the root style.
10370
+ */
9549
10371
  arrow_indent?: double;
10372
+ /**
10373
+ * Required on the root style.
10374
+ */
9550
10375
  close_color?: Color;
10376
+ /**
10377
+ * Required on the root style.
10378
+ */
9551
10379
  frame_style?: FrameStyleSpecification;
10380
+ /**
10381
+ * Required on the root style.
10382
+ */
9552
10383
  label_style?: LabelStyleSpecification;
10384
+ /**
10385
+ * Required on the root style.
10386
+ */
9553
10387
  pass_through_mouse?: boolean;
9554
10388
  type: 'speech_bubble_style';
9555
10389
  }
10390
+ interface SpentFluidSpecification {
10391
+ amount?: double;
10392
+ name: FluidID;
10393
+ temperature?: float;
10394
+ }
9556
10395
  /**
9557
10396
  * Used by {@link SpiderVehiclePrototype | prototype:SpiderVehiclePrototype}.
9558
10397
  */
@@ -9651,7 +10490,13 @@ interface SpiderTorsoGraphicsSet {
9651
10490
  base_animation?: RotatedAnimation;
9652
10491
  base_render_layer?: RenderLayer;
9653
10492
  render_layer?: RenderLayer;
10493
+ /**
10494
+ * If no sprite flags are defined, then this animation is loaded and treated as a shadow by default.
10495
+ */
9654
10496
  shadow_animation?: RotatedAnimation;
10497
+ /**
10498
+ * If no sprite flags are defined, then this animation is loaded and treated as a shadow by default.
10499
+ */
9655
10500
  shadow_base_animation?: RotatedAnimation;
9656
10501
  /**
9657
10502
  * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
@@ -9912,6 +10757,48 @@ type Sprite4Way = {
9912
10757
  */
9913
10758
  west?: Sprite;
9914
10759
  } | Sprite;
10760
+ /**
10761
+ * A map of sprites for 8 directions of the entity.
10762
+ */
10763
+ interface Sprite8Way {
10764
+ /**
10765
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10766
+ */
10767
+ east?: Sprite;
10768
+ /**
10769
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10770
+ */
10771
+ north?: Sprite;
10772
+ /**
10773
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10774
+ */
10775
+ north_east?: Sprite;
10776
+ /**
10777
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10778
+ */
10779
+ north_west?: Sprite;
10780
+ /**
10781
+ * Only loaded if `sheets` is not defined.
10782
+ */
10783
+ sheet?: SpriteNWaySheet;
10784
+ sheets?: SpriteNWaySheet[];
10785
+ /**
10786
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10787
+ */
10788
+ south?: Sprite;
10789
+ /**
10790
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10791
+ */
10792
+ south_east?: Sprite;
10793
+ /**
10794
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10795
+ */
10796
+ south_west?: Sprite;
10797
+ /**
10798
+ * Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
10799
+ */
10800
+ west?: Sprite;
10801
+ }
9915
10802
  /**
9916
10803
  * An array containing the following values.
9917
10804
  * @example ```
@@ -9951,7 +10838,13 @@ type SpriteFlags = (/**
9951
10838
  'smoke' | /**
9952
10839
  * This flag will internally set these flags: `"group=decal"`
9953
10840
  */
9954
- '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')[];
10841
+ 'decal' | 'low-object' | 'corpse-decay' | 'trilinear-filtering' | /**
10842
+ * This flag will internally set these flags: `"linear-minification"`, `"linear-magnification"`, `"group=procession-cover"`
10843
+ */
10844
+ 'procession-cover' | /**
10845
+ * This flag will internally limit colors to only RG and set these flags: `"no-crop"`, `"not-compressed"`
10846
+ */
10847
+ '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')[];
9955
10848
  /**
9956
10849
  * @example ```
9957
10850
  sheet =
@@ -9966,6 +10859,10 @@ sheet =
9966
10859
  ```
9967
10860
  */
9968
10861
  interface SpriteNWaySheet extends SpriteParameters {
10862
+ /**
10863
+ * Specifies for how many directions each frame is used. Silently forced to always be at least `1`.
10864
+ */
10865
+ frame_repeat?: uint32;
9969
10866
  /**
9970
10867
  * Specifies how many of the directions of the SpriteNWay are filled up with this sheet.
9971
10868
  */
@@ -10034,7 +10931,7 @@ interface SpriteParameters extends SpriteSource {
10034
10931
  usage?: SpriteUsageHint;
10035
10932
  }
10036
10933
  /**
10037
- * 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.
10934
+ * 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.
10038
10935
  */
10039
10936
  type SpritePriority = 'extra-high-no-scale' | 'extra-high' | 'high' | 'medium' | 'low' | 'very-low' | 'no-atlas';
10040
10937
  interface SpriteSheet extends SpriteParameters {
@@ -10077,6 +10974,12 @@ interface SpriteSource {
10077
10974
  * 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.
10078
10975
  */
10079
10976
  allow_forced_downscale?: boolean;
10977
+ /**
10978
+ * 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.
10979
+ *
10980
+ * 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.
10981
+ */
10982
+ color_channels?: 1 | 2 | 3 | 4;
10080
10983
  /**
10081
10984
  * The path to the sprite file to use.
10082
10985
  * This property is required, but marked as optional due to typescript inheritance limitations
@@ -10167,16 +11070,12 @@ interface StackTransferTipTrigger extends CountBasedTipTrigger {
10167
11070
  type: 'stack-transfer';
10168
11071
  }
10169
11072
  interface StateSteeringSettings {
10170
- /**
10171
- * Used only for special "to look good" purposes (like in trailer).
10172
- */
10173
- force_unit_fuzzy_goto_behavior: boolean;
10174
11073
  /**
10175
11074
  * Not including the radius of the unit.
10176
11075
  */
10177
- radius: double;
10178
- separation_factor: double;
10179
- separation_force: double;
11076
+ radius?: double;
11077
+ separation_factor?: double;
11078
+ separation_force?: double;
10180
11079
  }
10181
11080
  interface StatelessVisualisation {
10182
11081
  acceleration_x?: float;
@@ -10259,8 +11158,12 @@ interface StatusColors {
10259
11158
  working?: Color;
10260
11159
  }
10261
11160
  interface SteeringSettings {
10262
- default: StateSteeringSettings;
10263
- moving: StateSteeringSettings;
11161
+ /**
11162
+ * Used only for special "to look good" purposes (like in trailer).
11163
+ */
11164
+ force_unit_fuzzy_goto_behavior?: boolean;
11165
+ move?: StateSteeringSettings;
11166
+ stay?: StateSteeringSettings;
10264
11167
  }
10265
11168
  interface StorageTankPictures {
10266
11169
  flow_sprite?: Sprite;
@@ -10465,60 +11368,164 @@ interface SurfaceRenderParameters {
10465
11368
  */
10466
11369
  draw_sprite_clouds?: boolean;
10467
11370
  fog?: FogEffectProperties;
11371
+ platform_backdrop?: PlatformBackdrop;
10468
11372
  shadow_opacity?: float;
10469
11373
  space_dust_background?: SpaceDustEffectProperties;
10470
11374
  space_dust_foreground?: SpaceDustEffectProperties;
10471
11375
  terrain_tint_effect?: GlobalTintEffectProperties;
10472
11376
  }
11377
+ /**
11378
+ * Root style: `"switch"`
11379
+ */
10473
11380
  interface SwitchStyleSpecification extends BaseStyleSpecification {
11381
+ /**
11382
+ * Required on the root style.
11383
+ */
10474
11384
  active_label?: LabelStyleSpecification;
11385
+ /**
11386
+ * Required on the root style.
11387
+ */
10475
11388
  button?: ButtonStyleSpecification;
11389
+ /**
11390
+ * Required on the root style.
11391
+ */
10476
11392
  default_background?: Sprite;
11393
+ /**
11394
+ * Required on the root style.
11395
+ */
10477
11396
  disabled_background?: Sprite;
11397
+ /**
11398
+ * Required on the root style.
11399
+ */
10478
11400
  hover_background?: Sprite;
11401
+ /**
11402
+ * Required on the root style.
11403
+ */
10479
11404
  inactive_label?: LabelStyleSpecification;
11405
+ /**
11406
+ * Required on the root style.
11407
+ */
10480
11408
  left_button_position?: uint32;
11409
+ /**
11410
+ * Required on the root style.
11411
+ */
10481
11412
  middle_button_position?: uint32;
11413
+ /**
11414
+ * Required on the root style.
11415
+ */
10482
11416
  right_button_position?: uint32;
10483
11417
  type: 'switch_style';
10484
11418
  }
11419
+ /**
11420
+ * Root style: `"tab"`
11421
+ */
10485
11422
  interface TabStyleSpecification extends StyleWithClickableGraphicalSetSpecification {
10486
11423
  /**
10487
11424
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11425
+ *
11426
+ * Required on the root style.
10488
11427
  */
10489
11428
  badge_font?: string;
11429
+ /**
11430
+ * Required on the root style.
11431
+ */
10490
11432
  badge_horizontal_spacing?: int16;
11433
+ /**
11434
+ * Required on the root style.
11435
+ */
10491
11436
  default_badge_font_color?: Color;
11437
+ /**
11438
+ * Required on the root style.
11439
+ */
10492
11440
  default_badge_graphical_set?: ElementImageSet;
11441
+ /**
11442
+ * Required on the root style.
11443
+ */
10493
11444
  default_font_color?: Color;
11445
+ /**
11446
+ * Required on the root style.
11447
+ */
10494
11448
  disabled_badge_font_color?: Color;
11449
+ /**
11450
+ * Required on the root style.
11451
+ */
10495
11452
  disabled_badge_graphical_set?: ElementImageSet;
11453
+ /**
11454
+ * Required on the root style.
11455
+ */
10496
11456
  disabled_font_color?: Color;
10497
11457
  draw_grayscale_picture?: boolean;
10498
11458
  /**
10499
11459
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11460
+ *
11461
+ * Required on the root style.
10500
11462
  */
10501
11463
  font?: string;
11464
+ /**
11465
+ * Required on the root style.
11466
+ */
10502
11467
  hover_badge_graphical_set?: ElementImageSet;
11468
+ /**
11469
+ * Required on the root style.
11470
+ */
10503
11471
  increase_height_when_selected?: boolean;
11472
+ /**
11473
+ * Required on the root style.
11474
+ */
10504
11475
  left_edge_selected_graphical_set?: ElementImageSet;
11476
+ /**
11477
+ * Required on the root style.
11478
+ */
10505
11479
  override_graphics_on_edges?: boolean;
11480
+ /**
11481
+ * Required on the root style.
11482
+ */
10506
11483
  press_badge_graphical_set?: ElementImageSet;
11484
+ /**
11485
+ * Required on the root style.
11486
+ */
10507
11487
  right_edge_selected_graphical_set?: ElementImageSet;
11488
+ /**
11489
+ * Required on the root style.
11490
+ */
10508
11491
  selected_badge_font_color?: Color;
11492
+ /**
11493
+ * Required on the root style.
11494
+ */
10509
11495
  selected_badge_graphical_set?: ElementImageSet;
11496
+ /**
11497
+ * Required on the root style.
11498
+ */
10510
11499
  selected_font_color?: Color;
10511
11500
  type: 'tab_style';
10512
11501
  }
11502
+ /**
11503
+ * Root style: `"tabbed_pane"`
11504
+ */
10513
11505
  interface TabbedPaneStyleSpecification extends BaseStyleSpecification {
11506
+ /**
11507
+ * Required on the root style.
11508
+ */
10514
11509
  tab_container?: TableStyleSpecification;
11510
+ /**
11511
+ * Required on the root style.
11512
+ */
10515
11513
  tab_content_frame?: FrameStyleSpecification;
10516
11514
  type: 'tabbed_pane_style';
11515
+ /**
11516
+ * Required on the root style.
11517
+ */
10517
11518
  vertical_spacing?: uint32;
10518
11519
  }
11520
+ /**
11521
+ * Root style: `"table"`
11522
+ */
10519
11523
  interface TableStyleSpecification extends BaseStyleSpecification {
10520
11524
  apply_row_graphical_set_per_column?: boolean;
10521
11525
  background_graphical_set?: ElementImageSet;
11526
+ /**
11527
+ * Required on the root style.
11528
+ */
10522
11529
  border?: BorderImageSet;
10523
11530
  bottom_cell_padding?: int16;
10524
11531
  /**
@@ -10534,6 +11541,9 @@ interface TableStyleSpecification extends BaseStyleSpecification {
10534
11541
  default_row_graphical_set?: ElementImageSet;
10535
11542
  even_row_graphical_set?: ElementImageSet;
10536
11543
  horizontal_line_color?: Color;
11544
+ /**
11545
+ * Required on the root style.
11546
+ */
10537
11547
  horizontal_spacing?: int32 | SpacingItem[];
10538
11548
  hovered_graphical_set?: ElementImageSet;
10539
11549
  hovered_row_color?: Color;
@@ -10549,6 +11559,9 @@ interface TableStyleSpecification extends BaseStyleSpecification {
10549
11559
  top_cell_padding?: int16;
10550
11560
  type: 'table_style';
10551
11561
  vertical_line_color?: Color;
11562
+ /**
11563
+ * Required on the root style.
11564
+ */
10552
11565
  vertical_spacing?: int32 | SpacingItem[];
10553
11566
  wide_as_column_count?: boolean;
10554
11567
  }
@@ -10562,46 +11575,149 @@ interface TableStyleSpecification extends BaseStyleSpecification {
10562
11575
  ```
10563
11576
  */
10564
11577
  type TechnologyID = string;
11578
+ /**
11579
+ * Root style: `"technology_slot"`
11580
+ */
10565
11581
  interface TechnologySlotStyleSpecification extends ButtonStyleSpecificationBase {
11582
+ /**
11583
+ * Required on the root style.
11584
+ */
10566
11585
  clicked_ingredients_background?: ElementImageSet;
11586
+ /**
11587
+ * Required on the root style.
11588
+ */
10567
11589
  clicked_overlay?: ElementImageSet;
11590
+ /**
11591
+ * Required on the root style.
11592
+ */
10568
11593
  default_background_shadow?: ElementImageSet;
11594
+ /**
11595
+ * Required on the root style.
11596
+ */
10569
11597
  default_ingredients_background?: ElementImageSet;
11598
+ /**
11599
+ * Required on the root style.
11600
+ */
10570
11601
  disabled_ingredients_background?: ElementImageSet;
11602
+ /**
11603
+ * Required on the root style.
11604
+ */
10571
11605
  drag_handle_style?: EmptyWidgetStyleSpecification;
11606
+ /**
11607
+ * Required on the root style.
11608
+ */
10572
11609
  highlighted_graphical_set?: ElementImageSet;
11610
+ /**
11611
+ * Required on the root style.
11612
+ */
10573
11613
  highlighted_ingredients_background?: ElementImageSet;
11614
+ /**
11615
+ * Required on the root style.
11616
+ */
10574
11617
  hovered_ingredients_background?: ElementImageSet;
11618
+ /**
11619
+ * Required on the root style.
11620
+ */
10575
11621
  hovered_level_band?: ElementImageSet;
11622
+ /**
11623
+ * Required on the root style.
11624
+ */
10576
11625
  hovered_level_font_color?: Color;
11626
+ /**
11627
+ * Required on the root style.
11628
+ */
10577
11629
  hovered_level_range_band?: ElementImageSet;
11630
+ /**
11631
+ * Required on the root style.
11632
+ */
10578
11633
  hovered_level_range_font_color?: Color;
11634
+ /**
11635
+ * Required on the root style.
11636
+ */
10579
11637
  ingredient_icon_overlap?: uint32;
11638
+ /**
11639
+ * Required on the root style.
11640
+ */
10580
11641
  ingredient_icon_size?: uint32;
11642
+ /**
11643
+ * Required on the root style.
11644
+ */
10581
11645
  ingredients_height?: uint32;
11646
+ /**
11647
+ * Required on the root style.
11648
+ */
10582
11649
  ingredients_padding?: uint32;
11650
+ /**
11651
+ * Required on the root style.
11652
+ */
10583
11653
  level_band?: ElementImageSet;
11654
+ /**
11655
+ * Required on the root style.
11656
+ */
10584
11657
  level_band_height?: uint32;
11658
+ /**
11659
+ * Required on the root style.
11660
+ */
10585
11661
  level_band_width?: uint32;
10586
11662
  /**
10587
11663
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11664
+ *
11665
+ * Required on the root style.
10588
11666
  */
10589
11667
  level_font?: string;
11668
+ /**
11669
+ * Required on the root style.
11670
+ */
10590
11671
  level_font_color?: Color;
11672
+ /**
11673
+ * Required on the root style.
11674
+ */
10591
11675
  level_offset_x?: int32;
11676
+ /**
11677
+ * Required on the root style.
11678
+ */
10592
11679
  level_offset_y?: int32;
11680
+ /**
11681
+ * Required on the root style.
11682
+ */
10593
11683
  level_range_band?: ElementImageSet;
10594
11684
  /**
10595
11685
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11686
+ *
11687
+ * Required on the root style.
10596
11688
  */
10597
11689
  level_range_font?: string;
11690
+ /**
11691
+ * Required on the root style.
11692
+ */
10598
11693
  level_range_font_color?: Color;
11694
+ /**
11695
+ * Required on the root style.
11696
+ */
10599
11697
  level_range_offset_x?: int32;
11698
+ /**
11699
+ * Required on the root style.
11700
+ */
10600
11701
  level_range_offset_y?: int32;
11702
+ /**
11703
+ * Required on the root style.
11704
+ */
10601
11705
  progress_bar?: ElementImageSet;
11706
+ /**
11707
+ * Required on the root style.
11708
+ */
10602
11709
  progress_bar_background?: ElementImageSet;
11710
+ /**
11711
+ * Required on the root style.
11712
+ */
10603
11713
  progress_bar_color?: Color;
11714
+ /**
11715
+ * Required on the root style.
11716
+ */
10604
11717
  progress_bar_height?: uint32;
11718
+ /**
11719
+ * Required on the root style.
11720
+ */
10605
11721
  progress_bar_shadow?: ElementImageSet;
10606
11722
  type: 'technology_slot_style';
10607
11723
  }
@@ -10673,7 +11789,7 @@ interface TechnologyUnit {
10673
11789
  */
10674
11790
  count_formula?: MathExpression;
10675
11791
  /**
10676
- * List of ingredients needed for one unit of research. The items must all be {@link ToolPrototypes | prototype:ToolPrototype}.
11792
+ * List of ingredients needed for one unit of research.
10677
11793
  */
10678
11794
  ingredients: ResearchIngredient[];
10679
11795
  /**
@@ -10699,24 +11815,71 @@ interface TerritorySettings {
10699
11815
  */
10700
11816
  units?: EntityID[];
10701
11817
  }
11818
+ /**
11819
+ * Root style: `"textbox"`
11820
+ */
10702
11821
  interface TextBoxStyleSpecification extends BaseStyleSpecification {
11822
+ /**
11823
+ * Required on the root style.
11824
+ */
10703
11825
  active_background?: ElementImageSet;
11826
+ /**
11827
+ * Required on the root style.
11828
+ */
10704
11829
  default_background?: ElementImageSet;
11830
+ /**
11831
+ * Required on the root style.
11832
+ */
10705
11833
  disabled_background?: ElementImageSet;
11834
+ /**
11835
+ * Required on the root style.
11836
+ */
10706
11837
  disabled_font_color?: Color;
10707
11838
  /**
10708
11839
  * Name of a {@link FontPrototype | prototype:FontPrototype}.
11840
+ *
11841
+ * Required on the root style.
10709
11842
  */
10710
11843
  font?: string;
11844
+ /**
11845
+ * Required on the root style.
11846
+ */
10711
11847
  font_color?: Color;
11848
+ /**
11849
+ * Required on the root style.
11850
+ */
10712
11851
  game_controller_hovered_background?: ElementImageSet;
11852
+ /**
11853
+ * Required on the root style.
11854
+ */
10713
11855
  rich_text_highlight_error_color?: Color;
11856
+ /**
11857
+ * Required on the root style.
11858
+ */
10714
11859
  rich_text_highlight_ok_color?: Color;
11860
+ /**
11861
+ * Required on the root style.
11862
+ */
10715
11863
  rich_text_highlight_warning_color?: Color;
11864
+ /**
11865
+ * Required on the root style.
11866
+ */
10716
11867
  rich_text_setting?: RichTextSetting;
11868
+ /**
11869
+ * Required on the root style.
11870
+ */
10717
11871
  selected_rich_text_highlight_error_color?: Color;
11872
+ /**
11873
+ * Required on the root style.
11874
+ */
10718
11875
  selected_rich_text_highlight_ok_color?: Color;
11876
+ /**
11877
+ * Required on the root style.
11878
+ */
10719
11879
  selected_rich_text_highlight_warning_color?: Color;
11880
+ /**
11881
+ * Required on the root style.
11882
+ */
10720
11883
  selection_background_color?: Color;
10721
11884
  type: 'textbox_style';
10722
11885
  }
@@ -10774,9 +11937,18 @@ interface TileBuildSound {
10774
11937
  */
10775
11938
  interface TileBuildabilityRule {
10776
11939
  area: SimpleBoundingBox;
10777
- colliding_tiles?: CollisionMaskConnector;
11940
+ colliding_tiles?: TileCollisionMaskConnector;
10778
11941
  remove_on_collision?: boolean;
10779
- required_tiles?: CollisionMaskConnector;
11942
+ required_tiles?: TileCollisionMaskConnector;
11943
+ }
11944
+ /**
11945
+ * 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}.
11946
+ */
11947
+ interface TileCollisionMaskConnector {
11948
+ /**
11949
+ * 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.
11950
+ */
11951
+ layers: Record<CollisionLayerID, true>;
10780
11952
  }
10781
11953
  /**
10782
11954
  * The name of an {@link TileEffectDefinition | prototype:TileEffectDefinition}.
@@ -11543,6 +12715,9 @@ KillTipTrigger;
11543
12715
  interface ToggleRailLayerTipTrigger extends CountBasedTipTrigger {
11544
12716
  type: 'toggle-rail-layer';
11545
12717
  }
12718
+ /**
12719
+ * Triggered when the player turns "alt-mode" on or off.
12720
+ */
11546
12721
  interface ToggleShowEntityInfoTipTrigger extends CountBasedTipTrigger {
11547
12722
  type: 'toggle-show-entity-info';
11548
12723
  }
@@ -11739,6 +12914,85 @@ interface TransportBeltConnectorFrame {
11739
12914
  frame_main_scanner_vertical_y_scale: float;
11740
12915
  frame_shadow: AnimationVariations;
11741
12916
  }
12917
+ interface TravelToSpacePlatformsModifier extends BoolModifier {
12918
+ type: 'unlock-travel-to-space-platforms';
12919
+ /**
12920
+ * If `false`, do not draw the small "constant" icon over the technology effect icon.
12921
+ */
12922
+ use_icon_overlay_constant?: boolean;
12923
+ }
12924
+ /**
12925
+ * {@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.
12926
+ */
12927
+ interface TreeGrowth {
12928
+ /**
12929
+ * Encodes the initial UV offset at a given pixel, used to sample {@link TreeGrowth::trunk_warp | prototype:TreeGrowth::trunk_warp}.
12930
+ *
12931
+ * The offset is calculated like in the following pseudocode:
12932
+ * ```
12933
+ * vec2 growthWarpLinear = vec2((growthWarp.r - 0.5) * 2 * pow(time, 2.546872), 0);
12934
+ * vec2 growthWarpQuadratic = (uv - vec2(0.3, 0.2)) * pow(growthWarp.g * pow(time, 4.06187), 2) * 1000;
12935
+ * vec2 growthWarpUVOffset = clamp(growthWarpLinear + growthWarpQuadratic + uv, 0, 1);
12936
+ * ```
12937
+ */
12938
+ growth_warp: Sprite;
12939
+ /**
12940
+ * Encodes the point in time (0-1) since the plant started growing, at which a given pixel of the *leaves* texture becomes visible.
12941
+ *
12942
+ * This is a grayscale texture where white is t=0 (beginning of growth) and black is t=1 (end of growth).
12943
+ */
12944
+ harvest_alpha: Sprite;
12945
+ /**
12946
+ * Encodes the UV offset at a given pixel, used to sample the leaves texture.
12947
+ *
12948
+ * The final UV is calculated like in the following pseudocode:
12949
+ * ```
12950
+ * vec2 harvestWarpLinear = (harvestWarp.rg - 0.5) * 2 * pow(time, 2.546872);
12951
+ * vec2 harvestUV = clamp(trunkUV + harvestWarpLinear, 0, 1);
12952
+ * ```
12953
+ *
12954
+ * See {@link TreeGrowth::trunk_warp | prototype:TreeGrowth::trunk_warp} for how `trunkUV` is calculated.
12955
+ */
12956
+ harvest_warp: Sprite;
12957
+ /**
12958
+ * Exponent for the easing function of the growth progress (progress ^ progressExponent) which is used by the growth animation.
12959
+ */
12960
+ progress_exponent: float;
12961
+ /**
12962
+ * Encodes the point in time (0-1) since the plant started growing, at which a given pixel of the *shadow* texture becomes visible.
12963
+ *
12964
+ * This is a grayscale texture where white is t=0 (beginning of growth) and black is t=1 (end of growth).
12965
+ */
12966
+ shadow_alpha: Sprite;
12967
+ /**
12968
+ * Encodes the UV offset at a given pixel, used to sample the shadow texture.
12969
+ *
12970
+ * The final UV is calculated like in the following pseudocode:
12971
+ * ```
12972
+ * vec2 shadowWarpLinear = (shadowWarp.rg - 0.5) * 2 * pow(time, 2.546872);
12973
+ * vec2 shadowUV = clamp(uv + shadowWarpLinear, 0, 1);
12974
+ * ```
12975
+ */
12976
+ shadow_warp: Sprite;
12977
+ /**
12978
+ * Encodes the point in time (0-1) since the plant started growing, at which a given pixel of the *trunk* texture becomes visible.
12979
+ *
12980
+ * This is a grayscale texture where white is t=0 (beginning of growth) and black is t=1 (end of growth).
12981
+ */
12982
+ trunk_alpha: Sprite;
12983
+ /**
12984
+ * Encodes the UV offset at a given pixel, used to sample the trunk texture, and {@link TreeGrowth::harvest_warp | prototype:TreeGrowth::harvest_warp}.
12985
+ *
12986
+ * The final UV is calculated like in the following pseudocode:
12987
+ * ```
12988
+ * vec2 trunkWarpLinear = (trunkWarp.rg - 0.5) * 2 * pow(time, 2.546872);
12989
+ * vec2 trunkUV = clamp(growthWarpUVOffset + trunkWarpLinear + growthWarpQuadratic, 0, 1);
12990
+ * ```
12991
+ *
12992
+ * See {@link TreeGrowth::growth_warp | prototype:TreeGrowth::growth_warp} for how `growthWarpQuadratic` and `growthWarpUVOffset` are calculated.
12993
+ */
12994
+ trunk_warp: Sprite;
12995
+ }
11742
12996
  /**
11743
12997
  * 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.
11744
12998
  */
@@ -11919,7 +13173,10 @@ DestroyDecorativesTriggerEffectItem | /**
11919
13173
  CameraEffectTriggerEffectItem | /**
11920
13174
  * Loaded when the `type` is `"activate-impact"`.
11921
13175
  */
11922
- ActivateImpactTriggerEffectItem) | (/**
13176
+ ActivateImpactTriggerEffectItem | /**
13177
+ * Loaded when the `type` is `"create-pollution"`.
13178
+ */
13179
+ CreatePollutionTriggerEffectItem) | (/**
11923
13180
  * Loaded when the `type` is `"damage"`.
11924
13181
  */
11925
13182
  DamageEntityTriggerEffectItem | /**
@@ -11988,7 +13245,10 @@ DestroyDecorativesTriggerEffectItem | /**
11988
13245
  CameraEffectTriggerEffectItem | /**
11989
13246
  * Loaded when the `type` is `"activate-impact"`.
11990
13247
  */
11991
- ActivateImpactTriggerEffectItem)[];
13248
+ ActivateImpactTriggerEffectItem | /**
13249
+ * Loaded when the `type` is `"create-pollution"`.
13250
+ */
13251
+ CreatePollutionTriggerEffectItem)[];
11992
13252
  /**
11993
13253
  * The abstract base of all {@link TriggerEffects | prototype:TriggerEffect}.
11994
13254
  */
@@ -12291,6 +13551,13 @@ type UnitSpawnDefinition = {
12291
13551
  EntityID,
12292
13552
  SpawnPoint[]
12293
13553
  ];
13554
+ interface UnlockLogisticNetworkModifier extends BoolModifier {
13555
+ type: 'unlock-logistic-network';
13556
+ /**
13557
+ * If `false`, do not draw the small "constant" icon over the technology effect icon.
13558
+ */
13559
+ use_icon_overlay_constant?: boolean;
13560
+ }
12294
13561
  interface UnlockQualityModifier extends BaseModifier {
12295
13562
  quality: QualityID;
12296
13563
  type: 'unlock-quality';
@@ -12322,6 +13589,9 @@ interface UnlockSpaceLocationModifier extends BaseModifier {
12322
13589
  */
12323
13590
  use_icon_overlay_constant?: boolean;
12324
13591
  }
13592
+ /**
13593
+ * Triggered when using E to confirm a GUI that allows to pick from a certain kind of prototype.
13594
+ */
12325
13595
  interface UseConfirmTipTrigger extends CountBasedTipTrigger {
12326
13596
  type: 'use-confirm';
12327
13597
  }
@@ -12443,6 +13713,8 @@ interface VariableAmbientSoundLayer {
12443
13713
  * Number of samples must be the same across all variants.
12444
13714
  *
12445
13715
  * Samples cannot have variable volume and all samples must have the same default volume.
13716
+ *
13717
+ * Samples are required to have sampling frequency of 44.1kHz. This is checked at runtime.
12446
13718
  */
12447
13719
  variants: Sound[];
12448
13720
  }
@@ -12632,7 +13904,7 @@ type VariableAmbientSoundStateType = 'regular' | /**
12632
13904
  'stop';
12633
13905
  interface VariableAmbientSoundVariableSound {
12634
13906
  /**
12635
- * Number of audio signal samples (default sampling frequency is 44.1kHz) defining a time grid. Music samples are aligned with this grid when queued.
13907
+ * Number of audio signal samples (sampling frequency is 44.1kHz) defining a time grid. Music samples are aligned with this grid when queued.
12636
13908
  */
12637
13909
  alignment_samples?: uint32;
12638
13910
  intermezzo?: Sound;
@@ -12708,10 +13980,19 @@ interface VehicleLogisticsModifier extends BoolModifier {
12708
13980
  use_icon_overlay_constant?: boolean;
12709
13981
  }
12710
13982
  type VerticalAlign = 'top' | 'center' | 'bottom';
13983
+ /**
13984
+ * Root style: `"vertical_flow"`
13985
+ */
12711
13986
  interface VerticalFlowStyleSpecification extends BaseStyleSpecification {
12712
13987
  type: 'vertical_flow_style';
13988
+ /**
13989
+ * Required on the root style.
13990
+ */
12713
13991
  vertical_spacing?: int32;
12714
13992
  }
13993
+ /**
13994
+ * Root style: `"vertical_scrollbar"`
13995
+ */
12715
13996
  interface VerticalScrollBarStyleSpecification extends ScrollBarStyleSpecification {
12716
13997
  type: 'vertical_scrollbar_style';
12717
13998
  }
@@ -12972,6 +14253,9 @@ interface WorkingVisualisation {
12972
14253
  frame_based_on_shift_animation_progress?: boolean;
12973
14254
  light?: LightDefinition;
12974
14255
  mining_drill_scorch_mark?: boolean;
14256
+ /**
14257
+ * Used by {@link MainSound::play_for_working_visualisations | prototype:MainSound::play_for_working_visualisations}, {@link SoundAccent::play_for_working_visualisation | prototype:SoundAccent::play_for_working_visualisation}, {@link FluidBox::enable_working_visualisations | prototype:FluidBox::enable_working_visualisations}, and {@link PipeConnectionDefinition::enable_working_visualisations | prototype:PipeConnectionDefinition::enable_working_visualisations}.
14258
+ */
12975
14259
  name?: string;
12976
14260
  north_animation?: Animation;
12977
14261
  /**
@@ -13062,7 +14346,7 @@ type WorldAmbientSoundDefinition = {
13062
14346
  sound?: Sound;
13063
14347
  } | Sound;
13064
14348
  /**
13065
- * 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.
14349
+ * 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.
13066
14350
  *
13067
14351
  * May not be {@link NaN | https://en.wikipedia.org/wiki/NaN}.
13068
14352
  * @example ```
@@ -13100,7 +14384,7 @@ type int32 = number;
13100
14384
  */
13101
14385
  type int8 = number;
13102
14386
  /**
13103
- * 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.
14387
+ * 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.
13104
14388
  *
13105
14389
  * 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.
13106
14390
  */