factorio-types 0.0.33 → 0.0.34
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 +48 -12
- package/dist/concepts.d.ts +1 -1
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +6 -6
- 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.78
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -310,9 +310,11 @@ interface LuaBootstrap {
|
|
|
310
310
|
handler: (this: void) => any | null): void
|
|
311
311
|
|
|
312
312
|
/**
|
|
313
|
-
* 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.
|
|
313
|
+
* 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.
|
|
314
314
|
*
|
|
315
|
-
*
|
|
315
|
+
* It gives the mod the opportunity to rectify potential differences in local state introduced by the save/load cycle. Doing anything other than the following three will lead to desyncs, breaking multiplayer and replay functionality. Access to {@link LuaGameScript | LuaGameScript} is not available. The {@link global | global} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
|
|
316
|
+
*
|
|
317
|
+
* The only legitimate uses of this event are these:
|
|
316
318
|
* - Re-setup {@link metatables | https://www.lua.org/pil/13.html} as they are not persisted through the save/load cycle.
|
|
317
319
|
* - Re-setup conditional event handlers, meaning subscribing to an event only when some condition is met to save processing time.
|
|
318
320
|
* - Create local references to data stored in the {@link global | global} table.
|
|
@@ -1370,7 +1372,7 @@ interface LuaControl {
|
|
|
1370
1372
|
force: ForceIdentification
|
|
1371
1373
|
|
|
1372
1374
|
/**
|
|
1373
|
-
* Unique
|
|
1375
|
+
* Unique {@link index | LuaForce::index} associated with the force of this entity.
|
|
1374
1376
|
*/
|
|
1375
1377
|
readonly force_index: number
|
|
1376
1378
|
|
|
@@ -1488,7 +1490,7 @@ interface LuaControl {
|
|
|
1488
1490
|
readonly surface: LuaSurface
|
|
1489
1491
|
|
|
1490
1492
|
/**
|
|
1491
|
-
* Unique
|
|
1493
|
+
* Unique {@link index | LuaSurface::index} associated with the surface this entity is currently on.
|
|
1492
1494
|
*/
|
|
1493
1495
|
readonly surface_index: number
|
|
1494
1496
|
|
|
@@ -2151,6 +2153,19 @@ interface LuaEntity extends LuaControl {
|
|
|
2151
2153
|
disconnect_rolling_stock(this: void,
|
|
2152
2154
|
direction: defines.rail_direction): void
|
|
2153
2155
|
|
|
2156
|
+
/**
|
|
2157
|
+
* Returns a table with all entities affected by this beacon
|
|
2158
|
+
* @remarks
|
|
2159
|
+
* Applies to subclasses: Beacon
|
|
2160
|
+
*
|
|
2161
|
+
*/
|
|
2162
|
+
get_beacon_effect_receivers(this: void): void
|
|
2163
|
+
|
|
2164
|
+
/**
|
|
2165
|
+
* Returns a table with all beacons affecting this effect receiver. Can only be used when the entity has an effect receiver (AssemblingMachine, Furnace, Lab, MiningDrills)
|
|
2166
|
+
*/
|
|
2167
|
+
get_beacons(this: void): void
|
|
2168
|
+
|
|
2154
2169
|
/**
|
|
2155
2170
|
* Get the source of this beam.
|
|
2156
2171
|
* @remarks
|
|
@@ -3042,6 +3057,11 @@ interface LuaEntity extends LuaControl {
|
|
|
3042
3057
|
*/
|
|
3043
3058
|
backer_name?: string
|
|
3044
3059
|
|
|
3060
|
+
/**
|
|
3061
|
+
* Number of beacons affecting this effect receiver. Can only be used when the entity has an effect receiver (AssemblingMachine, Furnace, Lab, MiningDrills)
|
|
3062
|
+
*/
|
|
3063
|
+
readonly beacons_count?: number
|
|
3064
|
+
|
|
3045
3065
|
/**
|
|
3046
3066
|
* The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see {@link LuaEntity::neighbours | LuaEntity::neighbours} for that. This is a dictionary with `"inputs"`, `"outputs"` entries that are arrays of transport belt connectable entities, or empty tables if no entities.
|
|
3047
3067
|
* @remarks
|
|
@@ -3362,7 +3382,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3362
3382
|
readonly energy_generated_last_tick: number
|
|
3363
3383
|
|
|
3364
3384
|
/**
|
|
3365
|
-
* The label on this entity, if any. `nil` if this is not a spider-
|
|
3385
|
+
* The label on this entity, if any. `nil` if this is not a spider-vehicle.
|
|
3366
3386
|
*/
|
|
3367
3387
|
entity_label?: string
|
|
3368
3388
|
|
|
@@ -4166,7 +4186,9 @@ interface LuaEntity extends LuaControl {
|
|
|
4166
4186
|
readonly unit_group?: LuaUnitGroup
|
|
4167
4187
|
|
|
4168
4188
|
/**
|
|
4169
|
-
* A
|
|
4189
|
+
* A unique number identifying this entity for the lifetime of the save. These are allocated sequentially, and not re-used (until overflow).
|
|
4190
|
+
*
|
|
4191
|
+
* Only entities inheriting from {@link EntityWithOwner | https://wiki.factorio.com/Prototype/EntityWithOwner}, as well as {@link ItemRequestProxy | https://wiki.factorio.com/Prototype/ItemRequestProxy} and {@link EntityGhost | https://wiki.factorio.com/Prototype/EntityGhost} are assigned a unit number. Returns `nil` otherwise.
|
|
4170
4192
|
*/
|
|
4171
4193
|
readonly unit_number?: number
|
|
4172
4194
|
|
|
@@ -4962,7 +4984,7 @@ interface LuaEntityPrototype {
|
|
|
4962
4984
|
readonly idle_energy_usage?: number
|
|
4963
4985
|
|
|
4964
4986
|
/**
|
|
4965
|
-
* A vector of the gun prototypes of this car, spider
|
|
4987
|
+
* A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.
|
|
4966
4988
|
* @remarks
|
|
4967
4989
|
* Applies to subclasses: Car,SpiderVehicle,ArtilleryTurret,ArtilleryWagon
|
|
4968
4990
|
*
|
|
@@ -5326,7 +5348,7 @@ interface LuaEntityPrototype {
|
|
|
5326
5348
|
/**
|
|
5327
5349
|
* The default maximum power output of this generator prototype.
|
|
5328
5350
|
* @remarks
|
|
5329
|
-
* Applies to subclasses: Generator
|
|
5351
|
+
* Applies to subclasses: BurnerGenerator,Generator
|
|
5330
5352
|
*
|
|
5331
5353
|
*/
|
|
5332
5354
|
readonly max_power_output?: number
|
|
@@ -7406,7 +7428,7 @@ interface LuaForce {
|
|
|
7406
7428
|
ghost_time_to_live: number
|
|
7407
7429
|
|
|
7408
7430
|
/**
|
|
7409
|
-
*
|
|
7431
|
+
* This force's unique ID, and index in {@link LuaGameScript::forces | LuaGameScript::forces}. It is assigned when a force is created, and remains so until it is {@link merged | on_force_merged} (ie. deleted). Indexes of merged forces can be reused.
|
|
7410
7432
|
*/
|
|
7411
7433
|
readonly index: number
|
|
7412
7434
|
|
|
@@ -11136,6 +11158,15 @@ interface LuaItemStack {
|
|
|
11136
11158
|
transfer_stack(this: void,
|
|
11137
11159
|
stack: ItemStackIdentification): void
|
|
11138
11160
|
|
|
11161
|
+
/**
|
|
11162
|
+
* Use the capsule item with the entity as the source, targeting the given position.
|
|
11163
|
+
* @param entity - The entity to use the capsule item with.
|
|
11164
|
+
* @param target_position - The position to use the capsule item with.
|
|
11165
|
+
*/
|
|
11166
|
+
use_capsule(this: void,
|
|
11167
|
+
entity: LuaEntity,
|
|
11168
|
+
target_position: MapPosition): void
|
|
11169
|
+
|
|
11139
11170
|
/**
|
|
11140
11171
|
* The active blueprint index for this blueprint book. `nil` if this blueprint book is empty.
|
|
11141
11172
|
* @remarks
|
|
@@ -12998,7 +13029,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
12998
13029
|
hand_location?: ItemStackLocation
|
|
12999
13030
|
|
|
13000
13031
|
/**
|
|
13001
|
-
* This player's unique index in {@link LuaGameScript::players | LuaGameScript::players}. It is
|
|
13032
|
+
* This player's unique ID, and index in {@link LuaGameScript::players | LuaGameScript::players}. It is assigned when a player is created, and remains so (even when the player is not {@link connected | LuaPlayer::connected}) until the player is irreversably {@link removed | on_player_removed}. Indexes of removed players can be reused.
|
|
13002
13033
|
*/
|
|
13003
13034
|
readonly index: number
|
|
13004
13035
|
|
|
@@ -16614,7 +16645,7 @@ interface LuaSurface {
|
|
|
16614
16645
|
generate_with_lab_tiles: boolean
|
|
16615
16646
|
|
|
16616
16647
|
/**
|
|
16617
|
-
*
|
|
16648
|
+
* This surface's unique ID, and index in {@link LuaGameScript::surfaces | LuaGameScript::surfaces}. It is assigned when a surface is created, and remains so until it is {@link deleted | on_surface_deleted}. Indexes of deleted surfaces can be reused.
|
|
16618
16649
|
*/
|
|
16619
16650
|
readonly index: number
|
|
16620
16651
|
|
|
@@ -18496,6 +18527,11 @@ interface LuaGuiElementAddParamsTextfield extends LuaGuiElementAddParams {
|
|
|
18496
18527
|
*
|
|
18497
18528
|
*/
|
|
18498
18529
|
interface LuaSurfaceCreateEntityParams {
|
|
18530
|
+
/**
|
|
18531
|
+
* If fast_replace is true simulate fast replace using this character.
|
|
18532
|
+
*/
|
|
18533
|
+
'character'?: LuaEntity
|
|
18534
|
+
|
|
18499
18535
|
/**
|
|
18500
18536
|
* If false, the building effect smoke will not be shown around the new entity.
|
|
18501
18537
|
*/
|
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.78
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
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.78
|
|
6
6
|
// API version 3
|
|
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.78
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1487,11 +1487,11 @@ interface on_player_promoted extends event {
|
|
|
1487
1487
|
player_index: number
|
|
1488
1488
|
}
|
|
1489
1489
|
/**
|
|
1490
|
-
* Called when a player is removed (deleted) from the game.
|
|
1490
|
+
* Called when a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link leaving | on_player_left_game} the game, and instead behaves like the player never existed in the save file.
|
|
1491
1491
|
*/
|
|
1492
1492
|
interface on_player_removed extends event {
|
|
1493
1493
|
/**
|
|
1494
|
-
* The
|
|
1494
|
+
* The index of the removed player.
|
|
1495
1495
|
*/
|
|
1496
1496
|
player_index: number
|
|
1497
1497
|
}
|
|
@@ -1910,11 +1910,11 @@ interface on_pre_player_mined_item extends event {
|
|
|
1910
1910
|
player_index: number
|
|
1911
1911
|
}
|
|
1912
1912
|
/**
|
|
1913
|
-
* Called before a player is removed (deleted) from the game.
|
|
1913
|
+
* Called before a player is removed (deleted) from the game. This is markedly different from a player temporarily {@link leaving | on_player_left_game} the game, and instead behaves like the player never existed in the save file.
|
|
1914
1914
|
*/
|
|
1915
1915
|
interface on_pre_player_removed extends event {
|
|
1916
1916
|
/**
|
|
1917
|
-
* The
|
|
1917
|
+
* The index of the removed player.
|
|
1918
1918
|
*/
|
|
1919
1919
|
player_index: number
|
|
1920
1920
|
}
|
|
@@ -2332,7 +2332,7 @@ interface on_surface_deleted extends event {
|
|
|
2332
2332
|
surface_index: number
|
|
2333
2333
|
}
|
|
2334
2334
|
/**
|
|
2335
|
-
* Called after a surface is imported.
|
|
2335
|
+
* Called after a surface is imported via the map editor.
|
|
2336
2336
|
*/
|
|
2337
2337
|
interface on_surface_imported extends event {
|
|
2338
2338
|
/**
|
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.78
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|