factorio-types 1.2.8 → 1.2.9

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 2.0.14
5
+ // Factorio version 2.0.15
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -6753,7 +6753,7 @@ interface LuaEntity extends LuaControl {
6753
6753
  */
6754
6754
  logistic_network: LuaLogisticNetwork;
6755
6755
  /**
6756
- * Max health of this entity. Quality of entity is taken into account.
6756
+ * Max health of this entity.
6757
6757
  */
6758
6758
  readonly max_health: float;
6759
6759
  /**
@@ -7898,7 +7898,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7898
7898
  * The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
7899
7899
  */
7900
7900
  readonly object_name: string;
7901
- readonly per_lane_filters?: bool;
7901
+ readonly per_lane_filters?: boolean;
7902
7902
  /**
7903
7903
  * The beacon profile: extra multiplier applied to the effects received from beacon by the effect receiver based on amount of beacons that reach that effect receiver
7904
7904
  */
@@ -8947,7 +8947,7 @@ interface LuaForce {
8947
8947
  create_space_platform(this: void, table: {
8948
8948
  name?: string;
8949
8949
  planet: SpaceLocationID;
8950
- starter_pack: ItemID;
8950
+ starter_pack: ItemWithQualityID;
8951
8951
  }): LuaSpacePlatform | null;
8952
8952
  /**
8953
8953
  * Disable all recipes and technologies. Only recipes and technologies enabled explicitly will be useable from this point.
@@ -11916,7 +11916,7 @@ interface LuaItemCommon {
11916
11916
  trees_and_rocks_only: boolean;
11917
11917
  }
11918
11918
  /**
11919
- * Prototype of an item. For example, an item prototype can be obtained from {@link LuaGameScript::item_prototypes | runtime:LuaGameScript::item_prototypes} by its name: `prototypes.item["iron-plate"]`.
11919
+ * Prototype of an item. For example, an item prototype can be obtained from {@link LuaPrototypes::item | runtime:LuaPrototypes::item} by its name: `prototypes.item["iron-plate"]`.
11920
11920
  */
11921
11921
  interface LuaItemPrototype extends LuaPrototypeBase {
11922
11922
  /**
@@ -15723,6 +15723,7 @@ interface LuaSimulation {
15723
15723
  * The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
15724
15724
  */
15725
15725
  readonly object_name: string;
15726
+ smart_belt_building?: boolean;
15726
15727
  /**
15727
15728
  * 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.
15728
15729
  */
@@ -15883,7 +15884,7 @@ interface LuaSpacePlatform {
15883
15884
  /**
15884
15885
  * The starter pack used to create this space platform.
15885
15886
  */
15886
- readonly starter_pack: LuaItemPrototype;
15887
+ readonly starter_pack: ItemIDAndQualityIDPair;
15887
15888
  /**
15888
15889
  * The current state of this space platform.
15889
15890
  */
@@ -16794,8 +16795,9 @@ interface LuaSurface {
16794
16795
  * Spawn pollution at the given position.
16795
16796
  * @param source Where to spawn the pollution.
16796
16797
  * @param amount How much pollution to add.
16798
+ * @param prototype The entity prototype to attribute the pollution change to in statistics. If not defined, the pollution change will not show up in statistics.
16797
16799
  */
16798
- pollute(this: void, source: MapPosition, amount: double): void;
16800
+ pollute(this: void, source: MapPosition, amount: double, prototype?: EntityID): void;
16799
16801
  /**
16800
16802
  * Print text to the chat console of all players on this surface.
16801
16803
  *
@@ -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 2.0.14
5
+ // Factorio version 2.0.15
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -1483,7 +1483,7 @@ interface EntityPrototypeFilterFlag extends BaseEntityPrototypeFilter {
1483
1483
  /**
1484
1484
  * For use within nested filters such as the `place-result` filter of array{@link [ItemPrototypeFilter | runtime:ItemPrototypeFilter}].
1485
1485
  *
1486
- * To get a specific prototype by name, see {@link LuaGameScript::entity_prototypes | runtime:LuaGameScript::entity_prototypes}.
1486
+ * To get a specific prototype by name, see {@link LuaPrototypes::entity | runtime:LuaPrototypes::entity}.
1487
1487
  * Applies to variant case `name`
1488
1488
  */
1489
1489
  interface EntityPrototypeFilterName extends BaseEntityPrototypeFilter {
@@ -1999,7 +1999,7 @@ interface FluidPrototypeFilterMaxTemperature extends BaseFluidPrototypeFilter {
1999
1999
  /**
2000
2000
  * For use within nested filters such as the `has-product-fluid` filter of array{@link [RecipePrototypeFilter | runtime:RecipePrototypeFilter}].
2001
2001
  *
2002
- * To get a specific prototype by name, see {@link LuaGameScript::fluid_prototypes | runtime:LuaGameScript::fluid_prototypes}.
2002
+ * To get a specific prototype by name, see {@link LuaPrototypes::fluid | runtime:LuaPrototypes::fluid}.
2003
2003
  * Applies to variant case `name`
2004
2004
  */
2005
2005
  interface FluidPrototypeFilterName extends BaseFluidPrototypeFilter {
@@ -2705,7 +2705,7 @@ interface ItemPrototypeFilterFuelValue extends BaseItemPrototypeFilter {
2705
2705
  /**
2706
2706
  * For use within nested filters such as the `has-product-item` filter of array{@link [RecipePrototypeFilter | runtime:RecipePrototypeFilter}].
2707
2707
  *
2708
- * To get a specific prototype by name, see {@link LuaGameScript::item_prototypes | runtime:LuaGameScript::item_prototypes}.
2708
+ * To get a specific prototype by name, see {@link LuaPrototypes::item | runtime:LuaPrototypes::item}.
2709
2709
  * Applies to variant case `name`
2710
2710
  */
2711
2711
  interface ItemPrototypeFilterName extends BaseItemPrototypeFilter {
@@ -5527,6 +5527,7 @@ interface PipeConnection {
5527
5527
  target_pipe_connection_index?: uint;
5528
5528
  }
5529
5529
  interface PipeConnectionDefinition {
5530
+ connection_type: 'normal' | 'underground' | 'linked';
5530
5531
  /**
5531
5532
  * The 4 cardinal direction connection points for this pipe.
5532
5533
  */
@@ -5537,6 +5538,10 @@ interface PipeConnectionDefinition {
5537
5538
  max_underground_distance?: uint;
5538
5539
  flow_direction: 'input-output' | 'input' | 'output';
5539
5540
  direction: defines.direction;
5541
+ /**
5542
+ * Only supplied if `connection_type` is `"linked"`.
5543
+ */
5544
+ linked_connection_id?: uint32;
5540
5545
  }
5541
5546
  interface PlaceAsTileResult {
5542
5547
  /**
@@ -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 2.0.14
5
+ // Factorio version 2.0.15
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
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 2.0.14
5
+ // Factorio version 2.0.15
6
6
  // API version 6
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 2.0.14
5
+ // Factorio version 2.0.15
6
6
  // API version 6
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 2.0.14
5
+ // Factorio version 2.0.15
6
6
  // API version 6
7
7
 
8
8
  /**
@@ -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 2.0.14
5
+ // Factorio version 2.0.15
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -10221,6 +10221,7 @@ interface UtilitySprites extends PrototypeBase {
10221
10221
  mod_downloads_count: Sprite;
10222
10222
  mod_last_updated: Sprite;
10223
10223
  mouse_cursor: Sprite;
10224
+ mouse_cursor_macos: Sprite;
10224
10225
  move_tag: Sprite;
10225
10226
  multiplayer_waiting_icon: Sprite;
10226
10227
  nature_icon: Sprite;
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 2.0.14
5
+ // Factorio version 2.0.15
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
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",
@@ -23,7 +23,7 @@
23
23
  "src/**/*.d.ts",
24
24
  "dist/**/*.d.ts"
25
25
  ],
26
- "factorioVersion": "2.0.14",
26
+ "factorioVersion": "2.0.15",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },
package/src/core.d.ts CHANGED
@@ -30,8 +30,9 @@ declare const serpent: Serpent;
30
30
  // can eventually fix these on a per-case basis
31
31
  type Table = any;
32
32
 
33
+ // These ones seem to be strangely missing from concepts and therefore not available in the runtime namespace
33
34
  type uint = number;
34
-
35
+ type uint32 = number;
35
36
  type bool = boolean;
36
37
 
37
38
  /*