factorio-types 1.2.49 → 1.2.51

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.66
5
+ // Factorio version 2.0.69
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -1432,6 +1432,10 @@ interface AsteroidCollectorGraphicsSet {
1432
1432
  status_lamp_picture_full?: RotatedSprite;
1433
1433
  status_lamp_picture_off?: RotatedSprite;
1434
1434
  status_lamp_picture_on?: RotatedSprite;
1435
+ /**
1436
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
1437
+ */
1438
+ water_reflection?: WaterReflectionDefinition;
1435
1439
  }
1436
1440
  interface AsteroidGraphicsSet {
1437
1441
  ambient_light?: Color;
@@ -1447,6 +1451,10 @@ interface AsteroidGraphicsSet {
1447
1451
  sss_amount?: float;
1448
1452
  sss_contrast?: float;
1449
1453
  variations?: AsteroidVariation | AsteroidVariation[];
1454
+ /**
1455
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
1456
+ */
1457
+ water_reflection?: WaterReflectionDefinition;
1450
1458
  }
1451
1459
  interface AsteroidSettings {
1452
1460
  max_ray_portals_expanded_per_tick: uint32;
@@ -1838,6 +1846,10 @@ interface BeaconGraphicsSet {
1838
1846
  random_animation_offset?: boolean;
1839
1847
  reset_animation_when_frozen?: boolean;
1840
1848
  top_layer?: RenderLayer;
1849
+ /**
1850
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
1851
+ */
1852
+ water_reflection?: WaterReflectionDefinition;
1841
1853
  }
1842
1854
  interface BeaconModuleVisualization {
1843
1855
  /**
@@ -1932,6 +1944,10 @@ interface BeamGraphicsSet {
1932
1944
  random_end_animation_rotation?: boolean;
1933
1945
  randomize_animation_per_segment?: boolean;
1934
1946
  transparent_start_end_animations?: boolean;
1947
+ /**
1948
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
1949
+ */
1950
+ water_reflection?: WaterReflectionDefinition;
1935
1951
  }
1936
1952
  interface BeamTriggerDelivery extends TriggerDeliveryItem {
1937
1953
  add_to_shooter?: boolean;
@@ -2223,6 +2239,10 @@ interface CargoBayConnectableGraphicsSet {
2223
2239
  animation_render_layer?: RenderLayer;
2224
2240
  connections?: CargoBayConnections;
2225
2241
  picture?: LayeredSprite;
2242
+ /**
2243
+ * Only loaded if this graphics set is used in a property called `graphics_set`, refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
2244
+ */
2245
+ water_reflection?: WaterReflectionDefinition;
2226
2246
  }
2227
2247
  /**
2228
2248
  * Walls should have an even number of variations because they are interleaved.
@@ -2516,6 +2536,10 @@ interface ChartUtilityConstants {
2516
2536
  green_wire_color: Color;
2517
2537
  rail_color: Color;
2518
2538
  rail_ramp_color: Color;
2539
+ /**
2540
+ * Must be larger than 0. This number is multiplied by the crafting machine's {@link radius | runtime:LuaEntityPrototype::radius} to get the final recipe icon scale for the chart.
2541
+ */
2542
+ recipe_icon_scale: float;
2519
2543
  red_signal_color: Color;
2520
2544
  red_wire_color: Color;
2521
2545
  resource_outline_selection_color: Color;
@@ -2544,6 +2568,11 @@ interface CheckBoxStyleSpecification extends StyleWithClickableGraphicalSetSpeci
2544
2568
  text_padding?: uint32;
2545
2569
  type: 'checkbox_style';
2546
2570
  }
2571
+ interface CircuitConditionConnector {
2572
+ comparator?: ComparatorString;
2573
+ first?: SignalIDConnector;
2574
+ second?: SignalIDConnector | int32;
2575
+ }
2547
2576
  /**
2548
2577
  * Definition of a circuit connector.
2549
2578
  */
@@ -3177,6 +3206,10 @@ interface CraftingMachineGraphicsSet extends WorkingVisualisations {
3177
3206
  circuit_connector_secondary_draw_order?: int8 | CircuitConnectorSecondaryDrawOrder;
3178
3207
  frozen_patch?: Sprite4Way;
3179
3208
  reset_animation_when_frozen?: boolean;
3209
+ /**
3210
+ * Only loaded if this graphics set is used in a property called `graphics_set`, refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
3211
+ */
3212
+ water_reflection?: WaterReflectionDefinition;
3180
3213
  }
3181
3214
  interface CranePart {
3182
3215
  allow_sprite_rotation?: boolean;
@@ -4200,6 +4233,10 @@ interface EnemySpawnerGraphicsSet {
4200
4233
  underwater_animations?: AnimationVariations;
4201
4234
  underwater_layer_offset?: int8;
4202
4235
  water_effect_map_animations?: AnimationVariations;
4236
+ /**
4237
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
4238
+ */
4239
+ water_reflection?: WaterReflectionDefinition;
4203
4240
  }
4204
4241
  /**
4205
4242
  * Specifies an amount of electric energy in joules, or electric energy per time in watts.
@@ -4644,7 +4681,7 @@ interface FluidBoxSecondaryDrawOrders {
4644
4681
  }
4645
4682
  interface FluidEnergySource extends BaseEnergySource {
4646
4683
  /**
4647
- * If set to `true`, the energy source will calculate power based on the fluid's `fuel_value`, else it will calculate based on fluid temperature.
4684
+ * If set to `true`, the available power output is based on the {@link FluidPrototype::fuel_value | prototype:FluidPrototype::fuel_value}. Otherwise, the available power output will be based on the fluid temperature and {@link FluidPrototype::heat_capacity | prototype:FluidPrototype::heat_capacity}: `energy = fluid_amount * (fluid_temperature - fluid_default_temperature) * fluid_heat_capacity * effectivity`
4648
4685
  */
4649
4686
  burns_fluid?: boolean;
4650
4687
  /**
@@ -4980,6 +5017,10 @@ interface FusionGeneratorGraphicsSet {
4980
5017
  north_graphics_set: FusionGeneratorDirectionGraphicsSet;
4981
5018
  render_layer?: RenderLayer;
4982
5019
  south_graphics_set: FusionGeneratorDirectionGraphicsSet;
5020
+ /**
5021
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
5022
+ */
5023
+ water_reflection?: WaterReflectionDefinition;
4983
5024
  west_graphics_set: FusionGeneratorDirectionGraphicsSet;
4984
5025
  }
4985
5026
  interface FusionReactorConnectionGraphics {
@@ -5000,6 +5041,10 @@ interface FusionReactorGraphicsSet {
5000
5041
  render_layer?: RenderLayer;
5001
5042
  structure?: Sprite4Way;
5002
5043
  use_fuel_glow_color?: boolean;
5044
+ /**
5045
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
5046
+ */
5047
+ water_reflection?: WaterReflectionDefinition;
5003
5048
  working_light_pictures?: Sprite4Way;
5004
5049
  }
5005
5050
  interface GameControllerVibrationData {
@@ -5309,7 +5354,7 @@ icons =
5309
5354
  */
5310
5355
  interface IconData {
5311
5356
  /**
5312
- * Outline is drawn using signed distance field generated on load. One icon image, will have only one SDF generated. But if the image is used in multiple icon with different scales, outline width won't match the desired width in all the scales but the largest one.
5357
+ * Outline is drawn using signed distance field generated on load. One icon image will have only one SDF generated. That means if the image is used in multiple icons with different scales, the outline width won't match the desired width in all the scales except the largest one.
5313
5358
  */
5314
5359
  draw_background?: boolean;
5315
5360
  /**
@@ -5358,7 +5403,7 @@ interface IconDrawSpecification {
5358
5403
  /**
5359
5404
  * Render layer of the icon.
5360
5405
  */
5361
- renderLayer?: 'entity-info-icon-below' | 'entity-info-icon-above' | 'air-entity-info-icon';
5406
+ render_layer?: 'entity-info-icon' | 'entity-info-icon-above' | 'air-entity-info-icon';
5362
5407
  scale?: float;
5363
5408
  /**
5364
5409
  * Scale of the icon when there are many items.
@@ -5883,6 +5928,10 @@ interface LightningGraphicsSet {
5883
5928
  * If not empty, enables the lightning shader.
5884
5929
  */
5885
5930
  shader_configuration?: LightningShaderConfiguration[];
5931
+ /**
5932
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
5933
+ */
5934
+ water_reflection?: WaterReflectionDefinition;
5886
5935
  }
5887
5936
  interface LightningPriorityRule extends LightningRuleBaseBase {
5888
5937
  priority_bonus: int32;
@@ -6514,6 +6563,10 @@ interface MiningDrillGraphicsSet extends WorkingVisualisations {
6514
6563
  drilling_vertical_movement_duration?: uint16;
6515
6564
  frozen_patch?: Sprite4Way;
6516
6565
  reset_animation_when_frozen?: boolean;
6566
+ /**
6567
+ * Only loaded if this graphics set is used in a property called `graphics_set`, refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
6568
+ */
6569
+ water_reflection?: WaterReflectionDefinition;
6517
6570
  }
6518
6571
  interface MiningDrillProductivityBonusModifier extends SimpleModifier {
6519
6572
  /**
@@ -6793,7 +6846,7 @@ interface NestedTriggerEffectItem extends TriggerEffectItem {
6793
6846
  *
6794
6847
  * - `+x`, `-x`, `~x`: Unary plus and minus and unary bitwise not
6795
6848
  *
6796
- * - `x*y`, `x/y`, `x%y`, `x%%y`: Multiplication and division, modulo and remainder.
6849
+ * - `x*y`, `x/y`, `x%y`, `x%%y`: Multiplication and division, modulo and remainder
6797
6850
  *
6798
6851
  * - `x+y`, `x-y`: Addition and subtraction
6799
6852
  *
@@ -6812,6 +6865,8 @@ interface NestedTriggerEffectItem extends TriggerEffectItem {
6812
6865
  * The boolean operators (less than, less than or equal, equal, not equal, greater than, greater than or equal) take two numbers and return 0 for false or 1 for true.
6813
6866
  *
6814
6867
  * The bitwise operators convert single-precision floating-point numbers to signed 32-bit integers before computing the result.
6868
+ *
6869
+ * Exponentiation and the unary operators are right-to-left associative. The rest of the operators are left-to-right associative.
6815
6870
  * @example ```
6816
6871
  "distance_from_nearest_point{x = x, y = y, points = starting_positions}"
6817
6872
  ```
@@ -6844,6 +6899,9 @@ interface NoiseFunction {
6844
6899
  */
6845
6900
  parameters: string[];
6846
6901
  }
6902
+ /**
6903
+ * Modifier that does nothing. Can be used to show custom scripted effects in the technology GUI.
6904
+ */
6847
6905
  interface NothingModifier extends BaseModifier {
6848
6906
  effect_description?: LocalisedString;
6849
6907
  type: 'nothing';
@@ -6875,6 +6933,10 @@ interface OffshorePumpGraphicsSet {
6875
6933
  * Drawn by tile renderer when water animation is enabled.
6876
6934
  */
6877
6935
  underwater_pictures?: Sprite4Way;
6936
+ /**
6937
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
6938
+ */
6939
+ water_reflection?: WaterReflectionDefinition;
6878
6940
  }
6879
6941
  interface OrTipTrigger {
6880
6942
  /**
@@ -7130,9 +7192,9 @@ type PersistentWorldAmbientSoundsDefinitionCrossfade = Fade & {
7130
7192
  };
7131
7193
  interface PipeConnectionDefinition {
7132
7194
  /**
7133
- * Connection category bitmask makes it possible to define different categories of pipe connections that are not able to connect with each other. For example if a mod should have a "steam pipes" and "cryogenic pipes" category and they should not connect with each other.
7195
+ * 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.
7134
7196
  *
7135
- * In case of a normal connection, a bitmask may contain multiple bits set. This allows to create a mod where pipes of different categories would not connect to each other while still making it possible for crafting machines and other entities to connect to any of the specified pipes.
7197
+ * In case of a normal connection, a pipe connection can be in multiple connection categories. This allows to create a mod where pipes of different categories would not connect to each other while still making it possible for crafting machines and other entities to connect to any of the specified pipes.
7136
7198
  *
7137
7199
  * By default, all pipe connections have the `"default"` category. So a pipe that should connect to a new category and standard pipes can have the `connection_category = {"my-new-pipe", "default"}`.
7138
7200
  *
@@ -7712,12 +7774,12 @@ interface ProcessionGraphic {
7712
7774
  */
7713
7775
  type ProcessionGraphicCatalogue = ProcessionGraphicCatalogueItem[];
7714
7776
  /**
7715
- * Either picture or animation must be provided.
7777
+ * Either animation or sprite must be provided.
7716
7778
  */
7717
7779
  interface ProcessionGraphicCatalogueItem {
7718
7780
  animation?: Animation;
7719
7781
  index: uint32;
7720
- picture?: Sprite;
7782
+ sprite?: Sprite;
7721
7783
  }
7722
7784
  /**
7723
7785
  * Types of {@link ProcessionGraphic | prototype:ProcessionGraphic}.
@@ -7844,10 +7906,7 @@ type ProductPrototype = /**
7844
7906
  ItemProductPrototype | /**
7845
7907
  * Loaded when the `type` is `"fluid"`.
7846
7908
  */
7847
- FluidProductPrototype | /**
7848
- * Loaded when the `type` is `"research-progress"`.
7849
- */
7850
- ResearchProgressProductPrototype;
7909
+ FluidProductPrototype;
7851
7910
  interface ProductionHealthEffect {
7852
7911
  not_producing?: float;
7853
7912
  producing?: float;
@@ -8258,6 +8317,10 @@ interface RailSupportGraphicsSet {
8258
8317
  structure: RotatedSprite;
8259
8318
  underwater_layer_offset?: int8;
8260
8319
  underwater_structure?: RotatedSprite;
8320
+ /**
8321
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
8322
+ */
8323
+ water_reflection?: WaterReflectionDefinition;
8261
8324
  }
8262
8325
  interface RailSupportOnDeepOilOceanModifier extends BoolModifier {
8263
8326
  type: 'rail-support-on-deep-oil-ocean';
@@ -8349,14 +8412,6 @@ type ResearchIngredient = [
8349
8412
  ItemID,
8350
8413
  uint16
8351
8414
  ];
8352
- /**
8353
- * A research progress product definition.
8354
- */
8355
- interface ResearchProgressProductPrototype {
8356
- amount?: double;
8357
- research_item: ItemID;
8358
- type: 'research-progress';
8359
- }
8360
8415
  interface ResearchTechnologyTipTrigger {
8361
8416
  technology: TechnologyID;
8362
8417
  type: 'research';
@@ -8658,6 +8713,29 @@ interface ScriptTriggerEffectItem extends TriggerEffectItem {
8658
8713
  effect_id: string;
8659
8714
  type: 'script';
8660
8715
  }
8716
+ /**
8717
+ * Triggered only by calling {@link LuaForce::script_trigger_research | runtime:LuaForce::script_trigger_research}. Can be used to show custom scripted triggers in the technology GUI.
8718
+ */
8719
+ interface ScriptedTechnologyTrigger {
8720
+ /**
8721
+ * Path to the icon file.
8722
+ *
8723
+ * Only loaded if `icons` is not defined.
8724
+ */
8725
+ icon?: FileName;
8726
+ /**
8727
+ * The size of the square icon, in pixels. E.g. `32` for a 32px by 32px icon. Must be larger than `0`.
8728
+ *
8729
+ * Only loaded if `icons` is not defined.
8730
+ */
8731
+ icon_size?: SpriteSizeType;
8732
+ /**
8733
+ * Can't be an empty array.
8734
+ */
8735
+ icons?: IconData[];
8736
+ trigger_description?: LocalisedString;
8737
+ type: 'scripted';
8738
+ }
8661
8739
  interface ScrollBarStyleSpecification extends BaseStyleSpecification {
8662
8740
  background_graphical_set?: ElementImageSet;
8663
8741
  thumb_button_style?: ButtonStyleSpecification;
@@ -9481,6 +9559,10 @@ interface SpiderLegGraphicsSet {
9481
9559
  upper_part?: SpiderLegPart;
9482
9560
  upper_part_shadow?: SpiderLegPart;
9483
9561
  upper_part_water_reflection?: SpiderLegPart;
9562
+ /**
9563
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
9564
+ */
9565
+ water_reflection?: WaterReflectionDefinition;
9484
9566
  }
9485
9567
  interface SpiderLegPart {
9486
9568
  bottom_end?: RotatedSprite;
@@ -9554,6 +9636,10 @@ interface SpiderTorsoGraphicsSet {
9554
9636
  render_layer?: RenderLayer;
9555
9637
  shadow_animation?: RotatedAnimation;
9556
9638
  shadow_base_animation?: RotatedAnimation;
9639
+ /**
9640
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
9641
+ */
9642
+ water_reflection?: WaterReflectionDefinition;
9557
9643
  }
9558
9644
  /**
9559
9645
  * Used to specify the graphics for {@link SpiderVehiclePrototype | prototype:SpiderVehiclePrototype}.
@@ -10118,7 +10204,7 @@ interface StatelessVisualisation {
10118
10204
  /**
10119
10205
  * One of `nested_visualisations`, `animation` and `light` needs to be defined.
10120
10206
  */
10121
- nested_visualisations?: StatelessVisualisations;
10207
+ nested_visualisations?: StatelessVisualisation | StatelessVisualisation[];
10122
10208
  offset_x?: RangedValue;
10123
10209
  offset_y?: RangedValue;
10124
10210
  offset_z?: RangedValue;
@@ -10145,7 +10231,6 @@ interface StatelessVisualisation {
10145
10231
  speed_z?: RangedValue;
10146
10232
  spread_progress_duration?: float;
10147
10233
  }
10148
- type StatelessVisualisations = StatelessVisualisation | StatelessVisualisation[];
10149
10234
  interface StatusColors {
10150
10235
  disabled?: Color;
10151
10236
  full_output?: Color;
@@ -10527,7 +10612,10 @@ CaptureSpawnerTechnologyTrigger | /**
10527
10612
  BuildEntityTechnologyTrigger | /**
10528
10613
  * Loaded when the `type` is `"create-space-platform"`.
10529
10614
  */
10530
- CreateSpacePlatformTechnologyTrigger;
10615
+ CreateSpacePlatformTechnologyTrigger | /**
10616
+ * Loaded when the `type` is `"scripted"`.
10617
+ */
10618
+ ScriptedTechnologyTrigger;
10531
10619
  /**
10532
10620
  * Either `count` or `count_formula` must be defined, never both.
10533
10621
  * @example ```
@@ -10631,6 +10719,10 @@ interface ThrusterGraphicsSet extends WorkingVisualisations {
10631
10719
  flame_effect_width?: float;
10632
10720
  flame_half_height?: float;
10633
10721
  flame_position?: Vector;
10722
+ /**
10723
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
10724
+ */
10725
+ water_reflection?: WaterReflectionDefinition;
10634
10726
  }
10635
10727
  type ThrusterPerformancePoint = {
10636
10728
  effectivity: double;
@@ -11478,6 +11570,7 @@ interface TrainVisualizationConstants {
11478
11570
  final_margin: float;
11479
11571
  joint_distance: float;
11480
11572
  last_box_color: Color;
11573
+ last_reverse_box_color: Color;
11481
11574
  not_last_box_color: Color;
11482
11575
  reverse_box_color: Color;
11483
11576
  stock_number_scale: float;
@@ -11991,6 +12084,10 @@ interface TurretBaseVisualisation {
11991
12084
  }
11992
12085
  interface TurretGraphicsSet {
11993
12086
  base_visualisation?: TurretBaseVisualisation | TurretBaseVisualisation[];
12087
+ /**
12088
+ * Refer to {@link EntityPrototype::water_reflection | prototype:EntityPrototype::water_reflection}.
12089
+ */
12090
+ water_reflection?: WaterReflectionDefinition;
11994
12091
  }
11995
12092
  interface TurretSpecialEffect {
11996
12093
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.49",
3
+ "version": "1.2.51",
4
4
  "description": "Typescript declarations for the Factorio mod API",
5
5
  "main": "index.d.ts",
6
6
  "repository": "https://github.com/sguest/factorio-types.git",
@@ -23,7 +23,7 @@
23
23
  "src/**/*.d.ts",
24
24
  "dist/**/*.d.ts"
25
25
  ],
26
- "factorioVersion": "2.0.66",
26
+ "factorioVersion": "2.0.69",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },