factorio-types 1.2.51 → 1.2.52

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.69
5
+ // Factorio version 2.0.70
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -5942,7 +5942,7 @@ interface LuaDisplayPanelControlBehavior extends LuaControlBehavior {
5942
5942
  * @param index Message index. Use `-1` to append new element.
5943
5943
  * @param message The message definition for the specified index. Specify `nil` to remove the message.
5944
5944
  */
5945
- set_message(this: void, index: uint32, message: DisplayPanelMessageDefinition): void;
5945
+ set_message(this: void, index: int32, message: DisplayPanelMessageDefinition | nil): void;
5946
5946
  /**
5947
5947
  * The full list of configured messages.
5948
5948
  */
@@ -10008,7 +10008,7 @@ interface LuaForce {
10008
10008
  * Returns `nil` if the chunk has not been charted for this force.
10009
10009
  * @returns The raw pixel data.
10010
10010
  */
10011
- get_chunk_chart(this: void, surface: SurfaceIdentification, position: ChunkPosition): string | null;
10011
+ get_chunk_chart(this: void, surface: SurfaceIdentification, chunk_position: ChunkPosition): string | null;
10012
10012
  /**
10013
10013
  * The entity build statistics for this force (built and mined) for the given surface.
10014
10014
  */
@@ -10093,18 +10093,18 @@ interface LuaForce {
10093
10093
  get_turret_attack_modifier(this: void, turret: EntityID): double;
10094
10094
  /**
10095
10095
  * Has a chunk been charted?
10096
- * @param position Position of the chunk.
10096
+ * @param chunk_position Position of the chunk.
10097
10097
  */
10098
- is_chunk_charted(this: void, surface: SurfaceIdentification, position: ChunkPosition): boolean;
10098
+ is_chunk_charted(this: void, surface: SurfaceIdentification, chunk_position: ChunkPosition): boolean;
10099
10099
  /**
10100
10100
  * Has a chunk been requested for charting?
10101
- * @param position Position of the chunk.
10101
+ * @param chunk_position Position of the chunk.
10102
10102
  */
10103
- is_chunk_requested_for_charting(this: void, surface: SurfaceIdentification, position: ChunkPosition): boolean;
10103
+ is_chunk_requested_for_charting(this: void, surface: SurfaceIdentification, chunk_position: ChunkPosition): boolean;
10104
10104
  /**
10105
10105
  * Is the given chunk currently charted and visible (not covered by fog of war) on the map.
10106
10106
  */
10107
- is_chunk_visible(this: void, surface: SurfaceIdentification, position: ChunkPosition): boolean;
10107
+ is_chunk_visible(this: void, surface: SurfaceIdentification, chunk_position: ChunkPosition): boolean;
10108
10108
  /**
10109
10109
  * Is this force an enemy? This differs from `get_cease_fire` in that it is always false for neutral force. This is equivalent to checking the `enemy` ForceCondition.
10110
10110
  */
@@ -10257,10 +10257,10 @@ interface LuaForce {
10257
10257
  */
10258
10258
  set_turret_attack_modifier(this: void, turret: EntityID, modifier: double): void;
10259
10259
  /**
10260
- * @param position The chunk position to unchart.
10260
+ * @param chunk_position The chunk position to unchart.
10261
10261
  * @param surface Surface to unchart on.
10262
10262
  */
10263
- unchart_chunk(this: void, position: ChunkPosition, surface: SurfaceIdentification): void;
10263
+ unchart_chunk(this: void, chunk_position: ChunkPosition, surface: SurfaceIdentification): void;
10264
10264
  /**
10265
10265
  * Unlocks the quality to be accessible to this force.
10266
10266
  * @param quality Name of the quality.
@@ -18277,9 +18277,9 @@ interface LuaSurface {
18277
18277
  * Removes the chunk from the territory it is associated with (if any) and allows the map generator to potentially generate a new territory for the chunk in the future. To prevent the game from generating a new territory for the chunk, use {@link LuaSurface::set_chunk_territory | runtime:LuaSurface::set_chunk_territory} to set the chunk's territory to `nil`.
18278
18278
  *
18279
18279
  * Territories that do not contain at least one generated chunk as a result of calling this method will be automatically deleted.
18280
- * @param positions The chunk positions. The chunks at these positions does not need to exist.
18280
+ * @param chunk_positions The chunk positions. The chunks at these positions does not need to exist.
18281
18281
  */
18282
- clear_territory_for_chunks(this: void, positions: ChunkPosition[]): void;
18282
+ clear_territory_for_chunks(this: void, chunk_positions: ChunkPosition[]): void;
18283
18283
  /**
18284
18284
  * Clones the given area.
18285
18285
  *
@@ -18508,9 +18508,9 @@ interface LuaSurface {
18508
18508
  */
18509
18509
  decorative_prototype_collides(this: void, prototype: DecorativeID, position: MapPosition): boolean;
18510
18510
  /**
18511
- * @param position The chunk position to delete
18511
+ * @param chunk_position The chunk position to delete
18512
18512
  */
18513
- delete_chunk(this: void, position: ChunkPosition): void;
18513
+ delete_chunk(this: void, chunk_position: ChunkPosition): void;
18514
18514
  /**
18515
18515
  * Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched.
18516
18516
  * @param table.exclude_soft Soft decoratives can be drawn over rails.
@@ -18729,6 +18729,8 @@ interface LuaSurface {
18729
18729
  force_generate_chunk_requests(this: void): void;
18730
18730
  /**
18731
18731
  * Get an iterator going over every chunk on this surface.
18732
+ *
18733
+ * Chunks may or may not be generated; use {@link LuaSurface::is_chunk_generated | runtime:LuaSurface::is_chunk_generated} to check a chunk's state before accessing it.
18732
18734
  */
18733
18735
  get_chunks(this: void): LuaChunkIterator;
18734
18736
  /**
@@ -18758,10 +18760,10 @@ interface LuaSurface {
18758
18760
  get_double_hidden_tile(this: void, position: TilePosition): string;
18759
18761
  /**
18760
18762
  * Returns all the military targets (entities with force) on this chunk for the given force.
18761
- * @param position The chunk's position.
18763
+ * @param chunk_position The chunk's position.
18762
18764
  * @param force Entities of this force will be returned.
18763
18765
  */
18764
- get_entities_with_force(this: void, position: ChunkPosition, force: ForceID): LuaEntity[];
18766
+ get_entities_with_force(this: void, chunk_position: ChunkPosition, force: ForceID): LuaEntity[];
18765
18767
  /**
18766
18768
  * The hidden tile name.
18767
18769
  * @param position The tile position.
@@ -18828,9 +18830,9 @@ interface LuaSurface {
18828
18830
  get_territories(this: void): LuaTerritory[];
18829
18831
  /**
18830
18832
  * Get the territory that the given chunk is assigned to. If the chunk is not part of any territory or the territory for the chunk has not yet been generated, then this returns `nil`.
18831
- * @param position The chunk's position. The chunk at this position does not need to exist.
18833
+ * @param chunk_position The chunk's position. The chunk at this position does not need to exist.
18832
18834
  */
18833
- get_territory_for_chunk(this: void, position: ChunkPosition): LuaTerritory | null;
18835
+ get_territory_for_chunk(this: void, chunk_position: ChunkPosition): LuaTerritory | null;
18834
18836
  /**
18835
18837
  * Get the tile at a given position. An alternative call signature for this method is passing it a single {@link TilePosition | runtime:TilePosition}.
18836
18838
  *
@@ -18843,9 +18845,9 @@ interface LuaSurface {
18843
18845
  get_total_pollution(this: void): double;
18844
18846
  /**
18845
18847
  * Is a given chunk generated?
18846
- * @param position The chunk's position.
18848
+ * @param chunk_position The chunk's position.
18847
18849
  */
18848
- is_chunk_generated(this: void, position: ChunkPosition): boolean;
18850
+ is_chunk_generated(this: void, chunk_position: ChunkPosition): boolean;
18849
18851
  /**
18850
18852
  * Play a sound for every player on this surface.
18851
18853
  *
@@ -18932,10 +18934,10 @@ interface LuaSurface {
18932
18934
  request_to_generate_chunks(this: void, position: MapPosition, radius?: uint32): void;
18933
18935
  /**
18934
18936
  * Set generated status of a chunk. Useful when copying chunks.
18935
- * @param position The chunk's position.
18937
+ * @param chunk_position The chunk's position.
18936
18938
  * @param status The chunk's new status.
18937
18939
  */
18938
- set_chunk_generated_status(this: void, position: ChunkPosition, status: defines.chunk_generated_status): void;
18940
+ set_chunk_generated_status(this: void, chunk_position: ChunkPosition, status: defines.chunk_generated_status): void;
18939
18941
  /**
18940
18942
  * Sets the cover tile for the given force and tile on this surface.
18941
18943
  */
@@ -18989,10 +18991,10 @@ interface LuaSurface {
18989
18991
  * It's recommended that territory chunks are connected to each other, but this is not required.
18990
18992
  *
18991
18993
  * Territories that do not contain at least one generated chunk as a result of calling this method will be automatically deleted.
18992
- * @param positions The chunk positions. The chunks at these positions do not need to exist in order to be assigned to a territory.
18994
+ * @param chunk_positions The chunk positions. The chunks at these positions do not need to exist in order to be assigned to a territory.
18993
18995
  * @param territory The territory to associate the chunks with. If not `nil`, the territory must belong to this same surface or else an error will be produced. If `nil`, then the chunks get removed from the territory it is currently associated with and will prevent the map generator from automatically re-generate a new territory for the chunk in the future.
18994
18996
  */
18995
- set_territory_for_chunks(this: void, positions: ChunkPosition[], territory?: LuaTerritory): void;
18997
+ set_territory_for_chunks(this: void, chunk_positions: ChunkPosition[], territory?: LuaTerritory): void;
18996
18998
  /**
18997
18999
  * Set tiles at specified locations. Can automatically correct the edges around modified tiles.
18998
19000
  *
@@ -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.69
5
+ // Factorio version 2.0.70
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -119,7 +119,7 @@ type Alignment = 'top-left' | 'middle-left' | /**
119
119
  'left' | 'bottom-left' | 'top-center' | 'middle-center' | /**
120
120
  * The same as `"middle-center"`
121
121
  */
122
- 'center' | 'bottom-center' | 'top-right' | /**
122
+ 'center' | 'bottom-center' | 'top-right' | 'middle-right' | /**
123
123
  * The same as `"middle-right"`
124
124
  */
125
125
  'right' | 'bottom-right';
@@ -4118,7 +4118,7 @@ interface LogisticSection {
4118
4118
  /**
4119
4119
  * Defaults to true.
4120
4120
  */
4121
- active?: float;
4121
+ active?: boolean;
4122
4122
  }
4123
4123
  interface LogisticSections {
4124
4124
  sections?: LogisticSection[];
@@ -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.69
5
+ // Factorio version 2.0.70
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.69
5
+ // Factorio version 2.0.70
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.69
5
+ // Factorio version 2.0.70
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.69
5
+ // Factorio version 2.0.70
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.69
5
+ // Factorio version 2.0.70
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -699,6 +699,9 @@ interface ArtilleryFlarePrototype extends EntityPrototype {
699
699
  * Shadow variation variation count and individual frame count must be equal to picture variation count.
700
700
  */
701
701
  shadows?: AnimationVariations;
702
+ /**
703
+ * Only artillery turrets/wagons whose ammo's {@link ammo_category | prototype:AmmoItemPrototype::ammo_category} matches this category will shoot at this flare. Defaults to all ammo categories being able to shoot at this flare.
704
+ */
702
705
  shot_category?: AmmoCategoryID;
703
706
  /**
704
707
  * How many artillery shots should be fired at the position of this flare.
@@ -2688,7 +2691,7 @@ interface DeliverImpactCombination {
2688
2691
  * Name of the deliver impact combination.
2689
2692
  */
2690
2693
  name: string;
2691
- trigger_effect_item: TriggerEffectItem;
2694
+ trigger_effect_item: TriggerEffect;
2692
2695
  type: 'deliver-impact-combination';
2693
2696
  }
2694
2697
  /**
@@ -2712,7 +2715,7 @@ interface DestroyCliffAchievementPrototype extends AchievementPrototype {
2712
2715
  limited_to_one_game?: boolean;
2713
2716
  }
2714
2717
  /**
2715
- * A display panel prototype to provide a prototype for display panels.
2718
+ * Entity that display a signal icon and some text, either configured directly in the entity or through the circuit network.
2716
2719
  */
2717
2720
  interface DisplayPanelPrototype extends EntityWithOwnerPrototype {
2718
2721
  /**
@@ -2732,7 +2735,7 @@ interface DisplayPanelPrototype extends EntityWithOwnerPrototype {
2732
2735
  draw_circuit_wires?: boolean;
2733
2736
  draw_copper_wires?: boolean;
2734
2737
  /**
2735
- * The maximum width of the text on the display panel.
2738
+ * The maximum display width of the text on the display panel. If the text exceeds this width it will be wrapped so that it continues on the next line.
2736
2739
  */
2737
2740
  max_text_width?: uint32;
2738
2741
  /**
@@ -9211,6 +9214,10 @@ interface SurfacePrototype extends Prototype {
9211
9214
  * Only loaded if `icons` is not defined.
9212
9215
  */
9213
9216
  icon_size?: SpriteSizeType;
9217
+ /**
9218
+ * Can't be an empty array.
9219
+ */
9220
+ icons?: IconData[];
9214
9221
  surface_properties?: LuaTable<SurfacePropertyID, double>;
9215
9222
  }
9216
9223
  /**
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.69
5
+ // Factorio version 2.0.70
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -188,7 +188,7 @@ type Alignment = 'top-left' | 'middle-left' | /**
188
188
  'left' | 'bottom-left' | 'top-center' | 'middle-center' | /**
189
189
  * The same as `"middle-center"`
190
190
  */
191
- 'center' | 'bottom-center' | 'top-right' | /**
191
+ 'center' | 'bottom-center' | 'top-right' | 'middle-right' | /**
192
192
  * The same as `"middle-right"`
193
193
  */
194
194
  'right' | 'bottom-right';
@@ -2323,6 +2323,14 @@ interface CargoStationParameters {
2323
2323
  */
2324
2324
  giga_hatch_definitions?: GigaCargoHatchDefinition[];
2325
2325
  hatch_definitions?: CargoHatchDefinition[];
2326
+ /**
2327
+ * If set to false, this station will not accept incoming cargo units even if it has hatches that can. (can occur through linked cargo bays)
2328
+ */
2329
+ is_input_station?: boolean;
2330
+ /**
2331
+ * If set to false, this station will not dispatch cargo units even if it has hatches that can. (can occur through linked cargo bays)
2332
+ */
2333
+ is_output_station?: boolean;
2326
2334
  /**
2327
2335
  * Packed cargo units will wait for the full order to be completed. This is useful to save rockets in rocket silos when items trickle in slowly. The platform hub has immediate access to items so false is better to allow partial fulfillments.
2328
2336
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.51",
3
+ "version": "1.2.52",
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.69",
26
+ "factorioVersion": "2.0.70",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },