factorio-types 0.0.46 → 0.0.48

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 1.1.101
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  declare namespace runtime {
@@ -67,11 +67,7 @@ interface AmmoType {
67
67
  */
68
68
  energy_consumption?: number,
69
69
  range_modifier?: number,
70
-
71
- /**
72
- * One of `"entity"` (fires at an entity), `"position"` (fires directly at a position), or `"direction"` (fires in a direction).
73
- */
74
- target_type: string
70
+ target_type: TargetType
75
71
  }
76
72
 
77
73
  /**
@@ -97,9 +93,9 @@ interface ArithmeticCombinatorParameters {
97
93
  first_signal?: SignalID,
98
94
 
99
95
  /**
100
- * Must be one of `"*"`, `"/"`, `"+"`, `"-"`, `"%"`, `"^"`, `"<<"`, `">>"`, `"AND"`, `"OR"`, `"XOR"`. When not specified, defaults to `"*"`.
96
+ * When not specified, defaults to `"*"`.
101
97
  */
102
- operation?: string,
98
+ operation?: '*' | '/' | '+' | '-' | '%' | '^' | '<<' | '>>' | 'AND' | 'OR' | 'XOR',
103
99
 
104
100
  /**
105
101
  * Specifies the signal to output.
@@ -135,7 +131,81 @@ interface AttackParameterFluid {
135
131
  * Other attributes may be specified depending on `type`:
136
132
  *
137
133
  */
138
- type AttackParameters = AttackParametersProjectile | AttackParametersStream | DefaultAttackParameters
134
+ interface AttackParameters {
135
+
136
+ /**
137
+ * List of the names of compatible {@link LuaAmmoCategoryPrototypes | runtime:LuaAmmoCategoryPrototype}.
138
+ */
139
+ ammo_categories?: string[],
140
+
141
+ /**
142
+ * Multiplier applied to the ammo consumption of an attack.
143
+ */
144
+ ammo_consumption_modifier: number,
145
+ ammo_type?: AmmoType,
146
+
147
+ /**
148
+ * Minimum amount of ticks between shots. If this is less than `1`, multiple shots can be performed per tick.
149
+ */
150
+ cooldown: number,
151
+
152
+ /**
153
+ * Multiplier applied to the damage of an attack.
154
+ */
155
+ damage_modifier: number,
156
+
157
+ /**
158
+ * When searching for the nearest enemy to attack, `fire_penalty` is added to the enemy's distance if they are on fire.
159
+ */
160
+ fire_penalty: number,
161
+
162
+ /**
163
+ * When searching for an enemy to attack, a higher `health_penalty` will discourage targeting enemies with high health. A negative penalty will do the opposite.
164
+ */
165
+ health_penalty: number,
166
+
167
+ /**
168
+ * If less than `range`, the entity will choose a random distance between `range` and `min_attack_distance` and attack from that distance. Used for spitters.
169
+ */
170
+ min_attack_distance: number,
171
+
172
+ /**
173
+ * Minimum range of attack. Used with flamethrower turrets to prevent self-immolation.
174
+ */
175
+ min_range: number,
176
+ movement_slow_down_cooldown: number,
177
+ movement_slow_down_factor: number,
178
+
179
+ /**
180
+ * Maximum range of attack.
181
+ */
182
+ range: number,
183
+
184
+ /**
185
+ * Defines how the range is determined.
186
+ */
187
+ range_mode: 'center-to-center' | 'bounding-box-to-bounding-box',
188
+
189
+ /**
190
+ * When searching for an enemy to attack, a higher `rotate_penalty` will discourage targeting enemies that would take longer to turn to face.
191
+ */
192
+ rotate_penalty: number,
193
+
194
+ /**
195
+ * The arc that the entity can attack in as a fraction of a circle. A value of `1` means the full 360 degrees.
196
+ */
197
+ turn_range: number,
198
+
199
+ /**
200
+ * The type of AttackParameter.
201
+ */
202
+ type: 'projectile' | 'stream' | 'beam',
203
+
204
+ /**
205
+ * Number of ticks it takes for the weapon to actually shoot after it has been ordered to do so.
206
+ */
207
+ warmup: number
208
+ }
139
209
 
140
210
  interface AutoplaceControl {
141
211
 
@@ -349,7 +419,9 @@ type BoundingBox = {
349
419
  * Other attributes may be specified depending on `type`:
350
420
  *
351
421
  */
352
- type CapsuleAction = CapsuleActionArtilleryRemote | CapsuleActionDestroyCliffs | CapsuleActionEquipmentRemote | CapsuleActionThrow | CapsuleActionUseOnSelf
422
+ interface CapsuleAction {
423
+ type: 'throw' | 'equipment-remote' | 'use-on-self' | 'artillery-remote' | 'destroy-cliffs'
424
+ }
353
425
 
354
426
  /**
355
427
  * @remarks
@@ -437,7 +509,7 @@ interface CircularParticleCreationSpecification {
437
509
  height_deviation: number,
438
510
 
439
511
  /**
440
- * Name of the {@link LuaEntityPrototype | runtime:LuaEntityPrototype}
512
+ * Name of the {@link LuaEntityPrototype | runtime:LuaEntityPrototype}.
441
513
  */
442
514
  name: string,
443
515
  speed: number,
@@ -450,8 +522,8 @@ interface CircularParticleCreationSpecification {
450
522
  }
451
523
 
452
524
  interface CircularProjectileCreationSpecification {
453
- _0: RealOrientation,
454
- _1: Vector
525
+ [1]: RealOrientation,
526
+ [2]: Vector
455
527
  }
456
528
 
457
529
  type CliffOrientation = 'west-to-east' | 'north-to-south' | 'east-to-west' | 'south-to-north' | 'west-to-north' | 'north-to-east' | 'east-to-south' | 'south-to-west' | 'west-to-south' | 'north-to-west' | 'east-to-north' | 'south-to-east' | 'west-to-none' | 'none-to-east' | 'east-to-none' | 'none-to-west' | 'north-to-none' | 'none-to-south' | 'south-to-none' | 'none-to-north'
@@ -623,7 +695,10 @@ interface CraftingQueueItem {
623
695
  recipe: string
624
696
  }
625
697
 
626
- type CursorBoxRenderType = /* Yellow box. */ 'entity' | /* Red box. */ 'not-allowed' | /* Light blue box. */ 'electricity' | /* Light blue box. */ 'pair' | /* Green box. */ 'copy' | /* White box. */ 'train-visualization' | /* Light blue box. */ 'logistics' | /* Green box. */ 'blueprint-snap-rectangle'
698
+ /**
699
+ * One of the following values:
700
+ */
701
+ type CursorBoxRenderType = /* The normal entity selection box. Yellow by default. */ 'entity' | /* The selection box used to specify electric poles an entity is connected to. Light blue by default. */ 'electricity' | /* The selection box used when doing entity copy-paste. Green by default. */ 'copy' | /* The selection box used when specifying colliding entities. Red by default. */ 'not-allowed' | /* Light blue by default. */ 'pair' | /* Light blue by default. */ 'logistics' | /* White by default. */ 'train-visualization' | /* Green by default. */ 'blueprint-snap-rectangle'
627
702
 
628
703
  interface CustomCommandData {
629
704
 
@@ -676,6 +751,19 @@ interface CutsceneWaypoint {
676
751
  zoom?: number
677
752
  }
678
753
 
754
+ interface DamageTypeFilters {
755
+
756
+ /**
757
+ * The damage types to filter for. The value in the dictionary is meaningless and exists just to allow for easy lookup.
758
+ */
759
+ types: {[key: string]: true},
760
+
761
+ /**
762
+ * Whether this is a whitelist or a blacklist of damage types. `true` means whitelist.
763
+ */
764
+ whitelist: boolean
765
+ }
766
+
679
767
  interface DeciderCombinatorParameters {
680
768
 
681
769
  /**
@@ -740,9 +828,9 @@ interface DifficultySettings {
740
828
  recipe_difficulty: defines.difficulty_settings.recipe_difficulty
741
829
 
742
830
  /**
743
- * Either `"after-victory"`, `"always"` or `"never"`. Changing this to `"always"` or `"after-victory"` does not automatically unlock the research queue. See {@link LuaForce | runtime:LuaForce} for that.
831
+ * Changing this to `"always"` or `"after-victory"` does not automatically unlock the research queue. See {@link LuaForce::research_queue_enabled | runtime:LuaForce::research_queue_enabled} for that.
744
832
  */
745
- research_queue_setting: string
833
+ research_queue_setting: 'after-victory' | 'always' | 'never'
746
834
 
747
835
  technology_difficulty: defines.difficulty_settings.technology_difficulty
748
836
 
@@ -778,13 +866,14 @@ interface ElemID {
778
866
  * Name of a prototype as defined by `type`.
779
867
  */
780
868
  name: string,
781
-
782
- /**
783
- * One of `"achievement"`, `"decorative"`, `"entity"`, `"equipment"`, `"fluid"`, `"item"`, `"item-group"`, `"recipe"`, `"signal"`, or `"technology"`.
784
- */
785
- type: string
869
+ type: ElemType
786
870
  }
787
871
 
872
+ /**
873
+ * A {@link string | runtime:string} specifying a type for {@link choose elem buttons | runtime:LuaGuiElement::elem_type}. It's also used by {@link ElemID | runtime:ElemID} for {@link LuaGuiElement::elem_tooltip | runtime:LuaGuiElement::elem_tooltip}.
874
+ */
875
+ type ElemType = 'achievement' | 'decorative' | 'entity' | 'equipment' | 'fluid' | 'item' | 'item-group' | 'recipe' | 'signal' | 'technology' | 'tile'
876
+
788
877
  /**
789
878
  * These values represent a percentual increase in evolution. This means a value of `0.1` would increase evolution by 10%.
790
879
  */
@@ -1023,11 +1112,7 @@ interface FluidBoxConnection {
1023
1112
  * The 4 cardinal direction connection points for this pipe. This vector is a table with `x` and `y` keys instead of an array.
1024
1113
  */
1025
1114
  positions: Vector[],
1026
-
1027
- /**
1028
- * One of "input", "output", or "input-output".
1029
- */
1030
- type: string
1115
+ type: 'input' | 'output' | 'input-output'
1031
1116
  }
1032
1117
 
1033
1118
  interface FluidBoxFilter {
@@ -1198,9 +1283,24 @@ interface GuiAnchor {
1198
1283
  * Other attributes may be specified depending on `type`:
1199
1284
  *
1200
1285
  */
1201
- type GuiArrowSpecification = GuiArrowSpecificationCraftingQueue | GuiArrowSpecificationEntity | GuiArrowSpecificationItemStack | GuiArrowSpecificationPosition | DefaultGuiArrowSpecification
1286
+ interface GuiArrowSpecification {
1287
+ margin: number,
1288
+
1289
+ /**
1290
+ * This determines which of the following fields will be required.
1291
+ */
1292
+ type: GuiArrowType
1293
+ }
1294
+
1295
+ /**
1296
+ * Used by {@link GuiArrowSpecification | runtime:GuiArrowSpecification}.
1297
+ */
1298
+ type GuiArrowType = /* Will remove the arrow entirely. */ 'nowhere' | /* Will point to the current goal. */ 'goal' | 'entity_info' | 'active_window' | 'entity' | 'position' | 'crafting_queue' | /* Will point to a given item stack in an inventory. */ 'item_stack'
1202
1299
 
1203
- type GuiArrowType = 'nowhere' | 'goal' | 'entity_info' | 'active_window' | 'entity' | 'position' | 'crafting_queue' | 'item_stack'
1300
+ /**
1301
+ * Direction of a {@link LuaGuiElement's | runtime:LuaGuiElement::direction} layout.
1302
+ */
1303
+ type GuiDirection = 'horizontal' | 'vertical'
1204
1304
 
1205
1305
  type GuiElementType = /* A clickable element. Relevant event: {@link on_gui_click | runtime:on_gui_click} */ 'button' | /* A `button` that displays a sprite rather than text. Relevant event: {@link on_gui_click | runtime:on_gui_click} */ 'sprite-button' | /* A clickable element with a check mark that can be turned off or on. Relevant event: {@link on_gui_checked_state_changed | runtime:on_gui_checked_state_changed} */ 'checkbox' | /* An invisible container that lays out its children either horizontally or vertically. */ 'flow' | /* A non-transparent box that contains other elements. It can have a title (set via the `caption` attribute). Just like a `flow`, it lays out its children either horizontally or vertically. Relevant event: {@link on_gui_location_changed | runtime:on_gui_location_changed} */ 'frame' | /* A piece of text. */ 'label' | /* A horizontal or vertical separation line. */ 'line' | /* A partially filled bar that can be used to indicate progress. */ 'progressbar' | /* An invisible container that lays out its children in a specific number of columns. The width of each column is determined by the widest element it contains. */ 'table' | /* A single-line box the user can type into. Relevant events: {@link on_gui_text_changed | runtime:on_gui_text_changed}, {@link on_gui_confirmed | runtime:on_gui_confirmed} */ 'textfield' | /* An element that is similar to a `checkbox`, but with a circular appearance. Clicking a selected radio button will not unselect it. Radio buttons are not linked to each other in any way. Relevant event: {@link on_gui_checked_state_changed | runtime:on_gui_checked_state_changed} */ 'radiobutton' | /* An element that shows an image. */ 'sprite' | /* An invisible element that is similar to a `flow`, but has the ability to show and use scroll bars. */ 'scroll-pane' | /* A drop-down containing strings of text. Relevant event: {@link on_gui_selection_state_changed | runtime:on_gui_selection_state_changed} */ 'drop-down' | /* A list of strings, only one of which can be selected at a time. Shows a scroll bar if necessary. Relevant event: {@link on_gui_selection_state_changed | runtime:on_gui_selection_state_changed} */ 'list-box' | /* A camera that shows the game at the given position on the given surface. It can visually track an {@link entity | runtime:LuaGuiElement::entity} that is set after the element has been created. */ 'camera' | /* A button that lets the player pick from a certain kind of prototype, with optional filtering. Relevant event: {@link on_gui_elem_changed | runtime:on_gui_elem_changed} */ 'choose-elem-button' | /* A multi-line `textfield`. Relevant event: {@link on_gui_text_changed | runtime:on_gui_text_changed} */ 'text-box' | /* A horizontal number line which can be used to choose a number. Relevant event: {@link on_gui_value_changed | runtime:on_gui_value_changed} */ 'slider' | /* A minimap preview, similar to the normal player minimap. It can visually track an {@link entity | runtime:LuaGuiElement::entity} that is set after the element has been created. */ 'minimap' | /* A preview of an entity. The {@link entity | runtime:LuaGuiElement::entity} has to be set after the element has been created. */ 'entity-preview' | /* An empty element that just exists. The root GUI elements `screen` and `relative` are `empty-widget`s. */ 'empty-widget' | /* A collection of `tab`s and their contents. Relevant event: {@link on_gui_selected_tab_changed | runtime:on_gui_selected_tab_changed} */ 'tabbed-pane' | /* A tab for use in a `tabbed-pane`. */ 'tab' | /* A switch with three possible states. Can have labels attached to either side. Relevant event: {@link on_gui_switch_state_changed | runtime:on_gui_switch_state_changed} */ 'switch'
1206
1306
 
@@ -1230,9 +1330,9 @@ interface HeatConnection {
1230
1330
  interface HeatSetting {
1231
1331
 
1232
1332
  /**
1233
- * `"at-least"`, `"at-most"`, `"exactly"`, `"add"`, or `"remove"`. Defaults to `"at-least"`.
1333
+ * Defaults to `"at-least"`.
1234
1334
  */
1235
- mode?: string,
1335
+ mode?: 'at-least' | 'at-most' | 'exactly' | 'add' | 'remove',
1236
1336
 
1237
1337
  /**
1238
1338
  * The target temperature. Defaults to the minimum temperature of the heat buffer.
@@ -1256,9 +1356,9 @@ interface InfinityInventoryFilter {
1256
1356
  index: number,
1257
1357
 
1258
1358
  /**
1259
- * `"at-least"`, `"at-most"`, or `"exactly"`. Defaults to `"at-least"`.
1359
+ * Defaults to `"at-least"`.
1260
1360
  */
1261
- mode?: string,
1361
+ mode?: 'at-least' | 'at-most' | 'exactly',
1262
1362
 
1263
1363
  /**
1264
1364
  * Name of the item.
@@ -1272,9 +1372,9 @@ interface InfinityInventoryFilter {
1272
1372
  interface InfinityPipeFilter {
1273
1373
 
1274
1374
  /**
1275
- * `"at-least"`, `"at-most"`, `"exactly"`, `"add"`, or `"remove"`. Defaults to `"at-least"`.
1375
+ * Defaults to `"at-least"`.
1276
1376
  */
1277
- mode?: string,
1377
+ mode?: 'at-least' | 'at-most' | 'exactly' | 'add' | 'remove',
1278
1378
 
1279
1379
  /**
1280
1380
  * Name of the fluid.
@@ -1282,7 +1382,7 @@ interface InfinityPipeFilter {
1282
1382
  name: string,
1283
1383
 
1284
1384
  /**
1285
- * The fill percentage the pipe (e.g. 0.5 for 50%). Can't be negative.
1385
+ * The fill percentage the pipe (for example `0.5` for 50%). Can't be negative.
1286
1386
  */
1287
1387
  percentage?: number,
1288
1388
 
@@ -1297,7 +1397,24 @@ interface InfinityPipeFilter {
1297
1397
  * Other attributes may be specified depending on `type`:
1298
1398
  *
1299
1399
  */
1300
- type Ingredient = IngredientFluid | DefaultIngredient
1400
+ interface Ingredient {
1401
+
1402
+ /**
1403
+ * Amount of the item or fluid.
1404
+ */
1405
+ amount: number,
1406
+
1407
+ /**
1408
+ * How much of this ingredient is a catalyst.
1409
+ */
1410
+ catalyst_amount?: number,
1411
+
1412
+ /**
1413
+ * Prototype name of the required item or fluid.
1414
+ */
1415
+ name: string,
1416
+ type: 'item' | 'fluid'
1417
+ }
1301
1418
 
1302
1419
  interface InserterCircuitConditions {
1303
1420
  circuit?: CircuitCondition,
@@ -1450,7 +1567,15 @@ interface LogisticFilter {
1450
1567
  }
1451
1568
 
1452
1569
  interface LogisticParameters {
1570
+
1571
+ /**
1572
+ * Defaults to max uint.
1573
+ */
1453
1574
  max?: number,
1575
+
1576
+ /**
1577
+ * Defaults to `0`.
1578
+ */
1454
1579
  min?: number,
1455
1580
 
1456
1581
  /**
@@ -1710,9 +1835,9 @@ interface MapDifficultySettings {
1710
1835
  recipe_difficulty: defines.difficulty_settings.recipe_difficulty,
1711
1836
 
1712
1837
  /**
1713
- * Either `"after-victory"`, `"always"` or `"never"`. Changing this to `"always"` or `"after-victory"` does not automatically unlock the research queue. See {@link LuaForce | runtime:LuaForce} for that.
1838
+ * Changing this to `"always"` or `"after-victory"` does not automatically unlock the research queue. See {@link LuaForce::research_queue_enabled | runtime:LuaForce::research_queue_enabled} for that.
1714
1839
  */
1715
- research_queue_setting: string,
1840
+ research_queue_setting: 'after-victory' | 'always' | 'never',
1716
1841
  technology_difficulty: defines.difficulty_settings.technology_difficulty,
1717
1842
 
1718
1843
  /**
@@ -1775,7 +1900,7 @@ interface MapGenSettings {
1775
1900
  autoplace_controls: {[key: string]: AutoplaceControl},
1776
1901
 
1777
1902
  /**
1778
- * Each setting in this dictionary maps the string type to the settings for that type. Valid types are `"entity"`, `"tile"` and `"decorative"`.
1903
+ * Each setting in this dictionary maps the string type to the settings for that type.
1779
1904
  */
1780
1905
  autoplace_settings: {[key: string]: AutoplaceSettings},
1781
1906
 
@@ -1919,8 +2044,12 @@ interface MapViewSettings {
1919
2044
  'show-non-standard-map-info'?: boolean,
1920
2045
  'show-player-names'?: boolean,
1921
2046
  'show-pollution'?: boolean,
2047
+ 'show-rail-signal-states'?: boolean,
2048
+ 'show-recipe-icons'?: boolean,
2049
+ 'show-tags'?: boolean,
1922
2050
  'show-train-station-names'?: boolean,
1923
- 'show-turret-range'?: boolean
2051
+ 'show-turret-range'?: boolean,
2052
+ 'show-worker-robots'?: boolean
1924
2053
  }
1925
2054
 
1926
2055
  interface ModChangeData {
@@ -1952,6 +2081,11 @@ interface ModSetting {
1952
2081
  */
1953
2082
  type ModSettingPrototypeFilter = ModSettingPrototypeFilterMod | ModSettingPrototypeFilterSettingType | ModSettingPrototypeFilterType
1954
2083
 
2084
+ /**
2085
+ * Used by {@link TechnologyModifier | runtime:TechnologyModifier}.
2086
+ */
2087
+ type ModifierType = 'inserter-stack-size-bonus' | 'stack-inserter-capacity-bonus' | 'laboratory-speed' | 'character-logistic-trash-slots' | 'maximum-following-robots-count' | 'worker-robot-speed' | 'worker-robot-storage' | 'ghost-time-to-live' | 'turret-attack' | 'ammo-damage' | 'give-item' | 'gun-speed' | 'unlock-recipe' | 'character-crafting-speed' | 'character-mining-speed' | 'character-running-speed' | 'character-build-distance' | 'character-item-drop-distance' | 'character-reach-distance' | 'character-resource-reach-distance' | 'character-item-pickup-distance' | 'character-loot-pickup-distance' | 'character-inventory-slots-bonus' | 'deconstruction-time-to-live' | 'max-failed-attempts-per-tick-per-construction-queue' | 'max-successful-attempts-per-tick-per-construction-queue' | 'character-health-bonus' | 'mining-drill-productivity-bonus' | 'train-braking-force-bonus' | 'zoom-to-world-enabled' | 'zoom-to-world-ghost-building-enabled' | 'zoom-to-world-blueprint-enabled' | 'zoom-to-world-deconstruction-planner-enabled' | 'zoom-to-world-upgrade-planner-enabled' | 'zoom-to-world-selection-tool-enabled' | 'worker-robot-battery' | 'laboratory-productivity' | 'follower-robot-lifetime' | 'artillery-range' | 'nothing' | 'character-logistic-requests'
2088
+
1955
2089
  interface ModuleEffectValue {
1956
2090
 
1957
2091
  /**
@@ -2248,16 +2382,8 @@ interface PathfinderWaypoint {
2248
2382
  * A single pipe connection for a given fluidbox.
2249
2383
  */
2250
2384
  interface PipeConnection {
2251
-
2252
- /**
2253
- * One of "normal" or "underground".
2254
- */
2255
- connection_type: string,
2256
-
2257
- /**
2258
- * One of "input", "output", or "input-output".
2259
- */
2260
- flow_direction: string,
2385
+ connection_type: 'normal' | 'underground',
2386
+ flow_direction: 'input' | 'output' | 'input-output',
2261
2387
 
2262
2388
  /**
2263
2389
  * The absolute position of this connection within the entity.
@@ -2306,7 +2432,7 @@ type PlayerIdentification = /* The player index. */ number | /* The player name.
2306
2432
  interface PollutionMapSettings {
2307
2433
 
2308
2434
  /**
2309
- * The amount of pollution eaten by a chunk's tiles as a percentage of 1. Defaults to `1`.
2435
+ * The amount of pollution eaten by a chunk's tiles as a percentage of 1. Also known as absorption modifier. Defaults to `1`.
2310
2436
  */
2311
2437
  ageing: number,
2312
2438
 
@@ -2424,7 +2550,39 @@ interface PrintSettings {
2424
2550
  * ```
2425
2551
  *
2426
2552
  */
2427
- type Product = ProductFluid | DefaultProduct
2553
+ interface Product {
2554
+
2555
+ /**
2556
+ * Amount of the item or fluid to give. If not specified, `amount_min`, `amount_max` and `probability` must all be specified.
2557
+ */
2558
+ amount?: number,
2559
+
2560
+ /**
2561
+ * Maximum amount of the item or fluid to give. Has no effect when `amount` is specified.
2562
+ */
2563
+ amount_max?: number,
2564
+
2565
+ /**
2566
+ * Minimal amount of the item or fluid to give. Has no effect when `amount` is specified.
2567
+ */
2568
+ amount_min?: number,
2569
+
2570
+ /**
2571
+ * How much of this product is a catalyst.
2572
+ */
2573
+ catalyst_amount?: number,
2574
+
2575
+ /**
2576
+ * Prototype name of the result.
2577
+ */
2578
+ name: string,
2579
+
2580
+ /**
2581
+ * A value in range [0, 1]. Item or fluid is only given with this probability; otherwise no product is produced.
2582
+ */
2583
+ probability?: number,
2584
+ type: 'item' | 'fluid'
2585
+ }
2428
2586
 
2429
2587
  interface ProgrammableSpeakerAlertParameters {
2430
2588
  alert_message: string,
@@ -2458,6 +2616,11 @@ interface ProgrammableSpeakerParameters {
2458
2616
  */
2459
2617
  type PrototypeFilter = Array</* for type `"item"` */ ItemPrototypeFilter | /* for type `"tile"` */ TilePrototypeFilter | /* for type `"entity"` */ EntityPrototypeFilter | /* for type `"fluid"` */ FluidPrototypeFilter | /* for type `"recipe"` */ RecipePrototypeFilter | /* for type `"decorative"` */ DecorativePrototypeFilter | /* for type `"achievement"` */ AchievementPrototypeFilter | /* for type `"equipment"` */ EquipmentPrototypeFilter | /* for type `"technology"` */ TechnologyPrototypeFilter>
2460
2618
 
2619
+ /**
2620
+ * One of the following values:
2621
+ */
2622
+ type PrototypeFilterMode = 'none' | 'whitelist' | 'blacklist'
2623
+
2461
2624
  interface PrototypeHistory {
2462
2625
 
2463
2626
  /**
@@ -2564,6 +2727,11 @@ interface ScriptRenderVertexTarget {
2564
2727
  target_offset?: Vector
2565
2728
  }
2566
2729
 
2730
+ /**
2731
+ * Scroll policy of a {@link scroll pane | runtime:LuaGuiElement}.
2732
+ */
2733
+ type ScrollPolicy = 'never' | 'dont-show-but-allow-scrolling' | 'always' | 'auto' | 'auto-and-reserve-space'
2734
+
2567
2735
  interface SelectedPrototypeData {
2568
2736
 
2569
2737
  /**
@@ -2572,12 +2740,12 @@ interface SelectedPrototypeData {
2572
2740
  base_type: string,
2573
2741
 
2574
2742
  /**
2575
- * E.g. `"tree"`.
2743
+ * The `type` of the prototype. E.g. `"tree"`.
2576
2744
  */
2577
2745
  derived_type: string,
2578
2746
 
2579
2747
  /**
2580
- * E.g. `"tree-05"`.
2748
+ * The `name` of the prototype. E.g. `"tree-05"`.
2581
2749
  */
2582
2750
  name: string
2583
2751
  }
@@ -2609,11 +2777,7 @@ interface SignalID {
2609
2777
  * Name of the item, fluid or virtual signal.
2610
2778
  */
2611
2779
  name?: string,
2612
-
2613
- /**
2614
- * `"item"`, `"fluid"`, or `"virtual"`.
2615
- */
2616
- type: string
2780
+ type: 'item' | 'fluid' | 'virtual'
2617
2781
  }
2618
2782
 
2619
2783
  /**
@@ -2767,6 +2931,11 @@ interface SteeringMapSettings {
2767
2931
  */
2768
2932
  type SurfaceIdentification = /* It will be the index of the surface. `nauvis` has index `1`, the first surface-created surface will have index `2` and so on. */ number | /* It will be the surface name. E.g. `"nauvis"`. */ string | /* A reference to {@link LuaSurface | runtime:LuaSurface} may be passed directly. */ LuaSurface
2769
2933
 
2934
+ /**
2935
+ * State of a GUI {@link switch | runtime:LuaGuiElement::switch_state}.
2936
+ */
2937
+ type SwitchState = 'left' | 'right' | 'none'
2938
+
2770
2939
  interface TabAndContent {
2771
2940
  content: LuaGuiElement,
2772
2941
  tab: LuaGuiElement
@@ -2784,6 +2953,11 @@ interface TabAndContent {
2784
2953
  */
2785
2954
  type Tags = {[key: string]: AnyBasic}
2786
2955
 
2956
+ /**
2957
+ * Target type of an {@link AmmoType | runtime:AmmoType}.
2958
+ */
2959
+ type TargetType = /* Fires at an entity. */ 'entity' | /* Fires directly at a position. */ 'position' | /* Fires in a direction. */ 'direction'
2960
+
2787
2961
  /**
2788
2962
  * A technology may be specified in one of three ways.
2789
2963
  */
@@ -2795,7 +2969,13 @@ type TechnologyIdentification = /* The technology name. */ string | /* A referen
2795
2969
  * Other attributes may be specified depending on `type`:
2796
2970
  *
2797
2971
  */
2798
- type TechnologyModifier = TechnologyModifierOtherTypes | TechnologyModifierAmmoDamage | TechnologyModifierGiveItem | TechnologyModifierGunSpeed | TechnologyModifierNothing | TechnologyModifierTurretAttack | TechnologyModifierUnlockRecipe | DefaultTechnologyModifier
2972
+ interface TechnologyModifier {
2973
+
2974
+ /**
2975
+ * Modifier type. Specifies which of the other fields will be available.
2976
+ */
2977
+ type: ModifierType
2978
+ }
2799
2979
 
2800
2980
  /**
2801
2981
  * Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:
@@ -2805,6 +2985,13 @@ type TechnologyModifier = TechnologyModifierOtherTypes | TechnologyModifierAmmoD
2805
2985
  */
2806
2986
  type TechnologyPrototypeFilter = TechnologyPrototypeFilterLevel | TechnologyPrototypeFilterMaxLevel | TechnologyPrototypeFilterResearchUnitIngredient | TechnologyPrototypeFilterTime | TechnologyPrototypeFilterUnlocksRecipe | DefaultTechnologyPrototypeFilter
2807
2987
 
2988
+ /**
2989
+ * The text is aligned so that the target position is at the given side of the text.
2990
+ *
2991
+ * For example, `"right"` aligned text means the right side of the text is at the target position. Or in other words, the target is on the right of the text.
2992
+ */
2993
+ type TextAlign = 'left' | 'right' | 'center'
2994
+
2808
2995
  interface Tile {
2809
2996
 
2810
2997
  /**
@@ -2837,17 +3024,17 @@ type TilePrototypeFilter = TilePrototypeFilterCollisionMask | TilePrototypeFilte
2837
3024
  interface TrainPathAllGoalsResult {
2838
3025
 
2839
3026
  /**
2840
- * Table of the same length as requested goals: each field will tell if related goal is accessible for the train
3027
+ * Array of the same length as requested goals: each field will tell if related goal is accessible for the train.
2841
3028
  */
2842
3029
  accessible: boolean[],
2843
3030
 
2844
3031
  /**
2845
- * Amount of goals that are accessible
3032
+ * Amount of goals that are accessible.
2846
3033
  */
2847
3034
  amount_accessible: number,
2848
3035
 
2849
3036
  /**
2850
- * Table of the same length as requested goals. Only present if request type was "all-goals-penalties"
3037
+ * Array of the same length as requested goals. Only present if request type was `"all-goals-penalties"`.
2851
3038
  */
2852
3039
  penalties?: number[],
2853
3040
 
@@ -2860,17 +3047,17 @@ interface TrainPathAllGoalsResult {
2860
3047
  interface TrainPathAnyGoalResult {
2861
3048
 
2862
3049
  /**
2863
- * True if any goal was accessible
3050
+ * True if any goal was accessible.
2864
3051
  */
2865
3052
  found_path: boolean,
2866
3053
 
2867
3054
  /**
2868
- * If any goal was accessible, this gives index of the particular goal that was found
3055
+ * If any goal was accessible, this gives index of the particular goal that was found.
2869
3056
  */
2870
3057
  goal_index?: number,
2871
3058
 
2872
3059
  /**
2873
- * Penalty of the path to goal if a goal was accessible
3060
+ * Penalty of the path to goal if a goal was accessible.
2874
3061
  */
2875
3062
  penalty?: number,
2876
3063
 
@@ -2888,22 +3075,22 @@ interface TrainPathFinderPathResult {
2888
3075
  found_path: boolean,
2889
3076
 
2890
3077
  /**
2891
- * If path was found, provides index of the specific goal to which the path goes to
3078
+ * If path was found, provides index of the specific goal to which the path goes to.
2892
3079
  */
2893
3080
  goal_index?: number,
2894
3081
 
2895
3082
  /**
2896
- * If path was found, tells if the path was reached from the from_front or train's front end.
3083
+ * If path was found, tells if the path was reached from the `from_front` or train's front end.
2897
3084
  */
2898
3085
  is_front?: boolean,
2899
3086
 
2900
3087
  /**
2901
- * Only returned if return_path was set to true and path was found. Contains all rails in order that are part of the found path
3088
+ * Only returned if `return_path` was set to true and path was found. Contains all rails in order that are part of the found path.
2902
3089
  */
2903
3090
  path?: LuaEntity[],
2904
3091
 
2905
3092
  /**
2906
- * Penalty of the path to goal if path was found
3093
+ * Penalty of the path to goal if path was found.
2907
3094
  */
2908
3095
  penalty?: number,
2909
3096
 
@@ -2913,64 +3100,15 @@ interface TrainPathFinderPathResult {
2913
3100
  steps_count: number,
2914
3101
 
2915
3102
  /**
2916
- * If path was found, provides total length of all rails of the path
3103
+ * If path was found, provides total length of all rails of the path.
2917
3104
  */
2918
3105
  total_length?: number
2919
3106
  }
2920
3107
 
2921
- interface TrainPathFinderRequest {
2922
-
2923
- /**
2924
- * Only relevant if from_back is given. Defaults to true. Providing false will cause the pathfinder to reject a path that starts on back and ends within the same segment as the path would be too short to provide correct alignment with a goal.
2925
- */
2926
- allow_path_within_segment_back?: boolean,
2927
-
2928
- /**
2929
- * Only relevant if from_front is given. Defaults to true. Providing false will cause the pathfinder to reject a path that starts on front and ends within the same segment as the path would be too short to provide correct alignment with a goal.
2930
- */
2931
- allow_path_within_segment_front?: boolean,
2932
-
2933
- /**
2934
- * Manually provided starting back of the train.
2935
- */
2936
- from_back?: RailEnd,
2937
-
2938
- /**
2939
- * Manually provided starting front of the train.
2940
- */
2941
- from_front?: RailEnd,
2942
- goals: Array<TrainStopGoal | RailEnd>,
2943
-
2944
- /**
2945
- * Defaults to false. If set to true, pathfinder will not return a path that cannot have its beginning immediately reserved causing train to stop inside of intersection.
2946
- */
2947
- in_chain_signal_section?: boolean,
2948
-
2949
- /**
2950
- * Only relevant if request type is "path". Returning a full path is expensive due to multiple LuaEntity created. In order for path to be returned, true must be provided here. Defaults to false in which case a path will not be provided.
2951
- */
2952
- return_path?: boolean,
2953
-
2954
- /**
2955
- * Only relevant if none of from_front/from_back was provied in which case from_front and from_back are deduced from the train. Selects which train ends should be considered as starts. Possible values: "respect-movement-direction", "any-direction-with-locomotives". Defaults to "any-direction-with-locomotives"
2956
- */
2957
- search_direction?: string,
2958
-
2959
- /**
2960
- * Maximum amount of steps pathfinder is allowed to perform
2961
- */
2962
- steps_limit?: number,
2963
-
2964
- /**
2965
- * Mandatory if from_front and from_back are not provided, optional otherwise. Selects a context for the pathfinder to decide which train to exclude from penalties and which signals are considered possible to reacquire. If from_front and from_back are not provided, then it is also used to collect front and back ends for the search
2966
- */
2967
- train?: LuaTrain,
2968
-
2969
- /**
2970
- * Request type. "path", "any-goal-accessible", "all-goals-accessible" or "all-goals-penalties". Defaults to "path"
2971
- */
2972
- type?: string
2973
- }
3108
+ /**
3109
+ * A {@link string | runtime:string} specifying the type of request for {@link LuaGameScript::request_train_path | runtime:LuaGameScript::request_train_path}.
3110
+ */
3111
+ type TrainPathRequestType = /* The method will return {@link TrainPathFinderPathResult | runtime:TrainPathFinderPathResult}. */ 'path' | /* The method will return {@link TrainPathAnyGoalResult | runtime:TrainPathAnyGoalResult}. */ 'any-goal-accessible' | /* The method will return {@link TrainPathAllGoalsResult | runtime:TrainPathAllGoalsResult}. */ 'all-goals-accessible' | /* The method will return {@link TrainPathAllGoalsResult | runtime:TrainPathAllGoalsResult} with `penalties`. */ 'all-goals-penalties'
2974
3112
 
2975
3113
  interface TrainSchedule {
2976
3114
 
@@ -3008,7 +3146,7 @@ interface TrainScheduleRecord {
3008
3146
  interface TrainStopGoal {
3009
3147
 
3010
3148
  /**
3011
- * Train stop target. Must be connected to rail (LuaEntity::connected_rail returns valid LuaEntity)
3149
+ * Train stop target. Must be connected to rail ({@link LuaEntity::connected_rail | runtime:LuaEntity::connected_rail} returns valid LuaEntity).
3012
3150
  */
3013
3151
  train_stop: LuaEntity
3014
3152
  }
@@ -3016,24 +3154,24 @@ interface TrainStopGoal {
3016
3154
  interface TriggerDelivery {
3017
3155
  source_effects: TriggerEffectItem[],
3018
3156
  target_effects: TriggerEffectItem[],
3019
-
3020
- /**
3021
- * One of `"instant"`, `"projectile"`, `"flame-thrower"`, `"beam"`, `"stream"`, `"artillery"`.
3022
- */
3023
- type: string
3157
+ type: 'instant' | 'projectile' | 'flame-thrower' | 'beam' | 'stream' | 'artillery'
3024
3158
  }
3025
3159
 
3026
3160
  interface TriggerEffectItem {
3027
3161
  affects_target: boolean,
3162
+ damage_type_filters?: DamageTypeFilters,
3163
+ probability: number,
3028
3164
  repeat_count: number,
3165
+ repeat_count_deviation: number,
3029
3166
  show_in_tooltip: boolean,
3030
-
3031
- /**
3032
- * One of`"damage"`, `"create-entity"`, `"create-explosion"`, `"create-fire"`, `"create-smoke"`, `"create-trivial-smoke"`, `"create-particle"`, `"create-sticker"`, `"nested-result"`, `"play-sound"`, `"push-back"`, `"destroy-cliffs"`, `"show-explosion-on-chart"`, `"insert-item"`, `"script"`.
3033
- */
3034
- type: string
3167
+ type: TriggerEffectItemType
3035
3168
  }
3036
3169
 
3170
+ /**
3171
+ * Used by {@link TriggerEffectItem | runtime:TriggerEffectItem}.
3172
+ */
3173
+ type TriggerEffectItemType = 'damage' | 'create-entity' | 'create-explosion' | 'create-fire' | 'create-smoke' | 'create-trivial-smoke' | 'create-particle' | 'create-sticker' | 'create-decorative' | 'nested-result' | 'play-sound' | 'push-back' | 'destroy-cliffs' | 'show-explosion-on-chart' | 'insert-item' | 'script' | 'set-tile' | 'invoke-tile-trigger' | 'destroy-decoratives' | 'camera-effect'
3174
+
3037
3175
  interface TriggerItem {
3038
3176
  action_delivery?: TriggerDelivery[],
3039
3177
 
@@ -3052,13 +3190,10 @@ interface TriggerItem {
3052
3190
  */
3053
3191
  force: ForceCondition,
3054
3192
  ignore_collision_condition: boolean,
3193
+ probability: number,
3055
3194
  repeat_count: number,
3056
3195
  trigger_target_mask: TriggerTargetMask,
3057
-
3058
- /**
3059
- * One of `"direct"`, `"area"`, `"line"`, `"cluster"`.
3060
- */
3061
- type: string
3196
+ type: 'direct' | 'area' | 'line' | 'cluster'
3062
3197
  }
3063
3198
 
3064
3199
  /**
@@ -3149,11 +3284,7 @@ interface UpgradeFilter {
3149
3284
  * Name of the item, or entity.
3150
3285
  */
3151
3286
  name?: string,
3152
-
3153
- /**
3154
- * `"item"`, or `"entity"`.
3155
- */
3156
- type: string
3287
+ type: 'item' | 'entity'
3157
3288
  }
3158
3289
 
3159
3290
  /**
@@ -3174,12 +3305,19 @@ interface VehicleAutomaticTargetingParameters {
3174
3305
  auto_target_without_gunner: boolean
3175
3306
  }
3176
3307
 
3308
+ /**
3309
+ * The text is aligned so that the target position is at the given side of the text.
3310
+ *
3311
+ * For example, `"top"` aligned text means the top of the text is at the target position. Or in other words, the target is at the top of the text.
3312
+ */
3313
+ type VerticalTextAlign = 'top' | 'middle' | 'baseline' | 'bottom'
3314
+
3177
3315
  interface WaitCondition {
3178
3316
 
3179
3317
  /**
3180
- * Either `"and"`, or `"or"`. Tells how this condition is to be compared with the preceding conditions in the corresponding `wait_conditions` array.
3318
+ * Specifies how this condition is to be compared with the preceding conditions in the corresponding `wait_conditions` array.
3181
3319
  */
3182
- compare_type: string,
3320
+ compare_type: 'and' | 'or',
3183
3321
 
3184
3322
  /**
3185
3323
  * Only present when `type` is `"item_count"`, `"circuit"` or `"fluid_count"`, and a circuit condition is configured.
@@ -3190,13 +3328,14 @@ interface WaitCondition {
3190
3328
  * Number of ticks to wait when `type` is `"time"`, or number of ticks of inactivity when `type` is `"inactivity"`.
3191
3329
  */
3192
3330
  ticks?: number,
3193
-
3194
- /**
3195
- * One of `"time"`, `"inactivity"`, `"full"`, `"empty"`, `"item_count"`, `"circuit"`, `"robots_inactive"`, `"fluid_count"`, `"passenger_present"`, `"passenger_not_present"`.
3196
- */
3197
- type: string
3331
+ type: WaitConditionType
3198
3332
  }
3199
3333
 
3334
+ /**
3335
+ * Type of a {@link WaitCondition | runtime:WaitCondition}.
3336
+ */
3337
+ type WaitConditionType = 'time' | 'full' | 'empty' | 'item_count' | 'circuit' | 'inactivity' | 'robots_inactive' | 'fluid_count' | 'passenger_present' | 'passenger_not_present'
3338
+
3200
3339
  interface WireConnectionDefinition {
3201
3340
 
3202
3341
  /**
@@ -3238,9 +3377,9 @@ interface BaseAchievementPrototypeFilter {
3238
3377
  invert?: boolean,
3239
3378
 
3240
3379
  /**
3241
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3380
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3242
3381
  */
3243
- mode?: string
3382
+ mode?: 'or' | 'and'
3244
3383
  }
3245
3384
 
3246
3385
  interface AchievementPrototypeFilterType extends BaseAchievementPrototypeFilter {
@@ -3264,83 +3403,12 @@ interface DefaultAchievementPrototypeFilter extends BaseAchievementPrototypeFilt
3264
3403
  filter: 'allowed-without-fight'
3265
3404
  }
3266
3405
 
3267
- interface BaseAttackParameters {
3268
-
3269
- /**
3270
- * List of the names of compatible {@link LuaAmmoCategoryPrototypes | runtime:LuaAmmoCategoryPrototype}.
3271
- */
3272
- ammo_categories?: string[],
3273
-
3274
- /**
3275
- * Multiplier applied to the ammo consumption of an attack.
3276
- */
3277
- ammo_consumption_modifier: number,
3278
- ammo_type?: AmmoType,
3279
-
3280
- /**
3281
- * Minimum amount of ticks between shots. If this is less than `1`, multiple shots can be performed per tick.
3282
- */
3283
- cooldown: number,
3284
-
3285
- /**
3286
- * Multiplier applied to the damage of an attack.
3287
- */
3288
- damage_modifier: number,
3289
-
3290
- /**
3291
- * When searching for the nearest enemy to attack, `fire_penalty` is added to the enemy's distance if they are on fire.
3292
- */
3293
- fire_penalty: number,
3294
-
3295
- /**
3296
- * When searching for an enemy to attack, a higher `health_penalty` will discourage targeting enemies with high health. A negative penalty will do the opposite.
3297
- */
3298
- health_penalty: number,
3299
-
3300
- /**
3301
- * If less than `range`, the entity will choose a random distance between `range` and `min_attack_distance` and attack from that distance. Used for spitters.
3302
- */
3303
- min_attack_distance: number,
3304
-
3305
- /**
3306
- * Minimum range of attack. Used with flamethrower turrets to prevent self-immolation.
3307
- */
3308
- min_range: number,
3309
- movement_slow_down_cooldown: number,
3310
- movement_slow_down_factor: number,
3311
-
3312
- /**
3313
- * Maximum range of attack.
3314
- */
3315
- range: number,
3316
-
3317
- /**
3318
- * Defines how the range is determined. Either `'center-to-center'` or `'bounding-box-to-bounding-box'`.
3319
- */
3320
- range_mode: string,
3321
-
3322
- /**
3323
- * When searching for an enemy to attack, a higher `rotate_penalty` will discourage targeting enemies that would take longer to turn to face.
3324
- */
3325
- rotate_penalty: number,
3326
-
3327
- /**
3328
- * The arc that the entity can attack in as a fraction of a circle. A value of `1` means the full 360 degrees.
3329
- */
3330
- turn_range: number,
3331
-
3332
- /**
3333
- * Number of ticks it takes for the weapon to actually shoot after it has been ordered to do so.
3334
- */
3335
- warmup: number
3336
- }
3337
-
3338
- interface AttackParametersProjectile extends BaseAttackParameters {
3339
-
3340
- /**
3341
- * The type of AttackParameter. One of `'projectile'`, `'stream'` or `'beam'`.
3342
- */
3343
- type: 'projectile',
3406
+ /**
3407
+ * @remarks
3408
+ * Applies to `projectile` variant case
3409
+ *
3410
+ */
3411
+ interface AttackParametersProjectile extends AttackParameters {
3344
3412
  projectile_center: Vector,
3345
3413
  projectile_creation_distance: number,
3346
3414
  projectile_creation_parameters?: CircularProjectileCreationSpecification[],
@@ -3348,12 +3416,12 @@ interface AttackParametersProjectile extends BaseAttackParameters {
3348
3416
  shell_particle?: CircularParticleCreationSpecification
3349
3417
  }
3350
3418
 
3351
- interface AttackParametersStream extends BaseAttackParameters {
3352
-
3353
- /**
3354
- * The type of AttackParameter. One of `'projectile'`, `'stream'` or `'beam'`.
3355
- */
3356
- type: 'stream',
3419
+ /**
3420
+ * @remarks
3421
+ * Applies to `stream` variant case
3422
+ *
3423
+ */
3424
+ interface AttackParametersStream extends AttackParameters {
3357
3425
  fluid_consumption: number,
3358
3426
  fluids?: AttackParameterFluid[],
3359
3427
  gun_barrel_length: number,
@@ -3361,24 +3429,12 @@ interface AttackParametersStream extends BaseAttackParameters {
3361
3429
  projectile_creation_parameters?: CircularProjectileCreationSpecification[]
3362
3430
  }
3363
3431
 
3364
- interface DefaultAttackParameters extends BaseAttackParameters {
3365
-
3366
- /**
3367
- * The type of AttackParameter. One of `'projectile'`, `'stream'` or `'beam'`.
3368
- */
3369
- type: 'beam'
3370
- }
3371
-
3372
- interface BaseCapsuleAction {
3373
-
3374
- }
3375
-
3376
- interface CapsuleActionArtilleryRemote extends BaseCapsuleAction {
3377
-
3378
- /**
3379
- * One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
3380
- */
3381
- type: 'artillery-remote',
3432
+ /**
3433
+ * @remarks
3434
+ * Applies to `artillery-remote` variant case
3435
+ *
3436
+ */
3437
+ interface CapsuleActionArtilleryRemote extends CapsuleAction {
3382
3438
 
3383
3439
  /**
3384
3440
  * Name of the {@link flare prototype | runtime:LuaEntityPrototype}.
@@ -3386,23 +3442,23 @@ interface CapsuleActionArtilleryRemote extends BaseCapsuleAction {
3386
3442
  flare: string
3387
3443
  }
3388
3444
 
3389
- interface CapsuleActionDestroyCliffs extends BaseCapsuleAction {
3390
-
3391
- /**
3392
- * One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
3393
- */
3394
- type: 'destroy-cliffs',
3445
+ /**
3446
+ * @remarks
3447
+ * Applies to `destroy-cliffs` variant case
3448
+ *
3449
+ */
3450
+ interface CapsuleActionDestroyCliffs extends CapsuleAction {
3395
3451
  attack_parameters: AttackParameters,
3396
3452
  radius: number,
3397
3453
  timeout: number
3398
3454
  }
3399
3455
 
3400
- interface CapsuleActionEquipmentRemote extends BaseCapsuleAction {
3401
-
3402
- /**
3403
- * One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
3404
- */
3405
- type: 'equipment-remote',
3456
+ /**
3457
+ * @remarks
3458
+ * Applies to `equipment-remote` variant case
3459
+ *
3460
+ */
3461
+ interface CapsuleActionEquipmentRemote extends CapsuleAction {
3406
3462
 
3407
3463
  /**
3408
3464
  * Name of the {@link LuaEquipmentPrototype | runtime:LuaEquipmentPrototype}.
@@ -3410,12 +3466,12 @@ interface CapsuleActionEquipmentRemote extends BaseCapsuleAction {
3410
3466
  equipment: string
3411
3467
  }
3412
3468
 
3413
- interface CapsuleActionThrow extends BaseCapsuleAction {
3414
-
3415
- /**
3416
- * One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
3417
- */
3418
- type: 'throw',
3469
+ /**
3470
+ * @remarks
3471
+ * Applies to `throw` variant case
3472
+ *
3473
+ */
3474
+ interface CapsuleActionThrow extends CapsuleAction {
3419
3475
  attack_parameters: AttackParameters,
3420
3476
 
3421
3477
  /**
@@ -3424,12 +3480,12 @@ interface CapsuleActionThrow extends BaseCapsuleAction {
3424
3480
  uses_stack: boolean
3425
3481
  }
3426
3482
 
3427
- interface CapsuleActionUseOnSelf extends BaseCapsuleAction {
3428
-
3429
- /**
3430
- * One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
3431
- */
3432
- type: 'use-on-self',
3483
+ /**
3484
+ * @remarks
3485
+ * Applies to `use-on-self` variant case
3486
+ *
3487
+ */
3488
+ interface CapsuleActionUseOnSelf extends CapsuleAction {
3433
3489
  attack_parameters: AttackParameters
3434
3490
  }
3435
3491
 
@@ -3639,9 +3695,9 @@ interface BaseDecorativePrototypeFilter {
3639
3695
  invert?: boolean,
3640
3696
 
3641
3697
  /**
3642
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3698
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3643
3699
  */
3644
- mode?: string
3700
+ mode?: 'or' | 'and'
3645
3701
  }
3646
3702
 
3647
3703
  interface DecorativePrototypeFilterCollisionMask extends BaseDecorativePrototypeFilter {
@@ -3674,9 +3730,9 @@ interface BaseEntityPrototypeFilter {
3674
3730
  invert?: boolean,
3675
3731
 
3676
3732
  /**
3677
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3733
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3678
3734
  */
3679
- mode?: string
3735
+ mode?: 'or' | 'and'
3680
3736
  }
3681
3737
 
3682
3738
  interface EntityPrototypeFilterBuildBaseEvolutionRequirement extends BaseEntityPrototypeFilter {
@@ -3700,11 +3756,7 @@ interface EntityPrototypeFilterCollisionMask extends BaseEntityPrototypeFilter {
3700
3756
  */
3701
3757
  filter: 'collision-mask',
3702
3758
  mask: CollisionMask | CollisionMaskWithFlags,
3703
-
3704
- /**
3705
- * How to filter: `"collides"`, `"layers-equals"`, `"contains-any"` or `"contains-all"`
3706
- */
3707
- mask_mode: string
3759
+ mask_mode: 'collides' | 'layers-equals' | 'contains-any' | 'contains-all'
3708
3760
  }
3709
3761
 
3710
3762
  interface EntityPrototypeFilterCraftingCategory extends BaseEntityPrototypeFilter {
@@ -3715,7 +3767,7 @@ interface EntityPrototypeFilterCraftingCategory extends BaseEntityPrototypeFilte
3715
3767
  filter: 'crafting-category',
3716
3768
 
3717
3769
  /**
3718
- * Matches if the prototype is for a crafting machine with this crafting category.
3770
+ * Matches if the prototype is for a crafting machine with this {@link crafting category | runtime:LuaEntityPrototype::crafting_categories}.
3719
3771
  */
3720
3772
  crafting_category: string
3721
3773
  }
@@ -3740,11 +3792,7 @@ interface EntityPrototypeFilterFlag extends BaseEntityPrototypeFilter {
3740
3792
  * The condition to filter on. One of `"flying-robot"`, `"robot-with-logistics-interface"`, `"rail"`, `"ghost"`, `"explosion"`, `"vehicle"`, `"crafting-machine"`, `"rolling-stock"`, `"turret"`, `"transport-belt-connectable"`, `"wall-connectable"`, `"buildable"`, `"placable-in-editor"`, `"clonable"`, `"selectable"`, `"hidden"`, `"entity-with-health"`, `"building"`, `"fast-replaceable"`, `"uses-direction"`, `"minable"`, `"circuit-connectable"`, `"autoplace"`, `"blueprintable"`, `"item-to-place"`, `"name"`, `"type"`, `"collision-mask"`, `"flag"`, `"build-base-evolution-requirement"`, `"selection-priority"`, `"emissions"`, `"crafting-category"`.
3741
3793
  */
3742
3794
  filter: 'flag',
3743
-
3744
- /**
3745
- * One of the values in {@link EntityPrototypeFlags | runtime:EntityPrototypeFlags}.
3746
- */
3747
- flag: string
3795
+ flag: EntityPrototypeFlag
3748
3796
  }
3749
3797
 
3750
3798
  interface EntityPrototypeFilterName extends BaseEntityPrototypeFilter {
@@ -3803,9 +3851,9 @@ interface BaseEquipmentPrototypeFilter {
3803
3851
  invert?: boolean,
3804
3852
 
3805
3853
  /**
3806
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3854
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3807
3855
  */
3808
- mode?: string
3856
+ mode?: 'or' | 'and'
3809
3857
  }
3810
3858
 
3811
3859
  interface EquipmentPrototypeFilterType extends BaseEquipmentPrototypeFilter {
@@ -3837,9 +3885,9 @@ interface BaseFluidPrototypeFilter {
3837
3885
  invert?: boolean,
3838
3886
 
3839
3887
  /**
3840
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3888
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
3841
3889
  */
3842
- mode?: string
3890
+ mode?: 'or' | 'and'
3843
3891
  }
3844
3892
 
3845
3893
  interface FluidPrototypeFilterDefaultTemperature extends BaseFluidPrototypeFilter {
@@ -3960,16 +4008,12 @@ interface DefaultFluidPrototypeFilter extends BaseFluidPrototypeFilter {
3960
4008
  filter: 'hidden'
3961
4009
  }
3962
4010
 
3963
- interface BaseGuiArrowSpecification {
3964
-
3965
- }
3966
-
3967
- interface GuiArrowSpecificationCraftingQueue extends BaseGuiArrowSpecification {
3968
-
3969
- /**
3970
- * This determines which of the following fields will be required. Must be one of `"nowhere"` (will remove the arrow entirely), `"goal"` (will point to the current goal), `"entity_info"`, `"active_window"`, `"entity"`, `"position"`, `"crafting_queue"` or `"item_stack"` (will point to a given item stack in an inventory). Depending on this value, other fields may have to be specified.
3971
- */
3972
- type: 'crafting_queue',
4011
+ /**
4012
+ * @remarks
4013
+ * Applies to `crafting_queue` variant case
4014
+ *
4015
+ */
4016
+ interface GuiArrowSpecificationCraftingQueue extends GuiArrowSpecification {
3973
4017
 
3974
4018
  /**
3975
4019
  * Index in the crafting queue to point to.
@@ -3977,21 +4021,21 @@ interface GuiArrowSpecificationCraftingQueue extends BaseGuiArrowSpecification {
3977
4021
  crafting_queueindex: number
3978
4022
  }
3979
4023
 
3980
- interface GuiArrowSpecificationEntity extends BaseGuiArrowSpecification {
3981
-
3982
- /**
3983
- * This determines which of the following fields will be required. Must be one of `"nowhere"` (will remove the arrow entirely), `"goal"` (will point to the current goal), `"entity_info"`, `"active_window"`, `"entity"`, `"position"`, `"crafting_queue"` or `"item_stack"` (will point to a given item stack in an inventory). Depending on this value, other fields may have to be specified.
3984
- */
3985
- type: 'entity',
4024
+ /**
4025
+ * @remarks
4026
+ * Applies to `entity` variant case
4027
+ *
4028
+ */
4029
+ interface GuiArrowSpecificationEntity extends GuiArrowSpecification {
3986
4030
  entity: LuaEntity
3987
4031
  }
3988
4032
 
3989
- interface GuiArrowSpecificationItemStack extends BaseGuiArrowSpecification {
3990
-
3991
- /**
3992
- * This determines which of the following fields will be required. Must be one of `"nowhere"` (will remove the arrow entirely), `"goal"` (will point to the current goal), `"entity_info"`, `"active_window"`, `"entity"`, `"position"`, `"crafting_queue"` or `"item_stack"` (will point to a given item stack in an inventory). Depending on this value, other fields may have to be specified.
3993
- */
3994
- type: 'item_stack',
4033
+ /**
4034
+ * @remarks
4035
+ * Applies to `item_stack` variant case
4036
+ *
4037
+ */
4038
+ interface GuiArrowSpecificationItemStack extends GuiArrowSpecification {
3995
4039
 
3996
4040
  /**
3997
4041
  * Which inventory the stack is in.
@@ -4002,54 +4046,24 @@ interface GuiArrowSpecificationItemStack extends BaseGuiArrowSpecification {
4002
4046
  * Which stack to point to.
4003
4047
  */
4004
4048
  item_stack_index: number,
4005
-
4006
- /**
4007
- * Must be either `"player"`, `"target"`, `"player-quickbar"` or `"player-equipment-bar"`.
4008
- */
4009
- source: string
4049
+ source: 'player' | 'target' | 'player-quickbar' | 'player-equipment-bar'
4010
4050
  }
4011
4051
 
4012
- interface GuiArrowSpecificationPosition extends BaseGuiArrowSpecification {
4013
-
4014
- /**
4015
- * This determines which of the following fields will be required. Must be one of `"nowhere"` (will remove the arrow entirely), `"goal"` (will point to the current goal), `"entity_info"`, `"active_window"`, `"entity"`, `"position"`, `"crafting_queue"` or `"item_stack"` (will point to a given item stack in an inventory). Depending on this value, other fields may have to be specified.
4016
- */
4017
- type: 'position',
4052
+ /**
4053
+ * @remarks
4054
+ * Applies to `position` variant case
4055
+ *
4056
+ */
4057
+ interface GuiArrowSpecificationPosition extends GuiArrowSpecification {
4018
4058
  position: MapPosition
4019
4059
  }
4020
4060
 
4021
- interface DefaultGuiArrowSpecification extends BaseGuiArrowSpecification {
4022
-
4023
- /**
4024
- * This determines which of the following fields will be required. Must be one of `"nowhere"` (will remove the arrow entirely), `"goal"` (will point to the current goal), `"entity_info"`, `"active_window"`, `"entity"`, `"position"`, `"crafting_queue"` or `"item_stack"` (will point to a given item stack in an inventory). Depending on this value, other fields may have to be specified.
4025
- */
4026
- type: 'nowhere' | 'goal' | 'entity_info' | 'active_window'
4027
- }
4028
-
4029
- interface BaseIngredient {
4030
-
4031
- /**
4032
- * Amount of the item or fluid.
4033
- */
4034
- amount: number,
4035
-
4036
- /**
4037
- * How much of this ingredient is a catalyst.
4038
- */
4039
- catalyst_amount?: number,
4040
-
4041
- /**
4042
- * Prototype name of the required item or fluid.
4043
- */
4044
- name: string
4045
- }
4046
-
4047
- interface IngredientFluid extends BaseIngredient {
4048
-
4049
- /**
4050
- * `"item"` or `"fluid"`.
4051
- */
4052
- type: 'fluid',
4061
+ /**
4062
+ * @remarks
4063
+ * Applies to `fluid` variant case
4064
+ *
4065
+ */
4066
+ interface IngredientFluid extends Ingredient {
4053
4067
 
4054
4068
  /**
4055
4069
  * The maximum fluid temperature allowed.
@@ -4062,14 +4076,6 @@ interface IngredientFluid extends BaseIngredient {
4062
4076
  minimum_temperature?: number
4063
4077
  }
4064
4078
 
4065
- interface DefaultIngredient extends BaseIngredient {
4066
-
4067
- /**
4068
- * `"item"` or `"fluid"`.
4069
- */
4070
- type: 'item'
4071
- }
4072
-
4073
4079
  interface BaseItemPrototypeFilter {
4074
4080
 
4075
4081
  /**
@@ -4078,9 +4084,9 @@ interface BaseItemPrototypeFilter {
4078
4084
  invert?: boolean,
4079
4085
 
4080
4086
  /**
4081
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4087
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4082
4088
  */
4083
- mode?: string
4089
+ mode?: 'or' | 'and'
4084
4090
  }
4085
4091
 
4086
4092
  interface ItemPrototypeFilterBurntResult extends BaseItemPrototypeFilter {
@@ -4116,11 +4122,7 @@ interface ItemPrototypeFilterFlag extends BaseItemPrototypeFilter {
4116
4122
  * The condition to filter on. One of `"tool"`, `"mergeable"`, `"item-with-inventory"`, `"selection-tool"`, `"item-with-label"`, `"has-rocket-launch-products"`, `"fuel"`, `"place-result"`, `"burnt-result"`, `"place-as-tile"`, `"placed-as-equipment-result"`, `"name"`, `"type"`, `"flag"`, `"subgroup"`, `"fuel-category"`, `"stack-size"`, `"default-request-amount"`, `"wire-count"`, `"fuel-value"`, `"fuel-acceleration-multiplier"`, `"fuel-top-speed-multiplier"`, `"fuel-emissions-multiplier"`.
4117
4123
  */
4118
4124
  filter: 'flag',
4119
-
4120
- /**
4121
- * One of the values in {@link ItemPrototypeFlags | runtime:ItemPrototypeFlags}.
4122
- */
4123
- flag: string
4125
+ flag: ItemPrototypeFlag
4124
4126
  }
4125
4127
 
4126
4128
  interface ItemPrototypeFilterFuelAccelerationMultiplier extends BaseItemPrototypeFilter {
@@ -4314,9 +4316,9 @@ interface BaseLuaEntityClonedEventFilter {
4314
4316
  invert?: boolean,
4315
4317
 
4316
4318
  /**
4317
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4319
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4318
4320
  */
4319
- mode?: string
4321
+ mode?: 'or' | 'and'
4320
4322
  }
4321
4323
 
4322
4324
  interface LuaEntityClonedEventFilterGhostName extends BaseLuaEntityClonedEventFilter {
@@ -4387,9 +4389,9 @@ interface BaseLuaEntityDamagedEventFilter {
4387
4389
  invert?: boolean,
4388
4390
 
4389
4391
  /**
4390
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4392
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4391
4393
  */
4392
- mode?: string
4394
+ mode?: 'or' | 'and'
4393
4395
  }
4394
4396
 
4395
4397
  interface LuaEntityDamagedEventFilterDamageType extends BaseLuaEntityDamagedEventFilter {
@@ -4515,9 +4517,9 @@ interface BaseLuaEntityDeconstructionCancelledEventFilter {
4515
4517
  invert?: boolean,
4516
4518
 
4517
4519
  /**
4518
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4520
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4519
4521
  */
4520
- mode?: string
4522
+ mode?: 'or' | 'and'
4521
4523
  }
4522
4524
 
4523
4525
  interface LuaEntityDeconstructionCancelledEventFilterGhostName extends BaseLuaEntityDeconstructionCancelledEventFilter {
@@ -4588,9 +4590,9 @@ interface BaseLuaEntityDiedEventFilter {
4588
4590
  invert?: boolean,
4589
4591
 
4590
4592
  /**
4591
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4593
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4592
4594
  */
4593
- mode?: string
4595
+ mode?: 'or' | 'and'
4594
4596
  }
4595
4597
 
4596
4598
  interface LuaEntityDiedEventFilterGhostName extends BaseLuaEntityDiedEventFilter {
@@ -4661,9 +4663,9 @@ interface BaseLuaEntityMarkedForDeconstructionEventFilter {
4661
4663
  invert?: boolean,
4662
4664
 
4663
4665
  /**
4664
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4666
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4665
4667
  */
4666
- mode?: string
4668
+ mode?: 'or' | 'and'
4667
4669
  }
4668
4670
 
4669
4671
  interface LuaEntityMarkedForDeconstructionEventFilterGhostName extends BaseLuaEntityMarkedForDeconstructionEventFilter {
@@ -4734,9 +4736,9 @@ interface BaseLuaEntityMarkedForUpgradeEventFilter {
4734
4736
  invert?: boolean,
4735
4737
 
4736
4738
  /**
4737
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4739
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4738
4740
  */
4739
- mode?: string
4741
+ mode?: 'or' | 'and'
4740
4742
  }
4741
4743
 
4742
4744
  interface LuaEntityMarkedForUpgradeEventFilterGhostName extends BaseLuaEntityMarkedForUpgradeEventFilter {
@@ -4807,9 +4809,9 @@ interface BaseLuaPlayerBuiltEntityEventFilter {
4807
4809
  invert?: boolean,
4808
4810
 
4809
4811
  /**
4810
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4812
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4811
4813
  */
4812
- mode?: string
4814
+ mode?: 'or' | 'and'
4813
4815
  }
4814
4816
 
4815
4817
  interface LuaPlayerBuiltEntityEventFilterForce extends BaseLuaPlayerBuiltEntityEventFilter {
@@ -4893,9 +4895,9 @@ interface BaseLuaPlayerMinedEntityEventFilter {
4893
4895
  invert?: boolean,
4894
4896
 
4895
4897
  /**
4896
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4898
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4897
4899
  */
4898
- mode?: string
4900
+ mode?: 'or' | 'and'
4899
4901
  }
4900
4902
 
4901
4903
  interface LuaPlayerMinedEntityEventFilterGhostName extends BaseLuaPlayerMinedEntityEventFilter {
@@ -4966,9 +4968,9 @@ interface BaseLuaPlayerRepairedEntityEventFilter {
4966
4968
  invert?: boolean,
4967
4969
 
4968
4970
  /**
4969
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4971
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
4970
4972
  */
4971
- mode?: string
4973
+ mode?: 'or' | 'and'
4972
4974
  }
4973
4975
 
4974
4976
  interface LuaPlayerRepairedEntityEventFilterGhostName extends BaseLuaPlayerRepairedEntityEventFilter {
@@ -5039,9 +5041,9 @@ interface BaseLuaPostEntityDiedEventFilter {
5039
5041
  invert?: boolean,
5040
5042
 
5041
5043
  /**
5042
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5044
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5043
5045
  */
5044
- mode?: string
5046
+ mode?: 'or' | 'and'
5045
5047
  }
5046
5048
 
5047
5049
  interface LuaPostEntityDiedEventFilterType extends BaseLuaPostEntityDiedEventFilter {
@@ -5065,9 +5067,9 @@ interface BaseLuaPreGhostDeconstructedEventFilter {
5065
5067
  invert?: boolean,
5066
5068
 
5067
5069
  /**
5068
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5070
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5069
5071
  */
5070
- mode?: string
5072
+ mode?: 'or' | 'and'
5071
5073
  }
5072
5074
 
5073
5075
  interface LuaPreGhostDeconstructedEventFilterGhostName extends BaseLuaPreGhostDeconstructedEventFilter {
@@ -5138,9 +5140,9 @@ interface BaseLuaPreGhostUpgradedEventFilter {
5138
5140
  invert?: boolean,
5139
5141
 
5140
5142
  /**
5141
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5143
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5142
5144
  */
5143
- mode?: string
5145
+ mode?: 'or' | 'and'
5144
5146
  }
5145
5147
 
5146
5148
  interface LuaPreGhostUpgradedEventFilterGhostName extends BaseLuaPreGhostUpgradedEventFilter {
@@ -5211,9 +5213,9 @@ interface BaseLuaPrePlayerMinedEntityEventFilter {
5211
5213
  invert?: boolean,
5212
5214
 
5213
5215
  /**
5214
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5216
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5215
5217
  */
5216
- mode?: string
5218
+ mode?: 'or' | 'and'
5217
5219
  }
5218
5220
 
5219
5221
  interface LuaPrePlayerMinedEntityEventFilterGhostName extends BaseLuaPrePlayerMinedEntityEventFilter {
@@ -5284,9 +5286,9 @@ interface BaseLuaPreRobotMinedEntityEventFilter {
5284
5286
  invert?: boolean,
5285
5287
 
5286
5288
  /**
5287
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5289
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5288
5290
  */
5289
- mode?: string
5291
+ mode?: 'or' | 'and'
5290
5292
  }
5291
5293
 
5292
5294
  interface LuaPreRobotMinedEntityEventFilterGhostName extends BaseLuaPreRobotMinedEntityEventFilter {
@@ -5357,9 +5359,9 @@ interface BaseLuaRobotBuiltEntityEventFilter {
5357
5359
  invert?: boolean,
5358
5360
 
5359
5361
  /**
5360
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5362
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5361
5363
  */
5362
- mode?: string
5364
+ mode?: 'or' | 'and'
5363
5365
  }
5364
5366
 
5365
5367
  interface LuaRobotBuiltEntityEventFilterForce extends BaseLuaRobotBuiltEntityEventFilter {
@@ -5443,9 +5445,9 @@ interface BaseLuaRobotMinedEntityEventFilter {
5443
5445
  invert?: boolean,
5444
5446
 
5445
5447
  /**
5446
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5448
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5447
5449
  */
5448
- mode?: string
5450
+ mode?: 'or' | 'and'
5449
5451
  }
5450
5452
 
5451
5453
  interface LuaRobotMinedEntityEventFilterGhostName extends BaseLuaRobotMinedEntityEventFilter {
@@ -5516,9 +5518,9 @@ interface BaseLuaScriptRaisedBuiltEventFilter {
5516
5518
  invert?: boolean,
5517
5519
 
5518
5520
  /**
5519
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5521
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5520
5522
  */
5521
- mode?: string
5523
+ mode?: 'or' | 'and'
5522
5524
  }
5523
5525
 
5524
5526
  interface LuaScriptRaisedBuiltEventFilterGhostName extends BaseLuaScriptRaisedBuiltEventFilter {
@@ -5589,9 +5591,9 @@ interface BaseLuaScriptRaisedDestroyEventFilter {
5589
5591
  invert?: boolean,
5590
5592
 
5591
5593
  /**
5592
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5594
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5593
5595
  */
5594
- mode?: string
5596
+ mode?: 'or' | 'and'
5595
5597
  }
5596
5598
 
5597
5599
  interface LuaScriptRaisedDestroyEventFilterGhostName extends BaseLuaScriptRaisedDestroyEventFilter {
@@ -5662,9 +5664,9 @@ interface BaseLuaScriptRaisedReviveEventFilter {
5662
5664
  invert?: boolean,
5663
5665
 
5664
5666
  /**
5665
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5667
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5666
5668
  */
5667
- mode?: string
5669
+ mode?: 'or' | 'and'
5668
5670
  }
5669
5671
 
5670
5672
  interface LuaScriptRaisedReviveEventFilterGhostName extends BaseLuaScriptRaisedReviveEventFilter {
@@ -5735,9 +5737,9 @@ interface BaseLuaScriptRaisedTeleportedEventFilter {
5735
5737
  invert?: boolean,
5736
5738
 
5737
5739
  /**
5738
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5740
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5739
5741
  */
5740
- mode?: string
5742
+ mode?: 'or' | 'and'
5741
5743
  }
5742
5744
 
5743
5745
  interface LuaScriptRaisedTeleportedEventFilterGhostName extends BaseLuaScriptRaisedTeleportedEventFilter {
@@ -5808,9 +5810,9 @@ interface BaseLuaSectorScannedEventFilter {
5808
5810
  invert?: boolean,
5809
5811
 
5810
5812
  /**
5811
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5813
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5812
5814
  */
5813
- mode?: string
5815
+ mode?: 'or' | 'and'
5814
5816
  }
5815
5817
 
5816
5818
  interface LuaSectorScannedEventFilterGhostName extends BaseLuaSectorScannedEventFilter {
@@ -5881,9 +5883,9 @@ interface BaseLuaUpgradeCancelledEventFilter {
5881
5883
  invert?: boolean,
5882
5884
 
5883
5885
  /**
5884
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5886
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5885
5887
  */
5886
- mode?: string
5888
+ mode?: 'or' | 'and'
5887
5889
  }
5888
5890
 
5889
5891
  interface LuaUpgradeCancelledEventFilterGhostName extends BaseLuaUpgradeCancelledEventFilter {
@@ -5954,9 +5956,9 @@ interface BaseModSettingPrototypeFilter {
5954
5956
  invert?: boolean,
5955
5957
 
5956
5958
  /**
5957
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5959
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
5958
5960
  */
5959
- mode?: string
5961
+ mode?: 'or' | 'and'
5960
5962
  }
5961
5963
 
5962
5964
  interface ModSettingPrototypeFilterMod extends BaseModSettingPrototypeFilter {
@@ -5998,45 +6000,12 @@ interface ModSettingPrototypeFilterType extends BaseModSettingPrototypeFilter {
5998
6000
  type: string | string[]
5999
6001
  }
6000
6002
 
6001
- interface BaseProduct {
6002
-
6003
- /**
6004
- * Amount of the item or fluid to give. If not specified, `amount_min`, `amount_max` and `probability` must all be specified.
6005
- */
6006
- amount?: number,
6007
-
6008
- /**
6009
- * Maximum amount of the item or fluid to give. Has no effect when `amount` is specified.
6010
- */
6011
- amount_max?: number,
6012
-
6013
- /**
6014
- * Minimal amount of the item or fluid to give. Has no effect when `amount` is specified.
6015
- */
6016
- amount_min?: number,
6017
-
6018
- /**
6019
- * How much of this product is a catalyst.
6020
- */
6021
- catalyst_amount?: number,
6022
-
6023
- /**
6024
- * Prototype name of the result.
6025
- */
6026
- name: string,
6027
-
6028
- /**
6029
- * A value in range [0, 1]. Item or fluid is only given with this probability; otherwise no product is produced.
6030
- */
6031
- probability?: number
6032
- }
6033
-
6034
- interface ProductFluid extends BaseProduct {
6035
-
6036
- /**
6037
- * `"item"` or `"fluid"`.
6038
- */
6039
- type: 'fluid',
6003
+ /**
6004
+ * @remarks
6005
+ * Applies to `fluid` variant case
6006
+ *
6007
+ */
6008
+ interface ProductFluid extends Product {
6040
6009
 
6041
6010
  /**
6042
6011
  * The fluid temperature of this product.
@@ -6044,14 +6013,6 @@ interface ProductFluid extends BaseProduct {
6044
6013
  temperature?: number
6045
6014
  }
6046
6015
 
6047
- interface DefaultProduct extends BaseProduct {
6048
-
6049
- /**
6050
- * `"item"` or `"fluid"`.
6051
- */
6052
- type: 'item'
6053
- }
6054
-
6055
6016
  interface BaseRecipePrototypeFilter {
6056
6017
 
6057
6018
  /**
@@ -6060,9 +6021,9 @@ interface BaseRecipePrototypeFilter {
6060
6021
  invert?: boolean,
6061
6022
 
6062
6023
  /**
6063
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
6024
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
6064
6025
  */
6065
- mode?: string
6026
+ mode?: 'or' | 'and'
6066
6027
  }
6067
6028
 
6068
6029
  interface RecipePrototypeFilterCategory extends BaseRecipePrototypeFilter {
@@ -6207,16 +6168,12 @@ interface DefaultRecipePrototypeFilter extends BaseRecipePrototypeFilter {
6207
6168
  filter: 'enabled' | 'hidden' | 'hidden-from-flow-stats' | 'hidden-from-player-crafting' | 'allow-as-intermediate' | 'allow-intermediates' | 'allow-decomposition' | 'always-show-made-in' | 'always-show-products' | 'show-amount-in-title' | 'has-ingredients' | 'has-products'
6208
6169
  }
6209
6170
 
6210
- interface BaseTechnologyModifier {
6211
-
6212
- }
6213
-
6214
- interface TechnologyModifierOtherTypes extends BaseTechnologyModifier {
6215
-
6216
- /**
6217
- * Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`.
6218
- */
6219
- type: 'Other types',
6171
+ /**
6172
+ * @remarks
6173
+ * Applies to `Other types` variant case
6174
+ *
6175
+ */
6176
+ interface TechnologyModifierOtherTypes extends TechnologyModifier {
6220
6177
 
6221
6178
  /**
6222
6179
  * Modification value. This value will be added to the variable it modifies.
@@ -6224,12 +6181,12 @@ interface TechnologyModifierOtherTypes extends BaseTechnologyModifier {
6224
6181
  modifier: number
6225
6182
  }
6226
6183
 
6227
- interface TechnologyModifierAmmoDamage extends BaseTechnologyModifier {
6228
-
6229
- /**
6230
- * Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`.
6231
- */
6232
- type: 'ammo-damage',
6184
+ /**
6185
+ * @remarks
6186
+ * Applies to `ammo-damage` variant case
6187
+ *
6188
+ */
6189
+ interface TechnologyModifierAmmoDamage extends TechnologyModifier {
6233
6190
 
6234
6191
  /**
6235
6192
  * Prototype name of the ammunition category that is affected
@@ -6242,12 +6199,12 @@ interface TechnologyModifierAmmoDamage extends BaseTechnologyModifier {
6242
6199
  modifier: number
6243
6200
  }
6244
6201
 
6245
- interface TechnologyModifierGiveItem extends BaseTechnologyModifier {
6246
-
6247
- /**
6248
- * Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`.
6249
- */
6250
- type: 'give-item',
6202
+ /**
6203
+ * @remarks
6204
+ * Applies to `give-item` variant case
6205
+ *
6206
+ */
6207
+ interface TechnologyModifierGiveItem extends TechnologyModifier {
6251
6208
 
6252
6209
  /**
6253
6210
  * Number of items to give. Defaults to `1`.
@@ -6260,12 +6217,12 @@ interface TechnologyModifierGiveItem extends BaseTechnologyModifier {
6260
6217
  item: string
6261
6218
  }
6262
6219
 
6263
- interface TechnologyModifierGunSpeed extends BaseTechnologyModifier {
6264
-
6265
- /**
6266
- * Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`.
6267
- */
6268
- type: 'gun-speed',
6220
+ /**
6221
+ * @remarks
6222
+ * Applies to `gun-speed` variant case
6223
+ *
6224
+ */
6225
+ interface TechnologyModifierGunSpeed extends TechnologyModifier {
6269
6226
 
6270
6227
  /**
6271
6228
  * Prototype name of the ammunition category that is affected
@@ -6278,12 +6235,12 @@ interface TechnologyModifierGunSpeed extends BaseTechnologyModifier {
6278
6235
  modifier: number
6279
6236
  }
6280
6237
 
6281
- interface TechnologyModifierNothing extends BaseTechnologyModifier {
6282
-
6283
- /**
6284
- * Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`.
6285
- */
6286
- type: 'nothing',
6238
+ /**
6239
+ * @remarks
6240
+ * Applies to `nothing` variant case
6241
+ *
6242
+ */
6243
+ interface TechnologyModifierNothing extends TechnologyModifier {
6287
6244
 
6288
6245
  /**
6289
6246
  * Description of this nothing modifier.
@@ -6291,12 +6248,12 @@ interface TechnologyModifierNothing extends BaseTechnologyModifier {
6291
6248
  effect_description: LocalisedString
6292
6249
  }
6293
6250
 
6294
- interface TechnologyModifierTurretAttack extends BaseTechnologyModifier {
6295
-
6296
- /**
6297
- * Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`.
6298
- */
6299
- type: 'turret-attack',
6251
+ /**
6252
+ * @remarks
6253
+ * Applies to `turret-attack` variant case
6254
+ *
6255
+ */
6256
+ interface TechnologyModifierTurretAttack extends TechnologyModifier {
6300
6257
 
6301
6258
  /**
6302
6259
  * Modification value. This will be added to the current turret damage modifier upon researching.
@@ -6309,12 +6266,12 @@ interface TechnologyModifierTurretAttack extends BaseTechnologyModifier {
6309
6266
  turret_id: string
6310
6267
  }
6311
6268
 
6312
- interface TechnologyModifierUnlockRecipe extends BaseTechnologyModifier {
6313
-
6314
- /**
6315
- * Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`.
6316
- */
6317
- type: 'unlock-recipe',
6269
+ /**
6270
+ * @remarks
6271
+ * Applies to `unlock-recipe` variant case
6272
+ *
6273
+ */
6274
+ interface TechnologyModifierUnlockRecipe extends TechnologyModifier {
6318
6275
 
6319
6276
  /**
6320
6277
  * Recipe prototype name to unlock.
@@ -6322,14 +6279,6 @@ interface TechnologyModifierUnlockRecipe extends BaseTechnologyModifier {
6322
6279
  recipe: string
6323
6280
  }
6324
6281
 
6325
- interface DefaultTechnologyModifier extends BaseTechnologyModifier {
6326
-
6327
- /**
6328
- * Modifier type. Specifies which of the other fields will be available. Possible values are: `"inserter-stack-size-bonus"`, `"stack-inserter-capacity-bonus"`, `"laboratory-speed"`, `"character-logistic-trash-slots"`, `"maximum-following-robots-count"`, `"worker-robot-speed"`, `"worker-robot-storage"`, `"ghost-time-to-live"`, `"turret-attack"`, `"ammo-damage"`, `"give-item"`, `"gun-speed"`, `"unlock-recipe"`, `"character-crafting-speed"`, `"character-mining-speed"`, `"character-running-speed"`, `"character-build-distance"`, `"character-item-drop-distance"`, `"character-reach-distance"`, `"character-resource-reach-distance"`, `"character-item-pickup-distance"`, `"character-loot-pickup-distance"`, `"character-inventory-slots-bonus"`, `"deconstruction-time-to-live"`, `"max-failed-attempts-per-tick-per-construction-queue"`, `"max-successful-attempts-per-tick-per-construction-queue"`, `"character-health-bonus"`, `"mining-drill-productivity-bonus"`, `"train-braking-force-bonus"`, `"zoom-to-world-enabled"`, `"zoom-to-world-ghost-building-enabled"`, `"zoom-to-world-blueprint-enabled"`, `"zoom-to-world-deconstruction-planner-enabled"`, `"zoom-to-world-upgrade-planner-enabled"`, `"zoom-to-world-selection-tool-enabled"`, `"worker-robot-battery"`, `"laboratory-productivity"`, `"follower-robot-lifetime"`, `"artillery-range"`, `"nothing"`, `"character-additional-mining-categories"`, `"character-logistic-requests"`.
6329
- */
6330
- type: 'inserter-stack-size-bonus' | 'stack-inserter-capacity-bonus' | 'laboratory-speed' | 'character-logistic-trash-slots' | 'maximum-following-robots-count' | 'worker-robot-speed' | 'worker-robot-storage' | 'ghost-time-to-live' | 'character-crafting-speed' | 'character-mining-speed' | 'character-running-speed' | 'character-build-distance' | 'character-item-drop-distance' | 'character-reach-distance' | 'character-resource-reach-distance' | 'character-item-pickup-distance' | 'character-loot-pickup-distance' | 'character-inventory-slots-bonus' | 'deconstruction-time-to-live' | 'max-failed-attempts-per-tick-per-construction-queue' | 'max-successful-attempts-per-tick-per-construction-queue' | 'character-health-bonus' | 'mining-drill-productivity-bonus' | 'train-braking-force-bonus' | 'zoom-to-world-enabled' | 'zoom-to-world-ghost-building-enabled' | 'zoom-to-world-blueprint-enabled' | 'zoom-to-world-deconstruction-planner-enabled' | 'zoom-to-world-upgrade-planner-enabled' | 'zoom-to-world-selection-tool-enabled' | 'worker-robot-battery' | 'laboratory-productivity' | 'follower-robot-lifetime' | 'artillery-range' | 'character-additional-mining-categories'
6331
- }
6332
-
6333
6282
  interface BaseTechnologyPrototypeFilter {
6334
6283
 
6335
6284
  /**
@@ -6338,9 +6287,9 @@ interface BaseTechnologyPrototypeFilter {
6338
6287
  invert?: boolean,
6339
6288
 
6340
6289
  /**
6341
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
6290
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
6342
6291
  */
6343
- mode?: string
6292
+ mode?: 'or' | 'and'
6344
6293
  }
6345
6294
 
6346
6295
  interface TechnologyPrototypeFilterLevel extends BaseTechnologyPrototypeFilter {
@@ -6427,9 +6376,9 @@ interface BaseTilePrototypeFilter {
6427
6376
  invert?: boolean,
6428
6377
 
6429
6378
  /**
6430
- * How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
6379
+ * How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
6431
6380
  */
6432
- mode?: string
6381
+ mode?: 'or' | 'and'
6433
6382
  }
6434
6383
 
6435
6384
  interface TilePrototypeFilterCollisionMask extends BaseTilePrototypeFilter {