factorio-types 0.0.32 → 0.0.33
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 +133 -26
- package/dist/concepts.d.ts +135 -12
- package/dist/defines.d.ts +2 -1
- package/dist/events.d.ts +26 -5
- 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.77
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -249,7 +249,14 @@ interface LuaBootstrap {
|
|
|
249
249
|
get_event_order(this: void): void
|
|
250
250
|
|
|
251
251
|
/**
|
|
252
|
-
*
|
|
252
|
+
* Gets the prototype history for the given type and name.
|
|
253
|
+
*/
|
|
254
|
+
get_prototype_history(this: void,
|
|
255
|
+
type: string,
|
|
256
|
+
name: string): void
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Register a function to be run when mod configuration changes. This is called when the game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, when any prototypes have been added or removed, or when a migration was applied. It allows the mod to make any changes it deems appropriate to both the data structures in its {@link global | global} table or to the game state through {@link LuaGameScript | LuaGameScript}.
|
|
253
260
|
* @remarks
|
|
254
261
|
* For more context, refer to the {@link Data Lifecycle | data-lifecycle} page.
|
|
255
262
|
*
|
|
@@ -401,13 +408,15 @@ interface LuaBootstrap {
|
|
|
401
408
|
/**
|
|
402
409
|
* @param table.entity - The entity transferred from or to.
|
|
403
410
|
* @param table.from_player - Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.
|
|
411
|
+
* @param table.is_split - Whether the transfer was a split action (half stack).
|
|
404
412
|
* @param table.player_index - The player transferred from or to.
|
|
405
413
|
*/
|
|
406
414
|
raise_player_fast_transferred(this: void,
|
|
407
415
|
table: {
|
|
408
416
|
player_index: number,
|
|
409
417
|
entity: LuaEntity,
|
|
410
|
-
from_player: boolean
|
|
418
|
+
from_player: boolean,
|
|
419
|
+
is_split: boolean
|
|
411
420
|
}): void
|
|
412
421
|
|
|
413
422
|
/**
|
|
@@ -446,6 +455,18 @@ interface LuaBootstrap {
|
|
|
446
455
|
tiles: Tile[]
|
|
447
456
|
}): void
|
|
448
457
|
|
|
458
|
+
/**
|
|
459
|
+
* @param table.entity - The entity that was teleported.
|
|
460
|
+
* @param table.old_position - The entity's position before the teleportation.
|
|
461
|
+
* @param table.old_surface_index - The entity's surface before the teleportation.
|
|
462
|
+
*/
|
|
463
|
+
raise_script_teleported(this: void,
|
|
464
|
+
table: {
|
|
465
|
+
entity: LuaEntity,
|
|
466
|
+
old_surface_index: number,
|
|
467
|
+
old_position: MapPosition
|
|
468
|
+
}): void
|
|
469
|
+
|
|
449
470
|
/**
|
|
450
471
|
* Register a metatable to have linkage recorded and restored when saving/loading. The metatable itself will not be saved. Instead, only the linkage to a registered metatable is saved, and the metatable registered under that name will be used when loading the table.
|
|
451
472
|
* @remarks
|
|
@@ -792,7 +813,7 @@ interface LuaCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
792
813
|
}
|
|
793
814
|
|
|
794
815
|
/**
|
|
795
|
-
* Allows for the registration of custom console commands
|
|
816
|
+
* Allows for the registration of custom console commands through the global object named `commands`. Similarly to {@link event subscriptions | LuaBootstrap::on_event}, these don't persist through a save-and-load cycle.
|
|
796
817
|
*/
|
|
797
818
|
interface LuaCommandProcessor {
|
|
798
819
|
/**
|
|
@@ -1034,6 +1055,11 @@ interface LuaControl {
|
|
|
1034
1055
|
*/
|
|
1035
1056
|
get_main_inventory(this: void): void
|
|
1036
1057
|
|
|
1058
|
+
/**
|
|
1059
|
+
* The maximum inventory index this entity may use.
|
|
1060
|
+
*/
|
|
1061
|
+
get_max_inventory_index(this: void): void
|
|
1062
|
+
|
|
1037
1063
|
/**
|
|
1038
1064
|
* Gets the parameters of a personal logistic request and auto-trash slot.
|
|
1039
1065
|
* @param slot_index - The slot to get.
|
|
@@ -1144,13 +1170,16 @@ interface LuaControl {
|
|
|
1144
1170
|
* @remarks
|
|
1145
1171
|
* Some entities may not be teleported. For instance, transport belts won't allow teleportation and this method will always return `false` when used on any such entity.
|
|
1146
1172
|
* You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinates `'teleport(0, 1)'` to move the entity 1 tile positive y. `'teleport(4)'` to move the entity 4 tiles to the positive x.
|
|
1173
|
+
* `script_raised_teleported` will not be raised if teleporting a player with no character.
|
|
1147
1174
|
*
|
|
1148
1175
|
* @param position - Where to teleport to.
|
|
1176
|
+
* @param raise_teleported - If true, [defines.events.script_raised_teleported](defines.events.script_raised_teleported) will be fired on successful entity teleportation.
|
|
1149
1177
|
* @param surface - Surface to teleport to. If not given, will teleport to the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface.
|
|
1150
1178
|
*/
|
|
1151
1179
|
teleport(this: void,
|
|
1152
1180
|
position: MapPosition,
|
|
1153
|
-
surface?: SurfaceIdentification
|
|
1181
|
+
surface?: SurfaceIdentification,
|
|
1182
|
+
raise_teleported?: boolean): void
|
|
1154
1183
|
|
|
1155
1184
|
/**
|
|
1156
1185
|
* Select an entity, as if by hovering the mouse above it.
|
|
@@ -1340,6 +1369,11 @@ interface LuaControl {
|
|
|
1340
1369
|
*/
|
|
1341
1370
|
force: ForceIdentification
|
|
1342
1371
|
|
|
1372
|
+
/**
|
|
1373
|
+
* Unique ID associated with the force of this entity.
|
|
1374
|
+
*/
|
|
1375
|
+
readonly force_index: number
|
|
1376
|
+
|
|
1343
1377
|
/**
|
|
1344
1378
|
* Whether this character entity is in combat.
|
|
1345
1379
|
*/
|
|
@@ -1453,6 +1487,11 @@ interface LuaControl {
|
|
|
1453
1487
|
*/
|
|
1454
1488
|
readonly surface: LuaSurface
|
|
1455
1489
|
|
|
1490
|
+
/**
|
|
1491
|
+
* Unique ID associated with the surface this entity is currently on.
|
|
1492
|
+
*/
|
|
1493
|
+
readonly surface_index: number
|
|
1494
|
+
|
|
1456
1495
|
/**
|
|
1457
1496
|
* The vehicle the player is currently sitting in.
|
|
1458
1497
|
*/
|
|
@@ -3497,6 +3536,14 @@ interface LuaEntity extends LuaControl {
|
|
|
3497
3536
|
*/
|
|
3498
3537
|
inserter_stack_size_override: number
|
|
3499
3538
|
|
|
3539
|
+
/**
|
|
3540
|
+
* Returns the current target pickup count of the inserter.
|
|
3541
|
+
* @remarks
|
|
3542
|
+
* This considers the circuit network, manual override and the inserter stack size limit based on technology.
|
|
3543
|
+
*
|
|
3544
|
+
*/
|
|
3545
|
+
readonly inserter_target_pickup_count: number
|
|
3546
|
+
|
|
3500
3547
|
/**
|
|
3501
3548
|
* (deprecated by 1.1.51) If this entity is a MilitaryTarget. Returns same value as LuaEntity::is_military_target
|
|
3502
3549
|
*/
|
|
@@ -4218,6 +4265,11 @@ interface LuaEntityPrototype {
|
|
|
4218
4265
|
*/
|
|
4219
4266
|
readonly air_resistance?: number
|
|
4220
4267
|
|
|
4268
|
+
/**
|
|
4269
|
+
* The alert icon scale of this entity prototype.
|
|
4270
|
+
*/
|
|
4271
|
+
readonly alert_icon_scale: number
|
|
4272
|
+
|
|
4221
4273
|
/**
|
|
4222
4274
|
* The alert icon shift of this entity prototype.
|
|
4223
4275
|
*/
|
|
@@ -4803,7 +4855,7 @@ interface LuaEntityPrototype {
|
|
|
4803
4855
|
/**
|
|
4804
4856
|
* The fluid capacity of this entity or 0 if this entity doesn't support fluids.
|
|
4805
4857
|
* @remarks
|
|
4806
|
-
* Crafting machines will report 0 due to their fluid capacity being
|
|
4858
|
+
* Crafting machines will report 0 due to their fluid capacity being whatever a given recipe needs.
|
|
4807
4859
|
*
|
|
4808
4860
|
*/
|
|
4809
4861
|
readonly fluid_capacity: number
|
|
@@ -6564,7 +6616,7 @@ interface LuaFluidBox {
|
|
|
6564
6616
|
index: number): void
|
|
6565
6617
|
|
|
6566
6618
|
/**
|
|
6567
|
-
* The prototype of this fluidbox index.
|
|
6619
|
+
* The prototype of this fluidbox index. If this is used on a fluidbox of a crafting machine which due to recipe was created by merging multiple prototypes, a table of prototypes that were merged will be returned instead
|
|
6568
6620
|
*/
|
|
6569
6621
|
get_prototype(this: void,
|
|
6570
6622
|
index: number): void
|
|
@@ -8260,6 +8312,11 @@ interface LuaGameScript {
|
|
|
8260
8312
|
*/
|
|
8261
8313
|
readonly connected_players: LuaPlayer[]
|
|
8262
8314
|
|
|
8315
|
+
/**
|
|
8316
|
+
* Whether a console command has been used.
|
|
8317
|
+
*/
|
|
8318
|
+
readonly console_command_used: boolean
|
|
8319
|
+
|
|
8263
8320
|
/**
|
|
8264
8321
|
* A dictionary containing every LuaCustomInputPrototype indexed by `name`.
|
|
8265
8322
|
*/
|
|
@@ -11177,6 +11234,14 @@ interface LuaItemStack {
|
|
|
11177
11234
|
*/
|
|
11178
11235
|
durability?: number
|
|
11179
11236
|
|
|
11237
|
+
/**
|
|
11238
|
+
* If this is an item with entity data, get the stored entity color.
|
|
11239
|
+
* @remarks
|
|
11240
|
+
* Applies to subclasses: ItemWithEntityData
|
|
11241
|
+
*
|
|
11242
|
+
*/
|
|
11243
|
+
entity_color?: Color
|
|
11244
|
+
|
|
11180
11245
|
/**
|
|
11181
11246
|
* The number of entity filters this deconstruction item supports.
|
|
11182
11247
|
* @remarks
|
|
@@ -11198,6 +11263,14 @@ interface LuaItemStack {
|
|
|
11198
11263
|
*/
|
|
11199
11264
|
entity_filters: string[]
|
|
11200
11265
|
|
|
11266
|
+
/**
|
|
11267
|
+
* If this is an item with entity data, get the stored entity label.
|
|
11268
|
+
* @remarks
|
|
11269
|
+
* Applies to subclasses: ItemWithEntityData
|
|
11270
|
+
*
|
|
11271
|
+
*/
|
|
11272
|
+
entity_label?: string
|
|
11273
|
+
|
|
11201
11274
|
/**
|
|
11202
11275
|
* If this item extends the inventory it resides in (provides its contents for counts, crafting, insertion). Only callable on items with inventories.
|
|
11203
11276
|
* @remarks
|
|
@@ -12336,11 +12409,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
12336
12409
|
character: LuaEntity): void
|
|
12337
12410
|
|
|
12338
12411
|
/**
|
|
12339
|
-
* Builds
|
|
12340
|
-
* @remarks
|
|
12341
|
-
* Anything built will fire normal player-built events.
|
|
12342
|
-
* The cursor stack will automatically be reduced as if the player built normally.
|
|
12343
|
-
*
|
|
12412
|
+
* Builds whatever is in the cursor on the surface the player is on. The cursor stack will automatically be reduced as if the player built normally.
|
|
12344
12413
|
* @param table.alt - If alt build should be used instead of normal build. Defaults to normal.
|
|
12345
12414
|
* @param table.direction - Direction the entity would be placed
|
|
12346
12415
|
* @param table.position - Where the entity would be placed
|
|
@@ -12618,11 +12687,13 @@ interface LuaPlayer extends LuaControl {
|
|
|
12618
12687
|
alert_type: defines.alert_type): void
|
|
12619
12688
|
|
|
12620
12689
|
/**
|
|
12621
|
-
* Queues a request to open the map at the specified position. If the map is already opened, the request will simply set the position
|
|
12690
|
+
* Queues a request to open the map at the specified position. If the map is already opened, the request will simply set the position, scale, and entity to follow. Render mode change requests are processed before rendering of the next frame.
|
|
12691
|
+
* @param entity - The entity to follow. If not given the current entity being followed will be cleared.
|
|
12622
12692
|
*/
|
|
12623
12693
|
open_map(this: void,
|
|
12624
12694
|
position: MapPosition,
|
|
12625
|
-
scale?: number
|
|
12695
|
+
scale?: number,
|
|
12696
|
+
entity?: LuaEntity): void
|
|
12626
12697
|
|
|
12627
12698
|
/**
|
|
12628
12699
|
* Invokes the "smart pipette" action on the player as if the user pressed it.
|
|
@@ -12687,18 +12758,18 @@ interface LuaPlayer extends LuaControl {
|
|
|
12687
12758
|
}): void
|
|
12688
12759
|
|
|
12689
12760
|
/**
|
|
12690
|
-
* Requests a translation for the given localised string. If the request is successful the {@link on_string_translated | on_string_translated} event will be fired
|
|
12761
|
+
* Requests a translation for the given localised string. If the request is successful, the {@link on_string_translated | on_string_translated} event will be fired with the results.
|
|
12691
12762
|
* @remarks
|
|
12692
|
-
* Does nothing if this player is not connected
|
|
12763
|
+
* Does nothing if this player is not connected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
12693
12764
|
*
|
|
12694
12765
|
*/
|
|
12695
12766
|
request_translation(this: void,
|
|
12696
12767
|
localised_string: LocalisedString): void
|
|
12697
12768
|
|
|
12698
12769
|
/**
|
|
12699
|
-
* Requests
|
|
12770
|
+
* Requests translation for the given set of localised strings. If the request is successful, a {@link on_string_translated | on_string_translated} event will be fired for each string with the results.
|
|
12700
12771
|
* @remarks
|
|
12701
|
-
* Does nothing if this player is not connected
|
|
12772
|
+
* Does nothing if this player is not connected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
12702
12773
|
*
|
|
12703
12774
|
*/
|
|
12704
12775
|
request_translations(this: void,
|
|
@@ -12825,11 +12896,13 @@ interface LuaPlayer extends LuaControl {
|
|
|
12825
12896
|
position: MapPosition): void
|
|
12826
12897
|
|
|
12827
12898
|
/**
|
|
12828
|
-
* 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
|
|
12899
|
+
* 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, scale, and entity to follow. Render mode change requests are processed before rendering of the next frame.
|
|
12900
|
+
* @param entity - The entity to follow. If not given the current entity being followed will be cleared.
|
|
12829
12901
|
*/
|
|
12830
12902
|
zoom_to_world(this: void,
|
|
12831
12903
|
position: MapPosition,
|
|
12832
|
-
scale?: number
|
|
12904
|
+
scale?: number,
|
|
12905
|
+
entity?: LuaEntity): void
|
|
12833
12906
|
|
|
12834
12907
|
/**
|
|
12835
12908
|
* `true` if the player is an admin.
|
|
@@ -12902,6 +12975,11 @@ interface LuaPlayer extends LuaControl {
|
|
|
12902
12975
|
*/
|
|
12903
12976
|
readonly display_scale: number
|
|
12904
12977
|
|
|
12978
|
+
/**
|
|
12979
|
+
* The wire drag target for this player, if any.
|
|
12980
|
+
*/
|
|
12981
|
+
readonly drag_target?: DragTarget
|
|
12982
|
+
|
|
12905
12983
|
/**
|
|
12906
12984
|
* The source entity used during entity settings copy-paste, if any.
|
|
12907
12985
|
*/
|
|
@@ -13117,7 +13195,7 @@ interface LuaProgrammableSpeakerControlBehavior extends LuaControlBehavior {
|
|
|
13117
13195
|
}
|
|
13118
13196
|
|
|
13119
13197
|
/**
|
|
13120
|
-
* An interface to send messages to the calling RCON interface
|
|
13198
|
+
* An interface to send messages to the calling RCON interface through the global object named `rcon`.
|
|
13121
13199
|
*/
|
|
13122
13200
|
interface LuaRCON {
|
|
13123
13201
|
/**
|
|
@@ -13176,6 +13254,11 @@ interface LuaRailPath {
|
|
|
13176
13254
|
*/
|
|
13177
13255
|
readonly current: number
|
|
13178
13256
|
|
|
13257
|
+
/**
|
|
13258
|
+
* If the path goes from the front of the train
|
|
13259
|
+
*/
|
|
13260
|
+
readonly is_front: boolean
|
|
13261
|
+
|
|
13179
13262
|
/**
|
|
13180
13263
|
* 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.
|
|
13181
13264
|
*/
|
|
@@ -13651,7 +13734,7 @@ interface LuaRemote {
|
|
|
13651
13734
|
}
|
|
13652
13735
|
|
|
13653
13736
|
/**
|
|
13654
|
-
* Allows rendering of geometric shapes, text and sprites in the game world
|
|
13737
|
+
* Allows rendering of geometric shapes, text and sprites in the game world through the global object named `rendering`. Each render object is identified by an id that is universally unique for the lifetime of a whole game.
|
|
13655
13738
|
* @remarks
|
|
13656
13739
|
* If an entity target of an object is destroyed or changes surface, then the object is also destroyed.
|
|
13657
13740
|
*
|
|
@@ -13981,7 +14064,7 @@ interface LuaRendering {
|
|
|
13981
14064
|
* Not all fonts support scaling.
|
|
13982
14065
|
*
|
|
13983
14066
|
* @param table.alignment - Defaults to "left". Other options are "right" and "center".
|
|
13984
|
-
* @param table.draw_on_ground - If this should be drawn below sprites and entities.
|
|
14067
|
+
* @param table.draw_on_ground - If this should be drawn below sprites and entities. Rich text does not support this option.
|
|
13985
14068
|
* @param table.font - Name of font to use. Defaults to the same font as flying-text.
|
|
13986
14069
|
* @param table.forces - The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
|
13987
14070
|
* @param table.only_in_alt_mode - If this should only be rendered in alt mode. Defaults to false.
|
|
@@ -13991,6 +14074,7 @@ interface LuaRendering {
|
|
|
13991
14074
|
* @param table.target_offset - Only used if `target` is a LuaEntity.
|
|
13992
14075
|
* @param table.text - The text to display.
|
|
13993
14076
|
* @param table.time_to_live - In ticks. Defaults to living forever.
|
|
14077
|
+
* @param table.use_rich_text - If rich text rendering is enabled. Defaults to false.
|
|
13994
14078
|
* @param table.vertical_alignment - Defaults to "top". Other options are "middle", "baseline" and "bottom".
|
|
13995
14079
|
* @param table.visible - If this is rendered to anyone at all. Defaults to true.
|
|
13996
14080
|
*/
|
|
@@ -14012,7 +14096,8 @@ interface LuaRendering {
|
|
|
14012
14096
|
alignment?: string,
|
|
14013
14097
|
vertical_alignment?: string,
|
|
14014
14098
|
scale_with_zoom?: boolean,
|
|
14015
|
-
only_in_alt_mode?: boolean
|
|
14099
|
+
only_in_alt_mode?: boolean,
|
|
14100
|
+
use_rich_text?: boolean
|
|
14016
14101
|
}): void
|
|
14017
14102
|
|
|
14018
14103
|
/**
|
|
@@ -14340,6 +14425,15 @@ interface LuaRendering {
|
|
|
14340
14425
|
get_type(this: void,
|
|
14341
14426
|
id: number): void
|
|
14342
14427
|
|
|
14428
|
+
/**
|
|
14429
|
+
* Get if the text with this id parses rich text tags.
|
|
14430
|
+
* @remarks
|
|
14431
|
+
* Applies to subclasses: Text
|
|
14432
|
+
*
|
|
14433
|
+
*/
|
|
14434
|
+
get_use_rich_text(this: void,
|
|
14435
|
+
id: number): void
|
|
14436
|
+
|
|
14343
14437
|
/**
|
|
14344
14438
|
* Get the vertical alignment of the text with this id.
|
|
14345
14439
|
* @remarks
|
|
@@ -14781,6 +14875,16 @@ interface LuaRendering {
|
|
|
14781
14875
|
to: MapPosition | LuaEntity,
|
|
14782
14876
|
to_offset?: Vector): void
|
|
14783
14877
|
|
|
14878
|
+
/**
|
|
14879
|
+
* Set if the text with this id parses rich text tags.
|
|
14880
|
+
* @remarks
|
|
14881
|
+
* Applies to subclasses: Text
|
|
14882
|
+
*
|
|
14883
|
+
*/
|
|
14884
|
+
set_use_rich_text(this: void,
|
|
14885
|
+
id: number,
|
|
14886
|
+
use_rich_text: boolean): void
|
|
14887
|
+
|
|
14784
14888
|
/**
|
|
14785
14889
|
* Set the vertical alignment of the text with this id. Does nothing if this object is not a text.
|
|
14786
14890
|
* @remarks
|
|
@@ -15000,7 +15104,7 @@ interface LuaShortcutPrototype {
|
|
|
15000
15104
|
readonly order: string
|
|
15001
15105
|
|
|
15002
15106
|
/**
|
|
15003
|
-
* The technology to
|
|
15107
|
+
* The technology that needs to be researched once (in any save) for this shortcut to be unlocked (in all saves).
|
|
15004
15108
|
*/
|
|
15005
15109
|
readonly technology_to_unlock?: LuaTechnologyPrototype
|
|
15006
15110
|
|
|
@@ -15809,6 +15913,7 @@ interface LuaSurface {
|
|
|
15809
15913
|
}): void
|
|
15810
15914
|
|
|
15811
15915
|
/**
|
|
15916
|
+
* Whether the given decorative prototype collides at the given position and direction.
|
|
15812
15917
|
* @param position - The position to check
|
|
15813
15918
|
* @param prototype - The decorative prototype to check
|
|
15814
15919
|
*/
|
|
@@ -15857,6 +15962,7 @@ interface LuaSurface {
|
|
|
15857
15962
|
area: ScriptPosition): void
|
|
15858
15963
|
|
|
15859
15964
|
/**
|
|
15965
|
+
* Whether the given entity prototype collides at the given position and direction.
|
|
15860
15966
|
* @param position - The position to check
|
|
15861
15967
|
* @param prototype - The entity prototype to check
|
|
15862
15968
|
* @param use_map_generation_bounding_box - If the map generation bounding box should be used instead of the collision bounding box
|
|
@@ -15965,6 +16071,7 @@ interface LuaSurface {
|
|
|
15965
16071
|
to_be_upgraded?: boolean,
|
|
15966
16072
|
limit?: number,
|
|
15967
16073
|
is_military_target?: boolean,
|
|
16074
|
+
has_item_inside?: LuaItemPrototype,
|
|
15968
16075
|
invert?: boolean
|
|
15969
16076
|
}): void
|
|
15970
16077
|
|
|
@@ -16517,7 +16624,7 @@ interface LuaSurface {
|
|
|
16517
16624
|
map_gen_settings: MapGenSettings
|
|
16518
16625
|
|
|
16519
16626
|
/**
|
|
16520
|
-
* The minimal brightness during the night.
|
|
16627
|
+
* The minimal brightness during the night. Defaults to `0.15`. This has an effect on both rendering and game mechanics such as biter spawns and solar power.
|
|
16521
16628
|
*/
|
|
16522
16629
|
min_brightness: number
|
|
16523
16630
|
|
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.77
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -762,6 +762,20 @@ interface DisplayResolution {
|
|
|
762
762
|
width: number
|
|
763
763
|
}
|
|
764
764
|
|
|
765
|
+
interface DragTarget {
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* If the wire being dragged is a circuit wire this is the connector id.
|
|
769
|
+
*/
|
|
770
|
+
target_circuit_id?: defines.circuit_connector_id,
|
|
771
|
+
target_entity: LuaEntity,
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* If the wire being dragged is copper wire this is the wire id.
|
|
775
|
+
*/
|
|
776
|
+
target_wire_id?: defines.wire_connection_id
|
|
777
|
+
}
|
|
778
|
+
|
|
765
779
|
/**
|
|
766
780
|
* These values represent a percentual increase in evolution. This means a value of `0.1` would increase evolution by 10%.
|
|
767
781
|
*/
|
|
@@ -1059,9 +1073,9 @@ type FluidPrototypeFilter = FluidPrototypeFilterDefaultTemperature | FluidProtot
|
|
|
1059
1073
|
type ForceCondition = /* All forces pass. */ 'all' | /* Forces which will attack pass. */ 'enemy' | /* Forces which won't attack pass. */ 'ally' | /* Forces which are friends pass. */ 'friend' | /* Forces which are not friends pass. */ 'not-friend' | /* The same force pass. */ 'same' | /* The non-same forces pass. */ 'not-same'
|
|
1060
1074
|
|
|
1061
1075
|
/**
|
|
1062
|
-
* A force may be specified in one of
|
|
1076
|
+
* A force may be specified in one of three ways.
|
|
1063
1077
|
*/
|
|
1064
|
-
type ForceIdentification = /* The force name. */ string | /* A reference to {@link LuaForce | LuaForce} may be passed directly. */ LuaForce
|
|
1078
|
+
type ForceIdentification = /* The force index. */ number | /* The force name. */ string | /* A reference to {@link LuaForce | LuaForce} may be passed directly. */ LuaForce
|
|
1065
1079
|
|
|
1066
1080
|
/**
|
|
1067
1081
|
* Parameters that affect the look and control of the game. Updating any of the member attributes here will immediately take effect in the game engine.
|
|
@@ -1563,6 +1577,14 @@ type LuaScriptRaisedDestroyEventFilter = LuaScriptRaisedDestroyEventFilterGhostN
|
|
|
1563
1577
|
*/
|
|
1564
1578
|
type LuaScriptRaisedReviveEventFilter = LuaScriptRaisedReviveEventFilterGhostName | LuaScriptRaisedReviveEventFilterGhostType | LuaScriptRaisedReviveEventFilterName | LuaScriptRaisedReviveEventFilterType | DefaultLuaScriptRaisedReviveEventFilter
|
|
1565
1579
|
|
|
1580
|
+
/**
|
|
1581
|
+
* Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:
|
|
1582
|
+
* @remarks
|
|
1583
|
+
* Other attributes may be specified depending on `filter`:
|
|
1584
|
+
*
|
|
1585
|
+
*/
|
|
1586
|
+
type LuaScriptRaisedTeleportedEventFilter = LuaScriptRaisedTeleportedEventFilterGhostName | LuaScriptRaisedTeleportedEventFilterGhostType | LuaScriptRaisedTeleportedEventFilterName | LuaScriptRaisedTeleportedEventFilterType | DefaultLuaScriptRaisedTeleportedEventFilter
|
|
1587
|
+
|
|
1566
1588
|
/**
|
|
1567
1589
|
* Depending on the value of `filter`, the table may take additional fields. `filter` may be one of the following:
|
|
1568
1590
|
* @remarks
|
|
@@ -1816,7 +1838,7 @@ interface ModSetting {
|
|
|
1816
1838
|
/**
|
|
1817
1839
|
* The value of the mod setting. The type depends on the kind of setting.
|
|
1818
1840
|
*/
|
|
1819
|
-
value: number | boolean | string
|
|
1841
|
+
value: number | boolean | string | Color
|
|
1820
1842
|
}
|
|
1821
1843
|
|
|
1822
1844
|
/**
|
|
@@ -2259,6 +2281,19 @@ interface ProgrammableSpeakerParameters {
|
|
|
2259
2281
|
*/
|
|
2260
2282
|
type PrototypeFilter = Array</* for type `"item"` */ ItemPrototypeFilter | /* for type `"tile"` */ TilePrototypeFilter | /* for type `"entity"` */ EntityPrototypeFilter | /* for type `"fluid"` */ FluidPrototypeFilter | /* for type `"recipe"` */ RecipePrototypeFilter | /* for type `"decorative"` */ DecorativePrototypeFilter | /* for type `"achievement"` */ AchievementPrototypeFilter | /* for type `"equipment"` */ EquipmentPrototypeFilter | /* for type `"technology"` */ TechnologyPrototypeFilter>
|
|
2261
2283
|
|
|
2284
|
+
interface PrototypeHistory {
|
|
2285
|
+
|
|
2286
|
+
/**
|
|
2287
|
+
* The mods that changed this prototype in the order they changed it.
|
|
2288
|
+
*/
|
|
2289
|
+
changed: string[],
|
|
2290
|
+
|
|
2291
|
+
/**
|
|
2292
|
+
* The mod that created this prototype.
|
|
2293
|
+
*/
|
|
2294
|
+
created: string
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2262
2297
|
/**
|
|
2263
2298
|
* 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".
|
|
2264
2299
|
*
|
|
@@ -2545,6 +2580,8 @@ interface TabAndContent {
|
|
|
2545
2580
|
|
|
2546
2581
|
/**
|
|
2547
2582
|
* A dictionary of string to the four basic Lua types: `string`, `boolean`, `number`, `table`.
|
|
2583
|
+
*
|
|
2584
|
+
* Note that the API returns tags as a simple table, meaning any modifications to it will not propagate back to the game. Thus, to modify a set of tags, the whole table needs to be written back to the respective property.
|
|
2548
2585
|
* @example
|
|
2549
2586
|
* ```
|
|
2550
2587
|
* {a = 1, b = true, c = "three", d = {e = "f"}}
|
|
@@ -2572,7 +2609,7 @@ type TechnologyModifier = TechnologyModifierOtherTypes | TechnologyModifierAmmoD
|
|
|
2572
2609
|
* Other attributes may be specified depending on `filter`:
|
|
2573
2610
|
*
|
|
2574
2611
|
*/
|
|
2575
|
-
type TechnologyPrototypeFilter = TechnologyPrototypeFilterLevel | TechnologyPrototypeFilterMaxLevel | TechnologyPrototypeFilterResearchUnitIngredient | TechnologyPrototypeFilterTime | DefaultTechnologyPrototypeFilter
|
|
2612
|
+
type TechnologyPrototypeFilter = TechnologyPrototypeFilterLevel | TechnologyPrototypeFilterMaxLevel | TechnologyPrototypeFilterResearchUnitIngredient | TechnologyPrototypeFilterTime | TechnologyPrototypeFilterUnlocksRecipe | DefaultTechnologyPrototypeFilter
|
|
2576
2613
|
|
|
2577
2614
|
interface Tile {
|
|
2578
2615
|
|
|
@@ -2830,7 +2867,7 @@ interface WireConnectionDefinition {
|
|
|
2830
2867
|
/**
|
|
2831
2868
|
* Mandatory if the source entity has more than one wire connection using copper wire.
|
|
2832
2869
|
*/
|
|
2833
|
-
source_wire_id?: defines.
|
|
2870
|
+
source_wire_id?: defines.wire_connection_id,
|
|
2834
2871
|
|
|
2835
2872
|
/**
|
|
2836
2873
|
* Mandatory if the target entity has more than one circuit connection using circuit wire.
|
|
@@ -2845,7 +2882,7 @@ interface WireConnectionDefinition {
|
|
|
2845
2882
|
/**
|
|
2846
2883
|
* Mandatory if the target entity has more than one wire connection using copper wire.
|
|
2847
2884
|
*/
|
|
2848
|
-
target_wire_id?: defines.
|
|
2885
|
+
target_wire_id?: defines.wire_connection_id,
|
|
2849
2886
|
|
|
2850
2887
|
/**
|
|
2851
2888
|
* Wire color, either {@link defines.wire_type.red | defines.wire_type.red} or {@link defines.wire_type.green | defines.wire_type.green}.
|
|
@@ -5350,6 +5387,79 @@ interface DefaultLuaScriptRaisedReviveEventFilter extends BaseLuaScriptRaisedRev
|
|
|
5350
5387
|
filter: 'ghost' | 'rail' | 'rail-signal' | 'rolling-stock' | 'robot-with-logistics-interface' | 'vehicle' | 'turret' | 'crafting-machine' | 'wall-connectable' | 'transport-belt-connectable' | 'circuit-network-connectable'
|
|
5351
5388
|
}
|
|
5352
5389
|
|
|
5390
|
+
interface BaseLuaScriptRaisedTeleportedEventFilter {
|
|
5391
|
+
|
|
5392
|
+
/**
|
|
5393
|
+
* Inverts the condition. Default is `false`.
|
|
5394
|
+
*/
|
|
5395
|
+
invert?: boolean,
|
|
5396
|
+
|
|
5397
|
+
/**
|
|
5398
|
+
* How to combine this with the previous filter. Must be `"or"` or `"and"`. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
5399
|
+
*/
|
|
5400
|
+
mode?: string
|
|
5401
|
+
}
|
|
5402
|
+
|
|
5403
|
+
interface LuaScriptRaisedTeleportedEventFilterGhostName extends BaseLuaScriptRaisedTeleportedEventFilter {
|
|
5404
|
+
|
|
5405
|
+
/**
|
|
5406
|
+
* The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`.
|
|
5407
|
+
*/
|
|
5408
|
+
filter: 'ghost_name',
|
|
5409
|
+
|
|
5410
|
+
/**
|
|
5411
|
+
* The ghost prototype name
|
|
5412
|
+
*/
|
|
5413
|
+
name: string
|
|
5414
|
+
}
|
|
5415
|
+
|
|
5416
|
+
interface LuaScriptRaisedTeleportedEventFilterGhostType extends BaseLuaScriptRaisedTeleportedEventFilter {
|
|
5417
|
+
|
|
5418
|
+
/**
|
|
5419
|
+
* The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`.
|
|
5420
|
+
*/
|
|
5421
|
+
filter: 'ghost_type',
|
|
5422
|
+
|
|
5423
|
+
/**
|
|
5424
|
+
* The ghost prototype type
|
|
5425
|
+
*/
|
|
5426
|
+
type: string
|
|
5427
|
+
}
|
|
5428
|
+
|
|
5429
|
+
interface LuaScriptRaisedTeleportedEventFilterName extends BaseLuaScriptRaisedTeleportedEventFilter {
|
|
5430
|
+
|
|
5431
|
+
/**
|
|
5432
|
+
* The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`.
|
|
5433
|
+
*/
|
|
5434
|
+
filter: 'name',
|
|
5435
|
+
|
|
5436
|
+
/**
|
|
5437
|
+
* The prototype name
|
|
5438
|
+
*/
|
|
5439
|
+
name: string
|
|
5440
|
+
}
|
|
5441
|
+
|
|
5442
|
+
interface LuaScriptRaisedTeleportedEventFilterType extends BaseLuaScriptRaisedTeleportedEventFilter {
|
|
5443
|
+
|
|
5444
|
+
/**
|
|
5445
|
+
* The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`.
|
|
5446
|
+
*/
|
|
5447
|
+
filter: 'type',
|
|
5448
|
+
|
|
5449
|
+
/**
|
|
5450
|
+
* The prototype type
|
|
5451
|
+
*/
|
|
5452
|
+
type: string
|
|
5453
|
+
}
|
|
5454
|
+
|
|
5455
|
+
interface DefaultLuaScriptRaisedTeleportedEventFilter extends BaseLuaScriptRaisedTeleportedEventFilter {
|
|
5456
|
+
|
|
5457
|
+
/**
|
|
5458
|
+
* The condition to filter on. One of `"ghost"`, `"rail"`, `"rail-signal"`, `"rolling-stock"`, `"robot-with-logistics-interface"`, `"vehicle"`, `"turret"`, `"crafting-machine"`, `"wall-connectable"`, `"transport-belt-connectable"`, `"circuit-network-connectable"`, `"type"`, `"name"`, `"ghost_type"`, `"ghost_name"`.
|
|
5459
|
+
*/
|
|
5460
|
+
filter: 'ghost' | 'rail' | 'rail-signal' | 'rolling-stock' | 'robot-with-logistics-interface' | 'vehicle' | 'turret' | 'crafting-machine' | 'wall-connectable' | 'transport-belt-connectable' | 'circuit-network-connectable'
|
|
5461
|
+
}
|
|
5462
|
+
|
|
5353
5463
|
interface BaseLuaSectorScannedEventFilter {
|
|
5354
5464
|
|
|
5355
5465
|
/**
|
|
@@ -5896,7 +6006,7 @@ interface BaseTechnologyPrototypeFilter {
|
|
|
5896
6006
|
interface TechnologyPrototypeFilterLevel extends BaseTechnologyPrototypeFilter {
|
|
5897
6007
|
|
|
5898
6008
|
/**
|
|
5899
|
-
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"level"`, `"max-level"`, `"time"`.
|
|
6009
|
+
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"unlocks-recipe"`, `"level"`, `"max-level"`, `"time"`.
|
|
5900
6010
|
*/
|
|
5901
6011
|
filter: 'level',
|
|
5902
6012
|
comparison: ComparatorString,
|
|
@@ -5910,7 +6020,7 @@ interface TechnologyPrototypeFilterLevel extends BaseTechnologyPrototypeFilter {
|
|
|
5910
6020
|
interface TechnologyPrototypeFilterMaxLevel extends BaseTechnologyPrototypeFilter {
|
|
5911
6021
|
|
|
5912
6022
|
/**
|
|
5913
|
-
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"level"`, `"max-level"`, `"time"`.
|
|
6023
|
+
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"unlocks-recipe"`, `"level"`, `"max-level"`, `"time"`.
|
|
5914
6024
|
*/
|
|
5915
6025
|
filter: 'max-level',
|
|
5916
6026
|
comparison: ComparatorString,
|
|
@@ -5924,7 +6034,7 @@ interface TechnologyPrototypeFilterMaxLevel extends BaseTechnologyPrototypeFilte
|
|
|
5924
6034
|
interface TechnologyPrototypeFilterResearchUnitIngredient extends BaseTechnologyPrototypeFilter {
|
|
5925
6035
|
|
|
5926
6036
|
/**
|
|
5927
|
-
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"level"`, `"max-level"`, `"time"`.
|
|
6037
|
+
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"unlocks-recipe"`, `"level"`, `"max-level"`, `"time"`.
|
|
5928
6038
|
*/
|
|
5929
6039
|
filter: 'research-unit-ingredient',
|
|
5930
6040
|
|
|
@@ -5937,7 +6047,7 @@ interface TechnologyPrototypeFilterResearchUnitIngredient extends BaseTechnology
|
|
|
5937
6047
|
interface TechnologyPrototypeFilterTime extends BaseTechnologyPrototypeFilter {
|
|
5938
6048
|
|
|
5939
6049
|
/**
|
|
5940
|
-
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"level"`, `"max-level"`, `"time"`.
|
|
6050
|
+
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"unlocks-recipe"`, `"level"`, `"max-level"`, `"time"`.
|
|
5941
6051
|
*/
|
|
5942
6052
|
filter: 'time',
|
|
5943
6053
|
comparison: ComparatorString,
|
|
@@ -5948,10 +6058,23 @@ interface TechnologyPrototypeFilterTime extends BaseTechnologyPrototypeFilter {
|
|
|
5948
6058
|
value: number
|
|
5949
6059
|
}
|
|
5950
6060
|
|
|
6061
|
+
interface TechnologyPrototypeFilterUnlocksRecipe extends BaseTechnologyPrototypeFilter {
|
|
6062
|
+
|
|
6063
|
+
/**
|
|
6064
|
+
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"unlocks-recipe"`, `"level"`, `"max-level"`, `"time"`.
|
|
6065
|
+
*/
|
|
6066
|
+
filter: 'unlocks-recipe',
|
|
6067
|
+
|
|
6068
|
+
/**
|
|
6069
|
+
* The recipe to check.
|
|
6070
|
+
*/
|
|
6071
|
+
recipe: string
|
|
6072
|
+
}
|
|
6073
|
+
|
|
5951
6074
|
interface DefaultTechnologyPrototypeFilter extends BaseTechnologyPrototypeFilter {
|
|
5952
6075
|
|
|
5953
6076
|
/**
|
|
5954
|
-
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"level"`, `"max-level"`, `"time"`.
|
|
6077
|
+
* The condition to filter on. One of `"enabled"`, `"hidden"`, `"upgrade"`, `"visible-when-disabled"`, `"has-effects"`, `"has-prerequisites"`, `"research-unit-ingredient"`, `"unlocks-recipe"`, `"level"`, `"max-level"`, `"time"`.
|
|
5955
6078
|
*/
|
|
5956
6079
|
filter: 'enabled' | 'hidden' | 'upgrade' | 'visible-when-disabled' | 'has-effects' | 'has-prerequisites'
|
|
5957
6080
|
}
|
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.77
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -673,6 +673,7 @@ declare namespace defines {
|
|
|
673
673
|
script_raised_destroy,
|
|
674
674
|
script_raised_revive,
|
|
675
675
|
script_raised_set_tiles,
|
|
676
|
+
script_raised_teleported,
|
|
676
677
|
}
|
|
677
678
|
enum flow_precision_index {
|
|
678
679
|
fifty_hours,
|
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.77
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1317,6 +1317,10 @@ interface on_player_fast_transferred extends event {
|
|
|
1317
1317
|
* Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.
|
|
1318
1318
|
*/
|
|
1319
1319
|
from_player: boolean
|
|
1320
|
+
/**
|
|
1321
|
+
* Whether the transfer was a split action (half stack).
|
|
1322
|
+
*/
|
|
1323
|
+
is_split: boolean
|
|
1320
1324
|
/**
|
|
1321
1325
|
* The player transferred from or to.
|
|
1322
1326
|
*/
|
|
@@ -1765,7 +1769,7 @@ interface on_post_entity_died extends event {
|
|
|
1765
1769
|
*/
|
|
1766
1770
|
interface on_pre_build extends event {
|
|
1767
1771
|
/**
|
|
1768
|
-
*
|
|
1772
|
+
* Whether the item was placed while moving.
|
|
1769
1773
|
*/
|
|
1770
1774
|
created_by_moving: boolean
|
|
1771
1775
|
/**
|
|
@@ -1773,11 +1777,11 @@ interface on_pre_build extends event {
|
|
|
1773
1777
|
*/
|
|
1774
1778
|
direction: defines.direction
|
|
1775
1779
|
/**
|
|
1776
|
-
*
|
|
1780
|
+
* Whether the blueprint was flipped horizontally. `nil` if not built by a blueprint.
|
|
1777
1781
|
*/
|
|
1778
1782
|
flip_horizontal: boolean
|
|
1779
1783
|
/**
|
|
1780
|
-
*
|
|
1784
|
+
* Whether the blueprint was flipped vertically. `nil` if not built by a blueprint.
|
|
1781
1785
|
*/
|
|
1782
1786
|
flip_vertical: boolean
|
|
1783
1787
|
/**
|
|
@@ -2282,7 +2286,7 @@ interface on_spider_command_completed extends event {
|
|
|
2282
2286
|
vehicle: LuaEntity
|
|
2283
2287
|
}
|
|
2284
2288
|
/**
|
|
2285
|
-
* Called when a translation request generated through {@link LuaPlayer::request_translation | LuaPlayer::request_translation}
|
|
2289
|
+
* Called when a translation request generated through {@link LuaPlayer::request_translation | LuaPlayer::request_translation} or {@link LuaPlayer::request_translations | LuaPlayer::request_translations} has been completed.
|
|
2286
2290
|
*/
|
|
2287
2291
|
interface on_string_translated extends event {
|
|
2288
2292
|
/**
|
|
@@ -2477,3 +2481,20 @@ interface script_raised_set_tiles extends event {
|
|
|
2477
2481
|
*/
|
|
2478
2482
|
tiles: Tile[]
|
|
2479
2483
|
}
|
|
2484
|
+
/**
|
|
2485
|
+
* A static event mods can use to tell other mods they teleported something by script. This event is only raised if a mod does so with {@link LuaBootstrap::raise_event | LuaBootstrap::raise_event} or {@link LuaBootstrap::raise_script_teleported | LuaBootstrap::raise_script_teleported}, or when `raise_teleported` is passed to {@link LuaControl::teleport | LuaControl::teleport}. Can be filtered using {@link LuaScriptRaisedTeleportedEventFilter | LuaScriptRaisedTeleportedEventFilter}.
|
|
2486
|
+
*/
|
|
2487
|
+
interface script_raised_teleported extends event {
|
|
2488
|
+
/**
|
|
2489
|
+
* The entity that was teleported.
|
|
2490
|
+
*/
|
|
2491
|
+
entity: LuaEntity
|
|
2492
|
+
/**
|
|
2493
|
+
* The entity's position before the teleportation.
|
|
2494
|
+
*/
|
|
2495
|
+
old_position: MapPosition
|
|
2496
|
+
/**
|
|
2497
|
+
* The entity's surface before the teleportation.
|
|
2498
|
+
*/
|
|
2499
|
+
old_surface_index: number
|
|
2500
|
+
}
|
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.77
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|