factorio-types 1.2.17 → 1.2.18
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 +41 -19
- package/dist/concepts.d.ts +1 -1
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +9 -1
- package/dist/types.d.ts +9 -1
- package/package.json +2 -2
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.
|
|
5
|
+
// Factorio version 2.0.27
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -22,6 +22,10 @@ interface LuaAISettings {
|
|
|
22
22
|
* If enabled, units will try to separate themselves from nearby friendly units.
|
|
23
23
|
*/
|
|
24
24
|
do_separation: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If enabled, the unit will join attack groups.
|
|
27
|
+
*/
|
|
28
|
+
join_attacks: boolean;
|
|
25
29
|
/**
|
|
26
30
|
* 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.
|
|
27
31
|
*/
|
|
@@ -30,6 +34,12 @@ interface LuaAISettings {
|
|
|
30
34
|
* Defines how coarse the pathfinder's grid is, where smaller values mean a coarser grid. Defaults to `0`, which equals a resolution of `1x1` tiles, centered on tile centers. Values range from `-8` to `8` inclusive, where each integer increment doubles/halves the resolution. So, a resolution of `-8` equals a grid of `256x256` tiles, and a resolution of `8` equals `1/256` of a tile.
|
|
31
35
|
*/
|
|
32
36
|
path_resolution_modifier: int8;
|
|
37
|
+
/**
|
|
38
|
+
* The number of "slots" that the unit takes up in a unit group. Must be greater than 0.
|
|
39
|
+
*
|
|
40
|
+
* If this value is changed after the unit has been added to a group, the exact behavior is undefined.
|
|
41
|
+
*/
|
|
42
|
+
size_in_group: float;
|
|
33
43
|
/**
|
|
34
44
|
* 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.
|
|
35
45
|
*/
|
|
@@ -7903,6 +7913,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7903
7913
|
* The bounding box used for map generator collision checking.
|
|
7904
7914
|
*/
|
|
7905
7915
|
readonly map_generator_bounding_box: BoundingBox;
|
|
7916
|
+
/**
|
|
7917
|
+
* Count of defensive enemies this spawner can sustain.
|
|
7918
|
+
*/
|
|
7919
|
+
readonly max_count_of_owned_defensive_units?: double;
|
|
7906
7920
|
/**
|
|
7907
7921
|
* Count of enemies this spawner can sustain.
|
|
7908
7922
|
*/
|
|
@@ -7911,6 +7925,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7911
7925
|
* The maximum darkness at which this unit spawner can spawn entities.
|
|
7912
7926
|
*/
|
|
7913
7927
|
readonly max_darkness_to_spawn?: float;
|
|
7928
|
+
/**
|
|
7929
|
+
* How many defensive friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
|
|
7930
|
+
*/
|
|
7931
|
+
readonly max_defensive_friends_around_to_spawn?: double;
|
|
7914
7932
|
/**
|
|
7915
7933
|
* How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
|
|
7916
7934
|
*/
|
|
@@ -11808,7 +11826,7 @@ interface LuaItemCommon {
|
|
|
11808
11826
|
/**
|
|
11809
11827
|
* Gets the entity filter at the given index for this deconstruction item.
|
|
11810
11828
|
*/
|
|
11811
|
-
get_entity_filter(this: void, index: uint):
|
|
11829
|
+
get_entity_filter(this: void, index: uint): ItemFilter | null;
|
|
11812
11830
|
/**
|
|
11813
11831
|
* Access the inner inventory of an item.
|
|
11814
11832
|
* @param inventory Index of the inventory to access, which can only be {@link defines.inventory.item_main | runtime:defines.inventory.item_main}.
|
|
@@ -11866,7 +11884,7 @@ interface LuaItemCommon {
|
|
|
11866
11884
|
* @param filter Writing `nil` removes the filter.
|
|
11867
11885
|
* @returns Whether the new filter was successfully set (meaning it was valid).
|
|
11868
11886
|
*/
|
|
11869
|
-
set_entity_filter(this: void, index: uint, filter:
|
|
11887
|
+
set_entity_filter(this: void, index: uint, filter: ItemFilter | nil): boolean;
|
|
11870
11888
|
/**
|
|
11871
11889
|
* Sets the module filter at the given index for this upgrade item.
|
|
11872
11890
|
*
|
|
@@ -11938,9 +11956,9 @@ interface LuaItemCommon {
|
|
|
11938
11956
|
*/
|
|
11939
11957
|
entity_filter_mode: defines.deconstruction_item.entity_filter_mode;
|
|
11940
11958
|
/**
|
|
11941
|
-
* The entity filters for this deconstruction item. The attribute is a sparse array with the keys representing the index of the filter. All
|
|
11959
|
+
* The entity filters for this deconstruction item. The attribute is a sparse array with the keys representing the index of the filter. All prototypes in this array must not have the `"not-deconstructable"` flag set and are either a `cliff` or marked as `minable`.
|
|
11942
11960
|
*/
|
|
11943
|
-
entity_filters:
|
|
11961
|
+
entity_filters: ItemFilter[];
|
|
11944
11962
|
/**
|
|
11945
11963
|
* If this is an item with entity data, get the stored entity label.
|
|
11946
11964
|
*/
|
|
@@ -14807,7 +14825,7 @@ interface LuaRecord {
|
|
|
14807
14825
|
raise_built?: boolean;
|
|
14808
14826
|
}): LuaEntity[];
|
|
14809
14827
|
/**
|
|
14810
|
-
* Cancel deconstruct the given area with this deconstruction planner
|
|
14828
|
+
* Cancel deconstruct the given area with this deconstruction planner.
|
|
14811
14829
|
* @param table.surface Surface to cancel deconstruct on
|
|
14812
14830
|
* @param table.force Force to use for canceling deconstruction
|
|
14813
14831
|
* @param table.area The area to deconstruct
|
|
@@ -14860,7 +14878,7 @@ interface LuaRecord {
|
|
|
14860
14878
|
include_fuel?: boolean;
|
|
14861
14879
|
}): Record<uint, LuaEntity>;
|
|
14862
14880
|
/**
|
|
14863
|
-
* Deconstruct the given area with this deconstruction planner
|
|
14881
|
+
* Deconstruct the given area with this deconstruction planner.
|
|
14864
14882
|
* @param table.surface Surface to deconstruct on
|
|
14865
14883
|
* @param table.force Force to use for the deconstruction
|
|
14866
14884
|
* @param table.area The area to deconstruct
|
|
@@ -14899,9 +14917,9 @@ interface LuaRecord {
|
|
|
14899
14917
|
*/
|
|
14900
14918
|
get_blueprint_tiles(this: void): Tile[] | null;
|
|
14901
14919
|
/**
|
|
14902
|
-
* Gets the entity filter at the given index for this deconstruction planner
|
|
14920
|
+
* Gets the entity filter at the given index for this deconstruction planner.
|
|
14903
14921
|
*/
|
|
14904
|
-
get_entity_filter(this: void, index: uint):
|
|
14922
|
+
get_entity_filter(this: void, index: uint): ItemFilter | null;
|
|
14905
14923
|
/**
|
|
14906
14924
|
* Gets the filter at the given index for this upgrade item.
|
|
14907
14925
|
*
|
|
@@ -14911,7 +14929,7 @@ interface LuaRecord {
|
|
|
14911
14929
|
*/
|
|
14912
14930
|
get_mapper(this: void, index: uint, type: string): UpgradeMapperSource | UpgradeMapperDestination;
|
|
14913
14931
|
/**
|
|
14914
|
-
* Gets the tile filter at the given index for this deconstruction planner
|
|
14932
|
+
* Gets the tile filter at the given index for this deconstruction planner.
|
|
14915
14933
|
*/
|
|
14916
14934
|
get_tile_filter(this: void, index: uint): string | null;
|
|
14917
14935
|
/**
|
|
@@ -14941,11 +14959,11 @@ interface LuaRecord {
|
|
|
14941
14959
|
*/
|
|
14942
14960
|
set_blueprint_tiles(this: void, tiles: Tile[]): void;
|
|
14943
14961
|
/**
|
|
14944
|
-
* Sets the entity filter at the given index for this deconstruction planner
|
|
14962
|
+
* Sets the entity filter at the given index for this deconstruction planner.
|
|
14945
14963
|
* @param filter Writing `nil` removes the filter.
|
|
14946
14964
|
* @returns Whether the new filter was successfully set (ie. was valid).
|
|
14947
14965
|
*/
|
|
14948
|
-
set_entity_filter(this: void, index: uint, filter:
|
|
14966
|
+
set_entity_filter(this: void, index: uint, filter: ItemFilter | nil): boolean;
|
|
14949
14967
|
/**
|
|
14950
14968
|
* Sets the module filter at the given index for this upgrade item.
|
|
14951
14969
|
*
|
|
@@ -14956,7 +14974,7 @@ interface LuaRecord {
|
|
|
14956
14974
|
*/
|
|
14957
14975
|
set_mapper(this: void, index: uint, type: string, mapper: UpgradeMapperSource | UpgradeMapperDestination): void;
|
|
14958
14976
|
/**
|
|
14959
|
-
* Sets the tile filter at the given index for this deconstruction planner
|
|
14977
|
+
* Sets the tile filter at the given index for this deconstruction planner.
|
|
14960
14978
|
* @param filter Setting to nil erases the filter.
|
|
14961
14979
|
* @returns Whether the new filter was successfully set (ie. was valid).
|
|
14962
14980
|
*/
|
|
@@ -14990,13 +15008,13 @@ interface LuaRecord {
|
|
|
14990
15008
|
*/
|
|
14991
15009
|
readonly entity_filter_count: uint;
|
|
14992
15010
|
/**
|
|
14993
|
-
* The blacklist/whitelist entity filter mode for this deconstruction planner
|
|
15011
|
+
* The blacklist/whitelist entity filter mode for this deconstruction planner.
|
|
14994
15012
|
*/
|
|
14995
15013
|
entity_filter_mode: defines.deconstruction_item.entity_filter_mode;
|
|
14996
15014
|
/**
|
|
14997
|
-
* The entity filters for this deconstruction planner. The attribute is a sparse array with the keys representing the index of the filter. All
|
|
15015
|
+
* The entity filters for this deconstruction planner. The attribute is a sparse array with the keys representing the index of the filter. All prototypes in this array must not have the `"not-deconstructable"` flag set and are either a `cliff` or marked as `minable`.
|
|
14998
15016
|
*/
|
|
14999
|
-
entity_filters:
|
|
15017
|
+
entity_filters: ItemFilter[];
|
|
15000
15018
|
/**
|
|
15001
15019
|
* Is this blueprint record a preview? A preview record must be synced by the player before entity and tile data can be read.
|
|
15002
15020
|
*/
|
|
@@ -15014,15 +15032,15 @@ interface LuaRecord {
|
|
|
15014
15032
|
*/
|
|
15015
15033
|
readonly tile_filter_count: uint;
|
|
15016
15034
|
/**
|
|
15017
|
-
* The blacklist/whitelist tile filter mode for this deconstruction planner
|
|
15035
|
+
* The blacklist/whitelist tile filter mode for this deconstruction planner.
|
|
15018
15036
|
*/
|
|
15019
15037
|
tile_filter_mode: defines.deconstruction_item.tile_filter_mode;
|
|
15020
15038
|
/**
|
|
15021
|
-
* The tile filters for this deconstruction planner
|
|
15039
|
+
* The tile filters for this deconstruction planner. The attribute is a sparse array with the keys representing the index of the filter. Reading filters always returns an array of strings which are the tile prototype names.
|
|
15022
15040
|
*/
|
|
15023
15041
|
tile_filters: TileID[];
|
|
15024
15042
|
/**
|
|
15025
|
-
* The tile selection mode for this deconstruction planner
|
|
15043
|
+
* The tile selection mode for this deconstruction planner.
|
|
15026
15044
|
*/
|
|
15027
15045
|
tile_selection_mode: defines.deconstruction_item.tile_selection_mode;
|
|
15028
15046
|
/**
|
|
@@ -17194,6 +17212,10 @@ interface LuaSurface {
|
|
|
17194
17212
|
* Whether this surface currently has a global electric network.
|
|
17195
17213
|
*/
|
|
17196
17214
|
readonly has_global_electric_network: boolean;
|
|
17215
|
+
/**
|
|
17216
|
+
* If surface condition checks should not be performed on this surface.
|
|
17217
|
+
*/
|
|
17218
|
+
ignore_surface_conditions: bool;
|
|
17197
17219
|
/**
|
|
17198
17220
|
* This surface's index in {@link LuaGameScript::surfaces | runtime:LuaGameScript::surfaces} (unique ID). It is assigned when a surface is created, and remains so until it is {@link deleted | runtime:on_surface_deleted}. Indexes of deleted surfaces can be reused.
|
|
17199
17221
|
*/
|
package/dist/concepts.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.
|
|
5
|
+
// Factorio version 2.0.27
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
package/dist/datacollection.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.
|
|
5
|
+
// Factorio version 2.0.27
|
|
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.
|
|
5
|
+
// Factorio version 2.0.27
|
|
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.
|
|
5
|
+
// Factorio version 2.0.27
|
|
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.
|
|
5
|
+
// Factorio version 2.0.27
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/prototypes.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.
|
|
5
|
+
// Factorio version 2.0.27
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -2864,11 +2864,19 @@ interface EnemySpawnerPrototype extends EntityWithOwnerPrototype {
|
|
|
2864
2864
|
* Whether this prototype should be a high priority target for enemy forces. See {@link Military units and structures | https://wiki.factorio.com/Military_units_and_structures}.
|
|
2865
2865
|
*/
|
|
2866
2866
|
is_military_target?: true;
|
|
2867
|
+
/**
|
|
2868
|
+
* Count of defensive enemies this spawner can sustain. Defensive units are units with {@link UnitAISettings::join_attacks | prototype:UnitAISettings::join_attacks} set to false. If set below {@link EnemySpawnerPrototype::max_count_of_owned_units | prototype:EnemySpawnerPrototype::max_count_of_owned_units}, the difference will be the space reserved for non-defensive units.
|
|
2869
|
+
*/
|
|
2870
|
+
max_count_of_owned_defensive_units?: uint32;
|
|
2867
2871
|
/**
|
|
2868
2872
|
* Count of enemies this spawner can sustain.
|
|
2869
2873
|
*/
|
|
2870
2874
|
max_count_of_owned_units: uint32;
|
|
2871
2875
|
max_darkness_to_spawn?: float;
|
|
2876
|
+
/**
|
|
2877
|
+
* How many friendly defensive units are required within the {@link EnemySpawnerPrototype::spawning_radius | prototype:EnemySpawnerPrototype::spawning_radius} of this spawner for it to stop producing more units. Defensive units are units with {@link UnitAISettings::join_attacks | prototype:UnitAISettings::join_attacks} set to false. If set below {@link EnemySpawnerPrototype::max_friends_around_to_spawn | prototype:EnemySpawnerPrototype::max_friends_around_to_spawn}, the difference will be the space reserved for non-defensive units.
|
|
2878
|
+
*/
|
|
2879
|
+
max_defensive_friends_around_to_spawn?: uint32;
|
|
2872
2880
|
/**
|
|
2873
2881
|
* How many friendly units are required within the {@link EnemySpawnerPrototype::spawning_radius | prototype:EnemySpawnerPrototype::spawning_radius} of this spawner for it to stop producing more units.
|
|
2874
2882
|
*/
|
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.
|
|
5
|
+
// Factorio version 2.0.27
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -11849,10 +11849,18 @@ interface UnitAISettings {
|
|
|
11849
11849
|
* If enabled, units will try to separate themselves from nearby friendly units.
|
|
11850
11850
|
*/
|
|
11851
11851
|
do_separation?: bool;
|
|
11852
|
+
/**
|
|
11853
|
+
* If enabled, the unit is permitted to join attack groups.
|
|
11854
|
+
*/
|
|
11855
|
+
join_attacks?: bool;
|
|
11852
11856
|
/**
|
|
11853
11857
|
* Must be between -8 and 8.
|
|
11854
11858
|
*/
|
|
11855
11859
|
path_resolution_modifier?: int8;
|
|
11860
|
+
/**
|
|
11861
|
+
* The amount of slots in a unit group this unit takes up. For example, a unit with `groupingSize` of 2 will count as 2 normal-sized units when filling up a unit group. Must be greater than 0.
|
|
11862
|
+
*/
|
|
11863
|
+
size_in_group?: float;
|
|
11856
11864
|
strafe_settings?: PrototypeStrafeSettings;
|
|
11857
11865
|
}
|
|
11858
11866
|
interface UnitAlternativeFrameSequence {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.18",
|
|
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.
|
|
26
|
+
"factorioVersion": "2.0.27",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|