factorio-types 0.0.35 → 0.0.37

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 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.80
5
+ // Factorio version 1.1.86
6
6
  // API version 3
7
7
 
8
8
  /**
@@ -1076,7 +1076,12 @@ interface LuaControl {
1076
1076
  get_main_inventory(this: void): void
1077
1077
 
1078
1078
  /**
1079
- * The maximum inventory index this entity may use.
1079
+ * The highest index of all inventories this entity can use. Allows iteration over all of them if desired.
1080
+ * @example
1081
+ * ```
1082
+ * for k = 1, entity.get_max_inventory_index() do [...] end
1083
+ * ```
1084
+ *
1080
1085
  */
1081
1086
  get_max_inventory_index(this: void): void
1082
1087
 
@@ -1655,6 +1660,16 @@ interface LuaCustomInputPrototype {
1655
1660
  */
1656
1661
  readonly consuming: string
1657
1662
 
1663
+ /**
1664
+ * The default controller alternative key sequence for this custom input, if any
1665
+ */
1666
+ readonly controller_alternative_key_sequence?: string
1667
+
1668
+ /**
1669
+ * The default controller key sequence for this custom input, if any
1670
+ */
1671
+ readonly controller_key_sequence?: string
1672
+
1658
1673
  /**
1659
1674
  * Whether this custom input is enabled. Disabled custom inputs exist but are not used by the game.
1660
1675
  */
@@ -3090,12 +3105,12 @@ interface LuaEntity extends LuaControl {
3090
3105
  readonly belt_neighbours: {[key: string]: LuaEntity[]}
3091
3106
 
3092
3107
  /**
3093
- * `"input"` or `"output"`, depending on whether this underground belt goes down or up.
3108
+ * Whether this underground belt goes into or out of the ground.
3094
3109
  * @remarks
3095
3110
  * Applies to subclasses: TransportBeltToGround
3096
3111
  *
3097
3112
  */
3098
- readonly belt_to_ground_type: string
3113
+ readonly belt_to_ground_type: 'input' | 'output'
3099
3114
 
3100
3115
  /**
3101
3116
  * The bonus mining progress for this mining drill. Read yields a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill.
@@ -3660,12 +3675,12 @@ interface LuaEntity extends LuaControl {
3660
3675
  readonly loader_container?: LuaEntity
3661
3676
 
3662
3677
  /**
3663
- * `"input"` or `"output"`, depending on whether this loader puts to or gets from a container.
3678
+ * Whether this loader gets items from or puts item into a container.
3664
3679
  * @remarks
3665
3680
  * Applies to subclasses: Loader
3666
3681
  *
3667
3682
  */
3668
- loader_type: string
3683
+ loader_type: 'input' | 'output'
3669
3684
 
3670
3685
  readonly localised_description: LocalisedString
3671
3686
 
@@ -4038,7 +4053,7 @@ interface LuaEntity extends LuaControl {
4038
4053
  /**
4039
4054
  * The storage filter for this logistic storage container.
4040
4055
  */
4041
- storage_filter: LuaItemPrototype
4056
+ storage_filter?: LuaItemPrototype
4042
4057
 
4043
4058
  /**
4044
4059
  * Whether the entity has direction. When it is false for this entity, it will always return north direction when asked for.
@@ -4092,7 +4107,7 @@ interface LuaEntity extends LuaControl {
4092
4107
  /**
4093
4108
  * The ticks left before a ghost, combat robot, highlight box or smoke with trigger is destroyed.
4094
4109
  *
4095
- * - for ghosts set to uint32 max (4,294,967,295) to never expire.
4110
+ * - for ghosts set to uint32 max (4'294'967'295) to never expire.
4096
4111
  * - for ghosts Cannot be set higher than {@link LuaForce::ghost_time_to_live | LuaForce::ghost_time_to_live} of the entity's force.
4097
4112
  */
4098
4113
  time_to_live: number
@@ -6644,6 +6659,12 @@ interface LuaFluidBox {
6644
6659
  get_flow(this: void,
6645
6660
  index: number): void
6646
6661
 
6662
+ /**
6663
+ * Gets counts of all fluids in the fluid system. May return `nil` for fluid wagon, fluid turret's internal buffer, or a fluidbox which does not belong to a fluid system.
6664
+ */
6665
+ get_fluid_system_contents(this: void,
6666
+ index: number): void
6667
+
6647
6668
  /**
6648
6669
  * 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
6649
6670
  */
@@ -6656,6 +6677,12 @@ interface LuaFluidBox {
6656
6677
  get_locked_fluid(this: void,
6657
6678
  index: number): void
6658
6679
 
6680
+ /**
6681
+ * Get the fluid box's connections and associated data.
6682
+ */
6683
+ get_pipe_connections(this: void,
6684
+ index: number): void
6685
+
6659
6686
  /**
6660
6687
  * The prototype of this fluidbox index. If this is used on a fluidbox of a crafting machine which due to recipe was created by merging multiple prototypes, a table of prototypes that were merged will be returned instead
6661
6688
  */
@@ -7224,8 +7251,10 @@ interface LuaForce {
7224
7251
 
7225
7252
  /**
7226
7253
  * Force a rechart of the whole chart.
7254
+ * @param surface - Which surface to rechart or all if not given.
7227
7255
  */
7228
- rechart(this: void): void
7256
+ rechart(this: void,
7257
+ surface?: SurfaceIdentification): void
7229
7258
 
7230
7259
  /**
7231
7260
  * Research all technologies.
@@ -7763,7 +7792,7 @@ interface LuaGameScript {
7763
7792
  /**
7764
7793
  * Create a new surface.
7765
7794
  * @remarks
7766
- * The game currently supports a maximum of 4,294,967,295 surfaces, including the default surface.
7795
+ * The game currently supports a maximum of 4'294'967'295 surfaces, including the default surface.
7767
7796
  * Surface names must be unique.
7768
7797
  *
7769
7798
  * @param name - Name of the new surface.
@@ -8015,7 +8044,7 @@ interface LuaGameScript {
8015
8044
  is_demo(this: void): void
8016
8045
 
8017
8046
  /**
8018
- * Is the map loaded is multiplayer?
8047
+ * Whether the save is loaded as a multiplayer map.
8019
8048
  */
8020
8049
  is_multiplayer(this: void): void
8021
8050
 
@@ -8445,7 +8474,7 @@ interface LuaGameScript {
8445
8474
  readonly font_prototypes: {[key: string]: LuaFontPrototype}
8446
8475
 
8447
8476
  /**
8448
- * Get a table of all the forces that currently exist. This sparse table allows you to find forces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all.
8477
+ * Get a table of all the forces that currently exist. This sparse table allows you to find forces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the hash part of the table. Iterating with `ipairs()` will not work at all.
8449
8478
  */
8450
8479
  readonly forces: {[key: string]: LuaForce}
8451
8480
 
@@ -8588,7 +8617,7 @@ interface LuaGameScript {
8588
8617
  readonly styles: {[key: string]: string}
8589
8618
 
8590
8619
  /**
8591
- * Get a table of all the surfaces that currently exist. This sparse table allows you to find surfaces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all.
8620
+ * Get a table of all the surfaces that currently exist. This sparse table allows you to find surfaces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the hash part of the table. Iterating with `ipairs()` will not work at all.
8592
8621
  */
8593
8622
  readonly surfaces: {[key: string]: LuaSurface}
8594
8623
 
@@ -8608,11 +8637,9 @@ interface LuaGameScript {
8608
8637
  tick_paused: boolean
8609
8638
 
8610
8639
  /**
8611
- * The number of ticks since this game was 'created'. A game is 'created' either by using "new game" or "new game from scenario".
8612
- * @remarks
8613
- * This differs over {@link LuaGameScript::tick | LuaGameScript::tick} in that making a game from a scenario always starts with ticks_played value at 0 even if the scenario has its own level data where the {@link LuaGameScript::tick | LuaGameScript::tick} is > 0.
8614
- * This value has no relation with {@link LuaGameScript::tick | LuaGameScript::tick} and can be completely different values.
8615
- *
8640
+ * The number of ticks since this game was created using either "new game" or "new game from scenario". Notably, this number progresses even when the game is {@link tick_paused | LuaGameScript::tick_paused}.
8641
+ *
8642
+ * This differs from {@link LuaGameScript::tick | LuaGameScript::tick} in that creating a game from a scenario always starts with this value at `0`, even if the scenario has its own level data where the `tick` has progressed past `0`.
8616
8643
  */
8617
8644
  readonly ticks_played: number
8618
8645
 
@@ -8833,7 +8860,7 @@ interface LuaGui {
8833
8860
  * - `"progressbar"`: A partially filled bar that can be used to indicate progress.
8834
8861
  * - `"table"`: An invisible container that lays out its children in a specific number of columns. The width of each column is determined by the widest element it contains.
8835
8862
  * - `"textfield"`: A single-line box the user can type into. Relevant events: {@link on_gui_text_changed | on_gui_text_changed}, {@link on_gui_confirmed | on_gui_confirmed}
8836
- * - `"radiobutton"`: An element that is similar to a `checkbox`, but with a circular appearance. Clicking a selected radio button will not deselect it. Radio buttons are not linked to each other in any way. Relevant event: {@link on_gui_checked_state_changed | on_gui_checked_state_changed}
8863
+ * - `"radiobutton"`: An element that is similar to a `checkbox`, but with a circular appearance. Clicking a selected radio button will not unselect it. Radio buttons are not linked to each other in any way. Relevant event: {@link on_gui_checked_state_changed | on_gui_checked_state_changed}
8837
8864
  * - `"sprite"`: An element that shows an image.
8838
8865
  * - `"scroll-pane"`: An invisible element that is similar to a `flow`, but has the ability to show and use scroll bars.
8839
8866
  * - `"drop-down"`: A drop-down containing strings of text. Relevant event: {@link on_gui_selection_state_changed | on_gui_selection_state_changed}
@@ -9215,6 +9242,14 @@ interface LuaGuiElement {
9215
9242
  */
9216
9243
  auto_center: boolean
9217
9244
 
9245
+ /**
9246
+ * Whether this button will automatically toggle when clicked.
9247
+ * @remarks
9248
+ * Applies to subclasses: button,sprite-button
9249
+ *
9250
+ */
9251
+ auto_toggle: boolean
9252
+
9218
9253
  /**
9219
9254
  * The text to display after the normal tab text (designed to work with numbers)
9220
9255
  * @remarks
@@ -9380,6 +9415,11 @@ interface LuaGuiElement {
9380
9415
  */
9381
9416
  force?: string
9382
9417
 
9418
+ /**
9419
+ * How this element should interact with game controllers.
9420
+ */
9421
+ game_controller_interaction: defines.game_controller_interaction
9422
+
9383
9423
  /**
9384
9424
  * The GUI this element is a child of.
9385
9425
  */
@@ -9665,6 +9705,14 @@ interface LuaGuiElement {
9665
9705
  */
9666
9706
  text: string
9667
9707
 
9708
+ /**
9709
+ * Whether this button is currently toggled. When a button is toggled, it will use the `selected_graphical_set` and `selected_font_color` defined in its style.
9710
+ * @remarks
9711
+ * Applies to subclasses: button,sprite-button
9712
+ *
9713
+ */
9714
+ toggled: boolean
9715
+
9668
9716
  tooltip: LocalisedString
9669
9717
 
9670
9718
  /**
@@ -12126,6 +12174,11 @@ interface LuaModSettingPrototype {
12126
12174
 
12127
12175
  readonly setting_type: string
12128
12176
 
12177
+ /**
12178
+ * Type of this prototype.
12179
+ */
12180
+ readonly type: string
12181
+
12129
12182
  /**
12130
12183
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
12131
12184
  */
@@ -13062,6 +13115,11 @@ interface LuaPlayer extends LuaControl {
13062
13115
  */
13063
13116
  infinity_inventory_filters: InfinityInventoryFilter[]
13064
13117
 
13118
+ /**
13119
+ * The input method of the player, mouse and keyboard or game controller
13120
+ */
13121
+ readonly input_method: defines.input_method
13122
+
13065
13123
  /**
13066
13124
  * At what tick this player was last online.
13067
13125
  */
@@ -13843,6 +13901,7 @@ interface LuaRendering {
13843
13901
  * @param table.orientation_target_offset - Only used if `orientation_target` is a LuaEntity.
13844
13902
  * @param table.oriented_offset - Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation.
13845
13903
  * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
13904
+ * @param table.render_layer - Render layer of the animation. Defaults to `"arrow"`.
13846
13905
  * @param table.target - Center of the animation.
13847
13906
  * @param table.target_offset - Only used if `target` is a LuaEntity.
13848
13907
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -13978,6 +14037,7 @@ interface LuaRendering {
13978
14037
  /**
13979
14038
  * Create a line.
13980
14039
  * @param table.dash_length - Length of the dashes that this line has. Used only if gap_length > 0. Default is 0.
14040
+ * @param table.dash_offset - Starting offset to apply to dashes. Cannot be greater than dash_length + gap_length. Default is 0.
13981
14041
  * @param table.draw_on_ground - If this should be drawn below sprites and entities.
13982
14042
  * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
13983
14043
  * @param table.from_offset - Only used if `from` is a LuaEntity.
@@ -14007,6 +14067,7 @@ interface LuaRendering {
14007
14067
  width: number,
14008
14068
  gap_length?: number,
14009
14069
  dash_length?: number,
14070
+ dash_offset?: number,
14010
14071
  from: MapPosition | LuaEntity,
14011
14072
  from_offset?: Vector,
14012
14073
  to: MapPosition | LuaEntity,
@@ -14094,6 +14155,7 @@ interface LuaRendering {
14094
14155
  * @param table.orientation_target_offset - Only used if `orientation_target` is a LuaEntity.
14095
14156
  * @param table.oriented_offset - Offsets the center of the sprite if `orientation_target` is given. This offset will rotate together with the sprite.
14096
14157
  * @param table.players - The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
14158
+ * @param table.render_layer - Render layer of the sprite. Defaults to `"arrow"`.
14097
14159
  * @param table.target - Center of the sprite.
14098
14160
  * @param table.target_offset - Only used if `target` is a LuaEntity.
14099
14161
  * @param table.time_to_live - In ticks. Defaults to living forever.
@@ -16069,6 +16131,14 @@ interface LuaSurface {
16069
16131
  use_map_generation_bounding_box: boolean,
16070
16132
  direction?: defines.direction): void
16071
16133
 
16134
+ /**
16135
+ * Find the logistic network with a cell closest to a given position.
16136
+ * @param force - Force the logistic network should belong to.
16137
+ */
16138
+ find_closest_logistic_network_by_position(this: void,
16139
+ position: MapPosition,
16140
+ force: ForceIdentification): void
16141
+
16072
16142
  /**
16073
16143
  * Find decoratives of a given name in a given area.
16074
16144
  *
@@ -16172,7 +16242,7 @@ interface LuaSurface {
16172
16242
  }): void
16173
16243
 
16174
16244
  /**
16175
- * Find a specific entity at a specific position.
16245
+ * Find an entity of the given type at the given position. This checks both the exact position and the bounding box of the entity.
16176
16246
  * @param entity - Entity to look for.
16177
16247
  * @param position - Coordinates to look at.
16178
16248
  * @example
@@ -16336,12 +16406,16 @@ interface LuaSurface {
16336
16406
  * @remarks
16337
16407
  * This won't find tiles in non-generated chunks.
16338
16408
  *
16409
+ * @param area - The area to find connected tiles in. If provided the start position must be in this area.
16410
+ * @param include_diagonal - Include tiles that are connected diagonally.
16339
16411
  * @param position - The tile position to start at.
16340
16412
  * @param tiles - The tiles to search for.
16341
16413
  */
16342
16414
  get_connected_tiles(this: void,
16343
16415
  position: TilePosition,
16344
- tiles: string[]): void
16416
+ tiles: string[],
16417
+ include_diagonal?: boolean,
16418
+ area?: BoundingBox): void
16345
16419
 
16346
16420
  /**
16347
16421
  * Returns all the military targets (entities with force) on this chunk for the given force.
@@ -18043,6 +18117,11 @@ interface LuaGuiElementAddParams {
18043
18117
  */
18044
18118
  'enabled'?: boolean
18045
18119
 
18120
+ /**
18121
+ * How the element should interact with game controllers. Defaults to {@link defines.game_controller_interaction.normal | defines.game_controller_interaction.normal}.
18122
+ */
18123
+ 'game_controller_interaction'?: defines.game_controller_interaction
18124
+
18046
18125
  /**
18047
18126
  * Whether the child element is ignored by interaction. Defaults to `false`.
18048
18127
  */
@@ -18058,6 +18137,11 @@ interface LuaGuiElementAddParams {
18058
18137
  */
18059
18138
  'name'?: string
18060
18139
 
18140
+ /**
18141
+ * Whether this element will raise {@link on_gui_hover | on_gui_hover} and {@link on_gui_leave | on_gui_leave}. Defaults to `false`.
18142
+ */
18143
+ 'raise_hover_events'?: boolean
18144
+
18061
18145
  /**
18062
18146
  * The name of the style prototype to apply to the new element.
18063
18147
  */
@@ -18091,11 +18175,21 @@ interface LuaGuiElementAddParams {
18091
18175
  *
18092
18176
  */
18093
18177
  interface LuaGuiElementAddParamsButton extends LuaGuiElementAddParams {
18178
+ /**
18179
+ * Whether the button will automatically toggle when clicked. Defaults to `false`.
18180
+ */
18181
+ 'auto_toggle'?: boolean
18182
+
18094
18183
  /**
18095
18184
  * Which mouse buttons the button responds to. Defaults to `"left-and-right"`.
18096
18185
  */
18097
18186
  'mouse_button_filter'?: MouseButtonFlags
18098
18187
 
18188
+ /**
18189
+ * The initial toggled state of the button. Defaults to `false`.
18190
+ */
18191
+ 'toggled'?: boolean
18192
+
18099
18193
  }
18100
18194
 
18101
18195
  /**
@@ -18421,6 +18515,11 @@ interface LuaGuiElementAddParamsSprite extends LuaGuiElementAddParams {
18421
18515
  *
18422
18516
  */
18423
18517
  interface LuaGuiElementAddParamsSpriteButton extends LuaGuiElementAddParams {
18518
+ /**
18519
+ * Whether the button will automatically toggle when clicked. Defaults to `false`.
18520
+ */
18521
+ 'auto_toggle'?: boolean
18522
+
18424
18523
  /**
18425
18524
  * Path to the image to display on the button when it is clicked.
18426
18525
  */
@@ -18451,6 +18550,11 @@ interface LuaGuiElementAddParamsSpriteButton extends LuaGuiElementAddParams {
18451
18550
  */
18452
18551
  'sprite'?: SpritePath
18453
18552
 
18553
+ /**
18554
+ * The initial toggled state of the button. Defaults to `false`.
18555
+ */
18556
+ 'toggled'?: boolean
18557
+
18454
18558
  }
18455
18559
 
18456
18560
  /**
@@ -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.80
5
+ // Factorio version 1.1.86
6
6
  // API version 3
7
7
 
8
8
  /**
@@ -323,7 +323,7 @@ interface BlueprintSignalIcon {
323
323
  }
324
324
 
325
325
  /**
326
- * Two positions, specifying the top-left and bottom-right corner of the box respectively. Like with {@link MapPosition | MapPosition}, the names of the members may be omitted. When read from the game, the third member `orientation` is present if it is non-zero, however it is ignored when provided to the game.
326
+ * Two positions, specifying the top-left and bottom-right corner of the box respectively. Like with {@link MapPosition | MapPosition}, the names of the members may be omitted. When read from the game, the third member `orientation` is present if it is non-zero.
327
327
  * @example
328
328
  * Explicit definition:
329
329
  * ```
@@ -838,7 +838,7 @@ interface EnemyExpansionMapSettings {
838
838
  max_colliding_tiles_coefficient: number,
839
839
 
840
840
  /**
841
- * The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `60*3,600=216,000` ticks.
841
+ * The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `60*3'600=216'000` ticks.
842
842
  */
843
843
  max_expansion_cooldown: number,
844
844
 
@@ -848,7 +848,7 @@ interface EnemyExpansionMapSettings {
848
848
  max_expansion_distance: number,
849
849
 
850
850
  /**
851
- * The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `4*3,600=14,400` ticks.
851
+ * The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `4*3'600=14'400` ticks.
852
852
  */
853
853
  min_expansion_cooldown: number,
854
854
 
@@ -998,7 +998,7 @@ interface FluidBoxConnection {
998
998
  positions: Vector[],
999
999
 
1000
1000
  /**
1001
- * The connection type: "input", "output", or "input-output".
1001
+ * One of "input", "output", or "input-output".
1002
1002
  */
1003
1003
  type: string
1004
1004
  }
@@ -1078,11 +1078,26 @@ interface GameViewSettings {
1078
1078
  */
1079
1079
  show_controller_gui: boolean
1080
1080
 
1081
+ /**
1082
+ * Shows or hides the crafting queue.
1083
+ */
1084
+ show_crafting_queue: boolean
1085
+
1081
1086
  /**
1082
1087
  * Show overlay icons on entities. Also known as "alt-mode".
1083
1088
  */
1084
1089
  show_entity_info: boolean
1085
1090
 
1091
+ /**
1092
+ * Shows or hides the tooltip that is displayed when selecting an entity.
1093
+ */
1094
+ show_entity_tooltip: boolean
1095
+
1096
+ /**
1097
+ * Shows or hides the mouse and keyboard/controller button hints in the bottom left corner if they are enabled in the interface settings.
1098
+ */
1099
+ show_hotkey_suggestions: boolean
1100
+
1086
1101
  /**
1087
1102
  * Shows or hides the view options when map is opened.
1088
1103
  */
@@ -1118,6 +1133,11 @@ interface GameViewSettings {
1118
1133
  */
1119
1134
  show_side_menu: boolean
1120
1135
 
1136
+ /**
1137
+ * Shows or hides the tool window with the weapons and armor.
1138
+ */
1139
+ show_tool_bar: boolean
1140
+
1121
1141
  /**
1122
1142
  * When `true` (the default), mousing over an entity will select it. Otherwise, moving the mouse won't update entity selection.
1123
1143
  */
@@ -2004,12 +2024,12 @@ interface PathFinderMapSettings {
2004
2024
  max_clients_to_accept_short_new_request: number,
2005
2025
 
2006
2026
  /**
2007
- * The maximum number of nodes that are expanded per tick. Defaults to `1,000`.
2027
+ * The maximum number of nodes that are expanded per tick. Defaults to `1'000`.
2008
2028
  */
2009
2029
  max_steps_worked_per_tick: number,
2010
2030
 
2011
2031
  /**
2012
- * The maximum amount of work each pathfinding job is allowed to do per tick. Defaults to `8,000`.
2032
+ * The maximum amount of work each pathfinding job is allowed to do per tick. Defaults to `8'000`.
2013
2033
  */
2014
2034
  max_work_done_per_tick: number,
2015
2035
 
@@ -2130,6 +2150,42 @@ interface PathfinderWaypoint {
2130
2150
  position: MapPosition
2131
2151
  }
2132
2152
 
2153
+ /**
2154
+ * A single pipe connection for a given fluidbox.
2155
+ */
2156
+ interface PipeConnection {
2157
+
2158
+ /**
2159
+ * One of "normal" or "underground".
2160
+ */
2161
+ connection_type: string,
2162
+
2163
+ /**
2164
+ * One of "input", "output", or "input-output".
2165
+ */
2166
+ flow_direction: string,
2167
+
2168
+ /**
2169
+ * The absolute position of this connection within the entity.
2170
+ */
2171
+ position: MapPosition,
2172
+
2173
+ /**
2174
+ * The connected fluidbox, if any.
2175
+ */
2176
+ target?: LuaFluidBox,
2177
+
2178
+ /**
2179
+ * The index of the connected fluidbox, if any.
2180
+ */
2181
+ target_index?: number,
2182
+
2183
+ /**
2184
+ * The absolute position of the connection's intended target.
2185
+ */
2186
+ target_position: MapPosition
2187
+ }
2188
+
2133
2189
  interface PlaceAsTileResult {
2134
2190
  condition: CollisionMask,
2135
2191
  condition_size: number,
@@ -2723,7 +2779,7 @@ interface UnitGroupMapSettings {
2723
2779
  max_gathering_unit_groups: number,
2724
2780
 
2725
2781
  /**
2726
- * The maximum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `10*3,600=36,000` ticks.
2782
+ * The maximum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `10*3'600=36'000` ticks.
2727
2783
  */
2728
2784
  max_group_gathering_time: number,
2729
2785
 
@@ -2758,7 +2814,7 @@ interface UnitGroupMapSettings {
2758
2814
  max_unit_group_size: number,
2759
2815
 
2760
2816
  /**
2761
- * After gathering has finished, the group is allowed to wait this long in ticks for delayed members. New members are not accepted anymore however. Defaults to `2*3,600=7,200` ticks.
2817
+ * After gathering has finished, the group is allowed to wait this long in ticks for delayed members. New members are not accepted anymore however. Defaults to `2*3'600=7'200` ticks.
2762
2818
  */
2763
2819
  max_wait_time_for_late_members: number,
2764
2820
 
@@ -2768,7 +2824,7 @@ interface UnitGroupMapSettings {
2768
2824
  member_disown_distance: number,
2769
2825
 
2770
2826
  /**
2771
- * The minimum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `3,600` ticks.
2827
+ * The minimum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `3'600` ticks.
2772
2828
  */
2773
2829
  min_group_gathering_time: number,
2774
2830
 
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.80
5
+ // Factorio version 1.1.86
6
6
  // API version 3
7
7
 
8
8
  declare namespace defines {
@@ -515,9 +515,12 @@ declare namespace defines {
515
515
  on_console_chat,
516
516
  on_console_command,
517
517
  on_cutscene_cancelled,
518
+ on_cutscene_finished,
519
+ on_cutscene_started,
518
520
  on_cutscene_waypoint_reached,
519
521
  on_difficulty_settings_changed,
520
522
  on_entity_cloned,
523
+ on_entity_color_changed,
521
524
  on_entity_damaged,
522
525
  on_entity_destroyed,
523
526
  on_entity_died,
@@ -587,6 +590,7 @@ declare namespace defines {
587
590
  on_player_fast_transferred,
588
591
  on_player_flushed_fluid,
589
592
  on_player_gun_inventory_changed,
593
+ on_player_input_method_changed,
590
594
  on_player_joined_game,
591
595
  on_player_kicked,
592
596
  on_player_left_game,
@@ -687,6 +691,20 @@ declare namespace defines {
687
691
  ten_minutes,
688
692
  two_hundred_fifty_hours,
689
693
  }
694
+ enum game_controller_interaction {
695
+ /**
696
+ * Game controller will always hover this element regardless of type or state.
697
+ */
698
+ always,
699
+ /**
700
+ * Hover according to the element type and implementation.
701
+ */
702
+ never,
703
+ /**
704
+ * Never hover this element with a game controller.
705
+ */
706
+ normal,
707
+ }
690
708
  enum group_state {
691
709
  attacking_distraction,
692
710
  attacking_target,
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.80
5
+ // Factorio version 1.1.86
6
6
  // API version 3
7
7
 
8
8
  /**
@@ -25,6 +25,10 @@ interface event {
25
25
  * Called when a {@link CustomInput | https://wiki.factorio.com/Prototype/CustomInput} is activated.
26
26
  */
27
27
  interface CustomInputEvent extends event {
28
+ /**
29
+ * The mouse cursor display location when the custom input was activated.
30
+ */
31
+ cursor_display_location: GuiLocation
28
32
  /**
29
33
  * The mouse cursor position when the custom input was activated.
30
34
  */
@@ -274,6 +278,24 @@ interface on_cutscene_cancelled extends event {
274
278
  */
275
279
  player_index: number
276
280
  }
281
+ /**
282
+ * Called when a cutscene finishes naturally (was not cancelled).
283
+ */
284
+ interface on_cutscene_finished extends event {
285
+ /**
286
+ * The player the cutscene was shown to.
287
+ */
288
+ player_index: number
289
+ }
290
+ /**
291
+ * Called when a cutscene starts.
292
+ */
293
+ interface on_cutscene_started extends event {
294
+ /**
295
+ * The player the cutscene is being shown to.
296
+ */
297
+ player_index: number
298
+ }
277
299
  /**
278
300
  * Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
279
301
  *
@@ -309,6 +331,18 @@ interface on_entity_cloned extends event {
309
331
  destination: LuaEntity
310
332
  source: LuaEntity
311
333
  }
334
+ /**
335
+ * Called after an entity has been recolored either by the player or through script.
336
+ * @remarks
337
+ * Automatic recoloring due to {@link LuaPlayer::color | LuaPlayer::color} will not raise events, as that is a separate mechanism.
338
+ *
339
+ */
340
+ interface on_entity_color_changed extends event {
341
+ /**
342
+ * The entity that was recolored.
343
+ */
344
+ entity: LuaEntity
345
+ }
312
346
  /**
313
347
  * Called when an entity is damaged. Can be filtered using {@link LuaEntityDamagedEventFilter | LuaEntityDamagedEventFilter}.
314
348
  * @remarks
@@ -585,6 +619,10 @@ interface on_gui_click extends event {
585
619
  * If control was pressed.
586
620
  */
587
621
  control: boolean
622
+ /**
623
+ * The display location of the player's cursor.
624
+ */
625
+ cursor_display_location: GuiLocation
588
626
  /**
589
627
  * The clicked element.
590
628
  */
@@ -1383,6 +1421,18 @@ interface on_player_flushed_fluid extends event {
1383
1421
  interface on_player_gun_inventory_changed extends event {
1384
1422
  player_index: number
1385
1423
  }
1424
+ /**
1425
+ * Called when a player's input method changes.
1426
+ * @remarks
1427
+ * See {@link LuaPlayer::input_method | LuaPlayer::input_method}.
1428
+ *
1429
+ */
1430
+ interface on_player_input_method_changed extends event {
1431
+ /**
1432
+ * The player whose input method changed.
1433
+ */
1434
+ player_index: number
1435
+ }
1386
1436
  /**
1387
1437
  * Called after a player joins the game. This is not called when loading a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
1388
1438
  */
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.80
5
+ // Factorio version 1.1.86
6
6
  // API version 3
7
7
 
8
8
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
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",