factorio-types 1.2.69 → 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 +157 -35
- package/dist/concepts.d.ts +72 -22
- 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 +140 -18
- package/dist/types.d.ts +90 -29
- 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;
|
|
@@ -4770,12 +4824,16 @@ interface LuaBurner {
|
|
|
4770
4824
|
* The currently burning item. Writing `nil` will void the currently burning item without producing a {@link LuaBurner::burnt_result | runtime:LuaBurner::burnt_result}.
|
|
4771
4825
|
*
|
|
4772
4826
|
* Writing to this automatically handles correcting {@link LuaBurner::remaining_burning_fuel | runtime:LuaBurner::remaining_burning_fuel}.
|
|
4827
|
+
*
|
|
4828
|
+
* When writing, any item with a {@link fuel value | runtime:LuaItemPrototype::fuel_value} is considered valid fuel; the fuel category does not have to match.
|
|
4773
4829
|
*/
|
|
4774
4830
|
readonly currently_burning?: ItemIDAndQualityIDPair;
|
|
4775
4831
|
/**
|
|
4776
4832
|
* The currently burning item. Writing `nil` will void the currently burning item without producing a {@link LuaBurner::burnt_result | runtime:LuaBurner::burnt_result}.
|
|
4777
4833
|
*
|
|
4778
4834
|
* Writing to this automatically handles correcting {@link LuaBurner::remaining_burning_fuel | runtime:LuaBurner::remaining_burning_fuel}.
|
|
4835
|
+
*
|
|
4836
|
+
* When writing, any item with a {@link fuel value | runtime:LuaItemPrototype::fuel_value} is considered valid fuel; the fuel category does not have to match.
|
|
4779
4837
|
* @customName currently_burning
|
|
4780
4838
|
*/
|
|
4781
4839
|
currently_burning_write?: ItemWithQualityID;
|
|
@@ -4904,11 +4962,13 @@ interface LuaCargoHatch {
|
|
|
4904
4962
|
* Control behavior for cargo landing pad.
|
|
4905
4963
|
*/
|
|
4906
4964
|
interface LuaCargoLandingPadControlBehavior extends LuaControlBehavior {
|
|
4965
|
+
empty_slots_signal?: SignalID;
|
|
4907
4966
|
/**
|
|
4908
4967
|
* 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.
|
|
4909
4968
|
*/
|
|
4910
4969
|
readonly object_name: string;
|
|
4911
4970
|
read_contents: boolean;
|
|
4971
|
+
read_empty_slots: boolean;
|
|
4912
4972
|
set_requests: boolean;
|
|
4913
4973
|
/**
|
|
4914
4974
|
* 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.
|
|
@@ -5211,6 +5271,7 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
5211
5271
|
* Control behavior for container entities.
|
|
5212
5272
|
*/
|
|
5213
5273
|
interface LuaContainerControlBehavior extends LuaControlBehavior {
|
|
5274
|
+
empty_slots_signal?: SignalID;
|
|
5214
5275
|
/**
|
|
5215
5276
|
* 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.
|
|
5216
5277
|
*/
|
|
@@ -5219,6 +5280,7 @@ interface LuaContainerControlBehavior extends LuaControlBehavior {
|
|
|
5219
5280
|
* `true` if this container is sending its content to a circuit network.
|
|
5220
5281
|
*/
|
|
5221
5282
|
read_contents: boolean;
|
|
5283
|
+
read_empty_slots: boolean;
|
|
5222
5284
|
/**
|
|
5223
5285
|
* 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.
|
|
5224
5286
|
*/
|
|
@@ -6839,7 +6901,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6839
6901
|
/**
|
|
6840
6902
|
* Get a fluidbox filter, such as the filter of a pump.
|
|
6841
6903
|
*/
|
|
6842
|
-
get_fluid_filter(this: void, index: FluidStorageIndex):
|
|
6904
|
+
get_fluid_filter(this: void, index: FluidStorageIndex): LuaFluidPrototype | null;
|
|
6843
6905
|
/**
|
|
6844
6906
|
* Gets the maximum capacity of the given fluid storage's segment.
|
|
6845
6907
|
*/
|
|
@@ -6851,7 +6913,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6851
6913
|
/**
|
|
6852
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.
|
|
6853
6915
|
*/
|
|
6854
|
-
get_fluid_segment_filter(this: void, index: FluidStorageIndex):
|
|
6916
|
+
get_fluid_segment_filter(this: void, index: FluidStorageIndex): LuaFluidPrototype | null;
|
|
6855
6917
|
/**
|
|
6856
6918
|
* The fluid within the given storage's fluid segment.
|
|
6857
6919
|
*/
|
|
@@ -7060,6 +7122,15 @@ interface LuaEntity extends LuaControl {
|
|
|
7060
7122
|
* @returns Current values of all signals.
|
|
7061
7123
|
*/
|
|
7062
7124
|
get_signals(this: void, wire_connector_id: defines.wire_connector_id, extra_wire_connector_id?: defines.wire_connector_id): Signal[] | null;
|
|
7125
|
+
/**
|
|
7126
|
+
* Checks if signals on a circuit connector changed recently.
|
|
7127
|
+
*
|
|
7128
|
+
* Returns `true` if signals changed since last tick. If a tick of last check is provided, returns `true` if signals changed since the specified tick. May also return `true` spuriously in other situations when values seen on this connector may be different, caused by addition of wires, removal of wires, circuit network merges, circuit network splits, input network selection changes, etc.
|
|
7129
|
+
*
|
|
7130
|
+
* `nil` if entity has no circuit connector with provided identifier.
|
|
7131
|
+
* @param tick_of_last_check Value of {@link LuaGameScript::tick | runtime:LuaGameScript::tick} of the previous check.
|
|
7132
|
+
*/
|
|
7133
|
+
get_signals_changed(this: void, wire_connector_id: defines.wire_connector_id, tick_of_last_check?: MapTick): boolean | null;
|
|
7063
7134
|
/**
|
|
7064
7135
|
* Gets legs of given SpiderVehicle.
|
|
7065
7136
|
*/
|
|
@@ -7348,7 +7419,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7348
7419
|
* Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
|
|
7349
7420
|
* @returns Whether the filter was set.
|
|
7350
7421
|
*/
|
|
7351
|
-
set_fluid_filter(this: void, index: FluidStorageIndex, filter?:
|
|
7422
|
+
set_fluid_filter(this: void, index: FluidStorageIndex, filter?: FluidID): boolean;
|
|
7352
7423
|
/**
|
|
7353
7424
|
* Sets the fluid within the given storage's fluid segment.
|
|
7354
7425
|
* @returns The amount of fluid set.
|
|
@@ -7951,7 +8022,9 @@ interface LuaEntity extends LuaControl {
|
|
|
7951
8022
|
*/
|
|
7952
8023
|
health?: float;
|
|
7953
8024
|
/**
|
|
7954
|
-
* The entities connected to this
|
|
8025
|
+
* The entities connected to this entity's heat energy source or this entity's heat buffer.
|
|
8026
|
+
*
|
|
8027
|
+
* The following entity types have a heat buffer: heat pipe, reactor and heat interface.
|
|
7955
8028
|
*/
|
|
7956
8029
|
readonly heat_neighbours: LuaEntity[];
|
|
7957
8030
|
/**
|
|
@@ -8511,7 +8584,9 @@ interface LuaEntity extends LuaControl {
|
|
|
8511
8584
|
*/
|
|
8512
8585
|
tags?: Tags;
|
|
8513
8586
|
/**
|
|
8514
|
-
* The temperature of this entity's heat energy source. `nil` if this entity does not use a heat energy source.
|
|
8587
|
+
* The temperature of this entity's heat energy source or this entity's heat buffer. `nil` if this entity does not use a heat energy source or does not have a heat buffer.
|
|
8588
|
+
*
|
|
8589
|
+
* The following entity types have a heat buffer: heat pipe, reactor and heat interface.
|
|
8515
8590
|
*/
|
|
8516
8591
|
temperature?: double;
|
|
8517
8592
|
/**
|
|
@@ -8939,9 +9014,9 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8939
9014
|
readonly braking_force?: double;
|
|
8940
9015
|
readonly build_distance?: uint32;
|
|
8941
9016
|
/**
|
|
8942
|
-
* The
|
|
9017
|
+
* The {@link grid size | prototype:EntityPrototype::build_grid_size} of the building.
|
|
8943
9018
|
*/
|
|
8944
|
-
readonly
|
|
9019
|
+
readonly build_grid_size: uint32;
|
|
8945
9020
|
/**
|
|
8946
9021
|
* Whether this inserter is a bulk-type.
|
|
8947
9022
|
*/
|
|
@@ -9099,9 +9174,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9099
9174
|
readonly default_copy_color_from_train_stop?: boolean;
|
|
9100
9175
|
readonly default_day_length_output_signal?: SignalID;
|
|
9101
9176
|
readonly default_day_tick_output_signal?: SignalID;
|
|
9177
|
+
readonly default_empty_slots_signal?: SignalID;
|
|
9102
9178
|
readonly default_game_tick_output_signal?: SignalID;
|
|
9103
9179
|
readonly default_green_output_signal?: SignalID;
|
|
9104
9180
|
readonly default_green_signal?: SignalID;
|
|
9181
|
+
readonly default_launched_signal?: SignalID;
|
|
9105
9182
|
readonly default_orange_output_signal?: SignalID;
|
|
9106
9183
|
readonly default_output_signal?: SignalID;
|
|
9107
9184
|
readonly default_recipe_finished_signal?: SignalID;
|
|
@@ -9670,7 +9747,19 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9670
9747
|
readonly max_underground_distance?: uint8;
|
|
9671
9748
|
readonly maximum_corner_sliding_distance?: double;
|
|
9672
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;
|
|
9673
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;
|
|
9674
9763
|
readonly maximum_spread_count?: uint16;
|
|
9675
9764
|
/**
|
|
9676
9765
|
* The maximum fluid temperature of this generator prototype.
|
|
@@ -9695,6 +9784,18 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9695
9784
|
*/
|
|
9696
9785
|
readonly mineable_properties: MineableProperties;
|
|
9697
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;
|
|
9698
9799
|
/**
|
|
9699
9800
|
* Minimum amount of this resource.
|
|
9700
9801
|
*/
|
|
@@ -10023,7 +10124,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
10023
10124
|
readonly target_initial_position_only?: boolean;
|
|
10024
10125
|
readonly target_position_deviation?: double;
|
|
10025
10126
|
/**
|
|
10026
|
-
* 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.
|
|
10027
10128
|
*/
|
|
10028
10129
|
readonly target_temperature?: float;
|
|
10029
10130
|
/**
|
|
@@ -10570,6 +10671,7 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
10570
10671
|
readonly solar_panel_performance_at_day?: double;
|
|
10571
10672
|
readonly solar_panel_performance_at_night?: double;
|
|
10572
10673
|
readonly solar_panel_solar_coefficient_property?: LuaSurfacePropertyPrototype;
|
|
10674
|
+
readonly sunglasses?: boolean;
|
|
10573
10675
|
/**
|
|
10574
10676
|
* The result item when taking this equipment out of an equipment grid, if any.
|
|
10575
10677
|
*/
|
|
@@ -10748,14 +10850,6 @@ interface LuaFluidBoxPrototype {
|
|
|
10748
10850
|
* The index of this fluidbox prototype in the owning entity.
|
|
10749
10851
|
*/
|
|
10750
10852
|
readonly index: uint32;
|
|
10751
|
-
/**
|
|
10752
|
-
* The maximum temperature, if any is set.
|
|
10753
|
-
*/
|
|
10754
|
-
readonly maximum_temperature?: double;
|
|
10755
|
-
/**
|
|
10756
|
-
* The minimum temperature, if any is set.
|
|
10757
|
-
*/
|
|
10758
|
-
readonly minimum_temperature?: double;
|
|
10759
10853
|
/**
|
|
10760
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.
|
|
10761
10855
|
*/
|
|
@@ -10798,7 +10892,15 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
10798
10892
|
readonly fluid_box: LuaFluidBoxPrototype;
|
|
10799
10893
|
readonly fluid_usage_per_tick: double;
|
|
10800
10894
|
readonly hide_from_stats: boolean;
|
|
10801
|
-
|
|
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;
|
|
10802
10904
|
/**
|
|
10803
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.
|
|
10804
10906
|
*/
|
|
@@ -12027,6 +12129,10 @@ interface LuaGameScript {
|
|
|
12027
12129
|
* See {@link LuaGameScript::players | runtime:LuaGameScript::players} for accessing all players.
|
|
12028
12130
|
*/
|
|
12029
12131
|
readonly player?: LuaPlayer;
|
|
12132
|
+
/**
|
|
12133
|
+
* True by default. Can be used to prevent the game engine from printing messages for player deaths and respawns.
|
|
12134
|
+
*/
|
|
12135
|
+
player_death_notifications_enabled: boolean;
|
|
12030
12136
|
/**
|
|
12031
12137
|
* Get a table of all the players that currently exist. This sparse table allows you to find players by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will provide the `index`es as the keys. Iterating with `ipairs()` will not work at all.
|
|
12032
12138
|
*
|
|
@@ -12037,6 +12143,10 @@ interface LuaGameScript {
|
|
|
12037
12143
|
* Simulation-related functions, or `nil` if the current game is not a simulation.
|
|
12038
12144
|
*/
|
|
12039
12145
|
readonly simulation: LuaSimulation;
|
|
12146
|
+
/**
|
|
12147
|
+
* True by default. Can be used to prevent the game engine from printing messages for space platform deaths.
|
|
12148
|
+
*/
|
|
12149
|
+
space_platform_death_notifications_enabled: boolean;
|
|
12040
12150
|
/**
|
|
12041
12151
|
* Speed to update the map at. 1.0 is normal speed -- 60 UPS. Minimum value is 0.01.
|
|
12042
12152
|
*/
|
|
@@ -13582,7 +13692,7 @@ interface LuaInserterControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
13582
13692
|
*/
|
|
13583
13693
|
circuit_set_filters: boolean;
|
|
13584
13694
|
/**
|
|
13585
|
-
* 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.
|
|
13586
13696
|
*/
|
|
13587
13697
|
circuit_set_stack_size: boolean;
|
|
13588
13698
|
/**
|
|
@@ -14027,8 +14137,9 @@ interface LuaItemCommon {
|
|
|
14027
14137
|
/**
|
|
14028
14138
|
* Set new entities to be a part of this blueprint.
|
|
14029
14139
|
* @param entities The new blueprint entities.
|
|
14140
|
+
* @param fix_positions If false, positions will be left unchanged unless invalid for the current snapping.
|
|
14030
14141
|
*/
|
|
14031
|
-
set_blueprint_entities(this: void, entities: BlueprintEntity[]): void;
|
|
14142
|
+
set_blueprint_entities(this: void, entities: BlueprintEntity[], fix_positions?: boolean): void;
|
|
14032
14143
|
/**
|
|
14033
14144
|
* Sets the given tag on the given blueprint entity index in this blueprint item.
|
|
14034
14145
|
* @param index The entity index.
|
|
@@ -14955,6 +15066,7 @@ interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
|
|
|
14955
15066
|
* Whether the circuit condition is in effect.
|
|
14956
15067
|
*/
|
|
14957
15068
|
circuit_condition_enabled: boolean;
|
|
15069
|
+
empty_slots_signal?: SignalID;
|
|
14958
15070
|
/**
|
|
14959
15071
|
* 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.
|
|
14960
15072
|
*/
|
|
@@ -14963,6 +15075,7 @@ interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
|
|
|
14963
15075
|
* `true` if this logistic container is sending its content to a circuit network.
|
|
14964
15076
|
*/
|
|
14965
15077
|
read_contents: boolean;
|
|
15078
|
+
read_empty_slots: boolean;
|
|
14966
15079
|
/**
|
|
14967
15080
|
* `true` if this logistic container has its requests set by a circuit network.
|
|
14968
15081
|
*
|
|
@@ -15668,7 +15781,7 @@ interface LuaPin {
|
|
|
15668
15781
|
alert_type?: defines.alert_type;
|
|
15669
15782
|
always_visible: boolean;
|
|
15670
15783
|
/**
|
|
15671
|
-
* The custom chart tag - if this pin
|
|
15784
|
+
* The custom chart tag - if this pin specifically binds to a chart tag.
|
|
15672
15785
|
*
|
|
15673
15786
|
* The chart tag must be on the same force as the owning player.
|
|
15674
15787
|
*/
|
|
@@ -15676,7 +15789,7 @@ interface LuaPin {
|
|
|
15676
15789
|
/**
|
|
15677
15790
|
* The index of this pin (unique to this player).
|
|
15678
15791
|
*
|
|
15679
|
-
* Note that this index has no
|
|
15792
|
+
* Note that this index has no correlation to the position of the pin within {@link LuaPlayer::get_pins | runtime:LuaPlayer::get_pins}
|
|
15680
15793
|
*/
|
|
15681
15794
|
readonly index: uint32;
|
|
15682
15795
|
/**
|
|
@@ -15726,8 +15839,6 @@ interface LuaPin {
|
|
|
15726
15839
|
interface LuaPlanet {
|
|
15727
15840
|
/**
|
|
15728
15841
|
* Associates the given surface with this planet. Surface must not already be associated with a planet and the planet must not already have an associated surface.
|
|
15729
|
-
*
|
|
15730
|
-
* Planet must not be using {@link entities_require_heating | runtime:LuaSpaceLocationPrototype::entities_require_heating}.
|
|
15731
15842
|
* @param surface The surface to be associated.
|
|
15732
15843
|
*/
|
|
15733
15844
|
associate_surface(this: void, surface: SurfaceIdentification): void;
|
|
@@ -15899,6 +16010,8 @@ interface LuaPlayer extends LuaControl {
|
|
|
15899
16010
|
clear_recipe_notifications(this: void): void;
|
|
15900
16011
|
/**
|
|
15901
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.
|
|
15902
16015
|
*/
|
|
15903
16016
|
clear_selection(this: void): void;
|
|
15904
16017
|
/**
|
|
@@ -16239,6 +16352,8 @@ interface LuaPlayer extends LuaControl {
|
|
|
16239
16352
|
}): ItemWithQualityCount[] | null;
|
|
16240
16353
|
/**
|
|
16241
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.
|
|
16242
16357
|
* @param position The position to start selection from.
|
|
16243
16358
|
* @param selection_mode The type of selection to start.
|
|
16244
16359
|
*/
|
|
@@ -16993,6 +17108,7 @@ interface LuaPrototypes {
|
|
|
16993
17108
|
* Control behavior for proxy container.
|
|
16994
17109
|
*/
|
|
16995
17110
|
interface LuaProxyContainerControlBehavior extends LuaControlBehavior {
|
|
17111
|
+
empty_slots_signal?: SignalID;
|
|
16996
17112
|
/**
|
|
16997
17113
|
* 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.
|
|
16998
17114
|
*/
|
|
@@ -17001,6 +17117,7 @@ interface LuaProxyContainerControlBehavior extends LuaControlBehavior {
|
|
|
17001
17117
|
* `true` if this proxy container is sending inventory contents to a circuit network
|
|
17002
17118
|
*/
|
|
17003
17119
|
read_contents: boolean;
|
|
17120
|
+
read_empty_slots: boolean;
|
|
17004
17121
|
/**
|
|
17005
17122
|
* 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.
|
|
17006
17123
|
*/
|
|
@@ -17755,8 +17872,9 @@ interface LuaRecord {
|
|
|
17755
17872
|
/**
|
|
17756
17873
|
* Set new entities to be a part of this blueprint.
|
|
17757
17874
|
* @param entities The new blueprint entities.
|
|
17875
|
+
* @param fix_positions If false, positions will be left unchanged unless invalid for the current snapping.
|
|
17758
17876
|
*/
|
|
17759
|
-
set_blueprint_entities(this: void, entities: BlueprintEntity[]): void;
|
|
17877
|
+
set_blueprint_entities(this: void, entities: BlueprintEntity[], fix_positions?: boolean): void;
|
|
17760
17878
|
/**
|
|
17761
17879
|
* Sets the given tag on the given blueprint entity index in this blueprint.
|
|
17762
17880
|
* @param index The entity index.
|
|
@@ -18229,7 +18347,7 @@ interface LuaRendering {
|
|
|
18229
18347
|
* @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
|
18230
18348
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18231
18349
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18232
|
-
* @param table.tall Defaults to false.
|
|
18350
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18233
18351
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18234
18352
|
* @param table.light_mode Whether this object should be rendered as a sprite, light or both at once. Defaults to "occluder".
|
|
18235
18353
|
*/
|
|
@@ -18270,7 +18388,7 @@ interface LuaRendering {
|
|
|
18270
18388
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18271
18389
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18272
18390
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18273
|
-
* @param table.tall Defaults to false.
|
|
18391
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18274
18392
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18275
18393
|
*/
|
|
18276
18394
|
draw_arc(this: void, table: {
|
|
@@ -18303,7 +18421,7 @@ interface LuaRendering {
|
|
|
18303
18421
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18304
18422
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18305
18423
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18306
|
-
* @param table.tall Defaults to false.
|
|
18424
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18307
18425
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18308
18426
|
*/
|
|
18309
18427
|
draw_circle(this: void, table: {
|
|
@@ -18340,7 +18458,7 @@ interface LuaRendering {
|
|
|
18340
18458
|
* @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
|
18341
18459
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18342
18460
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18343
|
-
* @param table.tall Defaults to false.
|
|
18461
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18344
18462
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18345
18463
|
*/
|
|
18346
18464
|
draw_light(this: void, table: {
|
|
@@ -18375,7 +18493,7 @@ interface LuaRendering {
|
|
|
18375
18493
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18376
18494
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18377
18495
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18378
|
-
* @param table.tall Defaults to false.
|
|
18496
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18379
18497
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18380
18498
|
* @example ```
|
|
18381
18499
|
-- Draw a white and 2 pixel wide line from {0, 0} to {2, 2}.
|
|
@@ -18418,7 +18536,7 @@ interface LuaRendering {
|
|
|
18418
18536
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18419
18537
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18420
18538
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18421
|
-
* @param table.tall Defaults to false.
|
|
18539
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18422
18540
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18423
18541
|
*/
|
|
18424
18542
|
draw_polygon(this: void, table: {
|
|
@@ -18450,7 +18568,7 @@ interface LuaRendering {
|
|
|
18450
18568
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18451
18569
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18452
18570
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18453
|
-
* @param table.tall Defaults to false.
|
|
18571
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18454
18572
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18455
18573
|
* @example ```
|
|
18456
18574
|
-- Draw a white and 1 pixel wide square outline with the corners {0, 0} and {2, 2}.
|
|
@@ -18490,7 +18608,7 @@ interface LuaRendering {
|
|
|
18490
18608
|
* @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
|
18491
18609
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18492
18610
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18493
|
-
* @param table.tall Defaults to false.
|
|
18611
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18494
18612
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18495
18613
|
* @param table.light_mode Whether this object should be rendered as a sprite, light or both at once. Defaults to "occluder".
|
|
18496
18614
|
* @example ```
|
|
@@ -18541,7 +18659,7 @@ interface LuaRendering {
|
|
|
18541
18659
|
* @param table.vertical_alignment Defaults to "top".
|
|
18542
18660
|
* @param table.scale_with_zoom Defaults to false. If true, the text scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes.
|
|
18543
18661
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18544
|
-
* @param table.tall Defaults to false.
|
|
18662
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18545
18663
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18546
18664
|
* @param table.use_rich_text If rich text rendering is enabled. Defaults to false.
|
|
18547
18665
|
*/
|
|
@@ -18628,10 +18746,12 @@ interface LuaRoboportControlBehavior extends LuaControlBehavior {
|
|
|
18628
18746
|
* Control behavior for rocket silos.
|
|
18629
18747
|
*/
|
|
18630
18748
|
interface LuaRocketSiloControlBehavior extends LuaControlBehavior {
|
|
18749
|
+
launched_signal?: SignalID;
|
|
18631
18750
|
/**
|
|
18632
18751
|
* 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.
|
|
18633
18752
|
*/
|
|
18634
18753
|
readonly object_name: string;
|
|
18754
|
+
read_launched: boolean;
|
|
18635
18755
|
/**
|
|
18636
18756
|
* The items read mode for the rocket silo.
|
|
18637
18757
|
*/
|
|
@@ -19635,6 +19755,7 @@ interface LuaSpacePlatformHubControlBehavior extends LuaControlBehavior {
|
|
|
19635
19755
|
* Signal to be transmitted with platform's damage taken value.
|
|
19636
19756
|
*/
|
|
19637
19757
|
damage_taken_signal?: SignalID;
|
|
19758
|
+
empty_slots_signal?: SignalID;
|
|
19638
19759
|
/**
|
|
19639
19760
|
* 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.
|
|
19640
19761
|
*/
|
|
@@ -19647,6 +19768,7 @@ interface LuaSpacePlatformHubControlBehavior extends LuaControlBehavior {
|
|
|
19647
19768
|
* Whether damage taken by the space platform is sent to circuit network.
|
|
19648
19769
|
*/
|
|
19649
19770
|
read_damage_taken: boolean;
|
|
19771
|
+
read_empty_slots: boolean;
|
|
19650
19772
|
/**
|
|
19651
19773
|
* Whether current connection "from" end is sent to circuit network.
|
|
19652
19774
|
*/
|
|
@@ -22899,7 +23021,7 @@ interface LuaTransportLine {
|
|
|
22899
23021
|
get_item_count(this: void, item?: ItemFilter): uint32;
|
|
22900
23022
|
/**
|
|
22901
23023
|
* Gives position of the selected item on this transport line.
|
|
22902
|
-
* @param index Index of the item. Allowed values are from 1 up to #
|
|
23024
|
+
* @param index Index of the item. Allowed values are from 1 up to {@link # (length) | runtime:LuaTransportLine::length_operator}.
|
|
22903
23025
|
* @returns [0] - Linear position of the item along the transport line
|
|
22904
23026
|
* @returns [1] - Map position of the item
|
|
22905
23027
|
*/
|