factorio-types 1.2.9 → 1.2.11

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.15
5
+ // Factorio version 2.0.17
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -4813,6 +4813,12 @@ interface LuaControl {
4813
4813
  * @returns The number of items that were actually removed.
4814
4814
  */
4815
4815
  remove_item(this: void, items: ItemStackIdentification): uint;
4816
+ /**
4817
+ * Sets if this characer or player is driving. Returns if the player or character is still driving.
4818
+ * @param driving True for enter-vehicle, false for leave.
4819
+ * @param force If true, the player will be ejected and left at the position of the car if normal "leave" is not possible.
4820
+ */
4821
+ set_driving(this: void, driving: bool, force?: bool): void;
4816
4822
  /**
4817
4823
  * Create an arrow which points at this entity. This is used in the tutorial. For examples, see `control.lua` in the campaign missions.
4818
4824
  */
@@ -5809,6 +5815,10 @@ interface LuaEntity extends LuaControl {
5809
5815
  * @param index If provided, only returns the `LuaLogisticPoint` specified by this index.
5810
5816
  */
5811
5817
  get_logistic_point(this: void, index?: defines.logistic_member_index): (LuaLogisticPoint | Record<defines.logistic_member_index, LuaLogisticPoint>) | null;
5818
+ /**
5819
+ * Gives logistic sections of this entity if it uses logistic sections.
5820
+ */
5821
+ get_logistic_sections(this: void): LuaLogisticSections | null;
5812
5822
  /**
5813
5823
  * Get all offers in a market as an array.
5814
5824
  */
@@ -9529,10 +9539,6 @@ interface LuaGameScript {
9529
9539
  * Disables replay saving for the current save file. Once done there's no way to re-enable replay saving for the save file without loading an old save.
9530
9540
  */
9531
9541
  disable_replay(this: void): void;
9532
- /**
9533
- * Enables tip triggers in custom scenarios, that unlock new tips and show notices about unlocked tips.
9534
- */
9535
- enable_tip_triggers_in_custom_scenarios(this: void): void;
9536
9542
  /**
9537
9543
  * Force a CRC check. Tells all peers to calculate their current CRC, which are then compared to each other. If a mismatch is detected, the game desyncs and some peers are forced to reconnect.
9538
9544
  */
@@ -9752,6 +9758,8 @@ interface LuaGameScript {
9752
9758
  * @param table.show_entity_info Whether to include entity info ("Alt mode") or not. Defaults to `false`.
9753
9759
  * @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`.
9754
9760
  * @param table.anti_alias Whether to render in double resolution and downscale the result (including GUI). Defaults to `false`.
9761
+ * @param table.hide_clouds If `true` cloud shadows on ground won't be rendered. Defaults to `false`.
9762
+ * @param table.hide_fog If `true` fog effect and foreground space dust effect won't be rendered. Defaults to `false`.
9755
9763
  * @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`.
9756
9764
  * @param table.allow_in_replay Whether to save the screenshot even during replay playback. Defaults to `false`.
9757
9765
  * @param table.daytime Overrides the current surface daytime for the duration of screenshot rendering.
@@ -9770,6 +9778,8 @@ interface LuaGameScript {
9770
9778
  show_entity_info?: boolean;
9771
9779
  show_cursor_building_preview?: boolean;
9772
9780
  anti_alias?: boolean;
9781
+ hide_clouds?: boolean;
9782
+ hide_fog?: boolean;
9773
9783
  quality?: int;
9774
9784
  allow_in_replay?: boolean;
9775
9785
  daytime?: double;
@@ -9801,6 +9811,12 @@ interface LuaGameScript {
9801
9811
  * @param player The player to unmute.
9802
9812
  */
9803
9813
  unmute_player(this: void, player: PlayerIdentification): void;
9814
+ /**
9815
+ * If the tips are allowed to be activated in this scenario, it is false by default.
9816
+ *
9817
+ * Can't be modified in a simulation (menu screen, tips and tricks simulation, factoriopedia simulation etc.)
9818
+ */
9819
+ allow_tip_activation: boolean;
9804
9820
  /**
9805
9821
  * True by default. Can be used to disable autosaving. Make sure to turn it back on soon after.
9806
9822
  */
@@ -9832,7 +9848,7 @@ interface LuaGameScript {
9832
9848
  */
9833
9849
  readonly difficulty: defines.difficulty;
9834
9850
  /**
9835
- * The currently active set of difficulty settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game. This is however not recommended as different difficulties can have differing technology and recipe trees, which can cause problems for players.
9851
+ * The currently active set of difficulty settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game.
9836
9852
  * @example ```
9837
9853
  -- This will set the technology price multiplier to 12.
9838
9854
  game.difficulty_settings.technology_price_multiplier = 12
@@ -11615,7 +11631,7 @@ interface LuaItemCommon {
11615
11631
  * @param table.surface Surface to create from
11616
11632
  * @param table.force Force to use for the creation
11617
11633
  * @param table.area The bounding box
11618
- * @param table.always_include_tiles When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area.
11634
+ * @param table.always_include_tiles When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area. Defaults to false.
11619
11635
  * @param table.include_entities When true, entities are included in the blueprint. Defaults to true.
11620
11636
  * @param table.include_modules When true, modules are included in the blueprint. Defaults to true.
11621
11637
  * @param table.include_station_names When true, station names are included in the blueprint. Defaults to false.
@@ -12032,6 +12048,10 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12032
12048
  * The prototype of this armor's equipment grid, if any.
12033
12049
  */
12034
12050
  readonly equipment_grid?: LuaEquipmentGridPrototype;
12051
+ /**
12052
+ * The durability message key used when displaying the durability of this tool in Factoriopedia.
12053
+ */
12054
+ readonly factoriopedia_durability_description_key?: string;
12035
12055
  /**
12036
12056
  * The filter mode used by this item with inventory.
12037
12057
  */
@@ -12821,6 +12841,44 @@ interface LuaLogisticSection {
12821
12841
  */
12822
12842
  readonly valid: boolean;
12823
12843
  }
12844
+ /**
12845
+ * Logistic sections of an entity.
12846
+ */
12847
+ interface LuaLogisticSections {
12848
+ /**
12849
+ * Adds a new logistic section if possible.
12850
+ * @param group The group to assign this section to.
12851
+ * @returns Logistic section if added.
12852
+ */
12853
+ add_section(this: void, group?: string): LuaLogisticSection | null;
12854
+ /**
12855
+ * Gets section on the selected index, if it exists.
12856
+ * @param section_index Index of the section.
12857
+ */
12858
+ get_section(this: void, section_index: uint): LuaLogisticSection | null;
12859
+ /**
12860
+ * Removes the given logistic section if possible. Removal may fail if the section index is out of range or the section is not {@link manual | runtime:LuaLogisticSection::is_manual}.
12861
+ * @param section_index Index of the section.
12862
+ * @returns Whether section was removed.
12863
+ */
12864
+ remove_section(this: void, section_index: uint): boolean;
12865
+ /**
12866
+ * 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.
12867
+ */
12868
+ readonly object_name: string;
12869
+ /**
12870
+ * All logistic sections of this entity.
12871
+ */
12872
+ readonly sections: LuaLogisticSection[];
12873
+ /**
12874
+ * Amount of logistic sections this entity has.
12875
+ */
12876
+ readonly sections_count: uint;
12877
+ /**
12878
+ * 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.
12879
+ */
12880
+ readonly valid: boolean;
12881
+ }
12824
12882
  /**
12825
12883
  * Control behavior for mining drills.
12826
12884
  */
@@ -14666,7 +14724,7 @@ interface LuaRecord {
14666
14724
  * @param table.surface Surface to create from
14667
14725
  * @param table.force Force to use for the creation
14668
14726
  * @param table.area The bounding box
14669
- * @param table.always_include_tiles When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area.
14727
+ * @param table.always_include_tiles When true, blueprintable tiles are always included in the blueprint. When false they're only included if no entities exist in the setup area. Defaults to false.
14670
14728
  * @param table.include_entities When true, entities are included in the blueprint. Defaults to true.
14671
14729
  * @param table.include_modules When true, modules are included in the blueprint. Defaults to true.
14672
14730
  * @param table.include_station_names When true, station names are included in the blueprint. Defaults to false.
@@ -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.15
5
+ // Factorio version 2.0.17
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -6236,7 +6236,7 @@ string | /**
6236
6236
  'item-in-inserter-hand' | /**
6237
6237
  * 130
6238
6238
  */
6239
- 'above-inserter' | /**
6239
+ 'above-inserters' | /**
6240
6240
  * 131
6241
6241
  */
6242
6242
  'wires' | /**
@@ -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.15
5
+ // Factorio version 2.0.17
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.15
5
+ // Factorio version 2.0.17
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.15
5
+ // Factorio version 2.0.17
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.15
5
+ // Factorio version 2.0.17
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.15
5
+ // Factorio version 2.0.17
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -6665,7 +6665,7 @@ interface ResearchWithSciencePackAchievementPrototype extends AchievementPrototy
6665
6665
  interface ResourceCategory extends Prototype {
6666
6666
  }
6667
6667
  /**
6668
- * A mineable/gatherable entity. Its {@link collision_mask | prototype:EntityPrototype::collision_mask} must contain "resource-layer" if it should be minable with a {@link MiningDrillPrototype | prototype:MiningDrillPrototype}.
6668
+ * A mineable/gatherable entity.
6669
6669
  * @example ```
6670
6670
  {
6671
6671
  type = "resource",
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.15
5
+ // Factorio version 2.0.17
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -2424,6 +2424,7 @@ interface ChartUtilityConstants {
2424
2424
  artillery_range_color: Color;
2425
2425
  blue_signal_color: Color;
2426
2426
  chart_construction_robot_color: Color;
2427
+ chart_deconstruct_active_color: Color;
2427
2428
  chart_deconstruct_tint: Color;
2428
2429
  chart_delivery_to_me_logistic_robot_color: Color;
2429
2430
  chart_logistic_robot_color: Color;
@@ -8126,7 +8127,7 @@ interface RecipeTints {
8126
8127
  *
8127
8128
  * Note: `decals` is used as special marker for {@link DecorativePrototype::render_layer | prototype:DecorativePrototype::render_layer}. When used elsewhere, the sprites will draw over the terrain.
8128
8129
  */
8129
- type RenderLayer = 'zero' | 'background-transitions' | 'under-tiles' | 'decals' | 'above-tiles' | 'ground-layer-1' | 'ground-layer-2' | 'ground-layer-3' | 'ground-layer-4' | 'ground-layer-5' | 'lower-radius-visualization' | 'radius-visualization' | 'transport-belt-integration' | 'resource' | 'building-smoke' | 'rail-stone-path-lower' | 'rail-stone-path' | 'rail-tie' | 'decorative' | 'ground-patch' | 'ground-patch-higher' | 'ground-patch-higher2' | 'rail-chain-signal-metal' | 'rail-screw' | 'rail-metal' | 'remnants' | 'floor' | 'transport-belt' | 'transport-belt-endings' | 'floor-mechanics-under-corpse' | 'corpse' | 'floor-mechanics' | 'item' | 'transport-belt-reader' | 'lower-object' | 'transport-belt-circuit-connector' | 'lower-object-above-shadow' | 'lower-object-overlay' | 'object-under' | 'object' | 'cargo-hatch' | 'higher-object-under' | 'higher-object-above' | 'train-stop-top' | 'item-in-inserter-hand' | 'above-inserter' | 'wires' | 'under-elevated' | 'elevated-rail-stone-path-lower' | 'elevated-rail-stone-path' | 'elevated-rail-tie' | 'elevated-rail-screw' | 'elevated-rail-metal' | 'elevated-lower-object' | 'elevated-object' | 'elevated-higher-object' | 'fluid-visualization' | 'wires-above' | 'entity-info-icon' | 'entity-info-icon-above' | 'explosion' | 'projectile' | 'smoke' | 'air-object' | 'air-entity-info-icon' | 'light-effect' | 'selection-box' | 'higher-selection-box' | 'collision-selection-box' | 'arrow' | 'cursor';
8130
+ type RenderLayer = 'zero' | 'background-transitions' | 'under-tiles' | 'decals' | 'above-tiles' | 'ground-layer-1' | 'ground-layer-2' | 'ground-layer-3' | 'ground-layer-4' | 'ground-layer-5' | 'lower-radius-visualization' | 'radius-visualization' | 'transport-belt-integration' | 'resource' | 'building-smoke' | 'rail-stone-path-lower' | 'rail-stone-path' | 'rail-tie' | 'decorative' | 'ground-patch' | 'ground-patch-higher' | 'ground-patch-higher2' | 'rail-chain-signal-metal' | 'rail-screw' | 'rail-metal' | 'remnants' | 'floor' | 'transport-belt' | 'transport-belt-endings' | 'floor-mechanics-under-corpse' | 'corpse' | 'floor-mechanics' | 'item' | 'transport-belt-reader' | 'lower-object' | 'transport-belt-circuit-connector' | 'lower-object-above-shadow' | 'lower-object-overlay' | 'object-under' | 'object' | 'cargo-hatch' | 'higher-object-under' | 'higher-object-above' | 'train-stop-top' | 'item-in-inserter-hand' | 'above-inserters' | 'wires' | 'under-elevated' | 'elevated-rail-stone-path-lower' | 'elevated-rail-stone-path' | 'elevated-rail-tie' | 'elevated-rail-screw' | 'elevated-rail-metal' | 'elevated-lower-object' | 'elevated-object' | 'elevated-higher-object' | 'fluid-visualization' | 'wires-above' | 'entity-info-icon' | 'entity-info-icon-above' | 'explosion' | 'projectile' | 'smoke' | 'air-object' | 'air-entity-info-icon' | 'light-effect' | 'selection-box' | 'higher-selection-box' | 'collision-selection-box' | 'arrow' | 'cursor';
8130
8131
  /**
8131
8132
  * Defines the amount of an item required to research one unit of a {@link technology | prototype:TechnologyPrototype}. The first member of the tuple is the name of a {@link ToolPrototype | prototype:ToolPrototype} and the second is the amount. Amount must not be 0.
8132
8133
  * @example ```
@@ -12526,6 +12527,10 @@ interface WorkingVisualisation {
12526
12527
  */
12527
12528
  draw_when_state_filter_matches?: bool;
12528
12529
  east_animation?: Animation;
12530
+ /**
12531
+ * If defined, animation in this visualisation layer will be used only as mask for fog effect and will not render in world.
12532
+ */
12533
+ east_fog_mask?: FogMaskShapeDefinition;
12529
12534
  east_position?: Vector;
12530
12535
  east_secondary_draw_order?: int8;
12531
12536
  effect?: 'flicker' | 'uranium-glow' | 'none';
@@ -12533,11 +12538,21 @@ interface WorkingVisualisation {
12533
12538
  enabled_in_animated_shift_during_transition?: bool;
12534
12539
  enabled_in_animated_shift_during_waypoint_stop?: bool;
12535
12540
  fadeout?: bool;
12541
+ /**
12542
+ * Loaded only if at least one of north_fog_mask, east_fog_mask, south_fog_mask, west_fog_mask is not specified.
12543
+ *
12544
+ * If defined, animation in this visualisation layer will be used only as mask for fog effect and will not render in world.
12545
+ */
12546
+ fog_mask?: FogMaskShapeDefinition;
12536
12547
  frame_based_on_shift_animation_progress?: bool;
12537
12548
  light?: LightDefinition;
12538
12549
  mining_drill_scorch_mark?: bool;
12539
12550
  name?: string;
12540
12551
  north_animation?: Animation;
12552
+ /**
12553
+ * If defined, animation in this visualisation layer will be used only as mask for fog effect and will not render in world.
12554
+ */
12555
+ north_fog_mask?: FogMaskShapeDefinition;
12541
12556
  north_position?: Vector;
12542
12557
  north_secondary_draw_order?: int8;
12543
12558
  render_layer?: RenderLayer;
@@ -12558,10 +12573,18 @@ interface WorkingVisualisation {
12558
12573
  */
12559
12574
  secondary_draw_order?: int8;
12560
12575
  south_animation?: Animation;
12576
+ /**
12577
+ * If defined, animation in this visualisation layer will be used only as mask for fog effect and will not render in world.
12578
+ */
12579
+ south_fog_mask?: FogMaskShapeDefinition;
12561
12580
  south_position?: Vector;
12562
12581
  south_secondary_draw_order?: int8;
12563
12582
  synced_fadeout?: bool;
12564
12583
  west_animation?: Animation;
12584
+ /**
12585
+ * If defined, animation in this visualisation layer will be used only as mask for fog effect and will not render in world.
12586
+ */
12587
+ west_fog_mask?: FogMaskShapeDefinition;
12565
12588
  west_position?: Vector;
12566
12589
  west_secondary_draw_order?: int8;
12567
12590
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.9",
3
+ "version": "1.2.11",
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,7 +23,7 @@
23
23
  "src/**/*.d.ts",
24
24
  "dist/**/*.d.ts"
25
25
  ],
26
- "factorioVersion": "2.0.15",
26
+ "factorioVersion": "2.0.17",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },