typed-factorio 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",
@@ -29,33 +29,34 @@
29
29
  "next-factorio-version": "yarn run download-latest-runtime-api && yarn run clean && yarn run check && yarn run new-version-changelog && npm version minor"
30
30
  },
31
31
  "peerDependencies": {
32
- "lua-types": "^2.13.0",
32
+ "lua-types": "^2.13.1",
33
33
  "typescript-to-lua": "^1.6.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/jest": "^29.2.2",
37
- "@types/node": "^18.11.9",
38
- "@types/prettier": "^2.7.1",
39
- "@typescript-eslint/eslint-plugin": "^5.42.0",
40
- "@typescript-eslint/parser": "^5.42.0",
41
- "chalk": "^5.1.2",
42
- "eslint": "~8.26.0",
43
- "eslint-config-prettier": "^8.5.0",
36
+ "@types/jest": "^29.2.5",
37
+ "@types/node": "^18.11.18",
38
+ "@types/prettier": "^2.7.2",
39
+ "@typescript-eslint/eslint-plugin": "^5.48.1",
40
+ "@typescript-eslint/parser": "^5.48.1",
41
+ "array.prototype.flatmap": "^1.3.1",
42
+ "chalk": "^5.2.0",
43
+ "eslint": "~8.31.0",
44
+ "eslint-config-prettier": "^8.6.0",
44
45
  "eslint-config-standard": "^17.0.0",
45
- "eslint-import-resolver-typescript": "^3.5.2",
46
- "eslint-plugin-import": "^2.26.0",
47
- "eslint-plugin-n": "^15.4.0",
46
+ "eslint-import-resolver-typescript": "^3.5.3",
47
+ "eslint-plugin-import": "^2.27.0",
48
+ "eslint-plugin-n": "^15.6.1",
48
49
  "eslint-plugin-node": "^11.1.0",
49
50
  "eslint-plugin-prettier": "^4.2.1",
50
51
  "eslint-plugin-promise": "^6.1.1",
51
- "jest": "^29.2.2",
52
- "lua-types": "^2.13.0",
53
- "prettier": "^2.7.1",
52
+ "jest": "^29.3.1",
53
+ "lua-types": "^2.13.1",
54
+ "prettier": "^2.8.2",
54
55
  "rimraf": "^3.0.2",
55
- "ts-jest": "^29.0.3",
56
+ "ts-jest": "^29.0.4",
56
57
  "ts-node": "^10.9.1",
57
- "typescript": "~4.8.4",
58
- "typescript-to-lua": "^1.10.1"
58
+ "typescript": "~4.9.4",
59
+ "typescript-to-lua": "^1.11.1"
59
60
  },
60
61
  "packageManager": "yarn@3.2.3"
61
62
  }
@@ -239,7 +239,7 @@ interface LuaBootstrap {
239
239
  */
240
240
  register_metatable(name: string, metatable: table): void
241
241
  /**
242
- * Register a function to be run when mod configuration changes. This is called when the major game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, or when any prototypes have been added or removed. It allows the mod to make any changes it deems appropriate to both the data structures in its {@linkplain https://lua-api.factorio.com/latest/Global.html global} table or to the game state through {@link LuaGameScript}.
242
+ * Register a function to be run when mod configuration changes. This is called when the game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, when any prototypes have been added or removed, or when a migration was applied. It allows the mod to make any changes it deems appropriate to both the data structures in its {@linkplain https://lua-api.factorio.com/latest/Global.html global} table or to the game state through {@link LuaGameScript}.
243
243
  * @param handler The handler for this event. Passing `nil` will unregister it.
244
244
  * @remarks For more context, refer to the {@linkplain https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
245
245
  * @see {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_configuration_changed Online documentation}
@@ -335,6 +335,11 @@ interface LuaBootstrap {
335
335
  * @see {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.get_event_filter Online documentation}
336
336
  */
337
337
  get_event_filter<E extends EventId<any, table>>(event: E): E["_filter"][] | nil
338
+ /**
339
+ * Gets the prototype history for the given type and name.
340
+ * @see {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.get_prototype_history Online documentation}
341
+ */
342
+ get_prototype_history(type: string, name: string): PrototypeHistory
338
343
  /**
339
344
  * Raise an event. Only events generated with {@link LuaBootstrap#generate_event_name LuaBootstrap::generate_event_name} and the following can be raised:
340
345
  *
@@ -413,6 +418,10 @@ interface LuaBootstrap {
413
418
  * Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.
414
419
  */
415
420
  readonly from_player: boolean
421
+ /**
422
+ * Whether the transfer was a split action (half stack).
423
+ */
424
+ readonly is_split: boolean
416
425
  }): void
