factorio-types 0.0.24 → 0.0.25

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.60
5
+ // Factorio version 1.1.61
6
6
  // API version 2
7
7
 
8
8
  /**
@@ -1242,7 +1242,7 @@ interface LuaControl {
1242
1242
  /**
1243
1243
  * The crafting queue progress [0-1] 0 when no recipe is being crafted.
1244
1244
  */
1245
- readonly crafting_queue_progress: number
1245
+ crafting_queue_progress: number
1246
1246
 
1247
1247
  /**
1248
1248
  * Size of the crafting queue.
@@ -4530,6 +4530,11 @@ interface LuaEntityPrototype {
4530
4530
  */
4531
4531
  readonly height: number
4532
4532
 
4533
+ /**
4534
+ * A vector of the gun prototypes this prototype uses, or `nil`.
4535
+ */
4536
+ readonly indexed_guns?: LuaItemPrototype[]
4537
+
4533
4538
  /**
4534
4539
  * Every time this infinite resource 'ticks' down it is reduced by this amount. `nil` when not a resource. Meaningless if this isn't an infinite type resource.
4535
4540
  */
@@ -14663,7 +14668,7 @@ interface LuaSurface {
14663
14668
  * Count entities of given type or name in a given area. Works just like {@link LuaSurface::find_entities_filtered | LuaSurface::find_entities_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities.
14664
14669
  *
14665
14670
  * If no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns entities in the radius of the position. If `area` is specified, this returns entities colliding with that area.
14666
- * @param table.invert - If the filters should be inverted.
14671
+ * @param table.invert - Whether the filters should be inverted.
14667
14672
  * @param table.radius - If given with position, will count all entities within the radius of the position.
14668
14673
  */
14669
14674
  count_entities_filtered(this: void,
@@ -14689,8 +14694,11 @@ interface LuaSurface {
14689
14694
  * Count tiles of a given name in a given area. Works just like {@link LuaSurface::find_tiles_filtered | LuaSurface::find_tiles_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of tiles.
14690
14695
  *
14691
14696
  * If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
14697
+ * @param table.has_tile_ghost - Can be further filtered by supplying a `force` filter.
14698
+ * @param table.invert - If the filters should be inverted.
14692
14699
  * @param table.position - Ignored if not given with radius.
14693
14700
  * @param table.radius - If given with position, will return all entities within the radius of the position.
14701
+ * @param table.to_be_deconstructed - Can be further filtered by supplying a `force` filter.
14694
14702
  */
14695
14703
  count_tiles_filtered(this: void,
14696
14704
  table: {
@@ -14698,9 +14706,13 @@ interface LuaSurface {
14698
14706
  position?: MapPosition,
14699
14707
  radius?: number,
14700
14708
  name?: string | string[],
14709
+ force?: ForceIdentification | ForceIdentification[],
14701
14710
  limit?: number,
14702
14711
  has_hidden_tile?: boolean,
14703
- collision_mask?: CollisionMaskLayer | CollisionMaskLayer[]
14712
+ has_tile_ghost?: boolean,
14713
+ to_be_deconstructed?: boolean,
14714
+ collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
14715
+ invert?: boolean
14704
14716
  }): void
14705
14717
 
14706
14718
  /**
@@ -14829,6 +14841,7 @@ interface LuaSurface {
14829
14841
 
14830
14842
  /**
14831
14843
  * Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched.
14844
+ * @param table.exclude_soft - Soft decoratives can be drawn over rails.
14832
14845
  * @param table.invert - If the filters should be inverted.
14833
14846
  */
14834
14847
  destroy_decoratives(this: void,
@@ -14836,6 +14849,10 @@ interface LuaSurface {
14836
14849
  area?: BoundingBox,
14837
14850
  position?: TilePosition,
14838
14851
  name?: string | string[] | LuaDecorativePrototype | LuaDecorativePrototype[],
14852
+ collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
14853
+ from_layer?: string,
14854
+ to_layer?: string,
14855
+ exclude_soft?: boolean,
14839
14856
  limit?: number,
14840
14857
  invert?: boolean
14841
14858
  }): void
@@ -14871,6 +14888,7 @@ interface LuaSurface {
14871
14888
  * Find decoratives of a given name in a given area.
14872
14889
  *
14873
14890
  * If no filters are given, returns all decoratives in the search area. If multiple filters are specified, returns only decoratives matching every given filter. If no area and no position are given, the entire surface is searched.
14891
+ * @param table.exclude_soft - Soft decoratives can be drawn over rails.
14874
14892
  * @param table.invert - If the filters should be inverted.
14875
14893
  * @example
14876
14894
  * ```
@@ -14884,6 +14902,10 @@ interface LuaSurface {
14884
14902
  area?: BoundingBox,
14885
14903
  position?: TilePosition,
14886
14904
  name?: string | string[] | LuaDecorativePrototype | LuaDecorativePrototype[],
14905
+ collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
14906
+ from_layer?: string,
14907
+ to_layer?: string,
14908
+ exclude_soft?: boolean,
14887
14909
  limit?: number,
14888
14910
  invert?: boolean
14889
14911
  }): void
@@ -15056,8 +15078,11 @@ interface LuaSurface {
15056
15078
  * If no filters are given, this returns all tiles in the search area.
15057
15079
  *
15058
15080
  * If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
15081
+ * @param table.has_tile_ghost - Can be further filtered by supplying a `force` filter.
15082
+ * @param table.invert - Whether the filters should be inverted.
15059
15083
  * @param table.position - Ignored if not given with radius.
15060
15084
  * @param table.radius - If given with position, will return all entities within the radius of the position.
15085
+ * @param table.to_be_deconstructed - Can be further filtered by supplying a `force` filter.
15061
15086
  */
15062
15087
  find_tiles_filtered(this: void,
15063
15088
  table: {
@@ -15065,9 +15090,13 @@ interface LuaSurface {
15065
15090
  position?: MapPosition,
15066
15091
  radius?: number,
15067
15092
  name?: string | string[],
15093
+ force?: ForceIdentification | ForceIdentification[],
15068
15094
  limit?: number,
15069
15095
  has_hidden_tile?: boolean,
15070
- collision_mask?: CollisionMaskLayer | CollisionMaskLayer[]
15096
+ has_tile_ghost?: boolean,
15097
+ to_be_deconstructed?: boolean,
15098
+ collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
15099
+ invert?: boolean
15071
15100
  }): void
15072
15101
 
15073
15102
  /**
@@ -15818,6 +15847,20 @@ interface LuaTile {
15818
15847
  collides_with(this: void,
15819
15848
  layer: CollisionMaskLayer): void
15820
15849
 
15850
+ /**
15851
+ * Gets all tile ghosts on this tile.
15852
+ * @param force - Get tile ghosts of this force.
15853
+ */
15854
+ get_tile_ghosts(this: void,
15855
+ force?: ForceIdentification): void
15856
+
15857
+ /**
15858
+ * Does this tile have any tile ghosts on it.
15859
+ * @param force - Check for tile ghosts of this force.
15860
+ */
15861
+ has_tile_ghost(this: void,
15862
+ force?: ForceIdentification): void
15863
+
15821
15864
  /**
15822
15865
  * All methods and properties that this object supports.
15823
15866
  */
@@ -15834,8 +15877,10 @@ interface LuaTile {
15834
15877
 
15835
15878
  /**
15836
15879
  * Is this tile marked for deconstruction?
15880
+ * @param force - The force who did the deconstruction order.
15837
15881
  */
15838
- to_be_deconstructed(this: void): void
15882
+ to_be_deconstructed(this: void,
15883
+ force?: ForceIdentification): void
15839
15884
 
15840
15885
  /**
15841
15886
  * The name of the {@link LuaTilePrototype | LuaTilePrototype} hidden under this tile or `nil` if there is no hidden tile. During normal gameplay, only {@link non-mineable | LuaTilePrototype::mineable_properties} tiles can become hidden. This can however be circumvented with {@link LuaSurface::set_hidden_tile | LuaSurface::set_hidden_tile}.
@@ -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.60
5
+ // Factorio version 1.1.61
6
6
  // API version 2
7
7
 
8
8
  /**
@@ -771,6 +771,7 @@ interface ConstantCombinatorParameters {
771
771
  /**
772
772
  * @param count - The amount of items being crafted.
773
773
  * @param index - The index of the item in the crafting queue.
774
+ * @param prerequisite - The item is a prerequisite for another item in the queue.
774
775
  * @param recipe - The recipe being crafted.
775
776
  */
776
777
  interface CraftingQueueItem {
@@ -782,6 +783,10 @@ interface CraftingQueueItem {
782
783
  * The index of the item in the crafting queue.
783
784
  */
784
785
  'index': number
786
+ /**
787
+ * The item is a prerequisite for another item in the queue.
788
+ */
789
+ 'prerequisite': boolean
785
790
  /**
786
791
  * The recipe being crafted.
787
792
  */
@@ -3740,7 +3745,7 @@ interface BaseDecorativePrototypeFilter {
3740
3745
 
3741
3746
  /**
3742
3747
  * @param filter - The condition to filter on. One of `"decal"`, `"autoplace"`, `"collision-mask"`.
3743
- * @param mask_mode - How to filter: `"collides"` or `"layers-equals"`
3748
+ * @param mask_mode - How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"`
3744
3749
  */
3745
3750
  interface DecorativePrototypeFilterCollisionMask extends BaseDecorativePrototypeFilter {
3746
3751
  /**
@@ -3749,7 +3754,7 @@ interface DecorativePrototypeFilterCollisionMask extends BaseDecorativePrototype
3749
3754
  'filter': 'collision-mask'
3750
3755
  'mask': CollisionMask | CollisionMaskWithFlags
3751
3756
  /**
3752
- * How to filter: `"collides"` or `"layers-equals"`
3757
+ * How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"`
3753
3758
  */
3754
3759
  'mask_mode': string
3755
3760
  }
@@ -3797,7 +3802,7 @@ interface EntityPrototypeFilterBuildBaseEvolutionRequirement extends BaseEntityP
3797
3802
 
3798
3803
  /**
3799
3804
  * @param filter - The condition to filter on. One of `"flying-robot"`, `"robot-with-logistics-interface"`, `"rail"`, `"ghost"`, `"explosion"`, `"vehicle"`, `"crafting-machine"`, `"rolling-stock"`, `"turret"`, `"transport-belt-connectable"`, `"wall-connectable"`, `"buildable"`, `"placable-in-editor"`, `"clonable"`, `"selectable"`, `"hidden"`, `"entity-with-health"`, `"building"`, `"fast-replaceable"`, `"uses-direction"`, `"minable"`, `"circuit-connectable"`, `"autoplace"`, `"blueprintable"`, `"item-to-place"`, `"name"`, `"type"`, `"collision-mask"`, `"flag"`, `"build-base-evolution-requirement"`, `"selection-priority"`, `"emissions"`, `"crafting-category"`.
3800
- * @param mask_mode - How to filter: `"collides"` or `"layers-equals"`
3805
+ * @param mask_mode - How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"`
3801
3806
  */
3802
3807
  interface EntityPrototypeFilterCollisionMask extends BaseEntityPrototypeFilter {
3803
3808
  /**
@@ -3806,7 +3811,7 @@ interface EntityPrototypeFilterCollisionMask extends BaseEntityPrototypeFilter {
3806
3811
  'filter': 'collision-mask'
3807
3812
  'mask': CollisionMask | CollisionMaskWithFlags
3808
3813
  /**
3809
- * How to filter: `"collides"` or `"layers-equals"`
3814
+ * How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"`
3810
3815
  */
3811
3816
  'mask_mode': string
3812
3817
  }
@@ -6781,7 +6786,7 @@ interface BaseTilePrototypeFilter {
6781
6786
 
6782
6787
  /**
6783
6788
  * @param filter - The condition to filter on. One of `"minable"`, `"autoplace"`, `"blueprintable"`, `"item-to-place"`, `"collision-mask"`, `"walking-speed-modifier"`, `"vehicle-friction-modifier"`, `"decorative-removal-probability"`, `"emissions"`.
6784
- * @param mask_mode - How to filter: `"collides"` or `"layers-equals"`
6789
+ * @param mask_mode - How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"`
6785
6790
  */
6786
6791
  interface TilePrototypeFilterCollisionMask extends BaseTilePrototypeFilter {
6787
6792
  /**
@@ -6790,7 +6795,7 @@ interface TilePrototypeFilterCollisionMask extends BaseTilePrototypeFilter {
6790
6795
  'filter': 'collision-mask'
6791
6796
  'mask': CollisionMask | CollisionMaskWithFlags
6792
6797
  /**
6793
- * How to filter: `"collides"` or `"layers-equals"`
6798
+ * How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"`
6794
6799
  */
6795
6800
  'mask_mode': string
6796
6801
  }
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.60
5
+ // Factorio version 1.1.61
6
6
  // API version 2
7
7
 
8
8
  declare namespace defines {
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.60
5
+ // Factorio version 1.1.61
6
6
  // API version 2
7
7
 
8
8
  /**
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.60
5
+ // Factorio version 1.1.61
6
6
  // API version 2
7
7
 
8
8
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
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",