factorio-types 1.2.55 → 1.2.56

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 2.0.73
5
+ // Factorio version 2.0.74
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -7640,10 +7640,13 @@ interface LuaEntity extends LuaControl {
7640
7640
  render_player_write?: PlayerIdentification;
7641
7641
  /**
7642
7642
  * The forces that this `simple-entity-with-owner` or `simple-entity-with-force` is visible to. `nil` or an empty array when this entity is rendered for all forces.
7643
- *
7644
- * Reading will always give an array of {@link LuaForce | runtime:LuaForce}
7645
7643
  */
7646
- render_to_forces?: ForceSet;
7644
+ readonly render_to_forces?: LuaForce[];
7645
+ /**
7646
+ * The forces that this `simple-entity-with-owner` or `simple-entity-with-force` is visible to. `nil` or an empty array when this entity is rendered for all forces.
7647
+ * @customName render_to_forces
7648
+ */
7649
+ render_to_forces_write?: ForceSet;
7647
7650
  /**
7648
7651
  * Whether this requester chest is set to also request from buffer chests.
7649
7652
  *
@@ -8128,7 +8131,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8128
8131
  readonly attractor_hit_effect?: TriggerItem[];
8129
8132
  readonly auto_setup_collision_box: boolean;
8130
8133
  /**
8131
- * The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.
8134
+ * The amount of ammo that inserters automatically insert into this ammo turret, artillery turret or artillery wagon.
8132
8135
  */
8133
8136
  readonly automated_ammo_count?: uint32;
8134
8137
  /**
@@ -8525,6 +8528,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8525
8528
  * The drop position for this inserter.
8526
8529
  */
8527
8530
  readonly inserter_drop_position?: Vector;
8531
+ /**
8532
+ * The max belt stack size for this inserter.
8533
+ */
8534
+ readonly inserter_max_belt_stack_size?: uint8;
8528
8535
  /**
8529
8536
  * The pickup position for this inserter.
8530
8537
  */
@@ -16522,9 +16529,14 @@ interface LuaRenderObject {
16522
16529
  */
16523
16530
  font: string;
16524
16531
  /**
16525
- * Forces for which this object is rendered or `nil` if visible to all forces. Writing nil or empty array will make object to be visible to all forces.
16532
+ * Forces for which this object is rendered or `nil` if visible to all forces. Writing `nil` or empty array will make this object visible to all forces.
16533
+ */
16534
+ readonly forces?: LuaForce[];
16535
+ /**
16536
+ * Forces for which this object is rendered or `nil` if visible to all forces. Writing `nil` or empty array will make this object visible to all forces.
16537
+ * @customName forces
16526
16538
  */
16527
- forces?: LuaForce[] | ForceSet;
16539
+ forces_write?: ForceSet;
16528
16540
  /**
16529
16541
  * Where this line is drawn from.
16530
16542
  */
@@ -16586,7 +16598,7 @@ interface LuaRenderObject {
16586
16598
  */
16587
16599
  oriented_offset: Vector;
16588
16600
  /**
16589
- * Players for which this object is visible or `nil` if visible to all players.
16601
+ * Players for which this object is visible or `nil` if visible to all players. Writing `nil` or empty array will make this object visible to all players.
16590
16602
  */
16591
16603
  players?: LuaPlayer[] | PlayerIdentification[];
16592
16604
  /**
@@ -17988,6 +18000,9 @@ interface LuaStorageTankControlBehavior extends LuaControlBehavior {
17988
18000
  interface LuaStyle {
17989
18001
  badge_font: string;
17990
18002
  badge_horizontal_spacing: int32;
18003
+ /**
18004
+ * The thickness of the bar, not the horizontal width.
18005
+ */
17991
18006
  bar_width: uint32;
17992
18007
  /**
17993
18008
  * Space between the table cell contents bottom and border.
@@ -2,7 +2,7 @@
2
2
  // Factorio API reference https://lua-api.factorio.com/latest/index.html
3
3
  // Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
4
4
  // Definition source https://github.com/sguest/factorio-types
5
- // Factorio version 2.0.73
5
+ // Factorio version 2.0.74
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -580,6 +580,7 @@ interface BlueprintEntityArtilleryWagon extends BaseBlueprintEntity {
580
580
  'enable_logistics_while_moving': boolean;
581
581
  'grid'?: BlueprintEquipment[];
582
582
  'orientation': RealOrientation;
583
+ 'stock_connections'?: BlueprintRollingStockConnection;
583
584
  }
584
585
  /**
585
586
  *
@@ -633,6 +634,7 @@ interface BlueprintEntityCargoWagon extends BaseBlueprintEntity {
633
634
  'grid'?: BlueprintEquipment[];
634
635
  'inventory': BlueprintInventoryWithFilters;
635
636
  'orientation': RealOrientation;
637
+ 'stock_connections'?: BlueprintRollingStockConnection;
636
638
  }
637
639
  /**
638
640
  *
@@ -719,6 +721,7 @@ interface BlueprintEntityFluidWagon extends BaseBlueprintEntity {
719
721
  'enable_logistics_while_moving': boolean;
720
722
  'grid'?: BlueprintEquipment[];
721
723
  'orientation': RealOrientation;
724
+ 'stock_connections'?: BlueprintRollingStockConnection;
722
725
  }
723
726
  /**
724
727
  *
@@ -747,6 +750,7 @@ interface BlueprintEntityInfinityCargoWagon extends BaseBlueprintEntity {
747
750
  'infinity_settings': BlueprintInfinityInventorySettings;
748
751
  'inventory': BlueprintInventoryWithFilters;
749
752
  'orientation': RealOrientation;
753
+ 'stock_connections'?: BlueprintRollingStockConnection;
750
754
  }
751
755
  /**
752
756
  *
@@ -867,6 +871,7 @@ interface BlueprintEntityLocomotive extends BaseBlueprintEntity {
867
871
  'grid'?: BlueprintEquipment[];
868
872
  'orientation': RealOrientation;
869
873
  'schedule'?: BlueprintSchedule;
874
+ 'stock_connections'?: BlueprintRollingStockConnection;
870
875
  }
871
876
  /**
872
877
  *
@@ -1175,6 +1180,20 @@ interface BlueprintQualityID {
1175
1180
  */
1176
1181
  name?: string;
1177
1182
  }
1183
+ interface BlueprintRollingStockConnection {
1184
+ /**
1185
+ * The entity_number of 'this' entity in the blueprint.
1186
+ */
1187
+ stock: uint32;
1188
+ /**
1189
+ * The entity_number of the front stock connection.
1190
+ */
1191
+ front?: uint32;
1192
+ /**
1193
+ * The entity_number of the back stock connection.
1194
+ */
1195
+ back?: uint32;
1196
+ }
1178
1197
  interface BlueprintSchedule {
1179
1198
  records?: BlueprintScheduleRecord[];
1180
1199
  group?: string;
@@ -4098,7 +4117,9 @@ interface LoaderBlueprintControlBehavior {
4098
4117
  logistic_condition?: CircuitCondition;
4099
4118
  }
4100
4119
  /**
4101
- * Localised strings are a way to support translation of in-game text. It is an array where the first element is the key and the remaining elements are parameters that will be substituted for placeholders in the template designated by the key.
4120
+ * Localised strings are a way to support translation of in-game text. They offer a language-independent code representation of the text that should be shown to players.
4121
+ *
4122
+ * It is an array where the first element is the key and the remaining elements are parameters that will be substituted for placeholders in the template designated by the key.
4102
4123
  *
4103
4124
  * The key identifies the string template. For example, `"gui-alert-tooltip.attack"` (for the template `"__1__ objects are being damaged"`; see the file `data/core/locale/en.cfg`).
4104
4125
  *
@@ -7957,8 +7978,8 @@ interface ResearchTriggerCraftFluid extends BaseResearchTrigger {
7957
7978
  */
7958
7979
  interface ResearchTriggerCraftItem extends BaseResearchTrigger {
7959
7980
  'type': 'craft-item';
7960
- 'item': string;
7961
- 'item_quality'?: string;
7981
+ 'count': ItemCountType;
7982
+ 'item': ItemIDFilter;
7962
7983
  }
7963
7984
  /**
7964
7985
  *
@@ -7990,7 +8011,7 @@ interface Resistance {
7990
8011
  */
7991
8012
  decrease: float;
7992
8013
  /**
7993
- * Percentual damage decrease.
8014
+ * Percentual damage decrease. Expected range is from 0 to 1, e.g. 0.5 is 50%.
7994
8015
  */
7995
8016
  percent: float;
7996
8017
  }
@@ -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 2.0.73
5
+ // Factorio version 2.0.74
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
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 2.0.73
5
+ // Factorio version 2.0.74
6
6
  // API version 6
7
7
 
8
8
  declare namespace defines {
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 2.0.73
5
+ // Factorio version 2.0.74
6
6
  // API version 6
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 2.0.73
5
+ // Factorio version 2.0.74
6
6
  // API version 6
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 2.0.73
5
+ // Factorio version 2.0.74
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -327,11 +327,14 @@ interface AmmoItemPrototype extends ItemPrototype {
327
327
  */
328
328
  interface AmmoTurretPrototype extends TurretPrototype {
329
329
  /**
330
- * Shift of the "alt-mode icon" relative to the turret's position.
330
+ * The amount of ammo that inserters automatically insert into this turret.
331
331
  */
332
332
  automated_ammo_count: ItemCountType;
333
333
  energy_per_shot?: Energy;
334
334
  energy_source?: ElectricEnergySource;
335
+ /**
336
+ * Size of the ammo inventory.
337
+ */
335
338
  inventory_size: ItemStackIndex;
336
339
  prepare_with_no_ammo?: boolean;
337
340
  }
@@ -742,7 +745,7 @@ interface ArtilleryTurretPrototype extends EntityWithOwnerPrototype {
742
745
  */
743
746
  ammo_stack_limit: ItemCountType;
744
747
  /**
745
- * Must be > 0.
748
+ * Must be > 0. The amount of ammo that inserters automatically insert into this artillery turret.
746
749
  */
747
750
  automated_ammo_count?: ItemCountType;
748
751
  base_picture?: Animation4Way;
@@ -802,7 +805,7 @@ interface ArtilleryWagonPrototype extends RollingStockPrototype {
802
805
  */
803
806
  ammo_stack_limit: ItemCountType;
804
807
  /**
805
- * Must be > 0.
808
+ * Must be > 0. The amount of ammo that inserters automatically insert into this artillery wagon.
806
809
  */
807
810
  automated_ammo_count?: ItemCountType;
808
811
  /**
@@ -2955,7 +2958,7 @@ interface ElectricPolePrototype extends EntityWithOwnerPrototype {
2955
2958
  * Max value is 64.
2956
2959
  */
2957
2960
  supply_area_distance: double;
2958
- track_coverage_during_build_by_moving?: boolean;
2961
+ track_coverage_during_drag_building?: boolean;
2959
2962
  }
2960
2963
  /**
2961
2964
  * A turret that uses electricity as ammunition.
@@ -3352,7 +3355,7 @@ interface EntityPrototype extends Prototype {
3352
3355
  shooting_cursor_size?: double;
3353
3356
  stateless_visualisation?: StatelessVisualisation | StatelessVisualisation[];
3354
3357
  /**
3355
- * Used to set the area of the entity that can have stickers on it, currently only used for units to specify the area where the green slow down stickers can appear.
3358
+ * Used to specify the area where the {@link sticker | prototype:StickerPrototype} animation can appear for entities that can have stickers on them.
3356
3359
  * @example ```
3357
3360
  sticker_box = {{-0.5, -0.5}, {0.5, 0.5}}
3358
3361
  ```
@@ -7353,7 +7356,7 @@ interface ResourceEntityPrototype extends EntityPrototype {
7353
7356
  */
7354
7357
  infinite?: boolean;
7355
7358
  /**
7356
- * Every time an infinite-type resource "ticks" lower it's lowered by that amount.
7359
+ * Every time an infinite-type resource is decreased by mining, its current resource amount is lowered by this number.
7357
7360
  */
7358
7361
  infinite_depletion_amount?: uint32;
7359
7362
  /**
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 2.0.73
5
+ // Factorio version 2.0.74
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -65,6 +65,9 @@ interface ActivityBarStyleSpecification extends BaseStyleSpecification {
65
65
  bar?: ElementImageSet;
66
66
  bar_background?: ElementImageSet;
67
67
  bar_size_ratio?: float;
68
+ /**
69
+ * The thickness of the bar, not the horizontal size.
70
+ */
68
71
  bar_width?: uint32;
69
72
  color?: Color;
70
73
  speed?: float;
@@ -6011,7 +6014,7 @@ interface LoaderStructure {
6011
6014
  *
6012
6015
  * There are two special flags for the localised string, indicated by the key being a particular string. First, if the key is the empty string (`""`), then all parameters will be concatenated (after processing, if any are localised strings themselves). Second, if the key is a question mark (`"?"`), then the first valid parameter will be used. A parameter can be invalid if its name doesn't match any string template. If no parameters are valid, the last one is returned. This is useful to implement a fallback for missing locale templates.
6013
6016
  *
6014
- * 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.
6017
+ * 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. In the settings and prototype stages, this string cannot be longer than 200 characters.
6015
6018
  *
6016
6019
  * See {@link Tutorial:Localisation | https://wiki.factorio.com/Tutorial:Localisation} for more information.
6017
6020
  * @example ```
@@ -7899,6 +7902,9 @@ interface ProgrammableSpeakerNote {
7899
7902
  interface ProgressBarStyleSpecification extends BaseStyleSpecification {
7900
7903
  bar?: ElementImageSet;
7901
7904
  bar_background?: ElementImageSet;
7905
+ /**
7906
+ * The thickness of the bar, not the horizontal size.
7907
+ */
7902
7908
  bar_width?: uint32;
7903
7909
  color?: Color;
7904
7910
  embed_text_in_bar?: boolean;
@@ -8413,7 +8419,7 @@ interface Resistance {
8413
8419
  */
8414
8420
  decrease?: float;
8415
8421
  /**
8416
- * The {@link percentage resistance | https://wiki.factorio.com/Damage#Percentage_resistance} to the given damage type. (Higher is better)
8422
+ * The {@link percentage resistance | https://wiki.factorio.com/Damage#Percentage_resistance} to the given damage type. Expected range is from 0 to 100, e.g. 50 is 50%. (Higher is better.)
8417
8423
  */
8418
8424
  percent?: float;
8419
8425
  type: DamageTypeID;
@@ -9029,6 +9035,9 @@ interface SimulationDefinition {
9029
9035
  * If this is true, the map of the simulation is set to be a lab-tile checkerboard in the area of `{{-20, -15},{20, 15}}` when the scenario is first initialized (before init/init_file run).
9030
9036
  */
9031
9037
  checkboard?: boolean;
9038
+ /**
9039
+ * Only applied to the simulation if a test player is created through {@link LuaSimulation::create_test_player | runtime:LuaSimulation::create_test_player}.
9040
+ */
9032
9041
  game_view_settings?: GameViewSettings;
9033
9042
  /**
9034
9043
  * If `save` is not given and this is true, a map gets generated by the game for use in the simulation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.55",
3
+ "version": "1.2.56",
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",
@@ -23,11 +23,11 @@
23
23
  "src/**/*.d.ts",
24
24
  "dist/**/*.d.ts"
25
25
  ],
26
- "factorioVersion": "2.0.73",
26
+ "factorioVersion": "2.0.74",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "typescript-to-lua": "^1.26.0"
32
32
  }
33
- }
33
+ }