417
426
  /**
418
427
  * **Raised events:**
@@ -1238,6 +1247,11 @@ interface LuaControl {
1238
1247
  * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.surface Online documentation}
1239
1248
  */
1240
1249
  readonly surface: LuaSurface
1250
+ /**
1251
+ * Unique ID associated with the surface this entity is currently on.
1252
+ * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.surface_index Online documentation}
1253
+ */
1254
+ readonly surface_index: SurfaceIndex
1241
1255
  /**
1242
1256
  * The current position of the entity.
1243
1257
  * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.position Online documentation}
@@ -1254,6 +1268,11 @@ interface LuaControl {
1254
1268
  */
1255
1269
  get force(): LuaForce
1256
1270
  set force(value: ForceIdentification)
1271
+ /**
1272
+ * Unique ID associated with the force of this entity.
1273
+ * @see {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.force_index Online documentation}
1274
+ */
1275
+ readonly force_index: uint
1257
1276
  /**
1258
1277
  * The currently selected entity. Assigning an entity will select it if is selectable, otherwise the selection is cleared.
1259
1278
  *
@@ -2146,7 +2165,7 @@ interface LuaEntity extends LuaControl {
2146
2165
  * Sets the entity to be deconstructed by construction robots.
2147
2166
  *
2148
2167
  * **Raised events:**
2149
- * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the entity way successfully marked for deconstruction.
2168
+ * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the entity was successfully marked for deconstruction.
2150
2169
  * @param force The force whose robots are supposed to do the deconstruction.
2151
2170
  * @param player The player to set the `last_user` to if any.
2152
2171
  * @returns if the entity was marked for deconstruction.
@@ -2172,7 +2191,7 @@ interface LuaEntity extends LuaControl {
2172
2191
  * Sets the entity to be upgraded by construction robots.
2173
2192
  *
2174
2193
  * **Raised events:**
2175
- * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised if the entity way successfully marked for upgrade.
2194
+ * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised if the entity was successfully marked for upgrade.
2176
2195
  * @returns Whether the entity was marked for upgrade.
2177
2196
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade Online documentation}
2178
2197
  */
@@ -3645,6 +3664,12 @@ interface LuaEntity extends LuaControl {
3645
3664
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_network_statistics Online documentation}
3646
3665
  */
3647
3666
  readonly electric_network_statistics: LuaFlowStatistics
3667
+ /**
3668
+ * Returns the current target pickup count of the inserter.
3669
+ * @remarks This considers the circuit network, manual override and the inserter stack size limit based on technology.
3670
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.inserter_target_pickup_count Online documentation}
3671
+ */
3672
+ readonly inserter_target_pickup_count: uint
3648
3673
  /**
3649
3674
  * Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
3650
3675
  * @remarks Set to 0 to reset.
@@ -4184,7 +4209,7 @@ interface BaseEntity extends LuaControl {
4184
4209
  * Sets the entity to be deconstructed by construction robots.
4185
4210
  *
4186
4211
  * **Raised events:**
4187
- * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the entity way successfully marked for deconstruction.
4212
+ * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the entity was successfully marked for deconstruction.
4188
4213
  * @param force The force whose robots are supposed to do the deconstruction.
4189
4214
  * @param player The player to set the `last_user` to if any.
4190
4215
  * @returns if the entity was marked for deconstruction.
@@ -4210,7 +4235,7 @@ interface BaseEntity extends LuaControl {
4210
4235
  * Sets the entity to be upgraded by construction robots.
4211
4236
  *
4212
4237
  * **Raised events:**
4213
- * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised if the entity way successfully marked for upgrade.
4238
+ * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised if the entity was successfully marked for upgrade.
4214
4239
  * @returns Whether the entity was marked for upgrade.
4215
4240
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade Online documentation}
4216
4241
  */
@@ -4979,6 +5004,12 @@ interface BaseEntity extends LuaControl {
4979
5004
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.sticked_to Online documentation}
4980
5005
  */
4981
5006
  readonly sticked_to: LuaEntity
5007
+ /**
5008
+ * Returns the current target pickup count of the inserter.
5009
+ * @remarks This considers the circuit network, manual override and the inserter stack size limit based on technology.
5010
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.inserter_target_pickup_count Online documentation}
5011
+ */
5012
+ readonly inserter_target_pickup_count: uint
4982
5013
  /**
4983
5014
  * Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
4984
5015
  * @remarks Set to 0 to reset.
@@ -7686,6 +7717,11 @@ interface LuaEntityPrototype {
7686
7717
  * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.alert_icon_shift Online documentation}
7687
7718
  */
