factorio-types 1.2.70 → 1.2.72
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/classes.d.ts +99 -15
- package/dist/concepts.d.ts +18 -17
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +342 -332
- package/dist/events.d.ts +218 -5
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +67 -6
- package/dist/types.d.ts +90 -26
- package/package.json +2 -2
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.
|
|
5
|
+
// Factorio version 2.1.23
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -2199,6 +2199,65 @@ interface BuildEntityTipTrigger extends CountBasedTipTrigger {
|
|
|
2199
2199
|
type: 'build-entity';
|
|
2200
2200
|
}
|
|
2201
2201
|
type BuildMode = 'normal' | 'forced' | 'superforced';
|
|
2202
|
+
interface BuildPreviewTintSet {
|
|
2203
|
+
/**
|
|
2204
|
+
* Mandatory in {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2205
|
+
*
|
|
2206
|
+
* Defaults to the value from {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints} when used in {@link BlueprintItemPrototype::build_preview_tints | prototype:BlueprintItemPrototype::build_preview_tints}.
|
|
2207
|
+
*/
|
|
2208
|
+
buildable?: Color;
|
|
2209
|
+
/**
|
|
2210
|
+
* Used when the player is too far away to build manually.
|
|
2211
|
+
*
|
|
2212
|
+
* Defaults to the value from {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints} when used in {@link BlueprintItemPrototype::build_preview_tints | prototype:BlueprintItemPrototype::build_preview_tints}.
|
|
2213
|
+
*/
|
|
2214
|
+
buildable_too_far?: Color;
|
|
2215
|
+
/**
|
|
2216
|
+
* Mandatory in {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2217
|
+
*
|
|
2218
|
+
* Defaults to the value from {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints} when used in {@link BlueprintItemPrototype::build_preview_tints | prototype:BlueprintItemPrototype::build_preview_tints}.
|
|
2219
|
+
*/
|
|
2220
|
+
ignorable?: Color;
|
|
2221
|
+
/**
|
|
2222
|
+
* Mandatory in {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2223
|
+
*
|
|
2224
|
+
* Defaults to the value from {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints} when used in {@link BlueprintItemPrototype::build_preview_tints | prototype:BlueprintItemPrototype::build_preview_tints}.
|
|
2225
|
+
*/
|
|
2226
|
+
not_buildable?: Color;
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* Tints of the cursor building preview, based on whether the preview can be built.
|
|
2230
|
+
*/
|
|
2231
|
+
interface BuildPreviewTints {
|
|
2232
|
+
/**
|
|
2233
|
+
* Mandatory in {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2234
|
+
*
|
|
2235
|
+
* When used in {@link BlueprintItemPrototype::build_preview_tints | prototype:BlueprintItemPrototype::build_preview_tints}, the properties that are not given default to the value from {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2236
|
+
*/
|
|
2237
|
+
entity?: BuildPreviewTintSet;
|
|
2238
|
+
/**
|
|
2239
|
+
* Colors of blueprint entities when previewed in the map view.
|
|
2240
|
+
*
|
|
2241
|
+
* Mandatory in {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2242
|
+
*
|
|
2243
|
+
* When used in {@link BlueprintItemPrototype::build_preview_tints | prototype:BlueprintItemPrototype::build_preview_tints}, the properties that are not given default to the value from {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2244
|
+
*/
|
|
2245
|
+
entity_chart?: BuildPreviewTintSet;
|
|
2246
|
+
/**
|
|
2247
|
+
* Mandatory in {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2248
|
+
*
|
|
2249
|
+
* When used in {@link BlueprintItemPrototype::build_preview_tints | prototype:BlueprintItemPrototype::build_preview_tints}, the properties that are not given default to the value from {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2250
|
+
*/
|
|
2251
|
+
tile?: BuildPreviewTintSet;
|
|
2252
|
+
/**
|
|
2253
|
+
* Colors of blueprint tiles when previewed in the map view.
|
|
2254
|
+
*
|
|
2255
|
+
* Mandatory in {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2256
|
+
*
|
|
2257
|
+
* When used in {@link BlueprintItemPrototype::build_preview_tints | prototype:BlueprintItemPrototype::build_preview_tints}, the properties that are not given default to the value from {@link UtilityConstants::build_preview_tints | prototype:UtilityConstants::build_preview_tints}.
|
|
2258
|
+
*/
|
|
2259
|
+
tile_chart?: BuildPreviewTintSet;
|
|
2260
|
+
}
|
|
2202
2261
|
interface BulkInserterCapacityBonusModifier extends SimpleModifier {
|
|
2203
2262
|
/**
|
|
2204
2263
|
* If set to `false`, use the icon from {@link UtilitySprites | prototype:UtilitySprites} for this technology effect icon.
|
|
@@ -3968,6 +4027,12 @@ interface Effect {
|
|
|
3968
4027
|
*/
|
|
3969
4028
|
speed?: EffectValue;
|
|
3970
4029
|
}
|
|
4030
|
+
interface EffectArrayTexture {
|
|
4031
|
+
/**
|
|
4032
|
+
* The path to the sprite file to use.
|
|
4033
|
+
*/
|
|
4034
|
+
filename: FileName;
|
|
4035
|
+
}
|
|
3971
4036
|
interface EffectReceiver {
|
|
3972
4037
|
base_effect?: Effect;
|
|
3973
4038
|
/**
|
|
@@ -4640,7 +4705,7 @@ interface EntityRendererSearchBoxLimits {
|
|
|
4640
4705
|
*/
|
|
4641
4706
|
top: uint8;
|
|
4642
4707
|
}
|
|
4643
|
-
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';
|
|
4708
|
+
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' | 'input-fluid-too-cold' | 'input-fluid-too-hot' | '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';
|
|
4644
4709
|
/**
|
|
4645
4710
|
* 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.
|
|
4646
4711
|
*/
|
|
@@ -4833,20 +4898,6 @@ interface FluidBox {
|
|
|
4833
4898
|
* 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.
|
|
4834
4899
|
*/
|
|
4835
4900
|
max_pipeline_extent?: uint32;
|
|
4836
|
-
/**
|
|
4837
|
-
* The maximum temperature allowed into the fluidbox. Only applied if a `filter` is specified.
|
|
4838
|
-
* @example ```
|
|
4839
|
-
maximum_temperature = 1000.0
|
|
4840
|
-
```
|
|
4841
|
-
*/
|
|
4842
|
-
maximum_temperature?: float;
|
|
4843
|
-
/**
|
|
4844
|
-
* The minimum temperature allowed into the fluidbox. Only applied if a `filter` is specified.
|
|
4845
|
-
* @example ```
|
|
4846
|
-
minimum_temperature = 100.0
|
|
4847
|
-
```
|
|
4848
|
-
*/
|
|
4849
|
-
minimum_temperature?: float;
|
|
4850
4901
|
/**
|
|
4851
4902
|
* Pipe picture variation used when owner machine is flipped. If no picture is loaded, pipe_picture is used instead.
|
|
4852
4903
|
*/
|
|
@@ -4927,11 +4978,19 @@ interface FluidEnergySource extends BaseEnergySource {
|
|
|
4927
4978
|
hide_from_stats?: boolean;
|
|
4928
4979
|
light_flicker?: LightFlickeringDefinition;
|
|
4929
4980
|
/**
|
|
4930
|
-
*
|
|
4981
|
+
* If specified, an input fluid above this temperature will cause the fluid energy source to stop working.
|
|
4982
|
+
*/
|
|
4983
|
+
maximum_input_temperature?: float;
|
|
4984
|
+
/**
|
|
4985
|
+
* If this is specified while `scale_fluid_usage` is `false` and `fluid_usage_per_tick` is not specified, the game will use this value to calculate `fluid_usage_per_tick`. To do that, the filter on the `fluid_box` must be set.
|
|
4931
4986
|
*
|
|
4932
4987
|
* Only loaded if `burns_fluid` is `false`.
|
|
4933
4988
|
*/
|
|
4934
4989
|
maximum_temperature?: float;
|
|
4990
|
+
/**
|
|
4991
|
+
* If specified, an input fluid below this temperature will cause the fluid energy source to stop working.
|
|
4992
|
+
*/
|
|
4993
|
+
minimum_input_temperature?: float;
|
|
4935
4994
|
output_fluid_box?: FluidBox;
|
|
4936
4995
|
/**
|
|
4937
4996
|
* 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.
|
|
@@ -6026,9 +6085,12 @@ interface ItemProductPrototype extends ProductPrototypeBase {
|
|
|
6026
6085
|
* An array containing the following values.
|
|
6027
6086
|
*/
|
|
6028
6087
|
type ItemPrototypeFlags = (/**
|
|
6029
|
-
* Whether the logistics areas of roboports should be drawn when holding this item. Used for example by the {@link deconstruction planner | https://wiki.factorio.com/Deconstruction_planner}.
|
|
6088
|
+
* Whether the logistics areas of roboports should be drawn when holding this item. Used for example by the {@link deconstruction planner | https://wiki.factorio.com/Deconstruction_planner}. The overlay will also be drawn in some instances without this flag enabled.
|
|
6030
6089
|
*/
|
|
6031
6090
|
'draw-logistic-overlay' | /**
|
|
6091
|
+
* The logistics areas of roboports are never drawn when holding this item. Can't be used together with `"draw-logistic-overlay"`.
|
|
6092
|
+
*/
|
|
6093
|
+
'disable-logistic-overlay' | /**
|
|
6032
6094
|
* Whether the trash-unrequested feature skips this item.
|
|
6033
6095
|
*/
|
|
6034
6096
|
'excluded-from-trash-unrequested' | /**
|
|
@@ -14084,6 +14146,12 @@ interface WaterTileEffectParameters {
|
|
|
14084
14146
|
* Multiplies the rgb values of `foam_color` before they are passed to the shader.
|
|
14085
14147
|
*/
|
|
14086
14148
|
foam_color_multiplier: float;
|
|
14149
|
+
/**
|
|
14150
|
+
* The image is split into 512x512 slices which are used as randomly chosen variations.
|
|
14151
|
+
*
|
|
14152
|
+
* Shader variant `"water"` must have 0 textures, `"lava"` and `"wetland-water"` must have 1 texture, and `"oil"` must have 2 textures.
|
|
14153
|
+
*/
|
|
14154
|
+
image_textures?: EffectArrayTexture[];
|
|
14087
14155
|
/**
|
|
14088
14156
|
* 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.
|
|
14089
14157
|
*/
|
|
@@ -14092,6 +14160,10 @@ interface WaterTileEffectParameters {
|
|
|
14092
14160
|
* 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
14161
|
*/
|
|
14094
14162
|
near_zoom?: float;
|
|
14163
|
+
/**
|
|
14164
|
+
* Shader variants `"water"` and `"wetland-water"` must have 1 texture, and `"lava"` and `"oil"` must have 2 textures.
|
|
14165
|
+
*/
|
|
14166
|
+
noise_textures?: EffectTexture[];
|
|
14095
14167
|
/**
|
|
14096
14168
|
* 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
14169
|
*/
|
|
@@ -14099,8 +14171,6 @@ interface WaterTileEffectParameters {
|
|
|
14099
14171
|
float,
|
|
14100
14172
|
float
|
|
14101
14173
|
];
|
|
14102
|
-
secondary_texture_variations_columns?: uint8;
|
|
14103
|
-
secondary_texture_variations_rows?: uint8;
|
|
14104
14174
|
shader_variation?: EffectVariation;
|
|
14105
14175
|
/**
|
|
14106
14176
|
* Affects specular lightness for `"water"` `shader_variation`. Affects panning/warping vector for all other `shader_variation`s.
|
|
@@ -14115,12 +14185,6 @@ interface WaterTileEffectParameters {
|
|
|
14115
14185
|
float,
|
|
14116
14186
|
float
|
|
14117
14187
|
];
|
|
14118
|
-
texture_variations_columns?: uint8;
|
|
14119
|
-
texture_variations_rows?: uint8;
|
|
14120
|
-
/**
|
|
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.
|
|
14122
|
-
*/
|
|
14123
|
-
textures: EffectTexture[];
|
|
14124
14188
|
/**
|
|
14125
14189
|
* Affects distortion speed for `"water"` `shader_variation`. Affects panning/warping speed for all other `shader_variation`s.
|
|
14126
14190
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.72",
|
|
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.
|
|
26
|
+
"factorioVersion": "2.1.23",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|