factorio-types 1.2.72 → 1.2.73
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 +30 -16
- package/dist/concepts.d.ts +5 -3
- 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 +15 -4
- package/dist/types.d.ts +13 -3
- 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.1.
|
|
5
|
+
// Factorio version 2.1.24
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -385,6 +385,11 @@ interface LuaBoilerControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
385
385
|
* Entry point for registering event handlers. It is accessible through the global object named `script`.
|
|
386
386
|
*/
|
|
387
387
|
interface LuaBootstrap {
|
|
388
|
+
/**
|
|
389
|
+
* Finishes the test when the game was started with `--test-scenario` or `--test-save`: the game exits after the current tick, with exit code 0 if the test passed and 1 if it failed. Does nothing otherwise.
|
|
390
|
+
* @param passed Whether the test passed. Defaults to `true`.
|
|
391
|
+
*/
|
|
392
|
+
finish_test(this: void, passed?: boolean): void;
|
|
388
393
|
/**
|
|
389
394
|
* Generate a new, unique event ID that can be used to raise custom events with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event}.
|
|
390
395
|
* @returns The newly generated event ID. This will be a new value that does not correspond to any named entry in defines.events.
|
|
@@ -4811,6 +4816,10 @@ interface LuaBootstrap {
|
|
|
4811
4816
|
* 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.
|
|
4812
4817
|
*/
|
|
4813
4818
|
readonly object_name: string;
|
|
4819
|
+
/**
|
|
4820
|
+
* The string given with `--test-arg` when the game was started with `--test-scenario` or `--test-save`.
|
|
4821
|
+
*/
|
|
4822
|
+
readonly test_arg?: string;
|
|
4814
4823
|
}
|
|
4815
4824
|
/**
|
|
4816
4825
|
* A reference to the burner energy source owned by a specific {@link LuaEntity | runtime:LuaEntity} or {@link LuaEquipment | runtime:LuaEquipment}.
|
|
@@ -15762,7 +15771,7 @@ interface LuaPermissionGroups {
|
|
|
15762
15771
|
readonly valid: boolean;
|
|
15763
15772
|
}
|
|
15764
15773
|
/**
|
|
15765
|
-
* A pin owned by a player.
|
|
15774
|
+
* A map pin owned by a player.
|
|
15766
15775
|
*/
|
|
15767
15776
|
interface LuaPin {
|
|
15768
15777
|
/**
|
|
@@ -15774,28 +15783,28 @@ interface LuaPin {
|
|
|
15774
15783
|
*/
|
|
15775
15784
|
get_pin_center(this: void): MapPosition | null;
|
|
15776
15785
|
/**
|
|
15777
|
-
* The alert positions if this pin
|
|
15786
|
+
* The alert positions, if this pin targets an alert.
|
|
15778
15787
|
*/
|
|
15779
15788
|
alert_positions: MapPosition[];
|
|
15780
15789
|
/**
|
|
15781
|
-
* The type of alert this pin is for
|
|
15790
|
+
* The type of alert this pin is for, if this pin targets an alert.
|
|
15782
15791
|
*/
|
|
15783
15792
|
alert_type?: defines.alert_type;
|
|
15784
15793
|
always_visible: boolean;
|
|
15785
15794
|
/**
|
|
15786
|
-
* The custom chart tag
|
|
15795
|
+
* The custom chart tag, if this pin specifically targets a chart tag.
|
|
15787
15796
|
*
|
|
15788
|
-
* The chart tag must be on the same force as the owning player.
|
|
15797
|
+
* The chart tag must be on the same force as the {@link owning player | runtime:LuaPin::owner}.
|
|
15789
15798
|
*/
|
|
15790
15799
|
chart_tag?: LuaCustomChartTag;
|
|
15791
15800
|
/**
|
|
15792
|
-
* The index of this pin
|
|
15801
|
+
* The index of this pin. The index is unique to this player.
|
|
15793
15802
|
*
|
|
15794
|
-
* Note that this index has no correlation to the position of the pin within {@link LuaPlayer::get_pins | runtime:LuaPlayer::get_pins}
|
|
15803
|
+
* Note that this index has no correlation to the position of the pin within {@link LuaPlayer::get_pins | runtime:LuaPlayer::get_pins}.
|
|
15795
15804
|
*/
|
|
15796
15805
|
readonly index: uint32;
|
|
15797
15806
|
/**
|
|
15798
|
-
* The label for this pin
|
|
15807
|
+
* The label for this pin, if any. This will be an empty string if there is no label set.
|
|
15799
15808
|
*/
|
|
15800
15809
|
label: string;
|
|
15801
15810
|
/**
|
|
@@ -15807,13 +15816,18 @@ interface LuaPin {
|
|
|
15807
15816
|
*/
|
|
15808
15817
|
readonly owner: LuaPlayer;
|
|
15809
15818
|
/**
|
|
15810
|
-
* The player that this pin
|
|
15819
|
+
* The player that this pin targets, if any.
|
|
15820
|
+
*/
|
|
15821
|
+
readonly player?: LuaPlayer;
|
|
15822
|
+
/**
|
|
15823
|
+
* The player that this pin targets, if any.
|
|
15824
|
+
* @customName player
|
|
15811
15825
|
*/
|
|
15812
|
-
|
|
15826
|
+
player_write?: PlayerIdentification;
|
|
15813
15827
|
/**
|
|
15814
|
-
* The position if this pin specifically
|
|
15828
|
+
* The position if this pin specifically targets a surface and position.
|
|
15815
15829
|
*
|
|
15816
|
-
*
|
|
15830
|
+
* When writing, and this pin was not bound to a specific surface and position, the default surface of nauvis is used.
|
|
15817
15831
|
*/
|
|
15818
15832
|
position?: MapPosition;
|
|
15819
15833
|
/**
|
|
@@ -15821,13 +15835,13 @@ interface LuaPin {
|
|
|
15821
15835
|
*/
|
|
15822
15836
|
preview_distance: uint16;
|
|
15823
15837
|
/**
|
|
15824
|
-
* The surface index if this pin specifically
|
|
15838
|
+
* The surface index if this pin specifically targets a surface and position.
|
|
15825
15839
|
*
|
|
15826
|
-
*
|
|
15840
|
+
* When writing, and this pin was not bound to a specific surface and position, the default position of `{0, 0}` is used.
|
|
15827
15841
|
*/
|
|
15828
15842
|
surface_index?: uint32;
|
|
15829
15843
|
/**
|
|
15830
|
-
* The
|
|
15844
|
+
* The entities that this pin targets, if any.
|
|
15831
15845
|
*/
|
|
15832
15846
|
targets: LuaEntity[];
|
|
15833
15847
|
/**
|
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.1.
|
|
5
|
+
// Factorio version 2.1.24
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -4059,6 +4059,8 @@ interface InventoryWithCustomStackSizeSpecification {
|
|
|
4059
4059
|
type ItemCountType = uint32;
|
|
4060
4060
|
/**
|
|
4061
4061
|
* An item filter may be specified in two ways, either as a string which is an item prototype name or as a table.
|
|
4062
|
+
*
|
|
4063
|
+
* If this is specified as a string that is an item prototype name, then quality is set to `"normal"` and the comparator is set to `"="`, so only normal quality items will match the filter.
|
|
4062
4064
|
*/
|
|
4063
4065
|
type ItemFilter = {
|
|
4064
4066
|
/**
|
|
@@ -4066,11 +4068,11 @@ type ItemFilter = {
|
|
|
4066
4068
|
*/
|
|
4067
4069
|
name?: ItemID;
|
|
4068
4070
|
/**
|
|
4069
|
-
* The quality.
|
|
4071
|
+
* The quality. Defaults to empty, so any quality items will match the filter.
|
|
4070
4072
|
*/
|
|
4071
4073
|
quality?: QualityID;
|
|
4072
4074
|
/**
|
|
4073
|
-
* The quality comparison type.
|
|
4075
|
+
* The quality comparison type. Defaults to `"="`.
|
|
4074
4076
|
*/
|
|
4075
4077
|
comparator?: ComparatorString;
|
|
4076
4078
|
} | string;
|
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.1.
|
|
5
|
+
// Factorio version 2.1.24
|
|
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.1.
|
|
5
|
+
// Factorio version 2.1.24
|
|
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.1.
|
|
5
|
+
// Factorio version 2.1.24
|
|
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.1.
|
|
5
|
+
// Factorio version 2.1.24
|
|
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.1.
|
|
5
|
+
// Factorio version 2.1.24
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -1299,7 +1299,7 @@ interface BoilerPrototype extends EntityWithOwnerPrototype {
|
|
|
1299
1299
|
*/
|
|
1300
1300
|
fluid_box: FluidBox;
|
|
1301
1301
|
/**
|
|
1302
|
-
* If specified, an input fluid above this temperature will cause the boiler to stop working.
|
|
1302
|
+
* If specified, an input fluid above this temperature will cause the boiler to stop working. This can be lower than the `target_temperature` for heating the fluid.
|
|
1303
1303
|
*/
|
|
1304
1304
|
maximum_input_temperature?: float;
|
|
1305
1305
|
/**
|
|
@@ -1555,6 +1555,11 @@ interface CargoLandingPadPrototype extends EntityWithOwnerPrototype {
|
|
|
1555
1555
|
robot_door?: RobotDoorSpecification;
|
|
1556
1556
|
trash_inventory_size?: ItemStackIndex;
|
|
1557
1557
|
}
|
|
1558
|
+
/**
|
|
1559
|
+
* Entity used to send cargo between the {@link cargo hatches | prototype:CargoHatchDefinition} of {@link cargo landing pads | prototype:CargoLandingPadPrototype}, {@link space platform hubs | prototype:SpacePlatformHubPrototype}, {@link cargo bays | prototype:CargoBayPrototype} and {@link rocket silos | prototype:RocketSiloPrototype}.
|
|
1560
|
+
*
|
|
1561
|
+
* The pod for sending cargo is determined by {@link CargoHatchDefinition::cargo_unit_entity_to_spawn | prototype:CargoHatchDefinition::cargo_unit_entity_to_spawn}. A cargo pod will only be sent to a destination if {@link receiving_cargo_units | prototype:CargoHatchDefinition::receiving_cargo_units} of the destination hatch contains the cargo pod.
|
|
1562
|
+
*/
|
|
1558
1563
|
interface CargoPodPrototype extends EntityWithOwnerPrototype {
|
|
1559
1564
|
/**
|
|
1560
1565
|
* Has to be of type 'pod-catalogue'.
|
|
@@ -1565,6 +1570,9 @@ interface CargoPodPrototype extends EntityWithOwnerPrototype {
|
|
|
1565
1570
|
*/
|
|
1566
1571
|
default_shadow_graphic?: ProcessionGraphic;
|
|
1567
1572
|
impact_trigger?: Trigger;
|
|
1573
|
+
/**
|
|
1574
|
+
* The amount of item stacks that this cargo pod can transport.
|
|
1575
|
+
*/
|
|
1568
1576
|
inventory_size: ItemStackIndex;
|
|
1569
1577
|
procession_audio_catalogue?: ProcessionAudioCatalogue;
|
|
1570
1578
|
procession_graphic_catalogue?: ProcessionGraphicCatalogue;
|
|
@@ -1575,6 +1583,9 @@ interface CargoPodPrototype extends EntityWithOwnerPrototype {
|
|
|
1575
1583
|
*/
|
|
1576
1584
|
selection_priority?: uint8;
|
|
1577
1585
|
shadow_slave_entity?: EntityID;
|
|
1586
|
+
/**
|
|
1587
|
+
* The entity that is created if this cargo pod lands on the ground instead of in a cargo hatch. The transported items will be transferred into the spawned entity.
|
|
1588
|
+
*/
|
|
1578
1589
|
spawned_container: EntityID;
|
|
1579
1590
|
}
|
|
1580
1591
|
/**
|
|
@@ -4708,7 +4719,7 @@ interface GeneratorPrototype extends EntityWithOwnerPrototype {
|
|
|
4708
4719
|
/**
|
|
4709
4720
|
* Scales the generator's fluid usage to its maximum power output.
|
|
4710
4721
|
*
|
|
4711
|
-
* Setting this to true prevents the generator from overconsuming fluid, for example when higher than`maximum_temperature` fluid is fed to the generator.
|
|
4722
|
+
* Setting this to `true` prevents the generator from overconsuming fluid, for example when higher than `maximum_temperature` fluid is fed to the generator.
|
|
4712
4723
|
*
|
|
4713
4724
|
* If scale_fluid_usage is false, the generator consumes the full `fluid_usage_per_tick` and any of the extra energy in the fluid (in the form of higher temperature) is wasted. The {@link steam engine | https://wiki.factorio.com/Steam_engine} exhibits this behavior when fed steam from {@link heat exchangers | https://wiki.factorio.com/Heat_exchanger}.
|
|
4714
4725
|
*/
|
|
@@ -8840,7 +8851,7 @@ interface SelectionToolPrototype extends ItemWithLabelPrototype {
|
|
|
8840
8851
|
reverse_select?: SelectionModeData;
|
|
8841
8852
|
select: SelectionModeData;
|
|
8842
8853
|
/**
|
|
8843
|
-
* If true, the selection tool will send pre-selection events to mods {@link defines.events.
|
|
8854
|
+
* If true, the selection tool will send pre-selection events to mods {@link defines.events.on_player_start_selected_area | runtime:defines.events.on_player_start_selected_area}, {@link defines.events.on_player_change_selected_area | runtime:defines.events.on_player_change_selected_area}, and {@link defines.events.on_player_cancel_selected_area | runtime:defines.events.on_player_cancel_selected_area}. Off by default because it will incur a performance penalty in multiplayer. It should only be enabled if a mod specifically needs it.
|
|
8844
8855
|
*/
|
|
8845
8856
|
send_pre_selection_events?: boolean;
|
|
8846
8857
|
skip_fog_of_war?: boolean;
|
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.1.
|
|
5
|
+
// Factorio version 2.1.24
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -2431,6 +2431,9 @@ interface CargoBayConnections {
|
|
|
2431
2431
|
}
|
|
2432
2432
|
interface CargoHatchDefinition {
|
|
2433
2433
|
busy_timeout_ticks?: uint32;
|
|
2434
|
+
/**
|
|
2435
|
+
* The {@link cargo pod | prototype:CargoPodPrototype} that this cargo hatch spawns when sending cargo.
|
|
2436
|
+
*/
|
|
2434
2437
|
cargo_unit_entity_to_spawn?: EntityID;
|
|
2435
2438
|
/**
|
|
2436
2439
|
* Cannot use `fade_ticks`.
|
|
@@ -2456,6 +2459,9 @@ interface CargoHatchDefinition {
|
|
|
2456
2459
|
*/
|
|
2457
2460
|
opening_sound?: InterruptibleSound;
|
|
2458
2461
|
pod_shadow_offset?: Vector;
|
|
2462
|
+
/**
|
|
2463
|
+
* The {@link cargo pods | prototype:CargoPodPrototype} that this cargo hatch can receive.
|
|
2464
|
+
*/
|
|
2459
2465
|
receiving_cargo_units?: EntityID[];
|
|
2460
2466
|
/**
|
|
2461
2467
|
* y height relative to hatch position where the pod art gets clipped from sky to regular sorting layer.
|
|
@@ -4961,7 +4967,9 @@ interface FluidEnergySource extends BaseEnergySource {
|
|
|
4961
4967
|
*/
|
|
4962
4968
|
destroy_non_fuel_fluid?: boolean;
|
|
4963
4969
|
/**
|
|
4964
|
-
* `1` means 100% effectivity. Must be greater than `0`.
|
|
4970
|
+
* `1` means 100% effectivity. Must be greater than `0`.
|
|
4971
|
+
*
|
|
4972
|
+
* How much energy the fluid energy source produces compared to how much energy it consumes. For example, an effectivity of 0.5
|
|
4965
4973
|
*/
|
|
4966
4974
|
effectivity?: double;
|
|
4967
4975
|
/**
|
|
@@ -4993,7 +5001,9 @@ interface FluidEnergySource extends BaseEnergySource {
|
|
|
4993
5001
|
minimum_input_temperature?: float;
|
|
4994
5002
|
output_fluid_box?: FluidBox;
|
|
4995
5003
|
/**
|
|
4996
|
-
*
|
|
5004
|
+
* Scales the energy source's fluid usage to its maximum power output.
|
|
5005
|
+
*
|
|
5006
|
+
* If this is `false` the energy source will overconsume fluid. For example when higher than `maximum_temperature` fluid is fed to the energy source, it will consume the full `fluid_usage_per_tick` and any of the extra energy in the fluid (in the form of higher temperature) is wasted. Setting scale_fluid_usage to `true` prevents this behavior.
|
|
4997
5007
|
*/
|
|
4998
5008
|
scale_fluid_usage?: boolean;
|
|
4999
5009
|
smoke?: SmokeSource[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.73",
|
|
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.1.
|
|
26
|
+
"factorioVersion": "2.1.24",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|