factorio-types 0.0.43 → 0.0.44
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/LICENSE +21 -21
- package/README.md +9 -9
- package/dist/classes.d.ts +13 -7
- package/dist/concepts.d.ts +19 -4
- package/dist/core.d.ts +28 -28
- package/dist/defines.d.ts +15 -1
- package/dist/events.d.ts +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +37 -27
- package/dist/serpent.d.ts +33 -33
- package/dist/types.d.ts +191 -97
- package/index.d.ts +14 -14
- package/package.json +28 -27
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 1.1.
|
|
5
|
+
// Factorio version 1.1.96
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -188,15 +188,67 @@ interface AnimatedVector {
|
|
|
188
188
|
* Note that if any frame of the animation is specified from the same source as any other {@link Sprite | prototype:Sprite} or frame of other animation, it will be shared.
|
|
189
189
|
* @example
|
|
190
190
|
* ```
|
|
191
|
-
* animation
|
|
191
|
+
* -- simple animation
|
|
192
|
+
* horizontal_animation =
|
|
192
193
|
* {
|
|
193
|
-
* filename = "__base__/graphics/entity/
|
|
194
|
-
* width =
|
|
195
|
-
* height =
|
|
194
|
+
* filename = "__base__/graphics/entity/steam-engine/steam-engine-H.png",
|
|
195
|
+
* width = 176,
|
|
196
|
+
* height = 128,
|
|
197
|
+
* frame_count = 32,
|
|
196
198
|
* line_length = 8,
|
|
199
|
+
* shift = {0.03125, -0.15625}
|
|
200
|
+
* }
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```
|
|
205
|
+
* -- animation with hr version
|
|
206
|
+
* horizontal_animation =
|
|
207
|
+
* {
|
|
208
|
+
* filename = "__base__/graphics/entity/steam-engine/steam-engine-H.png",
|
|
209
|
+
* width = 176,
|
|
210
|
+
* height = 128,
|
|
197
211
|
* frame_count = 32,
|
|
198
|
-
*
|
|
199
|
-
*
|
|
212
|
+
* line_length = 8,
|
|
213
|
+
* shift = {0.03125, -0.15625},
|
|
214
|
+
* hr_version =
|
|
215
|
+
* {
|
|
216
|
+
* filename = "__base__/graphics/entity/steam-engine/hr-steam-engine-H.png",
|
|
217
|
+
* width = 352,
|
|
218
|
+
* height = 257,
|
|
219
|
+
* frame_count = 32,
|
|
220
|
+
* line_length = 8,
|
|
221
|
+
* shift = {0.03125, -0.1484375},
|
|
222
|
+
* scale = 0.5
|
|
223
|
+
* }
|
|
224
|
+
* }
|
|
225
|
+
* ```
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```
|
|
229
|
+
* -- animation with layers
|
|
230
|
+
* horizontal_animation =
|
|
231
|
+
* {
|
|
232
|
+
* layers =
|
|
233
|
+
* {
|
|
234
|
+
* {
|
|
235
|
+
* filename = "__base__/graphics/entity/steam-engine/steam-engine-H.png",
|
|
236
|
+
* width = 176,
|
|
237
|
+
* height = 128,
|
|
238
|
+
* frame_count = 32,
|
|
239
|
+
* line_length = 8,
|
|
240
|
+
* shift = {0.03125, -0.15625}
|
|
241
|
+
* },
|
|
242
|
+
* {
|
|
243
|
+
* filename = "__base__/graphics/entity/steam-engine/steam-engine-H-shadow.png",
|
|
244
|
+
* width = 254,
|
|
245
|
+
* height = 80,
|
|
246
|
+
* frame_count = 32,
|
|
247
|
+
* line_length = 8,
|
|
248
|
+
* draw_as_shadow = true,
|
|
249
|
+
* shift = {1.5, 0.75}
|
|
250
|
+
* }
|
|
251
|
+
* }
|
|
200
252
|
* }
|
|
201
253
|
* ```
|
|
202
254
|
*
|
|
@@ -208,7 +260,7 @@ interface Animation extends AnimationParameters{
|
|
|
208
260
|
|
|
209
261
|
The path to the sprite file to use.
|
|
210
262
|
*/
|
|
211
|
-
filename
|
|
263
|
+
filename?: FileName,
|
|
212
264
|
|
|
213
265
|
/**
|
|
214
266
|
* Only loaded if `layers` is not defined.
|
|
@@ -220,11 +272,11 @@ If this property exists and high resolution sprites are turned on, this is used
|
|
|
220
272
|
/**
|
|
221
273
|
* If this property is present, all Animation definitions have to be placed as entries in the array, and they will all be loaded from there. `layers` may not be an empty table. Each definition in the array may also have the `layers` property.
|
|
222
274
|
|
|
223
|
-
`animation_speed` and `max_advance`
|
|
275
|
+
`animation_speed` and `max_advance` of the first layer are used for all layers. All layers will run at the same speed.
|
|
224
276
|
|
|
225
277
|
If this property is present, all other properties, including those inherited from AnimationParameters, are ignored.
|
|
226
278
|
*/
|
|
227
|
-
layers
|
|
279
|
+
layers?: Animation[],
|
|
228
280
|
|
|
229
281
|
/**
|
|
230
282
|
* Only loaded if `layers` is not defined.
|
|
@@ -356,6 +408,10 @@ Height of one frame in pixels, from 0-8192.
|
|
|
356
408
|
* Specifies how many pictures are on each horizontal line in the image file. `0` means that all the pictures are in one horizontal line. Once the specified number of pictures are loaded from a line, the pictures from the next line are loaded. This is to allow having longer animations loaded in to Factorio's graphics matrix than the game engine's width limit of 8192px per input file. The restriction on input files is to be compatible with most graphics cards.
|
|
357
409
|
*/
|
|
358
410
|
line_length?: number,
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Maximum amount of frames the animation can move forward in one update. Useful to cap the animation speed on entities where it is variable, such as car animations.
|
|
414
|
+
*/
|
|
359
415
|
max_advance?: number,
|
|
360
416
|
|
|
361
417
|
/**
|
|
@@ -403,12 +459,12 @@ type AnimationVariations = {
|
|
|
403
459
|
/**
|
|
404
460
|
* The variations are arranged vertically in the file, one row for each variation.
|
|
405
461
|
*/
|
|
406
|
-
sheet
|
|
462
|
+
sheet?: AnimationSheet,
|
|
407
463
|
|
|
408
464
|
/**
|
|
409
465
|
* Only loaded if `sheet` is not defined.
|
|
410
466
|
*/
|
|
411
|
-
sheets
|
|
467
|
+
sheets?: AnimationSheet[]
|
|
412
468
|
} | Animation | Animation[]
|
|
413
469
|
|
|
414
470
|
interface AreaTriggerItem extends TriggerItem{
|
|
@@ -769,7 +825,7 @@ type AutoplaceSpecification = {
|
|
|
769
825
|
/**
|
|
770
826
|
* Indicates whether the thing should be placed even if {@link MapGenSettings | runtime:MapGenSettings} do not provide frequency/size/richness for it. (either for the specific prototype or for the control named by AutoplaceSpecification.control).
|
|
771
827
|
|
|
772
|
-
If true, normal frequency/size/richness (`value=1`) are used in that case.
|
|
828
|
+
If true, normal frequency/size/richness (`value=1`) are used in that case. Otherwise it is treated as if 'none' were selected.
|
|
773
829
|
*/
|
|
774
830
|
default_enabled?: boolean,
|
|
775
831
|
|
|
@@ -899,7 +955,7 @@ For example, an activation_type of "throw" will result in the tooltip category "
|
|
|
899
955
|
/**
|
|
900
956
|
* Played during the attack.
|
|
901
957
|
*/
|
|
902
|
-
cyclic_sound
|
|
958
|
+
cyclic_sound?: CyclicSound,
|
|
903
959
|
damage_modifier?: number,
|
|
904
960
|
|
|
905
961
|
/**
|
|
@@ -1345,19 +1401,19 @@ interface BoxSpecification {
|
|
|
1345
1401
|
is_whole_box?: boolean,
|
|
1346
1402
|
|
|
1347
1403
|
/**
|
|
1348
|
-
* Only
|
|
1404
|
+
* Only loaded, and mandatory if `is_whole_box` is `false`.
|
|
1349
1405
|
*/
|
|
1350
|
-
max_side_length
|
|
1406
|
+
max_side_length?: number,
|
|
1351
1407
|
|
|
1352
1408
|
/**
|
|
1353
|
-
* Only
|
|
1409
|
+
* Only loaded, and mandatory if `is_whole_box` is `true`.
|
|
1354
1410
|
*/
|
|
1355
|
-
side_height
|
|
1411
|
+
side_height?: number,
|
|
1356
1412
|
|
|
1357
1413
|
/**
|
|
1358
|
-
* Only
|
|
1414
|
+
* Only loaded, and mandatory if `is_whole_box` is `true`.
|
|
1359
1415
|
*/
|
|
1360
|
-
side_length
|
|
1416
|
+
side_length?: number,
|
|
1361
1417
|
sprite: Sprite
|
|
1362
1418
|
}
|
|
1363
1419
|
|
|
@@ -1398,7 +1454,11 @@ Only loaded if `fuel_categories` is not defined.
|
|
|
1398
1454
|
fuel_inventory_size: ItemStackIndex,
|
|
1399
1455
|
light_flicker?: LightFlickeringDefinition,
|
|
1400
1456
|
smoke?: SmokeSource[],
|
|
1401
|
-
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* This is mandatory if the energy source can be loaded as multiple energy source types.
|
|
1460
|
+
*/
|
|
1461
|
+
type?: 'burner'
|
|
1402
1462
|
}
|
|
1403
1463
|
|
|
1404
1464
|
interface ButtonStyleSpecificationBase extends StyleWithClickableGraphicalSetSpecification{
|
|
@@ -1449,7 +1509,7 @@ interface CameraStyleSpecification extends EmptyWidgetStyleSpecificationBase{
|
|
|
1449
1509
|
type CapsuleAction = /* Loaded when the `type` is `"throw"`. */ ThrowCapsuleAction | /* Loaded when the `type` is `"equipment-remote"`. */ ActivateEquipmentCapsuleAction | /* Loaded when the `type` is `"use-on-self"`. */ UseOnSelfCapsuleAction | /* Loaded when the `type` is `"destroy-cliffs"`. */ DestroyCliffsCapsuleAction | /* Loaded when the `type` is `"artillery-remote"`. */ ArtilleryRemoteCapsuleAction
|
|
1450
1510
|
|
|
1451
1511
|
/**
|
|
1452
|
-
* The data for one variation of
|
|
1512
|
+
* The data for one variation of {@link character animations | prototype:CharacterPrototype::animations}.
|
|
1453
1513
|
*/
|
|
1454
1514
|
interface CharacterArmorAnimation {
|
|
1455
1515
|
|
|
@@ -1644,6 +1704,7 @@ interface ChartUtilityConstants {
|
|
|
1644
1704
|
interface CheckBoxStyleSpecification extends StyleWithClickableGraphicalSetSpecification{
|
|
1645
1705
|
checkmark?: Sprite,
|
|
1646
1706
|
disabled_checkmark?: Sprite,
|
|
1707
|
+
disabled_font_color?: Color,
|
|
1647
1708
|
|
|
1648
1709
|
/**
|
|
1649
1710
|
* Name of a {@link FontPrototype | prototype:FontPrototype}.
|
|
@@ -1786,7 +1847,7 @@ type CollisionMask = Array</* A standard collision mask layer. */ CollisionMaskL
|
|
|
1786
1847
|
type CollisionMaskLayer = 'ground-tile' | 'water-tile' | 'resource-layer' | 'doodad-layer' | 'floor-layer' | 'item-layer' | 'ghost-layer' | 'object-layer' | 'player-layer' | 'train-layer' | 'rail-layer' | 'transport-belt-layer'
|
|
1787
1848
|
|
|
1788
1849
|
/**
|
|
1789
|
-
* Table of red, green, blue, and alpha float values between 0 and 1.Alternatively, values can be from 0-255, they are interpreted as such if at least one value is `> 1`.
|
|
1850
|
+
* Table of red, green, blue, and alpha float values between 0 and 1. Alternatively, values can be from 0-255, they are interpreted as such if at least one value is `> 1`.
|
|
1790
1851
|
*
|
|
1791
1852
|
* Color allows the short-hand notation of passing an array of exactly 3 or 4 numbers.
|
|
1792
1853
|
*
|
|
@@ -1891,7 +1952,7 @@ interface ConnectableEntityGraphics {
|
|
|
1891
1952
|
}
|
|
1892
1953
|
|
|
1893
1954
|
/**
|
|
1894
|
-
* A constant boolean noise expression, such as a literal boolean. When using a constant number,
|
|
1955
|
+
* A constant boolean noise expression, such as a literal boolean. When using a constant number, it evaluates to true for numbers bigger than zero, anything else evaluates to false.
|
|
1895
1956
|
*/
|
|
1896
1957
|
type ConstantNoiseBoolean = NoiseLiteralBoolean | ConstantNoiseNumber
|
|
1897
1958
|
|
|
@@ -1960,7 +2021,7 @@ interface CreateEntityTriggerEffectItemBase extends TriggerEffectItem{
|
|
|
1960
2021
|
/**
|
|
1961
2022
|
* If multiple offsets are specified, multiple entities are created. The projectile of the {@link Distractor capsule | https://wiki.factorio.com/Distractor_capsule} uses this property to spawn three Distractors.
|
|
1962
2023
|
*/
|
|
1963
|
-
offsets?: Vector[],
|
|
2024
|
+
offsets?: Vector | Vector[],
|
|
1964
2025
|
show_in_tooltip?: boolean,
|
|
1965
2026
|
|
|
1966
2027
|
/**
|
|
@@ -1996,7 +2057,7 @@ interface CreateParticleTriggerEffectItemBase extends TriggerEffectItem{
|
|
|
1996
2057
|
initial_vertical_speed?: number,
|
|
1997
2058
|
initial_vertical_speed_deviation?: number,
|
|
1998
2059
|
offset_deviation?: BoundingBox,
|
|
1999
|
-
offsets?: Vector[],
|
|
2060
|
+
offsets?: Vector | Vector[],
|
|
2000
2061
|
particle_name: ParticleID,
|
|
2001
2062
|
rotate_offsets?: boolean,
|
|
2002
2063
|
show_in_tooltip?: boolean,
|
|
@@ -2050,7 +2111,7 @@ interface CreateTrivialSmokeEffectItem extends TriggerEffectItem{
|
|
|
2050
2111
|
initial_height?: number,
|
|
2051
2112
|
max_radius?: number,
|
|
2052
2113
|
offset_deviation?: BoundingBox,
|
|
2053
|
-
offsets?: Vector[],
|
|
2114
|
+
offsets?: Vector | Vector[],
|
|
2054
2115
|
smoke_name: TrivialSmokeID,
|
|
2055
2116
|
speed?: Vector,
|
|
2056
2117
|
speed_from_center?: number,
|
|
@@ -2191,7 +2252,7 @@ type DamageTypeID = string
|
|
|
2191
2252
|
*
|
|
2192
2253
|
* If there is only one tuple, it means that the LUT will be used all the time, regardless of the value of the first member of the tuple.
|
|
2193
2254
|
*
|
|
2194
|
-
* The second member of the tuple is a lookup table (LUT) for the color which maps the original color to a position in the sprite where is the replacement color is found. The file pointed to by the filename must be a sprite of size 256×16
|
|
2255
|
+
* The second member of the tuple is a lookup table (LUT) for the color which maps the original color to a position in the sprite where is the replacement color is found. The file pointed to by the filename must be a sprite of size 256×16.
|
|
2195
2256
|
* @example
|
|
2196
2257
|
* ```
|
|
2197
2258
|
* color_lookup = {{1, "identity"}}
|
|
@@ -2309,7 +2370,7 @@ interface DifficultySettings {
|
|
|
2309
2370
|
technology_difficulty: number,
|
|
2310
2371
|
|
|
2311
2372
|
/**
|
|
2312
|
-
*
|
|
2373
|
+
* Must be >= 0.001 and <= 1000.
|
|
2313
2374
|
*/
|
|
2314
2375
|
technology_price_multiplier?: number
|
|
2315
2376
|
}
|
|
@@ -2420,7 +2481,11 @@ interface ElectricEnergySource extends BaseEnergySource{
|
|
|
2420
2481
|
* The rate at which energy can be provided, to the network, from the energy buffer. `0` means no transfer.
|
|
2421
2482
|
*/
|
|
2422
2483
|
output_flow_limit?: Energy,
|
|
2423
|
-
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* This is mandatory if the energy source can be loaded as multiple energy source types.
|
|
2487
|
+
*/
|
|
2488
|
+
type?: 'electric',
|
|
2424
2489
|
usage_priority: ElectricUsagePriority
|
|
2425
2490
|
}
|
|
2426
2491
|
|
|
@@ -2928,7 +2993,7 @@ interface FastReplaceTipTrigger {
|
|
|
2928
2993
|
*
|
|
2929
2994
|
* - **core**: A path starting with `__core__` will access the resources in the data/core directory, these resources are always accessible regardless of mod specifications.
|
|
2930
2995
|
*
|
|
2931
|
-
* - **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.
|
|
2996
|
+
* - **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.
|
|
2932
2997
|
*
|
|
2933
2998
|
* - **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.
|
|
2934
2999
|
* @example
|
|
@@ -2994,19 +3059,9 @@ interface FluidBox {
|
|
|
2994
3059
|
/**
|
|
2995
3060
|
* Base level is the elevation of the invisible fluid box. `0` is ground level.
|
|
2996
3061
|
|
|
2997
|
-
`-1` puts the top of the fluid box at the bottom of a pipe connection
|
|
2998
|
-
|
|
2999
|
-
`1` puts the bottom of the fluid box at the top of a pipe connection, so fluid "falls" out of it, but fluids already outside cannot get into it.
|
|
3062
|
+
For example, if the base level is `-1` and the height is `1`, it puts the top of the fluid box at the bottom of a pipe connection with base_level `0` and height `1`. This means fluid "falls" in to the fluid box, and can't get out.
|
|
3000
3063
|
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
- `1` = output only (and will attempt to empty as fast as possible)
|
|
3004
|
-
|
|
3005
|
-
- `-1` = input only (and will attempt to fill as fast as possible)
|
|
3006
|
-
|
|
3007
|
-
- `0` means fluids can freely flow in and out (and like a pipe, will balance to the level of the pipe next to it)
|
|
3008
|
-
|
|
3009
|
-
Having a `-1` or `1` improperly set on an output or input, respectively, will cause issues like output fluid not leaving the building, or input fluid not entering, regardless of fluid levels in the pipe or fluid box.
|
|
3064
|
+
For example, if the base level is `1`, it puts the bottom of the fluid box at the top of a pipe connection with base_level `0` and height `1`. This means fluid "falls" out of the fluid box, but fluids already outside can't get into it.
|
|
3010
3065
|
*/
|
|
3011
3066
|
base_level?: number,
|
|
3012
3067
|
|
|
@@ -3102,6 +3157,8 @@ In those cases, this property determines whether the fluid should be destroyed,
|
|
|
3102
3157
|
|
|
3103
3158
|
/**
|
|
3104
3159
|
* `0` means unlimited maximum temperature. If 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`.
|
|
3160
|
+
|
|
3161
|
+
Only loaded if `burns_fluid` is `false`.
|
|
3105
3162
|
*/
|
|
3106
3163
|
maximum_temperature?: number,
|
|
3107
3164
|
|
|
@@ -3151,7 +3208,7 @@ If this FluidIngredientPrototype is used in a recipe, the `catalyst_amount` is c
|
|
|
3151
3208
|
catalyst_amount?: number,
|
|
3152
3209
|
|
|
3153
3210
|
/**
|
|
3154
|
-
* Used to specify which {@link CraftingMachinePrototype::fluid_boxes | prototype:CraftingMachinePrototype::fluid_boxes} this ingredient should use. It will use this one fluidbox.
|
|
3211
|
+
* Used to specify which {@link CraftingMachinePrototype::fluid_boxes | prototype:CraftingMachinePrototype::fluid_boxes} this ingredient should use. It will use this one fluidbox. The index is 1-based and separate for input and output fluidboxes.
|
|
3155
3212
|
*/
|
|
3156
3213
|
fluidbox_index?: number,
|
|
3157
3214
|
|
|
@@ -3209,7 +3266,7 @@ If this FluidProductPrototype is used in a recipe, the `catalyst_amount` is calc
|
|
|
3209
3266
|
catalyst_amount?: number,
|
|
3210
3267
|
|
|
3211
3268
|
/**
|
|
3212
|
-
* Used to specify which {@link CraftingMachinePrototype::fluid_boxes | prototype:CraftingMachinePrototype::fluid_boxes} this product should use. It will use this one fluidbox.
|
|
3269
|
+
* 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.
|
|
3213
3270
|
*/
|
|
3214
3271
|
fluidbox_index?: number,
|
|
3215
3272
|
|
|
@@ -3360,7 +3417,6 @@ interface FrameStyleSpecification extends BaseStyleSpecification{
|
|
|
3360
3417
|
background_graphical_set?: ElementImageSet,
|
|
3361
3418
|
border?: BorderImageSet,
|
|
3362
3419
|
drag_by_title?: boolean,
|
|
3363
|
-
flow_style?: FlowStyleSpecification,
|
|
3364
3420
|
graphical_set?: ElementImageSet,
|
|
3365
3421
|
header_background?: ElementImageSet,
|
|
3366
3422
|
header_filler_style?: EmptyWidgetStyleSpecification,
|
|
@@ -3693,7 +3749,7 @@ Specifies the scale of the icon on the GUI scale. A scale of `2` means that the
|
|
|
3693
3749
|
}
|
|
3694
3750
|
|
|
3695
3751
|
/**
|
|
3696
|
-
* Icons of reduced size will be used at decreased scale. 0 or 1 mipmaps is a single image. The file must contain half-size images with a geometric-ratio, for each mipmap level. Each next level is aligned to the upper-left corner. Example sequence: `128x128@(0,0)`, `64x64@(128,0)`, `32x32@(
|
|
3752
|
+
* Icons of reduced size will be used at decreased scale. 0 or 1 mipmaps is a single image. The file must contain half-size images with a geometric-ratio, for each mipmap level. Each next level is aligned to the upper-left corner, with no extra padding. Example sequence: `128x128@(0,0)`, `64x64@(128,0)`, `32x32@(192,0)` is three mipmaps.
|
|
3697
3753
|
*
|
|
3698
3754
|
* See {@link here | https://factorio.com/blog/post/fff-291} for more about the visual effects of icon mipmaps.
|
|
3699
3755
|
*/
|
|
@@ -4036,9 +4092,9 @@ type LightDefinition = {
|
|
|
4036
4092
|
minimum_darkness?: number,
|
|
4037
4093
|
|
|
4038
4094
|
/**
|
|
4039
|
-
* Only loaded if `type` is `"oriented"`.
|
|
4095
|
+
* Only loaded, and mandatory if `type` is `"oriented"`.
|
|
4040
4096
|
*/
|
|
4041
|
-
picture
|
|
4097
|
+
picture?: Sprite,
|
|
4042
4098
|
|
|
4043
4099
|
/**
|
|
4044
4100
|
* Only loaded if `type` is `"oriented"`.
|
|
@@ -4067,9 +4123,9 @@ type LightDefinition = {
|
|
|
4067
4123
|
minimum_darkness?: number,
|
|
4068
4124
|
|
|
4069
4125
|
/**
|
|
4070
|
-
* Only loaded if `type` is `"oriented"`.
|
|
4126
|
+
* Only loaded, and mandatory if `type` is `"oriented"`.
|
|
4071
4127
|
*/
|
|
4072
|
-
picture
|
|
4128
|
+
picture?: Sprite,
|
|
4073
4129
|
|
|
4074
4130
|
/**
|
|
4075
4131
|
* Only loaded if `type` is `"oriented"`.
|
|
@@ -4169,6 +4225,11 @@ interface LinkedBeltStructure {
|
|
|
4169
4225
|
front_patch?: Sprite4Way
|
|
4170
4226
|
}
|
|
4171
4227
|
|
|
4228
|
+
/**
|
|
4229
|
+
* The internal name of a game control (key binding).
|
|
4230
|
+
*/
|
|
4231
|
+
type LinkedGameControl = 'action-bar-select-page-1' | 'action-bar-select-page-10' | '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' | 'activate-tooltip' | 'add-station' | 'add-temporary-station' | 'alt-zoom-in' | 'alt-zoom-out' | 'build' | 'build-ghost' | 'build-with-obstacle-avoidance' | 'cancel-craft' | 'cancel-craft-5' | 'cancel-craft-all' | 'clear-cursor' | 'confirm-gui' | 'confirm-message' | 'connect-train' | 'controller-gui-crafting-tab' | 'controller-gui-logistics-tab' | 'copy' | 'copy-entity-settings' | 'craft' | 'craft-5' | 'craft-all' | 'cursor-split' | 'cut' | 'cycle-blueprint-backwards' | 'cycle-blueprint-forwards' | 'cycle-clipboard-backwards' | 'cycle-clipboard-forwards' | 'debug-reset-zoom' | 'debug-reset-zoom-2x' | 'debug-toggle-atlas-gui' | 'debug-toggle-basic' | 'debug-toggle-debug-settings' | 'decrease-ui-scale' | 'disconnect-train' | 'drag-map' | 'drop-cursor' | 'editor-clone-item' | 'editor-delete-item' | 'editor-next-variation' | 'editor-previous-variation' | 'editor-remove-scripting-object' | 'editor-reset-speed' | 'editor-set-clone-brush-destination' | 'editor-set-clone-brush-source' | 'editor-speed-down' | 'editor-speed-up' | 'editor-switch-to-surface' | 'editor-tick-once' | 'editor-toggle-pause' | 'fast-entity-split' | 'fast-entity-transfer' | 'flip-blueprint-horizontal' | 'flip-blueprint-vertical' | 'focus-search' | 'increase-ui-scale' | 'inventory-split' | 'inventory-transfer' | 'larger-terrain-building-area' | 'logistic-networks' | 'mine' | 'move-down' | 'move-left' | 'move-right' | 'move-up' | 'next-active-quick-bar' | 'next-player-in-replay' | 'next-weapon' | 'open-character-gui' | 'open-gui' | 'open-item' | 'open-prototype-explorer-gui' | 'open-prototypes-gui' | 'open-technology-gui' | 'open-trains-gui' | 'order-to-follow' | 'paste' | 'paste-entity-settings' | 'pause-game' | 'pick-item' | 'pick-items' | 'place-in-chat' | 'place-ping' | 'previous-active-quick-bar' | 'previous-mod' | 'previous-technology' | 'production-statistics' | 'quick-bar-button-1' | 'quick-bar-button-1-secondary' | 'quick-bar-button-10' | 'quick-bar-button-10-secondary' | 'quick-bar-button-2' | 'quick-bar-button-2-secondary' | 'quick-bar-button-3' | 'quick-bar-button-3-secondary' | 'quick-bar-button-4' | 'quick-bar-button-4-secondary' | 'quick-bar-button-5' | 'quick-bar-button-5-secondary' | 'quick-bar-button-6' | 'quick-bar-button-6-secondary' | 'quick-bar-button-7' | 'quick-bar-button-7-secondary' | 'quick-bar-button-8' | 'quick-bar-button-8-secondary' | 'quick-bar-button-9' | 'quick-bar-button-9-secondary' | 'remove-pole-cables' | 'reset-ui-scale' | 'reverse-rotate' | 'reverse-select' | 'alt-reverse-select' | 'rotate' | 'rotate-active-quick-bars' | 'select-for-blueprint' | 'select-for-cancel-deconstruct' | 'shoot-enemy' | 'shoot-selected' | 'show-info' | 'smaller-terrain-building-area' | 'smart-pipette' | 'stack-split' | 'stack-transfer' | 'toggle-blueprint-library' | 'toggle-console' | 'toggle-driving' | 'toggle-filter' | 'toggle-gui-debug' | 'toggle-gui-glows' | 'toggle-gui-shadows' | 'toggle-gui-style-view' | 'toggle-map' | 'toggle-menu' | 'undo' | 'zoom-in' | 'zoom-out'
|
|
4232
|
+
|
|
4172
4233
|
interface ListBoxStyleSpecification extends BaseStyleSpecification{
|
|
4173
4234
|
item_style?: ButtonStyleSpecification,
|
|
4174
4235
|
scroll_pane_style?: ScrollPaneStyleSpecification,
|
|
@@ -4456,7 +4517,7 @@ interface MapGenSettings {
|
|
|
4456
4517
|
/**
|
|
4457
4518
|
* A floating point number specifying an amount.
|
|
4458
4519
|
*
|
|
4459
|
-
* For backwards compatibility, MapGenSizes can also be specified as one of the following strings, which will be converted to a number
|
|
4520
|
+
* For backwards compatibility, MapGenSizes can also be specified as one of the following strings, which will be converted to a number:
|
|
4460
4521
|
*
|
|
4461
4522
|
* Each of the values in a triplet (such as "low", "small", and "poor") are synonymous. In-game the values can be set from `0.166` to `6` via the GUI (respective to the percentages), while `0` is used to disable the autoplace control.
|
|
4462
4523
|
*/
|
|
@@ -5197,7 +5258,7 @@ interface NoiseFunctionRandomPenalty {
|
|
|
5197
5258
|
interface NoiseFunctionRidge {
|
|
5198
5259
|
|
|
5199
5260
|
/**
|
|
5200
|
-
* The first argument is the
|
|
5261
|
+
* The first argument is the number to be ridged, the second is the lower limit and the third is the upper limit.
|
|
5201
5262
|
*/
|
|
5202
5263
|
arguments:
|
|
5203
5264
|
[ NoiseNumber,
|
|
@@ -5738,13 +5799,13 @@ interface PipeConnectionDefinition {
|
|
|
5738
5799
|
position?: Vector,
|
|
5739
5800
|
|
|
5740
5801
|
/**
|
|
5741
|
-
* Only loaded if `position` is not defined.
|
|
5802
|
+
* Only loaded, and mandatory if `position` is not defined.
|
|
5742
5803
|
|
|
5743
5804
|
Where pipes can connect to this fluidbox, depending on the entity direction.
|
|
5744
5805
|
|
|
5745
5806
|
Table must have 4 members, which are 4 explicit positions corresponding to the 4 directions of entity. Positions must correspond to directions going one after another.
|
|
5746
5807
|
*/
|
|
5747
|
-
positions
|
|
5808
|
+
positions?: Vector[],
|
|
5748
5809
|
type?: 'input' | 'input-output' | 'output'
|
|
5749
5810
|
}
|
|
5750
5811
|
|
|
@@ -5759,10 +5820,26 @@ interface PipePictures {
|
|
|
5759
5820
|
ending_right: Sprite,
|
|
5760
5821
|
ending_up: Sprite,
|
|
5761
5822
|
fluid_background: Sprite,
|
|
5823
|
+
|
|
5824
|
+
/**
|
|
5825
|
+
* Visualizes the flow of the fluid in the pipe. Drawn when the fluid's temperature is above {@link FluidPrototype::gas_temperature | prototype:FluidPrototype::gas_temperature}.
|
|
5826
|
+
*/
|
|
5762
5827
|
gas_flow: Animation,
|
|
5828
|
+
|
|
5829
|
+
/**
|
|
5830
|
+
* Visualizes the flow of the fluid in the pipe. Drawn when `(fluid_temp - fluid_min_temp) / (fluid_max_temp - fluid_min_temp)` is larger than `2/3` and the fluid's temperature is below {@link FluidPrototype::gas_temperature | prototype:FluidPrototype::gas_temperature}.
|
|
5831
|
+
*/
|
|
5763
5832
|
high_temperature_flow: Sprite,
|
|
5764
5833
|
horizontal_window_background: Sprite,
|
|
5834
|
+
|
|
5835
|
+
/**
|
|
5836
|
+
* Visualizes the flow of the fluid in the pipe. Drawn when `(fluid_temp - fluid_min_temp) / (fluid_max_temp - fluid_min_temp)` is less than or equal to `1/3` and the fluid's temperature is below {@link FluidPrototype::gas_temperature | prototype:FluidPrototype::gas_temperature}.
|
|
5837
|
+
*/
|
|
5765
5838
|
low_temperature_flow: Sprite,
|
|
5839
|
+
|
|
5840
|
+
/**
|
|
5841
|
+
* Visualizes the flow of the fluid in the pipe. Drawn when `(fluid_temp - fluid_min_temp) / (fluid_max_temp - fluid_min_temp)` is larger than `1/3` and less than or equal to `2/3` and the fluid's temperature is below {@link FluidPrototype::gas_temperature | prototype:FluidPrototype::gas_temperature}.
|
|
5842
|
+
*/
|
|
5766
5843
|
middle_temperature_flow: Sprite,
|
|
5767
5844
|
straight_horizontal: Sprite,
|
|
5768
5845
|
straight_horizontal_window: Sprite,
|
|
@@ -5903,6 +5980,7 @@ interface ProgressBarStyleSpecification extends BaseStyleSpecification{
|
|
|
5903
5980
|
font?: string,
|
|
5904
5981
|
font_color?: Color,
|
|
5905
5982
|
other_colors?: OtherColors[],
|
|
5983
|
+
side_text_padding?: number,
|
|
5906
5984
|
type: 'progressbar_style'
|
|
5907
5985
|
}
|
|
5908
5986
|
|
|
@@ -6360,7 +6438,7 @@ interface ResearchTechnologyTipTrigger {
|
|
|
6360
6438
|
* ```
|
|
6361
6439
|
*
|
|
6362
6440
|
*/
|
|
6363
|
-
|
|
6441
|
+
interface Resistance {
|
|
6364
6442
|
|
|
6365
6443
|
/**
|
|
6366
6444
|
* The {@link flat resistance | https://wiki.factorio.com/Damage#Decrease.2C_or_.22flat.22_resistance} to the given damage type. (Higher is better)
|
|
@@ -6372,7 +6450,7 @@ type Resistances = Array<{
|
|
|
6372
6450
|
*/
|
|
6373
6451
|
percent?: number,
|
|
6374
6452
|
type: DamageTypeID
|
|
6375
|
-
}
|
|
6453
|
+
}
|
|
6376
6454
|
|
|
6377
6455
|
/**
|
|
6378
6456
|
* The name of a {@link ResourceCategory | prototype:ResourceCategory}.
|
|
@@ -6428,11 +6506,11 @@ Direction count to {@link Direction | prototype:Direction} (animation sequence n
|
|
|
6428
6506
|
direction_count: number,
|
|
6429
6507
|
|
|
6430
6508
|
/**
|
|
6431
|
-
* Only loaded if `layers`, `stripes`, and `filenames` are not defined.
|
|
6509
|
+
* Only loaded, and mandatory if `layers`, `stripes`, and `filenames` are not defined.
|
|
6432
6510
|
|
|
6433
6511
|
The path to the sprite file to use.
|
|
6434
6512
|
*/
|
|
6435
|
-
filename
|
|
6513
|
+
filename?: FileName,
|
|
6436
6514
|
|
|
6437
6515
|
/**
|
|
6438
6516
|
* Only loaded if both `layers` and `stripes` are not defined.
|
|
@@ -6615,9 +6693,9 @@ The path to the sprite file to use.
|
|
|
6615
6693
|
filename?: FileName,
|
|
6616
6694
|
|
|
6617
6695
|
/**
|
|
6618
|
-
* Only loaded if both `layers` and `filename` are not defined.
|
|
6696
|
+
* Only loaded, and mandatory if both `layers` and `filename` are not defined.
|
|
6619
6697
|
*/
|
|
6620
|
-
filenames
|
|
6698
|
+
filenames?: FileName[],
|
|
6621
6699
|
|
|
6622
6700
|
/**
|
|
6623
6701
|
* Only loaded if `layers` is not defined.
|
|
@@ -6960,9 +7038,9 @@ type Sound = {
|
|
|
6960
7038
|
/**
|
|
6961
7039
|
* Supported sound file formats are `.ogg (Vorbis)` and `.wav`.
|
|
6962
7040
|
|
|
6963
|
-
Only loaded if `variations` is not defined.
|
|
7041
|
+
Only loaded, and mandatory if `variations` is not defined.
|
|
6964
7042
|
*/
|
|
6965
|
-
filename
|
|
7043
|
+
filename?: FileName,
|
|
6966
7044
|
game_controller_vibration_data?: GameControllerVibrationData,
|
|
6967
7045
|
|
|
6968
7046
|
/**
|
|
@@ -7225,18 +7303,25 @@ interface SpotNoiseArguments {
|
|
|
7225
7303
|
* When there is more than one sprite or {@link Animation | prototype:Animation} frame with the same source file and dimensions/position in the game, they all share the same memory.
|
|
7226
7304
|
* @example
|
|
7227
7305
|
* ```
|
|
7228
|
-
*
|
|
7229
|
-
*
|
|
7230
|
-
*
|
|
7231
|
-
*
|
|
7232
|
-
*
|
|
7233
|
-
*
|
|
7306
|
+
* picture_set_enemy =
|
|
7307
|
+
* {
|
|
7308
|
+
* filename = "__base__/graphics/entity/land-mine/land-mine-set-enemy.png",
|
|
7309
|
+
* priority = "medium",
|
|
7310
|
+
* width = 32,
|
|
7311
|
+
* height = 32
|
|
7234
7312
|
* }
|
|
7235
7313
|
* ```
|
|
7236
7314
|
*
|
|
7237
7315
|
*/
|
|
7238
7316
|
interface Sprite extends SpriteParameters{
|
|
7239
7317
|
|
|
7318
|
+
/**
|
|
7319
|
+
* Only loaded, and mandatory if `layers` is not defined.
|
|
7320
|
+
|
|
7321
|
+
The path to the sprite file to use.
|
|
7322
|
+
*/
|
|
7323
|
+
filename?: FileName,
|
|
7324
|
+
|
|
7240
7325
|
/**
|
|
7241
7326
|
* Only loaded if `layers` is not defined.
|
|
7242
7327
|
|
|
@@ -7274,19 +7359,19 @@ Same as `slice`, but this specifies only how many slices there are on the y-axis
|
|
|
7274
7359
|
}
|
|
7275
7360
|
|
|
7276
7361
|
/**
|
|
7277
|
-
* A map of sprites for all 4 directions of the entity.
|
|
7362
|
+
* A map of sprites for all 4 directions of the entity. If this is loaded as a single Sprite, it applies to all directions.
|
|
7278
7363
|
*/
|
|
7279
7364
|
type Sprite4Way = {
|
|
7280
7365
|
|
|
7281
7366
|
/**
|
|
7282
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7367
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7283
7368
|
*/
|
|
7284
|
-
east
|
|
7369
|
+
east?: Sprite,
|
|
7285
7370
|
|
|
7286
7371
|
/**
|
|
7287
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7372
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7288
7373
|
*/
|
|
7289
|
-
north
|
|
7374
|
+
north?: Sprite,
|
|
7290
7375
|
|
|
7291
7376
|
/**
|
|
7292
7377
|
* Only loaded if `sheets` is not defined.
|
|
@@ -7295,14 +7380,14 @@ type Sprite4Way = {
|
|
|
7295
7380
|
sheets?: SpriteNWaySheet[],
|
|
7296
7381
|
|
|
7297
7382
|
/**
|
|
7298
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7383
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7299
7384
|
*/
|
|
7300
|
-
south
|
|
7385
|
+
south?: Sprite,
|
|
7301
7386
|
|
|
7302
7387
|
/**
|
|
7303
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7388
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7304
7389
|
*/
|
|
7305
|
-
west
|
|
7390
|
+
west?: Sprite
|
|
7306
7391
|
} | Sprite
|
|
7307
7392
|
|
|
7308
7393
|
/**
|
|
@@ -7311,24 +7396,24 @@ type Sprite4Way = {
|
|
|
7311
7396
|
interface Sprite8Way {
|
|
7312
7397
|
|
|
7313
7398
|
/**
|
|
7314
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7399
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7315
7400
|
*/
|
|
7316
|
-
east
|
|
7401
|
+
east?: Sprite,
|
|
7317
7402
|
|
|
7318
7403
|
/**
|
|
7319
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7404
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7320
7405
|
*/
|
|
7321
|
-
north
|
|
7406
|
+
north?: Sprite,
|
|
7322
7407
|
|
|
7323
7408
|
/**
|
|
7324
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7409
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7325
7410
|
*/
|
|
7326
|
-
north_east
|
|
7411
|
+
north_east?: Sprite,
|
|
7327
7412
|
|
|
7328
7413
|
/**
|
|
7329
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7414
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7330
7415
|
*/
|
|
7331
|
-
north_west
|
|
7416
|
+
north_west?: Sprite,
|
|
7332
7417
|
|
|
7333
7418
|
/**
|
|
7334
7419
|
* Only loaded if `sheets` is not defined.
|
|
@@ -7337,24 +7422,24 @@ interface Sprite8Way {
|
|
|
7337
7422
|
sheets?: SpriteNWaySheet[],
|
|
7338
7423
|
|
|
7339
7424
|
/**
|
|
7340
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7425
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7341
7426
|
*/
|
|
7342
|
-
south
|
|
7427
|
+
south?: Sprite,
|
|
7343
7428
|
|
|
7344
7429
|
/**
|
|
7345
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7430
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7346
7431
|
*/
|
|
7347
|
-
south_east
|
|
7432
|
+
south_east?: Sprite,
|
|
7348
7433
|
|
|
7349
7434
|
/**
|
|
7350
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7435
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7351
7436
|
*/
|
|
7352
|
-
south_west
|
|
7437
|
+
south_west?: Sprite,
|
|
7353
7438
|
|
|
7354
7439
|
/**
|
|
7355
|
-
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
7440
|
+
* Only loaded, and mandatory if both `sheets` and `sheet` are not defined.
|
|
7356
7441
|
*/
|
|
7357
|
-
west
|
|
7442
|
+
west?: Sprite
|
|
7358
7443
|
}
|
|
7359
7444
|
|
|
7360
7445
|
/**
|
|
@@ -8311,6 +8396,7 @@ interface TransportBeltConnectorFrame {
|
|
|
8311
8396
|
frame_main_scanner_vertical_end_shift: Vector,
|
|
8312
8397
|
frame_main_scanner_vertical_rotation: RealOrientation,
|
|
8313
8398
|
frame_main_scanner_vertical_start_shift: Vector,
|
|
8399
|
+
frame_main_scanner_vertical_y_scale: number,
|
|
8314
8400
|
frame_shadow: AnimationVariations
|
|
8315
8401
|
}
|
|
8316
8402
|
|
|
@@ -8663,10 +8749,10 @@ interface UsePipetteTipTrigger {
|
|
|
8663
8749
|
}
|
|
8664
8750
|
|
|
8665
8751
|
/**
|
|
8666
|
-
* A vector is a two-element array containing the x and y components.
|
|
8752
|
+
* A vector is a two-element array or dictionary containing the x and y components. Positive x goes east, positive y goes south.
|
|
8667
8753
|
* @example
|
|
8668
8754
|
* ```
|
|
8669
|
-
*
|
|
8755
|
+
* shift = {0, 12}
|
|
8670
8756
|
* ```
|
|
8671
8757
|
*
|
|
8672
8758
|
* @example
|
|
@@ -8674,8 +8760,16 @@ interface UsePipetteTipTrigger {
|
|
|
8674
8760
|
* right = {1.0, 0.5}
|
|
8675
8761
|
* ```
|
|
8676
8762
|
*
|
|
8763
|
+
* @example
|
|
8764
|
+
* ```
|
|
8765
|
+
* vector = {x = 2.3, y = 3.4}
|
|
8766
|
+
* ```
|
|
8767
|
+
*
|
|
8677
8768
|
*/
|
|
8678
|
-
type Vector =
|
|
8769
|
+
type Vector = {
|
|
8770
|
+
x: number,
|
|
8771
|
+
y: number
|
|
8772
|
+
} |
|
|
8679
8773
|
[ number,
|
|
8680
8774
|
number
|
|
8681
8775
|
]
|