factorio-types 1.2.34 → 1.2.35

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.49
5
+ // Factorio version 2.0.50
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -5996,6 +5996,10 @@ interface LuaEntity extends LuaControl {
5996
5996
  * Gets the filter for this infinity pipe, or `nil` if the filter is empty.
5997
5997
  */
5998
5998
  get_infinity_pipe_filter(this: void): InfinityPipeFilter | null;
5999
+ /**
6000
+ * Gets the inventory size override of the selected inventory if size override was set using {@link set_inventory_size_override | runtime:LuaEntity::set_inventory_size_override}.
6001
+ */
6002
+ get_inventory_size_override(this: void, inventory_index: defines.inventory): uint16 | null;
5999
6003
  /**
6000
6004
  * Get an item insert specification onto a belt connectable: for a given map position provides into which line at what position item should be inserted to be closest to the provided position.
6001
6005
  * @param position Position where the item is to be inserted.
@@ -6408,6 +6412,11 @@ interface LuaEntity extends LuaControl {
6408
6412
  * @param filter The new filter, or `nil` to clear the filter.
6409
6413
  */
6410
6414
  set_infinity_pipe_filter(this: void, filter: InfinityPipeFilter | nil): void;
6415
+ /**
6416
+ * Sets inventory size override. When set, supported entity will ignore inventory size from prototype and will instead keep inventory size equal to the override. Setting `nil` will restore default inventory size.
6417
+ * @param overflow Items that would be deleted due to change of inventory size will be transferred to this inventory. Must be a script inventory or inventory of other entity. Inventory references obtained from proxy container are not allowed.
6418
+ */
6419
+ set_inventory_size_override(this: void, inventory_index: defines.inventory, size_override: uint16 | nil, overflow?: LuaInventory): void;
6411
6420
  /**
6412
6421
  * Sets the passenger of this car or spidertron.
6413
6422
  *
@@ -6698,6 +6707,10 @@ interface LuaEntity extends LuaControl {
6698
6707
  * Destination of the crane of this entity in 3D. Throws when trying to set the destination out of range.
6699
6708
  */
6700
6709
  crane_destination_3d: Vector3D;
6710
+ /**
6711
+ * Returns current position in 3D for the end of the crane of this entity.
6712
+ */
6713
+ readonly crane_end_position_3d: Vector3D;
6701
6714
  /**
6702
6715
  * Will set destination for the grappler of crane of this entity. The crane grappler will start moving to reach the destination, but the rest of the arm will remain stationary. Throws when trying to set the destination out of range.
6703
6716
  */
@@ -7105,7 +7118,7 @@ interface LuaEntity extends LuaControl {
7105
7118
  */
7106
7119
  orientation: RealOrientation;
7107
7120
  /**
7108
- * Plants registered by this agricultural tower.
7121
+ * Plants registered by this agricultural tower. One plant can be registered in multiple agricultural towers.
7109
7122
  */
7110
7123
  readonly owned_plants: LuaEntity[];
7111
7124
  parameters: ProgrammableSpeakerParameters;
@@ -9555,17 +9568,9 @@ interface LuaForce {
9555
9568
  * Play a sound for every player in this force.
9556
9569
  *
9557
9570
  * The sound is not played if its location is not {@link charted | runtime:LuaForce::chart} for this force.
9558
- * @param table.path The sound to play.
9559
- * @param table.position Where the sound should be played. If not given, it's played globally on each player's controller's surface.
9560
- * @param table.volume_modifier The volume of the sound to play. Must be between 0 and 1 inclusive.
9561
- * @param table.override_sound_type The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
9571
+ * @param sound_specification The sound to play.
9562
9572
  */
9563
- play_sound(this: void, table: {
9564
- path: SoundPath;
9565
- position?: MapPosition;
9566
- volume_modifier?: double;
9567
- override_sound_type?: SoundType;
9568
- }): void;
9573
+ play_sound(this: void, sound_specification: PlaySoundSpecification): void;
9569
9574
  /**
9570
9575
  * Print text to the chat console of all players on this force.
9571
9576
  *
@@ -10101,17 +10106,9 @@ interface LuaGameScript {
10101
10106
  * Play a sound for every player in the game.
10102
10107
  *
10103
10108
  * The sound is not played if its location is not {@link charted | runtime:LuaForce::chart} for that player.
10104
- * @param table.path The sound to play.
10105
- * @param table.position Where the sound should be played. If not given, it's played globally on each player's controller's surface.
10106
- * @param table.volume_modifier The volume of the sound to play. Must be between 0 and 1 inclusive.
10107
- * @param table.override_sound_type The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
10109
+ * @param sound_specification The sound to play.
10108
10110
  */
10109
- play_sound(this: void, table: {
10110
- path: SoundPath;
10111
- position?: MapPosition;
10112
- volume_modifier?: double;
10113
- override_sound_type?: SoundType;
10114
- }): void;
10111
+ play_sound(this: void, sound_specification: PlaySoundSpecification): void;
10115
10112
  /**
10116
10113
  * Print text to the chat console all players.
10117
10114
  *
@@ -13945,17 +13942,9 @@ interface LuaPlayer extends LuaControl {
13945
13942
  * Play a sound for this player.
13946
13943
  *
13947
13944
  * The sound is not played if its location is not {@link charted | runtime:LuaForce::chart} for this player.
13948
- * @param table.path The sound to play.
13949
- * @param table.position Where the sound should be played. If not given, it's played globally on the player's controller's surface.
13950
- * @param table.volume_modifier The volume of the sound to play. Must be between 0 and 1 inclusive.
13951
- * @param table.override_sound_type The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
13945
+ * @param sound_specification The sound to play.
13952
13946
  */
13953
- play_sound(this: void, table: {
13954
- path: SoundPath;
13955
- position?: MapPosition;
13956
- volume_modifier?: double;
13957
- override_sound_type?: SoundType;
13958
- }): void;
13947
+ play_sound(this: void, sound_specification: PlaySoundSpecification): void;
13959
13948
  /**
13960
13949
  * Print text to the chat console.
13961
13950
  *
@@ -15259,6 +15248,8 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
15259
15248
  * The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the item count * this value is set in the requester chest.
15260
15249
  */
15261
15250
  readonly request_paste_multiplier: uint;
15251
+ readonly reset_freshness_on_craft: boolean;
15252
+ readonly result_is_always_fresh: boolean;
15262
15253
  /**
15263
15254
  * If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.
15264
15255
  */
@@ -17674,17 +17665,9 @@ interface LuaSurface {
17674
17665
  * Play a sound for every player on this surface.
17675
17666
  *
17676
17667
  * The sound is not played if its location is not {@link charted | runtime:LuaForce::chart} for that player.
17677
- * @param table.path The sound to play.
17678
- * @param table.position Where the sound should be played. If not given, it's played globally on this surface.
17679
- * @param table.volume_modifier The volume of the sound to play. Must be between 0 and 1 inclusive.
17680
- * @param table.override_sound_type The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
17668
+ * @param sound_specification The sound to play.
17681
17669
  */
17682
- play_sound(this: void, table: {
17683
- path: SoundPath;
17684
- position?: MapPosition;
17685
- volume_modifier?: double;
17686
- override_sound_type?: SoundType;
17687
- }): void;
17670
+ play_sound(this: void, sound_specification: PlaySoundSpecification): void;
17688
17671
  /**
17689
17672
  * Spawn pollution at the given position.
17690
17673
  * @param source Where to spawn the pollution.
@@ -18603,7 +18586,7 @@ interface LuaTechnology {
18603
18586
  /**
18604
18587
  * The types of ingredients that labs will require to research this technology.
18605
18588
  */
18606
- readonly research_unit_ingredients: Ingredient[];
18589
+ readonly research_unit_ingredients: ResearchIngredient[];
18607
18590
  /**
18608
18591
  * Has this technology been researched? Switching from `false` to `true` will trigger the technology advancement perks; switching from `true` to `false` will reverse them.
18609
18592
  */
@@ -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.49
5
+ // Factorio version 2.0.50
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -55,6 +55,7 @@ interface AddRecordData {
55
55
  index?: ScheduleRecordPosition;
56
56
  }
57
57
  interface AdvancedMapGenSettings {
58
+ asteroids: AsteroidMapSettings;
58
59
  pollution: PollutionMapSettings;
59
60
  enemy_evolution: EnemyEvolutionMapSettings;
60
61
  enemy_expansion: EnemyExpansionMapSettings;
@@ -78,7 +79,7 @@ interface Alert {
78
79
  message?: LocalisedString;
79
80
  }
80
81
  /**
81
- * A {@link string | runtime:string} that specifies where a GUI element should be.
82
+ * A string that specifies where a GUI element should be.
82
83
  */
83
84
  type Alignment = 'top-left' | 'middle-left' | /**
84
85
  * The same as `"middle-left"`
@@ -270,7 +271,7 @@ interface AttackParametersProjectile extends BaseAttackParameters {
270
271
  'type': 'projectile';
271
272
  'projectile_center': Vector;
272
273
  'projectile_creation_distance': float;
273
- 'projectile_creation_parameters'?: CircularProjectileCreationSpecification[];
274
+ 'projectile_creation_parameters'?: CircularProjectileCreationSpecification;
274
275
  'projectile_orientation_offset': float;
275
276
  'shell_particle'?: CircularParticleCreationSpecification;
276
277
  }
@@ -287,7 +288,7 @@ interface AttackParametersStream extends BaseAttackParameters {
287
288
  'fluids'?: AttackParameterFluid[];
288
289
  'gun_barrel_length': float;
289
290
  'gun_center_shift': GunShift4Way;
290
- 'projectile_creation_parameters'?: CircularProjectileCreationSpecification[];
291
+ 'projectile_creation_parameters'?: CircularProjectileCreationSpecification;
291
292
  }
292
293
  interface AutoplaceControl {
293
294
  /**
@@ -317,25 +318,25 @@ interface AutoplaceSettings {
317
318
  * Specifies how probability and richness are calculated when placing something on the map.
318
319
  */
319
320
  interface AutoplaceSpecification {
321
+ placement_density: uint;
320
322
  /**
321
323
  * Control prototype name.
322
324
  */
323
325
  control?: string;
324
- default_enabled: boolean;
325
- force: string;
326
+ probability_expression: NoiseExpressionSourceString;
327
+ richness_expression?: NoiseExpressionSourceString;
326
328
  order: string;
327
- placement_density: uint;
329
+ default_enabled: boolean;
328
330
  tile_restriction?: AutoplaceSpecificationRestriction[];
329
- probability_expression: NoiseExpression;
330
- richness_expression?: NoiseExpression;
331
+ force: string;
331
332
  }
332
333
  interface AutoplaceSpecificationRestriction {
333
334
  /**
334
- * Tile prototype name
335
+ * Tile prototype name.
335
336
  */
336
337
  first?: string;
337
338
  /**
338
- * Second prototype name
339
+ * Second prototype name.
339
340
  */
340
341
  second?: string;
341
342
  }
@@ -707,7 +708,7 @@ interface CircularParticleCreationSpecification {
707
708
  type CircularProjectileCreationSpecification = [
708
709
  RealOrientation,
709
710
  Vector
710
- ];
711
+ ][];
711
712
  type CliffOrientation = 'west-to-east' | 'north-to-south' | 'east-to-west' | 'south-to-north' | 'west-to-north' | 'north-to-east' | 'east-to-south' | 'south-to-west' | 'west-to-south' | 'north-to-west' | 'east-to-north' | 'south-to-east' | 'west-to-none' | 'none-to-east' | 'east-to-none' | 'none-to-west' | 'north-to-none' | 'none-to-south' | 'south-to-none' | 'none-to-north';
712
713
  interface CliffPlacementSettings {
713
714
  /**
@@ -2590,6 +2591,8 @@ type Ingredient = BaseIngredient | IngredientFluid;
2590
2591
  */
2591
2592
  interface IngredientFluid extends BaseIngredient {
2592
2593
  'type': 'fluid';
2594
+ 'fluidbox_index'?: uint;
2595
+ 'fluidbox_multiplier'?: uint8;
2593
2596
  /**
2594
2597
  * The maximum fluid temperature allowed.
2595
2598
  */
@@ -5385,6 +5388,7 @@ interface MineableProperties {
5385
5388
  * Energy required to mine an entity.
5386
5389
  */
5387
5390
  mining_time: double;
5391
+ transfer_entity_health_to_products: boolean;
5388
5392
  /**
5389
5393
  * Prototype name of the particle produced when mining this entity. Will only be present if this entity produces any particle during mining.
5390
5394
  */
@@ -5509,14 +5513,9 @@ interface ModuleEffects {
5509
5513
  */
5510
5514
  type MouseButtonFlags = Record<'left' | 'right' | 'middle' | 'button-4' | 'button-5' | 'button-6' | 'button-7' | 'button-8' | 'button-9', true>;
5511
5515
  /**
5512
- * A fragment of a functional program used to generate coherent noise, probably for purposes related to terrain generation. These can only be meaningfully written/modified during the data load phase. More detailed information is found on the {@link prototype docs | prototype:NamedNoiseExpression}.
5516
+ * The string representation of a noise expression. More detailed information is found on the {@link prototype docs | prototype:NamedNoiseExpression}.
5513
5517
  */
5514
- interface NoiseExpression {
5515
- /**
5516
- * Names the type of the expression and determines what other fields are required.
5517
- */
5518
- type: string;
5519
- }
5518
+ type NoiseExpressionSourceString = string;
5520
5519
  interface NthTickEventData {
5521
5520
  /**
5522
5521
  * The tick during which the event happened.
@@ -5785,6 +5784,24 @@ interface PlatformSchedule {
5785
5784
  current: uint;
5786
5785
  records: ScheduleRecord[];
5787
5786
  }
5787
+ interface PlaySoundSpecification {
5788
+ /**
5789
+ * The sound to play.
5790
+ */
5791
+ path: SoundPath;
5792
+ /**
5793
+ * Where the sound should be played. If not given, it's played globally on the player's controller's surface.
5794
+ */
5795
+ position?: MapPosition;
5796
+ /**
5797
+ * The volume of the sound to play. Must be between 0 and 1 inclusive.
5798
+ */
5799
+ volume_modifier?: double;
5800
+ /**
5801
+ * The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
5802
+ */
5803
+ override_sound_type?: SoundType;
5804
+ }
5788
5805
  /**
5789
5806
  * A player may be specified in one of three ways.
5790
5807
  */
@@ -5913,6 +5930,7 @@ interface ProgrammableSpeakerAlertParameters {
5913
5930
  }
5914
5931
  interface ProgrammableSpeakerCircuitParameters {
5915
5932
  signal_value_is_pitch: boolean;
5933
+ stop_playing_sounds: boolean;
5916
5934
  instrument_id: uint;
5917
5935
  note_id: uint;
5918
5936
  }
@@ -5924,6 +5942,8 @@ interface ProgrammableSpeakerParameters {
5924
5942
  playback_volume: float;
5925
5943
  playback_mode: ProgrammableSpeakerPlaybackMode;
5926
5944
  allow_polyphony: boolean;
5945
+ volume_controlled_by_signal: boolean;
5946
+ volume_signal_id: SignalID;
5927
5947
  }
5928
5948
  /**
5929
5949
  * Specifies from where the programmable speaker's sound will be heard.
@@ -6635,11 +6655,11 @@ interface ResearchTriggerSendItemToOrbit extends BaseResearchTrigger {
6635
6655
  }
6636
6656
  interface Resistance {
6637
6657
  /**
6638
- * Absolute damage decrease
6658
+ * Absolute damage decrease.
6639
6659
  */
6640
6660
  decrease: float;
6641
6661
  /**
6642
- * Percentual damage decrease
6662
+ * Percentual damage decrease.
6643
6663
  */
6644
6664
  percent: float;
6645
6665
  }
@@ -7083,6 +7103,7 @@ interface SpaceLocationAsteroidSpawnDefinition {
7083
7103
  asteroid: string;
7084
7104
  probability: double;
7085
7105
  speed: double;
7106
+ angle_when_stopped: float;
7086
7107
  }
7087
7108
  /**
7088
7109
  * A space location prototype may be specified in one of two ways.
@@ -7150,14 +7171,14 @@ interface SpawnPointDefinition {
7150
7171
  weight: double;
7151
7172
  }
7152
7173
  interface SpoilToTriggerResult {
7153
- /**
7154
- * The trigger runs (count-in-stack / items_per_trigger) times; rounded up.
7155
- */
7156
- items_per_trigger: uint;
7157
7174
  /**
7158
7175
  * The trigger items that are run.
7159
7176
  */
7160
7177
  trigger: TriggerItem[];
7178
+ /**
7179
+ * The trigger runs (count-in-stack / items_per_trigger) times; rounded up.
7180
+ */
7181
+ items_per_trigger: uint;
7161
7182
  }
7162
7183
  /**
7163
7184
  * It can be either the name of a {@link SpritePrototype | prototype:SpritePrototype} defined in the data stage, or a path in form "type/name" or "type.name".
@@ -8267,7 +8288,7 @@ type WaitConditionType = 'time' | 'full' | 'empty' | 'not_empty' | 'item_count'
8267
8288
  interface WireConnection {
8268
8289
  target: LuaWireConnector;
8269
8290
  /**
8270
- * Defaults to defines.wire_origin.player
8291
+ * Defaults to `defines.wire_origin.player`.
8271
8292
  */
8272
8293
  origin?: defines.wire_origin;
8273
8294
  }
@@ -8347,11 +8368,11 @@ interface ZoomSpecification {
8347
8368
  */
8348
8369
  zoom?: double;
8349
8370
  /**
8350
- * The number of game tiles across the horizontal axis at the game's default 16:9 aspect ratio. Must be a positive number. This specification is designed to comfortably accommodate displays with extreme aspect ratios such as ultrawide monitors. The exact zoom level is calculated at dynamically as follows. For aspect ratios between 16:9 and 9:16, the zoom level is computed so that `distance` number of tiles are visible along the game window's longer axis. For aspect ratios between 16:9 and 1:1, this is the window's width. For aspect ratios between 1:1 and 9:16, this is the window's height. For aspect ratios greater than 16:9 or smaller than 9:16, then the zoom level is actually computed so that `distance * 9 / 16` number of tiles are visible along the game window's shorter axis. So for aspect ratios greater than 16:9, this is the window's height. For aspect ratios smaller than 9:16, this is the window's height. Mutually exclusive with `zoom`. Used with `max_distance`.
8371
+ * The number of game tiles across the horizontal axis at the game's default 16:9 aspect ratio. Must be a positive number. This specification is designed to comfortably accommodate displays with extreme aspect ratios such as ultra-wide monitors. The exact zoom level is calculated dynamically as follows. For aspect ratios between 16:9 and 9:16, the zoom level is computed so that `distance` number of tiles are visible along the game window's longer axis. For aspect ratios between 16:9 and 1:1, this is the window's width. For aspect ratios between 1:1 and 9:16, this is the window's height. For aspect ratios greater than 16:9 or smaller than 9:16, then the zoom level is actually computed so that `distance * 9 / 16` number of tiles are visible along the game window's shorter axis. So for aspect ratios greater than 16:9, this is the window's height. For aspect ratios smaller than 9:16, this is the window's height. Mutually exclusive with `zoom`. Used with `max_distance`.
8351
8372
  */
8352
8373
  distance?: double;
8353
8374
  /**
8354
- * The absolute maximum number of game tiles permitted along the window's longest axis, setting a hard limit on how far a player can see by simply manipulating the game window. Must be a positive number. Values greater than the default may allow players to see ungenerated chunks while exploring. The "closest" zoom level calculated from `distance` and `max_distance` is always used. Optionally used with `distance`. Defaults to `500`.
8375
+ * The absolute maximum number of game tiles permitted along the window's longest axis, setting a hard limit on how far a player can see by simply manipulating the game window. Must be a positive number. Values greater than the default may allow players to see un-generated chunks while exploring. The "closest" zoom level calculated from `distance` and `max_distance` is always used. Optionally used with `distance`. Defaults to `500`.
8355
8376
  */
8356
8377
  max_distance?: double;
8357
8378
  }
@@ -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.49
5
+ // Factorio version 2.0.50
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.49
5
+ // Factorio version 2.0.50
6
6
  // API version 6
7
7
 
8
8
  declare namespace defines {
@@ -1038,193 +1038,192 @@ enum input_action {
1038
1038
  edit_interrupt = 88,
1039
1039
  edit_permission_group = 89,
1040
1040
  edit_pin = 90,
1041
- enable_transitional_requests = 91,
1042
- export_blueprint = 92,
1043
- fast_entity_split = 93,
1044
- fast_entity_transfer = 94,
1045
- flip_entity = 95,
1046
- flush_opened_entity_fluid = 96,
1047
- flush_opened_entity_specific_fluid = 97,
1048
- go_to_train_station = 98,
1049
- grab_blueprint_record = 99,
1050
- gui_checked_state_changed = 100,
1051
- gui_click = 101,
1052
- gui_confirmed = 102,
1053
- gui_elem_changed = 103,
1054
- gui_hover = 104,
1055
- gui_leave = 105,
1056
- gui_location_changed = 106,
1057
- gui_selected_tab_changed = 107,
1058
- gui_selection_state_changed = 108,
1059
- gui_switch_state_changed = 109,
1060
- gui_text_changed = 110,
1061
- gui_value_changed = 111,
1062
- import_blueprint = 112,
1063
- import_blueprint_string = 113,
1064
- import_blueprints_filtered = 114,
1065
- import_permissions_string = 115,
1066
- instantly_create_space_platform = 116,
1067
- inventory_split = 117,
1068
- inventory_transfer = 118,
1069
- land_at_planet = 119,
1070
- launch_rocket = 120,
1071
- lua_shortcut = 121,
1072
- map_editor_action = 122,
1073
- market_offer = 123,
1074
- mod_settings_changed = 124,
1075
- modify_decider_combinator_condition = 125,
1076
- modify_decider_combinator_output = 126,
1077
- move_pin = 127,
1078
- move_research = 128,
1079
- open_achievements_gui = 129,
1080
- open_blueprint_library_gui = 130,
1081
- open_blueprint_record = 131,
1082
- open_bonus_gui = 132,
1083
- open_character_gui = 133,
1084
- open_current_vehicle_gui = 134,
1085
- open_equipment = 135,
1086
- open_global_electric_network_gui = 136,
1087
- open_gui = 137,
1088
- open_item = 138,
1089
- open_logistics_gui = 139,
1090
- open_mod_item = 140,
1091
- open_new_platform_button_from_rocket_silo = 141,
1092
- open_opened_entity_grid = 142,
1093
- open_parent_of_opened_item = 143,
1094
- open_production_gui = 144,
1095
- open_train_gui = 145,
1096
- open_train_station_gui = 146,
1097
- open_trains_gui = 147,
1098
- parametrise_blueprint = 148,
1099
- paste_entity_settings = 149,
1100
- pin_alert_group = 150,
1101
- pin_custom_alert = 151,
1102
- pin_search_result = 152,
1103
- pipette = 153,
1104
- place_equipment = 154,
1105
- quick_bar_pick_slot = 155,
1106
- quick_bar_set_selected_page = 156,
1107
- quick_bar_set_slot = 157,
1108
- reassign_blueprint = 158,
1109
- redo = 159,
1110
- remote_view_entity = 160,
1111
- remote_view_surface = 161,
1112
- remove_cables = 162,
1113
- remove_decider_combinator_condition = 163,
1114
- remove_decider_combinator_output = 164,
1115
- remove_logistic_section = 165,
1116
- remove_pin = 166,
1117
- remove_train_interrupt = 167,
1118
- remove_train_station = 168,
1119
- rename_interrupt = 169,
1120
- rename_space_platform = 170,
1121
- reorder_logistic_section = 171,
1122
- request_missing_construction_materials = 172,
1123
- reset_assembling_machine = 173,
1124
- reverse_select_area = 174,
1125
- rotate_entity = 175,
1126
- select_area = 176,
1127
- select_asteroid_chunk_slot = 177,
1128
- select_blueprint_entities = 178,
1129
- select_entity_filter_slot = 179,
1130
- select_entity_slot = 180,
1131
- select_item_filter = 181,
1132
- select_mapper_slot_from = 182,
1133
- select_mapper_slot_to = 183,
1134
- select_next_valid_gun = 184,
1135
- select_tile_slot = 185,
1136
- send_spidertron = 186,
1137
- send_stack_to_trash = 187,
1138
- send_stacks_to_trash = 188,
1139
- send_train_to_pin_target = 189,
1140
- set_behavior_mode = 190,
1141
- set_car_weapons_control = 191,
1142
- set_cheat_mode_quality = 192,
1143
- set_circuit_condition = 193,
1144
- set_circuit_mode_of_operation = 194,
1145
- set_combinator_description = 195,
1146
- set_copy_color_from_train_stop = 196,
1147
- set_deconstruction_item_tile_selection_mode = 197,
1148
- set_deconstruction_item_trees_and_rocks_only = 198,
1149
- set_entity_color = 199,
1150
- set_entity_energy_property = 200,
1151
- set_filter = 201,
1152
- set_ghost_cursor = 202,
1153
- set_heat_interface_mode = 203,
1154
- set_heat_interface_temperature = 204,
1155
- set_infinity_container_filter_item = 205,
1156
- set_infinity_container_remove_unfiltered_items = 206,
1157
- set_infinity_pipe_filter = 207,
1158
- set_inserter_max_stack_size = 208,
1159
- set_inventory_bar = 209,
1160
- set_lamp_always_on = 210,
1161
- set_linked_container_link_i_d = 211,
1162
- set_loader_belt_stack_size_override = 212,
1163
- set_logistic_filter_item = 213,
1164
- set_logistic_network_name = 214,
1165
- set_logistic_section_active = 215,
1166
- set_player_color = 216,
1167
- set_pump_fluid_filter = 217,
1168
- set_request_from_buffers = 218,
1169
- set_research_finished_stops_game = 219,
1170
- set_rocket_silo_send_to_orbit_automated_mode = 220,
1171
- set_schedule_record_allow_unloading = 221,
1172
- set_signal = 222,
1173
- set_splitter_priority = 223,
1174
- set_spoil_priority = 224,
1175
- set_train_stop_priority = 225,
1176
- set_train_stopped = 226,
1177
- set_trains_limit = 227,
1178
- set_turret_ignore_unlisted = 228,
1179
- set_use_inserter_filters = 229,
1180
- set_vehicle_automatic_targeting_parameters = 230,
1181
- setup_assembling_machine = 231,
1182
- setup_blueprint = 232,
1183
- setup_single_blueprint_record = 233,
1184
- spawn_item = 234,
1185
- spectator_change_surface = 235,
1186
- stack_split = 236,
1187
- stack_transfer = 237,
1188
- start_repair = 238,
1189
- start_research = 239,
1190
- start_walking = 240,
1191
- stop_drag_build = 241,
1192
- swap_asteroid_chunk_slots = 242,
1193
- swap_entity_filter_slots = 243,
1194
- swap_entity_slots = 244,
1195
- swap_infinity_container_filter_items = 245,
1196
- swap_item_filters = 246,
1197
- swap_logistic_filter_items = 247,
1198
- swap_mappers = 248,
1199
- swap_tile_slots = 249,
1200
- switch_connect_to_logistic_network = 250,
1201
- switch_constant_combinator_state = 251,
1202
- switch_inserter_filter_mode_state = 252,
1203
- switch_loader_filter_mode = 253,
1204
- switch_mining_drill_filter_mode_state = 254,
1205
- switch_power_switch_state = 255,
1206
- take_equipment = 256,
1207
- toggle_artillery_auto_targeting = 257,
1208
- toggle_deconstruction_item_entity_filter_mode = 258,
1209
- toggle_deconstruction_item_tile_filter_mode = 259,
1210
- toggle_driving = 260,
1211
- toggle_enable_vehicle_logistics_while_moving = 261,
1212
- toggle_entity_logistic_requests = 262,
1213
- toggle_equipment_movement_bonus = 263,
1214
- toggle_map_editor = 264,
1215
- toggle_personal_logistic_requests = 265,
1216
- toggle_personal_roboport = 266,
1217
- toggle_selected_entity = 267,
1218
- toggle_show_entity_info = 268,
1219
- translate_string = 269,
1220
- trash_not_requested_items = 270,
1221
- undo = 271,
1222
- upgrade = 272,
1223
- upgrade_opened_blueprint_by_item = 273,
1224
- upgrade_opened_blueprint_by_record = 274,
1225
- use_item = 275,
1226
- wire_dragging = 276,
1227
- write_to_console = 277
1041
+ export_blueprint = 91,
1042
+ fast_entity_split = 92,
1043
+ fast_entity_transfer = 93,
1044
+ flip_entity = 94,
1045
+ flush_opened_entity_fluid = 95,
1046
+ flush_opened_entity_specific_fluid = 96,
1047
+ go_to_train_station = 97,
1048
+ grab_blueprint_record = 98,
1049
+ gui_checked_state_changed = 99,
1050
+ gui_click = 100,
1051
+ gui_confirmed = 101,
1052
+ gui_elem_changed = 102,
1053
+ gui_hover = 103,
1054
+ gui_leave = 104,
1055
+ gui_location_changed = 105,
1056
+ gui_selected_tab_changed = 106,
1057
+ gui_selection_state_changed = 107,
1058
+ gui_switch_state_changed = 108,
1059
+ gui_text_changed = 109,
1060
+ gui_value_changed = 110,
1061
+ import_blueprint = 111,
1062
+ import_blueprint_string = 112,
1063
+ import_blueprints_filtered = 113,
1064
+ import_permissions_string = 114,
1065
+ instantly_create_space_platform = 115,
1066
+ inventory_split = 116,
1067
+ inventory_transfer = 117,
1068
+ land_at_planet = 118,
1069
+ launch_rocket = 119,
1070
+ lua_shortcut = 120,
1071
+ map_editor_action = 121,
1072
+ market_offer = 122,
1073
+ mod_settings_changed = 123,
1074
+ modify_decider_combinator_condition = 124,
1075
+ modify_decider_combinator_output = 125,
1076
+ move_pin = 126,
1077
+ move_research = 127,
1078
+ open_achievements_gui = 128,
1079
+ open_blueprint_library_gui = 129,
1080
+ open_blueprint_record = 130,
1081
+ open_bonus_gui = 131,
1082
+ open_character_gui = 132,
1083
+ open_current_vehicle_gui = 133,
1084
+ open_equipment = 134,
1085
+ open_global_electric_network_gui = 135,
1086
+ open_gui = 136,
1087
+ open_item = 137,
1088
+ open_logistics_gui = 138,
1089
+ open_mod_item = 139,
1090
+ open_new_platform_button_from_rocket_silo = 140,
1091
+ open_opened_entity_grid = 141,
1092
+ open_parent_of_opened_item = 142,
1093
+ open_production_gui = 143,
1094
+ open_train_gui = 144,
1095
+ open_train_station_gui = 145,
1096
+ open_trains_gui = 146,
1097
+ parametrise_blueprint = 147,
1098
+ paste_entity_settings = 148,
1099
+ pin_alert_group = 149,
1100
+ pin_custom_alert = 150,
1101
+ pin_search_result = 151,
1102
+ pipette = 152,
1103
+ place_equipment = 153,
1104
+ quick_bar_pick_slot = 154,
1105
+ quick_bar_set_selected_page = 155,
1106
+ quick_bar_set_slot = 156,
1107
+ reassign_blueprint = 157,
1108
+ redo = 158,
1109
+ remote_view_entity = 159,
1110
+ remote_view_surface = 160,
1111
+ remove_cables = 161,
1112
+ remove_decider_combinator_condition = 162,
1113
+ remove_decider_combinator_output = 163,
1114
+ remove_logistic_section = 164,
1115
+ remove_pin = 165,
1116
+ remove_train_interrupt = 166,
1117
+ remove_train_station = 167,
1118
+ rename_interrupt = 168,
1119
+ rename_space_platform = 169,
1120
+ reorder_logistic_section = 170,
1121
+ request_missing_construction_materials = 171,
1122
+ reset_assembling_machine = 172,
1123
+ reverse_select_area = 173,
1124
+ rotate_entity = 174,
1125
+ select_area = 175,
1126
+ select_asteroid_chunk_slot = 176,
1127
+ select_blueprint_entities = 177,
1128
+ select_entity_filter_slot = 178,
1129
+ select_entity_slot = 179,
1130
+ select_item_filter = 180,
1131
+ select_mapper_slot_from = 181,
1132
+ select_mapper_slot_to = 182,
1133
+ select_next_valid_gun = 183,
1134
+ select_tile_slot = 184,
1135
+ send_spidertron = 185,
1136
+ send_stack_to_trash = 186,
1137
+ send_stacks_to_trash = 187,
1138
+ send_train_to_pin_target = 188,
1139
+ set_behavior_mode = 189,
1140
+ set_car_weapons_control = 190,
1141
+ set_cheat_mode_quality = 191,
1142
+ set_circuit_condition = 192,
1143
+ set_circuit_mode_of_operation = 193,
1144
+ set_combinator_description = 194,
1145
+ set_copy_color_from_train_stop = 195,
1146
+ set_deconstruction_item_tile_selection_mode = 196,
1147
+ set_deconstruction_item_trees_and_rocks_only = 197,
1148
+ set_entity_color = 198,
1149
+ set_entity_energy_property = 199,
1150
+ set_filter = 200,
1151
+ set_ghost_cursor = 201,
1152
+ set_heat_interface_mode = 202,
1153
+ set_heat_interface_temperature = 203,
1154
+ set_infinity_container_filter_item = 204,
1155
+ set_infinity_container_remove_unfiltered_items = 205,
1156
+ set_infinity_pipe_filter = 206,
1157
+ set_inserter_max_stack_size = 207,
1158
+ set_inventory_bar = 208,
1159
+ set_lamp_always_on = 209,
1160
+ set_linked_container_link_i_d = 210,
1161
+ set_loader_belt_stack_size_override = 211,
1162
+ set_logistic_filter_item = 212,
1163
+ set_logistic_network_name = 213,
1164
+ set_logistic_section_active = 214,
1165
+ set_player_color = 215,
1166
+ set_pump_fluid_filter = 216,
1167
+ set_request_from_buffers = 217,
1168
+ set_research_finished_stops_game = 218,
1169
+ set_rocket_silo_send_to_orbit_automated_mode = 219,
1170
+ set_schedule_record_allow_unloading = 220,
1171
+ set_signal = 221,
1172
+ set_splitter_priority = 222,
1173
+ set_spoil_priority = 223,
1174
+ set_train_stop_priority = 224,
1175
+ set_train_stopped = 225,
1176
+ set_trains_limit = 226,
1177
+ set_turret_ignore_unlisted = 227,
1178
+ set_use_inserter_filters = 228,
1179
+ set_vehicle_automatic_targeting_parameters = 229,
1180
+ setup_assembling_machine = 230,
1181
+ setup_blueprint = 231,
1182
+ setup_single_blueprint_record = 232,
1183
+ spawn_item = 233,
1184
+ spectator_change_surface = 234,
1185
+ stack_split = 235,
1186
+ stack_transfer = 236,
1187
+ start_repair = 237,
1188
+ start_research = 238,
1189
+ start_walking = 239,
1190
+ stop_drag_build = 240,
1191
+ swap_asteroid_chunk_slots = 241,
1192
+ swap_entity_filter_slots = 242,
1193
+ swap_entity_slots = 243,
1194
+ swap_infinity_container_filter_items = 244,
1195
+ swap_item_filters = 245,
1196
+ swap_logistic_filter_items = 246,
1197
+ swap_mappers = 247,
1198
+ swap_tile_slots = 248,
1199
+ switch_connect_to_logistic_network = 249,
1200
+ switch_constant_combinator_state = 250,
1201
+ switch_inserter_filter_mode_state = 251,
1202
+ switch_loader_filter_mode = 252,
1203
+ switch_mining_drill_filter_mode_state = 253,
1204
+ switch_power_switch_state = 254,
1205
+ take_equipment = 255,
1206
+ toggle_artillery_auto_targeting = 256,
1207
+ toggle_deconstruction_item_entity_filter_mode = 257,
1208
+ toggle_deconstruction_item_tile_filter_mode = 258,
1209
+ toggle_driving = 259,
1210
+ toggle_enable_vehicle_logistics_while_moving = 260,
1211
+ toggle_entity_logistic_requests = 261,
1212
+ toggle_equipment_movement_bonus = 262,
1213
+ toggle_map_editor = 263,
1214
+ toggle_personal_logistic_requests = 264,
1215
+ toggle_personal_roboport = 265,
1216
+ toggle_selected_entity = 266,
1217
+ toggle_show_entity_info = 267,
1218
+ translate_string = 268,
1219
+ trash_not_requested_items = 269,
1220
+ undo = 270,
1221
+ upgrade = 271,
1222
+ upgrade_opened_blueprint_by_item = 272,
1223
+ upgrade_opened_blueprint_by_record = 273,
1224
+ use_item = 274,
1225
+ wire_dragging = 275,
1226
+ write_to_console = 276
1228
1227
  }
1229
1228
  enum input_method {
1230
1229
  game_controller = 1,
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.49
5
+ // Factorio version 2.0.50
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.49
5
+ // Factorio version 2.0.50
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.49
5
+ // Factorio version 2.0.50
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -6791,6 +6791,10 @@ interface RecipePrototype extends Prototype {
6791
6791
  overload_multiplier?: uint32;
6792
6792
  preserve_products_in_machine_output?: boolean;
6793
6793
  requester_paste_multiplier?: uint32;
6794
+ /**
6795
+ * When set to true, if the recipe successfully finishes crafting without spoiling, the result is produced fresh (non-spoiled).
6796
+ */
6797
+ reset_freshness_on_craft?: boolean;
6794
6798
  /**
6795
6799
  * When set to true, the recipe will always produce fresh (non-spoiled) item even when the ingredients are spoiled.
6796
6800
  */
@@ -6987,7 +6991,7 @@ interface ResourceEntityPrototype extends EntityPrototype {
6987
6991
  */
6988
6992
  infinite?: boolean;
6989
6993
  /**
6990
- * Every time an infinite-type resource "ticks" lower it's lowered by that amount. -- {@link Rseding91 | https://forums.factorio.com/viewtopic.php?p=271115#p271115}
6994
+ * Every time an infinite-type resource "ticks" lower it's lowered by that amount.
6991
6995
  */
6992
6996
  infinite_depletion_amount?: uint32;
6993
6997
  /**
@@ -9749,7 +9753,7 @@ interface UtilityConstants extends PrototypeBase {
9749
9753
  building_not_buildable_tint: Color;
9750
9754
  capsule_range_visualization_color: Color;
9751
9755
  /**
9752
- * Layer within `ground-natural` {@link tile render layer | prototype:TileRenderLayer} group, before which terrain lightmap alpha channel is copiend into water mask. Decals, which need to be masked by water should have their {@link DecorativePrototype::tile_layer | prototype:DecorativePrototype::tile_layer} set to only slightly larger value than `capture_water_mask_at_layer`, to avoid risk of undefined behavior caused by rendering tiles into layers between `capture_water_mask_at_layer` and decal's `tile_layer`.
9756
+ * Layer within `ground-natural` {@link tile render layer | prototype:TileRenderLayer} group, before which terrain lightmap alpha channel is copied into water mask. Decals, which need to be masked by water should have their {@link DecorativePrototype::tile_layer | prototype:DecorativePrototype::tile_layer} set to only slightly larger value than `capture_water_mask_at_layer`, to avoid risk of undefined behavior caused by rendering tiles into layers between `capture_water_mask_at_layer` and decal's `tile_layer`.
9753
9757
  */
9754
9758
  capture_water_mask_at_layer: uint8;
9755
9759
  /**
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.49
5
+ // Factorio version 2.0.50
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -179,6 +179,19 @@ interface AgriculturalCraneSpeedGrappler {
179
179
  ```
180
180
  */
181
181
  type AirbornePollutantID = string;
182
+ /**
183
+ * A string that specifies where a GUI element should be.
184
+ */
185
+ type Alignment = 'top-left' | 'middle-left' | /**
186
+ * The same as `"middle-left"`
187
+ */
188
+ 'left' | 'bottom-left' | 'top-center' | 'middle-center' | /**
189
+ * The same as `"middle-center"`
190
+ */
191
+ 'center' | 'bottom-center' | 'top-right' | /**
192
+ * The same as `"middle-right"`
193
+ */
194
+ 'right' | 'bottom-right';
182
195
  interface AlternativeBuildTipTrigger extends CountBasedTipTrigger {
183
196
  type: 'alternative-build';
184
197
  }
@@ -1436,7 +1449,7 @@ interface AsteroidSpawnPoint {
1436
1449
  /**
1437
1450
  * Facing the north. Must be in `[0, 1]` range.
1438
1451
  */
1439
- angle_when_stopped?: double;
1452
+ angle_when_stopped?: float;
1440
1453
  /**
1441
1454
  * Must be >= 0.
1442
1455
  */
@@ -2808,7 +2821,7 @@ interface ColorHintSpecification {
2808
2821
  */
2809
2822
  type ColorLookupTable = FileName | 'identity';
2810
2823
  interface ColumnAlignment {
2811
- alignment: 'center' | 'left' | 'right' | 'top-left' | 'middle-left' | 'bottom-left' | 'top-center' | 'middle-center' | 'bottom-center' | 'top-right' | 'middle-right' | 'bottom-right';
2824
+ alignment: Alignment;
2812
2825
  /**
2813
2826
  * Column index.
2814
2827
  */
@@ -4871,10 +4884,28 @@ footstep_particle_triggers =
4871
4884
  ```
4872
4885
  */
4873
4886
  type FootstepTriggerEffectList = FootstepTriggerEffectItem[];
4874
- /**
4875
- * One of the following values:
4887
+ type ForceCondition = /**
4888
+ * All forces pass.
4889
+ */
4890
+ 'all' | /**
4891
+ * Forces which will attack pass.
4892
+ */
4893
+ 'enemy' | /**
4894
+ * Forces which won't attack pass.
4895
+ */
4896
+ 'ally' | /**
4897
+ * Forces which are friends pass.
4898
+ */
4899
+ 'friend' | /**
4900
+ * Forces which are not friends pass.
4901
+ */
4902
+ 'not-friend' | /**
4903
+ * The same force pass.
4904
+ */
4905
+ 'same' | /**
4906
+ * The non-same forces pass.
4876
4907
  */
4877
- type ForceCondition = 'all' | 'enemy' | 'ally' | 'friend' | 'not-friend' | 'same' | 'not-same';
4908
+ 'not-same';
4878
4909
  interface FrameStyleSpecification extends BaseStyleSpecification {
4879
4910
  background_graphical_set?: ElementImageSet;
4880
4911
  border?: BorderImageSet;
@@ -6183,9 +6214,9 @@ interface MapGenSettings {
6183
6214
  /**
6184
6215
  * A floating point number specifying an amount.
6185
6216
  *
6186
- * For backwards compatibility, MapGenSizes can also be specified as one of the following strings, which will be converted to a number:
6217
+ * For backwards compatibility, MapGenSizes can also be specified as a string, which will be converted to a number (when queried, a number will always be returned).
6187
6218
  *
6188
- * Each of the values in a triplet (such as "low", "small", and "poor") are synonymous. In-game the values can be set from `0.166` to `6` via the GUI (respective to the percentages), while `0` is used to disable the autoplace control.
6219
+ * The map generation algorithm officially supports the range of values the in-game map generation screen shows (specifically `0` and values from `1/6` to `6`). Values outside this range are not guaranteed to work as expected.
6189
6220
  */
6190
6221
  type MapGenSize = /**
6191
6222
  * Specifying a map gen dimension.
@@ -9817,7 +9848,7 @@ interface SpriteParameters extends SpriteSource {
9817
9848
  */
9818
9849
  mipmap_count?: uint8;
9819
9850
  /**
9820
- * Loaded only if `draw_as_shadow`, `draw_as_glow` and `draw_as_light` are `false`, and only by sprites used by tile renderer (decals and underwater patches). Purspose of setting this to `false` is to preserve water mask from sprites that are supposed to be drawn under the water.
9851
+ * Loaded only if `draw_as_shadow`, `draw_as_glow` and `draw_as_light` are `false`, and only by sprites used by tile renderer (decals and underwater patches). The purpose of setting this to `false` is to preserve water mask from sprites that are supposed to be drawn under the water.
9821
9852
  */
9822
9853
  occludes_light?: boolean;
9823
9854
  priority?: SpritePriority;
@@ -11151,7 +11182,7 @@ interface TintProcessionBezierControlPoint {
11151
11182
  tint_upper_t?: Color;
11152
11183
  }
11153
11184
  /**
11154
- * Fullscreen overlay which blends gradient from top to bottom edge of the screen using {@link premultiplied alpha blending | prototype:BlendMode::normal}.
11185
+ * Fullscreen overlay which blends gradient from top to bottom edge of the screen using {@link pre-multiplied alpha blending | prototype:BlendMode::normal}.
11155
11186
  */
11156
11187
  interface TintProcessionLayer {
11157
11188
  frames: TintProcessionBezierControlPoint[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.34",
3
+ "version": "1.2.35",
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.49",
26
+ "factorioVersion": "2.0.50",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },