factorio-types 1.2.50 → 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.67
5
+ // Factorio version 2.0.70
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -2157,6 +2157,24 @@ interface LuaBootstrap {
2157
2157
  script.on_event(defines.events.on_built_entity,
2158
2158
  function(event) game.print("Gotta go fast!") end,
2159
2159
  {{filter = "name", name = "fast-inserter"}})
2160
+ ```
2161
+ */
2162
+ on_event(this: void, event: defines.events.on_player_dropped_item_into_entity, handler: ((this: void, arg0: runtime.on_player_dropped_item_into_entity) => any) | nil, filters?: EventFilter): void;
2163
+ /**
2164
+ * Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
2165
+ * @param event The event(s) or custom-input to invoke the handler on.
2166
+ * @param handler The handler for this event. Passing `nil` will unregister it.
2167
+ * @param filters The filters for this event. Can only be used when registering for individual events.
2168
+ * @example ```
2169
+ -- Register for the on_tick event to print the current tick to console each tick
2170
+ script.on_event(defines.events.on_tick,
2171
+ function(event) game.print(event.tick) end)
2172
+ ```
2173
+ * @example ```
2174
+ -- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
2175
+ script.on_event(defines.events.on_built_entity,
2176
+ function(event) game.print("Gotta go fast!") end,
2177
+ {{filter = "name", name = "fast-inserter"}})
2160
2178
  ```
2161
2179
  */
2162
2180
  on_event(this: void, event: defines.events.on_player_fast_transferred, handler: ((this: void, arg0: runtime.on_player_fast_transferred) => any) | nil, filters?: EventFilter): void;
@@ -5924,7 +5942,7 @@ interface LuaDisplayPanelControlBehavior extends LuaControlBehavior {
5924
5942
  * @param index Message index. Use `-1` to append new element.
5925
5943
  * @param message The message definition for the specified index. Specify `nil` to remove the message.
5926
5944
  */
5927
- set_message(this: void, index: uint32, message: DisplayPanelMessageDefinition): void;
5945
+ set_message(this: void, index: int32, message: DisplayPanelMessageDefinition | nil): void;
5928
5946
  /**
5929
5947
  * The full list of configured messages.
5930
5948
  */
@@ -6830,11 +6848,11 @@ interface LuaEntity extends LuaControl {
6830
6848
  /**
6831
6849
  * Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
6832
6850
  *
6833
- * Entities that are not active naturally can't be set to be active (setting it to be active will do nothing)
6851
+ * Writing to this is deprecated and affects only the {@link disabled_by_script | runtime:LuaEntity::disabled_by_script} state.
6834
6852
  *
6835
- * Ghosts, simple smoke, and corpses can't be modified at this time.
6853
+ * Reading from this returns `false` if the entity is deactivated in at least one of the following ways: {@link by script | runtime:LuaEntity::disabled_by_script}, {@link by circuit network | runtime:LuaEntity::disabled_by_control_behavior}, {@link by recipe | runtime:LuaEntity::disabled_by_recipe}, {@link by freezing | runtime:LuaEntity::frozen}, or by deconstruction.
6836
6854
  *
6837
- * It is even possible to set the character to not be active, so he can't move and perform most of the tasks.
6855
+ * Entities that are not active naturally can't be set to be active (setting it to be active will do nothing). Some entities (Corpse, FireFlame, Roboport, RollingStock, dying entities) need to remain active and will ignore writes.
6838
6856
  */
6839
6857
  active: boolean;
6840
6858
  /**
@@ -7085,7 +7103,7 @@ interface LuaEntity extends LuaControl {
7085
7103
  */
7086
7104
  readonly disabled_by_control_behavior: boolean;
7087
7105
  /**
7088
- * If the updatable entity is disabled by recipe.
7106
+ * If the assembling machine is disabled by recipe, e.g. due to {@link AssemblingMachinePrototype::disabled_when_recipe_not_researched | prototype:AssemblingMachinePrototype::disabled_when_recipe_not_researched}.
7089
7107
  */
7090
7108
  readonly disabled_by_recipe: boolean;
7091
7109
  /**
@@ -7129,7 +7147,7 @@ interface LuaEntity extends LuaControl {
7129
7147
  */
7130
7148
  readonly effective_speed?: float;
7131
7149
  /**
7132
- * Multiplies the acceleration the vehicle can create for one unit of energy. Defaults to `1`.
7150
+ * Multiplies the acceleration the car can create for one unit of energy. Defaults to `1`.
7133
7151
  */
7134
7152
  effectivity_modifier: float;
7135
7153
  /**
@@ -7420,6 +7438,10 @@ interface LuaEntity extends LuaControl {
7420
7438
  * Script controlled flag that allows entity to be mined.
7421
7439
  */
7422
7440
  minable_flag: boolean;
7441
+ /**
7442
+ * Area in which this mining drill looks for resources to mine.
7443
+ */
7444
+ readonly mining_area: BoundingBox;
7423
7445
  /**
7424
7446
  * The filter mode for this mining drill. `nil` if this mining drill doesn't have filters.
7425
7447
  */
@@ -7433,7 +7455,9 @@ interface LuaEntity extends LuaControl {
7433
7455
  */
7434
7456
  readonly mining_target?: LuaEntity;
7435
7457
  /**
7436
- * If the entity is currently mirrored. This state is referred to as `flipped` elsewhere, such as on the {@link on_player_flipped_entity | runtime:on_player_flipped_entity} event.
7458
+ * Whether the entity is currently mirrored. This state is referred to as `flipped` elsewhere, such as on the {@link on_player_flipped_entity | runtime:on_player_flipped_entity} event.
7459
+ *
7460
+ * If an entity is mirrored, it is flipped over the axis that is pointing in the entity's direction. For example if a mirrored entity is facing north, everything that was defined to be facing east in the prototype now faces west.
7437
7461
  */
7438
7462
  mirroring: boolean;
7439
7463
  /**
@@ -8187,6 +8211,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8187
8211
  */
8188
8212
  readonly color?: Color;
8189
8213
  readonly combat_robot_friction?: double;
8214
+ readonly connection_category: string[];
8190
8215
  readonly connection_distance?: double;
8191
8216
  /**
8192
8217
  * The construction radius for this roboport prototype.
@@ -9983,7 +10008,7 @@ interface LuaForce {
9983
10008
  * Returns `nil` if the chunk has not been charted for this force.
9984
10009
  * @returns The raw pixel data.
9985
10010
  */
9986
- get_chunk_chart(this: void, surface: SurfaceIdentification, position: ChunkPosition): string | null;
10011
+ get_chunk_chart(this: void, surface: SurfaceIdentification, chunk_position: ChunkPosition): string | null;
9987
10012
  /**
9988
10013
  * The entity build statistics for this force (built and mined) for the given surface.
9989
10014
  */
@@ -10068,18 +10093,18 @@ interface LuaForce {
10068
10093
  get_turret_attack_modifier(this: void, turret: EntityID): double;
10069
10094
  /**
10070
10095
  * Has a chunk been charted?
10071
- * @param position Position of the chunk.
10096
+ * @param chunk_position Position of the chunk.
10072
10097
  */
10073
- is_chunk_charted(this: void, surface: SurfaceIdentification, position: ChunkPosition): boolean;
10098
+ is_chunk_charted(this: void, surface: SurfaceIdentification, chunk_position: ChunkPosition): boolean;
10074
10099
  /**
10075
10100
  * Has a chunk been requested for charting?
10076
- * @param position Position of the chunk.
10101
+ * @param chunk_position Position of the chunk.
10077
10102
  */
10078
- 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;
10079
10104
  /**
10080
10105
  * Is the given chunk currently charted and visible (not covered by fog of war) on the map.
10081
10106
  */
10082
- is_chunk_visible(this: void, surface: SurfaceIdentification, position: ChunkPosition): boolean;
10107
+ is_chunk_visible(this: void, surface: SurfaceIdentification, chunk_position: ChunkPosition): boolean;
10083
10108
  /**
10084
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.
10085
10110
  */
@@ -10167,6 +10192,10 @@ interface LuaForce {
10167
10192
  * Reapplies all possible research effects, including unlocked recipes. Any custom changes are lost. Preserves research state of technologies.
10168
10193
  */
10169
10194
  reset_technology_effects(this: void): void;
10195
+ /**
10196
+ * Trigger the "scripted" {@link research trigger | runtime:ResearchTrigger} of a technology, researching it. Does nothing if the technology does not have a "scripted" research trigger.
10197
+ */
10198
+ script_trigger_research(this: void, technology: TechnologyID): void;
10170
10199
  /**
10171
10200
  * @param ammo Ammo category
10172
10201
  */
@@ -10228,10 +10257,10 @@ interface LuaForce {
10228
10257
  */
10229
10258
  set_turret_attack_modifier(this: void, turret: EntityID, modifier: double): void;
10230
10259
  /**
10231
- * @param position The chunk position to unchart.
10260
+ * @param chunk_position The chunk position to unchart.
10232
10261
  * @param surface Surface to unchart on.
10233
10262
  */
10234
- unchart_chunk(this: void, position: ChunkPosition, surface: SurfaceIdentification): void;
10263
+ unchart_chunk(this: void, chunk_position: ChunkPosition, surface: SurfaceIdentification): void;
10235
10264
  /**
10236
10265
  * Unlocks the quality to be accessible to this force.
10237
10266
  * @param quality Name of the quality.
@@ -12951,10 +12980,26 @@ interface LuaItemCommon {
12951
12980
  * Durability of the contained item. Automatically capped at the item's maximum durability.
12952
12981
  */
12953
12982
  durability: double;
12983
+ /**
12984
+ * If this is an item with entity data, get the stored auto target with gunner state.
12985
+ */
12986
+ entity_auto_target_with_gunner: boolean;
12987
+ /**
12988
+ * If this is an item with entity data, get the stored auto target without gunner state.
12989
+ */
12990
+ entity_auto_target_without_gunner: boolean;
12954
12991
  /**
12955
12992
  * If this is an item with entity data, get the stored entity color.
12956
12993
  */
12957
12994
  entity_color?: Color;
12995
+ /**
12996
+ * If this is an item with entity data, get the stored driver is gunner state.
12997
+ */
12998
+ entity_driver_is_gunner: boolean;
12999
+ /**
13000
+ * If this is an item with entity data, get the stored enable logistics while moving state.
13001
+ */
13002
+ entity_enable_logistics_while_moving: boolean;
12958
13003
  /**
12959
13004
  * The number of entity filters this deconstruction item supports.
12960
13005
  */
@@ -12975,6 +13020,10 @@ interface LuaItemCommon {
12975
13020
  * If this is an item with entity data, get the stored logistic filters.
12976
13021
  */
12977
13022
  entity_logistic_sections: LogisticSections;
13023
+ /**
13024
+ * If this is an item with entity data, get the stored vehicle logistics enabled state.
13025
+ */
13026
+ entity_logistics_enabled: boolean;
12978
13027
  /**
12979
13028
  * If this is an item with entity data, get the stored request from buffer state.
12980
13029
  */
@@ -16160,7 +16209,7 @@ interface LuaRecord {
16160
16209
  */
16161
16210
  get_blueprint_entity_count(this: void): uint32;
16162
16211
  /**
16163
- * Gets the given tag on the given blueprint entity index in this blueprint blueprint.
16212
+ * Gets the given tag on the given blueprint entity index in this blueprint.
16164
16213
  * @param index The entity index.
16165
16214
  * @param tag The tag to get.
16166
16215
  */
@@ -16204,7 +16253,7 @@ interface LuaRecord {
16204
16253
  */
16205
16254
  set_blueprint_entities(this: void, entities: BlueprintEntity[]): void;
16206
16255
  /**
16207
- * Sets the given tag on the given blueprint entity index in this blueprint blueprint.
16256
+ * Sets the given tag on the given blueprint entity index in this blueprint.
16208
16257
  * @param index The entity index.
16209
16258
  * @param tag The tag to set.
16210
16259
  * @param value The tag value to set or `nil` to clear the tag.
@@ -16245,7 +16294,7 @@ interface LuaRecord {
16245
16294
  */
16246
16295
  blueprint_absolute_snapping: boolean;
16247
16296
  /**
16248
- * The description for this blueprint or blueprint book
16297
+ * The description for this blueprint or blueprint book.
16249
16298
  */
16250
16299
  blueprint_description: string;
16251
16300
  /**
@@ -16903,6 +16952,7 @@ interface LuaRendering {
16903
16952
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16904
16953
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
16905
16954
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16955
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
16906
16956
  * @example ```
16907
16957
  -- This will draw an iron plate icon at the character's feet. The sprite will move together with the character.
16908
16958
  rendering.draw_sprite{sprite = "item.iron-plate", target = game.player.character, surface = game.player.surface}
@@ -16910,7 +16960,6 @@ interface LuaRendering {
16910
16960
  * @example ```
16911
16961
  -- This will draw an iron plate icon at the character's head. The sprite will move together with the character.
16912
16962
  rendering.draw_sprite{sprite = "item.iron-plate", target = {entity = game.player.character, offset = {0, -2}}, surface = game.player.surface}
16913
- $field(render_mode, ScriptRenderMode, $optional) Mode which this object should render in. Defaults to "game".
16914
16963
  ```
16915
16964
  */
16916
16965
  draw_sprite(this: void, table: {
@@ -16931,6 +16980,7 @@ interface LuaRendering {
16931
16980
  players?: PlayerIdentification[];
16932
16981
  visible?: boolean;
16933
16982
  only_in_alt_mode?: boolean;
16983
+ render_mode?: ScriptRenderMode;
16934
16984
  }): LuaRenderObject;
16935
16985
  /**
16936
16986
  * Create a text.
@@ -18227,9 +18277,9 @@ interface LuaSurface {
18227
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`.
18228
18278
  *
18229
18279
  * Territories that do not contain at least one generated chunk as a result of calling this method will be automatically deleted.
18230
- * @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.
18231
18281
  */
18232
- clear_territory_for_chunks(this: void, positions: ChunkPosition[]): void;
18282
+ clear_territory_for_chunks(this: void, chunk_positions: ChunkPosition[]): void;
18233
18283
  /**
18234
18284
  * Clones the given area.
18235
18285
  *
@@ -18458,9 +18508,9 @@ interface LuaSurface {
18458
18508
  */
18459
18509
  decorative_prototype_collides(this: void, prototype: DecorativeID, position: MapPosition): boolean;
18460
18510
  /**
18461
- * @param position The chunk position to delete
18511
+ * @param chunk_position The chunk position to delete
18462
18512
  */
18463
- delete_chunk(this: void, position: ChunkPosition): void;
18513
+ delete_chunk(this: void, chunk_position: ChunkPosition): void;
18464
18514
  /**
18465
18515
  * Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched.
18466
18516
  * @param table.exclude_soft Soft decoratives can be drawn over rails.
@@ -18679,6 +18729,8 @@ interface LuaSurface {
18679
18729
  force_generate_chunk_requests(this: void): void;
18680
18730
  /**
18681
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.
18682
18734
  */
18683
18735
  get_chunks(this: void): LuaChunkIterator;
18684
18736
  /**
@@ -18708,10 +18760,10 @@ interface LuaSurface {
18708
18760
  get_double_hidden_tile(this: void, position: TilePosition): string;
18709
18761
  /**
18710
18762
  * Returns all the military targets (entities with force) on this chunk for the given force.
18711
- * @param position The chunk's position.
18763
+ * @param chunk_position The chunk's position.
18712
18764
  * @param force Entities of this force will be returned.
18713
18765
  */
18714
- get_entities_with_force(this: void, position: ChunkPosition, force: ForceID): LuaEntity[];
18766
+ get_entities_with_force(this: void, chunk_position: ChunkPosition, force: ForceID): LuaEntity[];
18715
18767
  /**
18716
18768
  * The hidden tile name.
18717
18769
  * @param position The tile position.
@@ -18778,9 +18830,9 @@ interface LuaSurface {
18778
18830
  get_territories(this: void): LuaTerritory[];
18779
18831
  /**
18780
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`.
18781
- * @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.
18782
18834
  */
18783
- get_territory_for_chunk(this: void, position: ChunkPosition): LuaTerritory | null;
18835
+ get_territory_for_chunk(this: void, chunk_position: ChunkPosition): LuaTerritory | null;
18784
18836
  /**
18785
18837
  * Get the tile at a given position. An alternative call signature for this method is passing it a single {@link TilePosition | runtime:TilePosition}.
18786
18838
  *
@@ -18793,9 +18845,9 @@ interface LuaSurface {
18793
18845
  get_total_pollution(this: void): double;
18794
18846
  /**
18795
18847
  * Is a given chunk generated?
18796
- * @param position The chunk's position.
18848
+ * @param chunk_position The chunk's position.
18797
18849
  */
18798
- is_chunk_generated(this: void, position: ChunkPosition): boolean;
18850
+ is_chunk_generated(this: void, chunk_position: ChunkPosition): boolean;
18799
18851
  /**
18800
18852
  * Play a sound for every player on this surface.
18801
18853
  *
@@ -18882,10 +18934,10 @@ interface LuaSurface {
18882
18934
  request_to_generate_chunks(this: void, position: MapPosition, radius?: uint32): void;
18883
18935
  /**
18884
18936
  * Set generated status of a chunk. Useful when copying chunks.
18885
- * @param position The chunk's position.
18937
+ * @param chunk_position The chunk's position.
18886
18938
  * @param status The chunk's new status.
18887
18939
  */
18888
- 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;
18889
18941
  /**
18890
18942
  * Sets the cover tile for the given force and tile on this surface.
18891
18943
  */
@@ -18939,10 +18991,10 @@ interface LuaSurface {
18939
18991
  * It's recommended that territory chunks are connected to each other, but this is not required.
18940
18992
  *
18941
18993
  * Territories that do not contain at least one generated chunk as a result of calling this method will be automatically deleted.
18942
- * @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.
18943
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.
18944
18996
  */
18945
- set_territory_for_chunks(this: void, positions: ChunkPosition[], territory?: LuaTerritory): void;
18997
+ set_territory_for_chunks(this: void, chunk_positions: ChunkPosition[], territory?: LuaTerritory): void;
18946
18998
  /**
18947
18999
  * Set tiles at specified locations. Can automatically correct the edges around modified tiles.
18948
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.67
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[];
@@ -7862,9 +7862,9 @@ interface ResearchIngredient {
7862
7862
  amount: uint16;
7863
7863
  }
7864
7864
  interface BaseResearchTrigger {
7865
- type: 'craft-item' | 'mine-entity' | 'craft-fluid' | 'send-item-to-orbit' | 'capture-spawner' | 'build-entity' | 'create-space-platform';
7865
+ type: 'craft-item' | 'mine-entity' | 'craft-fluid' | 'send-item-to-orbit' | 'capture-spawner' | 'build-entity' | 'create-space-platform' | 'scripted';
7866
7866
  }
7867
- type ResearchTrigger = BaseResearchTrigger | ResearchTriggerBuildEntity | ResearchTriggerCaptureSpawner | ResearchTriggerCraftFluid | ResearchTriggerCraftItem | ResearchTriggerMineEntity | ResearchTriggerSendItemToOrbit;
7867
+ type ResearchTrigger = BaseResearchTrigger | ResearchTriggerBuildEntity | ResearchTriggerCaptureSpawner | ResearchTriggerCraftFluid | ResearchTriggerCraftItem | ResearchTriggerMineEntity | ResearchTriggerScripted | ResearchTriggerSendItemToOrbit;
7868
7868
  /**
7869
7869
  *
7870
7870
  * Applies to variant case `build-entity`
@@ -7907,6 +7907,14 @@ interface ResearchTriggerMineEntity extends BaseResearchTrigger {
7907
7907
  'type': 'mine-entity';
7908
7908
  'entity': string;
7909
7909
  }
7910
+ /**
7911
+ *
7912
+ * Applies to variant case `scripted`
7913
+ */
7914
+ interface ResearchTriggerScripted extends BaseResearchTrigger {
7915
+ 'type': 'scripted';
7916
+ 'trigger_description': LocalisedString;
7917
+ }
7910
7918
  /**
7911
7919
  *
7912
7920
  * Applies to variant case `send-item-to-orbit`
@@ -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.67
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.67
5
+ // Factorio version 2.0.70
6
6
  // API version 6
7
7
 
8
8
  declare namespace defines {
@@ -787,126 +787,127 @@ enum events {
787
787
  on_player_display_scale_changed = 94,
788
788
  on_player_driving_changed_state = 95,
789
789
  on_player_dropped_item = 96,
790
- on_player_fast_transferred = 97,
791
- on_player_flipped_entity = 98,
792
- on_player_flushed_fluid = 99,
793
- on_player_gun_inventory_changed = 100,
794
- on_player_input_method_changed = 101,
795
- on_player_joined_game = 102,
796
- on_player_kicked = 103,
797
- on_player_left_game = 104,
798
- on_player_locale_changed = 105,
799
- on_player_main_inventory_changed = 106,
800
- on_player_mined_entity = 107,
801
- on_player_mined_item = 108,
802
- on_player_mined_tile = 109,
803
- on_player_muted = 110,
804
- on_player_pipette = 111,
805
- on_player_placed_equipment = 112,
806
- on_player_promoted = 113,
807
- on_player_removed = 114,
808
- on_player_removed_equipment = 115,
809
- on_player_repaired_entity = 116,
810
- on_player_respawned = 117,
811
- on_player_reverse_selected_area = 118,
812
- on_player_rotated_entity = 119,
813
- on_player_selected_area = 120,
814
- on_player_set_quick_bar_slot = 121,
815
- on_player_setup_blueprint = 122,
816
- on_player_toggled_alt_mode = 123,
817
- on_player_toggled_map_editor = 124,
818
- on_player_trash_inventory_changed = 125,
819
- on_player_unbanned = 126,
820
- on_player_unmuted = 127,
821
- on_player_used_capsule = 128,
822
- on_player_used_spidertron_remote = 129,
823
- on_post_entity_died = 130,
824
- on_post_segmented_unit_died = 131,
825
- on_pre_build = 132,
826
- on_pre_chunk_deleted = 133,
827
- on_pre_entity_settings_pasted = 134,
828
- on_pre_ghost_deconstructed = 135,
829
- on_pre_ghost_upgraded = 136,
830
- on_pre_permission_group_deleted = 137,
831
- on_pre_permission_string_imported = 138,
832
- on_pre_player_crafted_item = 139,
833
- on_pre_player_died = 140,
834
- on_pre_player_left_game = 141,
835
- on_pre_player_mined_item = 142,
836
- on_pre_player_removed = 143,
837
- on_pre_player_toggled_map_editor = 144,
838
- on_pre_robot_exploded_cliff = 145,
839
- on_pre_scenario_finished = 146,
840
- on_pre_script_inventory_resized = 147,
841
- on_pre_surface_cleared = 148,
842
- on_pre_surface_deleted = 149,
843
- on_redo_applied = 150,
844
- on_research_cancelled = 151,
845
- on_research_finished = 152,
846
- on_research_moved = 153,
847
- on_research_queued = 154,
848
- on_research_reversed = 155,
849
- on_research_started = 156,
850
- on_resource_depleted = 157,
851
- on_robot_built_entity = 158,
852
- on_robot_built_tile = 159,
853
- on_robot_exploded_cliff = 160,
854
- on_robot_mined = 161,
855
- on_robot_mined_entity = 162,
856
- on_robot_mined_tile = 163,
857
- on_robot_pre_mined = 164,
858
- on_rocket_launch_ordered = 165,
859
- on_rocket_launched = 166,
860
- on_runtime_mod_setting_changed = 167,
861
- on_script_inventory_resized = 168,
862
- on_script_path_request_finished = 169,
863
- on_script_trigger_effect = 170,
864
- on_sector_scanned = 171,
865
- on_segment_entity_created = 172,
866
- on_segmented_unit_created = 173,
867
- on_segmented_unit_damaged = 174,
868
- on_segmented_unit_died = 175,
869
- on_selected_entity_changed = 176,
870
- on_singleplayer_init = 177,
871
- on_space_platform_built_entity = 178,
872
- on_space_platform_built_tile = 179,
873
- on_space_platform_changed_state = 180,
874
- on_space_platform_mined_entity = 181,
875
- on_space_platform_mined_item = 182,
876
- on_space_platform_mined_tile = 183,
877
- on_space_platform_pre_mined = 184,
878
- on_spider_command_completed = 185,
879
- on_string_translated = 186,
880
- on_surface_cleared = 187,
881
- on_surface_created = 188,
882
- on_surface_deleted = 189,
883
- on_surface_imported = 190,
884
- on_surface_renamed = 191,
885
- on_technology_effects_reset = 192,
886
- on_territory_created = 193,
887
- on_territory_destroyed = 194,
888
- on_tick = 195,
889
- on_tower_mined_plant = 196,
890
- on_tower_planted_seed = 197,
891
- on_tower_pre_mined_plant = 198,
892
- on_train_changed_state = 199,
893
- on_train_created = 200,
894
- on_train_schedule_changed = 201,
895
- on_trigger_created_entity = 202,
896
- on_trigger_fired_artillery = 203,
897
- on_udp_packet_received = 204,
898
- on_undo_applied = 205,
899
- on_unit_added_to_group = 206,
900
- on_unit_group_created = 207,
901
- on_unit_group_finished_gathering = 208,
902
- on_unit_removed_from_group = 209,
903
- on_worker_robot_expired = 210,
904
- script_raised_built = 211,
905
- script_raised_destroy = 212,
906
- script_raised_destroy_segmented_unit = 213,
907
- script_raised_revive = 214,
908
- script_raised_set_tiles = 215,
909
- script_raised_teleported = 216
790
+ on_player_dropped_item_into_entity = 97,
791
+ on_player_fast_transferred = 98,
792
+ on_player_flipped_entity = 99,
793
+ on_player_flushed_fluid = 100,
794
+ on_player_gun_inventory_changed = 101,
795
+ on_player_input_method_changed = 102,
796
+ on_player_joined_game = 103,
797
+ on_player_kicked = 104,
798
+ on_player_left_game = 105,
799
+ on_player_locale_changed = 106,
800
+ on_player_main_inventory_changed = 107,
801
+ on_player_mined_entity = 108,
802
+ on_player_mined_item = 109,
803
+ on_player_mined_tile = 110,
804
+ on_player_muted = 111,
805
+ on_player_pipette = 112,
806
+ on_player_placed_equipment = 113,
807
+ on_player_promoted = 114,
808
+ on_player_removed = 115,
809
+ on_player_removed_equipment = 116,
810
+ on_player_repaired_entity = 117,
811
+ on_player_respawned = 118,
812
+ on_player_reverse_selected_area = 119,
813
+ on_player_rotated_entity = 120,
814
+ on_player_selected_area = 121,
815
+ on_player_set_quick_bar_slot = 122,
816
+ on_player_setup_blueprint = 123,
817
+ on_player_toggled_alt_mode = 124,
818
+ on_player_toggled_map_editor = 125,
819
+ on_player_trash_inventory_changed = 126,
820
+ on_player_unbanned = 127,
821
+ on_player_unmuted = 128,
822
+ on_player_used_capsule = 129,
823
+ on_player_used_spidertron_remote = 130,
824
+ on_post_entity_died = 131,
825
+ on_post_segmented_unit_died = 132,
826
+ on_pre_build = 133,
827
+ on_pre_chunk_deleted = 134,
828
+ on_pre_entity_settings_pasted = 135,
829
+ on_pre_ghost_deconstructed = 136,
830
+ on_pre_ghost_upgraded = 137,
831
+ on_pre_permission_group_deleted = 138,
832
+ on_pre_permission_string_imported = 139,
833
+ on_pre_player_crafted_item = 140,
834
+ on_pre_player_died = 141,
835
+ on_pre_player_left_game = 142,
836
+ on_pre_player_mined_item = 143,
837
+ on_pre_player_removed = 144,
838
+ on_pre_player_toggled_map_editor = 145,
839
+ on_pre_robot_exploded_cliff = 146,
840
+ on_pre_scenario_finished = 147,
841
+ on_pre_script_inventory_resized = 148,
842
+ on_pre_surface_cleared = 149,
843
+ on_pre_surface_deleted = 150,
844
+ on_redo_applied = 151,
845
+ on_research_cancelled = 152,
846
+ on_research_finished = 153,
847
+ on_research_moved = 154,
848
+ on_research_queued = 155,
849
+ on_research_reversed = 156,
850
+ on_research_started = 157,
851
+ on_resource_depleted = 158,
852
+ on_robot_built_entity = 159,
853
+ on_robot_built_tile = 160,
854
+ on_robot_exploded_cliff = 161,
855
+ on_robot_mined = 162,
856
+ on_robot_mined_entity = 163,
857
+ on_robot_mined_tile = 164,
858
+ on_robot_pre_mined = 165,
859
+ on_rocket_launch_ordered = 166,
860
+ on_rocket_launched = 167,
861
+ on_runtime_mod_setting_changed = 168,
862
+ on_script_inventory_resized = 169,
863
+ on_script_path_request_finished = 170,
864
+ on_script_trigger_effect = 171,
865
+ on_sector_scanned = 172,
866
+ on_segment_entity_created = 173,
867
+ on_segmented_unit_created = 174,
868
+ on_segmented_unit_damaged = 175,
869
+ on_segmented_unit_died = 176,
870
+ on_selected_entity_changed = 177,
871
+ on_singleplayer_init = 178,
872
+ on_space_platform_built_entity = 179,
873
+ on_space_platform_built_tile = 180,
874
+ on_space_platform_changed_state = 181,
875
+ on_space_platform_mined_entity = 182,
876
+ on_space_platform_mined_item = 183,
877
+ on_space_platform_mined_tile = 184,
878
+ on_space_platform_pre_mined = 185,
879
+ on_spider_command_completed = 186,
880
+ on_string_translated = 187,
881
+ on_surface_cleared = 188,
882
+ on_surface_created = 189,
883
+ on_surface_deleted = 190,
884
+ on_surface_imported = 191,
885
+ on_surface_renamed = 192,
886
+ on_technology_effects_reset = 193,
887
+ on_territory_created = 194,
888
+ on_territory_destroyed = 195,
889
+ on_tick = 196,
890
+ on_tower_mined_plant = 197,
891
+ on_tower_planted_seed = 198,
892
+ on_tower_pre_mined_plant = 199,
893
+ on_train_changed_state = 200,
894
+ on_train_created = 201,
895
+ on_train_schedule_changed = 202,
896
+ on_trigger_created_entity = 203,
897
+ on_trigger_fired_artillery = 204,
898
+ on_udp_packet_received = 205,
899
+ on_undo_applied = 206,
900
+ on_unit_added_to_group = 207,
901
+ on_unit_group_created = 208,
902
+ on_unit_group_finished_gathering = 209,
903
+ on_unit_removed_from_group = 210,
904
+ on_worker_robot_expired = 211,
905
+ script_raised_built = 212,
906
+ script_raised_destroy = 213,
907
+ script_raised_destroy_segmented_unit = 214,
908
+ script_raised_revive = 215,
909
+ script_raised_set_tiles = 216,
910
+ script_raised_teleported = 217
910
911
  }
911
912
  enum flow_precision_index {
912
913
  fifty_hours = 5,
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.67
5
+ // Factorio version 2.0.70
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -2269,6 +2269,24 @@ interface on_player_dropped_item {
2269
2269
  */
2270
2270
  tick: uint32;
2271
2271
  }
2272
+ /**
2273
+ * Called when a player drops a single item into an entity.
2274
+ */
2275
+ interface on_player_dropped_item_into_entity {
2276
+ /**
2277
+ * The entity the item was dropped into.
2278
+ */
2279
+ entity: LuaEntity;
2280
+ /**
2281
+ * Identifier of the event
2282
+ */
2283
+ name: defines.events;
2284
+ player_index: uint32;
2285
+ /**
2286
+ * Tick the event was generated.
2287
+ */
2288
+ tick: uint32;
2289
+ }
2272
2290
  /**
2273
2291
  * Called when a player fast-transfers something to or from an entity.
2274
2292
  */
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.67
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.67
5
+ // Factorio version 2.0.70
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -691,12 +691,17 @@ interface ArtilleryFlarePrototype extends EntityPrototype {
691
691
  render_layer_when_on_ground?: RenderLayer;
692
692
  /**
693
693
  * The entity with the higher number is selectable before the entity with the lower number.
694
+ *
695
+ * The value `0` will be treated the same as `nil`.
694
696
  */
695
697
  selection_priority?: uint8;
696
698
  /**
697
699
  * Shadow variation variation count and individual frame count must be equal to picture variation count.
698
700
  */
699
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
+ */
700
705
  shot_category?: AmmoCategoryID;
701
706
  /**
702
707
  * How many artillery shots should be fired at the position of this flare.
@@ -859,7 +864,7 @@ interface AssemblingMachinePrototype extends CraftingMachinePrototype {
859
864
  default_recipe_finished_signal?: SignalIDConnector;
860
865
  default_working_signal?: SignalIDConnector;
861
866
  /**
862
- * Defaults to true if fixed_recipe is not given.
867
+ * Defaults to true if `fixed_recipe` is not given.
863
868
  */
864
869
  disabled_when_recipe_not_researched?: boolean;
865
870
  draw_circuit_wires?: boolean;
@@ -1401,6 +1406,9 @@ interface CargoLandingPadPrototype extends EntityWithOwnerPrototype {
1401
1406
  draw_copper_wires?: boolean;
1402
1407
  graphics_set?: CargoBayConnectableGraphicsSet;
1403
1408
  inventory_size: ItemStackIndex;
1409
+ /**
1410
+ * In chunks. The radius of how many chunks this cargo landing pad charts around itself.
1411
+ */
1404
1412
  radar_range?: uint32;
1405
1413
  radar_visualisation_color?: Color;
1406
1414
  /**
@@ -1930,6 +1938,7 @@ interface CorpsePrototype extends EntityPrototype {
1930
1938
  ground_patch_fade_out_start?: float;
1931
1939
  ground_patch_higher?: AnimationVariations;
1932
1940
  ground_patch_render_layer?: RenderLayer;
1941
+ protected_from_tile_building?: boolean;
1933
1942
  remove_on_entity_placement?: boolean;
1934
1943
  remove_on_tile_placement?: boolean;
1935
1944
  /**
@@ -2682,7 +2691,7 @@ interface DeliverImpactCombination {
2682
2691
  * Name of the deliver impact combination.
2683
2692
  */
2684
2693
  name: string;
2685
- trigger_effect_item: TriggerEffectItem;
2694
+ trigger_effect_item: TriggerEffect;
2686
2695
  type: 'deliver-impact-combination';
2687
2696
  }
2688
2697
  /**
@@ -2706,7 +2715,7 @@ interface DestroyCliffAchievementPrototype extends AchievementPrototype {
2706
2715
  limited_to_one_game?: boolean;
2707
2716
  }
2708
2717
  /**
2709
- * 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.
2710
2719
  */
2711
2720
  interface DisplayPanelPrototype extends EntityWithOwnerPrototype {
2712
2721
  /**
@@ -2726,7 +2735,7 @@ interface DisplayPanelPrototype extends EntityWithOwnerPrototype {
2726
2735
  draw_circuit_wires?: boolean;
2727
2736
  draw_copper_wires?: boolean;
2728
2737
  /**
2729
- * 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.
2730
2739
  */
2731
2740
  max_text_width?: uint32;
2732
2741
  /**
@@ -3331,6 +3340,8 @@ interface EntityPrototype extends Prototype {
3331
3340
  selection_box?: BoundingBox;
3332
3341
  /**
3333
3342
  * The entity with the higher number is selectable before the entity with the lower number.
3343
+ *
3344
+ * The value `0` will be treated the same as `nil`.
3334
3345
  */
3335
3346
  selection_priority?: uint8;
3336
3347
  /**
@@ -3983,6 +3994,10 @@ interface FluidTurretPrototype extends TurretPrototype {
3983
3994
  */
3984
3995
  interface FluidWagonPrototype extends RollingStockPrototype {
3985
3996
  capacity: FluidAmount;
3997
+ /**
3998
+ * Pumps are only allowed to connect to this fluid wagon if the pump's {@link fluid box connection | prototype:PipeConnectionDefinition} and this fluid wagon share a connection category. Pump may have different connection categories on the input and output side, connection categories will be taken from the connection that is facing towards fluid wagon.
3999
+ */
4000
+ connection_category?: string | string[];
3986
4001
  quality_affects_capacity?: boolean;
3987
4002
  /**
3988
4003
  * Must be 1, 2 or 3.
@@ -5736,7 +5751,11 @@ interface MiningDrillPrototype extends EntityWithOwnerPrototype {
5736
5751
  */
5737
5752
  resource_drain_rate_percent?: uint8;
5738
5753
  /**
5739
- * The distance from the centre of the mining drill to search for resources in.
5754
+ * Offset of the `resource_searching_radius` from the entity center when the mining drill is facing north.
5755
+ */
5756
+ resource_searching_offset?: Vector;
5757
+ /**
5758
+ * The distance from the center of the mining drill to search for resources in.
5740
5759
  *
5741
5760
  * This is 2.49 for electric mining drills (a 5x5 area) and 0.99 for burner mining drills (a 2x2 area). The drill searches resource outside its natural boundary box, which is 0.01 (the middle of the entity); making it 2.5 and 1.0 gives it another block radius.
5742
5761
  */
@@ -6760,7 +6779,7 @@ interface RailRampPrototype extends RailPrototype {
6760
6779
  */
6761
6780
  collision_box?: BoundingBox;
6762
6781
  /**
6763
- * Defaults to the mask from {@link UtilityConstants::default_collision_masks | prototype:UtilityConstants::default_collision_masks} when indexed by `"allow_on_deep_oil_ocean"`.
6782
+ * Defaults to the mask from {@link UtilityConstants::default_collision_masks | prototype:UtilityConstants::default_collision_masks} when indexed by `"rail-ramp/allow_on_deep_oil_ocean"`.
6764
6783
  */
6765
6784
  collision_mask_allow_on_deep_oil_ocean?: CollisionMaskConnector;
6766
6785
  /**
@@ -6831,7 +6850,7 @@ interface RailSupportPrototype extends EntityWithOwnerPrototype {
6831
6850
  */
6832
6851
  build_grid_size?: 2;
6833
6852
  /**
6834
- * Defaults to the mask from {@link UtilityConstants::default_collision_masks | prototype:UtilityConstants::default_collision_masks} when indexed by `"allow_on_deep_oil_ocean"`.
6853
+ * Defaults to the mask from {@link UtilityConstants::default_collision_masks | prototype:UtilityConstants::default_collision_masks} when indexed by `"rail-support/allow_on_deep_oil_ocean"`.
6835
6854
  */
6836
6855
  collision_mask_allow_on_deep_oil_ocean?: CollisionMaskConnector;
6837
6856
  /**
@@ -7553,7 +7572,7 @@ interface RoboportPrototype extends EntityWithOwnerPrototype {
7553
7572
  max_logistic_slots?: LogisticFilterIndex;
7554
7573
  open_door_trigger_effect?: TriggerEffect;
7555
7574
  /**
7556
- * Defaults to the max of logistic range or construction range rounded up to chunks.
7575
+ * In chunks. The radius of how many chunks this roboport charts around itself. Defaults to the max of logistic range or construction range rounded up to chunks.
7557
7576
  */
7558
7577
  radar_range?: uint32;
7559
7578
  radar_visualisation_color?: Color;
@@ -8702,6 +8721,9 @@ interface SpiderUnitPrototype extends EntityWithOwnerPrototype {
8702
8721
  height: float;
8703
8722
  max_pursue_distance?: double;
8704
8723
  min_pursue_time?: uint32;
8724
+ /**
8725
+ * In chunks. The radius of how many chunks this spider unit charts around itself.
8726
+ */
8705
8727
  radar_range?: uint32;
8706
8728
  spawning_time_modifier?: double;
8707
8729
  spider_engine: SpiderEngineSpecification;
@@ -9192,6 +9214,10 @@ interface SurfacePrototype extends Prototype {
9192
9214
  * Only loaded if `icons` is not defined.
9193
9215
  */
9194
9216
  icon_size?: SpriteSizeType;
9217
+ /**
9218
+ * Can't be an empty array.
9219
+ */
9220
+ icons?: IconData[];
9195
9221
  surface_properties?: LuaTable<SurfacePropertyID, double>;
9196
9222
  }
9197
9223
  /**
@@ -10019,6 +10045,9 @@ interface UnitPrototype extends EntityWithOwnerPrototype {
10019
10045
  * Movement speed of the unit in the world, in tiles per tick. Must be equal to or greater than 0.
10020
10046
  */
10021
10047
  movement_speed: float;
10048
+ /**
10049
+ * In chunks. The radius of how many chunks this unit charts around itself.
10050
+ */
10022
10051
  radar_range?: uint32;
10023
10052
  render_layer?: RenderLayer;
10024
10053
  rotation_speed?: float;
@@ -10323,6 +10352,10 @@ interface UtilityConstants extends PrototypeBase {
10323
10352
  max_fluid_flow: FluidAmount;
10324
10353
  max_logistic_filter_count: LogisticFilterIndex;
10325
10354
  max_terrain_building_size: uint8;
10355
+ /**
10356
+ * Cap for how many steps of quality the output of something (miner/crafter) may be higher than the input (resource/ingredients). Must be >= 1.
10357
+ */
10358
+ maximum_quality_jump: uint8;
10326
10359
  maximum_recipe_overload_multiplier: uint32;
10327
10360
  medium_area_size: float;
10328
10361
  medium_blueprint_area_size: float;
@@ -10347,6 +10380,7 @@ interface UtilityConstants extends PrototypeBase {
10347
10380
  */
10348
10381
  player_colors: PlayerColorData[];
10349
10382
  probability_product_count_tint: Color;
10383
+ quality_selector_dropdown_threshold: uint8;
10350
10384
  rail_planner_count_button_color: Color;
10351
10385
  rail_segment_colors: Color[];
10352
10386
  recipe_step_limit: uint32;
@@ -11142,6 +11176,9 @@ interface VehiclePrototype extends EntityWithOwnerPrototype {
11142
11176
  * Must be positive. There is no functional difference between the two ways to set braking power/force.
11143
11177
  */
11144
11178
  braking_power: Energy | double;
11179
+ /**
11180
+ * In chunks. The radius of the radar range of the vehicle, so how many chunks it charts around itself.
11181
+ */
11145
11182
  chunk_exploration_radius?: uint32;
11146
11183
  crash_trigger?: TriggerEffect;
11147
11184
  /**
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.67
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
  */
@@ -6899,6 +6907,9 @@ interface NoiseFunction {
6899
6907
  */
6900
6908
  parameters: string[];
6901
6909
  }
6910
+ /**
6911
+ * Modifier that does nothing. Can be used to show custom scripted effects in the technology GUI.
6912
+ */
6902
6913
  interface NothingModifier extends BaseModifier {
6903
6914
  effect_description?: LocalisedString;
6904
6915
  type: 'nothing';
@@ -7189,9 +7200,9 @@ type PersistentWorldAmbientSoundsDefinitionCrossfade = Fade & {
7189
7200
  };
7190
7201
  interface PipeConnectionDefinition {
7191
7202
  /**
7192
- * Connection category bitmask makes it possible to define different categories of pipe connections that are not able to connect with each other. For example if a mod should have a "steam pipes" and "cryogenic pipes" category and they should not connect with each other.
7203
+ * Fluidboxes' pipe connections are only allowed to connect with each other if they share a connection category. For example a mod could have a "steam pipes" and "cryogenic pipes" category that should not connect with each other.
7193
7204
  *
7194
- * In case of a normal connection, a bitmask may contain multiple bits set. This allows to create a mod where pipes of different categories would not connect to each other while still making it possible for crafting machines and other entities to connect to any of the specified pipes.
7205
+ * In case of a normal connection, a pipe connection can be in multiple connection categories. This allows to create a mod where pipes of different categories would not connect to each other while still making it possible for crafting machines and other entities to connect to any of the specified pipes.
7195
7206
  *
7196
7207
  * By default, all pipe connections have the `"default"` category. So a pipe that should connect to a new category and standard pipes can have the `connection_category = {"my-new-pipe", "default"}`.
7197
7208
  *
@@ -8710,6 +8721,29 @@ interface ScriptTriggerEffectItem extends TriggerEffectItem {
8710
8721
  effect_id: string;
8711
8722
  type: 'script';
8712
8723
  }
8724
+ /**
8725
+ * Triggered only by calling {@link LuaForce::script_trigger_research | runtime:LuaForce::script_trigger_research}. Can be used to show custom scripted triggers in the technology GUI.
8726
+ */
8727
+ interface ScriptedTechnologyTrigger {
8728
+ /**
8729
+ * Path to the icon file.
8730
+ *
8731
+ * Only loaded if `icons` is not defined.
8732
+ */
8733
+ icon?: FileName;
8734
+ /**
8735
+ * The size of the square icon, in pixels. E.g. `32` for a 32px by 32px icon. Must be larger than `0`.
8736
+ *
8737
+ * Only loaded if `icons` is not defined.
8738
+ */
8739
+ icon_size?: SpriteSizeType;
8740
+ /**
8741
+ * Can't be an empty array.
8742
+ */
8743
+ icons?: IconData[];
8744
+ trigger_description?: LocalisedString;
8745
+ type: 'scripted';
8746
+ }
8713
8747
  interface ScrollBarStyleSpecification extends BaseStyleSpecification {
8714
8748
  background_graphical_set?: ElementImageSet;
8715
8749
  thumb_button_style?: ButtonStyleSpecification;
@@ -10586,7 +10620,10 @@ CaptureSpawnerTechnologyTrigger | /**
10586
10620
  BuildEntityTechnologyTrigger | /**
10587
10621
  * Loaded when the `type` is `"create-space-platform"`.
10588
10622
  */
10589
- CreateSpacePlatformTechnologyTrigger;
10623
+ CreateSpacePlatformTechnologyTrigger | /**
10624
+ * Loaded when the `type` is `"scripted"`.
10625
+ */
10626
+ ScriptedTechnologyTrigger;
10590
10627
  /**
10591
10628
  * Either `count` or `count_formula` must be defined, never both.
10592
10629
  * @example ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.50",
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.67",
26
+ "factorioVersion": "2.0.70",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },