Skip to content

Commit a84c531

Browse files
committed
Factorio API version 2.0.16
1 parent c1be249 commit a84c531

File tree

9 files changed

+91
-16
lines changed

9 files changed

+91
-16
lines changed

dist/classes.d.ts

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.15
5+
// Factorio version 2.0.16
66
// API version 6
77

88
declare namespace runtime {
@@ -5809,6 +5809,10 @@ interface LuaEntity extends LuaControl {
58095809
* @param index If provided, only returns the `LuaLogisticPoint` specified by this index.
58105810
*/
58115811
get_logistic_point(this: void, index?: defines.logistic_member_index): (LuaLogisticPoint | Record<defines.logistic_member_index, LuaLogisticPoint>) | null;
5812+
/**
5813+
* Gives logistic sections of this entity if it uses logistic sections.
5814+
*/
5815+
get_logistic_sections(this: void): LuaLogisticSections | null;
58125816
/**
58135817
* Get all offers in a market as an array.
58145818
*/
@@ -9529,10 +9533,6 @@ interface LuaGameScript {
95299533
* 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.
95309534
*/
95319535
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;
95369536
/**
95379537
* 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.
95389538
*/
@@ -9752,6 +9752,8 @@ interface LuaGameScript {
97529752
* @param table.show_entity_info Whether to include entity info ("Alt mode") or not. Defaults to `false`.
97539753
* @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`.
97549754
* @param table.anti_alias Whether to render in double resolution and downscale the result (including GUI). Defaults to `false`.
9755+
* @param table.hide_clouds If `true` cloud shadows on ground won't be rendered. Defaults to `false`.
9756+
* @param table.hide_fog If `true` fog effect and foreground space dust effect won't be rendered. Defaults to `false`.
97559757
* @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`.
97569758
* @param table.allow_in_replay Whether to save the screenshot even during replay playback. Defaults to `false`.
97579759
* @param table.daytime Overrides the current surface daytime for the duration of screenshot rendering.
@@ -9770,6 +9772,8 @@ interface LuaGameScript {
97709772
show_entity_info?: boolean;
97719773
show_cursor_building_preview?: boolean;
97729774
anti_alias?: boolean;
9775+
hide_clouds?: boolean;
9776+
hide_fog?: boolean;
97739777
quality?: int;
97749778
allow_in_replay?: boolean;
97759779
daytime?: double;
@@ -9801,6 +9805,12 @@ interface LuaGameScript {
98019805
* @param player The player to unmute.
98029806
*/
98039807
unmute_player(this: void, player: PlayerIdentification): void;
9808+
/**
9809+
* If the tips are allowed to be activated in this scenario, it is false by default.
9810+
*
9811+
* Can't be modified in a simulation (menu screen, tips and tricks simulation, factoriopedia simulation etc.)
9812+
*/
9813+
allow_tip_activation: boolean;
98049814
/**
98059815
* True by default. Can be used to disable autosaving. Make sure to turn it back on soon after.
98069816
*/
@@ -11615,7 +11625,7 @@ interface LuaItemCommon {
1161511625
* @param table.surface Surface to create from
1161611626
* @param table.force Force to use for the creation
1161711627
* @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.
11628+
* @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.
1161911629
* @param table.include_entities When true, entities are included in the blueprint. Defaults to true.
1162011630
* @param table.include_modules When true, modules are included in the blueprint. Defaults to true.
1162111631
* @param table.include_station_names When true, station names are included in the blueprint. Defaults to false.
@@ -12032,6 +12042,10 @@ interface LuaItemPrototype extends LuaPrototypeBase {
1203212042
* The prototype of this armor's equipment grid, if any.
1203312043
*/
1203412044
readonly equipment_grid?: LuaEquipmentGridPrototype;
12045+
/**
12046+
* The durability message key used when displaying the durability of this tool in Factoriopedia.
12047+
*/
12048+
readonly factoriopedia_durability_description_key?: string;
1203512049
/**
1203612050
* The filter mode used by this item with inventory.
1203712051
*/
@@ -12821,6 +12835,44 @@ interface LuaLogisticSection {
1282112835
*/
1282212836
readonly valid: boolean;
1282312837
}
12838+
/**
12839+
* Logistic sections of an entity.
12840+
*/
12841+
interface LuaLogisticSections {
12842+
/**
12843+
* Adds a new logistic section if possible.
12844+
* @param group The group to assign this section to.
12845+
* @returns Logistic section if added.
12846+
*/
12847+
add_section(this: void, group?: string): LuaLogisticSection | null;
12848+
/**
12849+
* Gets section on the selected index, if it exists.
12850+
* @param section_index Index of the section.
12851+
*/
12852+
get_section(this: void, section_index: uint): LuaLogisticSection | null;
12853+
/**
12854+
* 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}.
12855+
* @param section_index Index of the section.
12856+
* @returns Whether section was removed.
12857+
*/
12858+
remove_section(this: void, section_index: uint): boolean;
12859+
/**
12860+
* 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.
12861+
*/
12862+
readonly object_name: string;
12863+
/**
12864+
* All logistic sections of this entity.
12865+
*/
12866+
readonly sections: LuaLogisticSection[];
12867+
/**
12868+
* Amount of logistic sections this entity has.
12869+
*/
12870+
readonly sections_count: uint;
12871+
/**
12872+
* 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.
12873+
*/
12874+
readonly valid: boolean;
12875+
}
1282412876
/**
1282512877
* Control behavior for mining drills.
1282612878
*/
@@ -14666,7 +14718,7 @@ interface LuaRecord {
1466614718
* @param table.surface Surface to create from
1466714719
* @param table.force Force to use for the creation
1466814720
* @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.
14721+
* @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.
1467014722
* @param table.include_entities When true, entities are included in the blueprint. Defaults to true.
1467114723
* @param table.include_modules When true, modules are included in the blueprint. Defaults to true.
1467214724
* @param table.include_station_names When true, station names are included in the blueprint. Defaults to false.

dist/concepts.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.15
5+
// Factorio version 2.0.16
66
// API version 6
77

88
declare namespace runtime {

dist/datacollection.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.15
5+
// Factorio version 2.0.16
66
// API version 6
77

88
declare namespace prototype {

dist/defines.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.15
5+
// Factorio version 2.0.16
66
// API version 6
77

88
declare namespace defines {

dist/events.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.15
5+
// Factorio version 2.0.16
66
// API version 6
77

88
declare namespace runtime {

dist/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.15
5+
// Factorio version 2.0.16
66
// API version 6
77

88
/**

dist/prototypes.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.15
5+
// Factorio version 2.0.16
66
// API version 6
77

88
declare namespace prototype {

dist/types.d.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.15
5+
// Factorio version 2.0.16
66
// API version 6
77

88
declare namespace prototype {
@@ -2424,6 +2424,7 @@ interface ChartUtilityConstants {
24242424
artillery_range_color: Color;
24252425
blue_signal_color: Color;
24262426
chart_construction_robot_color: Color;
2427+
chart_deconstruct_active_color: Color;
24272428
chart_deconstruct_tint: Color;
24282429
chart_delivery_to_me_logistic_robot_color: Color;
24292430
chart_logistic_robot_color: Color;
@@ -12526,18 +12527,32 @@ interface WorkingVisualisation {
1252612527
*/
1252712528
draw_when_state_filter_matches?: bool;
1252812529
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;
1252912534
east_position?: Vector;
1253012535
east_secondary_draw_order?: int8;
1253112536
effect?: 'flicker' | 'uranium-glow' | 'none';
1253212537
enabled_by_name?: bool;
1253312538
enabled_in_animated_shift_during_transition?: bool;
1253412539
enabled_in_animated_shift_during_waypoint_stop?: bool;
1253512540
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;
1253612547
frame_based_on_shift_animation_progress?: bool;
1253712548
light?: LightDefinition;
1253812549
mining_drill_scorch_mark?: bool;
1253912550
name?: string;
1254012551
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;
1254112556
north_position?: Vector;
1254212557
north_secondary_draw_order?: int8;
1254312558
render_layer?: RenderLayer;
@@ -12558,10 +12573,18 @@ interface WorkingVisualisation {
1255812573
*/
1255912574
secondary_draw_order?: int8;
1256012575
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;
1256112580
south_position?: Vector;
1256212581
south_secondary_draw_order?: int8;
1256312582
synced_fadeout?: bool;
1256412583
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;
1256512588
west_position?: Vector;
1256612589
west_secondary_draw_order?: int8;
1256712590
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "factorio-types",
3-
"version": "1.2.9",
3+
"version": "1.2.10",
44
"description": "Typescript declarations for the Factorio mod API",
55
"main": "index.d.ts",
66
"repository": "https://github.com/sguest/factorio-types.git",
@@ -23,7 +23,7 @@
2323
"src/**/*.d.ts",
2424
"dist/**/*.d.ts"
2525
],
26-
"factorioVersion": "2.0.15",
26+
"factorioVersion": "2.0.16",
2727
"dependencies": {
2828
"lua-types": "^2.13.1"
2929
},

0 commit comments

Comments
 (0)