factorio-types 1.2.70 → 1.2.71
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 +97 -15
- package/dist/concepts.d.ts +15 -17
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +342 -332
- package/dist/events.d.ts +218 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +67 -6
- package/dist/types.d.ts +86 -25
- 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.22
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -1882,6 +1882,24 @@ interface LuaBootstrap {
|
|
|
1882
1882
|
script.on_event(defines.events.on_built_entity,
|
|
1883
1883
|
function(event) game.print("Gotta go fast!") end,
|
|
1884
1884
|
{{filter = "name", name = "fast-inserter"}})
|
|
1885
|
+
```
|
|
1886
|
+
*/
|
|
1887
|
+
on_event(this: void, event: defines.events.on_player_cancel_selected_area, handler: ((this: void, arg0: runtime.on_player_cancel_selected_area) => any) | nil, filters?: EventFilter): void;
|
|
1888
|
+
/**
|
|
1889
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1890
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
1891
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
1892
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
1893
|
+
* @example ```
|
|
1894
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
1895
|
+
script.on_event(defines.events.on_tick,
|
|
1896
|
+
function(event) game.print(event.tick) end)
|
|
1897
|
+
```
|
|
1898
|
+
* @example ```
|
|
1899
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
1900
|
+
script.on_event(defines.events.on_built_entity,
|
|
1901
|
+
function(event) game.print("Gotta go fast!") end,
|
|
1902
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
1885
1903
|
```
|
|
1886
1904
|
*/
|
|
1887
1905
|
on_event(this: void, event: defines.events.on_player_cancelled_crafting, handler: ((this: void, arg0: runtime.on_player_cancelled_crafting) => any) | nil, filters?: EventFilter): void;
|
|
@@ -1900,6 +1918,24 @@ interface LuaBootstrap {
|
|
|
1900
1918
|
script.on_event(defines.events.on_built_entity,
|
|
1901
1919
|
function(event) game.print("Gotta go fast!") end,
|
|
1902
1920
|
{{filter = "name", name = "fast-inserter"}})
|
|
1921
|
+
```
|
|
1922
|
+
*/
|
|
1923
|
+
on_event(this: void, event: defines.events.on_player_change_selected_area, handler: ((this: void, arg0: runtime.on_player_change_selected_area) => any) | nil, filters?: EventFilter): void;
|
|
1924
|
+
/**
|
|
1925
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
1926
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
1927
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
1928
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
1929
|
+
* @example ```
|
|
1930
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
1931
|
+
script.on_event(defines.events.on_tick,
|
|
1932
|
+
function(event) game.print(event.tick) end)
|
|
1933
|
+
```
|
|
1934
|
+
* @example ```
|
|
1935
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
1936
|
+
script.on_event(defines.events.on_built_entity,
|
|
1937
|
+
function(event) game.print("Gotta go fast!") end,
|
|
1938
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
1903
1939
|
```
|
|
1904
1940
|
*/
|
|
1905
1941
|
on_event(this: void, event: defines.events.on_player_changed_force, handler: ((this: void, arg0: runtime.on_player_changed_force) => any) | nil, filters?: EventFilter): void;
|
|
@@ -2764,6 +2800,24 @@ interface LuaBootstrap {
|
|
|
2764
2800
|
script.on_event(defines.events.on_built_entity,
|
|
2765
2801
|
function(event) game.print("Gotta go fast!") end,
|
|
2766
2802
|
{{filter = "name", name = "fast-inserter"}})
|
|
2803
|
+
```
|
|
2804
|
+
*/
|
|
2805
|
+
on_event(this: void, event: defines.events.on_player_start_selected_area, handler: ((this: void, arg0: runtime.on_player_start_selected_area) => any) | nil, filters?: EventFilter): void;
|
|
2806
|
+
/**
|
|
2807
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2808
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
2809
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
2810
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
2811
|
+
* @example ```
|
|
2812
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
2813
|
+
script.on_event(defines.events.on_tick,
|
|
2814
|
+
function(event) game.print(event.tick) end)
|
|
2815
|
+
```
|
|
2816
|
+
* @example ```
|
|
2817
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
2818
|
+
script.on_event(defines.events.on_built_entity,
|
|
2819
|
+
function(event) game.print("Gotta go fast!") end,
|
|
2820
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
2767
2821
|
```
|
|
2768
2822
|
*/
|
|
2769
2823
|
on_event(this: void, event: defines.events.on_player_super_forced_selected_area, handler: ((this: void, arg0: runtime.on_player_super_forced_selected_area) => any) | nil, filters?: EventFilter): void;
|
|
@@ -6847,7 +6901,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6847
6901
|
/**
|
|
6848
6902
|
* Get a fluidbox filter, such as the filter of a pump.
|
|
6849
6903
|
*/
|
|
6850
|
-
get_fluid_filter(this: void, index: FluidStorageIndex):
|
|
6904
|
+
get_fluid_filter(this: void, index: FluidStorageIndex): LuaFluidPrototype | null;
|
|
6851
6905
|
/**
|
|
6852
6906
|
* Gets the maximum capacity of the given fluid storage's segment.
|
|
6853
6907
|
*/
|
|
@@ -6859,7 +6913,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6859
6913
|
/**
|
|
6860
6914
|
* Gets the filter of the given fluid storage's segment. The filter is based on the filters set on the fluidboxes of the segment, so it can't be set directly on the segment.
|
|
6861
6915
|
*/
|
|
6862
|
-
get_fluid_segment_filter(this: void, index: FluidStorageIndex):
|
|
6916
|
+
get_fluid_segment_filter(this: void, index: FluidStorageIndex): LuaFluidPrototype | null;
|
|
6863
6917
|
/**
|
|
6864
6918
|
* The fluid within the given storage's fluid segment.
|
|
6865
6919
|
*/
|
|
@@ -7365,7 +7419,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7365
7419
|
* Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
|
|
7366
7420
|
* @returns Whether the filter was set.
|
|
7367
7421
|
*/
|
|
7368
|
-
set_fluid_filter(this: void, index: FluidStorageIndex, filter?:
|
|
7422
|
+
set_fluid_filter(this: void, index: FluidStorageIndex, filter?: FluidID): boolean;
|
|
7369
7423
|
/**
|
|
7370
7424
|
* Sets the fluid within the given storage's fluid segment.
|
|
7371
7425
|
* @returns The amount of fluid set.
|
|
@@ -9693,7 +9747,19 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9693
9747
|
readonly max_underground_distance?: uint8;
|
|
9694
9748
|
readonly maximum_corner_sliding_distance?: double;
|
|
9695
9749
|
readonly maximum_damage_multiplier?: float;
|
|
9750
|
+
/**
|
|
9751
|
+
* The maximum fuel temperature that this thruster accepts, if specified. Fuel above this temperature will cause the thruster to stop working.
|
|
9752
|
+
*/
|
|
9753
|
+
readonly maximum_fuel_temperature?: float;
|
|
9754
|
+
/**
|
|
9755
|
+
* The maximum input temperature that this prototype accepts, if specified. An input fluid above this temperature will cause the machine to stop working.
|
|
9756
|
+
*/
|
|
9757
|
+
readonly maximum_input_temperature?: float;
|
|
9696
9758
|
readonly maximum_lifetime?: uint32;
|
|
9759
|
+
/**
|
|
9760
|
+
* The maximum oxidizer temperature that this thruster accepts, if specified. Oxidizer above this temperature will cause the thruster to stop working.
|
|
9761
|
+
*/
|
|
9762
|
+
readonly maximum_oxidizer_temperature?: float;
|
|
9697
9763
|
readonly maximum_spread_count?: uint16;
|
|
9698
9764
|
/**
|
|
9699
9765
|
* The maximum fluid temperature of this generator prototype.
|
|
@@ -9718,6 +9784,18 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9718
9784
|
*/
|
|
9719
9785
|
readonly mineable_properties: MineableProperties;
|
|
9720
9786
|
readonly minimal_arm_swing_segment_retraction?: uint32;
|
|
9787
|
+
/**
|
|
9788
|
+
* The minimum fuel temperature that this thruster accepts, if specified. Fuel below this temperature will cause the thruster to stop working.
|
|
9789
|
+
*/
|
|
9790
|
+
readonly minimum_fuel_temperature?: float;
|
|
9791
|
+
/**
|
|
9792
|
+
* The minimum input temperature that this prototype accepts, if specified. An input fluid below this temperature will cause the machine to stop working.
|
|
9793
|
+
*/
|
|
9794
|
+
readonly minimum_input_temperature?: float;
|
|
9795
|
+
/**
|
|
9796
|
+
* The minimum oxidizer temperature that this thruster accepts, if specified. Oxidizer below this temperature will cause the thruster to stop working.
|
|
9797
|
+
*/
|
|
9798
|
+
readonly minimum_oxidizer_temperature?: float;
|
|
9721
9799
|
/**
|
|
9722
9800
|
* Minimum amount of this resource.
|
|
9723
9801
|
*/
|
|
@@ -10046,7 +10124,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
10046
10124
|
readonly target_initial_position_only?: boolean;
|
|
10047
10125
|
readonly target_position_deviation?: double;
|
|
10048
10126
|
/**
|
|
10049
|
-
* The target temperature of this boiler or fusion reactor prototype. If `nil` on a fusion reactor, the target temperature is the default temperature of the output fluid.
|
|
10127
|
+
* The target temperature of this boiler or fusion reactor prototype. If `nil` on a fusion reactor, the target temperature is the default temperature of the output fluid. If specified on a boiler, an input fluid above this temperature will cause the boiler to stop working.
|
|
10050
10128
|
*/
|
|
10051
10129
|
readonly target_temperature?: float;
|
|
10052
10130
|
/**
|
|
@@ -10772,14 +10850,6 @@ interface LuaFluidBoxPrototype {
|
|
|
10772
10850
|
* The index of this fluidbox prototype in the owning entity.
|
|
10773
10851
|
*/
|
|
10774
10852
|
readonly index: uint32;
|
|
10775
|
-
/**
|
|
10776
|
-
* The maximum temperature, if any is set.
|
|
10777
|
-
*/
|
|
10778
|
-
readonly maximum_temperature?: double;
|
|
10779
|
-
/**
|
|
10780
|
-
* The minimum temperature, if any is set.
|
|
10781
|
-
*/
|
|
10782
|
-
readonly minimum_temperature?: double;
|
|
10783
10853
|
/**
|
|
10784
10854
|
* 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.
|
|
10785
10855
|
*/
|
|
@@ -10822,7 +10892,15 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
10822
10892
|
readonly fluid_box: LuaFluidBoxPrototype;
|
|
10823
10893
|
readonly fluid_usage_per_tick: double;
|
|
10824
10894
|
readonly hide_from_stats: boolean;
|
|
10825
|
-
|
|
10895
|
+
/**
|
|
10896
|
+
* The maximum input temperature that this energy source accepts, if specified. An input fluid above this temperature will cause the energy source to stop working.
|
|
10897
|
+
*/
|
|
10898
|
+
readonly maximum_input_temperature?: float;
|
|
10899
|
+
readonly maximum_temperature?: float;
|
|
10900
|
+
/**
|
|
10901
|
+
* The minimum input temperature that this energy source accepts, if specified. An input fluid below this temperature will cause the energy source to stop working.
|
|
10902
|
+
*/
|
|
10903
|
+
readonly minimum_input_temperature?: float;
|
|
10826
10904
|
/**
|
|
10827
10905
|
* 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.
|
|
10828
10906
|
*/
|
|
@@ -13614,7 +13692,7 @@ interface LuaInserterControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
13614
13692
|
*/
|
|
13615
13693
|
circuit_set_filters: boolean;
|
|
13616
13694
|
/**
|
|
13617
|
-
* If the stack size of the inserter is set through the circuit network or not.
|
|
13695
|
+
* If the hand stack size of the inserter is set through the circuit network or not.
|
|
13618
13696
|
*/
|
|
13619
13697
|
circuit_set_stack_size: boolean;
|
|
13620
13698
|
/**
|
|
@@ -15932,6 +16010,8 @@ interface LuaPlayer extends LuaControl {
|
|
|
15932
16010
|
clear_recipe_notifications(this: void): void;
|
|
15933
16011
|
/**
|
|
15934
16012
|
* Clears the player's selection tool selection position.
|
|
16013
|
+
*
|
|
16014
|
+
* This method affects a player's input state and does not directly affect game state. The effects of calling this method will not be immediately observable, especially in multiplayer.
|
|
15935
16015
|
*/
|
|
15936
16016
|
clear_selection(this: void): void;
|
|
15937
16017
|
/**
|
|
@@ -16272,6 +16352,8 @@ interface LuaPlayer extends LuaControl {
|
|
|
16272
16352
|
}): ItemWithQualityCount[] | null;
|
|
16273
16353
|
/**
|
|
16274
16354
|
* Starts selection with selection tool from the specified position. Does nothing if the player's cursor is not a selection tool.
|
|
16355
|
+
*
|
|
16356
|
+
* This method affects a player's input state and does not directly affect game state. The effects of calling this method will not be immediately observable, especially in multiplayer.
|
|
16275
16357
|
* @param position The position to start selection from.
|
|
16276
16358
|
* @param selection_mode The type of selection to start.
|
|
16277
16359
|
*/
|
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.22
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -1437,6 +1437,18 @@ type BoundingBox = {
|
|
|
1437
1437
|
MapPosition,
|
|
1438
1438
|
MapPosition
|
|
1439
1439
|
];
|
|
1440
|
+
interface BuildPreviewTintSet {
|
|
1441
|
+
buildable: Color;
|
|
1442
|
+
buildable_too_far: Color;
|
|
1443
|
+
ignorable: Color;
|
|
1444
|
+
not_buildable: Color;
|
|
1445
|
+
}
|
|
1446
|
+
interface BuildPreviewTints {
|
|
1447
|
+
entity: BuildPreviewTintSet;
|
|
1448
|
+
tile: BuildPreviewTintSet;
|
|
1449
|
+
entity_chart: BuildPreviewTintSet;
|
|
1450
|
+
tile_chart: BuildPreviewTintSet;
|
|
1451
|
+
}
|
|
1440
1452
|
interface BaseCapsuleAction {
|
|
1441
1453
|
type: 'throw' | 'equipment-remote' | 'use-on-self' | 'artillery-remote' | 'destroy-cliffs';
|
|
1442
1454
|
}
|
|
@@ -3240,17 +3252,6 @@ interface FluidBoxNeighbourRecord {
|
|
|
3240
3252
|
entity: LuaEntity;
|
|
3241
3253
|
index: FluidStorageIndex;
|
|
3242
3254
|
}
|
|
3243
|
-
interface FluidFilter {
|
|
3244
|
-
fluid?: FluidID;
|
|
3245
|
-
/**
|
|
3246
|
-
* The minimum fluid temperature required.
|
|
3247
|
-
*/
|
|
3248
|
-
minimum_temperature?: float;
|
|
3249
|
-
/**
|
|
3250
|
-
* The maximum fluid temperature allowed.
|
|
3251
|
-
*/
|
|
3252
|
-
maximum_temperature?: float;
|
|
3253
|
-
}
|
|
3254
3255
|
type FluidFlowDirection = 'input-output' | 'input' | 'output';
|
|
3255
3256
|
/**
|
|
3256
3257
|
* A fluid may be specified in one of three ways.
|
|
@@ -4019,7 +4020,7 @@ interface InserterBlueprintControlBehavior {
|
|
|
4019
4020
|
*/
|
|
4020
4021
|
circuit_hand_read_mode?: defines.control_behavior.inserter.hand_read_mode;
|
|
4021
4022
|
/**
|
|
4022
|
-
* Defaults to `false`.
|
|
4023
|
+
* Defaults to `false`. Whether the inserter hand size is controlled by the circuit network.
|
|
4023
4024
|
*/
|
|
4024
4025
|
circuit_set_stack_size?: boolean;
|
|
4025
4026
|
stack_control_input_signal?: SignalID;
|
|
@@ -12112,10 +12113,7 @@ interface UtilityConstants {
|
|
|
12112
12113
|
bonus_gui_ordering: BonusUtilityConstants;
|
|
12113
12114
|
map_editor: EditorUtilityConstants;
|
|
12114
12115
|
entity_button_background_color: Color;
|
|
12115
|
-
|
|
12116
|
-
building_buildable_tint: Color;
|
|
12117
|
-
building_not_buildable_tint: Color;
|
|
12118
|
-
building_ignorable_tint: Color;
|
|
12116
|
+
build_preview_tints: BuildPreviewTints;
|
|
12119
12117
|
building_no_tint: Color;
|
|
12120
12118
|
/**
|
|
12121
12119
|
* Tall entities will be tinted with this value when "Hide tall entities" mode is active.
|
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.22
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|