factorio-types 0.0.22 → 0.0.23

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.57
5
+ // Factorio version 1.1.58
6
6
  // API version 2
7
7
 
8
8
  /**
@@ -160,9 +160,9 @@ interface LuaArithmeticCombinatorControlBehavior extends LuaCombinatorControlBeh
160
160
  readonly object_name: string
161
161
 
162
162
  /**
163
- * The arithmetic combinator parameters.
163
+ * This arithmetic combinator's parameters.
164
164
  * @remarks
165
- * `parameters` may be `nil` in order to clear the parameters.
165
+ * Writing `nil` clears the combinator's parameters.
166
166
  *
167
167
  */
168
168
  parameters: ArithmeticCombinatorParameters
@@ -819,12 +819,12 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
819
819
  readonly object_name: string
820
820
 
821
821
  /**
822
- * The constant combinator parameters
822
+ * This constant combinator's parameters, or `nil` if the {@link item_slot_count | LuaEntityPrototype::item_slot_count} of the combinator's prototype is `0`.
823
823
  * @remarks
824
- * Setting to `nil` clears the parameters.
824
+ * Writing `nil` clears the combinator's parameters.
825
825
  *
826
826
  */
827
- parameters: ConstantCombinatorParameters[]
827
+ parameters?: ConstantCombinatorParameters[]
828
828
 
829
829
  /**
830
830
  * The number of signals this constant combinator supports
@@ -977,7 +977,7 @@ interface LuaControl {
977
977
  get_main_inventory(this: void): void
978
978
 
979
979
  /**
980
- * Gets the parameters of a personal logistic request and auto-trash slot.
980
+ * Gets the parameters of a personal logistic request and auto-trash slot. Only used on `spider-vehicle`.
981
981
  * @param slot_index - The slot to get.
982
982
  */
