factorio-types 1.2.64 → 1.2.65

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.1.12
5
+ // Factorio version 2.1.14
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -2746,6 +2746,24 @@ interface LuaBootstrap {
2746
2746
  script.on_event(defines.events.on_built_entity,
2747
2747
  function(event) game.print("Gotta go fast!") end,
2748
2748
  {{filter = "name", name = "fast-inserter"}})
2749
+ ```
2750
+ */
2751
+ on_event(this: void, event: defines.events.on_player_super_forced_selected_area, handler: ((this: void, arg0: runtime.on_player_super_forced_selected_area) => any) | nil, filters?: EventFilter): void;
2752
+ /**
2753
+ * 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.
2754
+ * @param event The event(s) or custom-input to invoke the handler on.
2755
+ * @param handler The handler for this event. Passing `nil` will unregister it.
2756
+ * @param filters The filters for this event. Can only be used when registering for individual events.
2757
+ * @example ```
2758
+ -- Register for the on_tick event to print the current tick to console each tick
2759
+ script.on_event(defines.events.on_tick,
2760
+ function(event) game.print(event.tick) end)
2761
+ ```
2762
+ * @example ```
2763
+ -- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
2764
+ script.on_event(defines.events.on_built_entity,
2765
+ function(event) game.print("Gotta go fast!") end,
2766
+ {{filter = "name", name = "fast-inserter"}})
2749
2767
  ```
2750
2768
  */
2751
2769
  on_event(this: void, event: defines.events.on_player_toggled_alt_mode, handler: ((this: void, arg0: runtime.on_player_toggled_alt_mode) => any) | nil, filters?: EventFilter): void;
@@ -4785,6 +4803,7 @@ interface LuaBurner {
4785
4803
  */
4786
4804
  interface LuaBurnerPrototype {
4787
4805
  readonly auto_refuel: boolean;
4806
+ readonly burner_usage: LuaBurnerUsagePrototype;
4788
4807
  readonly burnt_inventory_size: uint32;
4789
4808
  readonly effectivity: double;
4790
4809
  /**
@@ -4796,6 +4815,7 @@ interface LuaBurnerPrototype {
4796
4815
  */
4797
4816
  readonly fuel_categories: Record<string, true>;
4798
4817
  readonly fuel_inventory_size: uint32;
4818
+ readonly hide_from_stats: boolean;
4799
4819
  readonly initial_fuel?: LuaItemPrototype;
4800
4820
  readonly initial_fuel_percent: double;
4801
4821
  /**
@@ -5988,6 +6008,11 @@ interface LuaDamagePrototype extends LuaPrototypeBase {
5988
6008
  * This class also provides debug session APIs, as the global object `debugadapter` in all stages.
5989
6009
  */
5990
6010
  interface LuaDebugAdapter {
6011
+ /**
6012
+ * Pause execution as if a breakpoint was hit.
6013
+ * @param mesg If specified, this value is displayed as if it was thrown as an error.
6014
+ */
6015
+ breakpoint(this: void, mesg?: Any): void;
5991
6016
  /**
5992
6017
  * Prepare a default debug view entry for a field, to assist in preparing custom listings.
5993
6018
  * @param name The name of the field
@@ -5995,14 +6020,19 @@ interface LuaDebugAdapter {
5995
6020
  */
5996
6021
  describe_field(this: void, name: string, value: Any): DebugVariable;
5997
6022
  /**
5998
- * Start recording profiler timings. If there is a previous recording session running, it will be stopped first.
6023
+ * Print values to the debug console. This function also replaces the Lua builtin `print` during debug sessions.
6024
+ * @param args Values to print
6025
+ */
6026
+ print(this: void, ...args: Any[]): void;
6027
+ /**
6028
+ * Start recording profiler timings. If there is a previous recording session running, it will be stopped first. This function is also available to the DAP client as the request `startProfile`, with the parameter in `argument`. A DAP event `profileRunning` will be emitted regardless of how it was called.
5999
6029
  * @param table.show_hook_events Include events to indicate time spent in hooks
6000
6030
  */
6001
6031
  start_profile(this: void, table: {
6002
6032
  show_hook_events?: boolean;
6003
6033
  }): void;
6004
6034
  /**
6005
- * Stop recording profiler timings and save to script_output.
6035
+ * Stop recording profiler timings and save to script_output. This function is also available to the DAP client as the request `stopProfile`. A DAP event `profileComplete` will be emitted with the path to the saved file, regardless of stop was called.
6006
6036
  */
6007
6037
  stop_profile(this: void): void;
6008
6038
  /**
@@ -8041,6 +8071,10 @@ interface LuaEntity extends LuaControl {
8041
8071
  * Whether this loader gets items from or puts item into a container.
8042
8072
  */
8043
8073
  loader_type: BeltConnectionType;
8074
+ /**
8075
+ * Additional effect applied to this entity with effect receiver. `nil` if this entity has no effect receiver.
8076
+ */
8077
+ local_effect?: Effect;
8044
8078
  readonly localised_description: LocalisedString;
8045
8079
  /**
8046
8080
  * Localised name of the entity.
@@ -8804,6 +8838,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8804
8838
  * The allowed module categories for this entity, if any.
8805
8839
  */
8806
8840
  readonly allowed_module_categories?: Record<string, true>;
8841
+ /**
8842
+ * When this entity is part of blueprint, will it allow flipping of the blueprint?
8843
+ */
8844
+ readonly allows_flipping: boolean;
8807
8845
  /**
8808
8846
  * Whether the lamp is always on (except when out of power or turned off by the circuit network).
8809
8847
  */
@@ -10739,6 +10777,7 @@ interface LuaFluidEnergySourcePrototype {
10739
10777
  */
10740
10778
  readonly fluid_box: LuaFluidBoxPrototype;
10741
10779
  readonly fluid_usage_per_tick: double;
10780
+ readonly hide_from_stats: boolean;
10742
10781
  readonly maximum_temperature: double;
10743
10782
  /**
10744
10783
  * 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.
@@ -11046,6 +11085,12 @@ interface LuaForce {
11046
11085
  * Gets the unlockable script state for the given ID.
11047
11086
  */
11048
11087
  get_script_visible(this: void, unlockable: UnlockableID): boolean | null;
11088
+ /**
11089
+ * Gets the built space platforms at the given space location for this force.
11090
+ *
11091
+ * Note, this does not include platforms that have not yet been built.
11092
+ */
11093
+ get_space_platforms(this: void, location: SpaceLocationID): LuaSpacePlatform[];
11049
11094
  get_spawn_position(this: void, surface: SurfaceIdentification): MapPosition;
11050
11095
  get_surface_hidden(this: void, surface: SurfaceIdentification): boolean;
11051
11096
  /**
@@ -16933,6 +16978,13 @@ interface LuaPumpControlBehavior extends LuaGenericOnOffControlBehavior {
16933
16978
  * Prototype of a quality.
16934
16979
  */
16935
16980
  interface LuaQualityPrototype extends LuaPrototypeBase {
16981
+ /**
16982
+ * Computes probabilities of rolling various qualities given a quality effect
16983
+ * @param quality_effect Strength of quality effect. Larger value makes it easier to roll better qualities.
16984
+ * @param force Force to select unlocked qualities. If not provided, all qualities are considered unlocked.
16985
+ * @returns Roll chances per quality. Only positive values are listed. All values should sum to 1.
16986
+ */
16987
+ get_roll_chances(this: void, quality_effect: EffectValue, force?: ForceID): Record<string, double>;
16936
16988
  /**
16937
16989
  * Performs quality roll
16938
16990
  * @param quality_effect Strength of quality effect. Larger value makes it easier to roll better qualities.
@@ -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.1.12
5
+ // Factorio version 2.1.14
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -2528,6 +2528,10 @@ interface EffectReceiver {
2528
2528
  * Controls whether {@link LuaSurface::global_effect | runtime:LuaSurface::global_effect} affects this receiver.
2529
2529
  */
2530
2530
  uses_surface_effects: boolean;
2531
+ /**
2532
+ * Controls whether {@link LuaEntity::local_effect | runtime:LuaEntity::local_effect} affects this receiver.
2533
+ */
2534
+ uses_local_effects: boolean;
2531
2535
  consumption_limits: EffectValueRange;
2532
2536
  speed_limits: EffectValueRange;
2533
2537
  productivity_limits: EffectValueRange;
@@ -2683,6 +2687,10 @@ interface EnemyExpansionMapSettings {
2683
2687
  * The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `60*3 600=216 000` ticks.
2684
2688
  */
2685
2689
  max_expansion_cooldown: uint32;
2690
+ /**
2691
+ * Cooldown in ticks for dispatching units when building bases. Defaults to `60*30=1 800` ticks.
2692
+ */
2693
+ build_base_unit_dispatch_cooldown: uint32;
2686
2694
  }
2687
2695
  interface EnemySpawnerAbsorption {
2688
2696
  absolute: double;
@@ -4447,7 +4455,7 @@ type ItemPrototypeFlag = /**
4447
4455
  'spawnable' | 'spoil-result' | /**
4448
4456
  * Controls whether the spoil time ignores the spoil time modifier in the {@link DifficultySettings | runtime:DifficultySettings}.
4449
4457
  */
4450
- 'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world';
4458
+ 'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world' | 'no-item-on-ground-merging';
4451
4459
  /**
4452
4460
  * A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
4453
4461
  *
@@ -11756,6 +11764,10 @@ interface UndoRedoActionRemovedEntity extends BaseUndoRedoAction {
11756
11764
  * The type of action that was undone or redone.
11757
11765
  */
11758
11766
  'type': 'removed-entity';
11767
+ /**
11768
+ * The equipment for the equipment grid if any.
11769
+ */
11770
+ 'grid'?: UndoRedoEquipment[];
11759
11771
  /**
11760
11772
  * The items that the entity will request when revived, if there are any. It's a mapping of prototype names to amounts. Not present for entities the game can't restore, like trees or rocks.
11761
11773
  */
@@ -11890,6 +11902,11 @@ interface UndoRedoActionWireRemoved extends BaseUndoRedoAction {
11890
11902
  'a': BlueprintWireEnd;
11891
11903
  'b': BlueprintWireEnd;
11892
11904
  }
11905
+ interface UndoRedoEquipment {
11906
+ id: EquipmentWithQualityID;
11907
+ position: EquipmentPosition;
11908
+ settings: PropertyTree;
11909
+ }
11893
11910
  interface UnitAISettings {
11894
11911
  /**
11895
11912
  * If enabled, units that repeatedly fail to succeed at commands will be destroyed.
@@ -12221,6 +12238,13 @@ interface UtilityConstants {
12221
12238
  low_energy_robot_estimate_multiplier: double;
12222
12239
  asteroid_spawning_offset: SimpleBoundingBox;
12223
12240
  asteroid_fading_range: float;
12241
+ /**
12242
+ * Asteroid damage will be multiplied by this value when space platform speed is zero and will linearly increase until asteroid_spawning_with_random_orientation_max_speed is reached.
12243
+ */
12244
+ asteroid_min_damage_modifier: float;
12245
+ /**
12246
+ * In km per tick.
12247
+ */
12224
12248
  asteroid_spawning_with_random_orientation_max_speed: double;
12225
12249
  asteroid_position_offset_to_speed_coefficient: double;
12226
12250
  asteroid_collector_navmesh_refresh_tick_interval: uint32;
@@ -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.1.12
5
+ // Factorio version 2.1.14
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.1.12
5
+ // Factorio version 2.1.14
6
6
  // API version 6
7
7
 
8
8
  declare namespace defines {
@@ -11,20 +11,21 @@ enum alert_type {
11
11
  custom = 1,
12
12
  entity_destroyed = 2,
13
13
  entity_under_attack = 3,
14
- fluid_mixing = 4,
15
- no_material_for_construction = 5,
16
- no_platform_storage = 6,
17
- no_roboport_storage = 7,
18
- no_storage = 8,
19
- not_enough_construction_robots = 9,
20
- not_enough_repair_packs = 10,
21
- pipeline_overextended = 11,
22
- platform_tile_building_blocked = 12,
23
- train_no_path = 13,
24
- train_out_of_fuel = 14,
25
- turret_fire = 15,
26
- turret_out_of_ammo = 16,
27
- unclaimed_cargo = 17
14
+ expansion_base_built = 4,
15
+ fluid_mixing = 5,
16
+ no_material_for_construction = 6,
17
+ no_platform_storage = 7,
18
+ no_roboport_storage = 8,
19
+ no_storage = 9,
20
+ not_enough_construction_robots = 10,
21
+ not_enough_repair_packs = 11,
22
+ pipeline_overextended = 12,
23
+ platform_tile_building_blocked = 13,
24
+ train_no_path = 14,
25
+ train_out_of_fuel = 15,
26
+ turret_fire = 16,
27
+ turret_out_of_ammo = 17,
28
+ unclaimed_cargo = 18
28
29
  }
29
30
  /**
30
31
  * AI command exit status, see {@link LuaCommandable::set_command | runtime:LuaCommandable::set_command}
@@ -866,100 +867,101 @@ enum events {
866
867
  on_player_selected_area = 125,
867
868
  on_player_set_quick_bar_slot = 126,
868
869
  on_player_setup_blueprint = 127,
869
- on_player_toggled_alt_mode = 128,
870
- on_player_toggled_map_editor = 129,
871
- on_player_trash_inventory_changed = 130,
872
- on_player_unbanned = 131,
873
- on_player_unmuted = 132,
874
- on_player_used_capsule = 133,
875
- on_player_used_spidertron_remote = 134,
876
- on_post_entity_died = 135,
877
- on_post_segmented_unit_died = 136,
878
- on_pre_build = 137,
879
- on_pre_chunk_deleted = 138,
880
- on_pre_entity_settings_pasted = 139,
881
- on_pre_ghost_deconstructed = 140,
882
- on_pre_ghost_upgraded = 141,
883
- on_pre_permission_group_deleted = 142,
884
- on_pre_permission_string_imported = 143,
885
- on_pre_player_crafted_item = 144,
886
- on_pre_player_died = 145,
887
- on_pre_player_left_game = 146,
888
- on_pre_player_mined_item = 147,
889
- on_pre_player_removed = 148,
890
- on_pre_player_toggled_map_editor = 149,
891
- on_pre_robot_exploded_cliff = 150,
892
- on_pre_scenario_finished = 151,
893
- on_pre_script_inventory_resized = 152,
894
- on_pre_surface_cleared = 153,
895
- on_pre_surface_deleted = 154,
896
- on_redo_applied = 155,
897
- on_research_cancelled = 156,
898
- on_research_finished = 157,
899
- on_research_moved = 158,
900
- on_research_queued = 159,
901
- on_research_reversed = 160,
902
- on_research_started = 161,
903
- on_resource_depleted = 162,
904
- on_robot_built_entity = 163,
905
- on_robot_built_tile = 164,
906
- on_robot_exploded_cliff = 165,
907
- on_robot_mined = 166,
908
- on_robot_mined_entity = 167,
909
- on_robot_mined_tile = 168,
910
- on_robot_pre_mined = 169,
911
- on_rocket_launch_ordered = 170,
912
- on_rocket_launched = 171,
913
- on_runtime_mod_setting_changed = 172,
914
- on_script_inventory_resized = 173,
915
- on_script_path_request_finished = 174,
916
- on_script_trigger_effect = 175,
917
- on_sector_scanned = 176,
918
- on_segment_entity_created = 177,
919
- on_segmented_unit_created = 178,
920
- on_segmented_unit_damaged = 179,
921
- on_segmented_unit_died = 180,
922
- on_selected_entity_changed = 181,
923
- on_singleplayer_init = 182,
924
- on_space_platform_built_entity = 183,
925
- on_space_platform_built_tile = 184,
926
- on_space_platform_changed_state = 185,
927
- on_space_platform_mined_entity = 186,
928
- on_space_platform_mined_item = 187,
929
- on_space_platform_mined_tile = 188,
930
- on_space_platform_pre_mined = 189,
931
- on_spider_command_completed = 190,
932
- on_string_translated = 191,
933
- on_surface_cleared = 192,
934
- on_surface_created = 193,
935
- on_surface_deleted = 194,
936
- on_surface_imported = 195,
937
- on_surface_renamed = 196,
938
- on_technology_effects_reset = 197,
939
- on_territory_created = 198,
940
- on_territory_destroyed = 199,
941
- on_tick = 200,
942
- on_tower_mined_plant = 201,
943
- on_tower_planted_seed = 202,
944
- on_tower_pre_mined_plant = 203,
945
- on_train_changed_state = 204,
946
- on_train_created = 205,
947
- on_train_schedule_changed = 206,
948
- on_trigger_created_entity = 207,
949
- on_trigger_fired_artillery = 208,
950
- on_udp_packet_received = 209,
951
- on_undo_applied = 210,
952
- on_unit_added_to_group = 211,
953
- on_unit_group_created = 212,
954
- on_unit_group_finished_gathering = 213,
955
- on_unit_removed_from_group = 214,
956
- on_worker_robot_expired = 215,
957
- script_raised_built = 216,
958
- script_raised_destroy = 217,
959
- script_raised_destroy_segmented_unit = 218,
960
- script_raised_revive = 219,
961
- script_raised_set_tiles = 220,
962
- script_raised_teleported = 221
870
+ on_player_super_forced_selected_area = 128,
871
+ on_player_toggled_alt_mode = 129,
872
+ on_player_toggled_map_editor = 130,
873
+ on_player_trash_inventory_changed = 131,
874
+ on_player_unbanned = 132,
875
+ on_player_unmuted = 133,
876
+ on_player_used_capsule = 134,
877
+ on_player_used_spidertron_remote = 135,
878
+ on_post_entity_died = 136,
879
+ on_post_segmented_unit_died = 137,
880
+ on_pre_build = 138,
881
+ on_pre_chunk_deleted = 139,
882
+ on_pre_entity_settings_pasted = 140,
883
+ on_pre_ghost_deconstructed = 141,
884
+ on_pre_ghost_upgraded = 142,
885
+ on_pre_permission_group_deleted = 143,
886
+ on_pre_permission_string_imported = 144,
887
+ on_pre_player_crafted_item = 145,
888
+ on_pre_player_died = 146,
889
+ on_pre_player_left_game = 147,
890
+ on_pre_player_mined_item = 148,
891
+ on_pre_player_removed = 149,
892
+ on_pre_player_toggled_map_editor = 150,
893
+ on_pre_robot_exploded_cliff = 151,
894
+ on_pre_scenario_finished = 152,
895
+ on_pre_script_inventory_resized = 153,
896
+ on_pre_surface_cleared = 154,
897
+ on_pre_surface_deleted = 155,
898
+ on_redo_applied = 156,
899
+ on_research_cancelled = 157,
900
+ on_research_finished = 158,
901
+ on_research_moved = 159,
902
+ on_research_queued = 160,
903
+ on_research_reversed = 161,
904
+ on_research_started = 162,
905
+ on_resource_depleted = 163,
906
+ on_robot_built_entity = 164,
907
+ on_robot_built_tile = 165,
908
+ on_robot_exploded_cliff = 166,
909
+ on_robot_mined = 167,
910
+ on_robot_mined_entity = 168,
911
+ on_robot_mined_tile = 169,
912
+ on_robot_pre_mined = 170,
913
+ on_rocket_launch_ordered = 171,
914
+ on_rocket_launched = 172,
915
+ on_runtime_mod_setting_changed = 173,
916
+ on_script_inventory_resized = 174,
917
+ on_script_path_request_finished = 175,
918
+ on_script_trigger_effect = 176,
919
+ on_sector_scanned = 177,
920
+ on_segment_entity_created = 178,
921
+ on_segmented_unit_created = 179,
922
+ on_segmented_unit_damaged = 180,
923
+ on_segmented_unit_died = 181,
924
+ on_selected_entity_changed = 182,
925
+ on_singleplayer_init = 183,
926
+ on_space_platform_built_entity = 184,
927
+ on_space_platform_built_tile = 185,
928
+ on_space_platform_changed_state = 186,
929
+ on_space_platform_mined_entity = 187,
930
+ on_space_platform_mined_item = 188,
931
+ on_space_platform_mined_tile = 189,
932
+ on_space_platform_pre_mined = 190,
933
+ on_spider_command_completed = 191,
934
+ on_string_translated = 192,
935
+ on_surface_cleared = 193,
936
+ on_surface_created = 194,
937
+ on_surface_deleted = 195,
938
+ on_surface_imported = 196,
939
+ on_surface_renamed = 197,
940
+ on_technology_effects_reset = 198,
941
+ on_territory_created = 199,
942
+ on_territory_destroyed = 200,
943
+ on_tick = 201,
944
+ on_tower_mined_plant = 202,
945
+ on_tower_planted_seed = 203,
946
+ on_tower_pre_mined_plant = 204,
947
+ on_train_changed_state = 205,
948
+ on_train_created = 206,
949
+ on_train_schedule_changed = 207,
950
+ on_trigger_created_entity = 208,
951
+ on_trigger_fired_artillery = 209,
952
+ on_udp_packet_received = 210,
953
+ on_undo_applied = 211,
954
+ on_unit_added_to_group = 212,
955
+ on_unit_group_created = 213,
956
+ on_unit_group_finished_gathering = 214,
957
+ on_unit_removed_from_group = 215,
958
+ on_worker_robot_expired = 216,
959
+ script_raised_built = 217,
960
+ script_raised_destroy = 218,
961
+ script_raised_destroy_segmented_unit = 219,
962
+ script_raised_revive = 220,
963
+ script_raised_set_tiles = 221,
964
+ script_raised_teleported = 222
963
965
  }
964
966
  enum flow_precision_index {
965
967
  fifty_hours = 5,
@@ -1276,43 +1278,44 @@ enum input_action {
1276
1278
  start_research = 255,
1277
1279
  start_walking = 256,
1278
1280
  stop_drag_build = 257,
1279
- swap_asteroid_chunk_slots = 258,
1280
- swap_entity_filter_slots = 259,
1281
- swap_entity_slots = 260,
1282
- swap_infinity_container_filter_items = 261,
1283
- swap_item_filters = 262,
1284
- swap_logistic_filter_items = 263,
1285
- swap_mappers = 264,
1286
- swap_tile_slots = 265,
1287
- switch_connect_to_logistic_network = 266,
1288
- switch_constant_combinator_state = 267,
1289
- switch_inserter_filter_mode_state = 268,
1290
- switch_loader_filter_mode = 269,
1291
- switch_mining_drill_filter_mode_state = 270,
1292
- switch_power_switch_state = 271,
1293
- take_equipment = 272,
1294
- toggle_artillery_auto_targeting = 273,
1295
- toggle_blueprint_snap_to_grid = 274,
1296
- toggle_deconstruction_item_entity_filter_mode = 275,
1297
- toggle_deconstruction_item_tile_filter_mode = 276,
1298
- toggle_driving = 277,
1299
- toggle_enable_vehicle_logistics_while_moving = 278,
1300
- toggle_entity_logistic_requests = 279,
1301
- toggle_equipment_movement_bonus = 280,
1302
- toggle_map_editor = 281,
1303
- toggle_personal_logistic_requests = 282,
1304
- toggle_personal_roboport = 283,
1305
- toggle_selected_entity = 284,
1306
- toggle_show_entity_info = 285,
1307
- toggle_tall_entity_visibility = 286,
1308
- trash_not_requested_items = 287,
1309
- undo = 288,
1310
- upgrade = 289,
1311
- upgrade_opened_blueprint_by_item = 290,
1312
- upgrade_opened_blueprint_by_record = 291,
1313
- use_item = 292,
1314
- wire_dragging = 293,
1315
- write_to_console = 294
1281
+ super_forced_select_area = 258,
1282
+ swap_asteroid_chunk_slots = 259,
1283
+ swap_entity_filter_slots = 260,
1284
+ swap_entity_slots = 261,
1285
+ swap_infinity_container_filter_items = 262,
1286
+ swap_item_filters = 263,
1287
+ swap_logistic_filter_items = 264,
1288
+ swap_mappers = 265,
1289
+ swap_tile_slots = 266,
1290
+ switch_connect_to_logistic_network = 267,
1291
+ switch_constant_combinator_state = 268,
1292
+ switch_inserter_filter_mode_state = 269,
1293
+ switch_loader_filter_mode = 270,
1294
+ switch_mining_drill_filter_mode_state = 271,
1295
+ switch_power_switch_state = 272,
1296
+ take_equipment = 273,
1297
+ toggle_artillery_auto_targeting = 274,
1298
+ toggle_blueprint_snap_to_grid = 275,
1299
+ toggle_deconstruction_item_entity_filter_mode = 276,
1300
+ toggle_deconstruction_item_tile_filter_mode = 277,
1301
+ toggle_driving = 278,
1302
+ toggle_enable_vehicle_logistics_while_moving = 279,
1303
+ toggle_entity_logistic_requests = 280,
1304
+ toggle_equipment_movement_bonus = 281,
1305
+ toggle_map_editor = 282,
1306
+ toggle_personal_logistic_requests = 283,
1307
+ toggle_personal_roboport = 284,
1308
+ toggle_selected_entity = 285,
1309
+ toggle_show_entity_info = 286,
1310
+ toggle_tall_entity_visibility = 287,
1311
+ trash_not_requested_items = 288,
1312
+ undo = 289,
1313
+ upgrade = 290,
1314
+ upgrade_opened_blueprint_by_item = 291,
1315
+ upgrade_opened_blueprint_by_record = 292,
1316
+ use_item = 293,
1317
+ wire_dragging = 294,
1318
+ write_to_console = 295
1316
1319
  }
1317
1320
  enum input_method {
1318
1321
  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.1.12
5
+ // Factorio version 2.1.14
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -3034,6 +3034,47 @@ interface on_player_setup_blueprint {
3034
3034
  */
3035
3035
  tick: MapTick;
3036
3036
  }
3037
+ /**
3038
+ * Called after a player super-forced-selects an area with a selection-tool item.
3039
+ */
3040
+ interface on_player_super_forced_selected_area {
3041
+ /**
3042
+ * The area selected.
3043
+ */
3044
+ area: BoundingBox;
3045
+ /**
3046
+ * The entities selected.
3047
+ */
3048
+ entities: LuaEntity[];
3049
+ /**
3050
+ * The item used to select the area.
3051
+ */
3052
+ item: string;
3053
+ /**
3054
+ * Identifier of the event.
3055
+ */
3056
+ name: defines.events;
3057
+ /**
3058
+ * The player doing the selection.
3059
+ */
3060
+ player_index: uint32;
3061
+ /**
3062
+ * The item quality used to select the area.
3063
+ */
3064
+ quality: string;
3065
+ /**
3066
+ * The surface selected.
3067
+ */
3068
+ surface: LuaSurface;
3069
+ /**
3070
+ * Tick the event was generated.
3071
+ */
3072
+ tick: MapTick;
3073
+ /**
3074
+ * The tiles selected.
3075
+ */
3076
+ tiles: LuaTile[];
3077
+ }
3037
3078
  /**
3038
3079
  * Called when a player toggles alt mode, also known as "show entity info".
3039
3080
  */
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.1.12
5
+ // Factorio version 2.1.14
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.1.12
5
+ // Factorio version 2.1.14
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -1288,7 +1288,7 @@ interface BoilerPrototype extends EntityWithOwnerPrototype {
1288
1288
  */
1289
1289
  fluid_box: FluidBox;
1290
1290
  /**
1291
- * In the `"output-to-separate-pipe"` mode, fluid is transferred from the `fluid_box` to the `output_fluid_box` when enough energy is available to {@link heat | prototype:FluidPrototype::heat_capacity} the input fluid to the `target_temperature`. Setting a filter on the `output_fluid_box` means that instead of the heated input fluid getting moved to the output, it is converted to the filtered fluid in a ratio based on the heat capacity of the fluids: `output_fluid_amount = input_fluid_amount * (output_fluid_heat_capacity / input_fluid_heat_capacity)`
1291
+ * In the `"output-to-separate-pipe"` mode, fluid is transferred from the `fluid_box` to the `output_fluid_box` when enough energy is available to {@link heat | prototype:FluidPrototype::heat_capacity} the input fluid to the `target_temperature`. Setting a filter on the `output_fluid_box` means that instead of the heated input fluid getting moved to the output, it is converted to the filtered fluid in a ratio based on the heat capacity of the fluids: `output_fluid_amount = input_fluid_amount * (input_fluid_heat_capacity / output_fluid_heat_capacity)`
1292
1292
  *
1293
1293
  * In the `"heat-fluid-inside"` mode, fluid in the `fluid_box` is continuously heated from the input temperature up to its {@link FluidPrototype::max_temperature | prototype:FluidPrototype::max_temperature}.
1294
1294
  */
@@ -1296,7 +1296,7 @@ interface BoilerPrototype extends EntityWithOwnerPrototype {
1296
1296
  /**
1297
1297
  * The output fluid box.
1298
1298
  *
1299
- * If `mode` is `"output-to-separate-pipe"` and this has a {@link filter | prototype:FluidBox::filter}, the heated input fluid is converted to the output fluid that is set in the filter. The conversion ratio is based on the {@link heat capacity | prototype:FluidPrototype::heat_capacity} of the fluids: `output_fluid_amount = input_fluid_amount * (output_fluid_heat_capacity / input_fluid_heat_capacity)`
1299
+ * If `mode` is `"output-to-separate-pipe"` and this has a {@link filter | prototype:FluidBox::filter}, the heated input fluid is converted to the output fluid that is set in the filter. The conversion ratio is based on the {@link heat capacity | prototype:FluidPrototype::heat_capacity} of the fluids: `output_fluid_amount = input_fluid_amount * (input_fluid_heat_capacity / output_fluid_heat_capacity)`
1300
1300
  *
1301
1301
  * If `mode` is `"heat-fluid-inside"`, this fluidbox is unused.
1302
1302
  */
@@ -9278,7 +9278,7 @@ interface SpacePlatformHubPrototype extends EntityWithOwnerPrototype {
9278
9278
  */
9279
9279
  platform_repair_speed_modifier?: float;
9280
9280
  /**
9281
- * Weight which this entity adds to total space platform weight when placed.
9281
+ * Mass which this entity adds to total space platform mass when placed.
9282
9282
  */
9283
9283
  weight?: Weight;
9284
9284
  }
@@ -10242,6 +10242,9 @@ interface TilePrototype extends Prototype {
10242
10242
  vehicle_friction_modifier?: double;
10243
10243
  walking_sound?: Sound;
10244
10244
  walking_speed_modifier?: double;
10245
+ /**
10246
+ * Mass which this tile adds to total space platform mass when placed.
10247
+ */
10245
10248
  weight?: Weight;
10246
10249
  }
10247
10250
  /**
@@ -10904,8 +10907,15 @@ interface UtilityConstants extends PrototypeBase {
10904
10907
  asteroid_collector_static_head_swing_segment_count: uint32;
10905
10908
  asteroid_collector_static_head_swing_strength_scale: float;
10906
10909
  asteroid_fading_range: float;
10910
+ /**
10911
+ * Asteroid damage will be multiplied by this value when space platform speed is zero and will linearly increase until asteroid_spawning_with_random_orientation_max_speed is reached.
10912
+ */
10913
+ asteroid_min_damage_modifier: float;
10907
10914
  asteroid_position_offset_to_speed_coefficient: double;
10908
10915
  asteroid_spawning_offset: SimpleBoundingBox;
10916
+ /**
10917
+ * In km per tick.
10918
+ */
10909
10919
  asteroid_spawning_with_random_orientation_max_speed: double;
10910
10920
  /**
10911
10921
  * Will be clamped to the range [2, 100].
@@ -11250,6 +11260,10 @@ interface UtilitySounds extends PrototypeBase {
11250
11260
  * Sound category `"alert"`.
11251
11261
  */
11252
11262
  alert_destroyed: Sound;
11263
+ /**
11264
+ * Sound category `"alert"`.
11265
+ */
11266
+ alert_expansion_base_built: Sound;
11253
11267
  /**
11254
11268
  * Sound category `"gui-effect"`.
11255
11269
  */
@@ -11502,6 +11516,14 @@ interface UtilitySounds extends PrototypeBase {
11502
11516
  * Sound category `"gui-effect"`.
11503
11517
  */
11504
11518
  list_box_click: Sound;
11519
+ /**
11520
+ * Sound category `"gui-effect"`.
11521
+ */
11522
+ machine_gui_close: Sound;
11523
+ /**
11524
+ * Sound category `"gui-effect"`.
11525
+ */
11526
+ machine_gui_open: Sound;
11505
11527
  /**
11506
11528
  * Sound category `"walking"`.
11507
11529
  */
@@ -11902,6 +11924,7 @@ interface UtilitySprites extends PrototypeBase {
11902
11924
  equipment_slot: Sprite;
11903
11925
  expand: Sprite;
11904
11926
  expand_dots: Sprite;
11927
+ expansion_base_built_icon: Sprite;
11905
11928
  explosion_chart_visualization: Animation;
11906
11929
  export: Sprite;
11907
11930
  export_slot: Sprite;
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.1.12
5
+ // Factorio version 2.1.14
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -2226,6 +2226,10 @@ interface BurnerEnergySource extends BaseEnergySource {
2226
2226
  */
2227
2227
  fuel_categories?: FuelCategoryID[];
2228
2228
  fuel_inventory_size: ItemStackIndex;
2229
+ /**
2230
+ * When set, items consumed and produced by this burner will not appear in item production statistics.
2231
+ */
2232
+ hide_from_stats?: boolean;
2229
2233
  initial_fuel?: ItemID;
2230
2234
  initial_fuel_percent?: double;
2231
2235
  light_flicker?: LightFlickeringDefinition;
@@ -4015,6 +4019,10 @@ interface EffectReceiver {
4015
4019
  */
4016
4020
  speed_limits?: EffectValueRange;
4017
4021
  uses_beacon_effects?: boolean;
4022
+ /**
4023
+ * Controls whether {@link LuaEntity::local_effect | runtime:LuaEntity::local_effect} affects this receiver.
4024
+ */
4025
+ uses_local_effects?: boolean;
4018
4026
  uses_module_effects?: boolean;
4019
4027
  /**
4020
4028
  * Controls whether {@link LuaSurface::global_effect | runtime:LuaSurface::global_effect} affects this receiver.
@@ -4379,6 +4387,10 @@ interface EnemyEvolutionSettings {
4379
4387
  time_factor: double;
4380
4388
  }
4381
4389
  interface EnemyExpansionSettings {
4390
+ /**
4391
+ * Cooldown in ticks for dispatching units when building bases.
4392
+ */
4393
+ build_base_unit_dispatch_cooldown: uint32;
4382
4394
  building_coefficient: double;
4383
4395
  enabled: boolean;
4384
4396
  enemy_building_influence_radius: uint32;
@@ -4927,6 +4939,10 @@ interface FluidEnergySource extends BaseEnergySource {
4927
4939
  * The number of fluid units the energy source uses per tick. If used with `scale_fluid_usage`, this specifies the maximum. If this value is not set, `scale_energy_usage` is `false` and a fluid box filter is set, the game will attempt to calculate this value from the fluid box filter's fluid's `fuel_value` or `heat_capacity` and the entity's `energy_usage`. If `burns_fluid` is `false`, `maximum_temperature` will also be used. If the attempt of the game to calculate this value fails (`scale_energy_usage` is `false` and a fluid box filter is set), then `scale_energy_usage` will be forced to `true`, to prevent the energy source from being an infinite fluid sink. More context {@link on the forums | https://forums.factorio.com/90613}.
4928
4940
  */
4929
4941
  fluid_usage_per_tick?: FluidAmount;
4942
+ /**
4943
+ * When set, fluids consumed and produced by this energy source will not appear in fluid production statistics.
4944
+ */
4945
+ hide_from_stats?: boolean;
4930
4946
  light_flicker?: LightFlickeringDefinition;
4931
4947
  /**
4932
4948
  * `0` means unlimited maximum temperature. If this is non-zero while `scale_fluid_usage` is `false` and `fluid_usage_per_tick` is not specified, the game will use this value to calculate `fluid_usage_per_tick`. To do that, the filter on the `fluid_box` must be set.
@@ -6063,7 +6079,7 @@ type ItemPrototypeFlags = (/**
6063
6079
  'spawnable' | 'spoil-result' | /**
6064
6080
  * Controls whether the spoil time ignores the spoil time modifier in the {@link DifficultySettings | runtime:DifficultySettings}.
6065
6081
  */
6066
- 'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world')[];
6082
+ 'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world' | 'no-item-on-ground-merging')[];
6067
6083
  type ItemStackIndex = uint16;
6068
6084
  /**
6069
6085
  * The name of an {@link ItemSubGroup | prototype:ItemSubGroup}.
@@ -6638,6 +6654,10 @@ interface MapGenPresetEnemyEvolutionSettings {
6638
6654
  time_factor?: double;
6639
6655
  }
6640
6656
  interface MapGenPresetEnemyExpansionSettings {
6657
+ /**
6658
+ * Cooldown in ticks for dispatching units when building bases.
6659
+ */
6660
+ build_base_unit_dispatch_cooldown?: uint32;
6641
6661
  enabled?: boolean;
6642
6662
  /**
6643
6663
  * Factor by which the evolution factor influences the size of the settler group
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.64",
3
+ "version": "1.2.65",
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.1.12",
26
+ "factorioVersion": "2.1.14",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },
package/src/core.d.ts CHANGED
@@ -80,6 +80,6 @@ type bool = boolean;
80
80
  */
81
81
  type DataExtendMethod = (data: prototype.Data, ...otherData: any[]) => void;
82
82
 
83
- // The docs and json definition make reference to these types but have no information as to what they are
84
- type BlueprintCircuitConnection = any;
85
- type BlueprintControlBehavior = any;
83
+ // used by UndoRedoEquipment but not declared anywhere
84
+ // Can be removed if/when this is resolved https://forums.factorio.com/viewtopic.php?t=135506
85
+ type PropertyTree = any;