typed-factorio 0.20.0 → 1.0.0-RC

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.
@@ -1895,25 +1895,25 @@ interface LuaCustomInputPrototype {
1895
1895
  */
1896
1896
  readonly action: string
1897
1897
  /**
1898
- * If this custom input is enabled. Disabled custom inputs exist but are not used by the game.
1898
+ * Whether this custom input is enabled. Disabled custom inputs exist but are not used by the game.
1899
1899
  *
1900
1900
  * {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled View documentation}
1901
1901
  */
1902
1902
  readonly enabled: boolean
1903
1903
  /**
1904
- * If this custom input is enabled while using the spectator controller.
1904
+ * Whether this custom input is enabled while using the spectator controller.
1905
1905
  *
1906
1906
  * {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled_while_spectating View documentation}
1907
1907
  */
1908
1908
  readonly enabled_while_spectating: boolean
1909
1909
  /**
1910
- * If this custom input is enabled while using the cutscene controller.
1910
+ * Whether this custom input is enabled while using the cutscene controller.
1911
1911
  *
1912
1912
  * {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled_while_in_cutscene View documentation}
1913
1913
  */
1914
1914
  readonly enabled_while_in_cutscene: boolean
1915
1915
  /**
1916
- * If this custom input will include the selected prototype (if any) when triggered.
1916
+ * Whether this custom input will include the selected prototype (if any) when triggered.
1917
1917
  *
1918
1918
  * {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.include_selected_prototype View documentation}
1919
1919
  */
@@ -4459,6 +4459,14 @@ interface LuaEntity extends LuaControl {
4459
4459
  * @remarks Can also be used on entity ghost if it contains linked-belt<br>May return entity ghost which contains linked belt to which connection is made
4460
4460
  */
4461
4461
  readonly linked_belt_neighbour: LuaEntity | undefined
4462
+ /**
4463
+ * The current radar scan progress, as a number in range [0, 1].
4464
+ *
4465
+ * _Can only be used if this is Radar_
4466
+ *
4467
+ * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.radar_scan_progress View documentation}
4468
+ */
4469
+ readonly radar_scan_progress: float
4462
4470
  /**
4463
4471
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
4464
4472
  */
@@ -7004,6 +7012,17 @@ interface SmokeWithTriggerEntity extends BaseEntity {
7004
7012
  time_to_next_effect: uint
7005
7013
  }
7006
7014
 
7015
+ interface RadarEntity extends BaseEntity {
7016
+ /**
7017
+ * The current radar scan progress, as a number in range [0, 1].
7018
+ *
7019
+ * _Can only be used if this is Radar_
7020
+ *
7021
+ * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.radar_scan_progress View documentation}
7022
+ */
7023
+ readonly radar_scan_progress: float
7024
+ }
7025
+
7007
7026
  /**
7008
7027
  * Prototype of an entity.
7009
7028
  *
@@ -7636,6 +7655,12 @@ interface LuaEntityPrototype {
7636
7655
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.void_energy_source_prototype View documentation}
7637
7656
  */
7638
7657
  readonly void_energy_source_prototype: LuaVoidEnergySourcePrototype | undefined
7658
+ /**
7659
+ * The heat buffer prototype this entity uses or `nil`.
7660
+ *
7661
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.heat_buffer_prototype View documentation}
7662
+ */
7663
+ readonly heat_buffer_prototype: LuaHeatBufferPrototype | undefined
7639
7664
  /**
7640
7665
  * The log2 of grid size of the building
7641
7666
  *
@@ -7654,6 +7679,30 @@ interface LuaEntityPrototype {
7654
7679
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.maximum_temperature View documentation}
7655
7680
  */
7656
7681
  readonly maximum_temperature: double | undefined
7682
+ /**
7683
+ * If this generator prototype burns fluid.
7684
+ *
7685
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.burns_fluid View documentation}
7686
+ */
7687
+ readonly burns_fluid: boolean
7688
+ /**
7689
+ * If this generator prototype scales fluid usage.
7690
+ *
7691
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.scale_fluid_usage View documentation}
7692
+ */
7693
+ readonly scale_fluid_usage: boolean
7694
+ /**
7695
+ * If this generator prototype destroys non fuel fluids.
7696
+ *
7697
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.destroy_non_fuel_fluid View documentation}
7698
+ */
7699
+ readonly destroy_non_fuel_fluid: boolean
7700
+ /**
7701
+ * The default maximum power output of this generator prototype or `nil`.
7702
+ *
7703
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_power_output View documentation}
7704
+ */
7705
+ readonly max_power_output: double | undefined
7657
7706
  /**
7658
7707
  * The target temperature of this boiler prototype or `nil`.
7659
7708
  *
@@ -8235,6 +8284,31 @@ interface LuaEntityPrototype {
8235
8284
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_run_time_change_of_is_military_target View documentation}
8236
8285
  */
8237
8286
  readonly allow_run_time_change_of_is_military_target: boolean
8287
+ /**
8288
+ * The logistic parameters for this roboport. or `nil`.
8289
+ *
8290
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters View documentation}
8291
+ * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
8292
+ */
8293
+ readonly logistic_parameters:
8294
+ | {
8295
+ readonly spawn_and_station_height: float
8296
+ readonly spawn_and_station_shadow_height_offset: float
8297
+ readonly charge_approach_distance: float
8298
+ readonly logistic_radius: float
8299
+ readonly construction_radius: float
8300
+ readonly charging_station_count: uint
8301
+ readonly charging_distance: float
8302
+ readonly charging_station_shift: Vector
8303
+ readonly charging_energy: double
8304
+ readonly charging_threshold_distance: float
8305
+ readonly robot_vertical_acceleration: float
8306
+ readonly stationing_offset: Vector
8307
+ readonly robot_limit: uint
8308
+ readonly logistics_connection_distance: float
8309
+ readonly robots_shrink_when_entering_and_exiting: boolean
8310
+ }
8311
+ | undefined
8238
8312
  /**
8239
8313
  * Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
8240
8314
  *
@@ -8970,6 +9044,12 @@ interface BaseEntityPrototype {
8970
9044
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.void_energy_source_prototype View documentation}
8971
9045
  */
8972
9046
  readonly void_energy_source_prototype: LuaVoidEnergySourcePrototype | undefined
9047
+ /**
9048
+ * The heat buffer prototype this entity uses or `nil`.
9049
+ *
9050
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.heat_buffer_prototype View documentation}
9051
+ */
9052
+ readonly heat_buffer_prototype: LuaHeatBufferPrototype | undefined
8973
9053
  /**
8974
9054
  * The log2 of grid size of the building
8975
9055
  *
@@ -8988,6 +9068,30 @@ interface BaseEntityPrototype {
8988
9068
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.maximum_temperature View documentation}
8989
9069
  */
8990
9070
  readonly maximum_temperature: double | undefined
9071
+ /**
9072
+ * If this generator prototype burns fluid.
9073
+ *
9074
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.burns_fluid View documentation}
9075
+ */
9076
+ readonly burns_fluid: boolean
9077
+ /**
9078
+ * If this generator prototype scales fluid usage.
9079
+ *
9080
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.scale_fluid_usage View documentation}
9081
+ */
9082
+ readonly scale_fluid_usage: boolean
9083
+ /**
9084
+ * If this generator prototype destroys non fuel fluids.
9085
+ *
9086
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.destroy_non_fuel_fluid View documentation}
9087
+ */
9088
+ readonly destroy_non_fuel_fluid: boolean
9089
+ /**
9090
+ * The default maximum power output of this generator prototype or `nil`.
9091
+ *
9092
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_power_output View documentation}
9093
+ */
9094
+ readonly max_power_output: double | undefined
8991
9095
  /**
8992
9096
  * The target temperature of this boiler prototype or `nil`.
8993
9097
  *
@@ -9491,6 +9595,31 @@ interface BaseEntityPrototype {
9491
9595
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.is_entity_with_owner View documentation}
9492
9596
  */
9493
9597
  readonly is_entity_with_owner: boolean
9598
+ /**
9599
+ * The logistic parameters for this roboport. or `nil`.
9600
+ *
9601
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters View documentation}
9602
+ * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
9603
+ */
9604
+ readonly logistic_parameters:
9605
+ | {
9606
+ readonly spawn_and_station_height: float
9607
+ readonly spawn_and_station_shadow_height_offset: float
9608
+ readonly charge_approach_distance: float
9609
+ readonly logistic_radius: float
9610
+ readonly construction_radius: float
9611
+ readonly charging_station_count: uint
9612
+ readonly charging_distance: float
9613
+ readonly charging_station_shift: Vector
9614
+ readonly charging_energy: double
9615
+ readonly charging_threshold_distance: float
9616
+ readonly robot_vertical_acceleration: float
9617
+ readonly stationing_offset: Vector
9618
+ readonly robot_limit: uint
9619
+ readonly logistics_connection_distance: float
9620
+ readonly robots_shrink_when_entering_and_exiting: boolean
9621
+ }
9622
+ | undefined
9494
9623
  /**
9495
9624
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
9496
9625
  */
@@ -11535,7 +11664,7 @@ interface LuaGameScript {
11535
11664
  */
11536
11665
  regenerate_entity(entities: string | readonly string[]): void
11537
11666
  /**
11538
- * Take a screenshot and save it to a file. The filename should include a file extension indicating the desired image format. Supports `.png`, `.jpg` / `.jpeg`, `.tga` and `.bmp`.
11667
+ * Take a screenshot of the game and save it to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name of the image file can be specified via the `path` parameter.
11539
11668
  *
11540
11669
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot View documentation}
11541
11670
  * @remarks If Factorio is running headless, this function will do nothing.
@@ -11566,7 +11695,7 @@ interface LuaGameScript {
11566
11695
  */
11567
11696
  readonly zoom?: double
11568
11697
  /**
11569
- * The sub-path in `"script-output"` to save the screenshot to. Defaults to `"screenshot.png"`.
11698
+ * The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `"save/here/screenshot.png"`) will create the necessary folder structure in `script-output`. Defaults to `"screenshot.png"`.
11570
11699
  */
11571
11700
  readonly path?: string
11572
11701
  /**
@@ -11613,7 +11742,7 @@ interface LuaGameScript {
11613
11742
  */
11614
11743
  set_wait_for_screenshots_to_finish(): void
11615
11744
  /**
11616
- * Take a screenshot of the technology screen and save it to a file. The filename should include a file extension indicating the desired image format. Supports `.png`, `.jpg` / `.jpeg`, `.tga` and `.bmp`.
11745
+ * Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name of the image file can be specified via the `path` parameter.
11617
11746
  *
11618
11747
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot View documentation}
11619
11748
  */
@@ -11623,7 +11752,7 @@ interface LuaGameScript {
11623
11752
  */
11624
11753
  readonly force?: ForceIdentification
11625
11754
  /**
11626
- * The sub-path in `"script-output"` to save the screenshot to. Defaults to `"technology-screenshot.png"`.
11755
+ * The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `"save/here/screenshot.png"`) will create the necessary folder structure in `script-output`. Defaults to `"technology-screenshot.png"`.
11627
11756
  */
11628
11757
  readonly path?: string
11629
11758
  /**
@@ -11658,20 +11787,20 @@ interface LuaGameScript {
11658
11787
  */
11659
11788
  json_to_table(json: string): AnyBasic | undefined
11660
11789
  /**
11661
- * Write a string to a file.
11790
+ * Write a file to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name and file extension of the file can be specified via the `filename` parameter.
11662
11791
  *
11663
11792
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file View documentation}
11664
- * @param filename Path to the file to write to.
11665
- * @param data File content
11666
- * @param append When `true`, this will append to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new data.
11667
- * @param for_player If given, the file will only be written for this player_index. 0 means only the server if one exists.
11793
+ * @param filename The name of the file. Providing a directory path (ex. `"save/here/example.txt"`) will create the necessary folder structure in `script-output`.
11794
+ * @param data The content to write to the file.
11795
+ * @param append If `true`, `data` will be appended to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new `data`.
11796
+ * @param for_player If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present.
11668
11797
  */
11669
11798
  write_file(filename: string, data: LocalisedString, append?: boolean, for_player?: uint): void
11670
11799
  /**
11671
- * Remove file or directory. Given path is taken relative to the script output directory. Can be used to remove files created by {@link LuaGameScript#write_file LuaGameScript::write_file}.
11800
+ * Remove a file or directory in the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. Can be used to remove files created by {@link LuaGameScript#write_file LuaGameScript::write_file}.
11672
11801
  *
11673
11802
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.remove_path View documentation}
11674
- * @param path Path to remove, relative to the script output directory
11803
+ * @param path The path to the file or directory to remove, relative to `script-output`.
11675
11804
  */
11676
11805
  remove_path(path: string): void
11677
11806
  /**
@@ -14006,7 +14135,7 @@ interface CameraGuiElementMembers extends BaseGuiElement {
14006
14135
  */
14007
14136
  surface_index: SurfaceIndex
14008
14137
  /**
14009
- * The zoom this camera or minimap is using.
14138
+ * The zoom this camera or minimap is using. This value must be positive.
14010
14139
  *
14011
14140
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom View documentation}
14012
14141
  */
@@ -14202,7 +14331,7 @@ interface MinimapGuiElementMembers extends BaseGuiElement {
14202
14331
  */
14203
14332
  surface_index: SurfaceIndex
14204
14333
  /**
14205
- * The zoom this camera or minimap is using.
14334
+ * The zoom this camera or minimap is using. This value must be positive.
14206
14335
  *
14207
14336
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom View documentation}
14208
14337
  */
@@ -14698,6 +14827,35 @@ type GuiElementMembers =
14698
14827
  */
14699
14828
  type LuaGuiElement = GuiElementMembers & GuiElementIndexer
14700
14829
 
14830
+ /**
14831
+ * Prototype of a heat buffer.
14832
+ *
14833
+ * {@link https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html View documentation}
14834
+ * @noSelf
14835
+ */
14836
+ interface LuaHeatBufferPrototype {
14837
+ readonly max_temperature: double
14838
+ readonly default_temperature: double
14839
+ readonly specific_heat: double
14840
+ readonly max_transfer: double
14841
+ readonly min_temperature_gradient: double
14842
+ readonly min_working_temperature: double
14843
+ readonly minimum_glow_temperature: double
14844
+ readonly connections: HeatConnection[]
14845
+ /**
14846
+ * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
14847
+ */
14848
+ readonly valid: boolean
14849
+ /**
14850
+ * 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.
14851
+ */
14852
+ readonly object_name: "LuaHeatBufferPrototype"
14853
+ /**
14854
+ * All methods and properties that this object supports.
14855
+ */
14856
+ help(): string
14857
+ }
14858
+
14701
14859
  /**
14702
14860
  * Prototype of a heat energy source.
14703
14861
  *
@@ -14716,6 +14874,7 @@ interface LuaHeatEnergySourcePrototype {
14716
14874
  readonly min_working_temperature: double
14717
14875
  readonly minimum_glow_temperature: double
14718
14876
  readonly connections: HeatConnection[]
14877
+ readonly heat_buffer_prototype: LuaHeatBufferPrototype
14719
14878
  /**
14720
14879
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
14721
14880
  */
@@ -15381,6 +15540,14 @@ interface LuaItemPrototype {
15381
15540
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_border_color View documentation}
15382
15541
  */
15383
15542
  readonly alt_selection_border_color: ColorTable
15543
+ /**
15544
+ * The color used when doing reverse selection with this selection tool prototype.
15545
+ *
15546
+ * _Can only be used if this is SelectionTool_
15547
+ *
15548
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color View documentation}
15549
+ */
15550
+ readonly reverse_selection_border_color: ColorTable
15384
15551
  /**
15385
15552
  * Flags that affect which entities will be selected.
15386
15553
  *
@@ -15397,6 +15564,14 @@ interface LuaItemPrototype {
15397
15564
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_mode_flags View documentation}
15398
15565
  */
15399
15566
  readonly alt_selection_mode_flags: SelectionModeFlags
15567
+ /**
15568
+ * Flags that affect which entities will be selected during reverse selection.
15569
+ *
15570
+ * _Can only be used if this is SelectionTool_
15571
+ *
15572
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags View documentation}
15573
+ */
15574
+ readonly reverse_selection_mode_flags: SelectionModeFlags
15400
15575
  /**
15401
15576
  * _Can only be used if this is SelectionTool_
15402
15577
  *
@@ -15409,6 +15584,12 @@ interface LuaItemPrototype {
15409
15584
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_cursor_box_type View documentation}
15410
15585
  */
15411
15586
  readonly alt_selection_cursor_box_type: string
15587
+ /**
15588
+ * _Can only be used if this is SelectionTool_
15589
+ *
15590
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type View documentation}
15591
+ */
15592
+ readonly reverse_selection_cursor_box_type: string
15412
15593
  /**
15413
15594
  * If tiles area always included when doing selection with this selection tool prototype.
15414
15595
  *
@@ -15433,6 +15614,14 @@ interface LuaItemPrototype {
15433
15614
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filter_mode View documentation}
15434
15615
  */
15435
15616
  readonly alt_entity_filter_mode: string
15617
+ /**
15618
+ * The reverse entity filter mode used by this selection tool.
15619
+ *
15620
+ * _Can only be used if this is SelectionTool_
15621
+ *
15622
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode View documentation}
15623
+ */
15624
+ readonly reverse_alt_entity_filter_mode: string
15436
15625
  /**
15437
15626
  * The tile filter mode used by this selection tool.
15438
15627
  *
@@ -15449,6 +15638,14 @@ interface LuaItemPrototype {
15449
15638
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filter_mode View documentation}
15450
15639
  */
15451
15640
  readonly alt_tile_filter_mode: string
15641
+ /**
15642
+ * The reverse tile filter mode used by this selection tool.
15643
+ *
15644
+ * _Can only be used if this is SelectionTool_
15645
+ *
15646
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode View documentation}
15647
+ */
15648
+ readonly reverse_tile_filter_mode: string
15452
15649
  /**
15453
15650
  * The entity filters used by this selection tool indexed by entity name.
15454
15651
  *
@@ -15465,6 +15662,14 @@ interface LuaItemPrototype {
15465
15662
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filters View documentation}
15466
15663
  */
15467
15664
  readonly alt_entity_filters: Record<string, LuaEntityPrototype>
15665
+ /**
15666
+ * The reverse entity filters used by this selection tool indexed by entity name.
15667
+ *
15668
+ * _Can only be used if this is SelectionTool_
15669
+ *
15670
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters View documentation}
15671
+ */
15672
+ readonly reverse_entity_filters: Record<string, LuaEntityPrototype>
15468
15673
  /**
15469
15674
  * The entity type filters used by this selection tool indexed by entity type.
15470
15675
  *
@@ -15483,6 +15688,15 @@ interface LuaItemPrototype {
15483
15688
  * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15484
15689
  */
15485
15690
  readonly alt_entity_type_filters: Record<string, boolean>
15691
+ /**
15692
+ * The reverse entity type filters used by this selection tool indexed by entity type.
15693
+ *
15694
+ * _Can only be used if this is SelectionTool_
15695
+ *
15696
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters View documentation}
15697
+ * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15698
+ */
15699
+ readonly reverse_entity_type_filters: Record<string, boolean>
15486
15700
  /**
15487
15701
  * The tile filters used by this selection tool indexed by tile name.
15488
15702
  *
@@ -15499,6 +15713,14 @@ interface LuaItemPrototype {
15499
15713
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filters View documentation}
15500
15714
  */
15501
15715
  readonly alt_tile_filters: Record<string, LuaTilePrototype>
15716
+ /**
15717
+ * The reverse tile filters used by this selection tool indexed by tile name.
15718
+ *
15719
+ * _Can only be used if this is SelectionTool_
15720
+ *
15721
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters View documentation}
15722
+ */
15723
+ readonly reverse_tile_filters: Record<string, LuaTilePrototype>
15502
15724
  /**
15503
15725
  * The number of entity filters this deconstruction item has or `nil` if this isn't a deconstruction item prototype.
15504
15726
  *
@@ -15944,6 +16166,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15944
16166
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_border_color View documentation}
15945
16167
  */
15946
16168
  readonly alt_selection_border_color: ColorTable
16169
+ /**
16170
+ * The color used when doing reverse selection with this selection tool prototype.
16171
+ *
16172
+ * _Can only be used if this is SelectionTool_
16173
+ *
16174
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color View documentation}
16175
+ */
16176
+ readonly reverse_selection_border_color: ColorTable
15947
16177
  /**
15948
16178
  * Flags that affect which entities will be selected.
15949
16179
  *
@@ -15960,6 +16190,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15960
16190
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_mode_flags View documentation}
15961
16191
  */
15962
16192
  readonly alt_selection_mode_flags: SelectionModeFlags
16193
+ /**
16194
+ * Flags that affect which entities will be selected during reverse selection.
16195
+ *
16196
+ * _Can only be used if this is SelectionTool_
16197
+ *
16198
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags View documentation}
16199
+ */
16200
+ readonly reverse_selection_mode_flags: SelectionModeFlags
15963
16201
  /**
15964
16202
  * _Can only be used if this is SelectionTool_
15965
16203
  *
@@ -15972,6 +16210,12 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15972
16210
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_cursor_box_type View documentation}
15973
16211
  */
15974
16212
  readonly alt_selection_cursor_box_type: string
16213
+ /**
16214
+ * _Can only be used if this is SelectionTool_
16215
+ *
16216
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type View documentation}
16217
+ */
16218
+ readonly reverse_selection_cursor_box_type: string
15975
16219
  /**
15976
16220
  * If tiles area always included when doing selection with this selection tool prototype.
15977
16221
  *
@@ -15996,6 +16240,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
15996
16240
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filter_mode View documentation}
15997
16241
  */
15998
16242
  readonly alt_entity_filter_mode: string
16243
+ /**
16244
+ * The reverse entity filter mode used by this selection tool.
16245
+ *
16246
+ * _Can only be used if this is SelectionTool_
16247
+ *
16248
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode View documentation}
16249
+ */
16250
+ readonly reverse_alt_entity_filter_mode: string
15999
16251
  /**
16000
16252
  * The tile filter mode used by this selection tool.
16001
16253
  *
@@ -16012,6 +16264,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16012
16264
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filter_mode View documentation}
16013
16265
  */
16014
16266
  readonly alt_tile_filter_mode: string
16267
+ /**
16268
+ * The reverse tile filter mode used by this selection tool.
16269
+ *
16270
+ * _Can only be used if this is SelectionTool_
16271
+ *
16272
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode View documentation}
16273
+ */
16274
+ readonly reverse_tile_filter_mode: string
16015
16275
  /**
16016
16276
  * The entity filters used by this selection tool indexed by entity name.
16017
16277
  *
@@ -16028,6 +16288,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16028
16288
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filters View documentation}
16029
16289
  */
16030
16290
  readonly alt_entity_filters: Record<string, LuaEntityPrototype>
16291
+ /**
16292
+ * The reverse entity filters used by this selection tool indexed by entity name.
16293
+ *
16294
+ * _Can only be used if this is SelectionTool_
16295
+ *
16296
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters View documentation}
16297
+ */
16298
+ readonly reverse_entity_filters: Record<string, LuaEntityPrototype>
16031
16299
  /**
16032
16300
  * The entity type filters used by this selection tool indexed by entity type.
16033
16301
  *
@@ -16046,6 +16314,15 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16046
16314
  * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16047
16315
  */
16048
16316
  readonly alt_entity_type_filters: Record<string, boolean>
16317
+ /**
16318
+ * The reverse entity type filters used by this selection tool indexed by entity type.
16319
+ *
16320
+ * _Can only be used if this is SelectionTool_
16321
+ *
16322
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters View documentation}
16323
+ * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16324
+ */
16325
+ readonly reverse_entity_type_filters: Record<string, boolean>
16049
16326
  /**
16050
16327
  * The tile filters used by this selection tool indexed by tile name.
16051
16328
  *
@@ -16062,6 +16339,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16062
16339
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filters View documentation}
16063
16340
  */
16064
16341
  readonly alt_tile_filters: Record<string, LuaTilePrototype>
16342
+ /**
16343
+ * The reverse tile filters used by this selection tool indexed by tile name.
16344
+ *
16345
+ * _Can only be used if this is SelectionTool_
16346
+ *
16347
+ * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters View documentation}
16348
+ */
16349
+ readonly reverse_tile_filters: Record<string, LuaTilePrototype>
16065
16350
  }
16066
16351
 
16067
16352
  interface DeconstructionItemPrototype extends BaseItemPrototype {
@@ -21,7 +21,7 @@ interface CustomInputEvent extends EventData {
21
21
  */
22
22
  readonly cursor_position: MapPositionTable
23
23
  /**
24
- * Information about the prototype that is selected when the custom input is used. `nil` if none is selected.
24
+ * Information about the prototype that is selected when the custom input is used. Needs to be enabled on the custom input's prototype. `nil` if none is selected.
25
25
  */
26
26
  readonly selected_prototype?: SelectedPrototypeData
27
27
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "0.20.0",
3
+ "version": "1.0.0-RC",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",