factorio-types 1.2.67 → 1.2.69

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.1.17
5
+ // Factorio version 2.1.20
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -3782,7 +3782,7 @@ color_lookup = {{1, "identity"}}
3782
3782
  color_lookup = {{0.5, "__core__/graphics/color_luts/nightvision.png"}}
3783
3783
  ```
3784
3784
  * @example ```
3785
- zoom_to_world_daytime_color_lookup =
3785
+ daytime_color_lookup =
3786
3786
  {
3787
3787
  {0.25, "identity"},
3788
3788
  {0.45, "__core__/graphics/color_luts/night.png"},
@@ -3948,23 +3948,23 @@ interface EditorUtilityConstants {
3948
3948
  */
3949
3949
  interface Effect {
3950
3950
  /**
3951
- * Multiplier to energy used during operation (not idle/drain use). The minimum possible sum is -80%.
3951
+ * Multiplier to energy used during operation (not idle/drain use). The minimum possible sum defaults to -80% and can be changed through {@link EffectReceiver::consumption_limits | prototype:EffectReceiver::consumption_limits} on the machine.
3952
3952
  */
3953
3953
  consumption?: EffectValue;
3954
3954
  /**
3955
- * Multiplier to the pollution factor of an entity's pollution during use. The minimum possible sum is -80%.
3955
+ * Multiplier to the pollution factor of an entity's pollution during use. The minimum possible sum defaults to -80% and can be changed through {@link EffectReceiver::pollution_limits | prototype:EffectReceiver::pollution_limits} on the machine.
3956
3956
  */
3957
3957
  pollution?: EffectValue;
3958
3958
  /**
3959
- * Multiplied against work completed, adds to the bonus results of operating. E.g. an extra crafted recipe or immediate research bonus. The minimum possible sum is 0%.
3959
+ * Multiplied against work completed, adds to the bonus results of operating. E.g. an extra crafted recipe or immediate research bonus. The minimum possible sum defaults to -80% and can be changed through {@link EffectReceiver::productivity_limits | prototype:EffectReceiver::productivity_limits} on the machine.
3960
3960
  */
3961
3961
  productivity?: EffectValue;
3962
3962
  /**
3963
- * Adds a bonus chance to increase a product's quality. The minimum possible sum is 0%.
3963
+ * Adds a bonus chance to increase a product's quality. The minimum possible sum defaults to 0% and can be changed through {@link EffectReceiver::quality_limits | prototype:EffectReceiver::quality_limits} on the machine. If negative values are allowed on the effect receiver, the product's quality can be {@link decreased | prototype:QualityPrototype::previous_probability}.
3964
3964
  */
3965
3965
  quality?: EffectValue;
3966
3966
  /**
3967
- * Modifier to crafting speed, research speed, etc. The minimum possible sum is -80%.
3967
+ * Modifier to crafting speed, research speed, etc. The minimum possible sum defaults to -80% and can be changed through {@link EffectReceiver::speed_limits | prototype:EffectReceiver::speed_limits} on the machine.
3968
3968
  */
3969
3969
  speed?: EffectValue;
3970
3970
  }
@@ -8280,7 +8280,6 @@ interface PollutionSettings {
8280
8280
  * Anything bigger than this is visualized as this value.
8281
8281
  */
8282
8282
  expected_max_per_chunk: double;
8283
- max_pollution_to_restore_trees: double;
8284
8283
  min_pollution_to_damage_trees: double;
8285
8284
  /**
8286
8285
  * This much pollution units must be on the chunk to start diffusing.
@@ -9788,6 +9787,16 @@ interface Settings {
9788
9787
  */
9789
9788
  startup: Record<string, ModSetting>;
9790
9789
  }
9790
+ /**
9791
+ * @example ```
9792
+ -- What a recipe's results would look like for a probability of 0.3 to return iron and 0.7 to return copper
9793
+ -- but always exactly 1 item, never no item or both items
9794
+ {
9795
+ {type = "item", name = "iron-plate", amount = 1, shared_probability = {min = 0, max = 0.3}},
9796
+ {type = "item", name = "copper-plate", amount = 1, shared_probability = {min = 0.3, max = 1}},
9797
+ }
9798
+ ```
9799
+ */
9791
9800
  interface SharedProbabilityDefinition {
9792
9801
  /**
9793
9802
  * Upper end of the range of shared roll values that will allow product to be given. Must be >= `min` and <= `1`.
@@ -14043,23 +14052,49 @@ interface WaterReflectionDefinition {
14043
14052
  rotate?: boolean;
14044
14053
  }
14045
14054
  interface WaterTileEffectParameters {
14055
+ /**
14056
+ * Affects animation scale for `"water"` `shader_variation`. Affects warp effect intensity for `"lava"` `shader_variation`. Affects depth contrast for `"wetland-water"` `shader_variation`. Affects thin film effect intensity for `"oil"` `shader_variation`.
14057
+ */
14046
14058
  animation_scale: float | [
14047
14059
  float,
14048
14060
  float
14049
14061
  ];
14062
+ /**
14063
+ * Affects distortion speed for `"water"` `shader_variation`. Affects panning/warping speed for all other `shader_variation`s.
14064
+ */
14050
14065
  animation_speed: float;
14066
+ /**
14067
+ * Affects dark threshold for `"water"` `shader_variation`. Affects brightness of the shoreline lava for `"lava"` `shader_variation`. Affects water depth for `"wetland-water"` `shader_variation`. Affects thin film effect noise scale for `"oil"` `shader_variation`.
14068
+ */
14051
14069
  dark_threshold: float | [
14052
14070
  float,
14053
14071
  float
14054
14072
  ];
14073
+ /**
14074
+ * If they are set to a tuple, the properties `animation_scale`, `dark_threshold`, `reflection_threshold` and `specular_threshold` are linearly interpolated between each of their two values based on the current zoom level expressed as a ratio between `near_zoom` and `far_zoom`. E.g. if current zoom level is equal to `far_zoom`, the second tuple value is picked.
14075
+ */
14055
14076
  far_zoom?: float;
14077
+ /**
14078
+ * Affects foam color for `"water"` `shader_variation`. Affects panning/warping vector for all other `shader_variation`s.
14079
+ *
14080
+ * Any alpha value set here is ignored and will always be `1` in the shader.
14081
+ */
14056
14082
  foam_color: Color;
14083
+ /**
14084
+ * Multiplies the rgb values of `foam_color` before they are passed to the shader.
14085
+ */
14057
14086
  foam_color_multiplier: float;
14058
14087
  /**
14059
14088
  * Value 0 makes water appear as water in water mask, but does not occlude lights, and doesn't overwrite lightmap alpha drawn to pixel previously (by background layer of tile transition, or underwater sprite). Light emitted by water-like-tile (for example lava) will blend additively with previously rendered light. Value 1 makes water occlude lights, but won't be recognized as water in water mask used for masking decals by water.
14060
14089
  */
14061
14090
  lightmap_alpha?: float;
14091
+ /**
14092
+ * If they are set to a tuple, the properties `animation_scale`, `dark_threshold`, `reflection_threshold` and `specular_threshold` are linearly interpolated between each of their two values based on the current zoom level expressed as a ratio between `near_zoom` and `far_zoom`. E.g. if current zoom level is equal to `near_zoom`, the first tuple value is picked.
14093
+ */
14062
14094
  near_zoom?: float;
14095
+ /**
14096
+ * Affects reflection threshold for `"water"` `shader_variation`. Affects distortion scale for `"lava"` `shader_variation`. Affects distortion tiling for `"wetland-water"` `shader_variation`. Affects distortion map scale for `"oil"` `shader_variation`.
14097
+ */
14063
14098
  reflection_threshold: float | [
14064
14099
  float,
14065
14100
  float
@@ -14067,7 +14102,15 @@ interface WaterTileEffectParameters {
14067
14102
  secondary_texture_variations_columns?: uint8;
14068
14103
  secondary_texture_variations_rows?: uint8;
14069
14104
  shader_variation?: EffectVariation;
14105
+ /**
14106
+ * Affects specular lightness for `"water"` `shader_variation`. Affects panning/warping vector for all other `shader_variation`s.
14107
+ *
14108
+ * Any alpha value set here is ignored and will always be `1` in the shader.
14109
+ */
14070
14110
  specular_lightness: Color;
14111
+ /**
14112
+ * Affects specular threshold for `"water"` and `"wetland-water"` `shader_variation`s. Affects shoreline lava for `"lava"` `shader_variation`. Affects nothing for `"oil"` `shader_variation`.
14113
+ */
14071
14114
  specular_threshold: float | [
14072
14115
  float,
14073
14116
  float
@@ -14078,6 +14121,9 @@ interface WaterTileEffectParameters {
14078
14121
  * Texture size must be 512x512. Shader variant `"water"` must have 1 texture, `"lava"` and `"wetland-water"` must have 2 textures and `"oil"` must have 4 textures.
14079
14122
  */
14080
14123
  textures: EffectTexture[];
14124
+ /**
14125
+ * Affects distortion speed for `"water"` `shader_variation`. Affects panning/warping speed for all other `shader_variation`s.
14126
+ */
14081
14127
  tick_scale: float;
14082
14128
  }
14083
14129
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.67",
3
+ "version": "1.2.69",
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.1.17",
26
+ "factorioVersion": "2.1.20",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },
package/src/core.d.ts CHANGED
@@ -79,7 +79,3 @@ type bool = boolean;
79
79
  * ```
80
80
  */
81
81
  type DataExtendMethod = (data: prototype.Data, ...otherData: any[]) => void;
82
-
83
- // used by UndoRedoEquipment but not declared anywhere
84
- // Can be removed if/when this is resolved https://forums.factorio.com/viewtopic.php?t=135506
85
- type PropertyTree = any;