typed-factorio 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Changelog.md +16 -0
- package/README.md +25 -28
- package/generated/classes.d.ts +1134 -380
- package/generated/concepts.d.ts +194 -129
- package/generated/defines.d.ts +2 -2
- package/generated/events.d.ts +65 -17
- package/package.json +1 -1
package/generated/events.d.ts
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
/** @noSelfInFile */
|
4
4
|
|
5
5
|
/**
|
6
|
-
* Called when a {@
|
6
|
+
* Called when a {@linkplain https://wiki.factorio.com/Prototype/CustomInput CustomInput} is activated.
|
7
7
|
*
|
8
8
|
* {@link https://lua-api.factorio.com/latest/events.html#CustomInputEvent View documentation}
|
9
9
|
*/
|
@@ -88,8 +88,11 @@ interface OnAreaClonedEvent extends EventData {
|
|
88
88
|
/**
|
89
89
|
* Called when a biter migration builds a base.
|
90
90
|
*
|
91
|
+
* **Note**
|
92
|
+
*
|
93
|
+
* This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
94
|
+
*
|
91
95
|
* {@link https://lua-api.factorio.com/latest/events.html#on_biter_base_built View documentation}
|
92
|
-
* @remarks This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
|
93
96
|
*/
|
94
97
|
interface OnBiterBaseBuiltEvent extends EventData {
|
95
98
|
/**
|
@@ -223,8 +226,11 @@ interface OnCancelledUpgradeEvent extends EventData {
|
|
223
226
|
/**
|
224
227
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
225
228
|
*
|
229
|
+
* **Note**
|
230
|
+
*
|
231
|
+
* this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
232
|
+
*
|
226
233
|
* {@link https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired View documentation}
|
227
|
-
* @remarks this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item} to detect that.
|
228
234
|
*/
|
229
235
|
interface OnCharacterCorpseExpiredEvent extends EventData {
|
230
236
|
/**
|
@@ -397,8 +403,11 @@ interface OnCombatRobotExpiredEvent extends EventData {
|
|
397
403
|
/**
|
398
404
|
* Called when a message is sent to the in-game console, either by a player or through the server interface.
|
399
405
|
*
|
406
|
+
* **Note**
|
407
|
+
*
|
408
|
+
* This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
409
|
+
*
|
400
410
|
* {@link https://lua-api.factorio.com/latest/events.html#on_console_chat View documentation}
|
401
|
-
* @remarks This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
|
402
411
|
*/
|
403
412
|
interface OnConsoleChatEvent extends EventData {
|
404
413
|
/**
|
@@ -472,8 +481,11 @@ interface OnCutsceneCancelledEvent extends EventData {
|
|
472
481
|
*
|
473
482
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
474
483
|
*
|
484
|
+
* **Note**
|
485
|
+
*
|
486
|
+
* Due to implementation omission, waypoint_index is 0-based.
|
487
|
+
*
|
475
488
|
* {@link https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached View documentation}
|
476
|
-
* @remarks Due to implementation omission, waypoint_index is 0-based.
|
477
489
|
*/
|
478
490
|
interface OnCutsceneWaypointReachedEvent extends EventData {
|
479
491
|
/**
|
@@ -497,8 +509,11 @@ interface OnCutsceneWaypointReachedEvent extends EventData {
|
|
497
509
|
/**
|
498
510
|
* Called when the map difficulty settings are changed.
|
499
511
|
*
|
512
|
+
* **Note**
|
513
|
+
*
|
514
|
+
* It's not guaranteed that both settings are changed - just that at least one has been changed.
|
515
|
+
*
|
500
516
|
* {@link https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed View documentation}
|
501
|
-
* @remarks It's not guaranteed that both settings are changed - just that at least one has been changed.
|
502
517
|
*/
|
503
518
|
interface OnDifficultySettingsChangedEvent extends EventData {
|
504
519
|
readonly old_recipe_difficulty: uint
|
@@ -534,8 +549,11 @@ interface OnEntityClonedEvent extends EventData {
|
|
534
549
|
/**
|
535
550
|
* Called when an entity is damaged. Can be filtered using {@link LuaEntityDamagedEventFilter}.
|
536
551
|
*
|
552
|
+
* **Note**
|
553
|
+
*
|
554
|
+
* This is not called when an entities health is set directly by another mod.
|
555
|
+
*
|
537
556
|
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_damaged View documentation}
|
538
|
-
* @remarks This is not called when an entities health is set directly by another mod.
|
539
557
|
*/
|
540
558
|
interface OnEntityDamagedEvent extends EventData {
|
541
559
|
readonly entity: LuaEntity
|
@@ -573,8 +591,11 @@ interface OnEntityDamagedEvent extends EventData {
|
|
573
591
|
/**
|
574
592
|
* Called after an entity is destroyed that has been registered with {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap::register_on_entity_destroyed}.
|
575
593
|
*
|
594
|
+
* **Note**
|
595
|
+
*
|
596
|
+
* Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.
|
597
|
+
*
|
576
598
|
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_destroyed View documentation}
|
577
|
-
* @remarks Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.
|
578
599
|
*/
|
579
600
|
interface OnEntityDestroyedEvent extends EventData {
|
580
601
|
/**
|
@@ -634,8 +655,11 @@ interface OnEntityDiedEvent extends EventData {
|
|
634
655
|
/**
|
635
656
|
* Called when one of an entity's personal logistic slots changes.
|
636
657
|
*
|
658
|
+
* **Note**
|
659
|
+
*
|
660
|
+
* "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
|
661
|
+
*
|
637
662
|
* {@link https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed View documentation}
|
638
|
-
* @remarks "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
|
639
663
|
*/
|
640
664
|
interface OnEntityLogisticSlotChangedEvent extends EventData {
|
641
665
|
/**
|
@@ -809,8 +833,11 @@ interface OnForceCeaseFireChangedEvent extends EventData {
|
|
809
833
|
/**
|
810
834
|
* Called when a new force is created using `game.create_force()`
|
811
835
|
*
|
836
|
+
* **Note**
|
837
|
+
*
|
838
|
+
* This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
839
|
+
*
|
812
840
|
* {@link https://lua-api.factorio.com/latest/events.html#on_force_created View documentation}
|
813
|
-
* @remarks This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
|
814
841
|
*/
|
815
842
|
interface OnForceCreatedEvent extends EventData {
|
816
843
|
/**
|
@@ -875,8 +902,11 @@ interface OnForceResetEvent extends EventData {
|
|
875
902
|
/**
|
876
903
|
* Called after two forces have been merged using `game.merge_forces()`.
|
877
904
|
*
|
905
|
+
* **Note**
|
906
|
+
*
|
907
|
+
* The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
908
|
+
*
|
878
909
|
* {@link https://lua-api.factorio.com/latest/events.html#on_forces_merged View documentation}
|
879
|
-
* @remarks The source force is invalidated before this event is called and the name can be re-used in this event if desired.
|
880
910
|
*/
|
881
911
|
interface OnForcesMergedEvent extends EventData {
|
882
912
|
/**
|
@@ -928,8 +958,11 @@ interface OnForcesMergingEvent extends EventData {
|
|
928
958
|
/**
|
929
959
|
* Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data already includes it. In those cases however, {@link LuaBootstrap#on_init LuaBootstrap::on_init} is not fired.
|
930
960
|
*
|
961
|
+
* **Note**
|
962
|
+
*
|
963
|
+
* This event is not fired when the scenario is loaded via the map editor.
|
964
|
+
*
|
931
965
|
* {@link https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario View documentation}
|
932
|
-
* @remarks This event is not fired when the scenario is loaded via the map editor.
|
933
966
|
*/
|
934
967
|
interface OnGameCreatedFromScenarioEvent extends EventData {
|
935
968
|
/**
|
@@ -1011,8 +1044,11 @@ interface OnGuiClickEvent extends EventData {
|
|
1011
1044
|
*
|
1012
1045
|
* This can only be raised when the GUI's player controller is still valid. If a GUI is thus closed due to the player disconnecting, dying, or becoming a spectator in other ways, it won't cause this event to be raised.
|
1013
1046
|
*
|
1047
|
+
* **Note**
|
1048
|
+
*
|
1049
|
+
* It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.
|
1050
|
+
*
|
1014
1051
|
* {@link https://lua-api.factorio.com/latest/events.html#on_gui_closed View documentation}
|
1015
|
-
* @remarks It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.
|
1016
1052
|
*/
|
1017
1053
|
interface OnGuiClosedEvent extends EventData {
|
1018
1054
|
/**
|
@@ -1811,8 +1847,11 @@ interface OnPlayerChangedPositionEvent extends EventData {
|
|
1811
1847
|
/**
|
1812
1848
|
* Called after a player changes surfaces.
|
1813
1849
|
*
|
1850
|
+
* **Note**
|
1851
|
+
*
|
1852
|
+
* In the instance a player is moved off a surface due to it being deleted this is not called.
|
1853
|
+
*
|
1814
1854
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_changed_surface View documentation}
|
1815
|
-
* @remarks In the instance a player is moved off a surface due to it being deleted this is not called.
|
1816
1855
|
*/
|
1817
1856
|
interface OnPlayerChangedSurfaceEvent extends EventData {
|
1818
1857
|
/**
|
@@ -2335,8 +2374,11 @@ interface OnPlayerMainInventoryChangedEvent extends EventData {
|
|
2335
2374
|
/**
|
2336
2375
|
* Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the player as if they came from mining the entity. Can be filtered using {@link LuaPlayerMinedEntityEventFilter}.
|
2337
2376
|
*
|
2377
|
+
* **Note**
|
2378
|
+
*
|
2379
|
+
* The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
2380
|
+
*
|
2338
2381
|
* {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_entity View documentation}
|
2339
|
-
* @remarks The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
2340
2382
|
*/
|
2341
2383
|
interface OnPlayerMinedEntityEvent extends EventData {
|
2342
2384
|
/**
|
@@ -3565,8 +3607,11 @@ interface OnRobotMinedEvent extends EventData {
|
|
3565
3607
|
/**
|
3566
3608
|
* Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the robot as if they came from mining the entity. Can be filtered using {@link LuaRobotMinedEntityEventFilter}.
|
3567
3609
|
*
|
3610
|
+
* **Note**
|
3611
|
+
*
|
3612
|
+
* The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
3613
|
+
*
|
3568
3614
|
* {@link https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity View documentation}
|
3569
|
-
* @remarks The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
3570
3615
|
*/
|
3571
3616
|
interface OnRobotMinedEntityEvent extends EventData {
|
3572
3617
|
/**
|
@@ -3932,8 +3977,11 @@ interface OnSurfaceClearedEvent extends EventData {
|
|
3932
3977
|
/**
|
3933
3978
|
* Called when a surface is created.
|
3934
3979
|
*
|
3980
|
+
* **Note**
|
3981
|
+
*
|
3982
|
+
* This is not called when the default surface is created as it will always exist.
|
3983
|
+
*
|
3935
3984
|
* {@link https://lua-api.factorio.com/latest/events.html#on_surface_created View documentation}
|
3936
|
-
* @remarks This is not called when the default surface is created as it will always exist.
|
3937
3985
|
*/
|
3938
3986
|
interface OnSurfaceCreatedEvent extends EventData {
|
3939
3987
|
readonly surface_index: SurfaceIndex
|