7688
7719
  readonly alert_icon_shift: Vector
7720
+ /**
7721
+ * The alert icon scale of this entity prototype.
7722
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.alert_icon_scale Online documentation}
7723
+ */
7724
+ readonly alert_icon_scale: float
7689
7725
  /**
7690
7726
  * The item prototype names that are the inputs of this lab prototype.
7691
7727
  *
@@ -8458,6 +8494,11 @@ interface BaseEntityPrototype {
8458
8494
  * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.alert_icon_shift Online documentation}
8459
8495
  */
8460
8496
  readonly alert_icon_shift: Vector
8497
+ /**
8498
+ * The alert icon scale of this entity prototype.
8499
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.alert_icon_scale Online documentation}
8500
+ */
8501
+ readonly alert_icon_scale: float
8461
8502
  /**
8462
8503
  * Whether this entity prototype could possibly ever be rotated.
8463
8504
  * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.supports_direction Online documentation}
@@ -12458,6 +12499,11 @@ interface LuaGameScript {
12458
12499
  * @see {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.map_gen_presets Online documentation}
12459
12500
  */
12460
12501
  readonly map_gen_presets: LuaCustomTable<string, MapGenPreset>
12502
+ /**
12503
+ * Whether a console command has been used.
12504
+ * @see {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.console_command_used Online documentation}
12505
+ */
12506
+ readonly console_command_used: boolean
12461
12507
  /**
12462
12508
  * The styles that {@link LuaGuiElement} can use, indexed by `name`.
12463
12509
  * @see {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.styles Online documentation}
@@ -18835,10 +18881,6 @@ interface LuaPlayer extends LuaControl {
18835
18881
  }): boolean
18836
18882
  /**
18837
18883
  * Checks if this player can build what ever is in the cursor on the surface the player is on.
18838
- *
18839
- * **Raised events:**
18840
- * - {@link OnPreBuildEvent on_pre_build}? _instantly_ Raised if the cursor was successfully built.
18841
- * - {@link OnBuiltEntityEvent on_built_entity}? _instantly_ Raised if the cursor was successfully built.
18842
18884
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor Online documentation}
18843
18885
  */
