factorio-types 1.2.49 → 1.2.50

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.
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 2.0.66
5
+ // Factorio version 2.0.67
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -66,7 +66,7 @@ interface AddRecordData {
66
66
  allows_unloading?: boolean;
67
67
  wait_conditions?: WaitCondition[];
68
68
  /**
69
- * If index is not given, the record is appended.
69
+ * If record position is not given, the record is appended.
70
70
  */
71
71
  index?: ScheduleRecordPosition;
72
72
  }
@@ -97,7 +97,7 @@ interface Alert {
97
97
  /**
98
98
  * The tick this alert was created.
99
99
  */
100
- tick: uint;
100
+ tick: uint32;
101
101
  target?: LuaEntity;
102
102
  prototype?: LuaEntityPrototype;
103
103
  position?: MapPosition;
@@ -166,7 +166,7 @@ interface ArithmeticCombinatorParameters {
166
166
  /**
167
167
  * Constant to use as the first argument of the operation. Has no effect when `first_signal` is set. Defaults to `0`.
168
168
  */
169
- first_constant?: int;
169
+ first_constant?: int32;
170
170
  /**
171
171
  * When not specified, defaults to `"*"`.
172
172
  */
@@ -182,7 +182,7 @@ interface ArithmeticCombinatorParameters {
182
182
  /**
183
183
  * Constant to use as the second argument of the operation. Has no effect when `second_signal` is set. Defaults to `0`.
184
184
  */
185
- second_constant?: int;
185
+ second_constant?: int32;
186
186
  /**
187
187
  * Specifies the signal to output.
188
188
  */
@@ -301,7 +301,7 @@ interface AsteroidCollectorBlueprintControlBehavior {
301
301
  }
302
302
  interface AsteroidMapSettings {
303
303
  spawning_rate: double;
304
- max_ray_portals_expanded_per_tick: uint;
304
+ max_ray_portals_expanded_per_tick: uint32;
305
305
  }
306
306
  interface AttackParameterFluid {
307
307
  /**
@@ -365,7 +365,7 @@ interface BaseAttackParameters {
365
365
  /**
366
366
  * Number of ticks it takes for the weapon to actually shoot after it has been ordered to do so.
367
367
  */
368
- warmup: uint;
368
+ warmup: uint32;
369
369
  movement_slow_down_factor: double;
370
370
  movement_slow_down_cooldown: float;
371
371
  ammo_type?: AmmoType;
@@ -439,7 +439,7 @@ interface AutoplaceSettings {
439
439
  * Specifies how probability and richness are calculated when placing something on the map.
440
440
  */
441
441
  interface AutoplaceSpecification {
442
- placement_density: uint;
442
+ placement_density: uint32;
443
443
  /**
444
444
  * Control prototype name.
445
445
  */
@@ -479,7 +479,7 @@ interface BaseBlueprintEntity {
479
479
  /**
480
480
  * The entity's unique identifier in the blueprint.
481
481
  */
482
- entity_number: uint;
482
+ entity_number: uint32;
483
483
  /**
484
484
  * The prototype name of the entity.
485
485
  */
@@ -618,7 +618,7 @@ interface BlueprintEntityCar extends BaseBlueprintEntity {
618
618
  * Applies to variant case `cargo-landing-pad`
619
619
  */
620
620
  interface BlueprintEntityCargoLandingPad extends BaseBlueprintEntity {
621
- 'bar'?: uint;
621
+ 'bar'?: uint32;
622
622
  'control_behavior'?: CargoLandingPadBlueprintControlBehavior;
623
623
  'request_filters': BlueprintLogisticSections;
624
624
  }
@@ -647,7 +647,7 @@ interface BlueprintEntityConstantCombinator extends BaseBlueprintEntity {
647
647
  * Applies to variant case `container`
648
648
  */
649
649
  interface BlueprintEntityContainer extends BaseBlueprintEntity {
650
- 'bar'?: uint;
650
+ 'bar'?: uint32;
651
651
  'control_behavior'?: ContainerBlueprintControlBehavior;
652
652
  'filters'?: BlueprintItemFilter[];
653
653
  }
@@ -753,7 +753,7 @@ interface BlueprintEntityInfinityCargoWagon extends BaseBlueprintEntity {
753
753
  * Applies to variant case `infinity-container`
754
754
  */
755
755
  interface BlueprintEntityInfinityContainer extends BaseBlueprintEntity {
756
- 'bar'?: uint;
756
+ 'bar'?: uint32;
757
757
  'control_behavior'?: LogisticContainerBlueprintControlBehavior;
758
758
  'filters'?: BlueprintItemFilter[];
759
759
  'infinity_settings': BlueprintInfinityInventorySettings;
@@ -817,7 +817,7 @@ interface BlueprintEntityLaneSplitter extends BaseBlueprintEntity {
817
817
  * Applies to variant case `linked-belt`
818
818
  */
819
819
  interface BlueprintEntityLinkedBelt extends BaseBlueprintEntity {
820
- 'belt_link'?: uint;
820
+ 'belt_link'?: uint32;
821
821
  'type': BeltConnectionType;
822
822
  }
823
823
  /**
@@ -825,7 +825,7 @@ interface BlueprintEntityLinkedBelt extends BaseBlueprintEntity {
825
825
  * Applies to variant case `linked-container`
826
826
  */
827
827
  interface BlueprintEntityLinkedContainer extends BaseBlueprintEntity {
828
- 'link_id': uint;
828
+ 'link_id': uint32;
829
829
  }
830
830
  /**
831
831
  *
@@ -870,7 +870,7 @@ interface BlueprintEntityLocomotive extends BaseBlueprintEntity {
870
870
  * Applies to variant case `logistic-container`
871
871
  */
872
872
  interface BlueprintEntityLogisticContainer extends BaseBlueprintEntity {
873
- 'bar'?: uint;
873
+ 'bar'?: uint32;
874
874
  'control_behavior'?: LogisticContainerBlueprintControlBehavior;
875
875
  'filters'?: BlueprintItemFilter[];
876
876
  'request_filters': BlueprintLogisticSections;
@@ -968,7 +968,7 @@ interface BlueprintEntitySelectorCombinator extends BaseBlueprintEntity {
968
968
  * Applies to variant case `space-platform-hub`
969
969
  */
970
970
  interface BlueprintEntitySpacePlatformHub extends BaseBlueprintEntity {
971
- 'bar'?: uint;
971
+ 'bar'?: uint32;
972
972
  'control_behavior'?: SpacePlatformHubBlueprintControlBehavior;
973
973
  'request_filters': BlueprintLogisticSections;
974
974
  'request_missing_construction_materials': boolean;
@@ -994,6 +994,7 @@ interface BlueprintEntitySpiderVehicle extends BaseBlueprintEntity {
994
994
  * Applies to variant case `splitter`
995
995
  */
996
996
  interface BlueprintEntitySplitter extends BaseBlueprintEntity {
997
+ 'control_behavior'?: SplitterBlueprintControlBehavior;
997
998
  'filter'?: ItemFilter;
998
999
  'input_priority'?: SplitterPriority;
999
1000
  'output_priority'?: SplitterPriority;
@@ -1012,7 +1013,7 @@ interface BlueprintEntityStorageTank extends BaseBlueprintEntity {
1012
1013
  interface BlueprintEntityTrainStop extends BaseBlueprintEntity {
1013
1014
  'color'?: Color;
1014
1015
  'control_behavior'?: TrainStopBlueprintControlBehavior;
1015
- 'manual_trains_limit'?: uint;
1016
+ 'manual_trains_limit'?: uint32;
1016
1017
  'priority'?: uint8;
1017
1018
  'station': string;
1018
1019
  }
@@ -1074,7 +1075,7 @@ interface BlueprintInsertPlan {
1074
1075
  /**
1075
1076
  * The prototype name and quality of the item to request.
1076
1077
  */
1077
- id: ItemIDAndQualityIDPair;
1078
+ id: BlueprintItemIDAndQualityIDPair;
1078
1079
  /**
1079
1080
  * Describes the inventories to insert these items into.
1080
1081
  */
@@ -1086,7 +1087,7 @@ interface BlueprintInventoryWithFilters {
1086
1087
  filters?: BlueprintItemFilter[];
1087
1088
  }
1088
1089
  interface BlueprintItemFilter {
1089
- index: uint;
1090
+ index: uint32;
1090
1091
  /**
1091
1092
  * The item.
1092
1093
  */
@@ -1100,6 +1101,19 @@ interface BlueprintItemFilter {
1100
1101
  */
1101
1102
  comparator?: ComparatorString;
1102
1103
  }
1104
+ /**
1105
+ * An item prototype with optional quality specification.
1106
+ */
1107
+ interface BlueprintItemIDAndQualityIDPair {
1108
+ /**
1109
+ * Item prototype name.
1110
+ */
1111
+ name: string;
1112
+ /**
1113
+ * Quality prototype name. Defaults to "normal".
1114
+ */
1115
+ quality?: string;
1116
+ }
1103
1117
  interface BlueprintLogisticFilter {
1104
1118
  index: LogisticFilterIndex;
1105
1119
  /**
@@ -1118,7 +1132,7 @@ interface BlueprintLogisticFilter {
1118
1132
  * The comparator for quality. `nil` if any quality.
1119
1133
  */
1120
1134
  comparator?: ComparatorString;
1121
- count: int;
1135
+ count: int32;
1122
1136
  max_count?: ItemCountType;
1123
1137
  /**
1124
1138
  * Defaults to 0.
@@ -1179,7 +1193,7 @@ interface BlueprintSignalIcon {
1179
1193
  /**
1180
1194
  * Index of the icon in the blueprint icons slots. An integer in the range [1, 4].
1181
1195
  */
1182
- index: uint;
1196
+ index: uint32;
1183
1197
  }
1184
1198
  /**
1185
1199
  * Describes a single wire in the blueprint. The members of the tuple are, in order:
@@ -1193,13 +1207,14 @@ interface BlueprintSignalIcon {
1193
1207
  * - `target_wire_connector_id`
1194
1208
  */
1195
1209
  type BlueprintWire = [
1196
- uint,
1210
+ uint32,
1197
1211
  defines.wire_connector_id,
1198
- uint,
1212
+ uint32,
1199
1213
  defines.wire_connector_id
1200
1214
  ];
1201
1215
  interface BlueprintWireEnd {
1202
1216
  entity: BlueprintEntity;
1217
+ surface_index?: uint32;
1203
1218
  connector: defines.wire_connector_id;
1204
1219
  }
1205
1220
  /**
@@ -1244,7 +1259,7 @@ interface CapsuleActionDestroyCliffs extends BaseCapsuleAction {
1244
1259
  'type': 'destroy-cliffs';
1245
1260
  'attack_parameters': AttackParameters;
1246
1261
  'radius': float;
1247
- 'timeout': uint;
1262
+ 'timeout': uint32;
1248
1263
  }
1249
1264
  /**
1250
1265
  *
@@ -1312,7 +1327,7 @@ interface CargoDestination {
1312
1327
  /**
1313
1328
  * Only used if `type` is {@link space_platform | runtime:defines.cargo_destination.space_platform}. Only used for sending space platform starter packs to a platform that is waiting for a starter pack.
1314
1329
  */
1315
- space_platform?: SpacePlatformIdentification;
1330
+ space_platform?: LuaSpacePlatform;
1316
1331
  }
1317
1332
  interface CargoLandingPadBlueprintControlBehavior {
1318
1333
  /**
@@ -1333,18 +1348,18 @@ interface ChartTagSpec {
1333
1348
  * Coordinates of a chunk in a {@link LuaSurface | runtime:LuaSurface} where each integer `x`/`y` represents a different chunk. This uses the same format as {@link MapPosition | runtime:MapPosition}, meaning it can be specified either with or without explicit keys. A {@link MapPosition | runtime:MapPosition} can be translated to a ChunkPosition by dividing the `x`/`y` values by 32.
1334
1349
  */
1335
1350
  type ChunkPosition = {
1336
- x: int;
1337
- y: int;
1351
+ x: int32;
1352
+ y: int32;
1338
1353
  } | [
1339
- int,
1340
- int
1354
+ int32,
1355
+ int32
1341
1356
  ];
1342
1357
  /**
1343
1358
  * A {@link ChunkPosition | runtime:ChunkPosition} with an added bounding box for the area of the chunk.
1344
1359
  */
1345
1360
  interface ChunkPositionAndArea {
1346
- x: int;
1347
- y: int;
1361
+ x: int32;
1362
+ y: int32;
1348
1363
  area: BoundingBox;
1349
1364
  }
1350
1365
  interface CircuitCondition {
@@ -1363,7 +1378,7 @@ interface CircuitCondition {
1363
1378
  /**
1364
1379
  * Constant to compare `first_signal` to. Has no effect when `second_signal` is set. When neither `second_signal` nor `constant` are specified, the effect is as though `constant` were specified with the value `0`.
1365
1380
  */
1366
- constant?: int;
1381
+ constant?: int32;
1367
1382
  }
1368
1383
  interface CircuitConditionDefinition {
1369
1384
  /**
@@ -1381,7 +1396,7 @@ interface CircuitConditionDefinition {
1381
1396
  /**
1382
1397
  * Constant to compare `first_signal` to. Has no effect when `second_signal` is set. When neither `second_signal` nor `constant` are specified, the effect is as though `constant` were specified with the value `0`.
1383
1398
  */
1384
- constant?: int;
1399
+ constant?: int32;
1385
1400
  /**
1386
1401
  * Whether the condition is currently fulfilled.
1387
1402
  */
@@ -1689,9 +1704,9 @@ interface CommandStop extends BaseCommand {
1689
1704
  */
1690
1705
  'distraction'?: defines.distraction;
1691
1706
  /**
1692
- * Ticks to wander before successfully completing the command. Default is max uint, which means stop forever.
1707
+ * Ticks to wander before successfully completing the command. Default is max uint32, which means stop forever.
1693
1708
  */
1694
- 'ticks_to_wait'?: uint;
1709
+ 'ticks_to_wait'?: uint32;
1695
1710
  }
1696
1711
  /**
1697
1712
  *
@@ -1711,9 +1726,9 @@ interface CommandWander extends BaseCommand {
1711
1726
  */
1712
1727
  'radius'?: double;
1713
1728
  /**
1714
- * Ticks to wander before successfully completing the command. Default is max uint, which means wander forever.
1729
+ * Ticks to wander before successfully completing the command. Default is max uint32, which means wander forever.
1715
1730
  */
1716
- 'ticks_to_wait'?: uint;
1731
+ 'ticks_to_wait'?: uint32;
1717
1732
  /**
1718
1733
  * When commanding a group, defines how the group will wander. When `true`, the units in the group will wander around inside the group's radius, just like gathering biters. When `false`, the units will wander as a group, ie they will all walk together in the same random direction. Default is true for groups. Passing true for a single unit is an error.
1719
1734
  */
@@ -1770,7 +1785,7 @@ interface CompiledLogisticFilter {
1770
1785
  * The comparator for quality. `nil` if any quality.
1771
1786
  */
1772
1787
  comparator?: ComparatorString;
1773
- count: int;
1788
+ count: int32;
1774
1789
  max_count?: ItemCountType;
1775
1790
  /**
1776
1791
  * Defaults to 0.
@@ -1820,7 +1835,7 @@ interface CraftingQueueItem {
1820
1835
  /**
1821
1836
  * The index of the item in the crafting queue.
1822
1837
  */
1823
- index: uint;
1838
+ index: uint32;
1824
1839
  /**
1825
1840
  * The recipe being crafted.
1826
1841
  */
@@ -1828,7 +1843,7 @@ interface CraftingQueueItem {
1828
1843
  /**
1829
1844
  * The amount of items being crafted.
1830
1845
  */
1831
- count: uint;
1846
+ count: uint32;
1832
1847
  /**
1833
1848
  * The item is a prerequisite for another item in the queue.
1834
1849
  */
@@ -1870,11 +1885,11 @@ interface CustomCommandData {
1870
1885
  /**
1871
1886
  * The tick the command was used in.
1872
1887
  */
1873
- tick: uint;
1888
+ tick: uint32;
1874
1889
  /**
1875
1890
  * The player who issued the command, or `nil` if it was issued from the server console.
1876
1891
  */
1877
- player_index?: uint;
1892
+ player_index?: uint32;
1878
1893
  /**
1879
1894
  * The parameter passed after the command, if there is one.
1880
1895
  */
@@ -1884,6 +1899,18 @@ interface CustomEntityStatus {
1884
1899
  diode: defines.entity_status_diode;
1885
1900
  label: LocalisedString;
1886
1901
  }
1902
+ interface CustomTooltipField {
1903
+ name: LocalisedString;
1904
+ value: LocalisedString;
1905
+ quality_header: string;
1906
+ /**
1907
+ * Dictionary of quality name to localised string representing the value.
1908
+ */
1909
+ quality_values: Record<string, LocalisedString>;
1910
+ order: uint8;
1911
+ show_in_factoriopedia: boolean;
1912
+ show_in_tooltip: boolean;
1913
+ }
1887
1914
  interface CutsceneWaypoint {
1888
1915
  /**
1889
1916
  * Position to pan the camera to.
@@ -1896,11 +1923,11 @@ interface CutsceneWaypoint {
1896
1923
  /**
1897
1924
  * How many ticks it will take to reach this waypoint from the previous one.
1898
1925
  */
1899
- transition_time: uint;
1926
+ transition_time: uint32;
1900
1927
  /**
1901
1928
  * Time in ticks to wait before moving to the next waypoint.
1902
1929
  */
1903
- time_to_wait: uint;
1930
+ time_to_wait: uint32;
1904
1931
  /**
1905
1932
  * Zoom level to be set when the waypoint is reached. When not specified, the previous waypoint's zoom is used.
1906
1933
  */
@@ -1927,7 +1954,7 @@ LuaDamagePrototype | /**
1927
1954
  */
1928
1955
  string;
1929
1956
  interface DeciderCombinatorBlueprintControlBehavior {
1930
- decider_conditions: DeciderCombinatorCondition;
1957
+ decider_conditions: DeciderCombinatorParameters;
1931
1958
  }
1932
1959
  interface DeciderCombinatorCondition {
1933
1960
  /**
@@ -1949,7 +1976,7 @@ interface DeciderCombinatorCondition {
1949
1976
  /**
1950
1977
  * Constant to compare `first_signal` to. Has no effect when `second_signal` is set. When neither `second_signal` nor `constant` are specified, the effect is as though `constant` were specified with the value `0`.
1951
1978
  */
1952
- constant?: int;
1979
+ constant?: int32;
1953
1980
  /**
1954
1981
  * Specifies how the inputs should be compared. If not specified, defaults to `"<"`.
1955
1982
  */
@@ -1971,7 +1998,7 @@ interface DeciderCombinatorOutput {
1971
1998
  /**
1972
1999
  * The value to output when not copying input. Defaults to `1`.
1973
2000
  */
1974
- constant?: int;
2001
+ constant?: int32;
1975
2002
  /**
1976
2003
  * Sets which input network to read the value of `signal` from if `copy_count_from_input` is `true`. Defaults to both.
1977
2004
  */
@@ -2041,7 +2068,7 @@ interface DecorativePrototypeFilterCollisionMask extends BaseDecorativePrototype
2041
2068
  interface DecorativeResult {
2042
2069
  position: TilePosition;
2043
2070
  decorative: LuaDecorativePrototype;
2044
- amount: uint;
2071
+ amount: uint32;
2045
2072
  }
2046
2073
  interface DetailedItemOnLine {
2047
2074
  stack: LuaItemStack;
@@ -2052,7 +2079,7 @@ interface DetailedItemOnLine {
2052
2079
  /**
2053
2080
  * Unique identifier of this item while it is on transport lines.
2054
2081
  */
2055
- unique_id: uint;
2082
+ unique_id: uint32;
2056
2083
  }
2057
2084
  /**
2058
2085
  * Technology difficulty settings. Updating any of the attributes will immediately take effect in the game engine.
@@ -2085,8 +2112,8 @@ interface DisplayPanelMessageDefinition {
2085
2112
  condition: CircuitConditionDefinition;
2086
2113
  }
2087
2114
  interface DisplayResolution {
2088
- width: uint;
2089
- height: uint;
2115
+ width: uint32;
2116
+ height: uint32;
2090
2117
  }
2091
2118
  interface DragTarget {
2092
2119
  target_entity: LuaEntity;
@@ -2108,7 +2135,7 @@ interface EffectReceiver {
2108
2135
  * An item thrown overboard on a space platform.
2109
2136
  */
2110
2137
  interface EjectedItem {
2111
- item: ItemWithQualityID;
2138
+ item: ItemIDAndQualityIDPair;
2112
2139
  position: MapPosition;
2113
2140
  movement: Vector;
2114
2141
  platform_speed_at_creation: double;
@@ -2182,15 +2209,15 @@ interface EnemyExpansionMapSettings {
2182
2209
  /**
2183
2210
  * Distance in chunks from the furthest base around to prevent expansions from reaching too far into the player's territory. Defaults to `7`.
2184
2211
  */
2185
- max_expansion_distance: uint;
2212
+ max_expansion_distance: uint32;
2186
2213
  /**
2187
2214
  * Defaults to `2`.
2188
2215
  */
2189
- friendly_base_influence_radius: uint;
2216
+ friendly_base_influence_radius: uint32;
2190
2217
  /**
2191
2218
  * Defaults to `2`.
2192
2219
  */
2193
- enemy_building_influence_radius: uint;
2220
+ enemy_building_influence_radius: uint32;
2194
2221
  /**
2195
2222
  * Defaults to `0.1`.
2196
2223
  */
@@ -2214,19 +2241,19 @@ interface EnemyExpansionMapSettings {
2214
2241
  /**
2215
2242
  * The minimum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `5`.
2216
2243
  */
2217
- settler_group_min_size: uint;
2244
+ settler_group_min_size: uint32;
2218
2245
  /**
2219
2246
  * The maximum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `20`.
2220
2247
  */
2221
- settler_group_max_size: uint;
2248
+ settler_group_max_size: uint32;
2222
2249
  /**
2223
2250
  * The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `4*3 600=14 400` ticks.
2224
2251
  */
2225
- min_expansion_cooldown: uint;
2252
+ min_expansion_cooldown: uint32;
2226
2253
  /**
2227
2254
  * 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.
2228
2255
  */
2229
- max_expansion_cooldown: uint;
2256
+ max_expansion_cooldown: uint32;
2230
2257
  }
2231
2258
  /**
2232
2259
  * An entity prototype may be specified in one of three ways.
@@ -2523,7 +2550,7 @@ interface EntitySearchFilters {
2523
2550
  force?: ForceSet;
2524
2551
  to_be_deconstructed?: boolean;
2525
2552
  to_be_upgraded?: boolean;
2526
- limit?: uint;
2553
+ limit?: uint32;
2527
2554
  is_military_target?: boolean;
2528
2555
  has_item_inside?: ItemWithQualityID;
2529
2556
  quality?: QualityCondition;
@@ -2578,8 +2605,8 @@ interface EquipmentIDAndQualityIDPair {
2578
2605
  * A table used to define a manual shape for a piece of equipment.
2579
2606
  */
2580
2607
  interface EquipmentPoint {
2581
- x: uint;
2582
- y: uint;
2608
+ x: uint32;
2609
+ y: uint32;
2583
2610
  }
2584
2611
  /**
2585
2612
  * Position inside an equipment grid. This uses the same format as {@link MapPosition | runtime:MapPosition}, meaning it can be specified either with or without explicit keys.
@@ -2594,11 +2621,11 @@ interface EquipmentPoint {
2594
2621
  ```
2595
2622
  */
2596
2623
  type EquipmentPosition = {
2597
- x: int;
2598
- y: int;
2624
+ x: int32;
2625
+ y: int32;
2599
2626
  } | [
2600
- int,
2601
- int
2627
+ int32,
2628
+ int32
2602
2629
  ];
2603
2630
  interface BaseEquipmentPrototypeFilter {
2604
2631
  /**
@@ -2637,7 +2664,7 @@ interface EquipmentWithQualityCounts {
2637
2664
  /**
2638
2665
  * The number of equipment items.
2639
2666
  */
2640
- count: uint;
2667
+ count: uint32;
2641
2668
  /**
2642
2669
  * Name of the equipment's quality prototype.
2643
2670
  */
@@ -2670,7 +2697,7 @@ interface EventData {
2670
2697
  /**
2671
2698
  * The tick during which the event happened.
2672
2699
  */
2673
- tick: uint;
2700
+ tick: uint32;
2674
2701
  /**
2675
2702
  * The name of the mod that raised the event if it was raised using {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event}.
2676
2703
  */
@@ -2725,9 +2752,9 @@ interface Fluid {
2725
2752
  */
2726
2753
  type FluidAmount = double;
2727
2754
  interface FluidBoxConnectionRecord {
2728
- this_linked_connection_id: uint;
2755
+ this_linked_connection_id: uint32;
2729
2756
  other_entity: LuaEntity;
2730
- other_linked_connection_id: uint;
2757
+ other_linked_connection_id: uint32;
2731
2758
  }
2732
2759
  interface FluidBoxFilter {
2733
2760
  /**
@@ -2817,7 +2844,7 @@ interface FluidProduct {
2817
2844
  * The fluid temperature of this product.
2818
2845
  */
2819
2846
  temperature?: float;
2820
- fluidbox_index?: uint;
2847
+ fluidbox_index?: uint32;
2821
2848
  }
2822
2849
  interface BaseFluidPrototypeFilter {
2823
2850
  /**
@@ -3130,7 +3157,7 @@ interface GuiAnchor {
3130
3157
  * Used for specifying where a GUI arrow should point to.
3131
3158
  */
3132
3159
  interface BaseGuiArrowSpecification {
3133
- margin: uint;
3160
+ margin: uint32;
3134
3161
  /**
3135
3162
  * This determines which of the following fields will be required.
3136
3163
  */
@@ -3152,7 +3179,7 @@ interface GuiArrowSpecificationCraftingQueue extends BaseGuiArrowSpecification {
3152
3179
  /**
3153
3180
  * Index in the crafting queue to point to.
3154
3181
  */
3155
- 'crafting_queueindex': uint;
3182
+ 'crafting_queueindex': uint32;
3156
3183
  }
3157
3184
  /**
3158
3185
  *
@@ -3181,7 +3208,7 @@ interface GuiArrowSpecificationItemStack extends BaseGuiArrowSpecification {
3181
3208
  /**
3182
3209
  * Which stack to point to.
3183
3210
  */
3184
- 'item_stack_index': uint;
3211
+ 'item_stack_index': uint32;
3185
3212
  'source': 'player' | 'target' | 'player-quickbar';
3186
3213
  }
3187
3214
  /**
@@ -3292,11 +3319,11 @@ type GuiElementType = /**
3292
3319
  * Screen coordinates of a GUI element in a {@link LuaGui | runtime:LuaGui}. This uses the same format as {@link TilePosition | runtime:TilePosition}, meaning it can be specified either with or without explicit keys.
3293
3320
  */
3294
3321
  type GuiLocation = {
3295
- x: int;
3296
- y: int;
3322
+ x: int32;
3323
+ y: int32;
3297
3324
  } | [
3298
- int,
3299
- int
3325
+ int32,
3326
+ int32
3300
3327
  ];
3301
3328
  interface GunShift4Way {
3302
3329
  north: Vector;
@@ -3330,7 +3357,7 @@ interface IconDrawSpecification {
3330
3357
  shift: Vector;
3331
3358
  scale: float;
3332
3359
  scale_for_many: float;
3333
- render_layer?: 'entity-info-icon-below' | 'entity-info-icon-above' | 'air-entity-info-icon';
3360
+ render_layer: 'entity-info-icon' | 'entity-info-icon-above' | 'air-entity-info-icon';
3334
3361
  }
3335
3362
  interface IconSequencePositioning {
3336
3363
  inventory_index: defines.inventory;
@@ -3364,7 +3391,7 @@ interface InfinityInventoryFilter {
3364
3391
  /**
3365
3392
  * The index of this filter in the filters list. Not required when writing a filter.
3366
3393
  */
3367
- index?: uint;
3394
+ index?: uint32;
3368
3395
  }
3369
3396
  /**
3370
3397
  * A single filter used by an infinity-pipe type entity.
@@ -3400,7 +3427,7 @@ interface BaseIngredient {
3400
3427
  /**
3401
3428
  * How much of this ingredient is ignored by statistics.
3402
3429
  */
3403
- ignored_by_stats?: uint | double;
3430
+ ignored_by_stats?: uint32 | double;
3404
3431
  }
3405
3432
  type Ingredient = BaseIngredient | IngredientFluid;
3406
3433
  /**
@@ -3409,7 +3436,7 @@ type Ingredient = BaseIngredient | IngredientFluid;
3409
3436
  */
3410
3437
  interface IngredientFluid extends BaseIngredient {
3411
3438
  'type': 'fluid';
3412
- 'fluidbox_index'?: uint;
3439
+ 'fluidbox_index'?: uint32;
3413
3440
  'fluidbox_multiplier'?: uint8;
3414
3441
  /**
3415
3442
  * The maximum fluid temperature allowed.
@@ -3475,7 +3502,7 @@ interface InventoryWithCustomStackSizeSpecification {
3475
3502
  stack_size_override: Record<string, ItemCountType>;
3476
3503
  with_bar: boolean;
3477
3504
  }
3478
- type ItemCountType = uint;
3505
+ type ItemCountType = uint32;
3479
3506
  /**
3480
3507
  * An item filter may be specified in two ways, either as a string which is an item prototype name or as a table.
3481
3508
  */
@@ -3817,7 +3844,7 @@ interface ItemPrototypeFilterStackSize extends BaseItemPrototypeFilter {
3817
3844
  /**
3818
3845
  * The value to compare against.
3819
3846
  */
3820
- 'value': uint;
3847
+ 'value': uint32;
3821
3848
  }
3822
3849
  /**
3823
3850
  *
@@ -3959,7 +3986,7 @@ ItemStackDefinition | LuaItemStack;
3959
3986
  type ItemStackIndex = uint16;
3960
3987
  interface ItemStackLocation {
3961
3988
  inventory: defines.inventory;
3962
- slot: uint;
3989
+ slot: uint32;
3963
3990
  }
3964
3991
  interface ItemToPlace {
3965
3992
  /**
@@ -4059,9 +4086,9 @@ interface LogisticFilter {
4059
4086
  */
4060
4087
  value?: SignalFilter;
4061
4088
  /**
4062
- * The minimum amount to satisfy.
4089
+ * The minimum amount to satisfy. If `min` is non-zero, and `value` is present, then the quality condition inside `value` does not allow quality ranges.
4063
4090
  */
4064
- min?: int;
4091
+ min?: int32;
4065
4092
  /**
4066
4093
  * The maximum amount to keep in inventory. `nil` for infinite.
4067
4094
  */
@@ -4104,19 +4131,19 @@ interface LogisticsNetworkSupplyCounts {
4104
4131
  /**
4105
4132
  * Number of available items in the storage members.
4106
4133
  */
4107
- storage: uint;
4134
+ storage: uint32;
4108
4135
  /**
4109
4136
  * Number of available items in the passive provider members.
4110
4137
  */
4111
- 'passive-provider': uint;
4138
+ 'passive-provider': uint32;
4112
4139
  /**
4113
4140
  * Number of available items in the buffer members.
4114
4141
  */
4115
- buffer: uint;
4142
+ buffer: uint32;
4116
4143
  /**
4117
4144
  * Number of available items in the active provider members.
4118
4145
  */
4119
- 'active-provider': uint;
4146
+ 'active-provider': uint32;
4120
4147
  }
4121
4148
  interface LogisticsNetworkSupplyPoints {
4122
4149
  storage: LuaLogisticPoint[];
@@ -6227,7 +6254,7 @@ interface MapAndDifficultySettings {
6227
6254
  /**
6228
6255
  * If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base.
6229
6256
  */
6230
- max_failed_behavior_count: uint;
6257
+ max_failed_behavior_count: uint32;
6231
6258
  difficulty_settings: MapDifficultySettings;
6232
6259
  }
6233
6260
  interface MapDifficultySettings {
@@ -6294,15 +6321,15 @@ interface MapGenSettings {
6294
6321
  /**
6295
6322
  * The random seed used to generated this map.
6296
6323
  */
6297
- seed: uint;
6324
+ seed: uint32;
6298
6325
  /**
6299
6326
  * Width in tiles. If `0`, the map has 'infinite' width, with the actual limitation being one million tiles in each direction from the center.
6300
6327
  */
6301
- width: uint;
6328
+ width: uint32;
6302
6329
  /**
6303
6330
  * Height in tiles. If `0`, the map has 'infinite' height, with the actual limitation being one million tiles in each direction from the center.
6304
6331
  */
6305
- height: uint;
6332
+ height: uint32;
6306
6333
  /**
6307
6334
  * Size of the starting area.
6308
6335
  */
@@ -6427,7 +6454,7 @@ interface MapSettings {
6427
6454
  /**
6428
6455
  * If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base.
6429
6456
  */
6430
- max_failed_behavior_count: uint;
6457
+ max_failed_behavior_count: uint32;
6431
6458
  path_finder: PathFinderMapSettings;
6432
6459
  pollution: PollutionMapSettings;
6433
6460
  steering: SteeringMapSetting;
@@ -6562,7 +6589,7 @@ interface ModSetting {
6562
6589
  /**
6563
6590
  * The value of the mod setting. The type depends on the kind of setting.
6564
6591
  */
6565
- value: int | double | boolean | string | Color;
6592
+ value: int32 | double | boolean | string | Color;
6566
6593
  }
6567
6594
  interface BaseModSettingPrototypeFilter {
6568
6595
  /**
@@ -6668,11 +6695,11 @@ interface NthTickEventData {
6668
6695
  /**
6669
6696
  * The tick during which the event happened.
6670
6697
  */
6671
- tick: uint;
6698
+ tick: uint32;
6672
6699
  /**
6673
6700
  * The nth tick this handler was registered to.
6674
6701
  */
6675
- nth_tick: uint;
6702
+ nth_tick: uint32;
6676
6703
  }
6677
6704
  /**
6678
6705
  * A single offer on a market entity.
@@ -6705,7 +6732,7 @@ interface PathFinderMapSettings {
6705
6732
  /**
6706
6733
  * The pathfinder performs a step of the backward search every `fwd2bwd_ratio`'th step. The minimum allowed value is `2`, which means symmetric search. The default value is `5`.
6707
6734
  */
6708
- fwd2bwd_ratio: uint;
6735
+ fwd2bwd_ratio: uint32;
6709
6736
  /**
6710
6737
  * When looking at which node to check next, their heuristic value is multiplied by this ratio. The higher it is, the more the search is directed straight at the goal. Defaults to `2`.
6711
6738
  */
@@ -6721,15 +6748,15 @@ interface PathFinderMapSettings {
6721
6748
  /**
6722
6749
  * The maximum amount of work each pathfinding job is allowed to do per tick. Defaults to `8 000`.
6723
6750
  */
6724
- max_work_done_per_tick: uint;
6751
+ max_work_done_per_tick: uint32;
6725
6752
  /**
6726
6753
  * Number of elements in the short cache. Defaults to `5`.
6727
6754
  */
6728
- short_cache_size: uint;
6755
+ short_cache_size: uint32;
6729
6756
  /**
6730
6757
  * Number of elements in the long cache. Defaults to `25`.
6731
6758
  */
6732
- long_cache_size: uint;
6759
+ long_cache_size: uint32;
6733
6760
  /**
6734
6761
  * The minimal distance to the goal in tiles required to be searched in the short path cache. Defaults to `10`.
6735
6762
  */
@@ -6737,7 +6764,7 @@ interface PathFinderMapSettings {
6737
6764
  /**
6738
6765
  * The minimal number of nodes required to be searched in the short path cache. Defaults to `50`.
6739
6766
  */
6740
- short_cache_min_algo_steps_to_cache: uint;
6767
+ short_cache_min_algo_steps_to_cache: uint32;
6741
6768
  /**
6742
6769
  * The minimal distance to the goal in tiles required to be searched in the long path cache. Defaults to `30`.
6743
6770
  */
@@ -6745,7 +6772,7 @@ interface PathFinderMapSettings {
6745
6772
  /**
6746
6773
  * When looking for a connection to a cached path, search at most for this number of steps times the original estimate. Defaults to `100`.
6747
6774
  */
6748
- cache_max_connect_to_cache_steps_multiplier: uint;
6775
+ cache_max_connect_to_cache_steps_multiplier: uint32;
6749
6776
  /**
6750
6777
  * When looking for a path from cache, make sure it doesn't start too far from the requested start in relative terms. Defaults to `0.2`.
6751
6778
  */
@@ -6797,19 +6824,19 @@ interface PathFinderMapSettings {
6797
6824
  /**
6798
6825
  * The amount of path finder requests accepted per tick regardless of the requested path's length. Defaults to `10`.
6799
6826
  */
6800
- max_clients_to_accept_any_new_request: uint;
6827
+ max_clients_to_accept_any_new_request: uint32;
6801
6828
  /**
6802
6829
  * When the `max_clients_to_accept_any_new_request` amount is exhausted, only path finder requests with a short estimate will be accepted until this amount (per tick) is reached. Defaults to `100`.
6803
6830
  */
6804
- max_clients_to_accept_short_new_request: uint;
6831
+ max_clients_to_accept_short_new_request: uint32;
6805
6832
  /**
6806
6833
  * The maximum direct distance in tiles before a request is no longer considered short. Defaults to `100`.
6807
6834
  */
6808
- direct_distance_to_consider_short_request: uint;
6835
+ direct_distance_to_consider_short_request: uint32;
6809
6836
  /**
6810
6837
  * The maximum amount of nodes a short request will traverse before being rescheduled as a long request. Defaults to `1000`.
6811
6838
  */
6812
- short_request_max_steps: uint;
6839
+ short_request_max_steps: uint32;
6813
6840
  /**
6814
6841
  * The amount of steps that are allocated to short requests each tick, as a percentage of all available steps. Defaults to `0.5`, or 50%.
6815
6842
  */
@@ -6817,7 +6844,7 @@ interface PathFinderMapSettings {
6817
6844
  /**
6818
6845
  * The minimum amount of steps that are guaranteed to be performed for every request. Defaults to `2000`.
6819
6846
  */
6820
- min_steps_to_check_path_find_termination: uint;
6847
+ min_steps_to_check_path_find_termination: uint32;
6821
6848
  /**
6822
6849
  * If the actual amount of steps is higher than the initial estimate by this factor, pathfinding is terminated. Defaults to `2000.0`.
6823
6850
  */
@@ -6825,7 +6852,7 @@ interface PathFinderMapSettings {
6825
6852
  /**
6826
6853
  * The thresholds of waiting clients after each of which the per-tick work limit will be increased by the corresponding value in `overload_multipliers`. This is to avoid clients having to wait too long. Must have the same number of elements as `overload_multipliers`. Defaults to `{0, 100, 500}`.
6827
6854
  */
6828
- overload_levels: uint[];
6855
+ overload_levels: uint32[];
6829
6856
  /**
6830
6857
  * The multipliers to the amount of per-tick work applied after the corresponding thresholds in `overload_levels` have been reached. Must have the same number of elements as `overload_multipliers`. Defaults to `{2, 3, 4}`.
6831
6858
  */
@@ -6833,7 +6860,7 @@ interface PathFinderMapSettings {
6833
6860
  /**
6834
6861
  * The delay in ticks between decrementing the score of all paths in the negative cache by one. Defaults to `20`.
6835
6862
  */
6836
- negative_path_cache_delay_interval: uint;
6863
+ negative_path_cache_delay_interval: uint32;
6837
6864
  }
6838
6865
  interface PathfinderFlags {
6839
6866
  /**
@@ -6897,11 +6924,11 @@ interface PipeConnection {
6897
6924
  /**
6898
6925
  * The index of the target fluidbox, if any.
6899
6926
  */
6900
- target_fluidbox_index?: uint;
6927
+ target_fluidbox_index?: uint32;
6901
6928
  /**
6902
6929
  * The index of the target fluidbox pipe connection, if any.
6903
6930
  */
6904
- target_pipe_connection_index?: uint;
6931
+ target_pipe_connection_index?: uint32;
6905
6932
  }
6906
6933
  interface PipeConnectionDefinition {
6907
6934
  connection_type: PipeConnectionType;
@@ -6912,14 +6939,14 @@ interface PipeConnectionDefinition {
6912
6939
  /**
6913
6940
  * The maximum tile distance this underground connection can connect.
6914
6941
  */
6915
- max_underground_distance?: uint;
6942
+ max_underground_distance?: uint32;
6916
6943
  flow_direction: FluidFlowDirection;
6917
6944
  direction: defines.direction;
6918
6945
  connection_category: string[];
6919
6946
  /**
6920
6947
  * Only supplied if `connection_type` is `"linked"`.
6921
6948
  */
6922
- linked_connection_id?: uint;
6949
+ linked_connection_id?: uint32;
6923
6950
  }
6924
6951
  type PipeConnectionType = /**
6925
6952
  * 2 connections are required to be adjacent tiles next to each other on their respective directions.
@@ -6937,7 +6964,7 @@ interface PlaceAsTileResult {
6937
6964
  * The tile prototype.
6938
6965
  */
6939
6966
  result: LuaTilePrototype;
6940
- condition_size: uint;
6967
+ condition_size: uint32;
6941
6968
  condition: CollisionMask;
6942
6969
  invert: boolean;
6943
6970
  tile_condition: LuaTilePrototype[];
@@ -6946,7 +6973,7 @@ interface PlatformSchedule {
6946
6973
  /**
6947
6974
  * Index of the currently active record
6948
6975
  */
6949
- current: uint;
6976
+ current: uint32;
6950
6977
  records: ScheduleRecord[];
6951
6978
  }
6952
6979
  interface PlaySoundSpecification {
@@ -6973,7 +7000,7 @@ interface PlaySoundSpecification {
6973
7000
  type PlayerIdentification = /**
6974
7001
  * The player index.
6975
7002
  */
6976
- uint | /**
7003
+ uint32 | /**
6977
7004
  * The player name.
6978
7005
  */
6979
7006
  string | /**
@@ -7108,10 +7135,7 @@ type Product = /**
7108
7135
  ItemProduct | /**
7109
7136
  * Returned when the `type` is `"fluid"`.
7110
7137
  */
7111
- FluidProduct | /**
7112
- * Returned when the `type` is `"research-progress"`.
7113
- */
7114
- ResearchProgressProduct;
7138
+ FluidProduct;
7115
7139
  /**
7116
7140
  * Specifies how the entity will utilize this fluidbox. `input-output` should only be used for boilers in fluid heating mode.
7117
7141
  */
@@ -7124,13 +7148,13 @@ interface ProgrammableSpeakerAlertParameters {
7124
7148
  }
7125
7149
  interface ProgrammableSpeakerBlueprintControlBehavior {
7126
7150
  circuit_condition: CircuitCondition;
7127
- circuitParameters: ProgrammableSpeakerCircuitParameters;
7151
+ circuit_parameters: ProgrammableSpeakerCircuitParameters;
7128
7152
  }
7129
7153
  interface ProgrammableSpeakerCircuitParameters {
7130
7154
  signal_value_is_pitch: boolean;
7131
7155
  stop_playing_sounds: boolean;
7132
- instrument_id: uint;
7133
- note_id: uint;
7156
+ instrument_id: uint32;
7157
+ note_id: uint32;
7134
7158
  }
7135
7159
  interface ProgrammableSpeakerInstrument {
7136
7160
  name: string;
@@ -7506,7 +7530,7 @@ interface RecipePrototypeFilterOverloadMultiplier extends BaseRecipePrototypeFil
7506
7530
  /**
7507
7531
  * The value to compare against.
7508
7532
  */
7509
- 'value': uint;
7533
+ 'value': uint32;
7510
7534
  }
7511
7535
  /**
7512
7536
  *
@@ -7521,7 +7545,7 @@ interface RecipePrototypeFilterRequestPasteMultiplier extends BaseRecipePrototyp
7521
7545
  /**
7522
7546
  * The value to compare against.
7523
7547
  */
7524
- 'value': uint;
7548
+ 'value': uint32;
7525
7549
  }
7526
7550
  /**
7527
7551
  *
@@ -7837,14 +7861,6 @@ interface ResearchIngredient {
7837
7861
  */
7838
7862
  amount: uint16;
7839
7863
  }
7840
- interface ResearchProgressProduct {
7841
- type: 'research-progress';
7842
- /**
7843
- * Prototype name of the research item.
7844
- */
7845
- research_item: string;
7846
- amount: double;
7847
- }
7848
7864
  interface BaseResearchTrigger {
7849
7865
  type: 'craft-item' | 'mine-entity' | 'craft-fluid' | 'send-item-to-orbit' | 'capture-spawner' | 'build-entity' | 'create-space-platform';
7850
7866
  }
@@ -7965,11 +7981,11 @@ interface ScheduleRecordPosition {
7965
7981
  /**
7966
7982
  * The schedule index
7967
7983
  */
7968
- schedule_index?: uint;
7984
+ schedule_index?: uint32;
7969
7985
  /**
7970
7986
  * The interrupt index
7971
7987
  */
7972
- interrupt_index?: uint;
7988
+ interrupt_index?: uint32;
7973
7989
  }
7974
7990
  /**
7975
7991
  * An area defined using the map editor.
@@ -7978,7 +7994,7 @@ interface ScriptArea {
7978
7994
  area: BoundingBox;
7979
7995
  name: string;
7980
7996
  color: Color;
7981
- id: uint;
7997
+ id: uint32;
7982
7998
  }
7983
7999
  /**
7984
8000
  * A position defined using the map editor.
@@ -7987,7 +8003,7 @@ interface ScriptPosition {
7987
8003
  position: MapPosition;
7988
8004
  name: string;
7989
8005
  color: Color;
7990
- id: uint;
8006
+ id: uint32;
7991
8007
  }
7992
8008
  type ScriptRenderMode = 'game' | 'chart';
7993
8009
  /**
@@ -8020,7 +8036,7 @@ interface SegmentEngineSpecification {
8020
8036
  /**
8021
8037
  * The maximum number of body nodes that a segmented unit instance can have.
8022
8038
  */
8023
- max_body_nodes: uint;
8039
+ max_body_nodes: uint32;
8024
8040
  }
8025
8041
  /**
8026
8042
  * A runtime representation of {@link SegmentSpecification | prototype:SegmentSpecification}.
@@ -8148,7 +8164,7 @@ interface SegmentedUnitAIStatePatrolling extends BaseSegmentedUnitAIState {
8148
8164
  /**
8149
8165
  * Index into the unit's territory's {@link LuaTerritory::get_patrol_path | runtime:LuaTerritory::get_patrol_path} array. If the unit is not assigned to a territory, then this value is an index into a patrol path that the engine internally uses to guide the segmented unit and cannot be directly accessed. See {@link SegmentedUnitPrototype::territory_radius | prototype:SegmentedUnitPrototype::territory_radius}.
8150
8166
  */
8151
- 'waypoint': uint;
8167
+ 'waypoint': uint32;
8152
8168
  }
8153
8169
  interface SelectedPrototypeData {
8154
8170
  /**
@@ -8309,7 +8325,7 @@ interface SelectorCombinatorParametersRandom extends BaseSelectorCombinatorParam
8309
8325
  /**
8310
8326
  * Defaults to `0`.
8311
8327
  */
8312
- 'random_update_interval'?: uint;
8328
+ 'random_update_interval'?: uint32;
8313
8329
  }
8314
8330
  /**
8315
8331
  *
@@ -8323,7 +8339,7 @@ interface SelectorCombinatorParametersSelect extends BaseSelectorCombinatorParam
8323
8339
  /**
8324
8340
  * The signal index to use if not using a specific `index_signal`. Defaults to `0`.
8325
8341
  */
8326
- 'index_constant'?: int;
8342
+ 'index_constant'?: int32;
8327
8343
  /**
8328
8344
  * The signal to use, if any.
8329
8345
  */
@@ -8344,10 +8360,12 @@ interface Signal {
8344
8360
  /**
8345
8361
  * Value of the signal.
8346
8362
  */
8347
- count: int;
8363
+ count: int32;
8348
8364
  }
8349
8365
  /**
8350
8366
  * A signal filter may be specified in two ways, either as a string which is a virtual signal name or item prototype name or as a table.
8367
+ *
8368
+ * When the LogisticFilter that this is used in has a non-zero `min` value then `comparator` must be `"="` (the default when writing) and `quality` is mandatory.
8351
8369
  */
8352
8370
  type SignalFilter = {
8353
8371
  /**
@@ -8359,11 +8377,11 @@ type SignalFilter = {
8359
8377
  */
8360
8378
  name: string;
8361
8379
  /**
8362
- * The prototype name of the signal's quality. `nil` for any quality.
8380
+ * The prototype name of the signal's quality. `nil` for any quality. Mandatory if the LogisticFilter that this SignalFilter is being used in has a non-zero `min` value.
8363
8381
  */
8364
8382
  quality?: QualityID;
8365
8383
  /**
8366
- * The comparator for quality. `nil` if any quality.
8384
+ * The comparator for quality. When reading, this will be `nil` for any quality. When writing it defaults to `"="`.
8367
8385
  */
8368
8386
  comparator?: ComparatorString;
8369
8387
  } | string;
@@ -8397,7 +8415,7 @@ interface SlotFilter {
8397
8415
  /**
8398
8416
  * Position of the corresponding filter slot.
8399
8417
  */
8400
- index: uint;
8418
+ index: uint32;
8401
8419
  /**
8402
8420
  * Name of the prototype to filter for.
8403
8421
  */
@@ -8577,7 +8595,6 @@ interface SpacePlatformHubBlueprintControlBehavior {
8577
8595
  read_speed?: boolean;
8578
8596
  speed_signal?: SignalID;
8579
8597
  }
8580
- type SpacePlatformIdentification = LuaSpacePlatform;
8581
8598
  interface SpacePlatformTileDefinition {
8582
8599
  tile: LuaTilePrototype;
8583
8600
  position: TilePosition;
@@ -8592,6 +8609,39 @@ interface SpawnPointDefinition {
8592
8609
  */
8593
8610
  weight: double;
8594
8611
  }
8612
+ interface SpiderEngineSpecification {
8613
+ legs: SpiderLegSpecification[];
8614
+ walking_group_overlap: float;
8615
+ }
8616
+ interface SpiderLegSpecification {
8617
+ /**
8618
+ * Name of the spider leg prototype.
8619
+ */
8620
+ leg: string;
8621
+ mount_position: Vector;
8622
+ ground_position: Vector;
8623
+ leg_hit_the_ground_trigger?: TriggerEffectItem[];
8624
+ leg_hit_the_ground_when_attacking_trigger?: TriggerEffectItem[];
8625
+ walking_group: uint8;
8626
+ }
8627
+ interface SplitterBlueprintControlBehavior {
8628
+ /**
8629
+ * Defaults to `false`.
8630
+ */
8631
+ set_input_side?: boolean;
8632
+ input_left_condition?: CircuitCondition;
8633
+ input_right_condition?: CircuitCondition;
8634
+ /**
8635
+ * Defaults to `false`.
8636
+ */
8637
+ set_output_side?: boolean;
8638
+ output_left_condition?: CircuitCondition;
8639
+ output_right_condition?: CircuitCondition;
8640
+ /**
8641
+ * Defaults to `false`.
8642
+ */
8643
+ set_filter?: boolean;
8644
+ }
8595
8645
  type SplitterPriority = 'left' | 'none' | 'right';
8596
8646
  type SpoilPriority = 'fresh_first' | 'none' | 'spoiled_first';
8597
8647
  interface SpoilToTriggerResult {
@@ -8602,7 +8652,7 @@ interface SpoilToTriggerResult {
8602
8652
  /**
8603
8653
  * The trigger runs (count-in-stack / items_per_trigger) times; rounded up.
8604
8654
  */
8605
- items_per_trigger: uint;
8655
+ items_per_trigger: uint32;
8606
8656
  }
8607
8657
  /**
8608
8658
  * It can be either the name of a {@link SpritePrototype | prototype:SpritePrototype} defined in the data stage, or a path in form "type/name" or "type.name".
@@ -8666,7 +8716,7 @@ interface SurfaceCondition {
8666
8716
  type SurfaceIdentification = /**
8667
8717
  * It will be the index of the surface. `nauvis` has index `1`, the first surface-created surface will have index `2` and so on.
8668
8718
  */
8669
- uint | /**
8719
+ uint32 | /**
8670
8720
  * It will be the surface name. E.g. `"nauvis"`.
8671
8721
  */
8672
8722
  string | /**
@@ -8695,6 +8745,8 @@ interface TabAndContent {
8695
8745
  * A dictionary of string to the four basic Lua types: `string`, `boolean`, `number`, `table`.
8696
8746
  *
8697
8747
  * Note that the API returns tags as a simple table, meaning any modifications to it will not propagate back to the game. Thus, to modify a set of tags, the whole table needs to be written back to the respective property.
8748
+ *
8749
+ * Tables inside Tags that have numeric keys but are not sequences (e.g. `tags = {foo = {nil, "something"}}` or `tags = {bar = {[4] = "cat"}}`) will have their keys converted to strings when read back from the game (e.g. `{foo = {["2"] = "something"}}` or `{bar = {["4"] = "cat"}}`). Only sequences without gaps will have their keys maintained as numeric.
8698
8750
  * @example ```
8699
8751
  {a = 1, b = true, c = "three", d = {e = "f"}}
8700
8752
  ```
@@ -9095,7 +9147,7 @@ interface TechnologyModifierGiveItem extends BaseTechnologyModifier {
9095
9147
  /**
9096
9148
  * The amount of the item that is given upon researching.
9097
9149
  */
9098
- 'count': uint;
9150
+ 'count': uint32;
9099
9151
  /**
9100
9152
  * The prototype name of the item that is given.
9101
9153
  */
@@ -9463,7 +9515,7 @@ interface TechnologyPrototypeFilterLevel extends BaseTechnologyPrototypeFilter {
9463
9515
  /**
9464
9516
  * The value to compare against.
9465
9517
  */
9466
- 'value': uint;
9518
+ 'value': uint32;
9467
9519
  }
9468
9520
  /**
9469
9521
  *
@@ -9478,7 +9530,7 @@ interface TechnologyPrototypeFilterMaxLevel extends BaseTechnologyPrototypeFilte
9478
9530
  /**
9479
9531
  * The value to compare against.
9480
9532
  */
9481
- 'value': uint;
9533
+ 'value': uint32;
9482
9534
  }
9483
9535
  /**
9484
9536
  *
@@ -9507,7 +9559,7 @@ interface TechnologyPrototypeFilterTime extends BaseTechnologyPrototypeFilter {
9507
9559
  /**
9508
9560
  * The value to compare against.
9509
9561
  */
9510
- 'value': uint;
9562
+ 'value': uint32;
9511
9563
  }
9512
9564
  /**
9513
9565
  *
@@ -9527,7 +9579,7 @@ interface TerritorySettings {
9527
9579
  units: string[];
9528
9580
  territory_index_expression: string;
9529
9581
  territory_variation_expression: string;
9530
- minimum_territory_size: uint;
9582
+ minimum_territory_size: uint32;
9531
9583
  }
9532
9584
  /**
9533
9585
  * The text is aligned so that the target position is at the given side of the text.
@@ -9588,11 +9640,11 @@ string;
9588
9640
  * Coordinates of a tile on a {@link LuaSurface | runtime:LuaSurface} where each integer `x`/`y` represents a different tile. This uses the same format as {@link MapPosition | runtime:MapPosition}, except it rounds any non-integer `x`/`y` down to whole numbers. It can be specified either with or without explicit keys.
9589
9641
  */
9590
9642
  type TilePosition = {
9591
- x: int;
9592
- y: int;
9643
+ x: int32;
9644
+ y: int32;
9593
9645
  } | [
9594
- int,
9595
- int
9646
+ int32,
9647
+ int32
9596
9648
  ];
9597
9649
  interface BaseTilePrototypeFilter {
9598
9650
  /**
@@ -9705,7 +9757,7 @@ interface TileSearchFilters {
9705
9757
  * An empty array means nothing matches the name filter.
9706
9758
  */
9707
9759
  name?: TileID | TileID[];
9708
- limit?: uint;
9760
+ limit?: uint32;
9709
9761
  has_hidden_tile?: boolean;
9710
9762
  /**
9711
9763
  * Can be further filtered by supplying a `force` filter.
@@ -9730,7 +9782,7 @@ interface TrainFilter {
9730
9782
  /**
9731
9783
  * Train ID filter
9732
9784
  */
9733
- train_id?: uint;
9785
+ train_id?: uint32;
9734
9786
  /**
9735
9787
  * Surface the train must be on in order to pass
9736
9788
  */
@@ -9746,11 +9798,11 @@ interface TrainFilter {
9746
9798
  /**
9747
9799
  * Train must have at least that many stocks to pass
9748
9800
  */
9749
- min_stocks?: uint;
9801
+ min_stocks?: uint32;
9750
9802
  /**
9751
9803
  * Train must have at most that many stocks to pass
9752
9804
  */
9753
- max_stocks?: uint;
9805
+ max_stocks?: uint32;
9754
9806
  /**
9755
9807
  * Checks if train is moving (has speed != 0) or not moving.
9756
9808
  */
@@ -9772,7 +9824,7 @@ interface TrainPathAllGoalsResult {
9772
9824
  /**
9773
9825
  * Amount of goals that are accessible.
9774
9826
  */
9775
- amount_accessible: uint;
9827
+ amount_accessible: uint32;
9776
9828
  /**
9777
9829
  * Array of the same length as requested goals: each field will tell if related goal is accessible for the train.
9778
9830
  */
@@ -9784,7 +9836,7 @@ interface TrainPathAllGoalsResult {
9784
9836
  /**
9785
9837
  * Amount of steps pathfinder performed. This is a measure of how expensive this search was.
9786
9838
  */
9787
- steps_count: uint;
9839
+ steps_count: uint32;
9788
9840
  }
9789
9841
  type TrainPathFinderGoal = TrainStopGoal | RailEndGoal | LuaRailEnd | /**
9790
9842
  * Only if it points at train-stop that is connected to a rail.
@@ -9798,11 +9850,11 @@ interface TrainPathFinderOneGoalResult {
9798
9850
  /**
9799
9851
  * If path was found, provides index of the specific goal to which the path goes to.
9800
9852
  */
9801
- goal_index?: uint;
9853
+ goal_index?: uint32;
9802
9854
  /**
9803
9855
  * If path was found, provides index of the specific start from which the path to target goes from
9804
9856
  */
9805
- start_index?: uint;
9857
+ start_index?: uint32;
9806
9858
  /**
9807
9859
  * Penalty of the path to goal if path was found.
9808
9860
  */
@@ -9822,7 +9874,7 @@ interface TrainPathFinderOneGoalResult {
9822
9874
  /**
9823
9875
  * Amount of steps pathfinder performed. This is a measure of how expensive this search was.
9824
9876
  */
9825
- steps_count: uint;
9877
+ steps_count: uint32;
9826
9878
  }
9827
9879
  /**
9828
9880
  * A {@link string | runtime:string} specifying the type of request for {@link LuaTrainManager::request_train_path | runtime:LuaTrainManager::request_train_path}.
@@ -9844,7 +9896,7 @@ interface TrainSchedule {
9844
9896
  /**
9845
9897
  * Index of the currently active record
9846
9898
  */
9847
- current: uint;
9899
+ current: uint32;
9848
9900
  records: ScheduleRecord[];
9849
9901
  }
9850
9902
  interface TrainStopBlueprintControlBehavior {
@@ -9999,7 +10051,7 @@ interface TriggerItem {
9999
10051
  * If `"enemy"`, the trigger will only affect entities whose force is different from the attacker's and for which there is no cease-fire set. `"ally"` is the opposite of `"enemy"`.
10000
10052
  */
10001
10053
  force: ForceCondition;
10002
- repeat_count: uint;
10054
+ repeat_count: uint32;
10003
10055
  probability: float;
10004
10056
  }
10005
10057
  interface TriggerModifierData {
@@ -10066,6 +10118,10 @@ interface UndoRedoActionBuiltEntity extends BaseUndoRedoAction {
10066
10118
  * The type of action that was undone or redone.
10067
10119
  */
10068
10120
  'type': 'built-entity';
10121
+ /**
10122
+ * The surface of the built entity.
10123
+ */
10124
+ 'surface_index'?: uint32;
10069
10125
  /**
10070
10126
  * The specification of the built entity.
10071
10127
  */
@@ -10095,7 +10151,7 @@ interface UndoRedoActionBuiltTile extends BaseUndoRedoAction {
10095
10151
  /**
10096
10152
  * The surface on which the tile was built.
10097
10153
  */
10098
- 'surface_index': uint;
10154
+ 'surface_index': uint32;
10099
10155
  }
10100
10156
  /**
10101
10157
  *
@@ -10107,6 +10163,13 @@ interface UndoRedoActionCopyEntitySettings extends BaseUndoRedoAction {
10107
10163
  */
10108
10164
  'type': 'copy-entity-settings';
10109
10165
  'entity_with_previous_settings'?: BlueprintEntity;
10166
+ /**
10167
+ * The surface of the entity the settings were pasted onto.
10168
+ */
10169
+ 'surface_index'?: uint32;
10170
+ /**
10171
+ * The specification of the entity the settings were pasted onto.
10172
+ */
10110
10173
  'target'?: BlueprintEntity;
10111
10174
  }
10112
10175
  /**
@@ -10129,7 +10192,7 @@ interface UndoRedoActionRemovedEntity extends BaseUndoRedoAction {
10129
10192
  /**
10130
10193
  * The surface from which the entity was removed. Not present for entities the game can't restore, like trees or rocks.
10131
10194
  */
10132
- 'surface_index'?: uint;
10195
+ 'surface_index'?: uint32;
10133
10196
  /**
10134
10197
  * The specification of the removed entity.
10135
10198
  */
@@ -10155,7 +10218,7 @@ interface UndoRedoActionRemovedTile extends BaseUndoRedoAction {
10155
10218
  /**
10156
10219
  * The surface from which the tile was removed.
10157
10220
  */
10158
- 'surface_index': uint;
10221
+ 'surface_index': uint32;
10159
10222
  }
10160
10223
  /**
10161
10224
  *
@@ -10171,6 +10234,10 @@ interface UndoRedoActionRotatedEntity extends BaseUndoRedoAction {
10171
10234
  */
10172
10235
  'original_direction': defines.direction;
10173
10236
  'original_mirroring': boolean;
10237
+ /**
10238
+ * The surface of the rotated entity.
10239
+ */
10240
+ 'surface_index'?: uint32;
10174
10241
  /**
10175
10242
  * The specification of the rotated entity.
10176
10243
  */
@@ -10193,6 +10260,10 @@ interface UndoRedoActionUpgradedEntity extends BaseUndoRedoAction {
10193
10260
  * The quality prototype name of the entity before upgrading.
10194
10261
  */
10195
10262
  'original_quality_name': string;
10263
+ /**
10264
+ * The surface of the upgraded entity.
10265
+ */
10266
+ 'surface_index'?: uint32;
10196
10267
  /**
10197
10268
  * The specification of the upgraded entity.
10198
10269
  */
@@ -10211,6 +10282,10 @@ interface UndoRedoActionUpgradedModules extends BaseUndoRedoAction {
10211
10282
  * The modules present in the target before the upgrade.
10212
10283
  */
10213
10284
  'modules_before': BlueprintInsertPlan;
10285
+ /**
10286
+ * The surface of the upgraded entity.
10287
+ */
10288
+ 'surface_index'?: uint32;
10214
10289
  /**
10215
10290
  * The specification of the upgraded entity.
10216
10291
  */
@@ -10244,15 +10319,15 @@ interface UnitGroupMapSettings {
10244
10319
  /**
10245
10320
  * The minimum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `3 600` ticks.
10246
10321
  */
10247
- min_group_gathering_time: uint;
10322
+ min_group_gathering_time: uint32;
10248
10323
  /**
10249
10324
  * The maximum amount of time in ticks a group will spend gathering before setting off. The actual time is a random time between the minimum and maximum times. Defaults to `10*3 600=36 000` ticks.
10250
10325
  */
10251
- max_group_gathering_time: uint;
10326
+ max_group_gathering_time: uint32;
10252
10327
  /**
10253
10328
  * After gathering has finished, the group is allowed to wait this long in ticks for delayed members. New members are not accepted anymore however. Defaults to `2*3 600=7 200` ticks.
10254
10329
  */
10255
- max_wait_time_for_late_members: uint;
10330
+ max_wait_time_for_late_members: uint32;
10256
10331
  /**
10257
10332
  * The minimum group radius in tiles. The actual radius is adjusted based on the number of members. Defaults to `5.0`.
10258
10333
  */
@@ -10281,15 +10356,15 @@ interface UnitGroupMapSettings {
10281
10356
  * When a member of a group falls back more than this factor times the group radius, it will be dropped from the group. Defaults to `10`.
10282
10357
  */
10283
10358
  member_disown_distance: double;
10284
- tick_tolerance_when_member_arrives: uint;
10359
+ tick_tolerance_when_member_arrives: uint32;
10285
10360
  /**
10286
10361
  * The maximum number of automatically created unit groups gathering for attack at any time. Defaults to `30`.
10287
10362
  */
10288
- max_gathering_unit_groups: uint;
10363
+ max_gathering_unit_groups: uint32;
10289
10364
  /**
10290
10365
  * The maximum number of members for an attack unit group. This only affects automatically created unit groups, manual groups created through the API are unaffected. Defaults to `200`.
10291
10366
  */
10292
- max_unit_group_size: uint;
10367
+ max_unit_group_size: uint32;
10293
10368
  }
10294
10369
  interface UnitSpawnDefinition {
10295
10370
  /**
@@ -10318,7 +10393,7 @@ interface UpgradeMapperDestination {
10318
10393
  /**
10319
10394
  * When upgrading entities, this defines explicit modules to be installed in the destination entity. Lists empty slots as `{}`.
10320
10395
  */
10321
- module_slots?: ItemIDAndQualityIDPair[];
10396
+ module_slots?: BlueprintItemIDAndQualityIDPair[];
10322
10397
  }
10323
10398
  interface UpgradeMapperSource {
10324
10399
  type: 'item' | 'entity';
@@ -10408,11 +10483,11 @@ interface WaitCondition {
10408
10483
  /**
10409
10484
  * Number of ticks to wait when `type` is `"time"`, or number of ticks of inactivity when `type` is `"inactivity"`.
10410
10485
  */
10411
- ticks?: uint;
10486
+ ticks?: uint32;
10412
10487
  /**
10413
- * This is a CircuitCondition and only present when `type` is `"item_count"`, `"circuit"`, `"fluid_count"`, `"fuel_item_count_all"`, or `"fuel_item_count_any"`, and a circuit condition is configured. This is a ItemIDAndQualityIDPair and only present when `type` is `"request_satisfied"` or `"request_not_satisfied"`
10488
+ * This is a CircuitCondition and only present when `type` is `"item_count"`, `"circuit"`, `"fluid_count"`, `"fuel_item_count_all"`, or `"fuel_item_count_any"`, and a circuit condition is configured. This is a BlueprintItemIDAndQualityIDPair and only present when `type` is `"request_satisfied"` or `"request_not_satisfied"`
10414
10489
  */
10415
- condition?: CircuitCondition | ItemIDAndQualityIDPair;
10490
+ condition?: CircuitCondition | BlueprintItemIDAndQualityIDPair;
10416
10491
  /**
10417
10492
  * Name of the space location. Only present when `type` is "`any_planet_import_zero`" and a planet is configured.
10418
10493
  */
@@ -10424,7 +10499,7 @@ interface WaitCondition {
10424
10499
  /**
10425
10500
  * Amount of damage to take when `type` is `"damage_taken"`.
10426
10501
  */
10427
- damage?: uint;
10502
+ damage?: uint32;
10428
10503
  }
10429
10504
  /**
10430
10505
  * Type of a {@link WaitCondition | runtime:WaitCondition}.
@@ -10539,18 +10614,18 @@ type double = number;
10539
10614
  * A floating-point number. This is a single-precision floating point number. Whilst Lua only uses double-precision numbers, when a function takes a float, the game engine will immediately convert the double-precision number to single-precision.
10540
10615
  */
10541
10616
  type float = number;
10542
- /**
10543
- * 32-bit signed integer. Possible values are `-2 147 483 648` to `2 147 483 647`.
10544
- *
10545
- * Since Lua 5.2 only uses doubles, any API that asks for `int` will floor the given double.
10546
- */
10547
- type int = number;
10548
10617
  /**
10549
10618
  * 16 bit signed integer. Possible values are `-32 768` to `32 767`.
10550
10619
  *
10551
10620
  * Since Lua 5.2 only uses doubles, any API that asks for `int16` will floor the given double.
10552
10621
  */
10553
10622
  type int16 = number;
10623
+ /**
10624
+ * 32-bit signed integer. Possible values are `-2 147 483 648` to `2 147 483 647`.
10625
+ *
10626
+ * Since Lua 5.2 only uses doubles, any API that asks for `int` will floor the given double.
10627
+ */
10628
+ type int32 = number;
10554
10629
  /**
10555
10630
  * 8-bit signed integer. Possible values are `-128` to `127`.
10556
10631
  *
@@ -10567,18 +10642,18 @@ type nil = null;
10567
10642
  * Throughout the API docs, the terms "array" and "dictionary" are used. These are fundamentally just {@link Lua tables | http://www.lua.org/pil/2.5.html}, but have a limitation on which kind of table keys can be used. An array is a table that uses continuous integer keys starting at `1`, while a dictionary can use numeric or string keys in any order or combination.
10568
10643
  */
10569
10644
  type table = Table;
10570
- /**
10571
- * 32-bit unsigned integer. Possible values are `0` to `4 294 967 295`.
10572
- *
10573
- * Since Lua 5.2 only uses doubles, any API that asks for `uint` will floor the given double.
10574
- */
10575
- type uint = number;
10576
10645
  /**
10577
10646
  * 16-bit unsigned integer. Possible values are `0` to `65 535`.
10578
10647
  *
10579
10648
  * Since Lua 5.2 only uses doubles, any API that asks for `uint16` will floor the given double.
10580
10649
  */
10581
10650
  type uint16 = number;
10651
+ /**
10652
+ * 32-bit unsigned integer. Possible values are `0` to `4 294 967 295`.
10653
+ *
10654
+ * Since Lua 5.2 only uses doubles, any API that asks for `uint` will floor the given double.
10655
+ */
10656
+ type uint32 = number;
10582
10657
  /**
10583
10658
  * 64-bit unsigned integer. Possible values are `0` to `18 446 744 073 709 551 615`.
10584
10659
  *