983
983
  get_personal_logistic_slot(this: void,
@@ -1073,7 +1073,7 @@ interface LuaControl {
1073
1073
  value: LogisticParameters): void
1074
1074
 
1075
1075
  /**
1076
- * Sets a vehicle logistic request and auto-trash slot to the given value. Only used on `spider-vehicule`s.
1076
+ * Sets a vehicle logistic request and auto-trash slot to the given value. Only used on `spider-vehicle`.
1077
1077
  * @param slot_index - The slot to set.
1078
1078
  * @param value - The logistic request parameters.
1079
1079
  */
@@ -1673,9 +1673,9 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
1673
1673
  readonly object_name: string
1674
1674
 
1675
1675
  /**
1676
- * The decider combinator parameters
1676
+ * This decider combinator's parameters.
1677
1677
  * @remarks
1678
- * Setting to `nil` clears the parameters.
1678
+ * Writing `nil` clears the combinator's parameters.
1679
1679
  *
1680
1680
  */
1681
1681
  parameters: DeciderCombinatorParameters
@@ -10033,7 +10033,7 @@ interface LuaItemStack {
10033
10033
 
10034
10034
  /**
10035
10035
  * Set this item stack to another item stack.
10036
- * @param stack - Item stack to set this one to. Omitting this parameter or passing `nil` will clear this item stack, as if by calling [LuaItemStack::clear](LuaItemStack::clear).
10036
+ * @param stack - Item stack to set it to. Omitting this parameter or passing `nil` will clear this item stack, as if [LuaItemStack::clear](LuaItemStack::clear) was called.
10037
10037
  */
10038
10038
  set_stack(this: void,
10039
10039
  stack?: ItemStackIdentification): void
@@ -14119,12 +14119,12 @@ interface LuaStyle {
14119
14119
  extra_left_padding_when_activated: number
14120
14120
 
14121
14121
  /**
14122
- * Sets extra_top/right/bottom/left_margin_when_activated to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
14122
+ * Sets `extra_top/right/bottom/left_margin_when_activated` to this value. An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
14123
14123
  */
14124
14124
  extra_margin_when_activated: number | number[]
14125
14125
 
14126
14126
  /**
14127
- * Sets extra_top/right/bottom/left_padding_when_actived to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
14127
+ * Sets `extra_top/right/bottom/left_padding_when_activated` to this value. An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
14128
14128
  */
14129
14129
  extra_padding_when_activated: number | number[]
14130
14130
 
@@ -14178,7 +14178,7 @@ interface LuaStyle {
14178
14178
  /**
14179
14179
  * Horizontal space between individual cells.
14180
14180
  * @remarks
14181
- * Applies to subclasses: LuaTableStyle,LuaFlowStyle,LuaHorizontalFlow
14181
+ * Applies to subclasses: LuaTableStyle,LuaFlowStyle,LuaHorizontalFlowStyle
14182
14182
  *
14183
14183
  */
14184
14184
  horizontal_spacing: number
@@ -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.57
5
+ // Factorio version 1.1.58
6
6
  // API version 2
7
7
 
8
8
  /**
@@ -1628,7 +1628,7 @@ interface ItemStackLocation {
1628
1628
  *
1629
1629
  * As a special case, when the key is just the empty string, all the parameters will be concatenated (after processing, if any are localised strings). If there is only one parameter, it will be used as is.
1630
1630
  *
1631
- * Furthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table) which will not be translated, as well as a number or boolean, which will be converted to their textual representation.
1631
+ * Furthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table) which will not be translated, as well as a number, boolean or `nil`, which will be converted to their textual representation.
1632
1632
  * @example
1633
1633
  * In the English translation, this will print `"No ammo"`; in the Czech translation, it will print `"Bez munice"`:
1634
1634
  * ```
@@ -3342,7 +3342,7 @@ interface BaseAchievementPrototypeFilter {
3342
3342
 
3343
3343
  /**
3344
3344
  * @param filter - The condition to filter on. One of `"allowed-without-fight"`, `"type"`.
3345
- * @param type - The prototype type
3345
+ * @param type - The prototype type, or a list of acceptable types.
3346
3346
  */
3347
3347
  interface AchievementPrototypeFilterType extends BaseAchievementPrototypeFilter {
3348
3348
  /**
@@ -3350,9 +3350,9 @@ interface AchievementPrototypeFilterType extends BaseAchievementPrototypeFilter
3350
3350
  */
3351
3351
  'filter': 'type'
3352
3352
  /**
3353
- * The prototype type
3353
+ * The prototype type, or a list of acceptable types.
3354
3354
  */
3355
- 'type': string
3355
+ 'type': string | string[]
3356
3356
  }
3357
3357
 
3358
3358
  /**
@@ -3843,7 +3843,7 @@ interface EntityPrototypeFilterSelectionPriority extends BaseEntityPrototypeFilt
3843
3843
 
3844
3844
  /**
3845
3845
  * @param filter - The condition to filter on. One of `"flying-robot"`, `"robot-with-logistics-interface"`, `"rail"`, `"ghost"`, `"explosion"`, `"vehicle"`, `"crafting-machine"`, `"rolling-stock"`, `"turret"`, `"transport-belt-connectable"`, `"wall-connectable"`, `"buildable"`, `"placable-in-editor"`, `"clonable"`, `"selectable"`, `"hidden"`, `"entity-with-health"`, `"building"`, `"fast-replaceable"`, `"uses-direction"`, `"minable"`, `"circuit-connectable"`, `"autoplace"`, `"blueprintable"`, `"item-to-place"`, `"name"`, `"type"`, `"collision-mask"`, `"flag"`, `"build-base-evolution-requirement"`, `"selection-priority"`, `"emissions"`, `"crafting-category"`.
3846
- * @param type - The prototype type
3846
+ * @param type - The prototype type, or a list of acceptable types.
3847
3847
  */
3848
3848
  interface EntityPrototypeFilterType extends BaseEntityPrototypeFilter {
3849
3849
  /**
@@ -3851,9 +3851,9 @@ interface EntityPrototypeFilterType extends BaseEntityPrototypeFilter {
3851
3851
  */
3852
3852
  'filter': 'type'
3853
3853
  /**
3854
- * The prototype type
3854
+ * The prototype type, or a list of acceptable types.
3855
3855
  */
3856
- 'type': string
3856
+ 'type': string | string[]
3857
3857
  }
3858
3858
 
3859
3859
  /**
@@ -3883,7 +3883,7 @@ interface BaseEquipmentPrototypeFilter {
3883
3883
 
3884
3884
  /**
3885
3885
  * @param filter - The condition to filter on. One of `"item-to-place"`, `"type"`.
3886
- * @param type - The prototype type
3886
+ * @param type - The prototype type, or a list of acceptable types.
3887
3887
  */
3888
3888
  interface EquipmentPrototypeFilterType extends BaseEquipmentPrototypeFilter {
3889
3889
  /**
@@ -3891,9 +3891,9 @@ interface EquipmentPrototypeFilterType extends BaseEquipmentPrototypeFilter {
3891
3891
  */
3892
3892
  'filter': 'type'
3893
3893
  /**
3894
- * The prototype type
3894
+ * The prototype type, or a list of acceptable types.
3895
3895
  */
3896
- 'type': string
3896
+ 'type': string | string[]
3897
3897
  }
3898
3898
 
3899
3899
  /**
@@ -4415,7 +4415,7 @@ interface ItemPrototypeFilterSubgroup extends BaseItemPrototypeFilter {
4415
4415
 
4416
4416
  /**
4417
4417
  * @param filter - The condition to filter on. One of `"tool"`, `"mergeable"`, `"item-with-inventory"`, `"selection-tool"`, `"item-with-label"`, `"has-rocket-launch-products"`, `"fuel"`, `"place-result"`, `"burnt-result"`, `"place-as-tile"`, `"placed-as-equipment-result"`, `"name"`, `"type"`, `"flag"`, `"subgroup"`, `"fuel-category"`, `"stack-size"`, `"default-request-amount"`, `"wire-count"`, `"fuel-value"`, `"fuel-acceleration-multiplier"`, `"fuel-top-speed-multiplier"`, `"fuel-emissions-multiplier"`.
4418
- * @param type - The prototype type
4418
+ * @param type - The prototype type, or a list of acceptable types.
4419
4419
  */
4420
4420
  interface ItemPrototypeFilterType extends BaseItemPrototypeFilter {
4421
4421
  /**
@@ -4423,9 +4423,9 @@ interface ItemPrototypeFilterType extends BaseItemPrototypeFilter {
4423
4423
  */
4424
4424
  'filter': 'type'
4425
4425
  /**
4426
- * The prototype type
4426
+ * The prototype type, or a list of acceptable types.
4427
4427
  */
4428
- 'type': string
4428
+ 'type': string | string[]
4429
4429
  }
4430
4430
 
4431
4431
  /**
@@ -6224,7 +6224,7 @@ interface ModSettingPrototypeFilterMod extends BaseModSettingPrototypeFilter {
6224
6224
 
6225
6225
  /**
6226
6226
  * @param filter - The condition to filter on. One of `"type"`, `"mod"`, `"setting-type"`.
6227
- * @param type - The setting scope type (startup, runtime-global, or runtime-per-user)
6227
+ * @param type - The setting scope type (`"startup"`, `"runtime-global"`, or `"runtime-per-user"`)
6228
6228
  */
6229
6229
  interface ModSettingPrototypeFilterSettingType extends BaseModSettingPrototypeFilter {
6230
6230
  /**
@@ -6232,14 +6232,14 @@ interface ModSettingPrototypeFilterSettingType extends BaseModSettingPrototypeFi
6232
6232
  */
6233
6233
  'filter': 'setting-type'
6234
6234
  /**
6235
- * The setting scope type (startup, runtime-global, or runtime-per-user)
6235
+ * The setting scope type (`"startup"`, `"runtime-global"`, or `"runtime-per-user"`)
6236
6236
  */
6237
6237
  'type': string
6238
6238
  }
6239
6239
 
6240
6240
  /**
6241
6241
  * @param filter - The condition to filter on. One of `"type"`, `"mod"`, `"setting-type"`.
6242
- * @param type - The prototype type
6242
+ * @param type - The prototype type, or a list of acceptable types.
6243
6243
  */
6244
6244
  interface ModSettingPrototypeFilterType extends BaseModSettingPrototypeFilter {
6245
6245
  /**
@@ -6247,9 +6247,9 @@ interface ModSettingPrototypeFilterType extends BaseModSettingPrototypeFilter {
6247
6247
  */
6248
6248
  'filter': 'type'
6249
6249
  /**
6250
- * The prototype type
6250
+ * The prototype type, or a list of acceptable types.
6251
6251
  */
6252
- 'type': string
6252
+ 'type': string | string[]
6253
6253
  }
6254
6254
 
6255
6255
  /**
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.57
5
+ // Factorio version 1.1.58
6
6
  // API version 2
7
7
 
8
8
  declare namespace defines {
@@ -598,6 +598,7 @@ declare namespace defines {
598
598
  on_player_removed_equipment,
599
599
  on_player_repaired_entity,
600
600
  on_player_respawned,
601
+ on_player_reverse_selected_area,
601
602
  on_player_rotated_entity,
602
603
  on_player_selected_area,
603
604
  on_player_set_quick_bar_slot,
@@ -626,6 +627,7 @@ declare namespace defines {
626
627
  on_pre_script_inventory_resized,
627
628
  on_pre_surface_cleared,
628
629
  on_pre_surface_deleted,
630
+ on_research_cancelled,
629
631
  on_research_finished,
630
632
  on_research_reversed,
631
633
  on_research_started,
@@ -831,6 +833,7 @@ declare namespace defines {
831
833
  remove_train_station,
832
834
  reset_assembling_machine,
833
835
  reset_item,
836
+ reverse_select_area,
834
837
  rotate_entity,
835
838
  select_area,
836
839
  select_blueprint_entities,
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.57
5
+ // Factorio version 1.1.58
6
6
  // API version 2
7
7
 
8
8
  /**
@@ -1484,6 +1484,35 @@ interface on_player_respawned extends event {
1484
1484
  */
1485
1485
  player_port?: LuaEntity
1486
1486
  }
1487
+ /**
1488
+ * Called after a player reverse-selects an area with a selection-tool item.
1489
+ */
1490
+ interface on_player_reverse_selected_area extends event {
1491
+ /**
1492
+ * The area selected.
1493
+ */
1494
+ area: BoundingBox
1495
+ /**
1496
+ * The entities selected.
1497
+ */
1498
+ entities: LuaEntity[]
1499
+ /**
1500
+ * The item used to select the area.
1501
+ */
1502
+ item: string
1503
+ /**
1504
+ * The player doing the selection.
1505
+ */
1506
+ player_index: number
1507
+ /**
1508
+ * The surface selected.
1509
+ */
1510
+ surface: LuaSurface
1511
+ /**
1512
+ * The tiles selected.
1513
+ */
1514
+ tiles: LuaTile[]
1515
+ }
1487
1516
  /**
1488
1517
  * Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event.
1489
1518
  */
@@ -1883,6 +1912,15 @@ interface on_pre_surface_cleared extends event {
1883
1912
  interface on_pre_surface_deleted extends event {
1884
1913
  surface_index: number
1885
1914
  }
1915
+ /**
1916
+ * Called when research is cancelled.
1917
+ */
1918
+ interface on_research_cancelled extends event {
1919
+ /**
1920
+ * A mapping of technology name to how many times it was cancelled.
1921
+ */
1922
+ research: {[key: string]: number}
1923
+ }
1886
1924
  /**
1887
1925
  * Called when a research finishes.
1888
1926
  */
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.57
5
+ // Factorio version 1.1.58
6
6
  // API version 2
7
7
 
8
8
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
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",