factorio-types 1.2.27 → 1.2.29

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.39
5
+ // Factorio version 2.0.42
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -5240,7 +5240,7 @@ interface LuaControl {
5240
5240
  */
5241
5241
  readonly vehicle?: LuaEntity;
5242
5242
  /**
5243
- * Current walking state.
5243
+ * Current walking state of the player, or the spider-vehicle the character is driving.
5244
5244
  * @example ```
5245
5245
  -- Make the player go north. Note that a one-shot action like this will only make the player walk for one tick.
5246
5246
  game.player.walking_state = {walking = true, direction = defines.direction.north}
@@ -6566,6 +6566,10 @@ interface LuaEntity extends LuaControl {
6566
6566
  * Use {@link force_finish_ascending | runtime:LuaEntity::force_finish_ascending} if you want it to only descend from orbit.
6567
6567
  */
6568
6568
  cargo_pod_destination: CargoDestination;
6569
+ /**
6570
+ * The origin of this cargo pod entity. (Must be a silo, hub or pad)
6571
+ */
6572
+ cargo_pod_origin?: LuaEntity;
6569
6573
  /**
6570
6574
  * The state of this cargo pod entity.
6571
6575
  */
@@ -6820,7 +6824,7 @@ interface LuaEntity extends LuaControl {
6820
6824
  /**
6821
6825
  * The {@link unit_number | runtime:LuaEntity::unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype} that was destroyed to create this ghost. If it was created by other means, or if the inner entity does not support unit numbers, this property is `nil`.
6822
6826
  */
6823
- readonly ghost_unit_number?: uint;
6827
+ readonly ghost_unit_number?: uint64;
6824
6828
  /**
6825
6829
  * Returns a {@link rich text | https://wiki.factorio.com/Rich_text} string containing this entity's position and surface name as a gps tag. {@link Printing | runtime:LuaGameScript::print} it will ping the location of the entity.
6826
6830
  * @example ```
@@ -7404,7 +7408,7 @@ interface LuaEntity extends LuaControl {
7404
7408
  *
7405
7409
  * Only entities inheriting from {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype}, as well as {@link ItemRequestProxyPrototype | prototype:ItemRequestProxyPrototype} and {@link EntityGhostPrototype | prototype:EntityGhostPrototype} are assigned a unit number. Returns `nil` otherwise.
7406
7410
  */
7407
- readonly unit_number?: uint;
7411
+ readonly unit_number?: uint64;
7408
7412
  /**
7409
7413
  * The units associated with this spawner entity.
7410
7414
  */
@@ -8261,6 +8265,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8261
8265
  * The result units and spawn points with weight and evolution factor for a biter spawner entity.
8262
8266
  */
8263
8267
  readonly result_units?: UnitSpawnDefinition[];
8268
+ readonly rewire_neighbours_when_destroying: boolean;
8264
8269
  /**
8265
8270
  * The rising speed for this rocket silo rocket prototype.
8266
8271
  */
@@ -12259,7 +12264,7 @@ interface LuaItemCommon {
12259
12264
  /**
12260
12265
  * The unique identifier for this item, if any. Note that this ID stays the same no matter where the item is moved to.
12261
12266
  */
12262
- readonly item_number?: uint;
12267
+ readonly item_number?: uint64;
12263
12268
  /**
12264
12269
  * The current label for this item, if any.
12265
12270
  */
@@ -16853,7 +16858,7 @@ interface LuaSurface {
16853
16858
  * @param table.force The force that would place the entity. Defaults to the `"neutral"` force.
16854
16859
  */
16855
16860
  can_fast_replace(this: void, table: {
16856
- name: string;
16861
+ name: EntityID;
16857
16862
  position: MapPosition;
16858
16863
  direction?: defines.direction;
16859
16864
  force?: ForceID;
@@ -16869,7 +16874,7 @@ interface LuaSurface {
16869
16874
  * @param table.inner_name The prototype name of the entity contained in the ghost. Only used if `name` is `entity-ghost`.
16870
16875
  */
16871
16876
  can_place_entity(this: void, table: {
16872
- name: string;
16877
+ name: EntityID;
16873
16878
  position: MapPosition;
16874
16879
  direction?: defines.direction;
16875
16880
  force?: ForceID;
@@ -17491,7 +17496,7 @@ interface LuaSurface {
17491
17496
  */
17492
17497
  remove_script_position(this: void, id: uint): boolean;
17493
17498
  /**
17494
- * Generates a path with the specified constraints (as an array of {@link PathfinderWaypoints | runtime:PathfinderWaypoint}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use {@link LuaEntity::set_command | runtime:LuaEntity::set_command} instead.
17499
+ * Generates a path with the specified constraints (as an array of {@link PathfinderWaypoints | runtime:PathfinderWaypoint}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use {@link LuaCommandable::set_command | runtime:LuaCommandable::set_command} via {@link LuaEntity::commandable | runtime:LuaEntity::commandable} instead.
17495
17500
  *
17496
17501
  * The resulting path is ultimately returned asynchronously via {@link on_script_path_request_finished | runtime:on_script_path_request_finished}.
17497
17502
  * @param table.bounding_box The dimensions of the object that's supposed to travel the path.
@@ -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.39
5
+ // Factorio version 2.0.42
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -170,6 +170,9 @@ interface AsteroidChunkPrototypeFilter {
170
170
  */
171
171
  invert?: boolean;
172
172
  }
173
+ /**
174
+ * Used by {@link MapSettings | runtime:MapSettings} and {@link MapAndDifficultySettings | runtime:MapAndDifficultySettings}.
175
+ */
173
176
  interface AsteroidMapSettings {
174
177
  spawning_rate: double;
175
178
  max_ray_portals_expanded_per_tick: uint;
@@ -1608,7 +1611,7 @@ type EntityPrototypeFlag = /**
1608
1611
  * Used to automatically detect the proper direction of the entity if possible. Used by the pump, train stop, and train signal by default.
1609
1612
  */
1610
1613
  'filter-directions' | /**
1611
- * When set, entity will be possible to obtain by using {@link LuaGameScript::get_entity_by_unit_number | runtime:LuaGameScript::get_entity_by_unit_number}. It also changes input actions sent by a player to be selecting entity by unit number instead of a position which may help players in latency to select moving entities.
1614
+ * When set, entity will be possible to obtain by using {@link LuaGameScript::get_entity_by_unit_number | runtime:LuaGameScript::get_entity_by_unit_number}.
1612
1615
  */
1613
1616
  'get-by-unit-number' | /**
1614
1617
  * Used to specify that the entity breathes air, and is thus affected by poison.
@@ -2664,7 +2667,7 @@ interface BaseItemPrototypeFilter {
2664
2667
  /**
2665
2668
  * The condition to filter on.
2666
2669
  */
2667
- filter: 'tool' | 'mergeable' | 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'item-with-inventory' | 'selection-tool' | 'item-with-label' | 'has-rocket-launch-products' | 'fuel' | 'place-result' | 'burnt-result' | 'place-as-tile' | 'placed-as-equipment-result' | 'name' | 'type' | 'flag' | 'subgroup' | 'fuel-category' | 'stack-size' | 'fuel-value' | 'fuel-acceleration-multiplier' | 'fuel-top-speed-multiplier' | 'fuel-emissions-multiplier';
2670
+ filter: 'tool' | 'mergeable' | 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'item-with-inventory' | 'selection-tool' | 'item-with-label' | 'has-rocket-launch-products' | 'fuel' | 'place-result' | 'burnt-result' | 'place-as-tile' | 'placed-as-equipment-result' | 'plant-result' | 'spoil-result' | 'name' | 'type' | 'flag' | 'subgroup' | 'fuel-category' | 'stack-size' | 'fuel-value' | 'fuel-acceleration-multiplier' | 'fuel-top-speed-multiplier' | 'fuel-emissions-multiplier';
2668
2671
  /**
2669
2672
  * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
2670
2673
  */
@@ -2674,7 +2677,7 @@ interface BaseItemPrototypeFilter {
2674
2677
  */
2675
2678
  invert?: boolean;
2676
2679
  }
2677
- type ItemPrototypeFilter = BaseItemPrototypeFilter | ItemPrototypeFilterBurntResult | ItemPrototypeFilterFlag | ItemPrototypeFilterFuelAccelerationMultiplier | ItemPrototypeFilterFuelCategory | ItemPrototypeFilterFuelEmissionsMultiplier | ItemPrototypeFilterFuelTopSpeedMultiplier | ItemPrototypeFilterFuelValue | ItemPrototypeFilterName | ItemPrototypeFilterPlaceAsTile | ItemPrototypeFilterPlaceResult | ItemPrototypeFilterPlacedAsEquipmentResult | ItemPrototypeFilterStackSize | ItemPrototypeFilterSubgroup | ItemPrototypeFilterType;
2680
+ type ItemPrototypeFilter = BaseItemPrototypeFilter | ItemPrototypeFilterBurntResult | ItemPrototypeFilterFlag | ItemPrototypeFilterFuelAccelerationMultiplier | ItemPrototypeFilterFuelCategory | ItemPrototypeFilterFuelEmissionsMultiplier | ItemPrototypeFilterFuelTopSpeedMultiplier | ItemPrototypeFilterFuelValue | ItemPrototypeFilterName | ItemPrototypeFilterPlaceAsTile | ItemPrototypeFilterPlaceResult | ItemPrototypeFilterPlacedAsEquipmentResult | ItemPrototypeFilterPlantResult | ItemPrototypeFilterSpoilResult | ItemPrototypeFilterStackSize | ItemPrototypeFilterSubgroup | ItemPrototypeFilterType;
2678
2681
  /**
2679
2682
  *
2680
2683
  * Applies to variant case `burnt-result`
@@ -2832,6 +2835,34 @@ interface ItemPrototypeFilterPlacedAsEquipmentResult extends BaseItemPrototypeFi
2832
2835
  */
2833
2836
  'elem_filters'?: EquipmentPrototypeFilter[];
2834
2837
  }
2838
+ /**
2839
+ *
2840
+ * Applies to variant case `plant-result`
2841
+ */
2842
+ interface ItemPrototypeFilterPlantResult extends BaseItemPrototypeFilter {
2843
+ /**
2844
+ * The condition to filter on.
2845
+ */
2846
+ 'filter': 'plant-result';
2847
+ /**
2848
+ * Filters for the plant result.
2849
+ */
2850
+ 'elem_filters'?: EntityPrototypeFilter[];
2851
+ }
2852
+ /**
2853
+ *
2854
+ * Applies to variant case `spoil-result`
2855
+ */
2856
+ interface ItemPrototypeFilterSpoilResult extends BaseItemPrototypeFilter {
2857
+ /**
2858
+ * The condition to filter on.
2859
+ */
2860
+ 'filter': 'spoil-result';
2861
+ /**
2862
+ * Filters for the spoil result.
2863
+ */
2864
+ 'elem_filters'?: ItemPrototypeFilter[];
2865
+ }
2835
2866
  /**
2836
2867
  * Usage example:
2837
2868
  *
@@ -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.39
5
+ // Factorio version 2.0.42
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.39
5
+ // Factorio version 2.0.42
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.39
5
+ // Factorio version 2.0.42
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.39
5
+ // Factorio version 2.0.42
6
6
  // API version 6
7
7
 
8
8
  /**