factorio-types 1.2.71 → 1.2.73

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.22
5
+ // Factorio version 2.1.24
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -385,6 +385,11 @@ interface LuaBoilerControlBehavior extends LuaGenericOnOffControlBehavior {
385
385
  * Entry point for registering event handlers. It is accessible through the global object named `script`.
386
386
  */
387
387
  interface LuaBootstrap {
388
+ /**
389
+ * Finishes the test when the game was started with `--test-scenario` or `--test-save`: the game exits after the current tick, with exit code 0 if the test passed and 1 if it failed. Does nothing otherwise.
390
+ * @param passed Whether the test passed. Defaults to `true`.
391
+ */
392
+ finish_test(this: void, passed?: boolean): void;
388
393
  /**
389
394
  * Generate a new, unique event ID that can be used to raise custom events with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event}.
390
395
  * @returns The newly generated event ID. This will be a new value that does not correspond to any named entry in defines.events.
@@ -4811,6 +4816,10 @@ interface LuaBootstrap {
4811
4816
  * 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.
4812
4817
  */
4813
4818
  readonly object_name: string;
4819
+ /**
4820
+ * The string given with `--test-arg` when the game was started with `--test-scenario` or `--test-save`.
4821
+ */
4822
+ readonly test_arg?: string;
4814
4823
  }
4815
4824
  /**
4816
4825
  * A reference to the burner energy source owned by a specific {@link LuaEntity | runtime:LuaEntity} or {@link LuaEquipment | runtime:LuaEquipment}.
@@ -11988,6 +11997,7 @@ interface LuaGameScript {
11988
11997
  * @param table.anti_alias Whether to render in double resolution and downscale the result (including GUI). Defaults to `false`.
11989
11998
  * @param table.hide_clouds If `true` cloud shadows on ground won't be rendered. Defaults to `false`.
11990
11999
  * @param table.hide_fog If `true` fog effect and foreground space dust effect won't be rendered. Defaults to `false`.
12000
+ * @param table.hide_health_bars If `true` entity health bars won't be rendered. Defaults to `false`.
11991
12001
  * @param table.quality The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.
11992
12002
  * @param table.allow_in_replay Whether to save the screenshot even during replay playback. Defaults to `false`.
11993
12003
  * @param table.daytime Overrides the current surface daytime for the duration of screenshot rendering.
@@ -12008,6 +12018,7 @@ interface LuaGameScript {
12008
12018
  anti_alias?: boolean;
12009
12019
  hide_clouds?: boolean;
12010
12020
  hide_fog?: boolean;
12021
+ hide_health_bars?: boolean;
12011
12022
  quality?: int32;
12012
12023
  allow_in_replay?: boolean;
12013
12024
  daytime?: double;
@@ -15760,7 +15771,7 @@ interface LuaPermissionGroups {
15760
15771
  readonly valid: boolean;
15761
15772
  }
15762
15773
  /**
15763
- * A pin owned by a player.
15774
+ * A map pin owned by a player.
15764
15775
  */
15765
15776
  interface LuaPin {
15766
15777
  /**
@@ -15772,28 +15783,28 @@ interface LuaPin {
15772
15783
  */
15773
15784
  get_pin_center(this: void): MapPosition | null;
15774
15785
  /**
15775
- * The alert positions if this pin is configured to show alert data.
15786
+ * The alert positions, if this pin targets an alert.
15776
15787
  */
15777
15788
  alert_positions: MapPosition[];
15778
15789
  /**
15779
- * The type of alert this pin is for (if configured to be about alerts).
15790
+ * The type of alert this pin is for, if this pin targets an alert.
15780
15791
  */
15781
15792
  alert_type?: defines.alert_type;
15782
15793
  always_visible: boolean;
15783
15794
  /**
15784
- * The custom chart tag - if this pin specifically binds to a chart tag.
15795
+ * The custom chart tag, if this pin specifically targets a chart tag.
15785
15796
  *
15786
- * The chart tag must be on the same force as the owning player.
15797
+ * The chart tag must be on the same force as the {@link owning player | runtime:LuaPin::owner}.
15787
15798
  */
15788
15799
  chart_tag?: LuaCustomChartTag;
15789
15800
  /**
15790
- * The index of this pin (unique to this player).
15801
+ * The index of this pin. The index is unique to this player.
15791
15802
  *
15792
- * Note that this index has no correlation to the position of the pin within {@link LuaPlayer::get_pins | runtime:LuaPlayer::get_pins}
15803
+ * Note that this index has no correlation to the position of the pin within {@link LuaPlayer::get_pins | runtime:LuaPlayer::get_pins}.
15793
15804
  */
15794
15805
  readonly index: uint32;
15795
15806
  /**
15796
- * The label for this pin - if any. This will be an empty string if there is no label set.
15807
+ * The label for this pin, if any. This will be an empty string if there is no label set.
15797
15808
  */
15798
15809
  label: string;
15799
15810
  /**
@@ -15805,13 +15816,18 @@ interface LuaPin {
15805
15816
  */
15806
15817
  readonly owner: LuaPlayer;
15807
15818
  /**
15808
- * The player that this pin is bound to.
15819
+ * The player that this pin targets, if any.
15820
+ */
15821
+ readonly player?: LuaPlayer;
15822
+ /**
15823
+ * The player that this pin targets, if any.
15824
+ * @customName player
15809
15825
  */
15810
- player?: LuaPlayer;
15826
+ player_write?: PlayerIdentification;
15811
15827
  /**
15812
- * The position if this pin specifically binds to a surface and position.
15828
+ * The position if this pin specifically targets a surface and position.
15813
15829
  *
15814
- * If writing, and this pin was not bound to a specific surface and position, the default surface of nauvis is used.
15830
+ * When writing, and this pin was not bound to a specific surface and position, the default surface of nauvis is used.
15815
15831
  */
15816
15832
  position?: MapPosition;
15817
15833
  /**
@@ -15819,13 +15835,13 @@ interface LuaPin {
15819
15835
  */
15820
15836
  preview_distance: uint16;
15821
15837
  /**
15822
- * The surface index if this pin specifically binds to a surface and position.
15838
+ * The surface index if this pin specifically targets a surface and position.
15823
15839
  *
15824
- * If writing, and this pin was not bound to a specific surface and position, the default position of (0,0) is used.
15840
+ * When writing, and this pin was not bound to a specific surface and position, the default position of `{0, 0}` is used.
15825
15841
  */
15826
15842
  surface_index?: uint32;
15827
15843
  /**
15828
- * The targets of this pin - if any.
15844
+ * The entities that this pin targets, if any.
15829
15845
  */
15830
15846
  targets: LuaEntity[];
15831
15847
  /**
@@ -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.22
5
+ // Factorio version 2.1.24
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -4059,6 +4059,8 @@ interface InventoryWithCustomStackSizeSpecification {
4059
4059
  type ItemCountType = uint32;
4060
4060
  /**
4061
4061
  * An item filter may be specified in two ways, either as a string which is an item prototype name or as a table.
4062
+ *
4063
+ * If this is specified as a string that is an item prototype name, then quality is set to `"normal"` and the comparator is set to `"="`, so only normal quality items will match the filter.
4062
4064
  */
4063
4065
  type ItemFilter = {
4064
4066
  /**
@@ -4066,11 +4068,11 @@ type ItemFilter = {
4066
4068
  */
4067
4069
  name?: ItemID;
4068
4070
  /**
4069
- * The quality.
4071
+ * The quality. Defaults to empty, so any quality items will match the filter.
4070
4072
  */
4071
4073
  quality?: QualityID;
4072
4074
  /**
4073
- * The quality comparison type.
4075
+ * The quality comparison type. Defaults to `"="`.
4074
4076
  */
4075
4077
  comparator?: ComparatorString;
4076
4078
  } | string;
@@ -4459,6 +4461,9 @@ type ItemPrototypeFlag = /**
4459
4461
  * Determines whether the logistics areas of roboports should be drawn when holding this item. Used by the deconstruction planner by default.
4460
4462
  */
4461
4463
  'draw-logistic-overlay' | /**
4464
+ * Prevents the logistics areas of roboports from being drawn when holding this item.
4465
+ */
4466
+ 'disable-logistic-overlay' | /**
4462
4467
  * If this item is skipped by the trash-unrequested logic.
4463
4468
  */
4464
4469
  'excluded-from-trash-unrequested' | /**
@@ -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.22
5
+ // Factorio version 2.1.24
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.22
5
+ // Factorio version 2.1.24
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.1.22
5
+ // Factorio version 2.1.24
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -3048,10 +3048,6 @@ interface on_player_respawned {
3048
3048
  */
3049
3049
  name: defines.events;
3050
3050
  player_index: uint32;
3051
- /**
3052
- * The player port used to respawn if one was used.
3053
- */
3054
- player_port?: LuaEntity;
3055
3051
  /**
3056
3052
  * Tick the event was generated.
3057
3053
  */
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.22
5
+ // Factorio version 2.1.24
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.22
5
+ // Factorio version 2.1.24
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -1299,7 +1299,7 @@ interface BoilerPrototype extends EntityWithOwnerPrototype {
1299
1299
  */
1300
1300
  fluid_box: FluidBox;
1301
1301
  /**
1302
- * If specified, an input fluid above this temperature will cause the boiler to stop working.
1302
+ * If specified, an input fluid above this temperature will cause the boiler to stop working. This can be lower than the `target_temperature` for heating the fluid.
1303
1303
  */
1304
1304
  maximum_input_temperature?: float;
1305
1305
  /**
@@ -1555,6 +1555,11 @@ interface CargoLandingPadPrototype extends EntityWithOwnerPrototype {
1555
1555
  robot_door?: RobotDoorSpecification;
1556
1556
  trash_inventory_size?: ItemStackIndex;
1557
1557
  }
1558
+ /**
1559
+ * Entity used to send cargo between the {@link cargo hatches | prototype:CargoHatchDefinition} of {@link cargo landing pads | prototype:CargoLandingPadPrototype}, {@link space platform hubs | prototype:SpacePlatformHubPrototype}, {@link cargo bays | prototype:CargoBayPrototype} and {@link rocket silos | prototype:RocketSiloPrototype}.
1560
+ *
1561
+ * The pod for sending cargo is determined by {@link CargoHatchDefinition::cargo_unit_entity_to_spawn | prototype:CargoHatchDefinition::cargo_unit_entity_to_spawn}. A cargo pod will only be sent to a destination if {@link receiving_cargo_units | prototype:CargoHatchDefinition::receiving_cargo_units} of the destination hatch contains the cargo pod.
1562
+ */
1558
1563
  interface CargoPodPrototype extends EntityWithOwnerPrototype {
1559
1564
  /**
1560
1565
  * Has to be of type 'pod-catalogue'.
@@ -1565,6 +1570,9 @@ interface CargoPodPrototype extends EntityWithOwnerPrototype {
1565
1570
  */
1566
1571
  default_shadow_graphic?: ProcessionGraphic;
1567
1572
  impact_trigger?: Trigger;
1573
+ /**
1574
+ * The amount of item stacks that this cargo pod can transport.
1575
+ */
1568
1576
  inventory_size: ItemStackIndex;
1569
1577
  procession_audio_catalogue?: ProcessionAudioCatalogue;
1570
1578
  procession_graphic_catalogue?: ProcessionGraphicCatalogue;
@@ -1575,6 +1583,9 @@ interface CargoPodPrototype extends EntityWithOwnerPrototype {
1575
1583
  */
1576
1584
  selection_priority?: uint8;
1577
1585
  shadow_slave_entity?: EntityID;
1586
+ /**
1587
+ * The entity that is created if this cargo pod lands on the ground instead of in a cargo hatch. The transported items will be transferred into the spawned entity.
1588
+ */
1578
1589
  spawned_container: EntityID;
1579
1590
  }
1580
1591
  /**
@@ -4708,7 +4719,7 @@ interface GeneratorPrototype extends EntityWithOwnerPrototype {
4708
4719
  /**
4709
4720
  * Scales the generator's fluid usage to its maximum power output.
4710
4721
  *
4711
- * Setting this to true prevents the generator from overconsuming fluid, for example when higher than`maximum_temperature` fluid is fed to the generator.
4722
+ * Setting this to `true` prevents the generator from overconsuming fluid, for example when higher than `maximum_temperature` fluid is fed to the generator.
4712
4723
  *
4713
4724
  * If scale_fluid_usage is false, the generator consumes the full `fluid_usage_per_tick` and any of the extra energy in the fluid (in the form of higher temperature) is wasted. The {@link steam engine | https://wiki.factorio.com/Steam_engine} exhibits this behavior when fed steam from {@link heat exchangers | https://wiki.factorio.com/Heat_exchanger}.
4714
4725
  */
@@ -8840,7 +8851,7 @@ interface SelectionToolPrototype extends ItemWithLabelPrototype {
8840
8851
  reverse_select?: SelectionModeData;
8841
8852
  select: SelectionModeData;
8842
8853
  /**
8843
- * If true, the selection tool will send pre-selection events to mods {@link defines.events.on_player_start_select_area | runtime:defines.events.on_player_start_select_area}, {@link defines.events.on_player_change_select_area | runtime:defines.events.on_player_change_select_area}, and {@link defines.events.on_player_cancel_select_area | runtime:defines.events.on_player_cancel_select_area}. Off by default because it will incur a performance penalty in multiplayer. It should only be enabled if a mod specifically needs it.
8854
+ * If true, the selection tool will send pre-selection events to mods {@link defines.events.on_player_start_selected_area | runtime:defines.events.on_player_start_selected_area}, {@link defines.events.on_player_change_selected_area | runtime:defines.events.on_player_change_selected_area}, and {@link defines.events.on_player_cancel_selected_area | runtime:defines.events.on_player_cancel_selected_area}. Off by default because it will incur a performance penalty in multiplayer. It should only be enabled if a mod specifically needs it.
8844
8855
  */
8845
8856
  send_pre_selection_events?: boolean;
8846
8857
  skip_fog_of_war?: boolean;
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.22
5
+ // Factorio version 2.1.24
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -2431,6 +2431,9 @@ interface CargoBayConnections {
2431
2431
  }
2432
2432
  interface CargoHatchDefinition {
2433
2433
  busy_timeout_ticks?: uint32;
2434
+ /**
2435
+ * The {@link cargo pod | prototype:CargoPodPrototype} that this cargo hatch spawns when sending cargo.
2436
+ */
2434
2437
  cargo_unit_entity_to_spawn?: EntityID;
2435
2438
  /**
2436
2439
  * Cannot use `fade_ticks`.
@@ -2456,6 +2459,9 @@ interface CargoHatchDefinition {
2456
2459
  */
2457
2460
  opening_sound?: InterruptibleSound;
2458
2461
  pod_shadow_offset?: Vector;
2462
+ /**
2463
+ * The {@link cargo pods | prototype:CargoPodPrototype} that this cargo hatch can receive.
2464
+ */
2459
2465
  receiving_cargo_units?: EntityID[];
2460
2466
  /**
2461
2467
  * y height relative to hatch position where the pod art gets clipped from sky to regular sorting layer.
@@ -4961,7 +4967,9 @@ interface FluidEnergySource extends BaseEnergySource {
4961
4967
  */
4962
4968
  destroy_non_fuel_fluid?: boolean;
4963
4969
  /**
4964
- * `1` means 100% effectivity. Must be greater than `0`. Multiplier of the energy output.
4970
+ * `1` means 100% effectivity. Must be greater than `0`.
4971
+ *
4972
+ * How much energy the fluid energy source produces compared to how much energy it consumes. For example, an effectivity of 0.5
4965
4973
  */
4966
4974
  effectivity?: double;
4967
4975
  /**
@@ -4993,7 +5001,9 @@ interface FluidEnergySource extends BaseEnergySource {
4993
5001
  minimum_input_temperature?: float;
4994
5002
  output_fluid_box?: FluidBox;
4995
5003
  /**
4996
- * If set to `true`, the energy source will consume as much fluid as required to produce the desired power, otherwise it will consume as much as it is allowed to, wasting any excess.
5004
+ * Scales the energy source's fluid usage to its maximum power output.
5005
+ *
5006
+ * If this is `false` the energy source will overconsume fluid. For example when higher than `maximum_temperature` fluid is fed to the energy source, it will consume the full `fluid_usage_per_tick` and any of the extra energy in the fluid (in the form of higher temperature) is wasted. Setting scale_fluid_usage to `true` prevents this behavior.
4997
5007
  */
4998
5008
  scale_fluid_usage?: boolean;
4999
5009
  smoke?: SmokeSource[];
@@ -6085,9 +6095,12 @@ interface ItemProductPrototype extends ProductPrototypeBase {
6085
6095
  * An array containing the following values.
6086
6096
  */
6087
6097
  type ItemPrototypeFlags = (/**
6088
- * Whether the logistics areas of roboports should be drawn when holding this item. Used for example by the {@link deconstruction planner | https://wiki.factorio.com/Deconstruction_planner}.
6098
+ * Whether the logistics areas of roboports should be drawn when holding this item. Used for example by the {@link deconstruction planner | https://wiki.factorio.com/Deconstruction_planner}. The overlay will also be drawn in some instances without this flag enabled.
6089
6099
  */
6090
6100
  'draw-logistic-overlay' | /**
6101
+ * The logistics areas of roboports are never drawn when holding this item. Can't be used together with `"draw-logistic-overlay"`.
6102
+ */
6103
+ 'disable-logistic-overlay' | /**
6091
6104
  * Whether the trash-unrequested feature skips this item.
6092
6105
  */
6093
6106
  'excluded-from-trash-unrequested' | /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.71",
3
+ "version": "1.2.73",
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.22",
26
+ "factorioVersion": "2.1.24",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },