factorio-types 0.0.42 → 0.0.43
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 +97 -12
- package/dist/concepts.d.ts +26 -1
- package/dist/defines.d.ts +6 -1
- package/dist/events.d.ts +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +59 -53
- package/dist/types.d.ts +9 -9
- package/package.json +1 -1
package/dist/classes.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/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.93
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -3083,6 +3083,13 @@ interface LuaEntity extends LuaControl {
|
|
|
3083
3083
|
*/
|
|
3084
3084
|
update_connections(this: void): void
|
|
3085
3085
|
|
|
3086
|
+
/**
|
|
3087
|
+
* @remarks
|
|
3088
|
+
* Applies to subclasses: Spawner
|
|
3089
|
+
*
|
|
3090
|
+
*/
|
|
3091
|
+
readonly absorbed_pollution: number
|
|
3092
|
+
|
|
3086
3093
|
/**
|
|
3087
3094
|
* Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
|
|
3088
3095
|
* @remarks
|
|
@@ -4094,11 +4101,25 @@ interface LuaEntity extends LuaControl {
|
|
|
4094
4101
|
*/
|
|
4095
4102
|
readonly signal_state: defines.signal_state
|
|
4096
4103
|
|
|
4104
|
+
/**
|
|
4105
|
+
* @remarks
|
|
4106
|
+
* Applies to subclasses: Spawner
|
|
4107
|
+
*
|
|
4108
|
+
*/
|
|
4109
|
+
readonly spawn_shift: number
|
|
4110
|
+
|
|
4097
4111
|
/**
|
|
4098
4112
|
* The spawner associated with this unit entity, if any.
|
|
4099
4113
|
*/
|
|
4100
4114
|
readonly spawner?: LuaEntity
|
|
4101
4115
|
|
|
4116
|
+
/**
|
|
4117
|
+
* @remarks
|
|
4118
|
+
* Applies to subclasses: Spawner
|
|
4119
|
+
*
|
|
4120
|
+
*/
|
|
4121
|
+
readonly spawning_cooldown: number
|
|
4122
|
+
|
|
4102
4123
|
/**
|
|
4103
4124
|
* The current speed if this is a car, rolling stock, projectile or spidertron, or the maximum speed if this is a unit. The speed is in tiles per tick. `nil` if this is not a car, rolling stock, unit, projectile or spidertron.
|
|
4104
4125
|
*
|
|
@@ -4155,6 +4176,14 @@ interface LuaEntity extends LuaControl {
|
|
|
4155
4176
|
*/
|
|
4156
4177
|
readonly sticked_to: LuaEntity
|
|
4157
4178
|
|
|
4179
|
+
/**
|
|
4180
|
+
* The vehicle modifiers applied to this entity through the attached stickers.
|
|
4181
|
+
*/
|
|
4182
|
+
readonly sticker_vehicle_modifiers?: {
|
|
4183
|
+
friction_modifier: number,
|
|
4184
|
+
speed_modifier: number
|
|
4185
|
+
}
|
|
4186
|
+
|
|
4158
4187
|
/**
|
|
4159
4188
|
* The sticker entities attached to this entity, if any.
|
|
4160
4189
|
*/
|
|
@@ -4338,6 +4367,9 @@ interface LuaEntity extends LuaControl {
|
|
|
4338
4367
|
|
|
4339
4368
|
/**
|
|
4340
4369
|
* The units associated with this spawner entity.
|
|
4370
|
+
* @remarks
|
|
4371
|
+
* Applies to subclasses: Spawner
|
|
4372
|
+
*
|
|
4341
4373
|
*/
|
|
4342
4374
|
readonly units: LuaEntity[]
|
|
4343
4375
|
|
|
@@ -4717,6 +4749,13 @@ interface LuaEntityPrototype {
|
|
|
4717
4749
|
*/
|
|
4718
4750
|
readonly color?: Color
|
|
4719
4751
|
|
|
4752
|
+
/**
|
|
4753
|
+
* @remarks
|
|
4754
|
+
* Applies to subclasses: RollingStock
|
|
4755
|
+
*
|
|
4756
|
+
*/
|
|
4757
|
+
readonly connection_distance?: number
|
|
4758
|
+
|
|
4720
4759
|
/**
|
|
4721
4760
|
* The construction radius for this roboport prototype.
|
|
4722
4761
|
* @remarks
|
|
@@ -5289,6 +5328,13 @@ interface LuaEntityPrototype {
|
|
|
5289
5328
|
*/
|
|
5290
5329
|
readonly items_to_place_this?: ItemStackDefinition[]
|
|
5291
5330
|
|
|
5331
|
+
/**
|
|
5332
|
+
* @remarks
|
|
5333
|
+
* Applies to subclasses: RollingStock
|
|
5334
|
+
*
|
|
5335
|
+
*/
|
|
5336
|
+
readonly joint_distance?: number
|
|
5337
|
+
|
|
5292
5338
|
/**
|
|
5293
5339
|
* The item prototype names that are the inputs of this lab prototype.
|
|
5294
5340
|
* @remarks
|
|
@@ -5713,6 +5759,8 @@ interface LuaEntityPrototype {
|
|
|
5713
5759
|
*/
|
|
5714
5760
|
readonly radius: number
|
|
5715
5761
|
|
|
5762
|
+
readonly radius_visualisation_specification?: RadiusVisualisationSpecification
|
|
5763
|
+
|
|
5716
5764
|
/**
|
|
5717
5765
|
* @remarks
|
|
5718
5766
|
* Applies to subclasses: Character
|
|
@@ -5890,6 +5938,20 @@ interface LuaEntityPrototype {
|
|
|
5890
5938
|
min: number
|
|
5891
5939
|
}
|
|
5892
5940
|
|
|
5941
|
+
/**
|
|
5942
|
+
* @remarks
|
|
5943
|
+
* Applies to subclasses: Spawner,Turret
|
|
5944
|
+
*
|
|
5945
|
+
*/
|
|
5946
|
+
readonly spawn_decoration?: TriggerEffectItem[]
|
|
5947
|
+
|
|
5948
|
+
/**
|
|
5949
|
+
* @remarks
|
|
5950
|
+
* Applies to subclasses: Spawner,Turret
|
|
5951
|
+
*
|
|
5952
|
+
*/
|
|
5953
|
+
readonly spawn_decorations_on_expansion?: boolean
|
|
5954
|
+
|
|
5893
5955
|
/**
|
|
5894
5956
|
* How far from the spawner can the units be spawned.
|
|
5895
5957
|
* @remarks
|
|
@@ -6790,7 +6852,7 @@ interface LuaFluidBox {
|
|
|
6790
6852
|
* Gets unique fluid system identifier of selected fluid box. May return nil for fluid wagon, fluid turret's internal buffer or a fluidbox which does not belong to a fluid system
|
|
6791
6853
|
*/
|
|
6792
6854
|
get_fluid_system_id(this: void,
|
|
6793
|
-
index: number): number
|
|
6855
|
+
index: number): number | null
|
|
6794
6856
|
|
|
6795
6857
|
/**
|
|
6796
6858
|
* Returns the fluid the fluidbox is locked onto
|
|
@@ -7323,6 +7385,14 @@ interface LuaForce {
|
|
|
7323
7385
|
surface: SurfaceIdentification,
|
|
7324
7386
|
position: ChunkPosition): boolean
|
|
7325
7387
|
|
|
7388
|
+
/**
|
|
7389
|
+
* Has a chunk been requested for charting?
|
|
7390
|
+
* @param position - Position of the chunk.
|
|
7391
|
+
*/
|
|
7392
|
+
is_chunk_requested_for_charting(this: void,
|
|
7393
|
+
surface: SurfaceIdentification,
|
|
7394
|
+
position: ChunkPosition): boolean
|
|
7395
|
+
|
|
7326
7396
|
/**
|
|
7327
7397
|
* Is the given chunk currently charted and visible (not covered by fog of war) on the map.
|
|
7328
7398
|
*/
|
|
@@ -7370,12 +7440,12 @@ interface LuaForce {
|
|
|
7370
7440
|
/**
|
|
7371
7441
|
* Print text to the chat console of all players on this force.
|
|
7372
7442
|
* @remarks
|
|
7373
|
-
*
|
|
7443
|
+
* By default, messages that are identical to a message sent in the last 60 ticks are not printed again.
|
|
7374
7444
|
*
|
|
7375
7445
|
*/
|
|
7376
7446
|
print(this: void,
|
|
7377
7447
|
message: LocalisedString,
|
|
7378
|
-
|
|
7448
|
+
print_settings?: Color | PrintSettings): void
|
|
7379
7449
|
|
|
7380
7450
|
/**
|
|
7381
7451
|
* Force a rechart of the whole chart.
|
|
@@ -8158,6 +8228,14 @@ interface LuaGameScript {
|
|
|
8158
8228
|
get_surface(this: void,
|
|
8159
8229
|
surface: number | string): LuaSurface | null
|
|
8160
8230
|
|
|
8231
|
+
/**
|
|
8232
|
+
* Searches for a train with given ID.
|
|
8233
|
+
* @param train_id - Train ID to search
|
|
8234
|
+
* @returns Train if found
|
|
8235
|
+
*/
|
|
8236
|
+
get_train_by_id(this: void,
|
|
8237
|
+
train_id: number): LuaTrain | null
|
|
8238
|
+
|
|
8161
8239
|
/**
|
|
8162
8240
|
* Gets train stops matching the given filters.
|
|
8163
8241
|
* @param table.force - The force to search. Not providing a force will match stops in any force.
|
|
@@ -8256,12 +8334,12 @@ interface LuaGameScript {
|
|
|
8256
8334
|
/**
|
|
8257
8335
|
* Print text to the chat console all players.
|
|
8258
8336
|
* @remarks
|
|
8259
|
-
*
|
|
8337
|
+
* By default, messages that are identical to a message sent in the last 60 ticks are not printed again.
|
|
8260
8338
|
*
|
|
8261
8339
|
*/
|
|
8262
8340
|
print(this: void,
|
|
8263
8341
|
message: LocalisedString,
|
|
8264
|
-
|
|
8342
|
+
print_settings?: Color | PrintSettings): void
|
|
8265
8343
|
|
|
8266
8344
|
/**
|
|
8267
8345
|
* Purges the given players messages from the game. Does nothing if the player running this isn't an admin.
|
|
@@ -8331,8 +8409,8 @@ interface LuaGameScript {
|
|
|
8331
8409
|
save_atlas(this: void): void
|
|
8332
8410
|
|
|
8333
8411
|
/**
|
|
8334
|
-
* Instruct the server to save the map.
|
|
8335
|
-
* @param name - Save name. If not specified,
|
|
8412
|
+
* Instruct the server to save the map. Only actually saves when in multiplayer.
|
|
8413
|
+
* @param name - Save file name. If not specified, the currently running save is overwritten.
|
|
8336
8414
|
*/
|
|
8337
8415
|
server_save(this: void,
|
|
8338
8416
|
name?: string): void
|
|
@@ -12986,12 +13064,12 @@ interface LuaPlayer extends LuaControl {
|
|
|
12986
13064
|
/**
|
|
12987
13065
|
* Print text to the chat console.
|
|
12988
13066
|
* @remarks
|
|
12989
|
-
*
|
|
13067
|
+
* By default, messages that are identical to a message sent in the last 60 ticks are not printed again.
|
|
12990
13068
|
*
|
|
12991
13069
|
*/
|
|
12992
13070
|
print(this: void,
|
|
12993
13071
|
message: LocalisedString,
|
|
12994
|
-
|
|
13072
|
+
print_settings?: Color | PrintSettings): void
|
|
12995
13073
|
|
|
12996
13074
|
/**
|
|
12997
13075
|
* Print entity statistics to the player's console.
|
|
@@ -15607,6 +15685,13 @@ interface LuaStyle {
|
|
|
15607
15685
|
*/
|
|
15608
15686
|
disabled_font_color: Color
|
|
15609
15687
|
|
|
15688
|
+
/**
|
|
15689
|
+
* @remarks
|
|
15690
|
+
* Applies to subclasses: LuaButtonStyle
|
|
15691
|
+
*
|
|
15692
|
+
*/
|
|
15693
|
+
draw_grayscale_picture: boolean
|
|
15694
|
+
|
|
15610
15695
|
/**
|
|
15611
15696
|
* @remarks
|
|
15612
15697
|
* Applies to subclasses: ScrollPaneStyle
|
|
@@ -16786,12 +16871,12 @@ interface LuaSurface {
|
|
|
16786
16871
|
/**
|
|
16787
16872
|
* Print text to the chat console of all players on this surface.
|
|
16788
16873
|
* @remarks
|
|
16789
|
-
*
|
|
16874
|
+
* By default, messages that are identical to a message sent in the last 60 ticks are not printed again.
|
|
16790
16875
|
*
|
|
16791
16876
|
*/
|
|
16792
16877
|
print(this: void,
|
|
16793
16878
|
message: LocalisedString,
|
|
16794
|
-
|
|
16879
|
+
print_settings?: Color | PrintSettings): void
|
|
16795
16880
|
|
|
16796
16881
|
/**
|
|
16797
16882
|
* Regenerate autoplacement of some decoratives on this surface. This can be used to autoplace newly-added decoratives.
|
package/dist/concepts.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/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.93
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -2306,6 +2306,24 @@ interface PollutionMapSettings {
|
|
|
2306
2306
|
pollution_with_max_forest_damage: number
|
|
2307
2307
|
}
|
|
2308
2308
|
|
|
2309
|
+
interface PrintSettings {
|
|
2310
|
+
|
|
2311
|
+
/**
|
|
2312
|
+
* Color of the message to print. Defaults to white.
|
|
2313
|
+
*/
|
|
2314
|
+
color?: Color,
|
|
2315
|
+
|
|
2316
|
+
/**
|
|
2317
|
+
* If true and a message with the same text is still visible in the console, it will do nothing. Defaults to `true`.
|
|
2318
|
+
*/
|
|
2319
|
+
skip_if_redundant?: boolean,
|
|
2320
|
+
|
|
2321
|
+
/**
|
|
2322
|
+
* If a sound should be emitted for this message. Defaults to `defines.print_sound.use_player_settings`.
|
|
2323
|
+
*/
|
|
2324
|
+
sound?: defines.print_sound
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2309
2327
|
/**
|
|
2310
2328
|
* @remarks
|
|
2311
2329
|
* Other attributes may be specified depending on `type`:
|
|
@@ -2378,6 +2396,13 @@ interface PrototypeHistory {
|
|
|
2378
2396
|
created: string
|
|
2379
2397
|
}
|
|
2380
2398
|
|
|
2399
|
+
interface RadiusVisualisationSpecification {
|
|
2400
|
+
distance: number,
|
|
2401
|
+
draw_in_cursor: boolean,
|
|
2402
|
+
draw_on_selection: boolean,
|
|
2403
|
+
offset: Vector
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2381
2406
|
/**
|
|
2382
2407
|
* The smooth orientation. It is a {@link float | runtime:float} in the range `[0, 1)` that covers a full circle, starting at the top and going clockwise. This means a value of `0` indicates "north", a value of `0.5` indicates "south".
|
|
2383
2408
|
*
|
package/dist/defines.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/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.93
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -1014,6 +1014,11 @@ declare namespace defines {
|
|
|
1014
1014
|
none,
|
|
1015
1015
|
right,
|
|
1016
1016
|
}
|
|
1017
|
+
enum print_sound {
|
|
1018
|
+
always,
|
|
1019
|
+
never,
|
|
1020
|
+
use_player_settings,
|
|
1021
|
+
}
|
|
1017
1022
|
/**
|
|
1018
1023
|
* A dictionary mapping all top-level prototypes by name to a list of their associated subtypes. This list is organized as a lookup table, meaning it maps the sub-prototype names to `0`. As an example, `defines.prototypes['entity']` looks like this: `{furnace=0, inserter=0, container=0, ...}`.
|
|
1019
1024
|
*/
|
package/dist/events.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/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.93
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
package/dist/global.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/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.93
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/prototypes.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.93
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -311,7 +311,7 @@ interface AccumulatorPrototype extends EntityWithOwnerPrototype{
|
|
|
311
311
|
* The capacity of the energy source buffer specifies the capacity of the accumulator.
|
|
312
312
|
*/
|
|
313
313
|
energy_source: ElectricEnergySource,
|
|
314
|
-
picture
|
|
314
|
+
picture?: Sprite
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
/**
|
|
@@ -704,17 +704,17 @@ Vertical position of the animation in the source file in pixels.
|
|
|
704
704
|
* An {@link arithmetic combinator | https://wiki.factorio.com/Arithmetic_combinator}.
|
|
705
705
|
*/
|
|
706
706
|
interface ArithmeticCombinatorPrototype extends CombinatorPrototype{
|
|
707
|
-
and_symbol_sprites
|
|
708
|
-
divide_symbol_sprites
|
|
709
|
-
left_shift_symbol_sprites
|
|
710
|
-
minus_symbol_sprites
|
|
711
|
-
modulo_symbol_sprites
|
|
712
|
-
multiply_symbol_sprites
|
|
713
|
-
or_symbol_sprites
|
|
714
|
-
plus_symbol_sprites
|
|
715
|
-
power_symbol_sprites
|
|
716
|
-
right_shift_symbol_sprites
|
|
717
|
-
xor_symbol_sprites
|
|
707
|
+
and_symbol_sprites?: Sprite4Way,
|
|
708
|
+
divide_symbol_sprites?: Sprite4Way,
|
|
709
|
+
left_shift_symbol_sprites?: Sprite4Way,
|
|
710
|
+
minus_symbol_sprites?: Sprite4Way,
|
|
711
|
+
modulo_symbol_sprites?: Sprite4Way,
|
|
712
|
+
multiply_symbol_sprites?: Sprite4Way,
|
|
713
|
+
or_symbol_sprites?: Sprite4Way,
|
|
714
|
+
plus_symbol_sprites?: Sprite4Way,
|
|
715
|
+
power_symbol_sprites?: Sprite4Way,
|
|
716
|
+
right_shift_symbol_sprites?: Sprite4Way,
|
|
717
|
+
xor_symbol_sprites?: Sprite4Way
|
|
718
718
|
}
|
|
719
719
|
|
|
720
720
|
/**
|
|
@@ -1044,7 +1044,7 @@ The animation for the beacon, when in use.
|
|
|
1044
1044
|
|
|
1045
1045
|
The picture of the beacon when it is not on.
|
|
1046
1046
|
*/
|
|
1047
|
-
base_picture?:
|
|
1047
|
+
base_picture?: Animation,
|
|
1048
1048
|
|
|
1049
1049
|
/**
|
|
1050
1050
|
* The multiplier of the module's effects, when shared between neighbors.
|
|
@@ -1368,7 +1368,7 @@ interface BurnerGeneratorPrototype extends EntityWithOwnerPrototype{
|
|
|
1368
1368
|
/**
|
|
1369
1369
|
* Plays when the generator is active. `idle_animation` must have the same frame count as animation.
|
|
1370
1370
|
*/
|
|
1371
|
-
animation
|
|
1371
|
+
animation?: Animation4Way,
|
|
1372
1372
|
|
|
1373
1373
|
/**
|
|
1374
1374
|
* The input energy source of the generator.
|
|
@@ -1701,7 +1701,7 @@ interface CombatRobotPrototype extends FlyingRobotPrototype{
|
|
|
1701
1701
|
friction?: number,
|
|
1702
1702
|
idle: RotatedAnimation,
|
|
1703
1703
|
in_motion: RotatedAnimation,
|
|
1704
|
-
light
|
|
1704
|
+
light?: LightDefinition,
|
|
1705
1705
|
range_from_player?: number,
|
|
1706
1706
|
shadow_idle: RotatedAnimation,
|
|
1707
1707
|
shadow_in_motion: RotatedAnimation,
|
|
@@ -1721,7 +1721,7 @@ interface CombinatorPrototype extends EntityWithOwnerPrototype{
|
|
|
1721
1721
|
Vector,
|
|
1722
1722
|
Vector
|
|
1723
1723
|
],
|
|
1724
|
-
activity_led_sprites
|
|
1724
|
+
activity_led_sprites?: Sprite4Way,
|
|
1725
1725
|
|
|
1726
1726
|
/**
|
|
1727
1727
|
* The maximum circuit wire distance for this entity.
|
|
@@ -1751,7 +1751,7 @@ interface CombinatorPrototype extends EntityWithOwnerPrototype{
|
|
|
1751
1751
|
Vector,
|
|
1752
1752
|
Vector
|
|
1753
1753
|
],
|
|
1754
|
-
sprites
|
|
1754
|
+
sprites?: Sprite4Way
|
|
1755
1755
|
}
|
|
1756
1756
|
|
|
1757
1757
|
/**
|
|
@@ -1765,7 +1765,7 @@ interface ConstantCombinatorPrototype extends EntityWithOwnerPrototype{
|
|
|
1765
1765
|
Vector,
|
|
1766
1766
|
Vector
|
|
1767
1767
|
],
|
|
1768
|
-
activity_led_sprites
|
|
1768
|
+
activity_led_sprites?: Sprite4Way,
|
|
1769
1769
|
circuit_wire_connection_points:
|
|
1770
1770
|
[ WireConnectionPoint,
|
|
1771
1771
|
WireConnectionPoint,
|
|
@@ -1780,7 +1780,7 @@ interface ConstantCombinatorPrototype extends EntityWithOwnerPrototype{
|
|
|
1780
1780
|
draw_circuit_wires?: boolean,
|
|
1781
1781
|
draw_copper_wires?: boolean,
|
|
1782
1782
|
item_slot_count: number,
|
|
1783
|
-
sprites
|
|
1783
|
+
sprites?: Sprite4Way
|
|
1784
1784
|
}
|
|
1785
1785
|
|
|
1786
1786
|
/**
|
|
@@ -2237,12 +2237,12 @@ interface DamageType extends PrototypeBase{
|
|
|
2237
2237
|
* A {@link decider combinator | https://wiki.factorio.com/Decider_combinator}.
|
|
2238
2238
|
*/
|
|
2239
2239
|
interface DeciderCombinatorPrototype extends CombinatorPrototype{
|
|
2240
|
-
equal_symbol_sprites
|
|
2241
|
-
greater_or_equal_symbol_sprites
|
|
2242
|
-
greater_symbol_sprites
|
|
2243
|
-
less_or_equal_symbol_sprites
|
|
2244
|
-
less_symbol_sprites
|
|
2245
|
-
not_equal_symbol_sprites
|
|
2240
|
+
equal_symbol_sprites?: Sprite4Way,
|
|
2241
|
+
greater_or_equal_symbol_sprites?: Sprite4Way,
|
|
2242
|
+
greater_symbol_sprites?: Sprite4Way,
|
|
2243
|
+
less_or_equal_symbol_sprites?: Sprite4Way,
|
|
2244
|
+
less_symbol_sprites?: Sprite4Way,
|
|
2245
|
+
not_equal_symbol_sprites?: Sprite4Way
|
|
2246
2246
|
}
|
|
2247
2247
|
|
|
2248
2248
|
/**
|
|
@@ -2829,6 +2829,10 @@ Either this or `icon` is mandatory for entities that have at least one of these
|
|
|
2829
2829
|
* Used instead of the collision box during map generation. Allows space entities differently during map generation, for example if the box is bigger, the entities will be placed farther apart.
|
|
2830
2830
|
*/
|
|
2831
2831
|
map_generator_bounding_box?: BoundingBox,
|
|
2832
|
+
|
|
2833
|
+
/**
|
|
2834
|
+
* The item given to the player when they mine the entity and other properties relevant to mining this entity.
|
|
2835
|
+
*/
|
|
2832
2836
|
minable?: MinableProperties,
|
|
2833
2837
|
mined_sound?: Sound,
|
|
2834
2838
|
mining_sound?: Sound,
|
|
@@ -3688,6 +3692,11 @@ interface FurnacePrototype extends CraftingMachinePrototype{
|
|
|
3688
3692
|
interface GatePrototype extends EntityWithOwnerPrototype{
|
|
3689
3693
|
activation_distance: number,
|
|
3690
3694
|
|
|
3695
|
+
/**
|
|
3696
|
+
* Played when the gate closes.
|
|
3697
|
+
*/
|
|
3698
|
+
close_sound: Sound,
|
|
3699
|
+
|
|
3691
3700
|
/**
|
|
3692
3701
|
* Two entities can collide only if they share a layer from the collision mask.
|
|
3693
3702
|
*/
|
|
@@ -3698,6 +3707,11 @@ interface GatePrototype extends EntityWithOwnerPrototype{
|
|
|
3698
3707
|
horizontal_rail_animation_right: Animation,
|
|
3699
3708
|
horizontal_rail_base: Animation,
|
|
3700
3709
|
|
|
3710
|
+
/**
|
|
3711
|
+
* Played when the gate opens.
|
|
3712
|
+
*/
|
|
3713
|
+
open_sound: Sound,
|
|
3714
|
+
|
|
3701
3715
|
/**
|
|
3702
3716
|
* This collision mask is used when the gate is open.
|
|
3703
3717
|
*/
|
|
@@ -3749,7 +3763,7 @@ In these cases, this property determines whether the fluid should be destroyed,
|
|
|
3749
3763
|
/**
|
|
3750
3764
|
* How much energy the generator produces compared to how much energy it consumes. For example, an effectivity of 0.5 means that half of the consumed energy is output as power.
|
|
3751
3765
|
*/
|
|
3752
|
-
effectivity
|
|
3766
|
+
effectivity?: number,
|
|
3753
3767
|
energy_source: ElectricEnergySource,
|
|
3754
3768
|
|
|
3755
3769
|
/**
|
|
@@ -3761,7 +3775,7 @@ In these cases, this property determines whether the fluid should be destroyed,
|
|
|
3761
3775
|
* The number of fluid units the generator uses per tick.
|
|
3762
3776
|
*/
|
|
3763
3777
|
fluid_usage_per_tick: number,
|
|
3764
|
-
horizontal_animation
|
|
3778
|
+
horizontal_animation?: Animation,
|
|
3765
3779
|
|
|
3766
3780
|
/**
|
|
3767
3781
|
* The power production of the generator is capped to this value. This is also the value that is shown as the maximum power output in the tooltip of the generator.
|
|
@@ -3792,7 +3806,7 @@ If scale_fluid_usage is false, the generator consumes the full `fluid_usage_per_
|
|
|
3792
3806
|
*/
|
|
3793
3807
|
scale_fluid_usage?: boolean,
|
|
3794
3808
|
smoke?: SmokeSource[],
|
|
3795
|
-
vertical_animation
|
|
3809
|
+
vertical_animation?: Animation
|
|
3796
3810
|
}
|
|
3797
3811
|
|
|
3798
3812
|
/**
|
|
@@ -4744,7 +4758,7 @@ interface LoaderPrototype extends TransportBeltConnectablePrototype{
|
|
|
4744
4758
|
allow_rail_interaction?: boolean,
|
|
4745
4759
|
|
|
4746
4760
|
/**
|
|
4747
|
-
* How long this loader's belt is. Should be the same as belt_distance, which is hardcoded to `0.5` for {@link Loader1x2Prototype | prototype:Loader1x2Prototype} and to 0 for {@link Loader1x1Prototype | prototype:Loader1x1Prototype}.
|
|
4761
|
+
* How long this loader's belt is. Should be the same as belt_distance, which is hardcoded to `0.5` for {@link Loader1x2Prototype | prototype:Loader1x2Prototype} and to 0 for {@link Loader1x1Prototype | prototype:Loader1x1Prototype}. See the linked prototypes for an explanation of belt_distance.
|
|
4748
4762
|
*/
|
|
4749
4763
|
belt_length?: number,
|
|
4750
4764
|
|
|
@@ -5356,7 +5370,7 @@ If set, this specifies whether collision with tiles should (true) or should not
|
|
|
5356
5370
|
|
|
5357
5371
|
Deprecated, use `graphics_set` instead.
|
|
5358
5372
|
*/
|
|
5359
|
-
picture?:
|
|
5373
|
+
picture?: Animation4Way,
|
|
5360
5374
|
placeable_position_visualization?: Sprite,
|
|
5361
5375
|
|
|
5362
5376
|
/**
|
|
@@ -5611,7 +5625,7 @@ interface ProjectilePrototype extends EntityPrototype{
|
|
|
5611
5625
|
* Executed when the projectile hits something.
|
|
5612
5626
|
*/
|
|
5613
5627
|
action?: Trigger,
|
|
5614
|
-
animation?:
|
|
5628
|
+
animation?: AnimationVariations,
|
|
5615
5629
|
|
|
5616
5630
|
/**
|
|
5617
5631
|
* Two entities can collide only if they share a layer from the collision mask.
|
|
@@ -5652,7 +5666,7 @@ interface ProjectilePrototype extends EntityPrototype{
|
|
|
5652
5666
|
* Whether the animation of the projectile is rotated to match the direction of travel.
|
|
5653
5667
|
*/
|
|
5654
5668
|
rotatable?: boolean,
|
|
5655
|
-
shadow?:
|
|
5669
|
+
shadow?: AnimationVariations,
|
|
5656
5670
|
smoke?: SmokeSource[],
|
|
5657
5671
|
speed_modifier?: Vector,
|
|
5658
5672
|
|
|
@@ -6936,8 +6950,8 @@ Additional energy used during the night i.e. when {@link LuaSurface::darkness |
|
|
|
6936
6950
|
*/
|
|
6937
6951
|
rocket_rising_delay?: number,
|
|
6938
6952
|
rocket_shadow_overlay_sprite: Sprite,
|
|
6939
|
-
satellite_animation
|
|
6940
|
-
satellite_shadow_animation
|
|
6953
|
+
satellite_animation?: Animation,
|
|
6954
|
+
satellite_shadow_animation?: Animation,
|
|
6941
6955
|
shadow_sprite: Sprite,
|
|
6942
6956
|
silo_fade_out_end_distance: number,
|
|
6943
6957
|
silo_fade_out_start_distance: number,
|
|
@@ -7264,10 +7278,6 @@ Note: The scale that can be defined in the sprite may not behave as expected bec
|
|
|
7264
7278
|
* An extremely basic entity with no special functionality. Used for minable rocks.
|
|
7265
7279
|
*/
|
|
7266
7280
|
interface SimpleEntityPrototype extends EntityWithHealthPrototype{
|
|
7267
|
-
|
|
7268
|
-
/**
|
|
7269
|
-
* Mandatory if both `picture` and `pictures` are not defined.
|
|
7270
|
-
*/
|
|
7271
7281
|
animations?: AnimationVariations,
|
|
7272
7282
|
|
|
7273
7283
|
/**
|
|
@@ -7276,12 +7286,12 @@ interface SimpleEntityPrototype extends EntityWithHealthPrototype{
|
|
|
7276
7286
|
count_as_rock_for_filtered_deconstruction?: boolean,
|
|
7277
7287
|
|
|
7278
7288
|
/**
|
|
7279
|
-
*
|
|
7289
|
+
* Takes priority over `animations`.
|
|
7280
7290
|
*/
|
|
7281
7291
|
picture?: Sprite,
|
|
7282
7292
|
|
|
7283
7293
|
/**
|
|
7284
|
-
*
|
|
7294
|
+
* Takes priority over `picture` and `animations`.
|
|
7285
7295
|
*/
|
|
7286
7296
|
pictures?: SpriteVariations,
|
|
7287
7297
|
random_animation_offset?: boolean,
|
|
@@ -7313,10 +7323,6 @@ interface SimpleEntityWithForcePrototype extends SimpleEntityWithOwnerPrototype{
|
|
|
7313
7323
|
* Has a force, but unlike {@link SimpleEntityWithForcePrototype | prototype:SimpleEntityWithForcePrototype} it is only attacked if the biters get stuck on it (or if {@link EntityWithOwnerPrototype::is_military_target | prototype:EntityWithOwnerPrototype::is_military_target} set to true to make the two entity types equivalent).
|
|
7314
7324
|
*/
|
|
7315
7325
|
interface SimpleEntityWithOwnerPrototype extends EntityWithOwnerPrototype{
|
|
7316
|
-
|
|
7317
|
-
/**
|
|
7318
|
-
* Mandatory if both `picture` and `pictures` are not defined.
|
|
7319
|
-
*/
|
|
7320
7326
|
animations?: AnimationVariations,
|
|
7321
7327
|
|
|
7322
7328
|
/**
|
|
@@ -7325,12 +7331,12 @@ interface SimpleEntityWithOwnerPrototype extends EntityWithOwnerPrototype{
|
|
|
7325
7331
|
force_visibility?: ForceCondition,
|
|
7326
7332
|
|
|
7327
7333
|
/**
|
|
7328
|
-
*
|
|
7334
|
+
* Takes priority over `animations`.
|
|
7329
7335
|
*/
|
|
7330
7336
|
picture?: Sprite,
|
|
7331
7337
|
|
|
7332
7338
|
/**
|
|
7333
|
-
*
|
|
7339
|
+
* Takes priority over `picture` and `animations`.
|
|
7334
7340
|
*/
|
|
7335
7341
|
pictures?: SpriteVariations,
|
|
7336
7342
|
random_animation_offset?: boolean,
|
|
@@ -7476,7 +7482,7 @@ interface SoundPrototype {
|
|
|
7476
7482
|
category?: SoundType,
|
|
7477
7483
|
|
|
7478
7484
|
/**
|
|
7479
|
-
* Supported sound file formats are `.ogg
|
|
7485
|
+
* Supported sound file formats are `.ogg (Vorbis)` and `.wav`.
|
|
7480
7486
|
|
|
7481
7487
|
Only loaded if `variations` is not defined.
|
|
7482
7488
|
*/
|
|
@@ -8415,7 +8421,7 @@ interface TipsAndTricksItemCategory {
|
|
|
8415
8421
|
interface ToolPrototype extends ItemPrototype{
|
|
8416
8422
|
|
|
8417
8423
|
/**
|
|
8418
|
-
* The durability of this tool. Must be positive. Mandatory if
|
|
8424
|
+
* The durability of this tool. Must be positive. Mandatory if `infinite` is false. Ignored if <code>infinite</code> is true.
|
|
8419
8425
|
*/
|
|
8420
8426
|
durability?: number,
|
|
8421
8427
|
|
|
@@ -8446,7 +8452,7 @@ is applied to a tool with 2 remaining durability out of 8 it will be displayed a
|
|
|
8446
8452
|
durability_description_value?: string,
|
|
8447
8453
|
|
|
8448
8454
|
/**
|
|
8449
|
-
* Whether this tool has infinite durability. If this is false,
|
|
8455
|
+
* Whether this tool has infinite durability. If this is false, `durability` must be specified.
|
|
8450
8456
|
*/
|
|
8451
8457
|
infinite?: boolean
|
|
8452
8458
|
}
|
|
@@ -8615,7 +8621,7 @@ Transport belts must have 12 animations.
|
|
|
8615
8621
|
/**
|
|
8616
8622
|
* Defines how wires visually connect to this transport belt.
|
|
8617
8623
|
*/
|
|
8618
|
-
|
|
8624
|
+
circuit_wire_connection_points?: WireConnectionPoint[],
|
|
8619
8625
|
|
|
8620
8626
|
/**
|
|
8621
8627
|
* The maximum circuit wire distance for this entity.
|
|
@@ -9832,7 +9838,7 @@ interface VehiclePrototype extends EntityWithOwnerPrototype{
|
|
|
9832
9838
|
allow_passengers?: boolean,
|
|
9833
9839
|
|
|
9834
9840
|
/**
|
|
9835
|
-
* Must be positive. There is no difference between the two ways to set braking power/force.
|
|
9841
|
+
* Must be positive. There is no functional difference between the two ways to set braking power/force.
|
|
9836
9842
|
*/
|
|
9837
9843
|
braking_power: Energy | number,
|
|
9838
9844
|
|
|
@@ -9853,7 +9859,7 @@ interface VehiclePrototype extends EntityWithOwnerPrototype{
|
|
|
9853
9859
|
equipment_grid?: EquipmentGridID,
|
|
9854
9860
|
|
|
9855
9861
|
/**
|
|
9856
|
-
* Must be positive. There is no difference between the two ways to set friction force.
|
|
9862
|
+
* Must be positive. There is no functional difference between the two ways to set friction force.
|
|
9857
9863
|
*/
|
|
9858
9864
|
friction: number,
|
|
9859
9865
|
|
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.93
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -4568,12 +4568,12 @@ How many of result are dropped.
|
|
|
4568
4568
|
* How many seconds are required to mine this object at 1 mining speed.
|
|
4569
4569
|
*/
|
|
4570
4570
|
mining_time: number,
|
|
4571
|
-
mining_trigger
|
|
4571
|
+
mining_trigger?: Trigger,
|
|
4572
4572
|
|
|
4573
4573
|
/**
|
|
4574
4574
|
* Name of a {@link FluidPrototype | prototype:FluidPrototype}. The fluid that is used up when this object is mined.
|
|
4575
4575
|
*/
|
|
4576
|
-
required_fluid
|
|
4576
|
+
required_fluid?: FluidID,
|
|
4577
4577
|
|
|
4578
4578
|
/**
|
|
4579
4579
|
* Only loaded if `results` is not defined.
|
|
@@ -4763,7 +4763,7 @@ interface NoiseArrayConstruction {
|
|
|
4763
4763
|
*
|
|
4764
4764
|
* A fragment of a functional program used to generate coherent noise, probably for purposes related to terrain generation.
|
|
4765
4765
|
*
|
|
4766
|
-
* Noise expressions can be provided as table literals or built using functions in the built-in {@link noise library | https://github.com/wube/factorio-data/blob/master/core/lualib/noise.lua}. The built-in noise library allows writing much more concise code, so its usage will be shown in most examples
|
|
4766
|
+
* Noise expressions can be provided as table literals or built using functions in the built-in {@link noise library | https://github.com/wube/factorio-data/blob/master/core/lualib/noise.lua}. The built-in noise library allows writing much more concise code, so its usage will be shown in most examples for noise expressions.
|
|
4767
4767
|
*
|
|
4768
4768
|
* {@link noise.define_noise_function | https://github.com/wube/factorio-data/blob/master/core/lualib/noise.lua#L272} allows noise expressions to be defined using a shorthand that's a subset of Lua (see the example for details).
|
|
4769
4769
|
*
|
|
@@ -6958,7 +6958,7 @@ type Sound = {
|
|
|
6958
6958
|
audible_distance_modifier?: number,
|
|
6959
6959
|
|
|
6960
6960
|
/**
|
|
6961
|
-
* Supported sound file formats are `.ogg
|
|
6961
|
+
* Supported sound file formats are `.ogg (Vorbis)` and `.wav`.
|
|
6962
6962
|
|
|
6963
6963
|
Only loaded if `variations` is not defined.
|
|
6964
6964
|
*/
|
|
@@ -7001,7 +7001,7 @@ Only loaded if `variations` is not defined.
|
|
|
7001
7001
|
interface SoundDefinition {
|
|
7002
7002
|
|
|
7003
7003
|
/**
|
|
7004
|
-
* Supported sound file formats are `.ogg
|
|
7004
|
+
* Supported sound file formats are `.ogg (Vorbis)` and `.wav`.
|
|
7005
7005
|
*/
|
|
7006
7006
|
filename: FileName,
|
|
7007
7007
|
|
|
@@ -7292,7 +7292,7 @@ type Sprite4Way = {
|
|
|
7292
7292
|
* Only loaded if `sheets` is not defined.
|
|
7293
7293
|
*/
|
|
7294
7294
|
sheet?: SpriteNWaySheet,
|
|
7295
|
-
sheets?: SpriteNWaySheet,
|
|
7295
|
+
sheets?: SpriteNWaySheet[],
|
|
7296
7296
|
|
|
7297
7297
|
/**
|
|
7298
7298
|
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
@@ -7334,7 +7334,7 @@ interface Sprite8Way {
|
|
|
7334
7334
|
* Only loaded if `sheets` is not defined.
|
|
7335
7335
|
*/
|
|
7336
7336
|
sheet?: SpriteNWaySheet,
|
|
7337
|
-
sheets?: SpriteNWaySheet,
|
|
7337
|
+
sheets?: SpriteNWaySheet[],
|
|
7338
7338
|
|
|
7339
7339
|
/**
|
|
7340
7340
|
* Only loaded if both `sheets` and `sheet` are not defined.
|
|
@@ -8902,7 +8902,7 @@ interface WorkingVisualisation {
|
|
|
8902
8902
|
align_to_waypoint?: boolean,
|
|
8903
8903
|
always_draw?: boolean,
|
|
8904
8904
|
animated_shift?: boolean,
|
|
8905
|
-
animation
|
|
8905
|
+
animation?: Animation,
|
|
8906
8906
|
|
|
8907
8907
|
/**
|
|
8908
8908
|
* Used by {@link CraftingMachinePrototype | prototype:CraftingMachinePrototype}.
|