factorio-types 0.0.17 → 0.0.18
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 +69 -19
- package/dist/concepts.d.ts +33 -3
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +2 -1
- package/dist/global.d.ts +1 -1
- package/package.json +1 -1
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 1.1.
|
|
5
|
+
// Factorio version 1.1.49
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -299,10 +299,12 @@ interface LuaBootstrap {
|
|
|
299
299
|
|
|
300
300
|
/**
|
|
301
301
|
* Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to {@link LuaGameScript | LuaGameScript} and {@link LuaRendering | LuaRendering} is not available. The `global` table can be accessed and is safe to read from, but not write to.
|
|
302
|
+
*
|
|
302
303
|
* The only legitimate uses of this event are these three:
|
|
303
304
|
* - Re-setup {@link metatables | https://www.lua.org/pil/13.html} as they are not persisted through save-load.
|
|
304
305
|
* - Re-setup conditional event handlers.
|
|
305
306
|
* - Create local references to data stored in the {@link global | Global.html} table.
|
|
307
|
+
*
|
|
306
308
|
* For all other purposes, {@link LuaBootstrap::on_init | LuaBootstrap::on_init}, {@link LuaBootstrap::on_configuration_changed | LuaBootstrap::on_configuration_changed} or migration scripts should be used instead.
|
|
307
309
|
* @param f - The handler for this event. Passing `nil` will unregister it.
|
|
308
310
|
*/
|
|
@@ -340,6 +342,7 @@ interface LuaBootstrap {
|
|
|
340
342
|
|
|
341
343
|
/**
|
|
342
344
|
* Raise an event. Only events generated with {@link LuaBootstrap::generate_event_name | LuaBootstrap::generate_event_name} and the following can be raised:
|
|
345
|
+
*
|
|
343
346
|
* - {@link on_console_chat | on_console_chat}
|
|
344
347
|
* - {@link on_player_crafted_item | on_player_crafted_item}
|
|
345
348
|
* - {@link on_player_fast_transferred | on_player_fast_transferred}
|
|
@@ -626,6 +629,7 @@ interface LuaBurnerPrototype {
|
|
|
626
629
|
|
|
627
630
|
/**
|
|
628
631
|
* A chunk iterator can be used for iterating chunks coordinates of a surface.
|
|
632
|
+
*
|
|
629
633
|
* The returned type is a {@link ChunkPositionAndArea | ChunkPositionAndArea} containing the chunk coordinates and its area.
|
|
630
634
|
* @example
|
|
631
635
|
* ```
|
|
@@ -1105,7 +1109,7 @@ interface LuaControl {
|
|
|
1105
1109
|
* @returns `true` when the entity was successfully teleported.
|
|
1106
1110
|
*/
|
|
1107
1111
|
teleport(this: void,
|
|
1108
|
-
position:
|
|
1112
|
+
position: MapPosition,
|
|
1109
1113
|
surface?: SurfaceIdentification): boolean
|
|
1110
1114
|
|
|
1111
1115
|
/**
|
|
@@ -1113,7 +1117,7 @@ interface LuaControl {
|
|
|
1113
1117
|
* @param position - Position of the entity to select
|
|
1114
1118
|
*/
|
|
1115
1119
|
update_selected_entity(this: void,
|
|
1116
|
-
position:
|
|
1120
|
+
position: MapPosition): void
|
|
1117
1121
|
|
|
1118
1122
|
/**
|
|
1119
1123
|
* The build distance of this character or max uint when not a character or player connected to a character.
|
|
@@ -1321,6 +1325,7 @@ interface LuaControl {
|
|
|
1321
1325
|
|
|
1322
1326
|
/**
|
|
1323
1327
|
* The GUI the player currently has open, or `nil` if no GUI is open. Writing to it fires the {@link on_gui_opened | on_gui_opened} event.
|
|
1328
|
+
*
|
|
1324
1329
|
* This is the GUI that will asked to close (by firing the {@link on_gui_closed | on_gui_closed} event) when the `Esc` or `E` keys are pressed. If this attribute is not `nil`, and a new GUI is written to it, the existing one will be asked to close.
|
|
1325
1330
|
* @remarks
|
|
1326
1331
|
* Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element` or `nil`.
|
|
@@ -1341,7 +1346,7 @@ interface LuaControl {
|
|
|
1341
1346
|
/**
|
|
1342
1347
|
* Current position of the entity.
|
|
1343
1348
|
*/
|
|
1344
|
-
readonly position:
|
|
1349
|
+
readonly position: MapPosition
|
|
1345
1350
|
|
|
1346
1351
|
/**
|
|
1347
1352
|
* The reach distance of this character or max uint when not a character or player connected to a character.
|
|
@@ -1574,6 +1579,7 @@ interface LuaCustomInputPrototype {
|
|
|
1574
1579
|
|
|
1575
1580
|
/**
|
|
1576
1581
|
* Lazily evaluated table. For performance reasons, we sometimes return a custom table-like type instead of a native Lua table. This custom type lazily constructs the necessary Lua wrappers of the corresponding C++ objects, therefore preventing their unnecessary construction in some cases.
|
|
1582
|
+
*
|
|
1577
1583
|
* There are some notable consequences to the usage of a custom table type rather than the native Lua table type: Iterating a custom table is only possible using the `pairs` Lua function; `ipairs` won't work. Another key difference is that custom tables cannot be serialised into a game save file -- if saving the game would require serialisation of a custom table, an error will be displayed and the game will not be saved.
|
|
1578
1584
|
* @example
|
|
1579
1585
|
* In previous versions of Factorio, this would create a [LuaPlayer](LuaPlayer) instance for every player in the game, even though only one such wrapper is needed. In the current version, accessing [game.players](LuaGameScript::players) by itself does not create any [LuaPlayer](LuaPlayer) instances; they are created lazily when accessed. Therefore, this example only constructs one [LuaPlayer](LuaPlayer) instance, no matter how many elements there are in `game.players`.
|
|
@@ -1791,6 +1797,7 @@ interface LuaElectricEnergySourcePrototype {
|
|
|
1791
1797
|
|
|
1792
1798
|
/**
|
|
1793
1799
|
* The primary interface for interacting with entities through the Lua API. Entities are everything that exists on the map except for tiles (see {@link LuaTile | LuaTile}).
|
|
1800
|
+
*
|
|
1794
1801
|
* Most functions on LuaEntity also work when the entity is contained in a ghost.
|
|
1795
1802
|
*/
|
|
1796
1803
|
interface LuaEntity extends LuaControl {
|
|
@@ -1802,7 +1809,7 @@ interface LuaEntity extends LuaControl {
|
|
|
1802
1809
|
* @param position - The position the spidertron should move to.
|
|
1803
1810
|
*/
|
|
1804
1811
|
add_autopilot_destination(this: void,
|
|
1805
|
-
position:
|
|
1812
|
+
position: MapPosition): void
|
|
1806
1813
|
|
|
1807
1814
|
/**
|
|
1808
1815
|
* Offer a thing on the market.
|
|
@@ -1836,7 +1843,7 @@ interface LuaEntity extends LuaControl {
|
|
|
1836
1843
|
*/
|
|
1837
1844
|
can_shoot(this: void,
|
|
1838
1845
|
target: LuaEntity,
|
|
1839
|
-
position:
|
|
1846
|
+
position: MapPosition): boolean
|
|
1840
1847
|
|
|
1841
1848
|
/**
|
|
1842
1849
|
* Can wires reach between these entities.
|
|
@@ -1898,7 +1905,7 @@ interface LuaEntity extends LuaControl {
|
|
|
1898
1905
|
*/
|
|
1899
1906
|
clone(this: void,
|
|
1900
1907
|
table: {
|
|
1901
|
-
position:
|
|
1908
|
+
position: MapPosition,
|
|
1902
1909
|
surface?: LuaSurface,
|
|
1903
1910
|
force?: ForceIdentification,
|
|
1904
1911
|
create_build_effect_smoke?: boolean
|
|
@@ -1906,6 +1913,7 @@ interface LuaEntity extends LuaControl {
|
|
|
1906
1913
|
|
|
1907
1914
|
/**
|
|
1908
1915
|
* Connects current linked belt with another one.
|
|
1916
|
+
*
|
|
1909
1917
|
* Neighbours have to be of different type. If given linked belt is connected to something else it will be disconnected first. If provided neighbour is connected to something else it will also be disconnected first. Automatically updates neighbour to be connected back to this one.
|
|
1910
1918
|
* @remarks
|
|
1911
1919
|
* Can also be used on entity ghost if it contains linked-belt
|
|
@@ -1918,6 +1926,7 @@ interface LuaEntity extends LuaControl {
|
|
|
1918
1926
|
|
|
1919
1927
|
/**
|
|
1920
1928
|
* Connect two devices with a circuit wire or copper cable. Depending on which type of connection should be made, there are different procedures:
|
|
1929
|
+
*
|
|
1921
1930
|
* - To connect two electric poles, `target` must be a {@link LuaEntity | LuaEntity} that specifies another electric pole. This will connect them with copper cable.
|
|
1922
1931
|
* - To connect two devices with circuit wire, `target` must be a table of type {@link WireConnectionDefinition | WireConnectionDefinition}.
|
|
1923
1932
|
* @param target - The target with which to establish a connection.
|
|
@@ -1989,6 +1998,7 @@ interface LuaEntity extends LuaControl {
|
|
|
1989
1998
|
|
|
1990
1999
|
/**
|
|
1991
2000
|
* Immediately kills the entity. Does nothing if the entity doesn't have health.
|
|
2001
|
+
*
|
|
1992
2002
|
* Unlike {@link LuaEntity::destroy | LuaEntity::destroy}, `die` will trigger the {@link on_entity_died | on_entity_died} event and the entity will produce a corpse and drop loot if it has any.
|
|
1993
2003
|
* @remarks
|
|
1994
2004
|
* If `force` is not specified, `on_entity_died` will blame the `"neutral"` force.
|
|
@@ -2018,6 +2028,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2018
2028
|
|
|
2019
2029
|
/**
|
|
2020
2030
|
* Disconnect circuit wires or copper cables between devices. Depending on which type of connection should be cut, there are different procedures:
|
|
2031
|
+
*
|
|
2021
2032
|
* - To remove all copper cables, leave the `target` parameter blank: `pole.disconnect_neighbour()`.
|
|
2022
2033
|
* - To remove all wires of a specific color, set `target` to {@link defines.wire_type.red | defines.wire_type.red} or {@link defines.wire_type.green | defines.wire_type.green}.
|
|
2023
2034
|
* - To remove a specific copper cable between two electric poles, `target` must be a {@link LuaEntity | LuaEntity} that specifies the other pole: `pole1.disconnect_neighbour(pole2)`.
|
|
@@ -2870,7 +2881,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2870
2881
|
* Applies to subclasses: SpiderVehicle
|
|
2871
2882
|
*
|
|
2872
2883
|
*/
|
|
2873
|
-
autopilot_destination?:
|
|
2884
|
+
autopilot_destination?: MapPosition
|
|
2874
2885
|
|
|
2875
2886
|
/**
|
|
2876
2887
|
* The queued destination positions of spidertron's autopilot.
|
|
@@ -2878,7 +2889,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2878
2889
|
* Applies to subclasses: SpiderVehicle
|
|
2879
2890
|
*
|
|
2880
2891
|
*/
|
|
2881
|
-
readonly autopilot_destinations:
|
|
2892
|
+
readonly autopilot_destinations: MapPosition[]
|
|
2882
2893
|
|
|
2883
2894
|
/**
|
|
2884
2895
|
* The backer name assigned to this entity, or `nil` if this entity doesn't support backer names. Entities that support backer names are labs, locomotives, radars, roboports, and train stops.
|
|
@@ -3846,6 +3857,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3846
3857
|
|
|
3847
3858
|
/**
|
|
3848
3859
|
* The ticks left before a ghost, combat robot, highlight box or smoke with trigger is destroyed.
|
|
3860
|
+
*
|
|
3849
3861
|
* - for ghosts set to uint32 max (4,294,967,295) to never expire.
|
|
3850
3862
|
* - for ghosts Cannot be set higher than {@link LuaForce::ghost_time_to_live | LuaForce::ghost_time_to_live} of the entity's force.
|
|
3851
3863
|
*/
|
|
@@ -4543,7 +4555,7 @@ interface LuaEntityPrototype {
|
|
|
4543
4555
|
readonly inserter_rotation_speed?: number
|
|
4544
4556
|
|
|
4545
4557
|
/**
|
|
4546
|
-
* Gets the
|
|
4558
|
+
* Gets the built-in stack size bonus of this inserter prototype. `nil` if this is not an inserter.
|
|
4547
4559
|
*/
|
|
4548
4560
|
readonly inserter_stack_size_bonus: number
|
|
4549
4561
|
|
|
@@ -5546,6 +5558,7 @@ interface LuaEquipmentPrototype {
|
|
|
5546
5558
|
|
|
5547
5559
|
/**
|
|
5548
5560
|
* Encapsulates statistic data for different parts of the game. In the context of flow statistics, `input` and `output` describe on which side of the associated GUI the values are shown. Input values are shown on the left side, output values on the right side.
|
|
5561
|
+
*
|
|
5549
5562
|
* Examples:
|
|
5550
5563
|
* - The item production GUI shows "consumption" on the right, thus `output` describes the item consumption numbers. The same goes for fluid consumption.
|
|
5551
5564
|
* - The kills gui shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
|
|
@@ -5647,7 +5660,9 @@ interface LuaFlowStatistics {
|
|
|
5647
5660
|
|
|
5648
5661
|
/**
|
|
5649
5662
|
* An array of fluid boxes of an entity. Entities may contain more than one fluid box, and some can change the number of fluid boxes -- for instance, an assembling machine will change its number of fluid boxes depending on its active recipe.
|
|
5663
|
+
*
|
|
5650
5664
|
* See {@link Fluid | Fluid}
|
|
5665
|
+
*
|
|
5651
5666
|
* Do note that reading from a {@link LuaFluidBox | LuaFluidBox} creates a new table and writing will copy the given fields from the table into the engine's own fluid box structure. Therefore, the correct way to update a fluidbox of an entity is to read it first, modify the table, then write the modified table back. Directly accessing the returned table's attributes won't have the desired effect.
|
|
5652
5667
|
* @example
|
|
5653
5668
|
* Double the temperature of the fluid in `entity`'s first fluid box.
|
|
@@ -6428,6 +6443,7 @@ interface LuaForce {
|
|
|
6428
6443
|
|
|
6429
6444
|
/**
|
|
6430
6445
|
* The connected players belonging to this force.
|
|
6446
|
+
*
|
|
6431
6447
|
* This is primarily useful when you want to do some action against all online players of this force.
|
|
6432
6448
|
* @remarks
|
|
6433
6449
|
* This does *not* index using player index. See {@link LuaPlayer::index | LuaPlayer::index} on each player instance for the player index.
|
|
@@ -6597,6 +6613,7 @@ interface LuaForce {
|
|
|
6597
6613
|
|
|
6598
6614
|
/**
|
|
6599
6615
|
* The research queue of this force. The first technology in the array is the currently active one. Reading this attribute gives an array of {@link LuaTechnology | LuaTechnology}.
|
|
6616
|
+
*
|
|
6600
6617
|
* To write to this, the entire table must be written. Providing an empty table or `nil` will empty the research queue and cancel the current research. Writing to this when the research queue is disabled will simply set the last research in the table as the current research.
|
|
6601
6618
|
* @remarks
|
|
6602
6619
|
* This only allows mods to queue research that this force is able to research in the first place. As an example, an already researched technology or one whose prerequisites are not fulfilled will not be queued, but dropped silently instead.
|
|
@@ -7192,6 +7209,11 @@ interface LuaGameScript {
|
|
|
7192
7209
|
remove_path(this: void,
|
|
7193
7210
|
path: string): void
|
|
7194
7211
|
|
|
7212
|
+
/**
|
|
7213
|
+
* Reset scenario state (game_finished, player_won, etc.).
|
|
7214
|
+
*/
|
|
7215
|
+
reset_game_state(this: void): void
|
|
7216
|
+
|
|
7195
7217
|
/**
|
|
7196
7218
|
* Resets the amount of time played for this map.
|
|
7197
7219
|
*/
|
|
@@ -7383,6 +7405,7 @@ interface LuaGameScript {
|
|
|
7383
7405
|
|
|
7384
7406
|
/**
|
|
7385
7407
|
* The players that are currently online.
|
|
7408
|
+
*
|
|
7386
7409
|
* This is primarily useful when you want to do some action against all online players.
|
|
7387
7410
|
* @remarks
|
|
7388
7411
|
* This does *not* index using player index. See {@link LuaPlayer::index | LuaPlayer::index} on each player instance for the player index.
|
|
@@ -7457,10 +7480,15 @@ interface LuaGameScript {
|
|
|
7457
7480
|
readonly equipment_prototypes: {[key: string]: LuaEquipmentPrototype}
|
|
7458
7481
|
|
|
7459
7482
|
/**
|
|
7460
|
-
*
|
|
7483
|
+
* True while the victory screen is shown.
|
|
7461
7484
|
*/
|
|
7462
7485
|
readonly finished: boolean
|
|
7463
7486
|
|
|
7487
|
+
/**
|
|
7488
|
+
* True after players finished the game and clicked "continue".
|
|
7489
|
+
*/
|
|
7490
|
+
readonly finished_but_continuing: boolean
|
|
7491
|
+
|
|
7464
7492
|
/**
|
|
7465
7493
|
* A dictionary containing every LuaFluidPrototype indexed by `name`.
|
|
7466
7494
|
*/
|
|
@@ -7850,7 +7878,9 @@ interface LuaGui {
|
|
|
7850
7878
|
|
|
7851
7879
|
/**
|
|
7852
7880
|
* An element of a custom GUI. This type is used to represent any kind of a GUI element - labels, buttons and frames are all instances of this type. Just like {@link LuaEntity | LuaEntity}, different kinds of elements support different attributes; attempting to access an attribute on an element that doesn't support it (for instance, trying to access the `column_count` of a `textfield`) will result in a runtime error.
|
|
7881
|
+
*
|
|
7853
7882
|
* The following types of GUI element are supported:
|
|
7883
|
+
*
|
|
7854
7884
|
* - `"button"`: A clickable element. Relevant event: {@link on_gui_click | on_gui_click}
|
|
7855
7885
|
* - `"sprite-button"`: A `button` that displays a sprite rather than text. Relevant event: {@link on_gui_click | on_gui_click}
|
|
7856
7886
|
* - `"checkbox"`: A clickable element with a check mark that can be turned off or on. Relevant event: {@link on_gui_checked_state_changed | on_gui_checked_state_changed}
|
|
@@ -7876,6 +7906,7 @@ interface LuaGui {
|
|
|
7876
7906
|
* - `"tabbed-pane"`: A collection of `tab`s and their contents. Relevant event: {@link on_gui_selected_tab_changed | on_gui_selected_tab_changed}
|
|
7877
7907
|
* - `"tab"`: A tab for use in a `tabbed-pane`.
|
|
7878
7908
|
* - `"switch"`: A switch with three possible states. Can have labels attached to either side. Relevant event: {@link on_gui_switch_state_changed | on_gui_switch_state_changed}
|
|
7909
|
+
*
|
|
7879
7910
|
* Each GUI element allows access to its children by having them as attributes. Thus, one can use the `parent.child` syntax to refer to children. Lua also supports the `parent["child"]` syntax to refer to the same element. This can be used in cases where the child has a name that isn't a valid Lua identifier.
|
|
7880
7911
|
* @example
|
|
7881
7912
|
* This will add a label called `greeting` to the top flow. Immediately after, it will change its text to illustrate accessing child elements.
|
|
@@ -8314,6 +8345,7 @@ interface LuaGuiElement {
|
|
|
8314
8345
|
|
|
8315
8346
|
/**
|
|
8316
8347
|
* The elem filters of this choose-elem-button or `nil` if there are no filters.
|
|
8348
|
+
*
|
|
8317
8349
|
* The compatible type of filter is determined by elem_type:
|
|
8318
8350
|
* - Type `"item"` - {@link ItemPrototypeFilter | ItemPrototypeFilter}
|
|
8319
8351
|
* - Type `"tile"` - {@link TilePrototypeFilter | TilePrototypeFilter}
|
|
@@ -10178,6 +10210,7 @@ interface LuaItemStack {
|
|
|
10178
10210
|
|
|
10179
10211
|
/**
|
|
10180
10212
|
* The unique identifier for this item if it has one, `nil` otherwise. Note that this ID stays the same no matter where the item is moved to.
|
|
10213
|
+
*
|
|
10181
10214
|
* Only these types of items have unique IDs:
|
|
10182
10215
|
* - `"armor"`
|
|
10183
10216
|
* - `"spidertron-remote"`
|
|
@@ -10326,6 +10359,7 @@ interface LuaLampControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
10326
10359
|
|
|
10327
10360
|
/**
|
|
10328
10361
|
* A lazily loaded value. For performance reasons, we sometimes return a custom lazily-loaded value type instead of the native Lua value. This custom type lazily constructs the necessary value when {@link LuaLazyLoadedValue::get | LuaLazyLoadedValue::get} is called, therefore preventing its unnecessary construction in some cases.
|
|
10362
|
+
*
|
|
10329
10363
|
* An instance of LuaLazyLoadedValue is only valid during the event it was created from and cannot be saved.
|
|
10330
10364
|
*/
|
|
10331
10365
|
interface LuaLazyLoadedValue<T> {
|
|
@@ -11226,7 +11260,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11226
11260
|
*/
|
|
11227
11261
|
build_from_cursor(this: void,
|
|
11228
11262
|
table: {
|
|
11229
|
-
position:
|
|
11263
|
+
position: MapPosition,
|
|
11230
11264
|
direction?: defines.direction,
|
|
11231
11265
|
alt?: boolean,
|
|
11232
11266
|
terrain_building_size?: number,
|
|
@@ -11243,7 +11277,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11243
11277
|
*/
|
|
11244
11278
|
can_build_from_cursor(this: void,
|
|
11245
11279
|
table: {
|
|
11246
|
-
position:
|
|
11280
|
+
position: MapPosition,
|
|
11247
11281
|
direction?: defines.direction,
|
|
11248
11282
|
alt?: boolean,
|
|
11249
11283
|
terrain_building_size?: number,
|
|
@@ -11259,7 +11293,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11259
11293
|
can_place_entity(this: void,
|
|
11260
11294
|
table: {
|
|
11261
11295
|
name: string,
|
|
11262
|
-
position:
|
|
11296
|
+
position: MapPosition,
|
|
11263
11297
|
direction?: defines.direction
|
|
11264
11298
|
}): boolean
|
|
11265
11299
|
|
|
@@ -11333,7 +11367,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11333
11367
|
create_local_flying_text(this: void,
|
|
11334
11368
|
table: {
|
|
11335
11369
|
text: LocalisedString,
|
|
11336
|
-
position?:
|
|
11370
|
+
position?: MapPosition,
|
|
11337
11371
|
create_at_cursor?: boolean,
|
|
11338
11372
|
color?: Color,
|
|
11339
11373
|
time_to_live?: number,
|
|
@@ -11374,7 +11408,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11374
11408
|
*/
|
|
11375
11409
|
drag_wire(this: void,
|
|
11376
11410
|
table: {
|
|
11377
|
-
position:
|
|
11411
|
+
position: MapPosition
|
|
11378
11412
|
}): boolean
|
|
11379
11413
|
|
|
11380
11414
|
/**
|
|
@@ -11505,7 +11539,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11505
11539
|
* Queues a request to open the map at the specified position. If the map is already opened, the request will simply set the position (and scale). Render mode change requests are processed before rendering of the next frame.
|
|
11506
11540
|
*/
|
|
11507
11541
|
open_map(this: void,
|
|
11508
|
-
position:
|
|
11542
|
+
position: MapPosition,
|
|
11509
11543
|
scale?: number): void
|
|
11510
11544
|
|
|
11511
11545
|
/**
|
|
@@ -11676,7 +11710,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11676
11710
|
* @param selection_mode - The type of selection to start. Can be `select`, `alternative-select`, `reverse-select`.
|
|
11677
11711
|
*/
|
|
11678
11712
|
start_selection(this: void,
|
|
11679
|
-
position:
|
|
11713
|
+
position: MapPosition,
|
|
11680
11714
|
selection_mode: string): void
|
|
11681
11715
|
|
|
11682
11716
|
/**
|
|
@@ -11709,7 +11743,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11709
11743
|
* Queues a request to zoom to world at the specified position. If the player is already zooming to world, the request will simply set the position (and scale). Render mode change requests are processed before rendering of the next frame.
|
|
11710
11744
|
*/
|
|
11711
11745
|
zoom_to_world(this: void,
|
|
11712
|
-
position:
|
|
11746
|
+
position: MapPosition,
|
|
11713
11747
|
scale?: number): void
|
|
11714
11748
|
|
|
11715
11749
|
/**
|
|
@@ -11786,6 +11820,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11786
11820
|
|
|
11787
11821
|
/**
|
|
11788
11822
|
* The source entity used during entity settings copy-paste if any.
|
|
11823
|
+
*
|
|
11789
11824
|
* `nil` if there isn't currently a source entity.
|
|
11790
11825
|
*/
|
|
11791
11826
|
readonly entity_copy_source: LuaEntity
|
|
@@ -13836,6 +13871,7 @@ interface LuaSettings {
|
|
|
13836
13871
|
|
|
13837
13872
|
/**
|
|
13838
13873
|
* The current global mod settings, indexed by prototype name.
|
|
13874
|
+
*
|
|
13839
13875
|
* Even though these are marked as read-only, they can be changed by overwriting individual {@link ModSetting | ModSetting} tables in the custom table. Mods can only change their own settings. Using the in-game console, all global settings can be changed.
|
|
13840
13876
|
*/
|
|
13841
13877
|
readonly global: {[key: string]: ModSetting}
|
|
@@ -13847,6 +13883,7 @@ interface LuaSettings {
|
|
|
13847
13883
|
|
|
13848
13884
|
/**
|
|
13849
13885
|
* The default player mod settings for this map, indexed by prototype name.
|
|
13886
|
+
*
|
|
13850
13887
|
* Even though these are marked as read-only, they can be changed by overwriting individual {@link ModSetting | ModSetting} tables in the custom table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.
|
|
13851
13888
|
*/
|
|
13852
13889
|
readonly player: {[key: string]: ModSetting}
|
|
@@ -14547,6 +14584,7 @@ interface LuaSurface {
|
|
|
14547
14584
|
|
|
14548
14585
|
/**
|
|
14549
14586
|
* Count entities of given type or name in a given area. Works just like {@link LuaSurface::find_entities_filtered | LuaSurface::find_entities_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities.
|
|
14587
|
+
*
|
|
14550
14588
|
* If no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns entities in the radius of the position. If `area` is specified, this returns entities colliding with that area.
|
|
14551
14589
|
* @param table.invert - If the filters should be inverted. These filters are: name, type, ghost_name, ghost_type, direction, collision_mask, force.
|
|
14552
14590
|
* @param table.radius - If given with position, will count all entities within the radius of the position.
|
|
@@ -14571,6 +14609,7 @@ interface LuaSurface {
|
|
|
14571
14609
|
|
|
14572
14610
|
/**
|
|
14573
14611
|
* Count tiles of a given name in a given area. Works just like {@link LuaSurface::find_tiles_filtered | LuaSurface::find_tiles_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of tiles.
|
|
14612
|
+
*
|
|
14574
14613
|
* If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
|
|
14575
14614
|
* @param table.position - Ignored if not given with radius.
|
|
14576
14615
|
* @param table.radius - If given with position, will return all entities within the radius of the position.
|
|
@@ -14756,6 +14795,7 @@ interface LuaSurface {
|
|
|
14756
14795
|
|
|
14757
14796
|
/**
|
|
14758
14797
|
* Find decoratives of a given name in a given area.
|
|
14798
|
+
*
|
|
14759
14799
|
* If no filters are given, returns all decoratives in the search area. If multiple filters are specified, returns only decoratives matching every given filter. If no area and no position are given, the entire surface is searched.
|
|
14760
14800
|
* @param table.invert - If the filters should be inverted.
|
|
14761
14801
|
* @example
|
|
@@ -14796,6 +14836,7 @@ interface LuaSurface {
|
|
|
14796
14836
|
|
|
14797
14837
|
/**
|
|
14798
14838
|
* Find entities in a given area.
|
|
14839
|
+
*
|
|
14799
14840
|
* If no area is given all entities on the surface are returned.
|
|
14800
14841
|
* @example
|
|
14801
14842
|
* Will evaluate to a list of all entities within given area.
|
|
@@ -14809,7 +14850,9 @@ interface LuaSurface {
|
|
|
14809
14850
|
|
|
14810
14851
|
/**
|
|
14811
14852
|
* Find all entities of the given type or name in the given area.
|
|
14853
|
+
*
|
|
14812
14854
|
* If no filters (`name`, `type`, `force`, etc.) are given, this returns all entities in the search area. If multiple filters are specified, only entities matching all given filters are returned.
|
|
14855
|
+
*
|
|
14813
14856
|
* If no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns the entities within the radius of the position. If `area` is specified, this returns the entities colliding with that area.
|
|
14814
14857
|
* @param table.invert - If the filters should be inverted. These filters are: name, type, ghost_name, ghost_type, direction, collision_mask, force.
|
|
14815
14858
|
* @param table.position - Has precedence over area field.
|
|
@@ -14938,7 +14981,9 @@ interface LuaSurface {
|
|
|
14938
14981
|
|
|
14939
14982
|
/**
|
|
14940
14983
|
* Find all tiles of the given name in the given area.
|
|
14984
|
+
*
|
|
14941
14985
|
* If no filters are given, this returns all tiles in the search area.
|
|
14986
|
+
*
|
|
14942
14987
|
* If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
|
|
14943
14988
|
* @param table.position - Ignored if not given with radius.
|
|
14944
14989
|
* @param table.radius - If given with position, will return all entities within the radius of the position.
|
|
@@ -15205,6 +15250,7 @@ interface LuaSurface {
|
|
|
15205
15250
|
|
|
15206
15251
|
/**
|
|
15207
15252
|
* Generates a path with the specified constraints (as an array of {@link PathfinderWaypoints | PathfinderWaypoint}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities. If you want to command actual units to move, use the {@link LuaEntity::set_command | LuaEntity::set_command} functionality instead.
|
|
15253
|
+
*
|
|
15208
15254
|
* The resulting path is ultimately returned asynchronously via {@link on_script_path_request_finished | on_script_path_request_finished}.
|
|
15209
15255
|
* @param table.bounding_box - The dimensions of the object that's supposed to travel the path.
|
|
15210
15256
|
* @param table.can_open_gates - Whether the path request can open gates. Defaults to `false`.
|
|
@@ -15276,6 +15322,7 @@ interface LuaSurface {
|
|
|
15276
15322
|
|
|
15277
15323
|
/**
|
|
15278
15324
|
* Set tiles at specified locations. Can automatically correct the edges around modified tiles.
|
|
15325
|
+
*
|
|
15279
15326
|
* Placing a {@link mineable | LuaTilePrototype::mineable_properties} tile on top of a non-mineable one will turn the latter into the {@link LuaTile::hidden_tile | LuaTile::hidden_tile} for that tile. Placing a mineable tile on a mineable one or a non-mineable tile on a non-mineable one will not modify the hidden tile. This restriction can however be circumvented by using {@link LuaSurface::set_hidden_tile | LuaSurface::set_hidden_tile}.
|
|
15280
15327
|
* @remarks
|
|
15281
15328
|
* It is recommended to call this method once for all the tiles you want to change rather than calling it individually for every tile. As the tile correction is used after every step, calling it one by one could cause the tile correction logic to redo some of the changes. Also, many small API calls are generally more performance intensive than one big one.
|
|
@@ -15332,7 +15379,9 @@ interface LuaSurface {
|
|
|
15332
15379
|
|
|
15333
15380
|
/**
|
|
15334
15381
|
* Defines how surface daytime brightness influences each color channel of the current color lookup table (LUT).
|
|
15382
|
+
*
|
|
15335
15383
|
* The LUT is multiplied by `((1 - weight) + brightness * weight)` and result is clamped to range [0, 1].
|
|
15384
|
+
*
|
|
15336
15385
|
* Default is `{0, 0, 0}`, which means no influence.
|
|
15337
15386
|
* @example
|
|
15338
15387
|
* Makes night on the surface pitch black, assuming [LuaSurface::min_brightness](LuaSurface::min_brightness) being set to default value `0.15`.
|
|
@@ -15999,6 +16048,7 @@ interface LuaTrain {
|
|
|
15999
16048
|
|
|
16000
16049
|
/**
|
|
16001
16050
|
* The players killed by this train.
|
|
16051
|
+
*
|
|
16002
16052
|
* The keys are the player indices, the values are how often this train killed that player.
|
|
16003
16053
|
*/
|
|
16004
16054
|
readonly killed_players: {[key: number]: number}
|
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 1.1.
|
|
5
|
+
// Factorio version 1.1.49
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -599,6 +599,7 @@ type CollisionMask = {[key in CollisionMaskLayer]: boolean}
|
|
|
599
599
|
|
|
600
600
|
/**
|
|
601
601
|
* A {@link string | string} specifying a collision mask layer.
|
|
602
|
+
*
|
|
602
603
|
* Possible values for the string are:
|
|
603
604
|
* - `"ground-tile"`
|
|
604
605
|
* - `"water-tile"`
|
|
@@ -613,12 +614,14 @@ type CollisionMask = {[key in CollisionMaskLayer]: boolean}
|
|
|
613
614
|
* - `"rail-layer"`
|
|
614
615
|
* - `"transport-belt-layer"`
|
|
615
616
|
* - `"not-setup"`
|
|
617
|
+
*
|
|
616
618
|
* Additionally the values `"layer-13"` through `"layer-55"`. These layers are currently unused by the game but may change. If a mod is going to use one of the unused layers it's recommended to start at the higher layers because the base game will take from the lower ones.
|
|
617
619
|
*/
|
|
618
620
|
type CollisionMaskLayer = 'ground-tile' | 'water-tile' | 'resource-layer' | 'doodad-layer' | 'floor-layer' | 'item-layer' | 'ghost-layer' | 'object-layer' | 'player-layer' | 'train-layer' | 'rail-layer' | 'transport-belt-layer' | 'not-setup' | 'layer-13' | 'layer-14' | 'layer-15' | 'layer-16' | 'layer-17' | 'layer-18' | 'layer-19' | 'layer-20' | 'layer-21' | 'layer-22' | 'layer-23' | 'layer-24' | 'layer-25' | 'layer-26' | 'layer-27' | 'layer-28' | 'layer-29' | 'layer-30' | 'layer-31' | 'layer-32' | 'layer-33' | 'layer-34' | 'layer-35' | 'layer-36' | 'layer-37' | 'layer-38' | 'layer-39' | 'layer-40' | 'layer-41' | 'layer-42' | 'layer-43' | 'layer-44' | 'layer-45' | 'layer-46' | 'layer-47' | 'layer-48' | 'layer-49' | 'layer-50' | 'layer-51' | 'layer-52' | 'layer-53' | 'layer-54' | 'layer-55'
|
|
619
621
|
|
|
620
622
|
/**
|
|
621
623
|
* A {@link CollisionMask | CollisionMask} but also includes any flags this mask has.
|
|
624
|
+
*
|
|
622
625
|
* Flags such as:
|
|
623
626
|
* - `"not-colliding-with-itself"`
|
|
624
627
|
* - `"consider-tile-transitions"`
|
|
@@ -628,6 +631,7 @@ type CollisionMaskWithFlags = CollisionMask & {[key:string]: true}
|
|
|
628
631
|
|
|
629
632
|
/**
|
|
630
633
|
* Red, green, blue and alpha values, all in range [0, 1] or all in range [0, 255] if any value is > 1. All values here are optional. Color channels default to `0`, the alpha channel defaults to `1`.
|
|
634
|
+
*
|
|
631
635
|
* Similar to {@link Position | Position}, Color allows the short-hand notation of passing an array of exactly 3 or 4 numbers. The game usually expects colors to be in pre-multiplied form (color channels are pre-multiplied by alpha).
|
|
632
636
|
* @example
|
|
633
637
|
* ```
|
|
@@ -991,7 +995,9 @@ interface EnemyEvolutionMapSettings {
|
|
|
991
995
|
|
|
992
996
|
/**
|
|
993
997
|
* Candidate chunks are given scores to determine which one of them should be expanded into. This score takes into account various settings noted below. The iteration is over a square region centered around the chunk for which the calculation is done, and includes the central chunk as well. Distances are calculated as {@link Manhattan distance | https://en.wikipedia.org/wiki/Taxicab_geometry}.
|
|
998
|
+
*
|
|
994
999
|
* The pseudocode algorithm to determine a chunk's score is as follows:
|
|
1000
|
+
*
|
|
995
1001
|
* ```
|
|
996
1002
|
* player = 0
|
|
997
1003
|
* for neighbour in all chunks within enemy_building_influence_radius from chunk:
|
|
@@ -1145,6 +1151,7 @@ interface EventData {
|
|
|
1145
1151
|
|
|
1146
1152
|
/**
|
|
1147
1153
|
* Used to filter out irrelevant event callbacks in a performant way.
|
|
1154
|
+
*
|
|
1148
1155
|
* Available filters:
|
|
1149
1156
|
* - {@link LuaEntityClonedEventFilter | LuaEntityClonedEventFilter}
|
|
1150
1157
|
* - {@link LuaEntityDamagedEventFilter | LuaEntityDamagedEventFilter}
|
|
@@ -1599,10 +1606,14 @@ interface ItemStackLocation {
|
|
|
1599
1606
|
|
|
1600
1607
|
/**
|
|
1601
1608
|
* Localised strings are a way to support translation of in-game text. It is an array where the first element is the key and the remaining elements are parameters that will be substituted for placeholders in the template designated by the key.
|
|
1609
|
+
*
|
|
1602
1610
|
* The key identifies the string template. For example, `"gui-alert-tooltip.attack"` (for the template `"__1__
|
|
1603
1611
|
* objects are being damaged"`; see the file `data/core/locale/en.cfg`).
|
|
1612
|
+
*
|
|
1604
1613
|
* The template can contain placeholders such as `__1__` or `__2__`. These will be replaced by the respective parameter in the LocalisedString. The parameters themselves can be other localised strings, which will be processed recursively in the same fashion. Localised strings can not be recursed deeper than 20 levels and can not have more than 20 parameters.
|
|
1614
|
+
*
|
|
1605
1615
|
* As a special case, when the key is just the empty string, all the parameters will be concatenated (after processing, if any are localised strings). If there is only one parameter, it will be used as is.
|
|
1616
|
+
*
|
|
1606
1617
|
* Furthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table) which will not be translated, as well as a number or boolean, which will be converted to their textual representation.
|
|
1607
1618
|
* @example
|
|
1608
1619
|
* In the English translation, this will print `"No ammo"`; in the Czech translation, it will print `"Bez munice"`:
|
|
@@ -2015,7 +2026,9 @@ interface MapGenSettings {
|
|
|
2015
2026
|
|
|
2016
2027
|
/**
|
|
2017
2028
|
* A floating point number specifying an amount.
|
|
2029
|
+
*
|
|
2018
2030
|
* For backwards compatibility, MapGenSizes can also be specified as one of the following strings, which will be converted to a number (when queried, a number will always be returned):
|
|
2031
|
+
*
|
|
2019
2032
|
* - `"none"` - equivalent to `0`
|
|
2020
2033
|
* - `"very-low"`, `"very-small"`, `"very-poor"` - equivalent to `1/2`
|
|
2021
2034
|
* - `"low"`, `"small"`, `"poor"` - equivalent to `1/sqrt(2)`
|
|
@@ -2028,6 +2041,14 @@ interface MapGenSettings {
|
|
|
2028
2041
|
*/
|
|
2029
2042
|
type MapGenSize = number | 'none' | 'very-low' | 'very-small' | 'very-poor' | 'low' | 'small' | 'poor' | 'normal' | 'medium' | 'regular' | 'high' | 'big' | 'good' | 'very-high' | 'very-big' | 'very-good'
|
|
2030
2043
|
|
|
2044
|
+
/**
|
|
2045
|
+
* Coordinates of an entity on a map. This uses the same format as {@link Position | Position}, meaning it can be specified either with or without explicit keys.
|
|
2046
|
+
*/
|
|
2047
|
+
interface MapPosition {
|
|
2048
|
+
'x': number
|
|
2049
|
+
'y': number
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2031
2052
|
/**
|
|
2032
2053
|
* Various game-related settings. Updating any of the attributes will immediately take effect in the game engine.
|
|
2033
2054
|
* @param max_failed_behavior_count - If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base.
|
|
@@ -2133,8 +2154,11 @@ interface ModuleEffects {
|
|
|
2133
2154
|
|
|
2134
2155
|
/**
|
|
2135
2156
|
* This is a set of flags given as a dictionary{@link [string | string} → {@link boolean | boolean}]. When a flag is set, it is present in the dictionary with the value `true`. Unset flags aren't present in the dictionary at all.
|
|
2157
|
+
*
|
|
2136
2158
|
* To write to this, use an array{@link [string | string}] of the mouse buttons that should be possible to use with on button.
|
|
2159
|
+
*
|
|
2137
2160
|
* When setting flags, the flag `"left-and-right"` can also be set which will set `"left"` and `"right"` true.
|
|
2161
|
+
*
|
|
2138
2162
|
* Possible flags when reading are:
|
|
2139
2163
|
* - `"left"`
|
|
2140
2164
|
* - `"right"`
|
|
@@ -2206,7 +2230,7 @@ interface OldTileAndPosition {
|
|
|
2206
2230
|
* @param direct_distance_to_consider_short_request - The maximum direct distance in tiles before a request is no longer considered short. Defaults to `100`.
|
|
2207
2231
|
* @param enemy_with_different_destination_collision_penalty - A penalty that is applied for another unit that is too close and either not moving or has a different goal. Defaults to `30`.
|
|
2208
2232
|
* @param extended_collision_penalty - The collision penalty for collisions in the extended bounding box but outside the entity's actual bounding box. Defaults to `3`.
|
|
2209
|
-
* @param fwd2bwd_ratio -
|
|
2233
|
+
* @param fwd2bwd_ratio - The pathfinder performs a step of the backward search every `fwd2bwd_ratio`'th step. The minimum allowed value is `2`, which means symmetric search. The default value is `5`.
|
|
2210
2234
|
* @param general_entity_collision_penalty - The general collision penalty with other units. Defaults to `10`.
|
|
2211
2235
|
* @param general_entity_subsequent_collision_penalty - The collision penalty for positions that require the destruction of an entity to get to. Defaults to `3`.
|
|
2212
2236
|
* @param goal_pressure_ratio - When looking at which node to check next, their heuristic value is multiplied by this ratio. The higher it is, the more the search is directed straight at the goal. Defaults to `2`.
|
|
@@ -2266,7 +2290,7 @@ interface PathFinderMapSettings {
|
|
|
2266
2290
|
*/
|
|
2267
2291
|
'extended_collision_penalty': number
|
|
2268
2292
|
/**
|
|
2269
|
-
*
|
|
2293
|
+
* The pathfinder performs a step of the backward search every `fwd2bwd_ratio`'th step. The minimum allowed value is `2`, which means symmetric search. The default value is `5`.
|
|
2270
2294
|
*/
|
|
2271
2295
|
'fwd2bwd_ratio': number
|
|
2272
2296
|
/**
|
|
@@ -2586,6 +2610,7 @@ interface ProgrammableSpeakerParameters {
|
|
|
2586
2610
|
|
|
2587
2611
|
/**
|
|
2588
2612
|
* The smooth orientation. It is a {@link float | float} in the range `[0, 1)` that covers a full circle, starting at the top and going clockwise. This means a value of `0` indicates "north", a value of `0.5` indicates "south".
|
|
2613
|
+
*
|
|
2589
2614
|
* For example then, a value of `0.625` would indicate "south-west", and a value of `0.875` would indicate "north-west".
|
|
2590
2615
|
*/
|
|
2591
2616
|
type RealOrientation = number
|
|
@@ -2602,6 +2627,7 @@ type RecipePrototypeFilter = RecipePrototypeFilterCategory | RecipePrototypeFilt
|
|
|
2602
2627
|
|
|
2603
2628
|
/**
|
|
2604
2629
|
* A value between 0 and 255 inclusive represented by one of the following named {@link string | string} or string version of the value (for example `"27"` and `"decals"` are both valid). Higher values are rendered on top of lower values.
|
|
2630
|
+
*
|
|
2605
2631
|
* - `"water-tile"`: 15
|
|
2606
2632
|
* - `"ground-tile"`: 25
|
|
2607
2633
|
* - `"tile-transition"`: 26
|
|
@@ -2827,9 +2853,11 @@ interface SmokeSource {
|
|
|
2827
2853
|
|
|
2828
2854
|
/**
|
|
2829
2855
|
* A sound defined by a {@link string | string}. It can be either the name of a {@link sound prototype | https://wiki.factorio.com/Prototype/Sound} defined in the data stage or a path in the form `"type/name"`. The latter option can be sorted into three categories.
|
|
2856
|
+
*
|
|
2830
2857
|
* The utility and ambient types each contain general use sound prototypes defined by the game itself.
|
|
2831
2858
|
* - `"utility"` - Uses the {@link UtilitySounds | https://wiki.factorio.com/Prototype/UtilitySounds} prototype. Example: `"utility/wire_connect_pole"`
|
|
2832
2859
|
* - `"ambient"` - Uses {@link AmbientSound | https://wiki.factorio.com/Prototype/AmbientSound} prototypes. Example: `"ambient/resource-deficiency"`
|
|
2860
|
+
*
|
|
2833
2861
|
* The following types can be combined with any tile name as long as its prototype defines the
|
|
2834
2862
|
* corresponding sound.
|
|
2835
2863
|
* - `"tile-walking"` - Uses {@link Tile::walking_sound | https://wiki.factorio.com/Prototype/Tile#walking_sound}. Example: `"tile-walking/concrete"`
|
|
@@ -2837,6 +2865,7 @@ interface SmokeSource {
|
|
|
2837
2865
|
* - `"tile-build-small"` - Uses {@link Tile::build_sound | https://wiki.factorio.com/Prototype/Tile#build_sound}. Example: `"tile-build-small/concrete"`
|
|
2838
2866
|
* - `"tile-build-medium"` - Uses {@link Tile::build_sound | https://wiki.factorio.com/Prototype/Tile#build_sound}
|
|
2839
2867
|
* - `"tile-build-large"` - Uses {@link Tile::build_sound | https://wiki.factorio.com/Prototype/Tile#build_sound}
|
|
2868
|
+
*
|
|
2840
2869
|
* The following types can be combined with any entity name as long as its prototype defines the
|
|
2841
2870
|
* corresponding sound.
|
|
2842
2871
|
* - `"entity-build"` - Uses {@link Entity::build_sound | https://wiki.factorio.com/Prototype/Entity#build_sound}. Example: `"entity-build/wooden-chest"`
|
|
@@ -2879,6 +2908,7 @@ interface SpawnPointDefinition {
|
|
|
2879
2908
|
|
|
2880
2909
|
/**
|
|
2881
2910
|
* It is specified by {@link string | string}. It can be either the name of a {@link sprite prototype | https://wiki.factorio.com/Prototype/Sprite} defined in the data stage or a path in form "type/name".
|
|
2911
|
+
*
|
|
2882
2912
|
* The supported types are:
|
|
2883
2913
|
* - `"item"` - for example "item/iron-plate" is the icon sprite of iron plate
|
|
2884
2914
|
* - `"entity"` - for example "entity/small-biter" is the icon sprite of the small biter
|
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 1.1.
|
|
5
|
+
// Factorio version 1.1.49
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
package/dist/events.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.49
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -274,6 +274,7 @@ interface on_cutscene_cancelled extends event {
|
|
|
274
274
|
}
|
|
275
275
|
/**
|
|
276
276
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
|
277
|
+
*
|
|
277
278
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
|
278
279
|
* @remarks
|
|
279
280
|
* Due to implementation omission, waypoint_index is 0-based.
|
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 1.1.
|
|
5
|
+
// Factorio version 1.1.49
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|