factorio-types 1.2.40 → 1.2.42
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 +128 -16
- package/dist/concepts.d.ts +79 -39
- package/dist/datacollection.d.ts +4 -1
- package/dist/defines.d.ts +19 -12
- package/dist/events.d.ts +30 -5
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +100 -35
- package/dist/types.d.ts +35 -4
- 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.59
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -3903,6 +3903,24 @@ interface LuaBootstrap {
|
|
|
3903
3903
|
script.on_event(defines.events.on_built_entity,
|
|
3904
3904
|
function(event) game.print("Gotta go fast!") end,
|
|
3905
3905
|
{{filter = "name", name = "fast-inserter"}})
|
|
3906
|
+
```
|
|
3907
|
+
*/
|
|
3908
|
+
on_event(this: void, event: defines.events.on_udp_packet_received, handler: ((this: void, arg0: runtime.on_udp_packet_received) => any) | nil, filters?: EventFilter): void;
|
|
3909
|
+
/**
|
|
3910
|
+
* 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.
|
|
3911
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
3912
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
3913
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
3914
|
+
* @example ```
|
|
3915
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
3916
|
+
script.on_event(defines.events.on_tick,
|
|
3917
|
+
function(event) game.print(event.tick) end)
|
|
3918
|
+
```
|
|
3919
|
+
* @example ```
|
|
3920
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
3921
|
+
script.on_event(defines.events.on_built_entity,
|
|
3922
|
+
function(event) game.print("Gotta go fast!") end,
|
|
3923
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
3906
3924
|
```
|
|
3907
3925
|
*/
|
|
3908
3926
|
on_event(this: void, event: defines.events.on_undo_applied, handler: ((this: void, arg0: runtime.on_undo_applied) => any) | nil, filters?: EventFilter): void;
|
|
@@ -6808,6 +6826,16 @@ interface LuaEntity extends LuaControl {
|
|
|
6808
6826
|
* Note: Some entities (Corpse, FireFlame, Roboport, RollingStock, dying entities) need to remain active and will ignore writes.
|
|
6809
6827
|
*/
|
|
6810
6828
|
disabled_by_script: boolean;
|
|
6829
|
+
display_panel_always_show: boolean;
|
|
6830
|
+
/**
|
|
6831
|
+
* Icon visible on the display panel. Can be written only when it is not set by control behavior.
|
|
6832
|
+
*/
|
|
6833
|
+
display_panel_icon: SignalID;
|
|
6834
|
+
display_panel_show_in_chart: boolean;
|
|
6835
|
+
/**
|
|
6836
|
+
* Text visible on the display panel. Can be written only when it is not set by control behavior.
|
|
6837
|
+
*/
|
|
6838
|
+
display_panel_text: LocalisedString;
|
|
6811
6839
|
/**
|
|
6812
6840
|
* Gives a draw data of the given entity if it supports such data.
|
|
6813
6841
|
*/
|
|
@@ -7587,7 +7615,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7587
7615
|
*/
|
|
7588
7616
|
get_fluid_capacity(this: void, quality?: QualityID): double;
|
|
7589
7617
|
/**
|
|
7590
|
-
* The fluid usage of this generator or fusion reactor prototype.
|
|
7618
|
+
* The fluid usage of this generator, fusion generator or fusion reactor prototype.
|
|
7591
7619
|
*/
|
|
7592
7620
|
get_fluid_usage_per_tick(this: void, quality?: QualityID): double | null;
|
|
7593
7621
|
/**
|
|
@@ -8155,7 +8183,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8155
8183
|
/**
|
|
8156
8184
|
* Properties of custom inventory. Only provided if inventory_type is `"with_custom_stack_size"`.
|
|
8157
8185
|
*/
|
|
8158
|
-
readonly inventory_properties?:
|
|
8186
|
+
readonly inventory_properties?: InventoryWithCustomStackSizeSpecification;
|
|
8159
8187
|
readonly inventory_size_quality_increase?: uint;
|
|
8160
8188
|
/**
|
|
8161
8189
|
* The inventory type this container or linked container uses.
|
|
@@ -8170,17 +8198,24 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8170
8198
|
* These are the objects that are considered buildings:
|
|
8171
8199
|
*
|
|
8172
8200
|
* - AccumulatorPrototype
|
|
8201
|
+
* - AgriculturalTowerPrototype
|
|
8173
8202
|
* - ArtilleryTurretPrototype
|
|
8203
|
+
* - AsteroidCollectorPrototype
|
|
8174
8204
|
* - BeaconPrototype
|
|
8175
8205
|
* - BoilerPrototype
|
|
8176
8206
|
* - BurnerGeneratorPrototype
|
|
8177
|
-
* -
|
|
8207
|
+
* - CargoBayPrototype
|
|
8208
|
+
* - CargoLandingPadPrototype
|
|
8209
|
+
* - CombinatorPrototype → ArithmeticCombinator, DeciderCombinator, SelectorCombinator
|
|
8178
8210
|
* - ConstantCombinatorPrototype
|
|
8179
|
-
* - ContainerPrototype → LogisticContainer, InfinityContainer
|
|
8211
|
+
* - ContainerPrototype → LogisticContainer, InfinityContainer, TemporaryContainer
|
|
8180
8212
|
* - CraftingMachinePrototype → AssemblingMachine, RocketSilo, Furnace
|
|
8213
|
+
* - DisplayPanelPrototype
|
|
8181
8214
|
* - ElectricEnergyInterfacePrototype
|
|
8182
8215
|
* - ElectricPolePrototype
|
|
8183
8216
|
* - EnemySpawnerPrototype
|
|
8217
|
+
* - FusionGeneratorPrototype
|
|
8218
|
+
* - FusionReactorPrototype
|
|
8184
8219
|
* - GatePrototype
|
|
8185
8220
|
* - GeneratorPrototype
|
|
8186
8221
|
* - HeatInterfacePrototype
|
|
@@ -8188,6 +8223,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8188
8223
|
* - InserterPrototype
|
|
8189
8224
|
* - LabPrototype
|
|
8190
8225
|
* - LampPrototype
|
|
8226
|
+
* - LightningAttractorPrototype
|
|
8191
8227
|
* - LinkedContainerPrototype
|
|
8192
8228
|
* - MarketPrototype
|
|
8193
8229
|
* - MiningDrillPrototype
|
|
@@ -8196,19 +8232,24 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8196
8232
|
* - PipeToGroundPrototype
|
|
8197
8233
|
* - PowerSwitchPrototype
|
|
8198
8234
|
* - ProgrammableSpeakerPrototype
|
|
8235
|
+
* - ProxyContainerPrototype
|
|
8199
8236
|
* - PumpPrototype
|
|
8200
8237
|
* - RadarPrototype
|
|
8201
|
-
* - RailPrototype →
|
|
8238
|
+
* - RailPrototype → CurvedRailA, ElevatedCurvedRailA, CurvedRailB, ElevatedCurvedRailB, HalfDiagonalRail, ElevatedHalfDiagonalRail, LegacyCurvedRail, LegacyStraightRail, RailRamp, StraightRail, ElevatedStraightRail
|
|
8202
8239
|
* - RailSignalBasePrototype → RailChainSignal, RailSignal
|
|
8240
|
+
* - RailSupportPrototype
|
|
8203
8241
|
* - ReactorPrototype
|
|
8204
8242
|
* - RoboportPrototype
|
|
8205
8243
|
* - SimpleEntityPrototype
|
|
8206
8244
|
* - SimpleEntityWithOwnerPrototype → SimpleEntityWithForce
|
|
8207
8245
|
* - SolarPanelPrototype
|
|
8246
|
+
* - SpacePlatformHubPrototype
|
|
8208
8247
|
* - StorageTankPrototype
|
|
8248
|
+
* - ThrusterPrototype
|
|
8209
8249
|
* - TrainStopPrototype
|
|
8210
|
-
* - TransportBeltConnectablePrototype → LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt
|
|
8250
|
+
* - TransportBeltConnectablePrototype → LaneSplitter, LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt
|
|
8211
8251
|
* - TurretPrototype → AmmoTurret, ElectricTurret, FluidTurret
|
|
8252
|
+
* - ValvePrototype
|
|
8212
8253
|
* - WallPrototype
|
|
8213
8254
|
*/
|
|
8214
8255
|
readonly is_building: boolean;
|
|
@@ -8224,7 +8265,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8224
8265
|
/**
|
|
8225
8266
|
* Items that when placed will produce this entity, if any. Construction bots will choose the first item in the list to build this entity.
|
|
8226
8267
|
*/
|
|
8227
|
-
readonly items_to_place_this?:
|
|
8268
|
+
readonly items_to_place_this?: ItemWithCount[];
|
|
8228
8269
|
readonly joint_distance?: double;
|
|
8229
8270
|
/**
|
|
8230
8271
|
* The item prototype names that are the inputs of this lab prototype.
|
|
@@ -8398,6 +8439,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8398
8439
|
*/
|
|
8399
8440
|
readonly move_while_shooting?: boolean;
|
|
8400
8441
|
readonly neighbour_bonus?: double;
|
|
8442
|
+
readonly neighbour_connectable?: NeighbourConnectable;
|
|
8401
8443
|
/**
|
|
8402
8444
|
* The next upgrade for this entity, if any.
|
|
8403
8445
|
*/
|
|
@@ -8651,6 +8693,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8651
8693
|
* If this drill uses force productivity bonus
|
|
8652
8694
|
*/
|
|
8653
8695
|
readonly uses_force_mining_productivity_bonus?: boolean;
|
|
8696
|
+
readonly uses_inserter_stack_size_bonus?: boolean;
|
|
8654
8697
|
/**
|
|
8655
8698
|
* 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.
|
|
8656
8699
|
*/
|
|
@@ -8884,7 +8927,7 @@ interface LuaEquipmentGrid {
|
|
|
8884
8927
|
position?: EquipmentPosition;
|
|
8885
8928
|
equipment?: LuaEquipment;
|
|
8886
8929
|
by_player?: PlayerIdentification;
|
|
8887
|
-
}):
|
|
8930
|
+
}): ItemWithCount | null;
|
|
8888
8931
|
/**
|
|
8889
8932
|
* Remove all equipment from the grid.
|
|
8890
8933
|
* @param by_player If provided, the action is done 'as' this player and {@link on_player_removed_equipment | runtime:on_player_removed_equipment} is triggered.
|
|
@@ -8921,6 +8964,10 @@ interface LuaEquipmentGrid {
|
|
|
8921
8964
|
* The total amount of inventory bonus this equipment grid gives.
|
|
8922
8965
|
*/
|
|
8923
8966
|
readonly inventory_bonus: uint;
|
|
8967
|
+
/**
|
|
8968
|
+
* The item stack that this equipment grid is owned by.
|
|
8969
|
+
*/
|
|
8970
|
+
readonly itemstack_owner?: LuaItemStack;
|
|
8924
8971
|
/**
|
|
8925
8972
|
* The maximum amount of shields this equipment grid has.
|
|
8926
8973
|
*/
|
|
@@ -11932,11 +11979,33 @@ interface LuaHelpers {
|
|
|
11932
11979
|
* Not available in settings and prototype stages.
|
|
11933
11980
|
*/
|
|
11934
11981
|
parse_map_exchange_string(this: void, map_exchange_string: string): MapExchangeStringData;
|
|
11982
|
+
/**
|
|
11983
|
+
* Dispatch {@link defines.events.on_udp_packet_received | runtime:defines.events.on_udp_packet_received} events for any new packets received by the specified player or the server.
|
|
11984
|
+
*
|
|
11985
|
+
* This must be enabled per-instance with `--enable-lua-udp`.
|
|
11986
|
+
*
|
|
11987
|
+
* Udp socket when enabled requests 256KB of receive buffer from the operating system. If there is more data than this between two subsequent calls of this method, data will be lost. That also applies to periods when the game is paused or is being saved as in those case the game update is not happening.
|
|
11988
|
+
*
|
|
11989
|
+
* Note: lua event is not raised immediately as the udp packet needs to be introduced into game state by means of input actions. Please keep incoming traffic as small as possible as in case of multiplayer game with many players, all this data will have to go through the multiplayer server and be distributed to all clients.
|
|
11990
|
+
*
|
|
11991
|
+
* Not available in settings and prototype stages.
|
|
11992
|
+
* @param for_player If given, packets will only be read from this `player_index`. Providing `0` will only read from the server if present.
|
|
11993
|
+
*/
|
|
11994
|
+
recv_udp(this: void, for_player?: uint): void;
|
|
11935
11995
|
/**
|
|
11936
11996
|
* Remove a file or directory in the `script-output` folder, located in the game's {@link user data directory | https://wiki.factorio.com/User_data_directory}. Can be used to remove files created by {@link LuaHelpers::write_file | runtime:LuaHelpers::write_file}.
|
|
11937
11997
|
* @param path The path to the file or directory to remove, relative to `script-output`.
|
|
11938
11998
|
*/
|
|
11939
11999
|
remove_path(this: void, path: string): void;
|
|
12000
|
+
/**
|
|
12001
|
+
* Send data to a UDP port on localhost for a specified player, if enabled.
|
|
12002
|
+
*
|
|
12003
|
+
* This must be enabled per-instance with `--enable-lua-udp`.
|
|
12004
|
+
* @param port Destination port number (localhost only)
|
|
12005
|
+
* @param data The content to send.
|
|
12006
|
+
* @param for_player If given, the packet will only be sent from this `player_index`. Providing `0` will only send from the server if present. `for_player` cannot be used in settings and prototype stages.
|
|
12007
|
+
*/
|
|
12008
|
+
send_udp(this: void, port: uint16, data: LocalisedString, for_player?: uint): void;
|
|
11940
12009
|
/**
|
|
11941
12010
|
* Convert a table to a JSON string
|
|
11942
12011
|
*/
|
|
@@ -13587,6 +13656,28 @@ interface LuaMiningDrillControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
13587
13656
|
*/
|
|
13588
13657
|
readonly valid: boolean;
|
|
13589
13658
|
}
|
|
13659
|
+
/**
|
|
13660
|
+
* Arbitrary data provided by mods.
|
|
13661
|
+
*/
|
|
13662
|
+
interface LuaModData extends LuaPrototypeBase {
|
|
13663
|
+
/**
|
|
13664
|
+
* Provides partial access to the data.
|
|
13665
|
+
*/
|
|
13666
|
+
get(this: void, key: string): AnyBasic | null;
|
|
13667
|
+
/**
|
|
13668
|
+
* Provides full data of this prototype.
|
|
13669
|
+
*/
|
|
13670
|
+
readonly data: Record<string, AnyBasic>;
|
|
13671
|
+
readonly data_type: string;
|
|
13672
|
+
/**
|
|
13673
|
+
* 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.
|
|
13674
|
+
*/
|
|
13675
|
+
readonly object_name: string;
|
|
13676
|
+
/**
|
|
13677
|
+
* 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.
|
|
13678
|
+
*/
|
|
13679
|
+
readonly valid: boolean;
|
|
13680
|
+
}
|
|
13590
13681
|
/**
|
|
13591
13682
|
* Prototype of a mod setting.
|
|
13592
13683
|
*/
|
|
@@ -14125,6 +14216,12 @@ interface LuaPlayer extends LuaControl {
|
|
|
14125
14216
|
/**
|
|
14126
14217
|
* Invokes the "smart pipette" action on the player as if the user pressed it.
|
|
14127
14218
|
* @param allow_ghost Defaults to false.
|
|
14219
|
+
* @returns Whether the smart pipette found something to put into the cursor.
|
|
14220
|
+
*/
|
|
14221
|
+
pipette(this: void, id: PipetteID, quality?: QualityID, allow_ghost?: boolean): boolean;
|
|
14222
|
+
/**
|
|
14223
|
+
* Invokes the "smart pipette" action on the player as if the user pressed it. This method is deprecated in favor of {@link LuaPlayer::pipette | runtime:LuaPlayer::pipette} and should not be used.
|
|
14224
|
+
* @param allow_ghost Defaults to false.
|
|
14128
14225
|
* @returns Whether the smart pipette found something to place.
|
|
14129
14226
|
*/
|
|
14130
14227
|
pipette_entity(this: void, entity: EntityWithQualityID, allow_ghost?: boolean): boolean;
|
|
@@ -14848,6 +14945,10 @@ interface LuaPrototypes {
|
|
|
14848
14945
|
readonly max_inserter_reach_distance: double;
|
|
14849
14946
|
readonly max_pipe_to_ground_distance: uint8;
|
|
14850
14947
|
readonly max_underground_belt_distance: uint8;
|
|
14948
|
+
/**
|
|
14949
|
+
* A dictionary containing every LuaModData indexed by `name`.
|
|
14950
|
+
*/
|
|
14951
|
+
readonly mod_data: Record<string, LuaModData>;
|
|
14851
14952
|
/**
|
|
14852
14953
|
* A dictionary containing every LuaModSettingPrototype indexed by `name`.
|
|
14853
14954
|
*/
|
|
@@ -16934,8 +17035,8 @@ interface LuaSpacePlatform {
|
|
|
16934
17035
|
* If no filters are given, returns all asteroid chunks in the search area. If multiple filters are specified, returns only asteroid chunks matching every given filter. If no area and no position are given, the entire surface is searched.
|
|
16935
17036
|
* @param table.invert If the filters should be inverted.
|
|
16936
17037
|
* @example ```
|
|
16937
|
-
game.
|
|
16938
|
-
game.
|
|
17038
|
+
game.forces.player.platforms[1].find_asteroid_chunks_filtered{area = {{-10, -10}, {10, 10}}, name = "carbonic-asteroid"} -- gets all asteroids with the given name in the rectangle
|
|
17039
|
+
game.forces.player.platforms[1].find_asteroid_chunks_filtered{area = {{-10, -10}, {10, 10}}, limit = 5} -- gets the first 5 asteroid chunks in the rectangle
|
|
16939
17040
|
```
|
|
16940
17041
|
*/
|
|
16941
17042
|
find_asteroid_chunks_filtered(this: void, table: {
|
|
@@ -18326,7 +18427,7 @@ interface LuaSurface {
|
|
|
18326
18427
|
*/
|
|
18327
18428
|
wind_speed: double;
|
|
18328
18429
|
}
|
|
18329
|
-
type LuaSurfaceCreateEntityParams = BaseLuaSurfaceCreateEntityParams | LuaSurfaceCreateEntityParamsArtilleryFlare | LuaSurfaceCreateEntityParamsArtilleryProjectile | LuaSurfaceCreateEntityParamsAssemblingMachine | LuaSurfaceCreateEntityParamsBeam | LuaSurfaceCreateEntityParamsCharacterCorpse | LuaSurfaceCreateEntityParamsCliff | LuaSurfaceCreateEntityParamsContainer | LuaSurfaceCreateEntityParamsElectricPole | LuaSurfaceCreateEntityParamsEntityGhost | LuaSurfaceCreateEntityParamsFire | LuaSurfaceCreateEntityParamsHighlightBox | LuaSurfaceCreateEntityParamsInserter | LuaSurfaceCreateEntityParamsItemEntity | LuaSurfaceCreateEntityParamsItemRequestProxy | LuaSurfaceCreateEntityParamsLamp | LuaSurfaceCreateEntityParamsLoader | LuaSurfaceCreateEntityParamsLoader1x1 | LuaSurfaceCreateEntityParamsLocomotive | LuaSurfaceCreateEntityParamsLogisticContainer | LuaSurfaceCreateEntityParamsParticle | LuaSurfaceCreateEntityParamsPlant | LuaSurfaceCreateEntityParamsProgrammableSpeaker | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsRailChainSignal | LuaSurfaceCreateEntityParamsRailSignal | LuaSurfaceCreateEntityParamsResource | LuaSurfaceCreateEntityParamsRollingStock | LuaSurfaceCreateEntityParamsSimpleEntityWithForce | LuaSurfaceCreateEntityParamsSimpleEntityWithOwner | LuaSurfaceCreateEntityParamsSpeechBubble | LuaSurfaceCreateEntityParamsStream | LuaSurfaceCreateEntityParamsTileGhost | LuaSurfaceCreateEntityParamsUndergroundBelt;
|
|
18430
|
+
type LuaSurfaceCreateEntityParams = BaseLuaSurfaceCreateEntityParams | LuaSurfaceCreateEntityParamsArtilleryFlare | LuaSurfaceCreateEntityParamsArtilleryProjectile | LuaSurfaceCreateEntityParamsAssemblingMachine | LuaSurfaceCreateEntityParamsBeam | LuaSurfaceCreateEntityParamsCharacterCorpse | LuaSurfaceCreateEntityParamsCliff | LuaSurfaceCreateEntityParamsContainer | LuaSurfaceCreateEntityParamsDisplayPanel | LuaSurfaceCreateEntityParamsElectricPole | LuaSurfaceCreateEntityParamsEntityGhost | LuaSurfaceCreateEntityParamsFire | LuaSurfaceCreateEntityParamsHighlightBox | LuaSurfaceCreateEntityParamsInserter | LuaSurfaceCreateEntityParamsItemEntity | LuaSurfaceCreateEntityParamsItemRequestProxy | LuaSurfaceCreateEntityParamsLamp | LuaSurfaceCreateEntityParamsLoader | LuaSurfaceCreateEntityParamsLoader1x1 | LuaSurfaceCreateEntityParamsLocomotive | LuaSurfaceCreateEntityParamsLogisticContainer | LuaSurfaceCreateEntityParamsParticle | LuaSurfaceCreateEntityParamsPlant | LuaSurfaceCreateEntityParamsProgrammableSpeaker | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsRailChainSignal | LuaSurfaceCreateEntityParamsRailSignal | LuaSurfaceCreateEntityParamsResource | LuaSurfaceCreateEntityParamsRollingStock | LuaSurfaceCreateEntityParamsSimpleEntityWithForce | LuaSurfaceCreateEntityParamsSimpleEntityWithOwner | LuaSurfaceCreateEntityParamsSpeechBubble | LuaSurfaceCreateEntityParamsStream | LuaSurfaceCreateEntityParamsTileGhost | LuaSurfaceCreateEntityParamsUndergroundBelt;
|
|
18330
18431
|
interface BaseLuaSurfaceCreateEntityParams {
|
|
18331
18432
|
/**
|
|
18332
18433
|
* Cause entity / force. The entity or force that triggered the chain of events that led to this entity being created. Used for beams, projectiles, stickers, etc. so that the damage receiver can know which entity or force to retaliate against.
|
|
@@ -18490,6 +18591,16 @@ interface LuaSurfaceCreateEntityParamsContainer extends BaseLuaSurfaceCreateEnti
|
|
|
18490
18591
|
*/
|
|
18491
18592
|
'bar'?: uint;
|
|
18492
18593
|
}
|
|
18594
|
+
/**
|
|
18595
|
+
*
|
|
18596
|
+
* Applies to variant case `display-panel`
|
|
18597
|
+
*/
|
|
18598
|
+
interface LuaSurfaceCreateEntityParamsDisplayPanel extends BaseLuaSurfaceCreateEntityParams {
|
|
18599
|
+
'always_show'?: boolean;
|
|
18600
|
+
'icon'?: SignalID;
|
|
18601
|
+
'show_in_chart'?: boolean;
|
|
18602
|
+
'text'?: LocalisedString;
|
|
18603
|
+
}
|
|
18493
18604
|
/**
|
|
18494
18605
|
*
|
|
18495
18606
|
* Applies to variant case `electric-pole`
|
|
@@ -18564,9 +18675,9 @@ interface LuaSurfaceCreateEntityParamsInserter extends BaseLuaSurfaceCreateEntit
|
|
|
18564
18675
|
*/
|
|
18565
18676
|
interface LuaSurfaceCreateEntityParamsItemEntity extends BaseLuaSurfaceCreateEntityParams {
|
|
18566
18677
|
/**
|
|
18567
|
-
* The stack of items to create.
|
|
18678
|
+
* The stack of items to create. Either the name of an item, which will create a full stack, or a detailed item stack definition.
|
|
18568
18679
|
*/
|
|
18569
|
-
'stack':
|
|
18680
|
+
'stack': string | ItemStackDefinition;
|
|
18570
18681
|
}
|
|
18571
18682
|
/**
|
|
18572
18683
|
*
|
|
@@ -19136,7 +19247,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
|
|
|
19136
19247
|
/**
|
|
19137
19248
|
* Items that when placed will produce this tile, if any. Construction bots will choose the first item in the list to build this tile.
|
|
19138
19249
|
*/
|
|
19139
|
-
readonly items_to_place_this?:
|
|
19250
|
+
readonly items_to_place_this?: ItemWithCount[];
|
|
19140
19251
|
readonly layer: uint;
|
|
19141
19252
|
readonly map_color: Color;
|
|
19142
19253
|
readonly max_health: float;
|
|
@@ -19170,7 +19281,6 @@ interface LuaTilePrototype extends LuaPrototypeBase {
|
|
|
19170
19281
|
* 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.
|
|
19171
19282
|
*/
|
|
19172
19283
|
readonly object_name: string;
|
|
19173
|
-
readonly placeable_by?: SimpleItemStack[];
|
|
19174
19284
|
readonly scorch_mark_color?: Color;
|
|
19175
19285
|
readonly thawed_variant?: LuaTilePrototype;
|
|
19176
19286
|
readonly trigger_effect?: TriggerEffectItem[];
|
|
@@ -19689,6 +19799,8 @@ interface LuaTurretControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
19689
19799
|
}
|
|
19690
19800
|
/**
|
|
19691
19801
|
* The undo queue for a player. The term `item_index` refers to the index of an undo item in the queue, while `action_index` refers to the index of one of the individual actions that make up an undo item.
|
|
19802
|
+
*
|
|
19803
|
+
* Items are added to the undo queue through player actions and Lua methods that emulate player actions like {@link LuaEntity::order_upgrade | runtime:LuaEntity::order_upgrade}.
|
|
19692
19804
|
*/
|
|
19693
19805
|
interface LuaUndoRedoStack {
|
|
19694
19806
|
/**
|
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.59
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -1093,6 +1093,10 @@ interface ConfigurationChangedData {
|
|
|
1093
1093
|
* `true` when mod prototype migrations have been applied since the last time this save was loaded.
|
|
1094
1094
|
*/
|
|
1095
1095
|
migration_applied: boolean;
|
|
1096
|
+
/**
|
|
1097
|
+
* Dictionary of prototype changes due to {@link migrations | runtime:migrations}. The inner dictionary maps the old prototype name to the new prototype name. The new name will be an empty string if the prototype was removed. Entries are omitted if the old and new prototype name are the same.
|
|
1098
|
+
*/
|
|
1099
|
+
migrations: LuaTable<IDType, Record<string, string>>;
|
|
1096
1100
|
}
|
|
1097
1101
|
interface CraftingQueueItem {
|
|
1098
1102
|
/**
|
|
@@ -2542,6 +2546,10 @@ interface HeatSetting {
|
|
|
2542
2546
|
*/
|
|
2543
2547
|
mode?: 'at-least' | 'at-most' | 'exactly' | 'add' | 'remove';
|
|
2544
2548
|
}
|
|
2549
|
+
/**
|
|
2550
|
+
* All base prototype types.
|
|
2551
|
+
*/
|
|
2552
|
+
type IDType = 'custom-input' | 'equipment-grid' | 'entity' | 'particle' | 'item' | 'collision-layer' | 'airborne-pollutant' | 'tile' | 'decorative' | 'recipe-category' | 'item-group' | 'item-subgroup' | 'recipe' | 'fluid' | 'ammo-category' | 'fuel-category' | 'resource-category' | 'technology' | 'noise-function' | 'noise-expression' | 'autoplace-control' | 'equipment' | 'damage-type' | 'virtual-signal' | 'achievement' | 'module-category' | 'equipment-category' | 'mod-setting' | 'trivial-smoke' | 'asteroid-chunk' | 'quality' | 'surface-property' | 'procession-layer-inheritance-group' | 'procession' | 'space-location' | 'space-connection' | 'active-trigger' | 'shortcut' | 'burner-usage' | 'surface' | 'mod-data' | 'custom-event';
|
|
2545
2553
|
/**
|
|
2546
2554
|
* A single filter used by an infinity-filters instance.
|
|
2547
2555
|
*/
|
|
@@ -2620,6 +2628,10 @@ interface IngredientFluid extends BaseIngredient {
|
|
|
2620
2628
|
* The minimum fluid temperature required.
|
|
2621
2629
|
*/
|
|
2622
2630
|
'minimum_temperature'?: float;
|
|
2631
|
+
/**
|
|
2632
|
+
* When minimum and maximum temperature are the same, this property will be present instead of the other two.
|
|
2633
|
+
*/
|
|
2634
|
+
'temperature'?: float;
|
|
2623
2635
|
}
|
|
2624
2636
|
interface InserterCircuitConditions {
|
|
2625
2637
|
circuit?: CircuitCondition;
|
|
@@ -2668,7 +2680,7 @@ interface InventoryPosition {
|
|
|
2668
2680
|
*/
|
|
2669
2681
|
count?: ItemCountType;
|
|
2670
2682
|
}
|
|
2671
|
-
interface
|
|
2683
|
+
interface InventoryWithCustomStackSizeSpecification {
|
|
2672
2684
|
stack_size_multiplier: double;
|
|
2673
2685
|
stack_size_min: ItemCountType;
|
|
2674
2686
|
stack_size_max: ItemCountType;
|
|
@@ -3132,14 +3144,45 @@ interface ItemStackDefinition {
|
|
|
3132
3144
|
spoil_percent?: double;
|
|
3133
3145
|
}
|
|
3134
3146
|
/**
|
|
3135
|
-
* An item may be specified in one of
|
|
3147
|
+
* An item may be specified in one of three ways.
|
|
3148
|
+
* @example ```
|
|
3149
|
+
-- All of these lines specify an item stack of one iron plate
|
|
3150
|
+
{name="iron-plate"}
|
|
3151
|
+
{name="iron-plate", count=1}
|
|
3152
|
+
{name="iron-plate", count=1, quality="normal"}
|
|
3153
|
+
```
|
|
3154
|
+
* @example ```
|
|
3155
|
+
-- This is a stack of 47 copper plates
|
|
3156
|
+
{name="copper-plate", count=47}
|
|
3157
|
+
```
|
|
3158
|
+
* @example ```
|
|
3159
|
+
--These are both full stacks of iron plates (for iron-plate, a full stack is 100 plates)
|
|
3160
|
+
"iron-plate"
|
|
3161
|
+
{name="iron-plate", count=100}
|
|
3162
|
+
```
|
|
3163
|
+
*/
|
|
3164
|
+
type ItemStackIdentification = /**
|
|
3165
|
+
* The name of the item, which represents a full stack of that item.
|
|
3166
|
+
*/
|
|
3167
|
+
string | /**
|
|
3168
|
+
* The detailed definition of an item stack.
|
|
3136
3169
|
*/
|
|
3137
|
-
|
|
3170
|
+
ItemStackDefinition | LuaItemStack;
|
|
3138
3171
|
type ItemStackIndex = uint16;
|
|
3139
3172
|
interface ItemStackLocation {
|
|
3140
3173
|
inventory: defines.inventory;
|
|
3141
3174
|
slot: uint;
|
|
3142
3175
|
}
|
|
3176
|
+
interface ItemWithCount {
|
|
3177
|
+
/**
|
|
3178
|
+
* Name of the item prototype.
|
|
3179
|
+
*/
|
|
3180
|
+
name: string;
|
|
3181
|
+
/**
|
|
3182
|
+
* The number of items.
|
|
3183
|
+
*/
|
|
3184
|
+
count: ItemCountType;
|
|
3185
|
+
}
|
|
3143
3186
|
interface ItemWithQualityCounts {
|
|
3144
3187
|
/**
|
|
3145
3188
|
* Name of the item prototype.
|
|
@@ -3148,7 +3191,7 @@ interface ItemWithQualityCounts {
|
|
|
3148
3191
|
/**
|
|
3149
3192
|
* The number of items.
|
|
3150
3193
|
*/
|
|
3151
|
-
count:
|
|
3194
|
+
count: ItemCountType;
|
|
3152
3195
|
/**
|
|
3153
3196
|
* Name of the item's quality prototype.
|
|
3154
3197
|
*/
|
|
@@ -3173,7 +3216,7 @@ ItemIDAndQualityIDPair;
|
|
|
3173
3216
|
/**
|
|
3174
3217
|
* The internal name of a game control (key binding).
|
|
3175
3218
|
*/
|
|
3176
|
-
type LinkedGameControl = 'move-up' | 'move-down' | 'move-left' | 'move-right' | 'open-character-gui' | 'open-gui' | 'confirm-gui' | 'toggle-free-cursor' | 'mine' | 'build' | 'build-ghost' | 'super-forced-build' | 'clear-cursor' | 'pipette' | 'rotate' | 'reverse-rotate' | 'flip-horizontal' | 'flip-vertical' | 'pick-items' | 'drop-cursor' | 'show-info' | 'shoot-enemy' | 'shoot-selected' | 'next-weapon' | 'toggle-driving' | 'zoom-in' | 'zoom-out' | 'use-item' | 'alternative-use-item' | 'toggle-console' | 'copy-entity-settings' | 'paste-entity-settings' | 'controller-gui-logistics-tab' | 'controller-gui-character-tab' | 'controller-gui-crafting-tab' | 'toggle-rail-layer' | 'select-for-blueprint' | 'select-for-cancel-deconstruct' | 'select-for-super-forced-deconstruct' | 'reverse-select' | 'alt-reverse-select' | 'deselect' | 'cycle-blueprint-forwards' | 'cycle-blueprint-backwards' | 'focus-search' | 'larger-terrain-building-area' | 'smaller-terrain-building-area' | 'remove-pole-cables' | 'build-with-obstacle-avoidance' | 'add-station' | 'add-temporary-station' | 'rename-all' | 'fast-wait-condition' | 'drag-map' | 'move-tag' | 'place-in-chat' | 'place-ping' | 'pin' | 'activate-tooltip' | 'next-surface' | 'previous-surface' | 'cycle-quality-up' | 'cycle-quality-down' | 'craft' | 'craft-5' | 'craft-all' | 'cancel-craft' | 'cancel-craft-5' | 'cancel-craft-all' | 'pick-item' | 'stack-transfer' | 'inventory-transfer' | 'fast-entity-transfer' | 'cursor-split' | 'stack-split' | 'inventory-split' | 'fast-entity-split' | 'toggle-filter' | 'open-item' | 'copy-inventory-filter' | 'paste-inventory-filter' | 'show-quick-panel' | 'next-quick-panel-page' | 'previous-quick-panel-page' | 'next-quick-panel-tab' | 'previous-quick-panel-tab' | 'rotate-active-quick-bars' | 'next-active-quick-bar' | 'previous-active-quick-bar' | 'quick-bar-button-1' | 'quick-bar-button-2' | 'quick-bar-button-3' | 'quick-bar-button-4' | 'quick-bar-button-5' | 'quick-bar-button-6' | 'quick-bar-button-7' | 'quick-bar-button-8' | 'quick-bar-button-9' | 'quick-bar-button-10' | 'quick-bar-button-1-secondary' | 'quick-bar-button-2-secondary' | 'quick-bar-button-3-secondary' | 'quick-bar-button-4-secondary' | 'quick-bar-button-5-secondary' | 'quick-bar-button-6-secondary' | 'quick-bar-button-7-secondary' | 'quick-bar-button-8-secondary' | 'quick-bar-button-9-secondary' | 'quick-bar-button-10-secondary' | 'action-bar-select-page-1' | 'action-bar-select-page-2' | 'action-bar-select-page-3' | 'action-bar-select-page-4' | 'action-bar-select-page-5' | 'action-bar-select-page-6' | 'action-bar-select-page-7' | 'action-bar-select-page-8' | 'action-bar-select-page-9' | 'action-bar-select-page-10' | 'copy' | 'cut' | 'paste' | 'cycle-clipboard-forwards' | 'cycle-clipboard-backwards' | 'undo' | 'redo' | 'toggle-menu' | 'toggle-map' | 'close-menu' | 'open-technology-gui' | 'production-statistics' | 'logistic-networks' | 'toggle-blueprint-library' | 'open-trains-gui' | 'open-factoriopedia' | 'back' | 'forward' | 'pause-game' | 'confirm-message' | 'previous-
|
|
3219
|
+
type LinkedGameControl = 'move-up' | 'move-down' | 'move-left' | 'move-right' | 'alternative-gui-move-up' | 'alternative-gui-move-down' | 'alternative-gui-move-left' | 'alternative-gui-move-right' | 'open-character-gui' | 'open-gui' | 'confirm-gui' | 'toggle-free-cursor' | 'mine' | 'build' | 'build-ghost' | 'super-forced-build' | 'clear-cursor' | 'pipette' | 'rotate' | 'reverse-rotate' | 'flip-horizontal' | 'flip-vertical' | 'pick-items' | 'drop-cursor' | 'show-info' | 'shoot-enemy' | 'shoot-selected' | 'next-weapon' | 'toggle-driving' | 'zoom-in' | 'zoom-out' | 'use-item' | 'alternative-use-item' | 'toggle-console' | 'copy-entity-settings' | 'paste-entity-settings' | 'controller-gui-logistics-tab' | 'controller-gui-character-tab' | 'controller-gui-crafting-tab' | 'toggle-rail-layer' | 'select-for-blueprint' | 'select-for-cancel-deconstruct' | 'select-for-super-forced-deconstruct' | 'reverse-select' | 'alt-reverse-select' | 'deselect' | 'cycle-blueprint-forwards' | 'cycle-blueprint-backwards' | 'focus-search' | 'larger-terrain-building-area' | 'smaller-terrain-building-area' | 'remove-pole-cables' | 'build-with-obstacle-avoidance' | 'add-station' | 'add-temporary-station' | 'rename-all' | 'fast-wait-condition' | 'drag-map' | 'move-tag' | 'place-in-chat' | 'place-ping' | 'pin' | 'activate-tooltip' | 'next-surface' | 'previous-surface' | 'cycle-quality-up' | 'cycle-quality-down' | 'scroll-tooltip-up' | 'scroll-tooltip-down' | 'craft' | 'craft-5' | 'craft-all' | 'cancel-craft' | 'cancel-craft-5' | 'cancel-craft-all' | 'pick-item' | 'stack-transfer' | 'inventory-transfer' | 'fast-entity-transfer' | 'cursor-split' | 'stack-split' | 'inventory-split' | 'fast-entity-split' | 'toggle-filter' | 'open-item' | 'copy-inventory-filter' | 'paste-inventory-filter' | 'show-quick-panel' | 'next-quick-panel-page' | 'previous-quick-panel-page' | 'next-quick-panel-tab' | 'previous-quick-panel-tab' | 'rotate-active-quick-bars' | 'next-active-quick-bar' | 'previous-active-quick-bar' | 'quick-bar-button-1' | 'quick-bar-button-2' | 'quick-bar-button-3' | 'quick-bar-button-4' | 'quick-bar-button-5' | 'quick-bar-button-6' | 'quick-bar-button-7' | 'quick-bar-button-8' | 'quick-bar-button-9' | 'quick-bar-button-10' | 'quick-bar-button-1-secondary' | 'quick-bar-button-2-secondary' | 'quick-bar-button-3-secondary' | 'quick-bar-button-4-secondary' | 'quick-bar-button-5-secondary' | 'quick-bar-button-6-secondary' | 'quick-bar-button-7-secondary' | 'quick-bar-button-8-secondary' | 'quick-bar-button-9-secondary' | 'quick-bar-button-10-secondary' | 'action-bar-select-page-1' | 'action-bar-select-page-2' | 'action-bar-select-page-3' | 'action-bar-select-page-4' | 'action-bar-select-page-5' | 'action-bar-select-page-6' | 'action-bar-select-page-7' | 'action-bar-select-page-8' | 'action-bar-select-page-9' | 'action-bar-select-page-10' | 'copy' | 'cut' | 'paste' | 'cycle-clipboard-forwards' | 'cycle-clipboard-backwards' | 'undo' | 'redo' | 'toggle-menu' | 'toggle-map' | 'close-menu' | 'open-technology-gui' | 'production-statistics' | 'logistic-networks' | 'toggle-blueprint-library' | 'open-trains-gui' | 'open-factoriopedia' | 'back' | 'forward' | 'pause-game' | 'confirm-message' | 'previous-mod' | 'connect-train' | 'disconnect-train' | 'submit-feedback' | 'editor-next-variation' | 'editor-previous-variation' | 'editor-clone-item' | 'editor-delete-item' | 'editor-toggle-pause' | 'editor-tick-once' | 'editor-speed-up' | 'editor-speed-down' | 'editor-reset-speed' | 'editor-set-clone-brush-source' | 'editor-set-clone-brush-destination' | 'editor-switch-to-surface' | 'editor-remove-scripting-object' | 'debug-toggle-atlas-gui' | 'debug-toggle-gui-visibility' | 'debug-toggle-debug-settings' | 'debug-toggle-basic' | 'debug-reset-zoom' | 'debug-reset-zoom-2x' | 'toggle-gui-debug' | 'toggle-gui-style-view' | 'toggle-gui-shadows' | 'toggle-gui-glows' | 'open-prototypes-gui' | 'open-prototype-explorer-gui' | 'increase-ui-scale' | 'decrease-ui-scale' | 'reset-ui-scale' | 'slash-editor' | 'toggle-entity' | 'next-player-in-replay' | 'move-blueprint-absolute-grid-up' | 'move-blueprint-absolute-grid-down' | 'move-blueprint-absolute-grid-left' | 'move-blueprint-absolute-grid-right' | 'move-blueprint-entities-up' | 'move-blueprint-entities-down' | 'move-blueprint-entities-left' | 'move-blueprint-entities-right' | 'play-next-track' | 'play-previous-track' | 'pause-resume-music' | /**
|
|
3177
3220
|
* Indicates no linked game control.
|
|
3178
3221
|
*/
|
|
3179
3222
|
'';
|
|
@@ -5330,6 +5373,10 @@ float | /**
|
|
|
5330
5373
|
* equivalent to `2`.
|
|
5331
5374
|
*/
|
|
5332
5375
|
'very-good';
|
|
5376
|
+
interface MapLocation {
|
|
5377
|
+
position: MapLocation;
|
|
5378
|
+
direction: defines.direction;
|
|
5379
|
+
}
|
|
5333
5380
|
/**
|
|
5334
5381
|
* Coordinates on a surface, for example of an entity. MapPositions may be specified either as a dictionary with `x`, `y` as keys, or simply as an array with two elements.
|
|
5335
5382
|
*
|
|
@@ -5574,6 +5621,16 @@ interface ModuleEffects {
|
|
|
5574
5621
|
* To write to this, use an array{@link [string | runtime:string}] of the mouse buttons that should be possible to use with on button. The flag `"left-and-right"` can also be set, which will set `"left"` and `"right"` to `true`.
|
|
5575
5622
|
*/
|
|
5576
5623
|
type MouseButtonFlags = Record<'left' | 'right' | 'middle' | 'button-4' | 'button-5' | 'button-6' | 'button-7' | 'button-8' | 'button-9', true>;
|
|
5624
|
+
interface NeighbourConnectable {
|
|
5625
|
+
affected_by_direction: boolean;
|
|
5626
|
+
neighbour_search_distance: float;
|
|
5627
|
+
connections: NeighbourConnectableConnectionDefinition[];
|
|
5628
|
+
}
|
|
5629
|
+
interface NeighbourConnectableConnectionDefinition {
|
|
5630
|
+
location: MapLocation;
|
|
5631
|
+
category: string;
|
|
5632
|
+
neighbour_category: string[];
|
|
5633
|
+
}
|
|
5577
5634
|
/**
|
|
5578
5635
|
* The string representation of a noise expression. More detailed information is found on the {@link prototype docs | prototype:NamedNoiseExpression}.
|
|
5579
5636
|
*/
|
|
@@ -5835,6 +5892,7 @@ interface PipeConnectionDefinition {
|
|
|
5835
5892
|
*/
|
|
5836
5893
|
linked_connection_id?: uint;
|
|
5837
5894
|
}
|
|
5895
|
+
type PipetteID = LuaEntityPrototype | LuaEquipmentPrototype | LuaFluidPrototype | LuaItemPrototype | LuaRecipePrototype | LuaSpaceLocationPrototype | LuaTilePrototype | LuaVirtualSignalPrototype;
|
|
5838
5896
|
interface PlaceAsTileResult {
|
|
5839
5897
|
/**
|
|
5840
5898
|
* The tile prototype.
|
|
@@ -6819,7 +6877,7 @@ interface SelectedPrototypeData {
|
|
|
6819
6877
|
/**
|
|
6820
6878
|
* E.g. `"entity"`.
|
|
6821
6879
|
*/
|
|
6822
|
-
base_type:
|
|
6880
|
+
base_type: IDType;
|
|
6823
6881
|
/**
|
|
6824
6882
|
* The `type` of the prototype. E.g. `"tree"`.
|
|
6825
6883
|
*/
|
|
@@ -7057,31 +7115,6 @@ interface SignalIDBase {
|
|
|
7057
7115
|
name?: string;
|
|
7058
7116
|
}
|
|
7059
7117
|
type SignalIDType = 'item' | 'fluid' | 'virtual' | 'entity' | 'recipe' | 'space-location' | 'asteroid-chunk' | 'quality';
|
|
7060
|
-
/**
|
|
7061
|
-
* An item stack may be specified in one of two ways.
|
|
7062
|
-
* @example ```
|
|
7063
|
-
-- All of these lines specify an item stack of one iron plate
|
|
7064
|
-
{name="iron-plate"}
|
|
7065
|
-
{name="iron-plate", count=1}
|
|
7066
|
-
{name="iron-plate", count=1, quality="normal"}
|
|
7067
|
-
```
|
|
7068
|
-
* @example ```
|
|
7069
|
-
-- This is a stack of 47 copper plates
|
|
7070
|
-
{name="copper-plate", count=47}
|
|
7071
|
-
```
|
|
7072
|
-
* @example ```
|
|
7073
|
-
--These are both full stacks of iron plates (for iron-plate, a full stack is 100 plates)
|
|
7074
|
-
"iron-plate"
|
|
7075
|
-
{name="iron-plate", count=100}
|
|
7076
|
-
```
|
|
7077
|
-
*/
|
|
7078
|
-
type SimpleItemStack = /**
|
|
7079
|
-
* The name of the item, which represents a full stack of that item.
|
|
7080
|
-
*/
|
|
7081
|
-
string | /**
|
|
7082
|
-
* The detailed definition of an item stack.
|
|
7083
|
-
*/
|
|
7084
|
-
ItemStackDefinition;
|
|
7085
7118
|
type SimulationWidgetType = 'signal-id' | 'signal-id-base' | 'signal-or-number' | 'simple-slot' | 'simple-item-slot' | 'recipe-slot' | 'quickbar-slot' | 'logistics-button' | 'logistics-button-space' | 'text-button-localised-substring' | 'text-button' | 'text-button-substring' | 'inventory-limit-slot-button' | 'train-schedule-action-button' | 'choose-button' | 'textfield' | 'item-group-tab' | 'drop-down' | 'check-box' | 'switch' | 'label';
|
|
7086
7119
|
interface SmokeSource {
|
|
7087
7120
|
name: string;
|
|
@@ -7106,7 +7139,7 @@ interface SmokeSource {
|
|
|
7106
7139
|
vertical_speed_slowdown: float;
|
|
7107
7140
|
}
|
|
7108
7141
|
/**
|
|
7109
|
-
* It can be either the name of a {@link SoundPrototype | prototype:SoundPrototype} defined in the data stage, or a path in the form `"type/name"`. The latter option can be sorted into
|
|
7142
|
+
* It can be either the name of a {@link SoundPrototype | prototype:SoundPrototype} defined in the data stage, or a path in the form `"type/name"`. The latter option can be sorted into four categories.
|
|
7110
7143
|
*
|
|
7111
7144
|
* The validity of a SoundPath can be verified at runtime using {@link LuaHelpers::is_valid_sound_path | runtime:LuaHelpers::is_valid_sound_path}.
|
|
7112
7145
|
* The utility and ambient types each contain general use sound prototypes defined by the game itself.
|
|
@@ -7122,12 +7155,19 @@ interface SmokeSource {
|
|
|
7122
7155
|
* - `"tile-build-large"` - Uses {@link TilePrototype::build_sound | prototype:TilePrototype::build_sound}
|
|
7123
7156
|
* The following types can be combined with any entity name as long as its prototype defines the corresponding sound.
|
|
7124
7157
|
*
|
|
7125
|
-
* - `"entity-build"` - Uses {@link
|
|
7126
|
-
* - `"entity-mined"` - Uses {@link
|
|
7127
|
-
* - `"entity-mining"` - Uses {@link
|
|
7158
|
+
* - `"entity-build"` - Uses {@link EntityPrototype::build_sound | prototype:EntityPrototype::build_sound}. Example: `"entity-build/wooden-chest"`
|
|
7159
|
+
* - `"entity-mined"` - Uses {@link EntityPrototype::mined_sound | prototype:EntityPrototype::mined_sound}
|
|
7160
|
+
* - `"entity-mining"` - Uses {@link EntityPrototype::mining_sound | prototype:EntityPrototype::mining_sound}
|
|
7128
7161
|
* - `"entity-rotated"` - Uses {@link EntityPrototype::rotated_sound | prototype:EntityPrototype::rotated_sound}
|
|
7129
|
-
* - `"entity-open"` - Uses {@link
|
|
7130
|
-
* - `"entity-close"` - Uses {@link
|
|
7162
|
+
* - `"entity-open"` - Uses {@link EntityPrototype::open_sound | prototype:EntityPrototype::open_sound}
|
|
7163
|
+
* - `"entity-close"` - Uses {@link EntityPrototype::close_sound | prototype:EntityPrototype::close_sound}
|
|
7164
|
+
* The following types can be combined with any item name as long as its prototype defines the corresponding sound.
|
|
7165
|
+
*
|
|
7166
|
+
* - `"item-open"` - Uses {@link ItemPrototype::open_sound | prototype:ItemPrototype::open_sound}. Example: `"item-open/modular-armor"`
|
|
7167
|
+
* - `"item-close"` - Uses {@link ItemPrototype::close_sound | prototype:ItemPrototype::close_sound}
|
|
7168
|
+
* - `"item-pick"` - Uses {@link ItemPrototype::pick_sound | prototype:ItemPrototype::pick_sound}. Example: `"item-pick/transport-belt"`
|
|
7169
|
+
* - `"item-drop"` - Uses {@link ItemPrototype::drop_sound | prototype:ItemPrototype::drop_sound}
|
|
7170
|
+
* - `"item-move"` - Uses {@link ItemPrototype::inventory_move_sound | prototype:ItemPrototype::inventory_move_sound}
|
|
7131
7171
|
*/
|
|
7132
7172
|
type SoundPath = string;
|
|
7133
7173
|
/**
|
|
@@ -8390,7 +8430,7 @@ interface WorkerRobotOrder {
|
|
|
8390
8430
|
/**
|
|
8391
8431
|
* The item to place if relevant.
|
|
8392
8432
|
*/
|
|
8393
|
-
item_to_place?:
|
|
8433
|
+
item_to_place?: ItemWithQualityCounts;
|
|
8394
8434
|
/**
|
|
8395
8435
|
* The secondary target of the upgrade order.
|
|
8396
8436
|
*/
|
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.59
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -457,6 +457,9 @@ interface dataCollection {
|
|
|
457
457
|
'mining-drill': {
|
|
458
458
|
[key: string]: MiningDrillPrototype;
|
|
459
459
|
};
|
|
460
|
+
'mod-data': {
|
|
461
|
+
[key: string]: ModData;
|
|
462
|
+
};
|
|
460
463
|
'module-category': {
|
|
461
464
|
[key: string]: ModuleCategory;
|
|
462
465
|
};
|
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.59
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -880,17 +880,18 @@ enum events {
|
|
|
880
880
|
on_train_schedule_changed = 191,
|
|
881
881
|
on_trigger_created_entity = 192,
|
|
882
882
|
on_trigger_fired_artillery = 193,
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
883
|
+
on_udp_packet_received = 194,
|
|
884
|
+
on_undo_applied = 195,
|
|
885
|
+
on_unit_added_to_group = 196,
|
|
886
|
+
on_unit_group_created = 197,
|
|
887
|
+
on_unit_group_finished_gathering = 198,
|
|
888
|
+
on_unit_removed_from_group = 199,
|
|
889
|
+
on_worker_robot_expired = 200,
|
|
890
|
+
script_raised_built = 201,
|
|
891
|
+
script_raised_destroy = 202,
|
|
892
|
+
script_raised_revive = 203,
|
|
893
|
+
script_raised_set_tiles = 204,
|
|
894
|
+
script_raised_teleported = 205
|
|
894
895
|
}
|
|
895
896
|
enum flow_precision_index {
|
|
896
897
|
fifty_hours = 5,
|
|
@@ -1777,6 +1778,12 @@ namespace prototypes {
|
|
|
1777
1778
|
enum map_settings {
|
|
1778
1779
|
'map-settings' = 0
|
|
1779
1780
|
}
|
|
1781
|
+
/**
|
|
1782
|
+
* @customName mod-data
|
|
1783
|
+
*/
|
|
1784
|
+
enum mod_data {
|
|
1785
|
+
'mod-data' = 0
|
|
1786
|
+
}
|
|
1780
1787
|
/**
|
|
1781
1788
|
* @customName module-category
|
|
1782
1789
|
*/
|
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.59
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -1626,7 +1626,7 @@ interface on_permission_string_imported {
|
|
|
1626
1626
|
* Called when a player picks up an item.
|
|
1627
1627
|
*/
|
|
1628
1628
|
interface on_picked_up_item {
|
|
1629
|
-
item_stack:
|
|
1629
|
+
item_stack: ItemWithCount;
|
|
1630
1630
|
/**
|
|
1631
1631
|
* Identifier of the event
|
|
1632
1632
|
*/
|
|
@@ -2470,7 +2470,7 @@ interface on_player_mined_item {
|
|
|
2470
2470
|
/**
|
|
2471
2471
|
* The item given to the player
|
|
2472
2472
|
*/
|
|
2473
|
-
item_stack:
|
|
2473
|
+
item_stack: ItemWithQualityCounts;
|
|
2474
2474
|
/**
|
|
2475
2475
|
* Identifier of the event
|
|
2476
2476
|
*/
|
|
@@ -3658,7 +3658,7 @@ interface on_robot_mined {
|
|
|
3658
3658
|
/**
|
|
3659
3659
|
* The entity the robot just picked up.
|
|
3660
3660
|
*/
|
|
3661
|
-
item_stack:
|
|
3661
|
+
item_stack: ItemWithCount;
|
|
3662
3662
|
/**
|
|
3663
3663
|
* Identifier of the event
|
|
3664
3664
|
*/
|
|
@@ -4086,7 +4086,7 @@ interface on_space_platform_mined_item {
|
|
|
4086
4086
|
/**
|
|
4087
4087
|
* The entity the platform just picked up.
|
|
4088
4088
|
*/
|
|
4089
|
-
item_stack:
|
|
4089
|
+
item_stack: ItemWithCount;
|
|
4090
4090
|
/**
|
|
4091
4091
|
* Identifier of the event
|
|
4092
4092
|
*/
|
|
@@ -4386,6 +4386,31 @@ interface on_trigger_fired_artillery {
|
|
|
4386
4386
|
*/
|
|
4387
4387
|
tick: uint;
|
|
4388
4388
|
}
|
|
4389
|
+
/**
|
|
4390
|
+
* Called when new packets are processed by {@link LuaHelpers::recv_udp | runtime:LuaHelpers::recv_udp}.
|
|
4391
|
+
*/
|
|
4392
|
+
interface on_udp_packet_received {
|
|
4393
|
+
/**
|
|
4394
|
+
* Identifier of the event
|
|
4395
|
+
*/
|
|
4396
|
+
name: defines.events;
|
|
4397
|
+
/**
|
|
4398
|
+
* The packet data
|
|
4399
|
+
*/
|
|
4400
|
+
payload: string;
|
|
4401
|
+
/**
|
|
4402
|
+
* The player index whose instance received this packet, or 0 if received on the server
|
|
4403
|
+
*/
|
|
4404
|
+
player_index: uint;
|
|
4405
|
+
/**
|
|
4406
|
+
* The source port the packet was received from
|
|
4407
|
+
*/
|
|
4408
|
+
source_port: uint16;
|
|
4409
|
+
/**
|
|
4410
|
+
* Tick the event was generated.
|
|
4411
|
+
*/
|
|
4412
|
+
tick: uint;
|
|
4413
|
+
}
|
|
4389
4414
|
/**
|
|
4390
4415
|
* Called when the player triggers "undo".
|
|
4391
4416
|
*/
|
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.59
|
|
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.59
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -106,7 +106,7 @@ interface AchievementPrototype extends Prototype {
|
|
|
106
106
|
/**
|
|
107
107
|
* Path to the icon file.
|
|
108
108
|
*
|
|
109
|
-
*
|
|
109
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
110
110
|
*/
|
|
111
111
|
icon?: FileName;
|
|
112
112
|
/**
|
|
@@ -893,7 +893,7 @@ interface AsteroidChunkPrototype extends Prototype {
|
|
|
893
893
|
/**
|
|
894
894
|
* Path to the icon file.
|
|
895
895
|
*
|
|
896
|
-
*
|
|
896
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
897
897
|
*/
|
|
898
898
|
icon?: FileName;
|
|
899
899
|
/**
|
|
@@ -1840,7 +1840,7 @@ interface ContainerPrototype extends EntityWithOwnerPrototype {
|
|
|
1840
1840
|
/**
|
|
1841
1841
|
* Only used when `inventory_type` is `"with_custom_stack_size"`.
|
|
1842
1842
|
*/
|
|
1843
|
-
inventory_properties?:
|
|
1843
|
+
inventory_properties?: InventoryWithCustomStackSizeSpecification;
|
|
1844
1844
|
/**
|
|
1845
1845
|
* The number of slots in this container.
|
|
1846
1846
|
*/
|
|
@@ -1974,6 +1974,12 @@ interface CraftingMachinePrototype extends EntityWithOwnerPrototype {
|
|
|
1974
1974
|
* Crafting speed has to be positive.
|
|
1975
1975
|
*/
|
|
1976
1976
|
crafting_speed: double;
|
|
1977
|
+
/**
|
|
1978
|
+
* Each value must be >= 0.01.
|
|
1979
|
+
*
|
|
1980
|
+
* If value is not provided for a quality, then {@link QualityPrototype::crafting_machine_speed_multiplier | prototype:QualityPrototype::crafting_machine_speed_multiplier} will be used as a speed multiplier instead.
|
|
1981
|
+
*/
|
|
1982
|
+
crafting_speed_quality_multiplier?: LuaTable<QualityID, double>;
|
|
1977
1983
|
/**
|
|
1978
1984
|
* Whether the "alt-mode icon" should have a black background.
|
|
1979
1985
|
*/
|
|
@@ -1992,6 +1998,14 @@ interface CraftingMachinePrototype extends EntityWithOwnerPrototype {
|
|
|
1992
1998
|
```
|
|
1993
1999
|
*/
|
|
1994
2000
|
energy_usage: Energy;
|
|
2001
|
+
/**
|
|
2002
|
+
* Each value must be >= 0.01.
|
|
2003
|
+
*
|
|
2004
|
+
* If value is not provided for a quality, then {@link QualityPrototype::crafting_machine_energy_usage_multiplier | prototype:QualityPrototype::crafting_machine_energy_usage_multiplier} will be used as an energy usage multiplier instead.
|
|
2005
|
+
*
|
|
2006
|
+
* Does nothing if {@link CraftingMachinePrototype::quality_affects_energy_usage | prototype:CraftingMachinePrototype::quality_affects_energy_usage} is not set.
|
|
2007
|
+
*/
|
|
2008
|
+
energy_usage_quality_multiplier?: LuaTable<QualityID, double>;
|
|
1995
2009
|
fast_transfer_modules_into_module_slots_only?: boolean;
|
|
1996
2010
|
/**
|
|
1997
2011
|
* The crafting machine's fluid boxes. If an assembling machine has fluid boxes *and* {@link AssemblingMachinePrototype::fluid_boxes_off_when_no_fluid_recipe | prototype:AssemblingMachinePrototype::fluid_boxes_off_when_no_fluid_recipe} is true, the assembling machine can only be rotated when a recipe consuming or producing fluid is set, or if it has one of the other properties listed at the top of this page.
|
|
@@ -2030,6 +2044,12 @@ interface CraftingMachinePrototype extends EntityWithOwnerPrototype {
|
|
|
2030
2044
|
* The number of module slots in this machine.
|
|
2031
2045
|
*/
|
|
2032
2046
|
module_slots?: ItemStackIndex;
|
|
2047
|
+
/**
|
|
2048
|
+
* If value is not provided for a quality, then {@link QualityPrototype::crafting_machine_module_slots_bonus | prototype:QualityPrototype::crafting_machine_module_slots_bonus} will be used as a module slots bonus instead.
|
|
2049
|
+
*
|
|
2050
|
+
* Does nothing if {@link CraftingMachinePrototype::quality_affects_module_slots | prototype:CraftingMachinePrototype::quality_affects_module_slots} is not set.
|
|
2051
|
+
*/
|
|
2052
|
+
module_slots_quality_bonus?: LuaTable<QualityID, ItemStackIndex>;
|
|
2033
2053
|
/**
|
|
2034
2054
|
* Affects animation speed.
|
|
2035
2055
|
*/
|
|
@@ -3154,6 +3174,9 @@ interface EntityPrototype extends Prototype {
|
|
|
3154
3174
|
fast_replaceable_group?: string;
|
|
3155
3175
|
flags?: EntityPrototypeFlags;
|
|
3156
3176
|
friendly_map_color?: Color;
|
|
3177
|
+
/**
|
|
3178
|
+
* This entity can freeze if heating_energy is larger than zero.
|
|
3179
|
+
*/
|
|
3157
3180
|
heating_energy?: Energy;
|
|
3158
3181
|
/**
|
|
3159
3182
|
* Where beams should hit the entity. Useful if the bounding box only covers part of the entity (e.g. feet of the character) and beams only hitting there would look weird.
|
|
@@ -3788,7 +3811,7 @@ interface FluidPrototype extends Prototype {
|
|
|
3788
3811
|
/**
|
|
3789
3812
|
* Path to the icon file.
|
|
3790
3813
|
*
|
|
3791
|
-
*
|
|
3814
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
3792
3815
|
*/
|
|
3793
3816
|
icon?: FileName;
|
|
3794
3817
|
/**
|
|
@@ -4517,6 +4540,10 @@ interface InserterPrototype extends EntityWithOwnerPrototype {
|
|
|
4517
4540
|
* Whether the inserter should be able to fish {@link fish | https://wiki.factorio.com/Raw_fish}.
|
|
4518
4541
|
*/
|
|
4519
4542
|
use_easter_egg?: boolean;
|
|
4543
|
+
/**
|
|
4544
|
+
* When set to false, then relevant value of inserter stack size bonus ({@link LuaForce::inserter_stack_size_bonus | runtime:LuaForce::inserter_stack_size_bonus} or {@link LuaForce::bulk_inserter_capacity_bonus | runtime:LuaForce::bulk_inserter_capacity_bonus}) will not affect inserter stack size.
|
|
4545
|
+
*/
|
|
4546
|
+
uses_inserter_stack_size_bonus?: boolean;
|
|
4520
4547
|
/**
|
|
4521
4548
|
* Inserter will wait until its hand is full.
|
|
4522
4549
|
*/
|
|
@@ -4572,7 +4599,7 @@ interface ItemGroup extends Prototype {
|
|
|
4572
4599
|
/**
|
|
4573
4600
|
* Path to the icon that is shown to represent this item group.
|
|
4574
4601
|
*
|
|
4575
|
-
*
|
|
4602
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
4576
4603
|
*/
|
|
4577
4604
|
icon?: FileName;
|
|
4578
4605
|
/**
|
|
@@ -4686,7 +4713,7 @@ interface ItemPrototype extends Prototype {
|
|
|
4686
4713
|
/**
|
|
4687
4714
|
* Path to the icon file.
|
|
4688
4715
|
*
|
|
4689
|
-
*
|
|
4716
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
4690
4717
|
*/
|
|
4691
4718
|
icon?: FileName;
|
|
4692
4719
|
/**
|
|
@@ -5262,7 +5289,7 @@ interface LinkedContainerPrototype extends EntityWithOwnerPrototype {
|
|
|
5262
5289
|
/**
|
|
5263
5290
|
* Only used when `inventory_type` is `"with_custom_stack_size"`.
|
|
5264
5291
|
*/
|
|
5265
|
-
inventory_properties?:
|
|
5292
|
+
inventory_properties?: InventoryWithCustomStackSizeSpecification;
|
|
5266
5293
|
/**
|
|
5267
5294
|
* Must be > 0.
|
|
5268
5295
|
*/
|
|
@@ -5632,6 +5659,19 @@ interface MiningDrillPrototype extends EntityWithOwnerPrototype {
|
|
|
5632
5659
|
vector_to_place_result: Vector;
|
|
5633
5660
|
wet_mining_graphics_set?: MiningDrillGraphicsSet;
|
|
5634
5661
|
}
|
|
5662
|
+
/**
|
|
5663
|
+
* Block of arbitrary data set by mods in data stage.
|
|
5664
|
+
*/
|
|
5665
|
+
interface ModData extends Prototype {
|
|
5666
|
+
data: Record<string, AnyBasic>;
|
|
5667
|
+
/**
|
|
5668
|
+
* Arbitrary string that mods can use to declare type of data. Can be used for mod compatibility when one mod declares block of data that is expected to be discovered by another mod.
|
|
5669
|
+
* @example ```
|
|
5670
|
+
data_type = "my-mod.my_structure"
|
|
5671
|
+
```
|
|
5672
|
+
*/
|
|
5673
|
+
data_type?: string;
|
|
5674
|
+
}
|
|
5635
5675
|
/**
|
|
5636
5676
|
* A module category. The built-in categories can be found {@link here | https://wiki.factorio.com/Data.raw#module-category}. See {@link ModulePrototype::category | prototype:ModulePrototype::category}.
|
|
5637
5677
|
*/
|
|
@@ -6225,6 +6265,10 @@ interface ProjectilePrototype extends EntityPrototype {
|
|
|
6225
6265
|
turning_speed_increases_exponentially_with_projectile_speed?: boolean;
|
|
6226
6266
|
}
|
|
6227
6267
|
interface Prototype extends PrototypeBase {
|
|
6268
|
+
/**
|
|
6269
|
+
* Allows to add extra description items to the tooltip and factoriopedia.
|
|
6270
|
+
*/
|
|
6271
|
+
custom_tooltip_fields?: CustomTooltipField[];
|
|
6228
6272
|
/**
|
|
6229
6273
|
* The ID type corresponding to the prototype that inherits from this.
|
|
6230
6274
|
*
|
|
@@ -6341,6 +6385,9 @@ interface PumpPrototype extends EntityWithOwnerPrototype {
|
|
|
6341
6385
|
*/
|
|
6342
6386
|
pumping_speed: FluidAmount;
|
|
6343
6387
|
}
|
|
6388
|
+
/**
|
|
6389
|
+
* One quality step. Its effects are specified by the level and the various multiplier and bonus properties. Properties ending in `_multiplier` are applied multiplicatively to their base property, properties ending in `_bonus` are applied additively.
|
|
6390
|
+
*/
|
|
6344
6391
|
interface QualityPrototype extends Prototype {
|
|
6345
6392
|
/**
|
|
6346
6393
|
* Must be >= 0.01.
|
|
@@ -6368,17 +6415,23 @@ interface QualityPrototype extends Prototype {
|
|
|
6368
6415
|
beacon_supply_area_distance_bonus?: float;
|
|
6369
6416
|
color: Color;
|
|
6370
6417
|
/**
|
|
6418
|
+
* Must be >= 0.01.
|
|
6419
|
+
*
|
|
6371
6420
|
* Only affects crafting machines with {@link CraftingMachinePrototype::quality_affects_energy_usage | prototype:CraftingMachinePrototype::quality_affects_energy_usage} set.
|
|
6372
6421
|
*
|
|
6373
|
-
*
|
|
6422
|
+
* Will be ignored by crafting machines with {@link CraftingMachinePrototype::energy_usage_quality_multiplier | prototype:CraftingMachinePrototype::energy_usage_quality_multiplier} set.
|
|
6374
6423
|
*/
|
|
6375
6424
|
crafting_machine_energy_usage_multiplier?: double;
|
|
6376
6425
|
/**
|
|
6377
6426
|
* Only affects crafting machines with {@link CraftingMachinePrototype::quality_affects_module_slots | prototype:CraftingMachinePrototype::quality_affects_module_slots} set.
|
|
6427
|
+
*
|
|
6428
|
+
* Will be ignored by crafting machines with {@link CraftingMachinePrototype::module_slots_quality_bonus | prototype:CraftingMachinePrototype::module_slots_quality_bonus} set.
|
|
6378
6429
|
*/
|
|
6379
6430
|
crafting_machine_module_slots_bonus?: ItemStackIndex;
|
|
6380
6431
|
/**
|
|
6381
6432
|
* Must be >= 0.01.
|
|
6433
|
+
*
|
|
6434
|
+
* Will be ignored by crafting machines with {@link CraftingMachinePrototype::crafting_speed_quality_multiplier | prototype:CraftingMachinePrototype::crafting_speed_quality_multiplier} set.
|
|
6382
6435
|
*/
|
|
6383
6436
|
crafting_machine_speed_multiplier?: double;
|
|
6384
6437
|
/**
|
|
@@ -6397,9 +6450,9 @@ interface QualityPrototype extends Prototype {
|
|
|
6397
6450
|
equipment_grid_height_bonus?: int16;
|
|
6398
6451
|
equipment_grid_width_bonus?: int16;
|
|
6399
6452
|
/**
|
|
6400
|
-
* Only affects fluid wagons with {@link FluidWagonPrototype::quality_affects_capacity | prototype:FluidWagonPrototype::quality_affects_capacity} set.
|
|
6401
|
-
*
|
|
6402
6453
|
* Must be >= 0.01.
|
|
6454
|
+
*
|
|
6455
|
+
* Only affects fluid wagons with {@link FluidWagonPrototype::quality_affects_capacity | prototype:FluidWagonPrototype::quality_affects_capacity} set.
|
|
6403
6456
|
*/
|
|
6404
6457
|
fluid_wagon_capacity_multiplier?: double;
|
|
6405
6458
|
/**
|
|
@@ -6409,7 +6462,7 @@ interface QualityPrototype extends Prototype {
|
|
|
6409
6462
|
/**
|
|
6410
6463
|
* Path to the icon file.
|
|
6411
6464
|
*
|
|
6412
|
-
*
|
|
6465
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
6413
6466
|
*/
|
|
6414
6467
|
icon?: FileName;
|
|
6415
6468
|
/**
|
|
@@ -6473,7 +6526,9 @@ interface QualityPrototype extends Prototype {
|
|
|
6473
6526
|
*/
|
|
6474
6527
|
next_probability?: double;
|
|
6475
6528
|
/**
|
|
6476
|
-
* Must be within [1, 3]
|
|
6529
|
+
* Must be within `[1, 3]`.
|
|
6530
|
+
*
|
|
6531
|
+
* Affects the range of {@link attack parameters | prototype:AttackParameters}, e.g. those used by combat robots, units, guns and turrets.
|
|
6477
6532
|
*/
|
|
6478
6533
|
range_multiplier?: double;
|
|
6479
6534
|
/**
|
|
@@ -6780,7 +6835,7 @@ interface RecipeCategory extends Prototype {
|
|
|
6780
6835
|
category = "smelting",
|
|
6781
6836
|
energy_required = 3.5,
|
|
6782
6837
|
ingredients = {{type = "item", name = "iron-ore", amount = 1}},
|
|
6783
|
-
results = {{type="item", name="iron-plate", amount=1}}
|
|
6838
|
+
results = {{type = "item", name = "iron-plate", amount = 1}}
|
|
6784
6839
|
}
|
|
6785
6840
|
```
|
|
6786
6841
|
* @example ```
|
|
@@ -6796,15 +6851,15 @@ interface RecipeCategory extends Prototype {
|
|
|
6796
6851
|
icon_size = 32,
|
|
6797
6852
|
ingredients =
|
|
6798
6853
|
{
|
|
6799
|
-
{type="item", name="coal", amount=10},
|
|
6800
|
-
{type="fluid", name="heavy-oil", amount=25},
|
|
6801
|
-
{type="fluid", name="steam", amount=50}
|
|
6854
|
+
{type = "item", name = "coal", amount = 10},
|
|
6855
|
+
{type = "fluid", name = "heavy-oil", amount = 25},
|
|
6856
|
+
{type = "fluid", name = "steam", amount = 50}
|
|
6802
6857
|
},
|
|
6803
6858
|
results=
|
|
6804
6859
|
{
|
|
6805
|
-
{type="fluid", name="heavy-oil", amount=35},
|
|
6806
|
-
{type="fluid", name="light-oil", amount=15},
|
|
6807
|
-
{type="fluid", name="petroleum-gas", amount=20}
|
|
6860
|
+
{type = "fluid", name = "heavy-oil", amount = 35},
|
|
6861
|
+
{type = "fluid", name = "light-oil", amount = 15},
|
|
6862
|
+
{type = "fluid", name = "petroleum-gas", amount = 20}
|
|
6808
6863
|
},
|
|
6809
6864
|
allow_decomposition = false
|
|
6810
6865
|
}
|
|
@@ -6899,6 +6954,8 @@ interface RecipePrototype extends Prototype {
|
|
|
6899
6954
|
/**
|
|
6900
6955
|
* If given, this determines the recipe's icon. Otherwise, the icon of `main_product` or the singular product is used.
|
|
6901
6956
|
*
|
|
6957
|
+
* Only loaded if `icons` is not defined.
|
|
6958
|
+
*
|
|
6902
6959
|
* Mandatory if `icons` is not defined for a recipe with more than one product and no `main_product`, or no product.
|
|
6903
6960
|
* @example ```
|
|
6904
6961
|
icon = "__base__/graphics/icons/fluid/heavy-oil.png"
|
|
@@ -6933,8 +6990,8 @@ interface RecipePrototype extends Prototype {
|
|
|
6933
6990
|
-- Recipe with fluids
|
|
6934
6991
|
ingredients =
|
|
6935
6992
|
{
|
|
6936
|
-
{type="fluid", name="water", amount=50},
|
|
6937
|
-
{type="fluid", name="crude-oil", amount=100}
|
|
6993
|
+
{type = "fluid", name = "water", amount = 50},
|
|
6994
|
+
{type = "fluid", name = "crude-oil", amount = 100}
|
|
6938
6995
|
}
|
|
6939
6996
|
```
|
|
6940
6997
|
*/
|
|
@@ -6972,16 +7029,16 @@ interface RecipePrototype extends Prototype {
|
|
|
6972
7029
|
* @example ```
|
|
6973
7030
|
results =
|
|
6974
7031
|
{
|
|
6975
|
-
{type="fluid", name="heavy-oil", amount=3},
|
|
6976
|
-
{type="fluid", name="light-oil", amount=3},
|
|
6977
|
-
{type="fluid", name="petroleum-gas", amount=4}
|
|
7032
|
+
{type = "fluid", name= "heavy-oil", amount = 3},
|
|
7033
|
+
{type = "fluid", name= "light-oil", amount = 3},
|
|
7034
|
+
{type = "fluid", name= "petroleum-gas", amount = 4}
|
|
6978
7035
|
}
|
|
6979
7036
|
```
|
|
6980
7037
|
* @example ```
|
|
6981
7038
|
results =
|
|
6982
7039
|
{
|
|
6983
|
-
{type = "item", name = "iron-
|
|
6984
|
-
{type = "item", name = "
|
|
7040
|
+
{type = "item", name = "iron-plate", amount = 9},
|
|
7041
|
+
{type = "item", name = "copper-plate", amount = 1}
|
|
6985
7042
|
}
|
|
6986
7043
|
```
|
|
6987
7044
|
* @example ```
|
|
@@ -7944,7 +8001,7 @@ interface ShortcutPrototype extends Prototype {
|
|
|
7944
8001
|
/**
|
|
7945
8002
|
* Path to the icon file.
|
|
7946
8003
|
*
|
|
7947
|
-
*
|
|
8004
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
7948
8005
|
*/
|
|
7949
8006
|
icon?: FileName;
|
|
7950
8007
|
/**
|
|
@@ -7970,7 +8027,7 @@ interface ShortcutPrototype extends Prototype {
|
|
|
7970
8027
|
/**
|
|
7971
8028
|
* Path to the icon file. Used in the shortcut selection popup.
|
|
7972
8029
|
*
|
|
7973
|
-
*
|
|
8030
|
+
* Only loaded, and mandatory if `small_icons` is not defined.
|
|
7974
8031
|
*/
|
|
7975
8032
|
small_icon?: FileName;
|
|
7976
8033
|
/**
|
|
@@ -8293,7 +8350,7 @@ interface SpaceConnectionPrototype extends Prototype {
|
|
|
8293
8350
|
/**
|
|
8294
8351
|
* Path to the icon file.
|
|
8295
8352
|
*
|
|
8296
|
-
*
|
|
8353
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
8297
8354
|
*/
|
|
8298
8355
|
icon?: FileName;
|
|
8299
8356
|
/**
|
|
@@ -8307,13 +8364,15 @@ interface SpaceConnectionPrototype extends Prototype {
|
|
|
8307
8364
|
*/
|
|
8308
8365
|
icons?: IconData[];
|
|
8309
8366
|
/**
|
|
8367
|
+
* Length of the space connection in km.
|
|
8368
|
+
*
|
|
8310
8369
|
* Cannot be 0.
|
|
8311
8370
|
*/
|
|
8312
8371
|
length?: uint32;
|
|
8313
8372
|
to: SpaceLocationID;
|
|
8314
8373
|
}
|
|
8315
8374
|
/**
|
|
8316
|
-
* A space location, such as a planet.
|
|
8375
|
+
* A space location, such as a planet or the solar system edge.
|
|
8317
8376
|
*/
|
|
8318
8377
|
interface SpaceLocationPrototype extends Prototype {
|
|
8319
8378
|
asteroid_spawn_definitions?: SpaceLocationAsteroidSpawnDefinition[];
|
|
@@ -8341,7 +8400,7 @@ interface SpaceLocationPrototype extends Prototype {
|
|
|
8341
8400
|
/**
|
|
8342
8401
|
* Path to the icon file.
|
|
8343
8402
|
*
|
|
8344
|
-
*
|
|
8403
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
8345
8404
|
*/
|
|
8346
8405
|
icon?: FileName;
|
|
8347
8406
|
/**
|
|
@@ -8977,7 +9036,7 @@ interface SurfacePrototype extends Prototype {
|
|
|
8977
9036
|
/**
|
|
8978
9037
|
* Path to the icon file.
|
|
8979
9038
|
*
|
|
8980
|
-
*
|
|
9039
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
8981
9040
|
*/
|
|
8982
9041
|
icon?: FileName;
|
|
8983
9042
|
/**
|
|
@@ -9039,7 +9098,7 @@ interface TechnologyPrototype extends Prototype {
|
|
|
9039
9098
|
/**
|
|
9040
9099
|
* Path to the icon file.
|
|
9041
9100
|
*
|
|
9042
|
-
*
|
|
9101
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
9043
9102
|
*/
|
|
9044
9103
|
icon?: FileName;
|
|
9045
9104
|
/**
|
|
@@ -10107,6 +10166,10 @@ interface UtilityConstants extends PrototypeBase {
|
|
|
10107
10166
|
maximum_recipe_overload_multiplier: uint32;
|
|
10108
10167
|
medium_area_size: float;
|
|
10109
10168
|
medium_blueprint_area_size: float;
|
|
10169
|
+
/**
|
|
10170
|
+
* If not set, defaults to 'true' when modded and 'false' when vanilla.
|
|
10171
|
+
*/
|
|
10172
|
+
merge_bonus_gui_production_bonuses?: boolean;
|
|
10110
10173
|
minimap_slot_clicked_tint: Color;
|
|
10111
10174
|
minimap_slot_hovered_tint: Color;
|
|
10112
10175
|
minimum_recipe_overload_multiplier: uint32;
|
|
@@ -10964,7 +11027,7 @@ interface VirtualSignalPrototype extends Prototype {
|
|
|
10964
11027
|
/**
|
|
10965
11028
|
* Path to the icon file that is used to represent this virtual signal.
|
|
10966
11029
|
*
|
|
10967
|
-
*
|
|
11030
|
+
* Only loaded, and mandatory if `icons` is not defined.
|
|
10968
11031
|
*/
|
|
10969
11032
|
icon?: FileName;
|
|
10970
11033
|
/**
|
|
@@ -11308,6 +11371,8 @@ type dataExtendType = ({
|
|
|
11308
11371
|
} & MarketPrototype) | ({
|
|
11309
11372
|
type: 'mining-drill';
|
|
11310
11373
|
} & MiningDrillPrototype) | ({
|
|
11374
|
+
type: 'mod-data';
|
|
11375
|
+
} & ModData) | ({
|
|
11311
11376
|
type: 'module-category';
|
|
11312
11377
|
} & ModuleCategory) | ({
|
|
11313
11378
|
type: 'module';
|
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.59
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -579,6 +579,10 @@ type AnimationVariations = {
|
|
|
579
579
|
*/
|
|
580
580
|
sheets?: AnimationSheet[];
|
|
581
581
|
} | Animation | Animation[];
|
|
582
|
+
/**
|
|
583
|
+
* Any basic type (string, number, boolean) or table.
|
|
584
|
+
*/
|
|
585
|
+
type AnyBasic = string | boolean | number | table;
|
|
582
586
|
/**
|
|
583
587
|
* A union of all prototypes. A specific prototype is loaded based on the value of the `type` key.
|
|
584
588
|
*
|
|
@@ -1035,6 +1039,9 @@ MarketPrototype | /**
|
|
|
1035
1039
|
* `'mining-drill'`
|
|
1036
1040
|
*/
|
|
1037
1041
|
MiningDrillPrototype | /**
|
|
1042
|
+
* `'mod-data'`
|
|
1043
|
+
*/
|
|
1044
|
+
ModData | /**
|
|
1038
1045
|
* `'module-category'`
|
|
1039
1046
|
*/
|
|
1040
1047
|
ModuleCategory | /**
|
|
@@ -3428,6 +3435,24 @@ type CursorBoxType = /**
|
|
|
3428
3435
|
* Green by default.
|
|
3429
3436
|
*/
|
|
3430
3437
|
'blueprint-snap-rectangle' | 'spidertron-remote-selected' | 'spidertron-remote-to-be-selected';
|
|
3438
|
+
/**
|
|
3439
|
+
* Allows to add extra description items to the tooltip.
|
|
3440
|
+
*/
|
|
3441
|
+
interface CustomTooltipField {
|
|
3442
|
+
name: LocalisedString;
|
|
3443
|
+
/**
|
|
3444
|
+
* Ordering within all description items (modded and unmodded). Items with smaller order values are shown above items with larger values.
|
|
3445
|
+
*/
|
|
3446
|
+
order?: uint8;
|
|
3447
|
+
quality_header?: string;
|
|
3448
|
+
/**
|
|
3449
|
+
* Custom values per quality level. If a value is not provided for a specific quality, {@link CustomTooltipField::value | prototype:CustomTooltipField::value} will be used instead.
|
|
3450
|
+
*/
|
|
3451
|
+
quality_values?: LuaTable<QualityID, LocalisedString>;
|
|
3452
|
+
show_in_factoriopedia?: boolean;
|
|
3453
|
+
show_in_tooltip?: boolean;
|
|
3454
|
+
value: LocalisedString;
|
|
3455
|
+
}
|
|
3431
3456
|
/**
|
|
3432
3457
|
* Used by {@link BaseAttackParameters | prototype:BaseAttackParameters} to play a sound during the attack.
|
|
3433
3458
|
*/
|
|
@@ -4582,7 +4607,7 @@ interface FluidBox {
|
|
|
4582
4607
|
*/
|
|
4583
4608
|
pipe_connections: PipeConnectionDefinition[];
|
|
4584
4609
|
/**
|
|
4585
|
-
* The pictures to show when
|
|
4610
|
+
* The pictures to show when no fluid box is connected to this one.
|
|
4586
4611
|
*/
|
|
4587
4612
|
pipe_covers?: Sprite4Way;
|
|
4588
4613
|
pipe_covers_frozen?: Sprite4Way;
|
|
@@ -5424,7 +5449,7 @@ interface InterruptibleSound {
|
|
|
5424
5449
|
*/
|
|
5425
5450
|
stopped_sound?: Sound;
|
|
5426
5451
|
}
|
|
5427
|
-
interface
|
|
5452
|
+
interface InventoryWithCustomStackSizeSpecification {
|
|
5428
5453
|
/**
|
|
5429
5454
|
* Must be >= stack_size_min.
|
|
5430
5455
|
*/
|
|
@@ -5949,7 +5974,7 @@ interface LinkedBeltStructure {
|
|
|
5949
5974
|
/**
|
|
5950
5975
|
* The internal name of a game control (key binding).
|
|
5951
5976
|
*/
|
|
5952
|
-
type LinkedGameControl = 'move-up' | 'move-down' | 'move-left' | 'move-right' | 'open-character-gui' | 'open-gui' | 'confirm-gui' | 'toggle-free-cursor' | 'mine' | 'build' | 'build-ghost' | 'super-forced-build' | 'clear-cursor' | 'pipette' | 'rotate' | 'reverse-rotate' | 'flip-horizontal' | 'flip-vertical' | 'pick-items' | 'drop-cursor' | 'show-info' | 'shoot-enemy' | 'shoot-selected' | 'next-weapon' | 'toggle-driving' | 'zoom-in' | 'zoom-out' | 'use-item' | 'alternative-use-item' | 'toggle-console' | 'copy-entity-settings' | 'paste-entity-settings' | 'controller-gui-logistics-tab' | 'controller-gui-character-tab' | 'controller-gui-crafting-tab' | 'toggle-rail-layer' | 'select-for-blueprint' | 'select-for-cancel-deconstruct' | 'select-for-super-forced-deconstruct' | 'reverse-select' | 'alt-reverse-select' | 'deselect' | 'cycle-blueprint-forwards' | 'cycle-blueprint-backwards' | 'focus-search' | 'larger-terrain-building-area' | 'smaller-terrain-building-area' | 'remove-pole-cables' | 'build-with-obstacle-avoidance' | 'add-station' | 'add-temporary-station' | 'rename-all' | 'fast-wait-condition' | 'drag-map' | 'move-tag' | 'place-in-chat' | 'place-ping' | 'pin' | 'activate-tooltip' | 'next-surface' | 'previous-surface' | 'cycle-quality-up' | 'cycle-quality-down' | 'craft' | 'craft-5' | 'craft-all' | 'cancel-craft' | 'cancel-craft-5' | 'cancel-craft-all' | 'pick-item' | 'stack-transfer' | 'inventory-transfer' | 'fast-entity-transfer' | 'cursor-split' | 'stack-split' | 'inventory-split' | 'fast-entity-split' | 'toggle-filter' | 'open-item' | 'copy-inventory-filter' | 'paste-inventory-filter' | 'show-quick-panel' | 'next-quick-panel-page' | 'previous-quick-panel-page' | 'next-quick-panel-tab' | 'previous-quick-panel-tab' | 'rotate-active-quick-bars' | 'next-active-quick-bar' | 'previous-active-quick-bar' | 'quick-bar-button-1' | 'quick-bar-button-2' | 'quick-bar-button-3' | 'quick-bar-button-4' | 'quick-bar-button-5' | 'quick-bar-button-6' | 'quick-bar-button-7' | 'quick-bar-button-8' | 'quick-bar-button-9' | 'quick-bar-button-10' | 'quick-bar-button-1-secondary' | 'quick-bar-button-2-secondary' | 'quick-bar-button-3-secondary' | 'quick-bar-button-4-secondary' | 'quick-bar-button-5-secondary' | 'quick-bar-button-6-secondary' | 'quick-bar-button-7-secondary' | 'quick-bar-button-8-secondary' | 'quick-bar-button-9-secondary' | 'quick-bar-button-10-secondary' | 'action-bar-select-page-1' | 'action-bar-select-page-2' | 'action-bar-select-page-3' | 'action-bar-select-page-4' | 'action-bar-select-page-5' | 'action-bar-select-page-6' | 'action-bar-select-page-7' | 'action-bar-select-page-8' | 'action-bar-select-page-9' | 'action-bar-select-page-10' | 'copy' | 'cut' | 'paste' | 'cycle-clipboard-forwards' | 'cycle-clipboard-backwards' | 'undo' | 'redo' | 'toggle-menu' | 'toggle-map' | 'close-menu' | 'open-technology-gui' | 'production-statistics' | 'logistic-networks' | 'toggle-blueprint-library' | 'open-trains-gui' | 'open-factoriopedia' | 'back' | 'forward' | 'pause-game' | 'confirm-message' | 'previous-
|
|
5977
|
+
type LinkedGameControl = 'move-up' | 'move-down' | 'move-left' | 'move-right' | 'alternative-gui-move-up' | 'alternative-gui-move-down' | 'alternative-gui-move-left' | 'alternative-gui-move-right' | 'open-character-gui' | 'open-gui' | 'confirm-gui' | 'toggle-free-cursor' | 'mine' | 'build' | 'build-ghost' | 'super-forced-build' | 'clear-cursor' | 'pipette' | 'rotate' | 'reverse-rotate' | 'flip-horizontal' | 'flip-vertical' | 'pick-items' | 'drop-cursor' | 'show-info' | 'shoot-enemy' | 'shoot-selected' | 'next-weapon' | 'toggle-driving' | 'zoom-in' | 'zoom-out' | 'use-item' | 'alternative-use-item' | 'toggle-console' | 'copy-entity-settings' | 'paste-entity-settings' | 'controller-gui-logistics-tab' | 'controller-gui-character-tab' | 'controller-gui-crafting-tab' | 'toggle-rail-layer' | 'select-for-blueprint' | 'select-for-cancel-deconstruct' | 'select-for-super-forced-deconstruct' | 'reverse-select' | 'alt-reverse-select' | 'deselect' | 'cycle-blueprint-forwards' | 'cycle-blueprint-backwards' | 'focus-search' | 'larger-terrain-building-area' | 'smaller-terrain-building-area' | 'remove-pole-cables' | 'build-with-obstacle-avoidance' | 'add-station' | 'add-temporary-station' | 'rename-all' | 'fast-wait-condition' | 'drag-map' | 'move-tag' | 'place-in-chat' | 'place-ping' | 'pin' | 'activate-tooltip' | 'next-surface' | 'previous-surface' | 'cycle-quality-up' | 'cycle-quality-down' | 'scroll-tooltip-up' | 'scroll-tooltip-down' | 'craft' | 'craft-5' | 'craft-all' | 'cancel-craft' | 'cancel-craft-5' | 'cancel-craft-all' | 'pick-item' | 'stack-transfer' | 'inventory-transfer' | 'fast-entity-transfer' | 'cursor-split' | 'stack-split' | 'inventory-split' | 'fast-entity-split' | 'toggle-filter' | 'open-item' | 'copy-inventory-filter' | 'paste-inventory-filter' | 'show-quick-panel' | 'next-quick-panel-page' | 'previous-quick-panel-page' | 'next-quick-panel-tab' | 'previous-quick-panel-tab' | 'rotate-active-quick-bars' | 'next-active-quick-bar' | 'previous-active-quick-bar' | 'quick-bar-button-1' | 'quick-bar-button-2' | 'quick-bar-button-3' | 'quick-bar-button-4' | 'quick-bar-button-5' | 'quick-bar-button-6' | 'quick-bar-button-7' | 'quick-bar-button-8' | 'quick-bar-button-9' | 'quick-bar-button-10' | 'quick-bar-button-1-secondary' | 'quick-bar-button-2-secondary' | 'quick-bar-button-3-secondary' | 'quick-bar-button-4-secondary' | 'quick-bar-button-5-secondary' | 'quick-bar-button-6-secondary' | 'quick-bar-button-7-secondary' | 'quick-bar-button-8-secondary' | 'quick-bar-button-9-secondary' | 'quick-bar-button-10-secondary' | 'action-bar-select-page-1' | 'action-bar-select-page-2' | 'action-bar-select-page-3' | 'action-bar-select-page-4' | 'action-bar-select-page-5' | 'action-bar-select-page-6' | 'action-bar-select-page-7' | 'action-bar-select-page-8' | 'action-bar-select-page-9' | 'action-bar-select-page-10' | 'copy' | 'cut' | 'paste' | 'cycle-clipboard-forwards' | 'cycle-clipboard-backwards' | 'undo' | 'redo' | 'toggle-menu' | 'toggle-map' | 'close-menu' | 'open-technology-gui' | 'production-statistics' | 'logistic-networks' | 'toggle-blueprint-library' | 'open-trains-gui' | 'open-factoriopedia' | 'back' | 'forward' | 'pause-game' | 'confirm-message' | 'previous-mod' | 'connect-train' | 'disconnect-train' | 'submit-feedback' | 'editor-next-variation' | 'editor-previous-variation' | 'editor-clone-item' | 'editor-delete-item' | 'editor-toggle-pause' | 'editor-tick-once' | 'editor-speed-up' | 'editor-speed-down' | 'editor-reset-speed' | 'editor-set-clone-brush-source' | 'editor-set-clone-brush-destination' | 'editor-switch-to-surface' | 'editor-remove-scripting-object' | 'debug-toggle-atlas-gui' | 'debug-toggle-gui-visibility' | 'debug-toggle-debug-settings' | 'debug-toggle-basic' | 'debug-reset-zoom' | 'debug-reset-zoom-2x' | 'toggle-gui-debug' | 'toggle-gui-style-view' | 'toggle-gui-shadows' | 'toggle-gui-glows' | 'open-prototypes-gui' | 'open-prototype-explorer-gui' | 'increase-ui-scale' | 'decrease-ui-scale' | 'reset-ui-scale' | 'slash-editor' | 'toggle-entity' | 'next-player-in-replay' | 'move-blueprint-absolute-grid-up' | 'move-blueprint-absolute-grid-down' | 'move-blueprint-absolute-grid-left' | 'move-blueprint-absolute-grid-right' | 'move-blueprint-entities-up' | 'move-blueprint-entities-down' | 'move-blueprint-entities-left' | 'move-blueprint-entities-right' | 'play-next-track' | 'play-previous-track' | 'pause-resume-music' | /**
|
|
5953
5978
|
* Indicates no linked game control.
|
|
5954
5979
|
*/
|
|
5955
5980
|
'';
|
|
@@ -12943,6 +12968,12 @@ type int32 = number;
|
|
|
12943
12968
|
* Decimal numbers are automatically truncated when used in place of `int8`.
|
|
12944
12969
|
*/
|
|
12945
12970
|
type int8 = number;
|
|
12971
|
+
/**
|
|
12972
|
+
* A simple {@link Lua table | http://www.lua.org/pil/2.5.html}. An array is a table that uses continuous integer keys starting at `1`, while a dictionary can use numeric or string keys in any order or combination.
|
|
12973
|
+
*
|
|
12974
|
+
* Tables used by prototypes may be parsed via an internal class called "property tree". Errors that reference this class treat tables as 0-indexed. For example `Value must be a number in property tree at ROOT.technology.steel-plate-productivity.effects[0].change` refers to element 0 of the property tree array which in Lua is at index 1.
|
|
12975
|
+
*/
|
|
12976
|
+
type table = Table;
|
|
12946
12977
|
/**
|
|
12947
12978
|
* 16 bit unsigned integer. Ranges from `0` to `65 535`, or `[0, 2^16-1]`.
|
|
12948
12979
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.42",
|
|
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.59",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|