factorio-types 0.0.47 → 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.102
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  declare namespace runtime {
@@ -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,
@@ -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
@@ -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
 
@@ -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
@@ -3729,6 +3756,7 @@ interface LuaEntity extends LuaControl {
3729
3756
  * Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
3730
3757
  * @remarks
3731
3758
  * Set to 0 to reset.
3759
+ * Applies to subclasses: Inserter
3732
3760
  *
3733
3761
  */
3734
3762
  inserter_stack_size_override: number
@@ -3737,6 +3765,7 @@ interface LuaEntity extends LuaControl {
3737
3765
  * Returns the current target pickup count of the inserter.
3738
3766
  * @remarks
3739
3767
  * This considers the circuit network, manual override and the inserter stack size limit based on technology.
3768
+ * Applies to subclasses: Inserter
3740
3769
  *
3741
3770
  */
3742
3771
  readonly inserter_target_pickup_count: number
@@ -3794,6 +3823,9 @@ interface LuaEntity extends LuaControl {
3794
3823
 
3795
3824
  /**
3796
3825
  * The link ID this linked container is using.
3826
+ * @remarks
3827
+ * Applies to subclasses: LinkedContainer
3828
+ *
3797
3829
  */
3798
3830
  link_id: number
3799
3831
 
@@ -3965,6 +3997,9 @@ interface LuaEntity extends LuaControl {
3965
3997
 
3966
3998
  /**
3967
3999
  * The state of this power switch.
4000
+ * @remarks
4001
+ * Applies to subclasses: PowerSwitch
4002
+ *
3968
4003
  */
3969
4004
  power_switch_state: boolean
3970
4005
 
@@ -4007,6 +4042,9 @@ interface LuaEntity extends LuaControl {
4007
4042
 
4008
4043
  /**
4009
4044
  * The target entity for this item-request-proxy, if any.
4045
+ * @remarks
4046
+ * Applies to subclasses: ItemRequestProxy
4047
+ *
4010
4048
  */
4011
4049
  readonly proxy_target?: LuaEntity
4012
4050
 
@@ -4088,6 +4126,9 @@ interface LuaEntity extends LuaControl {
4088
4126
 
4089
4127
  /**
4090
4128
  * The status of this rocket silo entity.
4129
+ * @remarks
4130
+ * Applies to subclasses: RocketSilo
4131
+ *
4091
4132
  */
4092
4133
  readonly rocket_silo_status: defines.rocket_silo_status
4093
4134
 
@@ -4124,6 +4165,9 @@ interface LuaEntity extends LuaControl {
4124
4165
 
4125
4166
  /**
4126
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
+ *
4127
4171
  */
4128
4172
  shooting_target?: LuaEntity
4129
4173
 
@@ -4144,6 +4188,9 @@ interface LuaEntity extends LuaControl {
4144
4188
 
4145
4189
  /**
4146
4190
  * The spawner associated with this unit entity, if any.
4191
+ * @remarks
4192
+ * Applies to subclasses: Unit
4193
+ *
4147
4194
  */
4148
4195
  readonly spawner?: LuaEntity
4149
4196
 
@@ -4207,6 +4254,9 @@ interface LuaEntity extends LuaControl {
4207
4254
 
4208
4255
  /**
4209
4256
  * The entity this sticker is sticked to.
4257
+ * @remarks
4258
+ * Applies to subclasses: Sticker
4259
+ *
4210
4260
  */
4211
4261
  readonly sticked_to: LuaEntity
4212
4262
 
@@ -4278,10 +4328,13 @@ interface LuaEntity extends LuaControl {
4278
4328
  readonly tile_width: number
4279
4329
 
4280
4330
  /**
4281
- * 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.
4282
4332
  *
4283
4333
  * - for ghosts set to uint32 max (4 294 967 295) to never expire.
4284
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
+ *
4285
4338
  */
4286
4339
  time_to_live: number
4287
4340
 
@@ -4351,31 +4404,49 @@ interface LuaEntity extends LuaControl {
4351
4404
 
4352
4405
  /**
4353
4406
  * Index of the tree color.
4407
+ * @remarks
4408
+ * Applies to subclasses: Tree
4409
+ *
4354
4410
  */
4355
4411
  tree_color_index: number
4356
4412
 
4357
4413
  /**
4358
4414
  * Maximum index of the tree colors.
4415
+ * @remarks
4416
+ * Applies to subclasses: Tree
4417
+ *
4359
4418
  */
4360
4419
  readonly tree_color_index_max: number
4361
4420
 
4362
4421
  /**
4363
4422
  * Index of the tree gray stage
4423
+ * @remarks
4424
+ * Applies to subclasses: Tree
4425
+ *
4364
4426
  */
4365
4427
  tree_gray_stage_index: number
4366
4428
 
4367
4429
  /**
4368
4430
  * Maximum index of the tree gray stages.
4431
+ * @remarks
4432
+ * Applies to subclasses: Tree
4433
+ *
4369
4434
  */
4370
4435
  readonly tree_gray_stage_index_max: number
4371
4436
 
4372
4437
  /**
4373
4438
  * Index of the tree stage.
4439
+ * @remarks
4440
+ * Applies to subclasses: Tree
4441
+ *
4374
4442
  */
4375
4443
  tree_stage_index: number
4376
4444
 
4377
4445
  /**
4378
4446
  * Maximum index of the tree stages.
4447
+ * @remarks
4448
+ * Applies to subclasses: Tree
4449
+ *
4379
4450
  */
4380
4451
  readonly tree_stage_index_max: number
4381
4452
 
@@ -5471,8 +5542,9 @@ interface LuaEntityPrototype {
5471
5542
 
5472
5543
  /**
5473
5544
  * The manual range modifier for this artillery turret or wagon prototype.
5474
- *
5475
- * subclass(ArtilleryWagon, ArtilleryTurret)
5545
+ * @remarks
5546
+ * Applies to subclasses: ArtilleryWagon,ArtilleryTurret
5547
+ *
5476
5548
  */
5477
5549
  readonly manual_range_modifier?: number
5478
5550
 
@@ -8555,7 +8627,7 @@ interface LuaGameScript {
8555
8627
  * @param table.player - The player to focus on. Defaults to the local player.
8556
8628
  * @param table.position - If defined, the screenshot will be centered on this position. Otherwise, the screenshot will center on `player`.
8557
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`.
8558
- * @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.
8559
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`.
8560
8632
  * @param table.show_entity_info - Whether to include entity info ("Alt mode") or not. Defaults to `false`.
8561
8633
  * @param table.show_gui - Whether to include GUIs in the screenshot or not. Defaults to `false`.
@@ -10005,7 +10077,7 @@ interface LuaGuiElement {
10005
10077
  /**
10006
10078
  * The type of this GUI element.
10007
10079
  */
10008
- readonly type: string
10080
+ readonly type: GuiElementType
10009
10081
 
10010
10082
  /**
10011
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.
@@ -11518,7 +11590,7 @@ interface LuaItemStack {
11518
11590
  * Applies to subclasses: DeconstructionItem
11519
11591
  *
11520
11592
  * @param filter - Writing `nil` removes the filter.
11521
- * @returns Whether the new filter was successfully set (meaning was valid).
11593
+ * @returns Whether the new filter was successfully set (meaning it was valid).
11522
11594
  */
11523
11595
  set_tile_filter(this: void,
11524
11596
  index: number,
@@ -11701,6 +11773,11 @@ interface LuaItemStack {
11701
11773
  */
11702
11774
  health: number
11703
11775
 
11776
+ /**
11777
+ * If this is an ammo item.
11778
+ */
11779
+ readonly is_ammo: boolean
11780
+
11704
11781
  /**
11705
11782
  * If this is an armor item.
11706
11783
  */
@@ -13307,11 +13384,11 @@ interface LuaPlayer extends LuaControl {
13307
13384
  /**
13308
13385
  * Starts selection with selection tool from the specified position. Does nothing if the players cursor is not a selection tool.
13309
13386
  * @param position - The position to start selection from.
13310
- * @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.
13311
13388
  */
13312
13389
  start_selection(this: void,
13313
13390
  position: MapPosition,
13314
- selection_mode: string): void
13391
+ selection_mode: 'select' | 'alternative-select' | 'reverse-select'): void
13315
13392
 
13316
13393
  /**
13317
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.
@@ -14221,7 +14298,7 @@ interface LuaRendering {
14221
14298
  mod_name?: string): void
14222
14299
 
14223
14300
  /**
14224
- * Destroy the object with the given id.
14301
+ * Destroy the object with the given id. Does not error when the object is invalid.
14225
14302
  */
14226
14303
  destroy(this: void,
14227
14304
  id: number): void
@@ -15032,6 +15109,12 @@ interface LuaRendering {
15032
15109
  is_valid(this: void,
15033
15110
  id: number): boolean
15034
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
+
15035
15118
  /**
15036
15119
  * Set the alignment of the text with this id. Does nothing if this object is not a text.
15037
15120
  * @remarks
@@ -16219,7 +16302,7 @@ interface LuaSurface {
16219
16302
 
16220
16303
  /**
16221
16304
  * Clears this surface deleting all entities and chunks on it.
16222
- * @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`.
16223
16306
  */
16224
16307
  clear(this: void,
16225
16308
  ignore_characters?: boolean): void
@@ -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.102
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  declare namespace runtime {
@@ -1382,7 +1382,7 @@ interface InfinityPipeFilter {
1382
1382
  name: string,
1383
1383
 
1384
1384
  /**
1385
- * The fill percentage the pipe (`0.5` for 50%). Can't be negative.
1385
+ * The fill percentage the pipe (for example `0.5` for 50%). Can't be negative.
1386
1386
  */
1387
1387
  percentage?: number,
1388
1388
 
@@ -2044,8 +2044,12 @@ interface MapViewSettings {
2044
2044
  'show-non-standard-map-info'?: boolean,
2045
2045
  'show-player-names'?: boolean,
2046
2046
  'show-pollution'?: boolean,
2047
+ 'show-rail-signal-states'?: boolean,
2048
+ 'show-recipe-icons'?: boolean,
2049
+ 'show-tags'?: boolean,
2047
2050
  'show-train-station-names'?: boolean,
2048
- 'show-turret-range'?: boolean
2051
+ 'show-turret-range'?: boolean,
2052
+ 'show-worker-robots'?: boolean
2049
2053
  }
2050
2054
 
2051
2055
  interface ModChangeData {
@@ -2428,7 +2432,7 @@ type PlayerIdentification = /* The player index. */ number | /* The player name.
2428
2432
  interface PollutionMapSettings {
2429
2433
 
2430
2434
  /**
2431
- * 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`.
2432
2436
  */
2433
2437
  ageing: number,
2434
2438
 
package/dist/defines.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 1.1.102
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  declare namespace defines {
@@ -701,11 +701,11 @@ declare namespace defines {
701
701
  */
702
702
  always,
703
703
  /**
704
- * Hover according to the element type and implementation.
704
+ * Never hover this element with a game controller.
705
705
  */
706
706
  never,
707
707
  /**
708
- * Never hover this element with a game controller.
708
+ * Hover according to the element type and implementation.
709
709
  */
710
710
  normal,
711
711
  }
package/dist/events.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 1.1.102
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  declare namespace runtime {
package/dist/global.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 1.1.102
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  /**
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 1.1.102
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  declare namespace prototype {
@@ -1025,12 +1025,12 @@ interface BatteryEquipmentPrototype extends EquipmentPrototype{
1025
1025
  }
1026
1026
 
1027
1027
  /**
1028
- * Entity with the ability to transfer module's effects to its neighboring entities.
1028
+ * Entity with the ability to transfer {@link module | prototype:ModulePrototype} effects to its neighboring entities.
1029
1029
  */
1030
1030
  interface BeaconPrototype extends EntityWithOwnerPrototype{
1031
1031
 
1032
1032
  /**
1033
- * The types of modules that a player can place inside of the beacon.
1033
+ * The types of {@link modules | prototype:ModulePrototype} that a player can place inside of the beacon.
1034
1034
  */
1035
1035
  allowed_effects?: EffectTypeLimitation,
1036
1036
 
@@ -2012,7 +2012,7 @@ Controls the speed of the animation: `1 ÷ dying_speed = duration of the animati
2012
2012
  interface CraftingMachinePrototype extends EntityWithOwnerPrototype{
2013
2013
 
2014
2014
  /**
2015
- * Sets the module effects that are allowed to be used on this machine.
2015
+ * Sets the {@link modules | prototype:ModulePrototype} and {@link beacon | prototype:BeaconPrototype} effects that are allowed to be used on this machine.
2016
2016
 
2017
2017
  Note: If the time to complete a recipe is shorter than one tick, only one craft can be completed per tick, but productivity bonus is applied to the non-limited ''completable'' work. For a simple example, if a recipe were to take half a tick, only one recipe would be completed, but twice the productivity bonus would occur. The surplus production from productivity is **not** limited to one craft per tick.
2018
2018
  */
@@ -3416,7 +3416,7 @@ Mandatory if `icons` is not defined, or if `icon_size` is not specified for all
3416
3416
  max_temperature?: number,
3417
3417
 
3418
3418
  /**
3419
- * The value of this property may not be an empty string. It either has to be nil, or a non-empty string.
3419
+ * The name of the {@link subgroup | prototype:ItemSubGroup} of this fluid. The value of this property may not be an empty string. It either has to be `nil`, or a non-empty string.
3420
3420
  */
3421
3421
  subgroup?: ItemSubGroupID
3422
3422
  }
@@ -4274,7 +4274,9 @@ The localised name of the entity will be used as the in-game item name. This beh
4274
4274
  stack_size: ItemCountType,
4275
4275
 
4276
4276
  /**
4277
- * Empty text of subgroup is not allowed. (You can omit the definition to get the default "other").
4277
+ * The name of the {@link subgroup | prototype:ItemSubGroup} this item should be sorted into in item selection GUIs like logistic requests.
4278
+
4279
+ Empty text of subgroup is not allowed. (You can omit the definition to get the default "other").
4278
4280
  */
4279
4281
  subgroup?: ItemSubGroupID,
4280
4282
 
@@ -4403,7 +4405,7 @@ interface ItemWithInventoryPrototype extends ItemWithLabelPrototype{
4403
4405
  item_group_filters?: ItemGroupID[],
4404
4406
 
4405
4407
  /**
4406
- * A list of explicit item subgroup names to be used as filters.
4408
+ * A list of explicit {@link item subgroup | prototype:ItemSubGroup} names to be used as filters.
4407
4409
  */
4408
4410
  item_subgroup_filters?: ItemSubGroupID[],
4409
4411
 
@@ -4473,12 +4475,12 @@ interface KillAchievementPrototype extends AchievementPrototype{
4473
4475
  }
4474
4476
 
4475
4477
  /**
4476
- * A {@link lab | https://wiki.factorio.com/Lab}.
4478
+ * A {@link lab | https://wiki.factorio.com/Lab}. It consumes {@link science packs | prototype:ToolPrototype} to research {@link technologies | prototype:TechnologyPrototype}.
4477
4479
  */
4478
4480
  interface LabPrototype extends EntityWithOwnerPrototype{
4479
4481
 
4480
4482
  /**
4481
- * Sets the module effects that are allowed to be used on this lab.
4483
+ * Sets the {@link modules | prototype:ModulePrototype} and {@link beacon | prototype:BeaconPrototype} effects that are allowed to be used on this lab.
4482
4484
  */
4483
4485
  allowed_effects?: EffectTypeLimitation,
4484
4486
 
@@ -5049,6 +5051,10 @@ interface MarketPrototype extends EntityWithOwnerPrototype{
5049
5051
  * A mining drill for automatically extracting resources from {@link resource entities | prototype:ResourceEntityPrototype}. This prototype type is used by {@link burner mining drill | https://wiki.factorio.com/Burner_mining_drill}, {@link electric mining drill | https://wiki.factorio.com/Electric_mining_drill} and {@link pumpjack | https://wiki.factorio.com/Pumpjack} in vanilla.
5050
5052
  */
5051
5053
  interface MiningDrillPrototype extends EntityWithOwnerPrototype{
5054
+
5055
+ /**
5056
+ * Sets the {@link modules | prototype:ModulePrototype} and {@link beacon | prototype:BeaconPrototype} effects that are allowed to be used on this mining drill.
5057
+ */
5052
5058
  allowed_effects?: EffectTypeLimitation,
5053
5059
 
5054
5060
  /**
@@ -5159,12 +5165,12 @@ interface ModuleCategory extends PrototypeBase{
5159
5165
  }
5160
5166
 
5161
5167
  /**
5162
- * A {@link module | https://wiki.factorio.com/Module}.
5168
+ * A {@link module | https://wiki.factorio.com/Module}. They are used to affect the capabilities of existing machines, for example by increasing the crafting speed of a {@link crafting machine | prototype:CraftingMachinePrototype}.
5163
5169
  */
5164
5170
  interface ModulePrototype extends ItemPrototype{
5165
5171
 
5166
5172
  /**
5167
- * Chooses with what art style the module is shown inside beacons. See {@link BeaconModuleVisualizations::art_style | prototype:BeaconModuleVisualizations::art_style}. Vanilla uses "vanilla" here.
5173
+ * Chooses with what art style the module is shown inside {@link beacons | prototype:BeaconPrototype}. See {@link BeaconModuleVisualizations::art_style | prototype:BeaconModuleVisualizations::art_style}. Vanilla uses `"vanilla"` here.
5168
5174
  */
5169
5175
  art_style?: string,
5170
5176
  beacon_tint?: BeaconVisualizationTints,
@@ -5173,15 +5179,19 @@ interface ModulePrototype extends ItemPrototype{
5173
5179
  * Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules of the same category with higher tier modules.
5174
5180
  */
5175
5181
  category: ModuleCategoryID,
5182
+
5183
+ /**
5184
+ * The effect of the module on the machine it's inserted in, such as increased pollution.
5185
+ */
5176
5186
  effect: Effect,
5177
5187
 
5178
5188
  /**
5179
- * Array of recipe names this module can be used on. If empty, the module can be used on all recipes.
5189
+ * Array of {@link recipe names | prototype:RecipePrototype} this module can be used on. If empty, the module can be used on all recipes.
5180
5190
  */
5181
5191
  limitation?: RecipeID[],
5182
5192
 
5183
5193
  /**
5184
- * Array of recipe names this module can **not** be used on, implicitly allowing its use on all other recipes. This property has no effect if set to an empty table.
5194
+ * Array of {@link recipe names | prototype:RecipePrototype} this module can **not** be used on, implicitly allowing its use on all other recipes. This property has no effect if set to an empty table.
5185
5195
 
5186
5196
  Note that the game converts this into a normal list of limitations internally, so reading {@link LuaItemPrototype::limitations | runtime:LuaItemPrototype::limitations} at runtime will be the product of both ways of defining limitations.
5187
5197
  */
@@ -5540,6 +5550,10 @@ interface PipePrototype extends EntityWithOwnerPrototype{
5540
5550
  */
5541
5551
  fluid_box: FluidBox,
5542
5552
  horizontal_window_bounding_box: BoundingBox,
5553
+
5554
+ /**
5555
+ * All graphics for this pipe.
5556
+ */
5543
5557
  pictures: PipePictures,
5544
5558
  vertical_window_bounding_box: BoundingBox
5545
5559
  }
@@ -6253,7 +6267,7 @@ Only loaded if neither `normal` nor `expensive` are defined.
6253
6267
  always_show_products?: boolean,
6254
6268
 
6255
6269
  /**
6256
- * Controls which category of machines can craft this recipe.
6270
+ * The {@link category | prototype:RecipeCategory} of this recipe. Controls which machines can craft this recipe.
6257
6271
 
6258
6272
  The built-in categories can be found {@link here | https://wiki.factorio.com/Data.raw#recipe-category}. The base `"crafting"` category can not contain recipes with fluid ingredients or products.
6259
6273
  */
@@ -6409,7 +6423,7 @@ Only loaded if neither `normal` nor `expensive` are defined.
6409
6423
  show_amount_in_title?: boolean,
6410
6424
 
6411
6425
  /**
6412
- * The subgroup of this recipe. If not specified, it defaults to the subgroup of the product if there is only one, or of the `main_product` if multiple products exist.
6426
+ * The name of the {@link subgroup | prototype:ItemSubGroup} of this recipe. If not specified, it defaults to the subgroup of the product if there is only one, or of the `main_product` if multiple products exist.
6413
6427
 
6414
6428
  Mandatory if multiple products exist and no `main_product` is specified, or if there is no product.
6415
6429
  */
@@ -8651,7 +8665,7 @@ interface TransportBeltConnectablePrototype extends EntityWithOwnerPrototype{
8651
8665
  ends_with_stopper?: boolean,
8652
8666
 
8653
8667
  /**
8654
- * Transport belt connectable entities cannot have any of the following flags: "placeable-off-grid", "building-direction-8-way".
8668
+ * Transport belt connectable entities cannot have the `"building-direction-8-way"` flag.
8655
8669
  */
8656
8670
  flags?: EntityPrototypeFlags,
8657
8671
 
@@ -10014,7 +10028,7 @@ Mandatory if `icons` is not defined, or if `icon_size` is not specified for all
10014
10028
  icons?: IconData[],
10015
10029
 
10016
10030
  /**
10017
- * The name of a {@link ItemSubGroup | prototype:ItemSubGroup}.
10031
+ * The name of an {@link ItemSubGroup | prototype:ItemSubGroup}.
10018
10032
  */
10019
10033
  subgroup?: ItemSubGroupID
10020
10034
  }
package/dist/types.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 1.1.102
5
+ // Factorio version 1.1.105
6
6
  // API version 4
7
7
 
8
8
  declare namespace prototype {
@@ -2475,6 +2475,9 @@ interface DirectTriggerItem extends TriggerItem{
2475
2475
  type: 'direct'
2476
2476
  }
2477
2477
 
2478
+ /**
2479
+ * Usually specified by using {@link defines.direction | runtime:defines.direction}.
2480
+ */
2478
2481
  type Direction = /* North */ 0 | /* Northeast */ 1 | /* East */ 2 | /* Southeast */ 3 | /* South */ 4 | /* Southwest */ 5 | /* West */ 6 | /* Northwest */ 7
2479
2482
 
2480
2483
  interface DirectionShift {
@@ -2505,7 +2508,7 @@ interface DropDownStyleSpecification extends BaseStyleSpecification{
2505
2508
  }
2506
2509
 
2507
2510
  /**
2508
- * When applied to modules, the resulting effect is a sum of all module affects, multiplied through calculations: `(1 + sum module effects)` or, for productivity `(0 + sum)`.
2511
+ * When applied to {@link modules | prototype:ModulePrototype}, the resulting effect is a sum of all module effects, multiplied through calculations: `(1 + sum module effects)` or, for productivity `(0 + sum)`.
2509
2512
  * @example
2510
2513
  * ```
2511
2514
  * effect =
@@ -2542,7 +2545,7 @@ interface Effect {
2542
2545
  }
2543
2546
 
2544
2547
  /**
2545
- * A list of module effects, or just a single effect. Modules with other effects cannot be used on the machine. This means that both effects from modules and from surrounding beacons are restricted to the listed effects. If `allowed_effects` is set to `nil`, the machine cannot be affected by modules or beacons.
2548
+ * A list of {@link module | prototype:ModulePrototype} effects, or just a single effect. Modules with other effects cannot be used on the machine. This means that both effects from modules and from surrounding beacons are restricted to the listed effects. If `allowed_effects` is an empty array, the machine cannot be affected by modules or beacons.
2546
2549
  * @example
2547
2550
  * ```
2548
2551
  * -- Allow all module types
@@ -2561,7 +2564,7 @@ type EffectTypeLimitation = /* Modules that increase or decrease the machine's s
2561
2564
  interface EffectValue {
2562
2565
 
2563
2566
  /**
2564
- * Precision is ignored beyond two decimals - `0.567` results in `0.56` etc.
2567
+ * Precision is ignored beyond two decimals - `0.567` results in `0.56` and means 56% etc.
2565
2568
  */
2566
2569
  bonus?: number
2567
2570
  }
@@ -3931,15 +3934,20 @@ interface ImageStyleSpecification extends BaseStyleSpecification{
3931
3934
  }
3932
3935
 
3933
3936
  /**
3934
- * Defaults to loading ingredients as items.
3937
+ * Defaults to loading ingredients as items. This allows {@link ItemIngredientPrototype | prototype:ItemIngredientPrototype} to load in a shorthand array format.
3935
3938
  * @example
3936
3939
  * ```
3937
- * {type="item", name="steel-plate", amount=8}
3940
+ * {"electronic-circuit", 5} -- short format used for item ingredients
3938
3941
  * ```
3939
3942
  *
3940
3943
  * @example
3941
3944
  * ```
3942
- * {type="fluid", name="water", amount=50}
3945
+ * {type="item", name="steel-plate", amount=8} -- long format used for item ingredients
3946
+ * ```
3947
+ *
3948
+ * @example
3949
+ * ```
3950
+ * {type="fluid", name="water", amount=50} -- fluid ingredients must use the long format
3943
3951
  * ```
3944
3952
  *
3945
3953
  */
@@ -4117,16 +4125,21 @@ type ItemSubGroupID = string
4117
4125
 
4118
4126
  /**
4119
4127
  * Item that when placed creates this entity/tile.
4128
+ * @example
4129
+ * ```
4130
+ * {item = "iron-chest", count = 1}
4131
+ * ```
4132
+ *
4120
4133
  */
4121
4134
  interface ItemToPlace {
4122
4135
 
4123
4136
  /**
4124
- * How many items are used to place one of this entity. Can't be larger than the stack size of the item.
4137
+ * How many items are used to place one of this entity/tile. Can't be larger than the stack size of the item.
4125
4138
  */
4126
4139
  count: number,
4127
4140
 
4128
4141
  /**
4129
- * The item used to place this entity.
4142
+ * The item used to place this entity/tile.
4130
4143
  */
4131
4144
  item: ItemID
4132
4145
  }
@@ -4597,7 +4610,7 @@ interface MapGenPresetEnemyExpansionSettings {
4597
4610
  interface MapGenPresetPollutionSettings {
4598
4611
 
4599
4612
  /**
4600
- * Must be >= 0.1. Also known as dissipation rate.
4613
+ * Must be >= 0.1. Also known as absorption modifier and previously dissipation rate.
4601
4614
  */
4602
4615
  ageing?: number,
4603
4616
 
@@ -5686,6 +5699,7 @@ type NoiseVariableConstants = /* Additional constants are generated for all {@li
5686
5699
 
5687
5700
  interface NothingModifier extends BaseModifier{
5688
5701
  effect_description?: LocalisedString,
5702
+ type: 'nothing',
5689
5703
 
5690
5704
  /**
5691
5705
  * If `false`, do not draw the small "constant" icon over the technology effect icon.
@@ -6113,7 +6127,7 @@ type PlayerInputMethodFilter = 'all' | 'keyboard_and_mouse' | 'game_controller'
6113
6127
  interface PollutionSettings {
6114
6128
 
6115
6129
  /**
6116
- * Constant modifier a percentage of 1; the pollution eaten by a chunks tiles.
6130
+ * Constant modifier a percentage of 1; the pollution eaten by a chunks tiles. Also known as absorption modifier.
6117
6131
  */
6118
6132
  ageing: number,
6119
6133
 
@@ -6993,7 +7007,7 @@ interface ScrollPaneStyleSpecification extends BaseStyleSpecification{
6993
7007
  /**
6994
7008
  * An array containing the following values.
6995
7009
  */
6996
- type SelectionModeFlags = Array</* Selects entities and tiles as if selecting them for a blueprint. */ 'blueprint' | /* Selects entities and tiles as if selecting them for deconstruction. */ 'deconstruct' | /* Selects entities and tiles as if selecting them for deconstruction cancellation. */ 'cancel-deconstruct' | /* Selects items on the ground. */ 'items' | /* Selects trees. */ 'trees' | /* Selects entities which are considered {@link a building | runtime:LuaEntityPrototype::is_building}, plus landmines. */ 'buildable-type' | /* Selects no entities or tiles, but is useful to select an area. */ 'nothing' | /* Selects entities and tiles that can be built by an item. */ 'items-to-place' | /* Selects all entities. */ 'any-entity' | /* Selects all tiles. */ 'any-tile' | /* Selects entities with the same force as the selecting player. */ 'same-force' | /* Selects entities with a different force as the selecting player. */ 'not-same-force' | /* Selects entities from a friendly force. */ 'friend' | /* Selects entities from an enemy force. */ 'enemy' | /* Selects entities as if selecting them for upgrading. */ 'upgrade' | /* Selects entities as if selecting them for upgrade cancellation. */ 'cancel-upgrade' | /* Selects entities as if selecting them for downgrading. */ 'downgrade' | /* Selects entities that are an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype}. */ 'entity-with-health' | /* Deprecated. Replaced by "is-military-target". */ 'entity-with-force' | /* Selects entities which are {@link EntityWithOwnerPrototype::is_military_target | prototype:EntityWithOwnerPrototype::is_military_target}. */ 'is-military-target' | /* Selects entities that are an {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype}. */ 'entity-with-owner' | /* Selects entities that are not a {@link RollingStockPrototype | prototype:RollingStockPrototype}. */ 'avoid-rolling-stock' | /* Selects entities that are an {@link EntityGhostPrototype | prototype:EntityGhostPrototype}. */ 'entity-ghost' | /* Selects entities that are a {@link TileGhostPrototype | prototype:TileGhostPrototype}. */ 'tile-ghost'>
7010
+ type SelectionModeFlags = /* Selects entities and tiles as if selecting them for a blueprint. */ 'blueprint' | /* Selects entities and tiles as if selecting them for deconstruction. */ 'deconstruct' | /* Selects entities and tiles as if selecting them for deconstruction cancellation. */ 'cancel-deconstruct' | /* Selects items on the ground. */ 'items' | /* Selects trees. */ 'trees' | /* Selects entities which are considered {@link a building | runtime:LuaEntityPrototype::is_building}, plus landmines. */ 'buildable-type' | /* Selects no entities or tiles, but is useful to select an area. */ 'nothing' | /* Selects entities and tiles that can be built by an item. */ 'items-to-place' | /* Selects all entities. */ 'any-entity' | /* Selects all tiles. */ 'any-tile' | /* Selects entities with the same force as the selecting player. */ 'same-force' | /* Selects entities with a different force as the selecting player. */ 'not-same-force' | /* Selects entities from a friendly force. */ 'friend' | /* Selects entities from an enemy force. */ 'enemy' | /* Selects entities as if selecting them for upgrading. */ 'upgrade' | /* Selects entities as if selecting them for upgrade cancellation. */ 'cancel-upgrade' | /* Selects entities as if selecting them for downgrading. */ 'downgrade' | /* Selects entities that are an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype}. */ 'entity-with-health' | /* Deprecated. Replaced by "is-military-target". */ 'entity-with-force' | /* Selects entities which are {@link EntityWithOwnerPrototype::is_military_target | prototype:EntityWithOwnerPrototype::is_military_target}. */ 'is-military-target' | /* Selects entities that are an {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype}. */ 'entity-with-owner' | /* Selects entities that are not a {@link RollingStockPrototype | prototype:RollingStockPrototype}. */ 'avoid-rolling-stock' | /* Selects entities that are an {@link EntityGhostPrototype | prototype:EntityGhostPrototype}. */ 'entity-ghost' | /* Selects entities that are a {@link TileGhostPrototype | prototype:TileGhostPrototype}. */ 'tile-ghost' | Array</* Selects entities and tiles as if selecting them for a blueprint. */ 'blueprint' | /* Selects entities and tiles as if selecting them for deconstruction. */ 'deconstruct' | /* Selects entities and tiles as if selecting them for deconstruction cancellation. */ 'cancel-deconstruct' | /* Selects items on the ground. */ 'items' | /* Selects trees. */ 'trees' | /* Selects entities which are considered {@link a building | runtime:LuaEntityPrototype::is_building}, plus landmines. */ 'buildable-type' | /* Selects no entities or tiles, but is useful to select an area. */ 'nothing' | /* Selects entities and tiles that can be built by an item. */ 'items-to-place' | /* Selects all entities. */ 'any-entity' | /* Selects all tiles. */ 'any-tile' | /* Selects entities with the same force as the selecting player. */ 'same-force' | /* Selects entities with a different force as the selecting player. */ 'not-same-force' | /* Selects entities from a friendly force. */ 'friend' | /* Selects entities from an enemy force. */ 'enemy' | /* Selects entities as if selecting them for upgrading. */ 'upgrade' | /* Selects entities as if selecting them for upgrade cancellation. */ 'cancel-upgrade' | /* Selects entities as if selecting them for downgrading. */ 'downgrade' | /* Selects entities that are an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype}. */ 'entity-with-health' | /* Deprecated. Replaced by "is-military-target". */ 'entity-with-force' | /* Selects entities which are {@link EntityWithOwnerPrototype::is_military_target | prototype:EntityWithOwnerPrototype::is_military_target}. */ 'is-military-target' | /* Selects entities that are an {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype}. */ 'entity-with-owner' | /* Selects entities that are not a {@link RollingStockPrototype | prototype:RollingStockPrototype}. */ 'avoid-rolling-stock' | /* Selects entities that are an {@link EntityGhostPrototype | prototype:EntityGhostPrototype}. */ 'entity-ghost' | /* Selects entities that are a {@link TileGhostPrototype | prototype:TileGhostPrototype}. */ 'tile-ghost'>
6997
7011
 
6998
7012
  interface SequenceTipTrigger {
6999
7013
 
@@ -7667,6 +7681,45 @@ Same as `slice`, but this specifies only how many slices there are on the y-axis
7667
7681
 
7668
7682
  /**
7669
7683
  * A map of sprites for all 4 directions of the entity. If this is loaded as a single Sprite, it applies to all directions.
7684
+ * @example
7685
+ * ```
7686
+ * -- separate sprites per direction
7687
+ * {
7688
+ * north =
7689
+ * {
7690
+ * filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-N.png",
7691
+ * priority = "extra-high",
7692
+ * width = 35,
7693
+ * height = 18,
7694
+ * shift = util.by_pixel(2.5, 14)
7695
+ * },
7696
+ * east =
7697
+ * {
7698
+ * filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-E.png",
7699
+ * priority = "extra-high",
7700
+ * width = 20,
7701
+ * height = 38,
7702
+ * shift = util.by_pixel(-25, 1)
7703
+ * },
7704
+ * south =
7705
+ * {
7706
+ * filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-S.png",
7707
+ * priority = "extra-high",
7708
+ * width = 44,
7709
+ * height = 31,
7710
+ * shift = util.by_pixel(0, -31.5)
7711
+ * },
7712
+ * west =
7713
+ * {
7714
+ * filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-W.png",
7715
+ * priority = "extra-high",
7716
+ * width = 19,
7717
+ * height = 37,
7718
+ * shift = util.by_pixel(25.5, 1.5)
7719
+ * }
7720
+ * }
7721
+ * ```
7722
+ *
7670
7723
  */
7671
7724
  type Sprite4Way = {
7672
7725
 
@@ -8444,11 +8497,15 @@ interface TileSprite {
8444
8497
 
8445
8498
  /**
8446
8499
  * Frame count.
8500
+
8501
+ Optional if it is loaded inside of a `hr_version`, see that property for more information.
8447
8502
  */
8448
8503
  count: number,
8449
8504
 
8450
8505
  /**
8451
8506
  * If this property exists and high resolution sprites are turned on, its contents are used to load the tile sprite.
8507
+
8508
+ `count` in `hr_version` has to be either unspecified or the same as for normal resolution definition.
8452
8509
  */
8453
8510
  hr_version?: TileSprite,
8454
8511
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "description": "Typescript declarations for the factorio mod API",
5
5
  "main": "index.d.ts",
6
6
  "repository": "https://github.com/sguest/factorio-types.git",
@@ -24,5 +24,5 @@
24
24
  "index.d.ts",
25
25
  "dist/**/*.d.ts"
26
26
  ],
27
- "factorioVersion": "1.1.102"
27
+ "factorioVersion": "1.1.105"
28
28
  }