factorio-types 1.2.10 → 1.2.12
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 +28 -8
- package/dist/concepts.d.ts +2 -2
- 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 +12 -3
- package/dist/types.d.ts +2 -2
- 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.18
|
|
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
|
*/
|
|
@@ -5851,11 +5857,10 @@ interface LuaEntity extends LuaControl {
|
|
|
5851
5857
|
*/
|
|
5852
5858
|
get_passenger(this: void): (LuaEntity | LuaPlayer) | null;
|
|
5853
5859
|
/**
|
|
5854
|
-
* Get the entity ID
|
|
5860
|
+
* Get the entity ID at the specified position in the turret's priority list.
|
|
5855
5861
|
* @param index The index of the entry to fetch.
|
|
5856
|
-
* @returns The name of the entity prototype.
|
|
5857
5862
|
*/
|
|
5858
|
-
get_priority_target(this: void, index: uint):
|
|
5863
|
+
get_priority_target(this: void, index: uint): LuaEntityPrototype | null;
|
|
5859
5864
|
/**
|
|
5860
5865
|
* The radius of this entity.
|
|
5861
5866
|
*/
|
|
@@ -7187,7 +7192,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7187
7192
|
/**
|
|
7188
7193
|
* Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.
|
|
7189
7194
|
*/
|
|
7190
|
-
get_inventory_size(this: void, index: defines.inventory): uint | null;
|
|
7195
|
+
get_inventory_size(this: void, index: defines.inventory, quality?: QualityID): uint | null;
|
|
7191
7196
|
/**
|
|
7192
7197
|
* The maximum circuit wire distance for this entity. 0 if the entity doesn't support circuit wires.
|
|
7193
7198
|
*/
|
|
@@ -8170,6 +8175,10 @@ interface LuaEquipment {
|
|
|
8170
8175
|
* Type of the equipment contained in this ghost.
|
|
8171
8176
|
*/
|
|
8172
8177
|
readonly ghost_type: string;
|
|
8178
|
+
/**
|
|
8179
|
+
* Inventory size bonus.
|
|
8180
|
+
*/
|
|
8181
|
+
readonly inventory_bonus: uint;
|
|
8173
8182
|
/**
|
|
8174
8183
|
* Maximum amount of energy that can be stored in this equipment.
|
|
8175
8184
|
*/
|
|
@@ -8372,6 +8381,10 @@ interface LuaEquipmentGrid {
|
|
|
8372
8381
|
* Whether this grid's equipment movement bonus is active.
|
|
8373
8382
|
*/
|
|
8374
8383
|
inhibit_movement_bonus: boolean;
|
|
8384
|
+
/**
|
|
8385
|
+
* The total amount of inventory bonus this equipment grid gives.
|
|
8386
|
+
*/
|
|
8387
|
+
readonly inventory_bonus: uint;
|
|
8375
8388
|
/**
|
|
8376
8389
|
* The maximum amount of shields this equipment grid has.
|
|
8377
8390
|
*/
|
|
@@ -8380,6 +8393,12 @@ interface LuaEquipmentGrid {
|
|
|
8380
8393
|
* Maximum energy per tick that can be created by any solar panels in the equipment grid. Actual generated energy varies depending on the daylight levels.
|
|
8381
8394
|
*/
|
|
8382
8395
|
readonly max_solar_energy: double;
|
|
8396
|
+
/**
|
|
8397
|
+
* The total amount of movement bonus this equipment grid gives.
|
|
8398
|
+
*
|
|
8399
|
+
* Returns `0` if {@link LuaEquipmentGrid::inhibit_movement_bonus | runtime:LuaEquipmentGrid::inhibit_movement_bonus} is `false`.
|
|
8400
|
+
*/
|
|
8401
|
+
readonly movement_bonus: double;
|
|
8383
8402
|
/**
|
|
8384
8403
|
* 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.
|
|
8385
8404
|
*/
|
|
@@ -8434,6 +8453,7 @@ interface LuaEquipmentGridPrototype extends LuaPrototypeBase {
|
|
|
8434
8453
|
*/
|
|
8435
8454
|
interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
8436
8455
|
get_energy_consumption(this: void, quality?: QualityID): double;
|
|
8456
|
+
get_inventory_bonus(this: void, quality?: QualityID): uint | null;
|
|
8437
8457
|
get_movement_bonus(this: void, quality?: QualityID): float | null;
|
|
8438
8458
|
/**
|
|
8439
8459
|
* The shield value of this equipment. 0 for non-shield equipment.
|
|
@@ -9842,7 +9862,7 @@ interface LuaGameScript {
|
|
|
9842
9862
|
*/
|
|
9843
9863
|
readonly difficulty: defines.difficulty;
|
|
9844
9864
|
/**
|
|
9845
|
-
* 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.
|
|
9865
|
+
* 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.
|
|
9846
9866
|
* @example ```
|
|
9847
9867
|
-- This will set the technology price multiplier to 12.
|
|
9848
9868
|
game.difficulty_settings.technology_price_multiplier = 12
|
|
@@ -15931,7 +15951,7 @@ interface LuaSpacePlatform {
|
|
|
15931
15951
|
/**
|
|
15932
15952
|
* The space location this space platform is stopped at or `nil`.
|
|
15933
15953
|
*/
|
|
15934
|
-
readonly space_location
|
|
15954
|
+
readonly space_location?: LuaSpaceLocationPrototype;
|
|
15935
15955
|
speed: double;
|
|
15936
15956
|
/**
|
|
15937
15957
|
* The starter pack used to create this space platform.
|
|
@@ -16962,7 +16982,7 @@ interface LuaSurface {
|
|
|
16962
16982
|
/**
|
|
16963
16983
|
* Set tiles at specified locations. Can automatically correct the edges around modified tiles.
|
|
16964
16984
|
*
|
|
16965
|
-
* Placing a {@link mineable | runtime:LuaTilePrototype::mineable_properties} tile on top of a non-mineable or {@link foundation | runtime:LuaTilePrototype::is_foundation} one will turn the latter into the {@link LuaTile::hidden_tile | runtime:LuaTile::hidden_tile} for that tile. Placing a mineable
|
|
16985
|
+
* Placing a {@link mineable | runtime:LuaTilePrototype::mineable_properties} tile on top of a non-mineable or {@link foundation | runtime:LuaTilePrototype::is_foundation} one will turn the latter into the {@link LuaTile::hidden_tile | runtime:LuaTile::hidden_tile} for that tile. Placing a mineable non-foundation tile on a mineable non-foundation one or a mineable foundation tile on a mineable foundation one will not modify the hidden tile. This restriction can however be circumvented by using {@link LuaSurface::set_hidden_tile | runtime:LuaSurface::set_hidden_tile}. Placing a non-foundation tile on top of a foundation one when there already exists a hidden tile will push hidden tile to {@link double hidden | runtime:LuaTile::double_hidden_tile}, and foundation tile will turn into hidden. Placing a mineable foundation tile over a mineable non-foundation tile with hidden mineable foundation tile, the hidden tile will be replaced by previously double hidden tile and double hidden tile will be erased. Placing a non-mineable tile will erase hidden and double hidden tiles.
|
|
16966
16986
|
*
|
|
16967
16987
|
* It is recommended to call this method once for all the tiles you want to change rather than calling it individually for every tile. As the tile correction is used after every step, calling it one by one could cause the tile correction logic to redo some of the changes. Also, many small API calls are generally more performance intensive than one big one.
|
|
16968
16988
|
* @param correct_tiles If `false`, the correction logic is not applied to the changed tiles. Defaults to `true`.
|
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.18
|
|
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-
|
|
6239
|
+
'above-inserters' | /**
|
|
6240
6240
|
* 131
|
|
6241
6241
|
*/
|
|
6242
6242
|
'wires' | /**
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
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.18
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -1479,7 +1479,7 @@ interface CharacterPrototype extends EntityWithOwnerPrototype {
|
|
|
1479
1479
|
*/
|
|
1480
1480
|
footstep_particle_triggers?: FootstepTriggerEffectList;
|
|
1481
1481
|
/**
|
|
1482
|
-
* The search radius for a non-colliding position to move the player to if they are grounded mid-flight.
|
|
1482
|
+
* The search radius for a non-colliding position to move the player to if they are grounded mid-flight. Must be >= 0.
|
|
1483
1483
|
*/
|
|
1484
1484
|
grounded_landing_search_radius?: double;
|
|
1485
1485
|
/**
|
|
@@ -1769,6 +1769,7 @@ interface ContainerPrototype extends EntityWithOwnerPrototype {
|
|
|
1769
1769
|
* The picture displayed for this entity.
|
|
1770
1770
|
*/
|
|
1771
1771
|
picture?: Sprite;
|
|
1772
|
+
quality_affects_inventory_size?: bool;
|
|
1772
1773
|
}
|
|
1773
1774
|
/**
|
|
1774
1775
|
* A copy-paste or cut-paste tool.
|
|
@@ -4527,6 +4528,10 @@ interface ItemPrototype extends Prototype {
|
|
|
4527
4528
|
* When "automated" is set, it will force the existence of "launch to orbit automatically" checkBox in the rocket silo which will then force the silo to automatically send the item to orbit when present.
|
|
4528
4529
|
*/
|
|
4529
4530
|
send_to_orbit_mode?: SendToOrbitMode;
|
|
4531
|
+
/**
|
|
4532
|
+
* Used by Inserters with spoil priority. Item with higher spoil level is considered more spoiled than item with lower spoil level regardless of progress of spoiling
|
|
4533
|
+
*/
|
|
4534
|
+
spoil_level?: uint8;
|
|
4530
4535
|
spoil_result?: ItemID;
|
|
4531
4536
|
spoil_ticks?: uint32;
|
|
4532
4537
|
/**
|
|
@@ -6665,7 +6670,7 @@ interface ResearchWithSciencePackAchievementPrototype extends AchievementPrototy
|
|
|
6665
6670
|
interface ResourceCategory extends Prototype {
|
|
6666
6671
|
}
|
|
6667
6672
|
/**
|
|
6668
|
-
* A mineable/gatherable entity.
|
|
6673
|
+
* A mineable/gatherable entity.
|
|
6669
6674
|
* @example ```
|
|
6670
6675
|
{
|
|
6671
6676
|
type = "resource",
|
|
@@ -9709,6 +9714,10 @@ interface UtilityConstants extends PrototypeBase {
|
|
|
9709
9714
|
space_platform_relative_speed_factor: double;
|
|
9710
9715
|
space_platform_starfield_movement_vector: Vector;
|
|
9711
9716
|
spawner_evolution_factor_health_modifier: float;
|
|
9717
|
+
/**
|
|
9718
|
+
* The number of ticks to show a segmented unit's health bar after fully regenerating.
|
|
9719
|
+
*/
|
|
9720
|
+
time_to_show_full_health_bar: MapTick;
|
|
9712
9721
|
/**
|
|
9713
9722
|
* Must be >= 1.
|
|
9714
9723
|
*/
|
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.18
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -8127,7 +8127,7 @@ interface RecipeTints {
|
|
|
8127
8127
|
*
|
|
8128
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.
|
|
8129
8129
|
*/
|
|
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-
|
|
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';
|
|
8131
8131
|
/**
|
|
8132
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.
|
|
8133
8133
|
* @example ```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
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.18",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|