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.
package/dist/classes.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 1.1.101
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  declare namespace runtime {
@@ -1679,9 +1679,9 @@ interface LuaCustomInputPrototype {
1679
1679
  readonly alternative_key_sequence?: string
1680
1680
 
1681
1681
  /**
1682
- * The consuming type: `"none"` or `"game-only"`.
1682
+ * The consuming type.
1683
1683
  */
1684
- readonly consuming: string
1684
+ readonly consuming: 'none' | 'game-only'
1685
1685
 
1686
1686
  /**
1687
1687
  * The default controller alternative key sequence for this custom input, if any
@@ -2019,6 +2019,9 @@ interface LuaEntity extends LuaControl {
2019
2019
 
2020
2020
  /**
2021
2021
  * Whether this character can shoot the given entity or position.
2022
+ * @remarks
2023
+ * Applies to subclasses: Character
2024
+ *
2022
2025
  */
2023
2026
  can_shoot(this: void,
2024
2027
  target: LuaEntity,
@@ -2113,6 +2116,9 @@ interface LuaEntity extends LuaControl {
2113
2116
 
2114
2117
  /**
2115
2118
  * Connects the rolling stock in the given direction.
2119
+ * @remarks
2120
+ * Applies to subclasses: RollingStock
2121
+ *
2116
2122
  * @returns Whether any connection was made
2117
2123
  */
2118
2124
  connect_rolling_stock(this: void,
@@ -2140,7 +2146,7 @@ interface LuaEntity extends LuaControl {
2140
2146
  * @param damage - The amount of damage to be done.
2141
2147
  * @param dealer - The entity to consider as the damage dealer. Needs to be on the same surface as the entity being damaged.
2142
2148
  * @param force - The force that will be doing the damage.
2143
- * @param type - The type of damage to be done, defaults to "impact". Can't be `nil`.
2149
+ * @param type - The type of damage to be done, defaults to `"impact"`. Can't be `nil`.
2144
2150
  * @returns the total damage actually applied after resistances.
2145
2151
  */
2146
2152
  damage(this: void,
@@ -2213,6 +2219,9 @@ interface LuaEntity extends LuaControl {
2213
2219
 
2214
2220
  /**
2215
2221
  * Tries to disconnect this rolling stock in the given direction.
2222
+ * @remarks
2223
+ * Applies to subclasses: RollingStock
2224
+ *
2216
2225
  * @returns If anything was disconnected
2217
2226
  */
2218
2227
  disconnect_rolling_stock(this: void,
@@ -2294,6 +2303,9 @@ interface LuaEntity extends LuaControl {
2294
2303
 
2295
2304
  /**
2296
2305
  * Gets rolling stock connected to the given end of this stock.
2306
+ * @remarks
2307
+ * Applies to subclasses: RollingStock
2308
+ *
2297
2309
  * @returns multiple values
2298
2310
  * [0] - The rolling stock connected at the given end, `nil` if none is connected there.
2299
2311
  * [1] - The rail direction of the connected rolling stock if any.
@@ -2863,6 +2875,9 @@ interface LuaEntity extends LuaControl {
2863
2875
 
2864
2876
  /**
2865
2877
  * Revive a ghost. I.e. turn it from a ghost to a real entity or tile.
2878
+ * @remarks
2879
+ * Applies to subclasses: Ghost
2880
+ *
2866
2881
  * @param table.raise_revive - If true, and an entity ghost; [script_raised_revive](runtime:script_raised_revive) will be called. Else if true, and a tile ghost; [script_raised_set_tiles](runtime:script_raised_set_tiles) will be called.
2867
2882
  * @param table.return_item_request_proxy - If `true` the function will return item request proxy as the third return value.
2868
2883
  * @returns multiple values
@@ -2893,7 +2908,7 @@ interface LuaEntity extends LuaControl {
2893
2908
  by_player?: PlayerIdentification,
2894
2909
  spill_items?: boolean,
2895
2910
  enable_looted?: boolean,
2896
- force?: LuaForce | string
2911
+ force?: ForceIdentification
2897
2912
  }): LuaMultiReturn<[boolean, {[key: string]: number} | null]>
2898
2913
 
2899
2914
  /**
@@ -3007,7 +3022,7 @@ interface LuaEntity extends LuaControl {
3007
3022
  * @returns Any items removed from this entity as a result of setting the recipe.
3008
3023
  */
3009
3024
  set_recipe(this: void,
3010
- recipe?: string | LuaRecipe): {[key: string]: number}
3025
+ recipe: string | LuaRecipe | null): {[key: string]: number}
3011
3026
 
3012
3027
  /**
3013
3028
  * Set a logistic requester slot.
@@ -3024,6 +3039,9 @@ interface LuaEntity extends LuaControl {
3024
3039
 
3025
3040
  /**
3026
3041
  * Revives a ghost silently.
3042
+ * @remarks
3043
+ * Applies to subclasses: Ghost
3044
+ *
3027
3045
  * @param table.raise_revive - If true, and an entity ghost; [script_raised_revive](runtime:script_raised_revive) will be called. Else if true, and a tile ghost; [script_raised_set_tiles](runtime:script_raised_set_tiles) will be called.
3028
3046
  * @param table.return_item_request_proxy - If `true` the function will return item request proxy as the third parameter.
3029
3047
  * @returns multiple values
@@ -3044,6 +3062,9 @@ interface LuaEntity extends LuaControl {
3044
3062
 
3045
3063
  /**
3046
3064
  * Only works if the entity is a speech-bubble, with an "effect" defined in its wrapper_flow_style. Starts animating the opacity of the speech bubble towards zero, and destroys the entity when it hits zero.
3065
+ * @remarks
3066
+ * Applies to subclasses: SpeechBubble
3067
+ *
3047
3068
  */
3048
3069
  start_fading_out(this: void): void
3049
3070
 
@@ -3211,7 +3232,7 @@ interface LuaEntity extends LuaControl {
3211
3232
  /**
3212
3233
  * Gives what is the current shape of a transport-belt.
3213
3234
  * @remarks
3214
- * Can also be used on entity ghost if it contains transport-belt
3235
+ * Can also be used on entity ghost if it contains transport-belt.
3215
3236
  * Applies to subclasses: TransportBelt
3216
3237
  *
3217
3238
  */
@@ -3220,7 +3241,7 @@ interface LuaEntity extends LuaControl {
3220
3241
  /**
3221
3242
  * Whether this underground belt goes into or out of the ground.
3222
3243
  * @remarks
3223
- * Applies to subclasses: TransportBeltToGround
3244
+ * Applies to subclasses: UndergroundBelt
3224
3245
  *
3225
3246
  */
3226
3247
  readonly belt_to_ground_type: 'input' | 'output'
@@ -3304,6 +3325,9 @@ interface LuaEntity extends LuaControl {
3304
3325
 
3305
3326
  /**
3306
3327
  * The orientation of this cliff.
3328
+ * @remarks
3329
+ * Applies to subclasses: Cliff
3330
+ *
3307
3331
  */
3308
3332
  readonly cliff_orientation: CliffOrientation
3309
3333
 
@@ -3317,6 +3341,9 @@ interface LuaEntity extends LuaControl {
3317
3341
 
3318
3342
  /**
3319
3343
  * The owner of this combat robot, if any.
3344
+ * @remarks
3345
+ * Applies to subclasses: CombatRobot
3346
+ *
3320
3347
  */
3321
3348
  combat_robot_owner?: LuaEntity
3322
3349
 
@@ -3368,15 +3395,15 @@ interface LuaEntity extends LuaControl {
3368
3395
  /**
3369
3396
  * Whether this corpse will ever fade away.
3370
3397
  * @remarks
3371
- * Useable only on corpses.
3398
+ * Applies to subclasses: Corpse
3372
3399
  *
3373
3400
  */
3374
3401
  corpse_expires: boolean
3375
3402
 
3376
3403
  /**
3377
- * If true, corpse won't be destroyed when entities are placed over it. If false, whether corpse will be removed or not depends on value of CorpsePrototype::remove_on_entity_placement.
3404
+ * If true, corpse won't be destroyed when entities are placed over it. If false, whether corpse will be removed or not depends on value of {@link CorpsePrototype::remove_on_entity_placement | prototype:CorpsePrototype::remove_on_entity_placement}.
3378
3405
  * @remarks
3379
- * Useable only on corpses.
3406
+ * Applies to subclasses: Corpse
3380
3407
  *
3381
3408
  */
3382
3409
  corpse_immune_to_entity_placement: boolean
@@ -3427,7 +3454,7 @@ interface LuaEntity extends LuaControl {
3427
3454
  readonly distraction_command?: Command
3428
3455
 
3429
3456
  /**
3430
- * Gives a draw data of the given entity if it supports such data
3457
+ * Gives a draw data of the given entity if it supports such data.
3431
3458
  * @remarks
3432
3459
  * Applies to subclasses: RollingStock
3433
3460
  *
@@ -3637,7 +3664,16 @@ interface LuaEntity extends LuaControl {
3637
3664
  readonly ghost_unit_number?: number
3638
3665
 
3639
3666
  /**
3640
- * Returns a {@link rich text | https://wiki.factorio.com/Rich_text} string containing this entity's position and surface name as a gps tag. Printing it will ping the location of the entity.
3667
+ * Returns a {@link rich text | https://wiki.factorio.com/Rich_text} string containing this entity's position and surface name as a gps tag. {@link Printing | runtime:LuaGameScript::print} it will ping the location of the entity.
3668
+ * @example
3669
+ * ```
3670
+ * -- called on a LuaEntity on the default surface it returns:
3671
+ * entity.gps_tag -- => "[gps=-4,-9]"
3672
+ *
3673
+ * -- called on a LuaEntity on "custom-surface" it returns:
3674
+ * different_entity.gps_tag -- => "[gps=1,-5,custom-surface]"
3675
+ * ```
3676
+ *
3641
3677
  */
3642
3678
  readonly gps_tag: string
3643
3679
 
@@ -3689,7 +3725,7 @@ interface LuaEntity extends LuaControl {
3689
3725
  * Applies to subclasses: HighlightBox
3690
3726
  *
3691
3727
  */
3692
- highlight_box_type: string
3728
+ highlight_box_type: CursorBoxRenderType
3693
3729
 
3694
3730
  /**
3695
3731
  * The filters for this infinity container.
@@ -3709,17 +3745,18 @@ interface LuaEntity extends LuaControl {
3709
3745
  initial_amount?: number
3710
3746
 
3711
3747
  /**
3712
- * The filter mode for this filter inserter. Either `"whitelist"` or `"blacklist"`. `nil` if this inserter doesn't use filters.
3748
+ * The filter mode for this filter inserter. `nil` if this inserter doesn't use filters.
3713
3749
  * @remarks
3714
3750
  * Applies to subclasses: Inserter
3715
3751
  *
3716
3752
  */
3717
- inserter_filter_mode?: string
3753
+ inserter_filter_mode?: 'whitelist' | 'blacklist'
3718
3754
 
3719
3755
  /**
3720
3756
  * Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
3721
3757
  * @remarks
3722
3758
  * Set to 0 to reset.
3759
+ * Applies to subclasses: Inserter
3723
3760
  *
3724
3761
  */
3725
3762
  inserter_stack_size_override: number
@@ -3728,6 +3765,7 @@ interface LuaEntity extends LuaControl {
3728
3765
  * Returns the current target pickup count of the inserter.
3729
3766
  * @remarks
3730
3767
  * This considers the circuit network, manual override and the inserter stack size limit based on technology.
3768
+ * Applies to subclasses: Inserter
3731
3769
  *
3732
3770
  */
3733
3771
  readonly inserter_target_pickup_count: number
@@ -3748,7 +3786,7 @@ interface LuaEntity extends LuaControl {
3748
3786
  readonly is_entity_with_owner: boolean
3749
3787
 
3750
3788
  /**
3751
- * If the rolling stock is facing train's front
3789
+ * If the rolling stock is facing train's front.
3752
3790
  * @remarks
3753
3791
  * Applies to subclasses: RollingStock
3754
3792
  *
@@ -3778,35 +3816,38 @@ interface LuaEntity extends LuaControl {
3778
3816
  *
3779
3817
  * Reading this property will return a {@link LuaPlayer | runtime:LuaPlayer}, while {@link PlayerIdentification | runtime:PlayerIdentification} can be used when writing.
3780
3818
  * @remarks
3781
- * Applies to subclasses: EntityWithOwner
3819
+ * Applies to subclasses: EntityWithOwner,DeconstructibleTileProxy,TileGhost
3782
3820
  *
3783
3821
  */
3784
3822
  last_user?: LuaPlayer | PlayerIdentification
3785
3823
 
3786
3824
  /**
3787
3825
  * The link ID this linked container is using.
3826
+ * @remarks
3827
+ * Applies to subclasses: LinkedContainer
3828
+ *
3788
3829
  */
3789
3830
  link_id: number
3790
3831
 
3791
3832
  /**
3792
3833
  * Neighbour to which this linked belt is connected to, if any.
3793
3834
  * @remarks
3794
- * Can also be used on entity ghost if it contains linked-belt
3795
- * May return entity ghost which contains linked belt to which connection is made
3835
+ * Can also be used on entity ghost if it contains linked-belt.
3836
+ * May return entity ghost which contains linked belt to which connection is made.
3796
3837
  * Applies to subclasses: LinkedBelt
3797
3838
  *
3798
3839
  */
3799
3840
  readonly linked_belt_neighbour?: LuaEntity
3800
3841
 
3801
3842
  /**
3802
- * Type of linked belt: it is either `"input"` or `"output"`. Changing type will also flip direction so the belt is out of the same side
3843
+ * Type of linked belt. Changing type will also flip direction so the belt is out of the same side.
3803
3844
  * @remarks
3804
- * Can only be changed when linked belt is disconnected (has no neighbour set)
3805
- * Can also be used on entity ghost if it contains linked-belt
3845
+ * Can only be changed when linked belt is disconnected (has no neighbour set).
3846
+ * Can also be used on entity ghost if it contains linked-belt.
3806
3847
  * Applies to subclasses: LinkedBelt
3807
3848
  *
3808
3849
  */
3809
- linked_belt_type: string
3850
+ linked_belt_type: 'input' | 'output'
3810
3851
 
3811
3852
  /**
3812
3853
  * The container entity this loader is pointing at/pulling from depending on the {@link LuaEntity::loader_type | runtime:LuaEntity::loader_type}, if any.
@@ -3956,6 +3997,9 @@ interface LuaEntity extends LuaControl {
3956
3997
 
3957
3998
  /**
3958
3999
  * The state of this power switch.
4000
+ * @remarks
4001
+ * Applies to subclasses: PowerSwitch
4002
+ *
3959
4003
  */
3960
4004
  power_switch_state: boolean
3961
4005
 
@@ -3998,6 +4042,9 @@ interface LuaEntity extends LuaControl {
3998
4042
 
3999
4043
  /**
4000
4044
  * The target entity for this item-request-proxy, if any.
4045
+ * @remarks
4046
+ * Applies to subclasses: ItemRequestProxy
4047
+ *
4001
4048
  */
4002
4049
  readonly proxy_target?: LuaEntity
4003
4050
 
@@ -4079,6 +4126,9 @@ interface LuaEntity extends LuaControl {
4079
4126
 
4080
4127
  /**
4081
4128
  * The status of this rocket silo entity.
4129
+ * @remarks
4130
+ * Applies to subclasses: RocketSilo
4131
+ *
4082
4132
  */
4083
4133
  readonly rocket_silo_status: defines.rocket_silo_status
4084
4134
 
@@ -4115,6 +4165,9 @@ interface LuaEntity extends LuaControl {
4115
4165
 
4116
4166
  /**
4117
4167
  * The shooting target for this turret, if any. Can't be set to `nil` via script.
4168
+ * @remarks
4169
+ * Applies to subclasses: Turret
4170
+ *
4118
4171
  */
4119
4172
  shooting_target?: LuaEntity
4120
4173
 
@@ -4135,6 +4188,9 @@ interface LuaEntity extends LuaControl {
4135
4188
 
4136
4189
  /**
4137
4190
  * The spawner associated with this unit entity, if any.
4191
+ * @remarks
4192
+ * Applies to subclasses: Unit
4193
+ *
4138
4194
  */
4139
4195
  readonly spawner?: LuaEntity
4140
4196
 
@@ -4169,20 +4225,20 @@ interface LuaEntity extends LuaControl {
4169
4225
  splitter_filter?: LuaItemPrototype
4170
4226
 
4171
4227
  /**
4172
- * The input priority for this splitter. Either `"left"`, `"none"`, or `"right"`.
4228
+ * The input priority for this splitter.
4173
4229
  * @remarks
4174
4230
  * Applies to subclasses: Splitter
4175
4231
  *
4176
4232
  */
4177
- splitter_input_priority: string
4233
+ splitter_input_priority: 'left' | 'none' | 'right'
4178
4234
 
4179
4235
  /**
4180
- * The output priority for this splitter. Either `"left"`, `"none"`, or `"right"`.
4236
+ * The output priority for this splitter.
4181
4237
  * @remarks
4182
4238
  * Applies to subclasses: Splitter
4183
4239
  *
4184
4240
  */
4185
- splitter_output_priority: string
4241
+ splitter_output_priority: 'left' | 'none' | 'right'
4186
4242
 
4187
4243
  /**
4188
4244
  * @remarks
@@ -4198,6 +4254,9 @@ interface LuaEntity extends LuaControl {
4198
4254
 
4199
4255
  /**
4200
4256
  * The entity this sticker is sticked to.
4257
+ * @remarks
4258
+ * Applies to subclasses: Sticker
4259
+ *
4201
4260
  */
4202
4261
  readonly sticked_to: LuaEntity
4203
4262
 
@@ -4269,10 +4328,13 @@ interface LuaEntity extends LuaControl {
4269
4328
  readonly tile_width: number
4270
4329
 
4271
4330
  /**
4272
- * The ticks left before a ghost, combat robot, highlight box or smoke with trigger is destroyed.
4331
+ * The ticks left before a ghost, combat robot, highlight box, smoke with trigger or sticker is destroyed.
4273
4332
  *
4274
4333
  * - for ghosts set to uint32 max (4 294 967 295) to never expire.
4275
4334
  * - for ghosts can not be set higher than {@link LuaForce::ghost_time_to_live | runtime:LuaForce::ghost_time_to_live} of the entity's force.
4335
+ * @remarks
4336
+ * Applies to subclasses: Ghost,CombatRobot,HighlightBox,SmokeWithTrigger,Sticker
4337
+ *
4276
4338
  */
4277
4339
  time_to_live: number
4278
4340
 
@@ -4342,31 +4404,49 @@ interface LuaEntity extends LuaControl {
4342
4404
 
4343
4405
  /**
4344
4406
  * Index of the tree color.
4407
+ * @remarks
4408
+ * Applies to subclasses: Tree
4409
+ *
4345
4410
  */
4346
4411
  tree_color_index: number
4347
4412
 
4348
4413
  /**
4349
4414
  * Maximum index of the tree colors.
4415
+ * @remarks
4416
+ * Applies to subclasses: Tree
4417
+ *
4350
4418
  */
4351
4419
  readonly tree_color_index_max: number
4352
4420
 
4353
4421
  /**
4354
4422
  * Index of the tree gray stage
4423
+ * @remarks
4424
+ * Applies to subclasses: Tree
4425
+ *
4355
4426
  */
4356
4427
  tree_gray_stage_index: number
4357
4428
 
4358
4429
  /**
4359
4430
  * Maximum index of the tree gray stages.
4431
+ * @remarks
4432
+ * Applies to subclasses: Tree
4433
+ *
4360
4434
  */
4361
4435
  readonly tree_gray_stage_index_max: number
4362
4436
 
4363
4437
  /**
4364
4438
  * Index of the tree stage.
4439
+ * @remarks
4440
+ * Applies to subclasses: Tree
4441
+ *
4365
4442
  */
4366
4443
  tree_stage_index: number
4367
4444
 
4368
4445
  /**
4369
4446
  * Maximum index of the tree stages.
4447
+ * @remarks
4448
+ * Applies to subclasses: Tree
4449
+ *
4370
4450
  */
4371
4451
  readonly tree_stage_index_max: number
4372
4452
 
@@ -4829,16 +4909,16 @@ interface LuaEntityPrototype {
4829
4909
  readonly count_as_rock_for_filtered_deconstruction?: boolean
4830
4910
 
4831
4911
  /**
4832
- * The crafting categories this entity prototype supports.
4912
+ * The {@link crafting categories | runtime:LuaRecipeCategoryPrototype} this entity prototype supports.
4833
4913
  * @remarks
4834
4914
  * The value in the dictionary is meaningless and exists just to allow for easy lookup.
4835
- * Applies to subclasses: CraftingMachine Character
4915
+ * Applies to subclasses: CraftingMachine,Character
4836
4916
  *
4837
4917
  */
4838
4918
  readonly crafting_categories?: {[key: string]: boolean}
4839
4919
 
4840
4920
  /**
4841
- * The crafting speed..
4921
+ * The crafting speed.
4842
4922
  * @remarks
4843
4923
  * Applies to subclasses: CraftingMachine
4844
4924
  *
@@ -5405,12 +5485,12 @@ interface LuaEntityPrototype {
5405
5485
  readonly localised_name: LocalisedString
5406
5486
 
5407
5487
  /**
5408
- * The logistic mode of this logistic container. One of `"requester"`, `"active-provider"`, `"passive-provider"`, `"buffer"`, `"storage"`, `"none"`.
5488
+ * The logistic mode of this logistic container.
5409
5489
  * @remarks
5410
5490
  * Applies to subclasses: LogisticContainer
5411
5491
  *
5412
5492
  */
5413
- readonly logistic_mode?: string
5493
+ readonly logistic_mode?: 'requester' | 'active-provider' | 'passive-provider' | 'buffer' | 'storage' | 'none'
5414
5494
 
5415
5495
  /**
5416
5496
  * The logistic parameters for this roboport.
@@ -5462,8 +5542,9 @@ interface LuaEntityPrototype {
5462
5542
 
5463
5543
  /**
5464
5544
  * The manual range modifier for this artillery turret or wagon prototype.
5465
- *
5466
- * subclass(ArtilleryWagon, ArtilleryTurret)
5545
+ * @remarks
5546
+ * Applies to subclasses: ArtilleryWagon,ArtilleryTurret
5547
+ *
5467
5548
  */
5468
5549
  readonly manual_range_modifier?: number
5469
5550
 
@@ -5820,6 +5901,9 @@ interface LuaEntityPrototype {
5820
5901
  */
5821
5902
  readonly remains_when_mined: LuaEntityPrototype[]
5822
5903
 
5904
+ /**
5905
+ * Whether this entity should remove decoratives that collide with it when this entity is built. Possible values are `"automatic"`, `"true"` and `"false"`.
5906
+ */
5823
5907
  readonly remove_decoratives: string
5824
5908
 
5825
5909
  /**
@@ -5847,7 +5931,7 @@ interface LuaEntityPrototype {
5847
5931
  readonly resistances?: {[key: string]: Resistance}
5848
5932
 
5849
5933
  /**
5850
- * The resource categories this character or mining drill supports.
5934
+ * The {@link resource categories | runtime:LuaResourceCategoryPrototype} this character or mining drill supports.
5851
5935
  * @remarks
5852
5936
  * The value in the dictionary is meaningless and exists just to allow for easy lookup.
5853
5937
  * Applies to subclasses: MiningDrill,Character
@@ -7007,9 +7091,9 @@ interface LuaFluidBoxPrototype {
7007
7091
  readonly pipe_connections: FluidBoxConnection[]
7008
7092
 
7009
7093
  /**
7010
- * The production type. "input", "output", "input-output", or "none".
7094
+ * The production type.
7011
7095
  */
7012
- readonly production_type: string
7096
+ readonly production_type: 'input' | 'input-output' | 'output' | 'none'
7013
7097
 
7014
7098
  /**
7015
7099
  * The render layer.
@@ -7457,6 +7541,9 @@ interface LuaForce {
7457
7541
 
7458
7542
  /**
7459
7543
  * Play a sound for every player in this force.
7544
+ * @remarks
7545
+ * The sound is not played if its location is not {@link charted | runtime:LuaForce::chart} for this force.
7546
+ *
7460
7547
  * @param table.override_sound_type - The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
7461
7548
  * @param table.path - The sound to play.
7462
7549
  * @param table.position - Where the sound should be played. If not given, it's played at the current position of each player.
@@ -8048,7 +8135,7 @@ interface LuaGameScript {
8048
8135
  * @param surface - The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted.
8049
8136
  */
8050
8137
  delete_surface(this: void,
8051
- surface: string | LuaSurface): void
8138
+ surface: SurfaceIdentification): void
8052
8139
 
8053
8140
  /**
8054
8141
  * Converts the given direction into the string version of the direction.
@@ -8105,6 +8192,9 @@ interface LuaGameScript {
8105
8192
  get_active_entities_count(this: void,
8106
8193
  surface?: SurfaceIdentification): number
8107
8194
 
8195
+ /**
8196
+ * Gets an entity by its name tag. Entity name tags can be set in the entity "extra settings" GUI in the map editor.
8197
+ */
8108
8198
  get_entity_by_tag(this: void,
8109
8199
  tag: string): LuaEntity | null
8110
8200
 
@@ -8351,6 +8441,9 @@ interface LuaGameScript {
8351
8441
 
8352
8442
  /**
8353
8443
  * Play a sound for every player in the game.
8444
+ * @remarks
8445
+ * The sound is not played if its location is not {@link charted | runtime:LuaForce::chart} for that player.
8446
+ *
8354
8447
  * @param table.override_sound_type - The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
8355
8448
  * @param table.path - The sound to play.
8356
8449
  * @param table.position - Where the sound should be played. If not given, it's played at the current position of each player.
@@ -8414,7 +8507,7 @@ interface LuaGameScript {
8414
8507
  * @param players - List of players to remove. If not specified, remove all offline players.
8415
8508
  */
8416
8509
  remove_offline_players(this: void,
8417
- players?: Array<LuaPlayer | string>): void
8510
+ players?: PlayerIdentification[]): void
8418
8511
 
8419
8512
  /**
8420
8513
  * Remove a file or directory in the `script-output` folder, located in the game's {@link user data directory | https://wiki.factorio.com/User_data_directory}. Can be used to remove files created by {@link LuaGameScript::write_file | runtime:LuaGameScript::write_file}.
@@ -8425,9 +8518,32 @@ interface LuaGameScript {
8425
8518
 
8426
8519
  /**
8427
8520
  * Direct access to Trains Pathfinder. Allows to search rail paths or querying which stops are accessible
8521
+ * @param table.allow_path_within_segment_back - 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.
8522
+ * @param table.allow_path_within_segment_front - 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.
8523
+ * @param table.from_back - Manually provided starting back of the train.
8524
+ * @param table.from_front - Manually provided starting front of the train.
8525
+ * @param table.in_chain_signal_section - Defaults to `false`. If set to true, pathfinder will not return a path that cannot have its beginning immediately reserved. A path that cannot have its beginning immediately reserved could cause a train to stop inside of an intersection.
8526
+ * @param table.return_path - 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.
8527
+ * @param table.search_direction - Only relevant if none of `from_front`/`from_back` was provided in which case `from_front` and `from_back` are deduced from the train. Selects which train ends should be considered as starts. Defaults to `"any-direction-with-locomotives"`.
8528
+ * @param table.steps_limit - Maximum amount of steps pathfinder is allowed to perform.
8529
+ * @param table.train - 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
8530
+ * @param table.type - Request type. Determines the return type of the method. Defaults to `"path"`.
8531
+ * @returns The type of the returned value depends on `type`.
8428
8532
  */
8429
8533
  request_train_path(this: void,
8430
- request: TrainPathFinderRequest): TrainPathFinderPathResult | TrainPathAnyGoalResult | TrainPathAllGoalsResult
8534
+ table: {
8535
+ goals: Array<TrainStopGoal | RailEnd>,
8536
+ in_chain_signal_section?: boolean,
8537
+ train?: LuaTrain,
8538
+ type?: TrainPathRequestType,
8539
+ return_path?: boolean,
8540
+ from_front?: RailEnd,
8541
+ allow_path_within_segment_front?: boolean,
8542
+ from_back?: RailEnd,
8543
+ allow_path_within_segment_back?: boolean,
8544
+ search_direction?: 'respect-movement-direction' | 'any-direction-with-locomotives',
8545
+ steps_limit?: number
8546
+ }): TrainPathFinderPathResult | TrainPathAnyGoalResult | TrainPathAllGoalsResult
8431
8547
 
8432
8548
  /**
8433
8549
  * Reset scenario state (game_finished, player_won, etc.).
@@ -8511,7 +8627,7 @@ interface LuaGameScript {
8511
8627
  * @param table.player - The player to focus on. Defaults to the local player.
8512
8628
  * @param table.position - If defined, the screenshot will be centered on this position. Otherwise, the screenshot will center on `player`.
8513
8629
  * @param table.quality - The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.
8514
- * @param table.resolution - The maximum allowed resolution is 16384x16384 (8192x8192 when `anti_alias` is `true`), but the maximum recommended resolution is 4096x4096 (resp. 2048x2048).
8630
+ * @param table.resolution - The maximum allowed resolution is 16384x16384 (8192x8192 when `anti_alias` is `true`), but the maximum recommended resolution is 4096x4096 (resp. 2048x2048). The `x` value of the position is used as the width, the `y` value as the height.
8515
8631
  * @param table.show_cursor_building_preview - When `true` and when `player` is specified, the building preview for the item in the player's cursor will also be rendered. Defaults to `false`.
8516
8632
  * @param table.show_entity_info - Whether to include entity info ("Alt mode") or not. Defaults to `false`.
8517
8633
  * @param table.show_gui - Whether to include GUIs in the screenshot or not. Defaults to `false`.
@@ -8928,7 +9044,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
8928
9044
  /**
8929
9045
  * The circuit condition. Writing `nil` clears the circuit condition.
8930
9046
  * @example
8931
- * Tell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 chain signals.
9047
+ * Tell an entity to be active (for example a lamp to be lit) when it receives a circuit signal of more than 4 chain signals.
8932
9048
  * ```
8933
9049
  * a_behavior.circuit_condition = {condition={comparator=">",
8934
9050
  * first_signal={type="item", name="rail-chain-signal"},
@@ -8951,7 +9067,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
8951
9067
  /**
8952
9068
  * The logistic condition. Writing `nil` clears the logistic condition.
8953
9069
  * @example
8954
- * Tell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more than four chain signals.
9070
+ * Tell an entity to be active (for example a lamp to be lit) when the logistics network it's connected to has more than four chain signals.
8955
9071
  * ```
8956
9072
  * a_behavior.logistic_condition = {condition={comparator=">",
8957
9073
  * first_signal={type="item", name="rail-chain-signal"},
@@ -8983,16 +9099,19 @@ interface LuaGroup {
8983
9099
  help(this: void): string
8984
9100
 
8985
9101
  /**
8986
- * The parent group, if any.
9102
+ * The parent group.
9103
+ * @remarks
9104
+ * Applies to subclasses: ItemSubGroup
9105
+ *
8987
9106
  */
8988
- readonly group?: LuaGroup
9107
+ readonly group: LuaGroup
8989
9108
 
8990
9109
  /**
8991
9110
  * Localised name of the group.
8992
9111
  */
8993
- readonly localised_name?: LocalisedString
9112
+ readonly localised_name: LocalisedString
8994
9113
 
8995
- readonly name?: string
9114
+ readonly name: string
8996
9115
 
8997
9116
  /**
8998
9117
  * The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
@@ -9005,16 +9124,22 @@ interface LuaGroup {
9005
9124
  readonly order: string
9006
9125
 
9007
9126
  /**
9008
- * The additional order value used in recipe ordering. Can only be used on groups, not on subgroups.
9127
+ * The additional order value used in recipe ordering.
9128
+ * @remarks
9129
+ * Applies to subclasses: ItemGroup
9130
+ *
9009
9131
  */
9010
- readonly order_in_recipe?: string
9132
+ readonly order_in_recipe: string
9011
9133
 
9012
9134
  /**
9013
- * Subgroups of this group. Can only be used on groups, not on subgroups.
9135
+ * Subgroups of this group.
9136
+ * @remarks
9137
+ * Applies to subclasses: ItemGroup
9138
+ *
9014
9139
  */
9015
- readonly subgroups?: LuaGroup[]
9140
+ readonly subgroups: LuaGroup[]
9016
9141
 
9017
- readonly type?: string
9142
+ readonly type: string
9018
9143
 
9019
9144
  /**
9020
9145
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
@@ -9304,11 +9429,11 @@ interface LuaGuiElement {
9304
9429
  * Applies to subclasses: scroll-pane
9305
9430
  *
9306
9431
  * @param element - The element to scroll to.
9307
- * @param scroll_mode - Where the element should be positioned in the scroll-pane. Must be either `"in-view"` or `"top-third"`. Defaults to `"in-view"`.
9432
+ * @param scroll_mode - Where the element should be positioned in the scroll-pane. Defaults to `"in-view"`.
9308
9433
  */
9309
9434
  scroll_to_element(this: void,
9310
9435
  element: LuaGuiElement,
9311
- scroll_mode?: string): void
9436
+ scroll_mode?: 'in-view' | 'top-third'): void
9312
9437
 
9313
9438
  /**
9314
9439
  * Scrolls the scroll bar such that the specified listbox item is visible to the player.
@@ -9316,11 +9441,11 @@ interface LuaGuiElement {
9316
9441
  * Applies to subclasses: list-box
9317
9442
  *
9318
9443
  * @param index - The item index to scroll to.
9319
- * @param scroll_mode - Where the item should be positioned in the list-box. Must be either `"in-view"` or `"top-third"`. Defaults to `"in-view"`.
9444
+ * @param scroll_mode - Where the item should be positioned in the list-box. Defaults to `"in-view"`.
9320
9445
  */
9321
9446
  scroll_to_item(this: void,
9322
9447
  index: number,
9323
- scroll_mode?: string): void
9448
+ scroll_mode?: 'in-view' | 'top-third'): void
9324
9449
 
9325
9450
  /**
9326
9451
  * Scrolls this scroll bar to the left.
@@ -9527,12 +9652,12 @@ interface LuaGuiElement {
9527
9652
  readonly column_count: number
9528
9653
 
9529
9654
  /**
9530
- * Direction of this element's layout. May be either `"horizontal"` or `"vertical"`.
9655
+ * Direction of this element's layout.
9531
9656
  * @remarks
9532
9657
  * Applies to subclasses: frame,flow,line
9533
9658
  *
9534
9659
  */
9535
- readonly direction: string
9660
+ readonly direction: GuiDirection
9536
9661
 
9537
9662
  /**
9538
9663
  * The `frame` that is being moved when dragging this GUI element, if any. This element needs to be a child of the `drag_target` at some level.
@@ -9614,7 +9739,7 @@ interface LuaGuiElement {
9614
9739
  * Applies to subclasses: choose-elem-button
9615
9740
  *
9616
9741
  */
9617
- readonly elem_type: string
9742
+ readonly elem_type: ElemType
9618
9743
 
9619
9744
  /**
9620
9745
  * The elem value of this choose-elem-button, if any.
@@ -9657,12 +9782,12 @@ interface LuaGuiElement {
9657
9782
  readonly gui: LuaGui
9658
9783
 
9659
9784
  /**
9660
- * Policy of the horizontal scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`.
9785
+ * Policy of the horizontal scroll bar.
9661
9786
  * @remarks
9662
9787
  * Applies to subclasses: scroll-pane
9663
9788
  *
9664
9789
  */
9665
- horizontal_scroll_policy: string
9790
+ horizontal_scroll_policy: ScrollPolicy
9666
9791
 
9667
9792
  /**
9668
9793
  * The sprite to display on this sprite-button when it is hovered.
@@ -9907,13 +10032,13 @@ interface LuaGuiElement {
9907
10032
  surface_index: number
9908
10033
 
9909
10034
  /**
9910
- * The switch state (left, none, right) for this switch.
10035
+ * The switch state for this switch.
9911
10036
  * @remarks
9912
10037
  * If {@link LuaGuiElement::allow_none_state | runtime:LuaGuiElement::allow_none_state} is false this can't be set to `"none"`.
9913
10038
  * Applies to subclasses: switch
9914
10039
  *
9915
10040
  */
9916
- switch_state: string
10041
+ switch_state: SwitchState
9917
10042
 
9918
10043
  /**
9919
10044
  * The tabs and contents being shown in this tabbed-pane.
@@ -9952,7 +10077,7 @@ interface LuaGuiElement {
9952
10077
  /**
9953
10078
  * The type of this GUI element.
9954
10079
  */
9955
- readonly type: string
10080
+ readonly type: GuiElementType
9956
10081
 
9957
10082
  /**
9958
10083
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
@@ -9976,12 +10101,12 @@ interface LuaGuiElement {
9976
10101
  vertical_centering: boolean
9977
10102
 
9978
10103
  /**
9979
- * Policy of the vertical scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`.
10104
+ * Policy of the vertical scroll bar.
9980
10105
  * @remarks
9981
10106
  * Applies to subclasses: scroll-pane
9982
10107
  *
9983
10108
  */
9984
- vertical_scroll_policy: string
10109
+ vertical_scroll_policy: ScrollPolicy
9985
10110
 
9986
10111
  /**
9987
10112
  * Sets whether this GUI element is visible or completely hidden, taking no space in the layout.
@@ -10240,7 +10365,7 @@ interface LuaInventory {
10240
10365
  * @param item - The item to check.
10241
10366
  */
10242
10367
  get_insertable_count(this: void,
10243
- item: string): void
10368
+ item: string): number
10244
10369
 
10245
10370
  /**
10246
10371
  * Get the number of all or some items in this inventory.
@@ -10413,10 +10538,10 @@ interface LuaItemPrototype {
10413
10538
  * @remarks
10414
10539
  * Applies to subclasses: AmmoItem
10415
10540
  *
10416
- * @param ammo_source_type - One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
10541
+ * @param ammo_source_type - Defaults to `"default"`.
10417
10542
  */
10418
10543
  get_ammo_type(this: void,
10419
- ammo_source_type?: string): AmmoType | null
10544
+ ammo_source_type?: 'default' | 'player' | 'turret' | 'vehicle'): AmmoType | null
10420
10545
 
10421
10546
  /**
10422
10547
  * Does this prototype have a flag enabled?
@@ -10436,7 +10561,7 @@ interface LuaItemPrototype {
10436
10561
  * Applies to subclasses: SelectionTool
10437
10562
  *
10438
10563
  */
10439
- readonly alt_entity_filter_mode?: string
10564
+ readonly alt_entity_filter_mode?: PrototypeFilterMode
10440
10565
 
10441
10566
  /**
10442
10567
  * The alt entity filters used by this selection tool indexed by entity name.
@@ -10461,7 +10586,7 @@ interface LuaItemPrototype {
10461
10586
  * Applies to subclasses: SelectionTool
10462
10587
  *
10463
10588
  */
10464
- readonly alt_reverse_alt_entity_filter_mode?: string
10589
+ readonly alt_reverse_alt_entity_filter_mode?: PrototypeFilterMode
10465
10590
 
10466
10591
  /**
10467
10592
  * The alt reverse entity filters used by this selection tool indexed by entity name.
@@ -10493,7 +10618,7 @@ interface LuaItemPrototype {
10493
10618
  * Applies to subclasses: SelectionTool
10494
10619
  *
10495
10620
  */
10496
- readonly alt_reverse_selection_cursor_box_type?: string
10621
+ readonly alt_reverse_selection_cursor_box_type?: CursorBoxRenderType
10497
10622
 
10498
10623
  /**
10499
10624
  * Flags that affect which entities will be selected during alt reverse selection.
@@ -10509,7 +10634,7 @@ interface LuaItemPrototype {
10509
10634
  * Applies to subclasses: SelectionTool
10510
10635
  *
10511
10636
  */
10512
- readonly alt_reverse_tile_filter_mode?: string
10637
+ readonly alt_reverse_tile_filter_mode?: PrototypeFilterMode
10513
10638
 
10514
10639
  /**
10515
10640
  * The alt reverse tile filters used by this selection tool indexed by tile name.
@@ -10532,7 +10657,7 @@ interface LuaItemPrototype {
10532
10657
  * Applies to subclasses: SelectionTool
10533
10658
  *
10534
10659
  */
10535
- readonly alt_selection_cursor_box_type?: string
10660
+ readonly alt_selection_cursor_box_type?: CursorBoxRenderType
10536
10661
 
10537
10662
  /**
10538
10663
  * Flags that affect which entities will be selected during alternate selection.
@@ -10548,7 +10673,7 @@ interface LuaItemPrototype {
10548
10673
  * Applies to subclasses: SelectionTool
10549
10674
  *
10550
10675
  */
10551
- readonly alt_tile_filter_mode?: string
10676
+ readonly alt_tile_filter_mode?: PrototypeFilterMode
10552
10677
 
10553
10678
  /**
10554
10679
  * The alt tile filters used by this selection tool indexed by tile name.
@@ -10651,7 +10776,7 @@ interface LuaItemPrototype {
10651
10776
  * Applies to subclasses: SelectionTool
10652
10777
  *
10653
10778
  */
10654
- readonly entity_filter_mode?: string
10779
+ readonly entity_filter_mode?: PrototypeFilterMode
10655
10780
 
10656
10781
  /**
10657
10782
  * The number of entity filters this deconstruction item has.
@@ -10679,7 +10804,7 @@ interface LuaItemPrototype {
10679
10804
  readonly entity_type_filters?: {[key: string]: boolean}
10680
10805
 
10681
10806
  /**
10682
- * The prototype of this armor equipment grid, if any.
10807
+ * The prototype of this armor's equipment grid, if any.
10683
10808
  * @remarks
10684
10809
  * Applies to subclasses: Armor
10685
10810
  *
@@ -10700,7 +10825,7 @@ interface LuaItemPrototype {
10700
10825
  * Applies to subclasses: ItemWithInventory
10701
10826
  *
10702
10827
  */
10703
- readonly filter_mode?: string
10828
+ readonly filter_mode?: 'none' | 'whitelist' | 'blacklist'
10704
10829
 
10705
10830
  /**
10706
10831
  * The flags for this item prototype.
@@ -10751,7 +10876,7 @@ interface LuaItemPrototype {
10751
10876
  * Applies to subclasses: ItemWithInventory
10752
10877
  *
10753
10878
  */
10754
- readonly insertion_priority_mode?: string
10879
+ readonly insertion_priority_mode?: 'default' | 'never' | 'always' | 'when-manually-filtered'
10755
10880
 
10756
10881
  /**
10757
10882
  * The main inventory size for item-with-inventory-prototype.
@@ -10902,7 +11027,7 @@ interface LuaItemPrototype {
10902
11027
  * Applies to subclasses: SelectionTool
10903
11028
  *
10904
11029
  */
10905
- readonly reverse_alt_entity_filter_mode?: string
11030
+ readonly reverse_alt_entity_filter_mode?: PrototypeFilterMode
10906
11031
 
10907
11032
  /**
10908
11033
  * The reverse entity filters used by this selection tool indexed by entity name.
@@ -10934,7 +11059,7 @@ interface LuaItemPrototype {
10934
11059
  * Applies to subclasses: SelectionTool
10935
11060
  *
10936
11061
  */
10937
- readonly reverse_selection_cursor_box_type?: string
11062
+ readonly reverse_selection_cursor_box_type?: CursorBoxRenderType
10938
11063
 
10939
11064
  /**
10940
11065
  * Flags that affect which entities will be selected during reverse selection.
@@ -10950,7 +11075,7 @@ interface LuaItemPrototype {
10950
11075
  * Applies to subclasses: SelectionTool
10951
11076
  *
10952
11077
  */
10953
- readonly reverse_tile_filter_mode?: string
11078
+ readonly reverse_tile_filter_mode?: PrototypeFilterMode
10954
11079
 
10955
11080
  /**
10956
11081
  * The reverse tile filters used by this selection tool indexed by tile name.
@@ -10978,7 +11103,7 @@ interface LuaItemPrototype {
10978
11103
  * Applies to subclasses: SelectionTool
10979
11104
  *
10980
11105
  */
10981
- readonly selection_cursor_box_type?: string
11106
+ readonly selection_cursor_box_type?: CursorBoxRenderType
10982
11107
 
10983
11108
  /**
10984
11109
  * Flags that affect which entities will be selected.
@@ -11033,7 +11158,7 @@ interface LuaItemPrototype {
11033
11158
  * Applies to subclasses: SelectionTool
11034
11159
  *
11035
11160
  */
11036
- readonly tile_filter_mode?: string
11161
+ readonly tile_filter_mode?: PrototypeFilterMode
11037
11162
 
11038
11163
  /**
11039
11164
  * The number of tile filters this deconstruction item has.
@@ -11320,11 +11445,10 @@ interface LuaItemStack {
11320
11445
  * Applies to subclasses: UpgradeItem
11321
11446
  *
11322
11447
  * @param index - The index of the mapper to read.
11323
- * @param type - `"from"` or `"to"`.
11324
11448
  */
11325
11449
  get_mapper(this: void,
11326
11450
  index: number,
11327
- type: string): UpgradeFilter
11451
+ type: 'from' | 'to'): UpgradeFilter
11328
11452
 
11329
11453
  /**
11330
11454
  * Gets the tag with the given name or returns `nil` if it doesn't exist.
@@ -11423,7 +11547,7 @@ interface LuaItemStack {
11423
11547
  * Applies to subclasses: DeconstructionItem
11424
11548
  *
11425
11549
  * @param filter - Writing `nil` removes the filter.
11426
- * @returns Whether the new filter was successfully set (ie. was valid).
11550
+ * @returns Whether the new filter was successfully set (meaning it was valid).
11427
11551
  */
11428
11552
  set_entity_filter(this: void,
11429
11553
  index: number,
@@ -11436,12 +11560,11 @@ interface LuaItemStack {
11436
11560
  *
11437
11561
  * @param filter - The filter to set or `nil`
11438
11562
  * @param index - The index of the mapper to set.
11439
- * @param type - `from` or `to`.
11440
11563
  */
11441
11564
  set_mapper(this: void,
11442
11565
  index: number,
11443
- type: string,
11444
- filter: UpgradeFilter): void
11566
+ type: 'from' | 'to',
11567
+ filter: UpgradeFilter | null): void
11445
11568
 
11446
11569
  /**
11447
11570
  * Set this item stack to another item stack.
@@ -11466,12 +11589,12 @@ interface LuaItemStack {
11466
11589
  * @remarks
11467
11590
  * Applies to subclasses: DeconstructionItem
11468
11591
  *
11469
- * @param filter - Setting to nil erases the filter.
11470
- * @returns Whether the new filter was successfully set (ie. was valid).
11592
+ * @param filter - Writing `nil` removes the filter.
11593
+ * @returns Whether the new filter was successfully set (meaning it was valid).
11471
11594
  */
11472
11595
  set_tile_filter(this: void,
11473
11596
  index: number,
11474
- filter: string | LuaTilePrototype | LuaTile): boolean
11597
+ filter: string | LuaTilePrototype | LuaTile | null): boolean
11475
11598
 
11476
11599
  /**
11477
11600
  * Swaps this item stack with the given item stack if allowed.
@@ -11650,6 +11773,11 @@ interface LuaItemStack {
11650
11773
  */
11651
11774
  health: number
11652
11775
 
11776
+ /**
11777
+ * If this is an ammo item.
11778
+ */
11779
+ readonly is_ammo: boolean
11780
+
11653
11781
  /**
11654
11782
  * If this is an armor item.
11655
11783
  */
@@ -11770,7 +11898,7 @@ interface LuaItemStack {
11770
11898
  * Applies to subclasses: ItemWithInventory
11771
11899
  *
11772
11900
  */
11773
- prioritize_insertion_mode: string
11901
+ prioritize_insertion_mode: 'default' | 'never' | 'always' | 'when-manually-filtered'
11774
11902
 
11775
11903
  /**
11776
11904
  * Prototype of the item held in this stack.
@@ -12069,11 +12197,11 @@ interface LuaLogisticNetwork {
12069
12197
  /**
12070
12198
  * Count given or all items in the network or given members.
12071
12199
  * @param item - Item name to count. If not given, gives counts of all items in the network.
12072
- * @param member - Logistic members to check, must be either `"storage"` or `"providers"`. If not given, gives count in the entire network.
12200
+ * @param member - Logistic members to check. If not given, gives count in the entire network.
12073
12201
  */
12074
12202
  get_item_count(this: void,
12075
12203
  item?: string,
12076
- member?: string): number
12204
+ member?: 'storage' | 'providers'): number
12077
12205
 
12078
12206
  /**
12079
12207
  * Get the amount of items of the given type indexed by the storage member.
@@ -12097,40 +12225,40 @@ interface LuaLogisticNetwork {
12097
12225
  /**
12098
12226
  * Insert items into the logistic network. This will actually insert the items into some logistic chests.
12099
12227
  * @param item - What to insert.
12100
- * @param members - Which logistic members to insert the items to. Must be `"storage"`, `"storage-empty"` (storage chests that are completely empty), `"storage-empty-slot"` (storage chests that have an empty slot), or `"requester"`. If not specified, inserts items into the logistic network in the usual order.
12228
+ * @param members - Which logistic members to insert the items to. `"storage-empty"` inserts into storage chests that are completely empty, `"storage-empty-slot"` inserts into storage chests that have an empty slot. If not specified, inserts items into the logistic network in the usual order.
12101
12229
  * @returns Number of items actually inserted.
12102
12230
  */
12103
12231
  insert(this: void,
12104
12232
  item: ItemStackIdentification,
12105
- members?: string): number
12233
+ members?: 'storage' | 'storage-empty' | 'storage-empty-slot' | 'requester'): number
12106
12234
 
12107
12235
  /**
12108
12236
  * Remove items from the logistic network. This will actually remove the items from some logistic chests.
12109
12237
  * @param item - What to remove.
12110
- * @param members - Which logistic members to remove from. Must be `"storage"`, `"passive-provider"`, `"buffer"`, or `"active-provider"`. If not specified, removes from the network in the usual order.
12238
+ * @param members - Which logistic members to remove from. If not specified, removes from the network in the usual order.
12111
12239
  * @returns Number of items removed.
12112
12240
  */
12113
12241
  remove_item(this: void,
12114
12242
  item: ItemStackIdentification,
12115
- members?: string): number
12243
+ members?: 'active-provider' | 'passive-provider' | 'buffer' | 'storage'): number
12116
12244
 
12117
12245
  /**
12118
12246
  * Find a logistic point to drop the specific item stack.
12119
- * @param table.members - When given, it will find from only the specific type of member. Must be `"storage"`, `"storage-empty"`, `"storage-empty-slot"` or `"requester"`. If not specified, selects with normal priorities.
12120
- * @param table.stack - Name of the item to select.
12247
+ * @param table.members - When given, it will find from only the specific type of member. If not specified, selects with normal priorities.
12248
+ * @param table.stack - Name of the item to drop off.
12121
12249
  * @returns `nil` if no point was found.
12122
12250
  */
12123
12251
  select_drop_point(this: void,
12124
12252
  table: {
12125
12253
  stack: ItemStackIdentification,
12126
- members?: string
12254
+ members?: 'storage' | 'storage-empty' | 'storage-empty-slot' | 'requester'
12127
12255
  }): LuaLogisticPoint | null
12128
12256
 
12129
12257
  /**
12130
12258
  * Find the 'best' logistic point with this item ID and from the given position or from given chest type.
12131
12259
  * @param table.include_buffers - Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position.
12132
- * @param table.members - When given, it will find from only the specific type of member. Must be `"storage"`, `"passive-provider"`, `"buffer"` or `"active-provider"`. If not specified, selects with normal priorities. Not considered if position is specified.
12133
- * @param table.name - Name of the item to select.
12260
+ * @param table.members - When given, it will find from only the specific type of member. If not specified, selects with normal priorities. Not considered if position is specified.
12261
+ * @param table.name - Name of the item to pick up.
12134
12262
  * @param table.position - When given, it will find the storage 'best' storage point from this position.
12135
12263
  * @returns `nil` if no point was found.
12136
12264
  */
@@ -12139,7 +12267,7 @@ interface LuaLogisticNetwork {
12139
12267
  name: string,
12140
12268
  position?: MapPosition,
12141
12269
  include_buffers?: boolean,
12142
- members?: string
12270
+ members?: 'active-provider' | 'passive-provider' | 'buffer' | 'storage'
12143
12271
  }): LuaLogisticPoint | null
12144
12272
 
12145
12273
  /**
@@ -13090,6 +13218,9 @@ interface LuaPlayer extends LuaControl {
13090
13218
 
13091
13219
  /**
13092
13220
  * Play a sound for this player.
13221
+ * @remarks
13222
+ * The sound is not played if its location is not {@link charted | runtime:LuaForce::chart} for this player.
13223
+ *
13093
13224
  * @param table.override_sound_type - The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
13094
13225
  * @param table.path - The sound to play.
13095
13226
  * @param table.position - Where the sound should be played. If not given, it's played at the current position of the player.
@@ -13253,11 +13384,11 @@ interface LuaPlayer extends LuaControl {
13253
13384
  /**
13254
13385
  * Starts selection with selection tool from the specified position. Does nothing if the players cursor is not a selection tool.
13255
13386
  * @param position - The position to start selection from.
13256
- * @param selection_mode - The type of selection to start. Can be `select`, `alternative-select`, `reverse-select`.
13387
+ * @param selection_mode - The type of selection to start.
13257
13388
  */
13258
13389
  start_selection(this: void,
13259
13390
  position: MapPosition,
13260
- selection_mode: string): void
13391
+ selection_mode: 'select' | 'alternative-select' | 'reverse-select'): void
13261
13392
 
13262
13393
  /**
13263
13394
  * Toggles this player into or out of the map editor. Does nothing if this player isn't an admin or if the player doesn't have permission to use the map editor.
@@ -14160,14 +14291,14 @@ interface LuaRendering {
14160
14291
  id: number): void
14161
14292
 
14162
14293
  /**
14163
- * Destroys all render objects. Passing an empty string (`""`)
14294
+ * Destroys all render objects.
14164
14295
  * @param mod_name - If provided, only the render objects created by this mod are destroyed. An empty string (`""`) refers to all objects not belonging to a mod, such as those created using console commands.
14165
14296
  */
14166
14297
  clear(this: void,
14167
14298
  mod_name?: string): void
14168
14299
 
14169
14300
  /**
14170
- * Destroy the object with the given id.
14301
+ * Destroy the object with the given id. Does not error when the object is invalid.
14171
14302
  */
14172
14303
  destroy(this: void,
14173
14304
  id: number): void
@@ -14500,7 +14631,7 @@ interface LuaRendering {
14500
14631
  * @remarks
14501
14632
  * Not all fonts support scaling.
14502
14633
  *
14503
- * @param table.alignment - Defaults to "left". Other options are "right" and "center".
14634
+ * @param table.alignment - Defaults to "left".
14504
14635
  * @param table.draw_on_ground - If this should be drawn below sprites and entities. Rich text does not support this option.
14505
14636
  * @param table.font - Name of font to use. Defaults to the same font as flying-text.
14506
14637
  * @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
@@ -14512,7 +14643,7 @@ interface LuaRendering {
14512
14643
  * @param table.text - The text to display.
14513
14644
  * @param table.time_to_live - In ticks. Defaults to living forever.
14514
14645
  * @param table.use_rich_text - If rich text rendering is enabled. Defaults to false.
14515
- * @param table.vertical_alignment - Defaults to "top". Other options are "middle", "baseline" and "bottom".
14646
+ * @param table.vertical_alignment - Defaults to "top".
14516
14647
  * @param table.visible - If this is rendered to anyone at all. Defaults to true.
14517
14648
  * @returns Id of the render object
14518
14649
  */
@@ -14531,8 +14662,8 @@ interface LuaRendering {
14531
14662
  visible?: boolean,
14532
14663
  draw_on_ground?: boolean,
14533
14664
  orientation?: RealOrientation,
14534
- alignment?: string,
14535
- vertical_alignment?: string,
14665
+ alignment?: TextAlign,
14666
+ vertical_alignment?: VerticalTextAlign,
14536
14667
  scale_with_zoom?: boolean,
14537
14668
  only_in_alt_mode?: boolean,
14538
14669
  use_rich_text?: boolean
@@ -14546,7 +14677,7 @@ interface LuaRendering {
14546
14677
  * @returns `nil` if the object is not a text.
14547
14678
  */
14548
14679
  get_alignment(this: void,
14549
- id: number): string | null
14680
+ id: number): TextAlign | null
14550
14681
 
14551
14682
  /**
14552
14683
  * Gets an array of all valid object ids.
@@ -14888,10 +15019,10 @@ interface LuaRendering {
14888
15019
  id: number): ScriptRenderTarget | null
14889
15020
 
14890
15021
  /**
14891
- * Gets the type of the given object. The types are "text", "line", "circle", "rectangle", "arc", "polygon", "sprite", "light" and "animation".
15022
+ * Gets the type of the given object.
14892
15023
  */
14893
15024
  get_type(this: void,
14894
- id: number): string
15025
+ id: number): 'text' | 'line' | 'circle' | 'rectangle' | 'arc' | 'polygon' | 'sprite' | 'light' | 'animation'
14895
15026
 
14896
15027
  /**
14897
15028
  * Get if the text with this id parses rich text tags.
@@ -14918,7 +15049,7 @@ interface LuaRendering {
14918
15049
  * @returns `nil` if the object is not a text.
14919
15050
  */
14920
15051
  get_vertical_alignment(this: void,
14921
- id: number): string | null
15052
+ id: number): VerticalTextAlign | null
14922
15053
 
14923
15054
  /**
14924
15055
  * Get the vertices of the polygon with this id.
@@ -14978,16 +15109,21 @@ interface LuaRendering {
14978
15109
  is_valid(this: void,
14979
15110
  id: number): boolean
14980
15111
 
15112
+ /**
15113
+ * Reorder this object so that it is drawn in the back of the already existing objects.
15114
+ */
15115
+ move_to_back(this: void,
15116
+ id: number): void
15117
+
14981
15118
  /**
14982
15119
  * Set the alignment of the text with this id. Does nothing if this object is not a text.
14983
15120
  * @remarks
14984
15121
  * Applies to subclasses: Text
14985
15122
  *
14986
- * @param alignment - "left", "right" or "center".
14987
15123
  */
14988
15124
  set_alignment(this: void,
14989
15125
  id: number,
14990
- alignment: string): void
15126
+ alignment: TextAlign): void
14991
15127
 
14992
15128
  /**
14993
15129
  * Set the angle of the arc with this id. Does nothing if this object is not a arc.
@@ -15378,11 +15514,10 @@ interface LuaRendering {
15378
15514
  * @remarks
15379
15515
  * Applies to subclasses: Text
15380
15516
  *
15381
- * @param alignment - "top", "middle", "baseline" or "bottom"
15382
15517
  */
15383
15518
  set_vertical_alignment(this: void,
15384
15519
  id: number,
15385
- alignment: string): void
15520
+ alignment: VerticalTextAlign): void
15386
15521
 
15387
15522
  /**
15388
15523
  * Set the vertices of the polygon with this id. Does nothing if this object is not a polygon.
@@ -15821,9 +15956,9 @@ interface LuaStyle {
15821
15956
  height: number
15822
15957
 
15823
15958
  /**
15824
- * Horizontal align of the inner content of the widget, if any. Possible values are "left", "center" or "right".
15959
+ * Horizontal align of the inner content of the widget, if any.
15825
15960
  */
15826
- horizontal_align?: string
15961
+ horizontal_align?: 'left' | 'center' | 'right'
15827
15962
 
15828
15963
  /**
15829
15964
  * Horizontal space between individual cells.
@@ -16018,9 +16153,9 @@ interface LuaStyle {
16018
16153
  readonly valid: boolean
16019
16154
 
16020
16155
  /**
16021
- * Vertical align of the inner content of the widget, if any. Possible values are "top", "center" or "bottom".
16156
+ * Vertical align of the inner content of the widget, if any.
16022
16157
  */
16023
- vertical_align?: string
16158
+ vertical_align?: 'top' | 'center' | 'bottom'
16024
16159
 
16025
16160
  /**
16026
16161
  * Vertical space between individual cells.
@@ -16088,7 +16223,7 @@ interface LuaSurface {
16088
16223
 
16089
16224
  /**
16090
16225
  * @param positions - Positions for which to calculate property values
16091
- * @param property_names - Names of properties (e.g. "elevation") to calculate
16226
+ * @param property_names - Names of properties (`"elevation"`, etc) to calculate.
16092
16227
  * @returns Table of property value lists, keyed by property name
16093
16228
  */
16094
16229
  calculate_tile_properties(this: void,
@@ -16167,7 +16302,7 @@ interface LuaSurface {
16167
16302
 
16168
16303
  /**
16169
16304
  * Clears this surface deleting all entities and chunks on it.
16170
- * @param ignore_characters - Whether characters on this surface that are connected to or associated with players should be ignored (not destroyed).
16305
+ * @param ignore_characters - Whether characters on this surface that are connected to or associated with players should be ignored (not destroyed). Defaults to `false`.
16171
16306
  */
16172
16307
  clear(this: void,
16173
16308
  ignore_characters?: boolean): void
@@ -16195,7 +16330,7 @@ interface LuaSurface {
16195
16330
  source_area: BoundingBox,
16196
16331
  destination_area: BoundingBox,
16197
16332
  destination_surface?: SurfaceIdentification,
16198
- destination_force?: LuaForce | string,
16333
+ destination_force?: ForceIdentification,
16199
16334
  clone_tiles?: boolean,
16200
16335
  clone_entities?: boolean,
16201
16336
  clone_decoratives?: boolean,
@@ -16530,7 +16665,7 @@ interface LuaSurface {
16530
16665
  find_enemy_units(this: void,
16531
16666
  center: MapPosition,
16532
16667
  radius: number,
16533
- force?: LuaForce | string): LuaEntity[]
16668
+ force?: ForceIdentification): LuaEntity[]
16534
16669
 
16535
16670
  /**
16536
16671
  * Find entities in a given area.
@@ -16732,7 +16867,7 @@ interface LuaSurface {
16732
16867
  find_units(this: void,
16733
16868
  table: {
16734
16869
  area: BoundingBox,
16735
- force: LuaForce | string,
16870
+ force: ForceIdentification,
16736
16871
  condition: ForceCondition
16737
16872
  }): LuaEntity[]
16738
16873
 
@@ -16778,7 +16913,7 @@ interface LuaSurface {
16778
16913
  */
16779
16914
  get_entities_with_force(this: void,
16780
16915
  position: ChunkPosition,
16781
- force: LuaForce | string): LuaEntity[]
16916
+ force: ForceIdentification): LuaEntity[]
16782
16917
 
16783
16918
  /**
16784
16919
  * The hidden tile name.
@@ -16894,6 +17029,9 @@ interface LuaSurface {
16894
17029
 
16895
17030
  /**
16896
17031
  * Play a sound for every player on this surface.
17032
+ * @remarks
17033
+ * The sound is not played if its location is not {@link charted | runtime:LuaForce::chart} for that player.
17034
+ *
16897
17035
  * @param table.override_sound_type - The volume mixer to play the sound through. Defaults to the default mixer for the given sound type.
16898
17036
  * @param table.path - The sound to play.
16899
17037
  * @param table.position - Where the sound should be played. If not given, it's played at the current position of each player.
@@ -16995,13 +17133,13 @@ interface LuaSurface {
16995
17133
  }): number
16996
17134
 
16997
17135
  /**
16998
- * Request that the game's map generator generate chunks at the given position for the given radius on this surface.
17136
+ * Request that the game's map generator generate chunks at the given position for the given radius on this surface. If the radius is `0`, then only the chunk at the given position is generated.
16999
17137
  * @param position - Where to generate the new chunks.
17000
- * @param radius - The chunk radius from `position` to generate new chunks in.
17138
+ * @param radius - The chunk radius from `position` to generate new chunks in. Defaults to `0`.
17001
17139
  */
17002
17140
  request_to_generate_chunks(this: void,
17003
17141
  position: MapPosition,
17004
- radius: number): void
17142
+ radius?: number): void
17005
17143
 
17006
17144
  /**
17007
17145
  * Set generated status of a chunk. Useful when copying chunks.
@@ -17044,14 +17182,14 @@ interface LuaSurface {
17044
17182
  * It is recommended to call this method once for all the tiles you want to change rather than calling it individually for every tile. As the tile correction is used after every step, calling it one by one could cause the tile correction logic to redo some of the changes. Also, many small API calls are generally more performance intensive than one big one.
17045
17183
  *
17046
17184
  * @param correct_tiles - If `false`, the correction logic is not applied to the changed tiles. Defaults to `true`.
17047
- * @param raise_event - `true` or `false`. Defaults to `false`.
17048
- * @param remove_colliding_decoratives - `true` or `false`. Defaults to `true`.
17049
- * @param remove_colliding_entities - `true`, `false`, or `abort_on_collision`. Defaults to `true`.
17185
+ * @param raise_event - Defaults to `false`.
17186
+ * @param remove_colliding_decoratives - Defaults to `true`.
17187
+ * @param remove_colliding_entities - Defaults to `true`.
17050
17188
  */
17051
17189
  set_tiles(this: void,
17052
17190
  tiles: Tile[],
17053
17191
  correct_tiles?: boolean,
17054
- remove_colliding_entities?: boolean | string,
17192
+ remove_colliding_entities?: boolean | 'abort_on_collision',
17055
17193
  remove_colliding_decoratives?: boolean,
17056
17194
  raise_event?: boolean): void
17057
17195
 
@@ -17068,7 +17206,7 @@ interface LuaSurface {
17068
17206
  position: MapPosition,
17069
17207
  items: ItemStackIdentification,
17070
17208
  enable_looted?: boolean,
17071
- force?: LuaForce | string,
17209
+ force?: ForceIdentification,
17072
17210
  allow_belts?: boolean): LuaEntity[]
17073
17211
 
17074
17212
  /**
@@ -17191,9 +17329,6 @@ interface LuaSurface {
17191
17329
 
17192
17330
  /**
17193
17331
  * The multiplier of solar power on this surface. Cannot be less than 0.
17194
- * @remarks
17195
- * Solar equipment is still limited to its maximum power output.
17196
- *
17197
17332
  */
17198
17333
  solar_power_multiplier: number
17199
17334
 
@@ -18412,6 +18547,8 @@ interface LuaWallControlBehavior extends LuaControlBehavior {
18412
18547
  *
18413
18548
  */
18414
18549
  interface LuaControlSetGuiArrowParams {
18550
+ 'margin': number
18551
+
18415
18552
  /**
18416
18553
  * Where to point to. This field determines what other fields are mandatory.
18417
18554
  */
@@ -18425,6 +18562,9 @@ interface LuaControlSetGuiArrowParams {
18425
18562
  *
18426
18563
  */
18427
18564
  interface LuaControlSetGuiArrowParamsCraftingQueue extends LuaControlSetGuiArrowParams {
18565
+ /**
18566
+ * Index in the crafting queue to point to.
18567
+ */
18428
18568
  'crafting_queueindex': number
18429
18569
 
18430
18570
  }
@@ -18445,14 +18585,17 @@ interface LuaControlSetGuiArrowParamsEntity extends LuaControlSetGuiArrowParams
18445
18585
  *
18446
18586
  */
18447
18587
  interface LuaControlSetGuiArrowParamsItemStack extends LuaControlSetGuiArrowParams {
18588
+ /**
18589
+ * Which inventory the stack is in.
18590
+ */
18448
18591
  'inventory_index': defines.inventory
18449
18592
 
18450
- 'item_stack_index': number
18451
-
18452
18593
  /**
18453
- * May be either `"player"` or `"target"`.
18594
+ * Which stack to point to.
18454
18595
  */
18455
- 'source': string
18596
+ 'item_stack_index': number
18597
+
18598
+ 'source': 'player' | 'target' | 'player-quickbar' | 'player-equipment-bar'
18456
18599
 
18457
18600
  }
18458
18601
 
@@ -18627,7 +18770,7 @@ interface LuaGuiElementAddParamsChooseElemButton extends LuaGuiElementAddParams
18627
18770
  /**
18628
18771
  * The type of the button - one of the following values.
18629
18772
  */
18630
- 'elem_type': string
18773
+ 'elem_type': ElemType
18631
18774
 
18632
18775
  /**
18633
18776
  * If type is `"entity"` - the default value for the button.
@@ -18701,9 +18844,9 @@ interface LuaGuiElementAddParamsDropDown extends LuaGuiElementAddParams {
18701
18844
  */
18702
18845
  interface LuaGuiElementAddParamsFlow extends LuaGuiElementAddParams {
18703
18846
  /**
18704
- * The initial direction of the flow's layout. See {@link LuaGuiElement::direction | runtime:LuaGuiElement::direction}. Defaults to `"horizontal"`.
18847
+ * The initial direction of the flow's layout. Defaults to `"horizontal"`.
18705
18848
  */
18706
- 'direction'?: string
18849
+ 'direction'?: GuiDirection
18707
18850
 
18708
18851
  }
18709
18852
 
@@ -18714,9 +18857,9 @@ interface LuaGuiElementAddParamsFlow extends LuaGuiElementAddParams {
18714
18857
  */
18715
18858
  interface LuaGuiElementAddParamsFrame extends LuaGuiElementAddParams {
18716
18859
  /**
18717
- * The initial direction of the frame's layout. See {@link LuaGuiElement::direction | runtime:LuaGuiElement::direction}. Defaults to `"horizontal"`.
18860
+ * The initial direction of the frame's layout. Defaults to `"horizontal"`.
18718
18861
  */
18719
- 'direction'?: string
18862
+ 'direction'?: GuiDirection
18720
18863
 
18721
18864
  }
18722
18865
 
@@ -18729,7 +18872,7 @@ interface LuaGuiElementAddParamsLine extends LuaGuiElementAddParams {
18729
18872
  /**
18730
18873
  * The initial direction of the line. Defaults to `"horizontal"`.
18731
18874
  */
18732
- 'direction'?: string
18875
+ 'direction'?: GuiDirection
18733
18876
 
18734
18877
  }
18735
18878
 
@@ -18817,14 +18960,14 @@ interface LuaGuiElementAddParamsRadiobutton extends LuaGuiElementAddParams {
18817
18960
  */
18818
18961
  interface LuaGuiElementAddParamsScrollPane extends LuaGuiElementAddParams {
18819
18962
  /**
18820
- * Policy of the horizontal scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`. Defaults to `"auto"`.
18963
+ * Policy of the horizontal scroll bar. Defaults to `"auto"`.
18821
18964
  */
18822
- 'horizontal_scroll_policy'?: string
18965
+ 'horizontal_scroll_policy'?: ScrollPolicy
18823
18966
 
18824
18967
  /**
18825
- * Policy of the vertical scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`. Defaults to `"auto"`.
18968
+ * Policy of the vertical scroll bar. Defaults to `"auto"`.
18826
18969
  */
18827
- 'vertical_scroll_policy'?: string
18970
+ 'vertical_scroll_policy'?: ScrollPolicy
18828
18971
 
18829
18972
  }
18830
18973
 
@@ -18952,9 +19095,9 @@ interface LuaGuiElementAddParamsSwitch extends LuaGuiElementAddParams {
18952
19095
  'right_label_tooltip'?: LocalisedString
18953
19096
 
18954
19097
  /**
18955
- * Possible values are `"left"`, `"right"`, or `"none"`. If set to "none", `allow_none_state` must be `true`. Defaults to `"left"`.
19098
+ * If set to "none", `allow_none_state` must be `true`. Defaults to `"left"`.
18956
19099
  */
18957
- 'switch_state'?: string
19100
+ 'switch_state'?: SwitchState
18958
19101
 
18959
19102
  }
18960
19103
 
@@ -19552,9 +19695,9 @@ interface LuaSurfaceCreateEntityParamsStream extends LuaSurfaceCreateEntityParam
19552
19695
  */
19553
19696
  interface LuaSurfaceCreateEntityParamsUndergroundBelt extends LuaSurfaceCreateEntityParams {
19554
19697
  /**
19555
- * `"output"` or `"input"`; default is `"input"`.
19698
+ * Defaults to `"input"`.
19556
19699
  */
19557
- 'type'?: string
19700
+ 'type'?: 'output' | 'input'
19558
19701
 
19559
19702
  }
19560
19703