18844
18886
  can_build_from_cursor(params: {
@@ -18864,8 +18906,11 @@ interface LuaPlayer extends LuaControl {
18864
18906
  readonly skip_fog_of_war?: boolean
18865
18907
  }): boolean
18866
18908
  /**
18867
- * Builds what ever is in the cursor on the surface the player is on.
18868
- * @remarks Anything built will fire normal player-built events.<br>The cursor stack will automatically be reduced as if the player built normally.
18909
+ * Builds what ever is in the cursor on the surface the player is on. The cursor stack will automatically be reduced as if the player built normally.
18910
+ *
18911
+ * **Raised events:**
18912
+ * - {@link OnPreBuildEvent on_pre_build}? _instantly_ Raised if the cursor was successfully built.
18913
+ * - {@link OnBuiltEntityEvent on_built_entity}? _instantly_ Raised if the cursor was successfully built.
18869
18914
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor Online documentation}
18870
18915
  */
18871
18916
  build_from_cursor(params: {
@@ -19006,15 +19051,17 @@ interface LuaPlayer extends LuaControl {
19006
19051
  */
19007
19052
  exit_cutscene(): void
19008
19053
  /**
19009
- * Queues a request to open the map at the specified position. If the map is already opened, the request will simply set the position (and scale). Render mode change requests are processed before rendering of the next frame.
19054
+ * Queues a request to open the map at the specified position. If the map is already opened, the request will simply set the position, scale, and entity to follow. Render mode change requests are processed before rendering of the next frame.
19055
+ * @param entity The entity to follow. If not given the current entity being followed will be cleared.
19010
19056
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.open_map Online documentation}
19011
19057
  */
19012
- open_map(position: MapPosition | MapPositionArray, scale?: double): void
19058
+ open_map(position: MapPosition | MapPositionArray, scale?: double, entity?: LuaEntity): void
19013
19059
  /**
19014
- * Queues a request to zoom to world at the specified position. If the player is already zooming to world, the request will simply set the position (and scale). Render mode change requests are processed before rendering of the next frame.
19060
+ * Queues a request to zoom to world at the specified position. If the player is already zooming to world, the request will simply set the position, scale, and entity to follow. Render mode change requests are processed before rendering of the next frame.
19061
+ * @param entity The entity to follow. If not given the current entity being followed will be cleared.
19015
19062
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.zoom_to_world Online documentation}
19016
19063
  */
19017
- zoom_to_world(position: MapPosition | MapPositionArray, scale?: double): void
19064
+ zoom_to_world(position: MapPosition | MapPositionArray, scale?: double, entity?: LuaEntity): void
19018
19065
  /**
19019
19066
  * Queues request to switch to the normal game view from the map or zoom to world view. Render mode change requests are processed before rendering of the next frame.
19020
19067
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.close_map Online documentation}
@@ -19307,6 +19354,11 @@ interface LuaPlayer extends LuaControl {
19307
19354
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.cursor_stack_temporary Online documentation}
19308
19355
  */
19309
19356
  cursor_stack_temporary: boolean
19357
+ /**
19358
+ * The wire drag target for this player, if any.
19359
+ * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.drag_target Online documentation}
19360
+ */
19361
+ readonly drag_target?: DragTarget
19310
19362
  /**
19311
19363
  * The player's zoom-level.
19312
19364
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.zoom Online documentation}
@@ -19476,6 +19528,11 @@ interface LuaRailPath {
19476
19528
  * @see {@link https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.rails Online documentation}
19477
19529
  */
19478
19530
  readonly rails: LuaCustomTable<uint, LuaEntity>
19531
+ /**
19532
+ * If the path goes from the front of the train
19533
+ * @see {@link https://lua-api.factorio.com/latest/LuaRailPath.html#LuaRailPath.is_front Online documentation}
19534
+ */
19535
+ readonly is_front: boolean
19479
19536
  /**
19480
19537
  * 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.
19481
19538
  */
@@ -21269,7 +21326,7 @@ interface LuaShortcutPrototype {
21269
21326
  */
21270
21327
  readonly item_to_spawn?: LuaItemPrototype
21271
21328
  /**
21272
- * The technology to unlock when this shortcut is used, if any.
21329
+ * The technology that needs to be researched once (in any save) for this shortcut to be unlocked (in all saves).
21273
21330
  * @see {@link https://lua-api.factorio.com/latest/LuaShortcutPrototype.html#LuaShortcutPrototype.technology_to_unlock Online documentation}
21274
21331
  */
21275
21332
  readonly technology_to_unlock?: LuaTechnologyPrototype
@@ -23642,6 +23699,7 @@ interface LuaSurface {
23642
23699
  */
23643
23700
  get_total_pollution(): double
23644
23701
  /**
23702
+ * Whether the given entity prototype collides at the given position and direction.
23645
23703
  * @param prototype The entity prototype to check
23646
23704
  * @param position The position to check
23647
23705
  * @param use_map_generation_bounding_box If the map generation bounding box should be used instead of the collision bounding box
@@ -23652,13 +23710,14 @@ interface LuaSurface {
23652
23710
  position: MapPosition | MapPositionArray,
23653
23711
  use_map_generation_bounding_box: boolean,
23654
23712
  direction?: defines.direction
23655
- ): void
23713
+ ): boolean
23656
23714
  /**
23715
+ * Whether the given decorative prototype collides at the given position and direction.
23657
23716
  * @param prototype The decorative prototype to check
23658
23717
  * @param position The position to check
23659
23718
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.decorative_prototype_collides Online documentation}
23660
23719
  */
23661
- decorative_prototype_collides(prototype: string, position: MapPosition | MapPositionArray): void
23720
+ decorative_prototype_collides(prototype: string, position: MapPosition | MapPositionArray): boolean
23662
23721
  /**
23663
23722
  * @param property_names Names of properties (e.g. "elevation") to calculate
23664
23723
  * @param positions Positions for which to calculate property values
@@ -23684,6 +23743,9 @@ interface LuaSurface {
23684
23743
  build_checkerboard(area: BoundingBoxWrite | BoundingBoxArray): void
23685
23744
  /**
23686
23745
  * The name of this surface. Names are unique among surfaces.
23746
+ *
23747
+ * **Raised events:**
23748
+ * - {@link OnSurfaceRenamedEvent on_surface_renamed} _instantly_
23687
23749
  * @remarks the default surface can't be renamed.
23688
23750
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.name Online documentation}
23689
23751
  */
@@ -23776,7 +23838,7 @@ interface LuaSurface {
23776
23838
  */
23777
23839
  solar_power_multiplier: double
23778
23840
  /**
23779
- * The minimal brightness during the night. Default is `0.15`. The value has an effect on the game simalution only, it doesn't have any effect on rendering.
23841
+ * The minimal brightness during the night. Defaults to `0.15`. This has an effect on both rendering and game mechanics such as biter spawns and solar power.
23780
23842
  * @see {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.min_brightness Online documentation}
23781
23843
  */
23782
23844
  min_brightness: double
@@ -242,6 +242,8 @@ interface OldTileAndPosition {
242
242
 
243
243
  /**
244
244
  * A dictionary of string to the four basic Lua types: `string`, `boolean`, `number`, `table`.
245
+ *
246
+ * Note that the API returns tags as a simple table, meaning any modifications to it will not propagate back to the game. Thus, to modify a set of tags, the whole table needs to be written back to the respective property.
245
247
  * @example
246
248
  *
247
249
  * ```
@@ -546,6 +548,17 @@ interface DecorativeResult {
546
548
  readonly amount: uint
547
549
  }
548
550
 
551
+ interface PrototypeHistory {
552
+ /**
553
+ * The mod that created this prototype.
554
+ */
555
+ readonly created: string
556
+ /**
557
+ * The mods that changed this prototype in the order they changed it.
558
+ */
559
+ readonly changed: string[]
560
+ }
561
+
549
562
  /**
550
563
  * @remarks Either `icon`, `text`, or both must be provided.
551
564
  * @see {@link https://lua-api.factorio.com/latest/Concepts.html#ChartTagSpec Online documentation}
@@ -2636,11 +2649,23 @@ interface WireConnectionDefinition {
2636
2649
  /**
2637
2650
  * Mandatory if the source entity has more than one wire connection using copper wire.
2638
2651
  */
2639
- readonly source_wire_id?: defines.circuit_connector_id
2652
+ readonly source_wire_id?: defines.wire_connection_id
2640
2653
  /**
2641
2654
  * Mandatory if the target entity has more than one wire connection using copper wire.
2642
2655
  */
2643
- readonly target_wire_id?: defines.circuit_connector_id
2656
+ readonly target_wire_id?: defines.wire_connection_id
2657
+ }
2658
+
2659
+ interface DragTarget {
2660
+ readonly target_entity: LuaEntity
2661
+ /**
2662
+ * If the wire being dragged is a circuit wire this is the connector id.
2663
+ */
2664
+ readonly target_circuit_id?: defines.circuit_connector_id
2665
+ /**
2666
+ * If the wire being dragged is copper wire this is the wire id.
2667
+ */
2668
+ readonly target_wire_id?: defines.wire_connection_id
2644
2669
  }
2645
2670
 
2646
2671
  interface InventoryFilter {
@@ -1332,7 +1332,7 @@ declare namespace defines {
1332
1332
  * See the {@linkplain https://lua-api.factorio.com/latest/events.html events page} for more info on what events contain and when they get raised.
1333
1333
  * @see {@link https://lua-api.factorio.com/latest/defines.html#defines.events Online documentation}
1334
1334
  */
1335
- type events = typeof events[keyof typeof events]
1335
+ type events = (typeof events)[keyof typeof events]
1336
1336
  enum flow_precision_index {
1337
1337
  five_seconds,
1338
1338
  one_minute,
@@ -2152,6 +2152,10 @@ interface OnPlayerFastTransferredEvent extends EventData {
2152
2152
  * Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.
2153
2153
  */
2154
2154
  readonly from_player: boolean
2155
+ /**
2156
+ * Whether the transfer was a split action (half stack).
2157
+ */
2158
+ readonly is_split: boolean
2155
2159
  /**
2156
2160
  * Identifier of the event
2157
2161
  */
@@ -2920,15 +2924,15 @@ interface OnPreBuildEvent extends EventData {
2920
2924
  */
2921
2925
  readonly direction: defines.direction
2922
2926
  /**
2923
- * If building this blueprint was flipped horizontally.
2927
+ * Whether the blueprint was flipped horizontally. `nil` if not built by a blueprint.
2924
2928
  */
2925
- readonly flip_horizontal: boolean
2929
+ readonly flip_horizontal: boolean | nil
2926
2930
  /**
2927
- * If building this blueprint was flipped vertically.
2931
+ * Whether the blueprint was flipped vertically. `nil` if not built by a blueprint.
2928
2932
  */
2929
- readonly flip_vertical: boolean
2933
+ readonly flip_vertical: boolean | nil
2930
2934
  /**
2931
- * Item was placed while moving.
2935
+ * Whether the item was placed while moving.
2932
2936
  */
2933
2937
  readonly created_by_moving: boolean
2934
2938
  /**