factorio-types 1.2.28 → 1.2.30

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.41
5
+ // Factorio version 2.0.43
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -181,6 +181,7 @@ interface LuaAgriculturalTowerControlBehavior extends LuaGenericOnOffControlBeha
181
181
  interface LuaAirbornePollutantPrototype extends LuaPrototypeBase {
182
182
  readonly affects_evolution: boolean;
183
183
  readonly chart_color: Color;
184
+ readonly damages_trees: boolean;
184
185
  readonly localised_name_with_amount_key: string;
185
186
  /**
186
187
  * The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
@@ -5240,7 +5241,7 @@ interface LuaControl {
5240
5241
  */
5241
5242
  readonly vehicle?: LuaEntity;
5242
5243
  /**
5243
- * Current walking state.
5244
+ * Current walking state of the player, or the spider-vehicle the character is driving.
5244
5245
  * @example ```
5245
5246
  -- Make the player go north. Note that a one-shot action like this will only make the player walk for one tick.
5246
5247
  game.player.walking_state = {walking = true, direction = defines.direction.north}
@@ -6566,6 +6567,10 @@ interface LuaEntity extends LuaControl {
6566
6567
  * Use {@link force_finish_ascending | runtime:LuaEntity::force_finish_ascending} if you want it to only descend from orbit.
6567
6568
  */
6568
6569
  cargo_pod_destination: CargoDestination;
6570
+ /**
6571
+ * The origin of this cargo pod entity. (Must be a silo, hub or pad)
6572
+ */
6573
+ cargo_pod_origin?: LuaEntity;
6569
6574
  /**
6570
6575
  * The state of this cargo pod entity.
6571
6576
  */
@@ -6820,7 +6825,7 @@ interface LuaEntity extends LuaControl {
6820
6825
  /**
6821
6826
  * The {@link unit_number | runtime:LuaEntity::unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype} that was destroyed to create this ghost. If it was created by other means, or if the inner entity does not support unit numbers, this property is `nil`.
6822
6827
  */
6823
- readonly ghost_unit_number?: uint;
6828
+ readonly ghost_unit_number?: uint64;
6824
6829
  /**
6825
6830
  * Returns a {@link rich text | https://wiki.factorio.com/Rich_text} string containing this entity's position and surface name as a gps tag. {@link Printing | runtime:LuaGameScript::print} it will ping the location of the entity.
6826
6831
  * @example ```
@@ -7404,7 +7409,7 @@ interface LuaEntity extends LuaControl {
7404
7409
  *
7405
7410
  * Only entities inheriting from {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype}, as well as {@link ItemRequestProxyPrototype | prototype:ItemRequestProxyPrototype} and {@link EntityGhostPrototype | prototype:EntityGhostPrototype} are assigned a unit number. Returns `nil` otherwise.
7406
7411
  */
7407
- readonly unit_number?: uint;
7412
+ readonly unit_number?: uint64;
7408
7413
  /**
7409
7414
  * The units associated with this spawner entity.
7410
7415
  */
@@ -12260,7 +12265,7 @@ interface LuaItemCommon {
12260
12265
  /**
12261
12266
  * The unique identifier for this item, if any. Note that this ID stays the same no matter where the item is moved to.
12262
12267
  */
12263
- readonly item_number?: uint;
12268
+ readonly item_number?: uint64;
12264
12269
  /**
12265
12270
  * The current label for this item, if any.
12266
12271
  */
@@ -13899,7 +13904,7 @@ interface LuaPlayer extends LuaControl {
13899
13904
  set_controller(this: void, table: {
13900
13905
  type: defines.controllers;
13901
13906
  character?: LuaEntity;
13902
- waypoints?: CutsceneWaypoint;
13907
+ waypoints?: CutsceneWaypoint[];
13903
13908
  start_position?: MapPosition;
13904
13909
  start_zoom?: double;
13905
13910
  final_transition_time?: uint;
@@ -16854,7 +16859,7 @@ interface LuaSurface {
16854
16859
  * @param table.force The force that would place the entity. Defaults to the `"neutral"` force.
16855
16860
  */
16856
16861
  can_fast_replace(this: void, table: {
16857
- name: string;
16862
+ name: EntityID;
16858
16863
  position: MapPosition;
16859
16864
  direction?: defines.direction;
16860
16865
  force?: ForceID;
@@ -16870,7 +16875,7 @@ interface LuaSurface {
16870
16875
  * @param table.inner_name The prototype name of the entity contained in the ghost. Only used if `name` is `entity-ghost`.
16871
16876
  */
16872
16877
  can_place_entity(this: void, table: {
16873
- name: string;
16878
+ name: EntityID;
16874
16879
  position: MapPosition;
16875
16880
  direction?: defines.direction;
16876
16881
  force?: ForceID;
@@ -17492,7 +17497,7 @@ interface LuaSurface {
17492
17497
  */
17493
17498
  remove_script_position(this: void, id: uint): boolean;
17494
17499
  /**
17495
- * Generates a path with the specified constraints (as an array of {@link PathfinderWaypoints | runtime:PathfinderWaypoint}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use {@link LuaEntity::set_command | runtime:LuaEntity::set_command} instead.
17500
+ * Generates a path with the specified constraints (as an array of {@link PathfinderWaypoints | runtime:PathfinderWaypoint}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use {@link LuaCommandable::set_command | runtime:LuaCommandable::set_command} via {@link LuaEntity::commandable | runtime:LuaEntity::commandable} instead.
17496
17501
  *
17497
17502
  * The resulting path is ultimately returned asynchronously via {@link on_script_path_request_finished | runtime:on_script_path_request_finished}.
17498
17503
  * @param table.bounding_box The dimensions of the object that's supposed to travel the path.
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 2.0.41
5
+ // Factorio version 2.0.43
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -170,6 +170,9 @@ interface AsteroidChunkPrototypeFilter {
170
170
  */
171
171
  invert?: boolean;
172
172
  }
173
+ /**
174
+ * Used by {@link MapSettings | runtime:MapSettings} and {@link MapAndDifficultySettings | runtime:MapAndDifficultySettings}.
175
+ */
173
176
  interface AsteroidMapSettings {
174
177
  spawning_rate: double;
175
178
  max_ray_portals_expanded_per_tick: uint;
@@ -1608,7 +1611,7 @@ type EntityPrototypeFlag = /**
1608
1611
  * Used to automatically detect the proper direction of the entity if possible. Used by the pump, train stop, and train signal by default.
1609
1612
  */
1610
1613
  'filter-directions' | /**
1611
- * When set, entity will be possible to obtain by using {@link LuaGameScript::get_entity_by_unit_number | runtime:LuaGameScript::get_entity_by_unit_number}. It also changes input actions sent by a player to be selecting entity by unit number instead of a position which may help players in latency to select moving entities.
1614
+ * When set, entity will be possible to obtain by using {@link LuaGameScript::get_entity_by_unit_number | runtime:LuaGameScript::get_entity_by_unit_number}.
1612
1615
  */
1613
1616
  'get-by-unit-number' | /**
1614
1617
  * Used to specify that the entity breathes air, and is thus affected by poison.
@@ -2664,7 +2667,7 @@ interface BaseItemPrototypeFilter {
2664
2667
  /**
2665
2668
  * The condition to filter on.
2666
2669
  */
2667
- filter: 'tool' | 'mergeable' | 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'item-with-inventory' | 'selection-tool' | 'item-with-label' | 'has-rocket-launch-products' | 'fuel' | 'place-result' | 'burnt-result' | 'place-as-tile' | 'placed-as-equipment-result' | 'name' | 'type' | 'flag' | 'subgroup' | 'fuel-category' | 'stack-size' | 'fuel-value' | 'fuel-acceleration-multiplier' | 'fuel-top-speed-multiplier' | 'fuel-emissions-multiplier';
2670
+ filter: 'tool' | 'mergeable' | 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'item-with-inventory' | 'selection-tool' | 'item-with-label' | 'has-rocket-launch-products' | 'fuel' | 'place-result' | 'burnt-result' | 'place-as-tile' | 'placed-as-equipment-result' | 'plant-result' | 'spoil-result' | 'name' | 'type' | 'flag' | 'subgroup' | 'fuel-category' | 'stack-size' | 'fuel-value' | 'fuel-acceleration-multiplier' | 'fuel-top-speed-multiplier' | 'fuel-emissions-multiplier';
2668
2671
  /**
2669
2672
  * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
2670
2673
  */
@@ -2674,7 +2677,7 @@ interface BaseItemPrototypeFilter {
2674
2677
  */
2675
2678
  invert?: boolean;
2676
2679
  }
2677
- type ItemPrototypeFilter = BaseItemPrototypeFilter | ItemPrototypeFilterBurntResult | ItemPrototypeFilterFlag | ItemPrototypeFilterFuelAccelerationMultiplier | ItemPrototypeFilterFuelCategory | ItemPrototypeFilterFuelEmissionsMultiplier | ItemPrototypeFilterFuelTopSpeedMultiplier | ItemPrototypeFilterFuelValue | ItemPrototypeFilterName | ItemPrototypeFilterPlaceAsTile | ItemPrototypeFilterPlaceResult | ItemPrototypeFilterPlacedAsEquipmentResult | ItemPrototypeFilterStackSize | ItemPrototypeFilterSubgroup | ItemPrototypeFilterType;
2680
+ type ItemPrototypeFilter = BaseItemPrototypeFilter | ItemPrototypeFilterBurntResult | ItemPrototypeFilterFlag | ItemPrototypeFilterFuelAccelerationMultiplier | ItemPrototypeFilterFuelCategory | ItemPrototypeFilterFuelEmissionsMultiplier | ItemPrototypeFilterFuelTopSpeedMultiplier | ItemPrototypeFilterFuelValue | ItemPrototypeFilterName | ItemPrototypeFilterPlaceAsTile | ItemPrototypeFilterPlaceResult | ItemPrototypeFilterPlacedAsEquipmentResult | ItemPrototypeFilterPlantResult | ItemPrototypeFilterSpoilResult | ItemPrototypeFilterStackSize | ItemPrototypeFilterSubgroup | ItemPrototypeFilterType;
2678
2681
  /**
2679
2682
  *
2680
2683
  * Applies to variant case `burnt-result`
@@ -2832,6 +2835,34 @@ interface ItemPrototypeFilterPlacedAsEquipmentResult extends BaseItemPrototypeFi
2832
2835
  */
2833
2836
  'elem_filters'?: EquipmentPrototypeFilter[];
2834
2837
  }
2838
+ /**
2839
+ *
2840
+ * Applies to variant case `plant-result`
2841
+ */
2842
+ interface ItemPrototypeFilterPlantResult extends BaseItemPrototypeFilter {
2843
+ /**
2844
+ * The condition to filter on.
2845
+ */
2846
+ 'filter': 'plant-result';
2847
+ /**
2848
+ * Filters for the plant result.
2849
+ */
2850
+ 'elem_filters'?: EntityPrototypeFilter[];
2851
+ }
2852
+ /**
2853
+ *
2854
+ * Applies to variant case `spoil-result`
2855
+ */
2856
+ interface ItemPrototypeFilterSpoilResult extends BaseItemPrototypeFilter {
2857
+ /**
2858
+ * The condition to filter on.
2859
+ */
2860
+ 'filter': 'spoil-result';
2861
+ /**
2862
+ * Filters for the spoil result.
2863
+ */
2864
+ 'elem_filters'?: ItemPrototypeFilter[];
2865
+ }
2835
2866
  /**
2836
2867
  * Usage example:
2837
2868
  *
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 2.0.41
5
+ // Factorio version 2.0.43
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.41
5
+ // Factorio version 2.0.43
6
6
  // API version 6
7
7
 
8
8
  declare namespace defines {
package/dist/events.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 2.0.41
5
+ // Factorio version 2.0.43
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.41
5
+ // Factorio version 2.0.43
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.41
5
+ // Factorio version 2.0.43
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -127,7 +127,7 @@ interface AchievementPrototype extends Prototype {
127
127
  steam_stats_name?: string;
128
128
  }
129
129
  interface AchievementPrototypeWithCondition extends AchievementPrototype {
130
- objective_condition: 'game-finished' | 'rocket-launched';
130
+ objective_condition: 'game-finished' | 'rocket-launched' | 'late-research';
131
131
  }
132
132
  /**
133
133
  * Used by {@link discharge defense | https://wiki.factorio.com/Discharge_defense} and {@link personal laser defense | https://wiki.factorio.com/Personal_laser_defense}.
@@ -196,6 +196,10 @@ interface AirbornePollutantPrototype extends Prototype {
196
196
  */
197
197
  affects_water_tint: boolean;
198
198
  chart_color: Color;
199
+ /**
200
+ * If true, trees will occasionally take damage from this pollutant type. When they do, some amount of pollution is removed from the chunk equal to the map's `pollution_restored_per_tree_damage` setting.
201
+ */
202
+ damages_trees?: boolean;
199
203
  icon: Sprite;
200
204
  /**
201
205
  * The translated plural string key to use when displaying this pollution's name with an amount. See {@link Tutorial:Localisation | https://wiki.factorio.com/Tutorial:Localisation}.
@@ -2731,7 +2735,6 @@ interface EditorControllerPrototype {
2731
2735
  fill_built_entity_energy_buffers: boolean;
2732
2736
  generate_neighbor_chunks: boolean;
2733
2737
  gun_inventory_size: ItemStackIndex;
2734
- ignore_surface_conditions: boolean;
2735
2738
  ignore_tile_conditions: boolean;
2736
2739
  instant_blueprint_building: boolean;
2737
2740
  instant_deconstruction: boolean;
@@ -3482,6 +3485,18 @@ interface ExplosionPrototype extends EntityPrototype {
3482
3485
  animations: AnimationVariations;
3483
3486
  beam?: boolean;
3484
3487
  correct_rotation?: boolean;
3488
+ /**
3489
+ * Number of ticks to delay the explosion effects by.
3490
+ */
3491
+ delay?: MapTick;
3492
+ /**
3493
+ * The maximum number of ticks to randomly delay the explosion effects by. In addition to the number of ticks defined by `delay`, the explosion will be delayed by a random number of ticks between 0 and `delay_deviation` (inclusive).
3494
+ */
3495
+ delay_deviation?: MapTick;
3496
+ /**
3497
+ * The effect/trigger that happens when the explosion effect triggers after the initial delay as defined by `delay` and `delay_deviation`.
3498
+ */
3499
+ explosion_effect?: Trigger;
3485
3500
  fade_in_duration?: uint8;
3486
3501
  fade_out_duration?: uint8;
3487
3502
  height?: float;
@@ -4500,6 +4515,12 @@ interface ItemGroup extends Prototype {
4500
4515
  * Possible configuration for all items.
4501
4516
  */
4502
4517
  interface ItemPrototype extends Prototype {
4518
+ /**
4519
+ * Whether the item should be included in the self-recycling recipes automatically generated by the quality mod.
4520
+ *
4521
+ * This property is not read by the game engine itself, but the quality mod's data-updates.lua file. This means it is discarded by the game engine after loading finishes.
4522
+ */
4523
+ auto_recycle?: boolean;
4503
4524
  /**
4504
4525
  * The item that is the result when this item gets burned as fuel.
4505
4526
  */
@@ -4633,7 +4654,7 @@ interface ItemPrototype extends Prototype {
4633
4654
  */
4634
4655
  send_to_orbit_mode?: SendToOrbitMode;
4635
4656
  /**
4636
- * Used by Inserters with spoil priority. Item with higher spoil level is considered more spoiled than item with lower spoil level regardless of progress of spoiling
4657
+ * Used by Inserters with spoil priority. Item with higher spoil level is considered more spoiled than item with lower spoil level regardless of progress of spoiling.
4637
4658
  */
4638
4659
  spoil_level?: uint8;
4639
4660
  spoil_result?: ItemID;
@@ -6611,6 +6632,12 @@ interface RecipePrototype extends Prototype {
6611
6632
  * Whether the products are always shown in the recipe tooltip.
6612
6633
  */
6613
6634
  always_show_products?: boolean;
6635
+ /**
6636
+ * Whether the recipe should be included in the recycling recipes automatically generated by the quality mod.
6637
+ *
6638
+ * This property is not read by the game engine itself, but the quality mod's recycling.lua file. This means it is discarded by the game engine after loading finishes.
6639
+ */
6640
+ auto_recycle?: boolean;
6614
6641
  /**
6615
6642
  * The {@link category | prototype:RecipeCategory} of this recipe. Controls which machines can craft this recipe.
6616
6643
  *
@@ -7091,7 +7118,7 @@ interface RoboportPrototype extends EntityWithOwnerPrototype {
7091
7118
  construction_radius: float;
7092
7119
  default_available_construction_output_signal?: SignalIDConnector;
7093
7120
  default_available_logistic_output_signal?: SignalIDConnector;
7094
- default_roboports_output_signal?: SignalIDConnector;
7121
+ default_roboport_count_output_signal?: SignalIDConnector;
7095
7122
  default_total_construction_output_signal?: SignalIDConnector;
7096
7123
  default_total_logistic_output_signal?: SignalIDConnector;
7097
7124
  door_animation_down?: Animation;
@@ -7679,7 +7706,7 @@ interface ShortcutPrototype extends Prototype {
7679
7706
  /**
7680
7707
  * If this is `"lua"`, {@link on_lua_shortcut | runtime:on_lua_shortcut} is raised when the shortcut is clicked.
7681
7708
  */
7682
- action: 'toggle-alt-mode' | 'undo' | 'copy' | 'cut' | 'paste' | 'import-string' | 'toggle-personal-roboport' | 'toggle-equipment-movement-bonus' | 'spawn-item' | 'lua';
7709
+ action: 'toggle-alt-mode' | 'undo' | 'redo' | 'paste' | 'import-string' | 'toggle-personal-roboport' | 'toggle-personal-logistic-requests' | 'toggle-equipment-movement-bonus' | 'spawn-item' | 'lua';
7683
7710
  /**
7684
7711
  * Name of a custom input or vanilla control. This is **only** used to show the keybind in the tooltip of the shortcut.
7685
7712
  */
@@ -8066,7 +8093,7 @@ interface SpaceLocationPrototype extends Prototype {
8066
8093
  /**
8067
8094
  * A value which modifies platform speed; is subtracted when traveling from this location and added when traveling to this location.
8068
8095
  */
8069
- gravity_pull: double;
8096
+ gravity_pull?: double;
8070
8097
  /**
8071
8098
  * Path to the icon file.
8072
8099
  *
@@ -8803,6 +8830,10 @@ interface TechnologyPrototype extends Prototype {
8803
8830
  * Mandatory if `unit` is not defined.
8804
8831
  */
8805
8832
  research_trigger?: TechnologyTrigger;
8833
+ /**
8834
+ * Can be used to enable or disable showing levels info in technology slot.
8835
+ */
8836
+ show_levels_info?: boolean;
8806
8837
  /**
8807
8838
  * Determines the cost in items and time of the technology.
8808
8839
  *
@@ -9720,6 +9751,9 @@ interface UtilityConstants extends PrototypeBase {
9720
9751
  equipment_default_background_color: Color;
9721
9752
  equipment_default_grabbed_background_color: Color;
9722
9753
  explosions_in_simulation_volume_modifier: float;
9754
+ factoriopedia_recycling_recipe_categories: RecipeCategoryID[];
9755
+ feedback_screenshot_file_name: string;
9756
+ feedback_screenshot_subfolder_name: string;
9723
9757
  filter_outline_color: Color;
9724
9758
  /**
9725
9759
  * Must be >= 1.
@@ -9735,7 +9769,7 @@ interface UtilityConstants extends PrototypeBase {
9735
9769
  gui_remark_color: Color;
9736
9770
  gui_search_match_background_color: Color;
9737
9771
  gui_search_match_foreground_color: Color;
9738
- huge_animation_sound_area: float;
9772
+ huge_platform_animation_sound_area: float;
9739
9773
  icon_shadow_color: Color;
9740
9774
  icon_shadow_inset: float;
9741
9775
  icon_shadow_radius: float;
@@ -9843,7 +9877,7 @@ interface UtilityConstants extends PrototypeBase {
9843
9877
  /**
9844
9878
  * Variables: speed, thrust, weight, width, height
9845
9879
  */
9846
- space_platform_default_speed_formula: MathExpression;
9880
+ space_platform_acceleration_expression: MathExpression;
9847
9881
  /**
9848
9882
  * Determines how fast space platforms will send items in trash slots to the surface. Each item type has its own cooldown.
9849
9883
  */
@@ -9852,6 +9886,10 @@ interface UtilityConstants extends PrototypeBase {
9852
9886
  space_platform_relative_speed_factor: double;
9853
9887
  space_platform_starfield_movement_vector: Vector;
9854
9888
  spawner_evolution_factor_health_modifier: float;
9889
+ starmap_orbit_clicked_color: Color;
9890
+ starmap_orbit_default_color: Color;
9891
+ starmap_orbit_disabled_color: Color;
9892
+ starmap_orbit_hovered_color: Color;
9855
9893
  /**
9856
9894
  * The number of ticks to show a segmented unit's health bar after fully regenerating.
9857
9895
  */
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.41
5
+ // Factorio version 2.0.43
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -175,7 +175,7 @@ interface AgriculturalCraneSpeedGrappler {
175
175
  "pollution"
176
176
  ```
177
177
  * @example ```
178
- "pollen"
178
+ "spores"
179
179
  ```
180
180
  */
181
181
  type AirbornePollutantID = string;
@@ -2487,7 +2487,7 @@ interface ChartUtilityConstants {
2487
2487
  elevated_rail_color: Color;
2488
2488
  enabled_switch_color: Color;
2489
2489
  entity_ghost_color: Color;
2490
- explosion_visualization_duration: uint32;
2490
+ explosion_visualization_duration: MapTick;
2491
2491
  green_signal_color: Color;
2492
2492
  green_wire_color: Color;
2493
2493
  rail_color: Color;
@@ -3195,7 +3195,7 @@ interface CranePartDyingEffect {
3195
3195
  explosion?: ExplosionDefinition;
3196
3196
  explosion_linear_distance_step?: float;
3197
3197
  particle_effect_linear_distance_step?: float;
3198
- particle_effects?: CreateParticleTriggerEffectItem[];
3198
+ particle_effects?: CreateParticleTriggerEffectItem | CreateParticleTriggerEffectItem[];
3199
3199
  }
3200
3200
  interface CraterPlacementDefinition {
3201
3201
  minimum_segments_to_place?: uint32;
@@ -3352,7 +3352,7 @@ interface CreateTrivialSmokeEffectItem extends TriggerEffectItem {
3352
3352
  max_radius?: float;
3353
3353
  offset_deviation?: BoundingBox;
3354
3354
  offsets?: Vector[];
3355
- only_when_visible?: float;
3355
+ only_when_visible?: boolean;
3356
3356
  smoke_name: TrivialSmokeID;
3357
3357
  speed?: Vector;
3358
3358
  speed_from_center?: float;
@@ -3372,8 +3372,8 @@ interface CursorBoxSpecification {
3372
3372
  not_allowed: BoxSpecification[];
3373
3373
  pair: BoxSpecification[];
3374
3374
  regular: BoxSpecification[];
3375
- rts_selected: BoxSpecification[];
3376
- rts_to_be_selected: BoxSpecification[];
3375
+ spidertron_remote_selected: BoxSpecification[];
3376
+ spidertron_remote_to_be_selected: BoxSpecification[];
3377
3377
  train_visualization: BoxSpecification[];
3378
3378
  }
3379
3379
  /**
@@ -3424,6 +3424,20 @@ interface CyclicSound {
3424
3424
  */
3425
3425
  middle_sound?: Sound;
3426
3426
  }
3427
+ interface DamageEntityTriggerEffectItem extends TriggerEffectItem {
3428
+ apply_damage_to_trees?: boolean;
3429
+ damage: DamageParameters;
3430
+ lower_damage_modifier?: float;
3431
+ lower_distance_threshold?: uint16;
3432
+ type: 'damage';
3433
+ upper_damage_modifier?: float;
3434
+ upper_distance_threshold?: uint16;
3435
+ use_substitute?: boolean;
3436
+ /**
3437
+ * If `true`, no corpse for killed entities will be created.
3438
+ */
3439
+ vaporize?: boolean;
3440
+ }
3427
3441
  /**
3428
3442
  * Used to specify what type of damage and how much damage something deals.
3429
3443
  */
@@ -3437,21 +3451,7 @@ interface DamageParameters {
3437
3451
  interface DamageTileTriggerEffectItem extends TriggerEffectItem {
3438
3452
  damage: DamageParameters;
3439
3453
  radius?: float;
3440
- type: 'damage';
3441
- }
3442
- interface DamageTriggerEffectItem extends TriggerEffectItem {
3443
- apply_damage_to_trees?: boolean;
3444
- damage: DamageParameters;
3445
- lower_damage_modifier?: float;
3446
- lower_distance_threshold?: uint16;
3447
- type: 'damage';
3448
- upper_damage_modifier?: float;
3449
- upper_distance_threshold?: uint16;
3450
- use_substitute?: boolean;
3451
- /**
3452
- * If `true`, no corpse for killed entities will be created.
3453
- */
3454
- vaporize?: boolean;
3454
+ type: 'damage-tile';
3455
3455
  }
3456
3456
  /**
3457
3457
  * @example ```
@@ -4287,7 +4287,7 @@ type EntityPrototypeFlags = (/**
4287
4287
  * Used to automatically detect the proper direction, if possible. Used by base with the pump, train stop, and train signal.
4288
4288
  */
4289
4289
  'filter-directions' | /**
4290
- * When set, entity will be possible to obtain by using {@link LuaGameScript::get_entity_by_unit_number | runtime:LuaGameScript::get_entity_by_unit_number}. It also changes input actions sent by a player to be selecting entity by unit number instead of a position which may help players in latency to select moving entities.
4290
+ * When set, entity will be possible to obtain by using {@link LuaGameScript::get_entity_by_unit_number | runtime:LuaGameScript::get_entity_by_unit_number}.
4291
4291
  */
4292
4292
  'get-by-unit-number' | /**
4293
4293
  * This is used to specify that the entity breathes air, and so is affected by poison (currently {@link poison capsules | https://wiki.factorio.com/Poison_capsule} are the only source).
@@ -4582,6 +4582,10 @@ interface FluidBox {
4582
4582
  * Must be greater than 0.
4583
4583
  */
4584
4584
  volume: FluidAmount;
4585
+ /**
4586
+ * A fraction of the volume that will be "reserved" and cannot be removed by flow operations. This does nothing if the fluidbox is part of a fluid segment.
4587
+ */
4588
+ volume_reservation_fraction?: float;
4585
4589
  }
4586
4590
  type FluidBoxLinkedConnectionID = uint32;
4587
4591
  interface FluidBoxSecondaryDrawOrders {
@@ -5951,19 +5955,26 @@ interface MainSound {
5951
5955
  * Can't be used when `match_progress_to_activity` is `true`.
5952
5956
  */
5953
5957
  fade_out_ticks?: uint32;
5954
- match_progress_to_activity?: boolean;
5955
- match_speed_to_activity?: boolean;
5956
- match_volume_to_activity?: boolean;
5958
+ /**
5959
+ * Unused when {@link WorkingSound::persistent | prototype:WorkingSound::persistent} is `true`.
5960
+ */
5961
+ match_progress_to_activity?: bool;
5962
+ match_speed_to_activity?: bool;
5963
+ match_volume_to_activity?: bool;
5957
5964
  /**
5958
5965
  * Array of {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}s, individual names cannot be empty.
5959
5966
  *
5960
5967
  * The `sound` is played when at least one of the specified working visualisations is drawn.
5968
+ *
5969
+ * Unused when {@link WorkingSound::persistent | prototype:WorkingSound::persistent} is `true`.
5961
5970
  */
5962
5971
  play_for_working_visualisations?: string[];
5963
5972
  /**
5964
5973
  * Modifies how often the sound is played.
5965
5974
  *
5966
5975
  * Silently clamped to the [0.0, 1.0] range.
5976
+ *
5977
+ * Unused when {@link WorkingSound::persistent | prototype:WorkingSound::persistent} is `true`.
5967
5978
  * @example ```
5968
5979
  probability = 1 / (3 * 60) -- average pause between the sound is 3 seconds
5969
5980
  ```
@@ -6196,7 +6207,7 @@ interface MapLocation {
6196
6207
  /**
6197
6208
  * Direction this connection point will be facing to.
6198
6209
  */
6199
- direction: MapPosition;
6210
+ direction: Direction;
6200
6211
  /**
6201
6212
  * Position relative to entity's position where the connection point will be located at.
6202
6213
  */
@@ -7685,7 +7696,7 @@ interface ProcessionSet {
7685
7696
  * A wrapper for a collection of {@link ProcessionLayers | prototype:ProcessionLayer}.
7686
7697
  */
7687
7698
  interface ProcessionTimeline {
7688
- audio_events: ProcessionAudioEvent[];
7699
+ audio_events?: ProcessionAudioEvent[];
7689
7700
  /**
7690
7701
  * During procession, the pod will at some point start being drawn above the rest of the game:
7691
7702
  *
@@ -8033,7 +8044,7 @@ interface RailPictureSet {
8033
8044
  *
8034
8045
  * Only loaded if `front_rail_endings` or `back_rail_endings` are not defined.
8035
8046
  */
8036
- rail_endings: Sprite16Way;
8047
+ rail_endings?: Sprite16Way;
8037
8048
  render_layers: RailRenderLayers;
8038
8049
  secondary_render_layers?: RailRenderLayers;
8039
8050
  /**
@@ -11590,7 +11601,7 @@ interface TriggerDeliveryItem {
11590
11601
  type TriggerEffect = (/**
11591
11602
  * Loaded when the `type` is `"damage"`.
11592
11603
  */
11593
- DamageTriggerEffectItem | /**
11604
+ DamageEntityTriggerEffectItem | /**
11594
11605
  * Loaded when the `type` is `"damage-tile"`.
11595
11606
  */
11596
11607
  DamageTileTriggerEffectItem | /**
@@ -11659,7 +11670,7 @@ CameraEffectTriggerEffectItem | /**
11659
11670
  ActivateImpactTriggerEffectItem) | (/**
11660
11671
  * Loaded when the `type` is `"damage"`.
11661
11672
  */
11662
- DamageTriggerEffectItem | /**
11673
+ DamageEntityTriggerEffectItem | /**
11663
11674
  * Loaded when the `type` is `"damage-tile"`.
11664
11675
  */
11665
11676
  DamageTileTriggerEffectItem | /**
@@ -12591,18 +12602,26 @@ working_sound =
12591
12602
  type WorkingSound = {
12592
12603
  /**
12593
12604
  * Might not work with all entities that use working_sound.
12605
+ *
12606
+ * Unused when `persistent` is `true`.
12594
12607
  */
12595
12608
  activate_sound?: Sound;
12596
12609
  /**
12597
12610
  * Might not work with all entities that use working_sound.
12611
+ *
12612
+ * Unused when `persistent` is `true`.
12598
12613
  */
12599
12614
  deactivate_sound?: Sound;
12600
12615
  /**
12601
- * If `true`, `max_sounds_per_prototype` is ignored. 'extra sound' refers to `idle_sound`, `activate_sound` or `deactivate_sound`.
12616
+ * If `true`, entities playing their extra sound don't count towards `max_sounds_per_prototype` limit. 'extra sound' refers to `idle_sound`, `activate_sound` or `deactivate_sound`.
12617
+ *
12618
+ * Unused when `persistent` is `true`.
12602
12619
  */
12603
- extra_sounds_ignore_limit?: boolean;
12620
+ extra_sounds_ignore_limit?: bool;
12604
12621
  /**
12605
12622
  * The sound to be played when the entity is idle. Might not work with all entities that use working_sound.
12623
+ *
12624
+ * Unused when `persistent` is `true`.
12606
12625
  */
12607
12626
  idle_sound?: Sound;
12608
12627
  /**
@@ -12615,14 +12634,19 @@ type WorkingSound = {
12615
12634
  * Inactive entities without an `idle_sound` don't count towards this limit.
12616
12635
  *
12617
12636
  * Entities with their working sound fading out don't count towards this limit.
12637
+ *
12638
+ * Unused when `persistent` is `true`.
12618
12639
  */
12619
12640
  max_sounds_per_prototype?: uint8;
12620
12641
  /**
12621
- * When `true`, working sounds for all entities of the same prototype are combined into one and some (most) properties of this are ignored or unused.
12642
+ * When `true`, working sounds for all entities of the same prototype are combined into one.
12643
+ */
12644
+ persistent?: bool;
12645
+ /**
12646
+ * Unused when `persistent` is `true`.
12622
12647
  */
12623
- persistent?: boolean;
12624
12648
  sound_accents?: SoundAccent | SoundAccent[];
12625
- use_doppler_shift?: boolean;
12649
+ use_doppler_shift?: bool;
12626
12650
  } | Sound;
12627
12651
  /**
12628
12652
  * Used by crafting machines to display different graphics when the machine is running.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.28",
3
+ "version": "1.2.30",
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.41",
26
+ "factorioVersion": "2.0.43",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },