factorio-types 1.2.50 → 1.2.51
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 +61 -11
- package/dist/concepts.d.ts +11 -3
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +122 -121
- package/dist/events.d.ts +19 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +36 -6
- package/dist/types.d.ts +33 -4
- package/package.json +2 -2
package/dist/classes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -2157,6 +2157,24 @@ interface LuaBootstrap {
|
|
|
2157
2157
|
script.on_event(defines.events.on_built_entity,
|
|
2158
2158
|
function(event) game.print("Gotta go fast!") end,
|
|
2159
2159
|
{{filter = "name", name = "fast-inserter"}})
|
|
2160
|
+
```
|
|
2161
|
+
*/
|
|
2162
|
+
on_event(this: void, event: defines.events.on_player_dropped_item_into_entity, handler: ((this: void, arg0: runtime.on_player_dropped_item_into_entity) => any) | nil, filters?: EventFilter): void;
|
|
2163
|
+
/**
|
|
2164
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2165
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
2166
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
2167
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
2168
|
+
* @example ```
|
|
2169
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
2170
|
+
script.on_event(defines.events.on_tick,
|
|
2171
|
+
function(event) game.print(event.tick) end)
|
|
2172
|
+
```
|
|
2173
|
+
* @example ```
|
|
2174
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
2175
|
+
script.on_event(defines.events.on_built_entity,
|
|
2176
|
+
function(event) game.print("Gotta go fast!") end,
|
|
2177
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
2160
2178
|
```
|
|
2161
2179
|
*/
|
|
2162
2180
|
on_event(this: void, event: defines.events.on_player_fast_transferred, handler: ((this: void, arg0: runtime.on_player_fast_transferred) => any) | nil, filters?: EventFilter): void;
|
|
@@ -6830,11 +6848,11 @@ interface LuaEntity extends LuaControl {
|
|
|
6830
6848
|
/**
|
|
6831
6849
|
* Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
|
|
6832
6850
|
*
|
|
6833
|
-
*
|
|
6851
|
+
* Writing to this is deprecated and affects only the {@link disabled_by_script | runtime:LuaEntity::disabled_by_script} state.
|
|
6834
6852
|
*
|
|
6835
|
-
*
|
|
6853
|
+
* Reading from this returns `false` if the entity is deactivated in at least one of the following ways: {@link by script | runtime:LuaEntity::disabled_by_script}, {@link by circuit network | runtime:LuaEntity::disabled_by_control_behavior}, {@link by recipe | runtime:LuaEntity::disabled_by_recipe}, {@link by freezing | runtime:LuaEntity::frozen}, or by deconstruction.
|
|
6836
6854
|
*
|
|
6837
|
-
*
|
|
6855
|
+
* Entities that are not active naturally can't be set to be active (setting it to be active will do nothing). Some entities (Corpse, FireFlame, Roboport, RollingStock, dying entities) need to remain active and will ignore writes.
|
|
6838
6856
|
*/
|
|
6839
6857
|
active: boolean;
|
|
6840
6858
|
/**
|
|
@@ -7085,7 +7103,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7085
7103
|
*/
|
|
7086
7104
|
readonly disabled_by_control_behavior: boolean;
|
|
7087
7105
|
/**
|
|
7088
|
-
* If the
|
|
7106
|
+
* If the assembling machine is disabled by recipe, e.g. due to {@link AssemblingMachinePrototype::disabled_when_recipe_not_researched | prototype:AssemblingMachinePrototype::disabled_when_recipe_not_researched}.
|
|
7089
7107
|
*/
|
|
7090
7108
|
readonly disabled_by_recipe: boolean;
|
|
7091
7109
|
/**
|
|
@@ -7129,7 +7147,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7129
7147
|
*/
|
|
7130
7148
|
readonly effective_speed?: float;
|
|
7131
7149
|
/**
|
|
7132
|
-
* Multiplies the acceleration the
|
|
7150
|
+
* Multiplies the acceleration the car can create for one unit of energy. Defaults to `1`.
|
|
7133
7151
|
*/
|
|
7134
7152
|
effectivity_modifier: float;
|
|
7135
7153
|
/**
|
|
@@ -7420,6 +7438,10 @@ interface LuaEntity extends LuaControl {
|
|
|
7420
7438
|
* Script controlled flag that allows entity to be mined.
|
|
7421
7439
|
*/
|
|
7422
7440
|
minable_flag: boolean;
|
|
7441
|
+
/**
|
|
7442
|
+
* Area in which this mining drill looks for resources to mine.
|
|
7443
|
+
*/
|
|
7444
|
+
readonly mining_area: BoundingBox;
|
|
7423
7445
|
/**
|
|
7424
7446
|
* The filter mode for this mining drill. `nil` if this mining drill doesn't have filters.
|
|
7425
7447
|
*/
|
|
@@ -7433,7 +7455,9 @@ interface LuaEntity extends LuaControl {
|
|
|
7433
7455
|
*/
|
|
7434
7456
|
readonly mining_target?: LuaEntity;
|
|
7435
7457
|
/**
|
|
7436
|
-
*
|
|
7458
|
+
* Whether the entity is currently mirrored. This state is referred to as `flipped` elsewhere, such as on the {@link on_player_flipped_entity | runtime:on_player_flipped_entity} event.
|
|
7459
|
+
*
|
|
7460
|
+
* If an entity is mirrored, it is flipped over the axis that is pointing in the entity's direction. For example if a mirrored entity is facing north, everything that was defined to be facing east in the prototype now faces west.
|
|
7437
7461
|
*/
|
|
7438
7462
|
mirroring: boolean;
|
|
7439
7463
|
/**
|
|
@@ -8187,6 +8211,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8187
8211
|
*/
|
|
8188
8212
|
readonly color?: Color;
|
|
8189
8213
|
readonly combat_robot_friction?: double;
|
|
8214
|
+
readonly connection_category: string[];
|
|
8190
8215
|
readonly connection_distance?: double;
|
|
8191
8216
|
/**
|
|
8192
8217
|
* The construction radius for this roboport prototype.
|
|
@@ -10167,6 +10192,10 @@ interface LuaForce {
|
|
|
10167
10192
|
* Reapplies all possible research effects, including unlocked recipes. Any custom changes are lost. Preserves research state of technologies.
|
|
10168
10193
|
*/
|
|
10169
10194
|
reset_technology_effects(this: void): void;
|
|
10195
|
+
/**
|
|
10196
|
+
* Trigger the "scripted" {@link research trigger | runtime:ResearchTrigger} of a technology, researching it. Does nothing if the technology does not have a "scripted" research trigger.
|
|
10197
|
+
*/
|
|
10198
|
+
script_trigger_research(this: void, technology: TechnologyID): void;
|
|
10170
10199
|
/**
|
|
10171
10200
|
* @param ammo Ammo category
|
|
10172
10201
|
*/
|
|
@@ -12951,10 +12980,26 @@ interface LuaItemCommon {
|
|
|
12951
12980
|
* Durability of the contained item. Automatically capped at the item's maximum durability.
|
|
12952
12981
|
*/
|
|
12953
12982
|
durability: double;
|
|
12983
|
+
/**
|
|
12984
|
+
* If this is an item with entity data, get the stored auto target with gunner state.
|
|
12985
|
+
*/
|
|
12986
|
+
entity_auto_target_with_gunner: boolean;
|
|
12987
|
+
/**
|
|
12988
|
+
* If this is an item with entity data, get the stored auto target without gunner state.
|
|
12989
|
+
*/
|
|
12990
|
+
entity_auto_target_without_gunner: boolean;
|
|
12954
12991
|
/**
|
|
12955
12992
|
* If this is an item with entity data, get the stored entity color.
|
|
12956
12993
|
*/
|
|
12957
12994
|
entity_color?: Color;
|
|
12995
|
+
/**
|
|
12996
|
+
* If this is an item with entity data, get the stored driver is gunner state.
|
|
12997
|
+
*/
|
|
12998
|
+
entity_driver_is_gunner: boolean;
|
|
12999
|
+
/**
|
|
13000
|
+
* If this is an item with entity data, get the stored enable logistics while moving state.
|
|
13001
|
+
*/
|
|
13002
|
+
entity_enable_logistics_while_moving: boolean;
|
|
12958
13003
|
/**
|
|
12959
13004
|
* The number of entity filters this deconstruction item supports.
|
|
12960
13005
|
*/
|
|
@@ -12975,6 +13020,10 @@ interface LuaItemCommon {
|
|
|
12975
13020
|
* If this is an item with entity data, get the stored logistic filters.
|
|
12976
13021
|
*/
|
|
12977
13022
|
entity_logistic_sections: LogisticSections;
|
|
13023
|
+
/**
|
|
13024
|
+
* If this is an item with entity data, get the stored vehicle logistics enabled state.
|
|
13025
|
+
*/
|
|
13026
|
+
entity_logistics_enabled: boolean;
|
|
12978
13027
|
/**
|
|
12979
13028
|
* If this is an item with entity data, get the stored request from buffer state.
|
|
12980
13029
|
*/
|
|
@@ -16160,7 +16209,7 @@ interface LuaRecord {
|
|
|
16160
16209
|
*/
|
|
16161
16210
|
get_blueprint_entity_count(this: void): uint32;
|
|
16162
16211
|
/**
|
|
16163
|
-
* Gets the given tag on the given blueprint entity index in this blueprint
|
|
16212
|
+
* Gets the given tag on the given blueprint entity index in this blueprint.
|
|
16164
16213
|
* @param index The entity index.
|
|
16165
16214
|
* @param tag The tag to get.
|
|
16166
16215
|
*/
|
|
@@ -16204,7 +16253,7 @@ interface LuaRecord {
|
|
|
16204
16253
|
*/
|
|
16205
16254
|
set_blueprint_entities(this: void, entities: BlueprintEntity[]): void;
|
|
16206
16255
|
/**
|
|
16207
|
-
* Sets the given tag on the given blueprint entity index in this blueprint
|
|
16256
|
+
* Sets the given tag on the given blueprint entity index in this blueprint.
|
|
16208
16257
|
* @param index The entity index.
|
|
16209
16258
|
* @param tag The tag to set.
|
|
16210
16259
|
* @param value The tag value to set or `nil` to clear the tag.
|
|
@@ -16245,7 +16294,7 @@ interface LuaRecord {
|
|
|
16245
16294
|
*/
|
|
16246
16295
|
blueprint_absolute_snapping: boolean;
|
|
16247
16296
|
/**
|
|
16248
|
-
* The description for this blueprint or blueprint book
|
|
16297
|
+
* The description for this blueprint or blueprint book.
|
|
16249
16298
|
*/
|
|
16250
16299
|
blueprint_description: string;
|
|
16251
16300
|
/**
|
|
@@ -16903,6 +16952,7 @@ interface LuaRendering {
|
|
|
16903
16952
|
* @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
|
16904
16953
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
16905
16954
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
16955
|
+
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
16906
16956
|
* @example ```
|
|
16907
16957
|
-- This will draw an iron plate icon at the character's feet. The sprite will move together with the character.
|
|
16908
16958
|
rendering.draw_sprite{sprite = "item.iron-plate", target = game.player.character, surface = game.player.surface}
|
|
@@ -16910,7 +16960,6 @@ interface LuaRendering {
|
|
|
16910
16960
|
* @example ```
|
|
16911
16961
|
-- This will draw an iron plate icon at the character's head. The sprite will move together with the character.
|
|
16912
16962
|
rendering.draw_sprite{sprite = "item.iron-plate", target = {entity = game.player.character, offset = {0, -2}}, surface = game.player.surface}
|
|
16913
|
-
$field(render_mode, ScriptRenderMode, $optional) Mode which this object should render in. Defaults to "game".
|
|
16914
16963
|
```
|
|
16915
16964
|
*/
|
|
16916
16965
|
draw_sprite(this: void, table: {
|
|
@@ -16931,6 +16980,7 @@ interface LuaRendering {
|
|
|
16931
16980
|
players?: PlayerIdentification[];
|
|
16932
16981
|
visible?: boolean;
|
|
16933
16982
|
only_in_alt_mode?: boolean;
|
|
16983
|
+
render_mode?: ScriptRenderMode;
|
|
16934
16984
|
}): LuaRenderObject;
|
|
16935
16985
|
/**
|
|
16936
16986
|
* Create a text.
|
package/dist/concepts.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -7862,9 +7862,9 @@ interface ResearchIngredient {
|
|
|
7862
7862
|
amount: uint16;
|
|
7863
7863
|
}
|
|
7864
7864
|
interface BaseResearchTrigger {
|
|
7865
|
-
type: 'craft-item' | 'mine-entity' | 'craft-fluid' | 'send-item-to-orbit' | 'capture-spawner' | 'build-entity' | 'create-space-platform';
|
|
7865
|
+
type: 'craft-item' | 'mine-entity' | 'craft-fluid' | 'send-item-to-orbit' | 'capture-spawner' | 'build-entity' | 'create-space-platform' | 'scripted';
|
|
7866
7866
|
}
|
|
7867
|
-
type ResearchTrigger = BaseResearchTrigger | ResearchTriggerBuildEntity | ResearchTriggerCaptureSpawner | ResearchTriggerCraftFluid | ResearchTriggerCraftItem | ResearchTriggerMineEntity | ResearchTriggerSendItemToOrbit;
|
|
7867
|
+
type ResearchTrigger = BaseResearchTrigger | ResearchTriggerBuildEntity | ResearchTriggerCaptureSpawner | ResearchTriggerCraftFluid | ResearchTriggerCraftItem | ResearchTriggerMineEntity | ResearchTriggerScripted | ResearchTriggerSendItemToOrbit;
|
|
7868
7868
|
/**
|
|
7869
7869
|
*
|
|
7870
7870
|
* Applies to variant case `build-entity`
|
|
@@ -7907,6 +7907,14 @@ interface ResearchTriggerMineEntity extends BaseResearchTrigger {
|
|
|
7907
7907
|
'type': 'mine-entity';
|
|
7908
7908
|
'entity': string;
|
|
7909
7909
|
}
|
|
7910
|
+
/**
|
|
7911
|
+
*
|
|
7912
|
+
* Applies to variant case `scripted`
|
|
7913
|
+
*/
|
|
7914
|
+
interface ResearchTriggerScripted extends BaseResearchTrigger {
|
|
7915
|
+
'type': 'scripted';
|
|
7916
|
+
'trigger_description': LocalisedString;
|
|
7917
|
+
}
|
|
7910
7918
|
/**
|
|
7911
7919
|
*
|
|
7912
7920
|
* Applies to variant case `send-item-to-orbit`
|
package/dist/datacollection.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
package/dist/defines.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -787,126 +787,127 @@ enum events {
|
|
|
787
787
|
on_player_display_scale_changed = 94,
|
|
788
788
|
on_player_driving_changed_state = 95,
|
|
789
789
|
on_player_dropped_item = 96,
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
790
|
+
on_player_dropped_item_into_entity = 97,
|
|
791
|
+
on_player_fast_transferred = 98,
|
|
792
|
+
on_player_flipped_entity = 99,
|
|
793
|
+
on_player_flushed_fluid = 100,
|
|
794
|
+
on_player_gun_inventory_changed = 101,
|
|
795
|
+
on_player_input_method_changed = 102,
|
|
796
|
+
on_player_joined_game = 103,
|
|
797
|
+
on_player_kicked = 104,
|
|
798
|
+
on_player_left_game = 105,
|
|
799
|
+
on_player_locale_changed = 106,
|
|
800
|
+
on_player_main_inventory_changed = 107,
|
|
801
|
+
on_player_mined_entity = 108,
|
|
802
|
+
on_player_mined_item = 109,
|
|
803
|
+
on_player_mined_tile = 110,
|
|
804
|
+
on_player_muted = 111,
|
|
805
|
+
on_player_pipette = 112,
|
|
806
|
+
on_player_placed_equipment = 113,
|
|
807
|
+
on_player_promoted = 114,
|
|
808
|
+
on_player_removed = 115,
|
|
809
|
+
on_player_removed_equipment = 116,
|
|
810
|
+
on_player_repaired_entity = 117,
|
|
811
|
+
on_player_respawned = 118,
|
|
812
|
+
on_player_reverse_selected_area = 119,
|
|
813
|
+
on_player_rotated_entity = 120,
|
|
814
|
+
on_player_selected_area = 121,
|
|
815
|
+
on_player_set_quick_bar_slot = 122,
|
|
816
|
+
on_player_setup_blueprint = 123,
|
|
817
|
+
on_player_toggled_alt_mode = 124,
|
|
818
|
+
on_player_toggled_map_editor = 125,
|
|
819
|
+
on_player_trash_inventory_changed = 126,
|
|
820
|
+
on_player_unbanned = 127,
|
|
821
|
+
on_player_unmuted = 128,
|
|
822
|
+
on_player_used_capsule = 129,
|
|
823
|
+
on_player_used_spidertron_remote = 130,
|
|
824
|
+
on_post_entity_died = 131,
|
|
825
|
+
on_post_segmented_unit_died = 132,
|
|
826
|
+
on_pre_build = 133,
|
|
827
|
+
on_pre_chunk_deleted = 134,
|
|
828
|
+
on_pre_entity_settings_pasted = 135,
|
|
829
|
+
on_pre_ghost_deconstructed = 136,
|
|
830
|
+
on_pre_ghost_upgraded = 137,
|
|
831
|
+
on_pre_permission_group_deleted = 138,
|
|
832
|
+
on_pre_permission_string_imported = 139,
|
|
833
|
+
on_pre_player_crafted_item = 140,
|
|
834
|
+
on_pre_player_died = 141,
|
|
835
|
+
on_pre_player_left_game = 142,
|
|
836
|
+
on_pre_player_mined_item = 143,
|
|
837
|
+
on_pre_player_removed = 144,
|
|
838
|
+
on_pre_player_toggled_map_editor = 145,
|
|
839
|
+
on_pre_robot_exploded_cliff = 146,
|
|
840
|
+
on_pre_scenario_finished = 147,
|
|
841
|
+
on_pre_script_inventory_resized = 148,
|
|
842
|
+
on_pre_surface_cleared = 149,
|
|
843
|
+
on_pre_surface_deleted = 150,
|
|
844
|
+
on_redo_applied = 151,
|
|
845
|
+
on_research_cancelled = 152,
|
|
846
|
+
on_research_finished = 153,
|
|
847
|
+
on_research_moved = 154,
|
|
848
|
+
on_research_queued = 155,
|
|
849
|
+
on_research_reversed = 156,
|
|
850
|
+
on_research_started = 157,
|
|
851
|
+
on_resource_depleted = 158,
|
|
852
|
+
on_robot_built_entity = 159,
|
|
853
|
+
on_robot_built_tile = 160,
|
|
854
|
+
on_robot_exploded_cliff = 161,
|
|
855
|
+
on_robot_mined = 162,
|
|
856
|
+
on_robot_mined_entity = 163,
|
|
857
|
+
on_robot_mined_tile = 164,
|
|
858
|
+
on_robot_pre_mined = 165,
|
|
859
|
+
on_rocket_launch_ordered = 166,
|
|
860
|
+
on_rocket_launched = 167,
|
|
861
|
+
on_runtime_mod_setting_changed = 168,
|
|
862
|
+
on_script_inventory_resized = 169,
|
|
863
|
+
on_script_path_request_finished = 170,
|
|
864
|
+
on_script_trigger_effect = 171,
|
|
865
|
+
on_sector_scanned = 172,
|
|
866
|
+
on_segment_entity_created = 173,
|
|
867
|
+
on_segmented_unit_created = 174,
|
|
868
|
+
on_segmented_unit_damaged = 175,
|
|
869
|
+
on_segmented_unit_died = 176,
|
|
870
|
+
on_selected_entity_changed = 177,
|
|
871
|
+
on_singleplayer_init = 178,
|
|
872
|
+
on_space_platform_built_entity = 179,
|
|
873
|
+
on_space_platform_built_tile = 180,
|
|
874
|
+
on_space_platform_changed_state = 181,
|
|
875
|
+
on_space_platform_mined_entity = 182,
|
|
876
|
+
on_space_platform_mined_item = 183,
|
|
877
|
+
on_space_platform_mined_tile = 184,
|
|
878
|
+
on_space_platform_pre_mined = 185,
|
|
879
|
+
on_spider_command_completed = 186,
|
|
880
|
+
on_string_translated = 187,
|
|
881
|
+
on_surface_cleared = 188,
|
|
882
|
+
on_surface_created = 189,
|
|
883
|
+
on_surface_deleted = 190,
|
|
884
|
+
on_surface_imported = 191,
|
|
885
|
+
on_surface_renamed = 192,
|
|
886
|
+
on_technology_effects_reset = 193,
|
|
887
|
+
on_territory_created = 194,
|
|
888
|
+
on_territory_destroyed = 195,
|
|
889
|
+
on_tick = 196,
|
|
890
|
+
on_tower_mined_plant = 197,
|
|
891
|
+
on_tower_planted_seed = 198,
|
|
892
|
+
on_tower_pre_mined_plant = 199,
|
|
893
|
+
on_train_changed_state = 200,
|
|
894
|
+
on_train_created = 201,
|
|
895
|
+
on_train_schedule_changed = 202,
|
|
896
|
+
on_trigger_created_entity = 203,
|
|
897
|
+
on_trigger_fired_artillery = 204,
|
|
898
|
+
on_udp_packet_received = 205,
|
|
899
|
+
on_undo_applied = 206,
|
|
900
|
+
on_unit_added_to_group = 207,
|
|
901
|
+
on_unit_group_created = 208,
|
|
902
|
+
on_unit_group_finished_gathering = 209,
|
|
903
|
+
on_unit_removed_from_group = 210,
|
|
904
|
+
on_worker_robot_expired = 211,
|
|
905
|
+
script_raised_built = 212,
|
|
906
|
+
script_raised_destroy = 213,
|
|
907
|
+
script_raised_destroy_segmented_unit = 214,
|
|
908
|
+
script_raised_revive = 215,
|
|
909
|
+
script_raised_set_tiles = 216,
|
|
910
|
+
script_raised_teleported = 217
|
|
910
911
|
}
|
|
911
912
|
enum flow_precision_index {
|
|
912
913
|
fifty_hours = 5,
|
package/dist/events.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -2269,6 +2269,24 @@ interface on_player_dropped_item {
|
|
|
2269
2269
|
*/
|
|
2270
2270
|
tick: uint32;
|
|
2271
2271
|
}
|
|
2272
|
+
/**
|
|
2273
|
+
* Called when a player drops a single item into an entity.
|
|
2274
|
+
*/
|
|
2275
|
+
interface on_player_dropped_item_into_entity {
|
|
2276
|
+
/**
|
|
2277
|
+
* The entity the item was dropped into.
|
|
2278
|
+
*/
|
|
2279
|
+
entity: LuaEntity;
|
|
2280
|
+
/**
|
|
2281
|
+
* Identifier of the event
|
|
2282
|
+
*/
|
|
2283
|
+
name: defines.events;
|
|
2284
|
+
player_index: uint32;
|
|
2285
|
+
/**
|
|
2286
|
+
* Tick the event was generated.
|
|
2287
|
+
*/
|
|
2288
|
+
tick: uint32;
|
|
2289
|
+
}
|
|
2272
2290
|
/**
|
|
2273
2291
|
* Called when a player fast-transfers something to or from an entity.
|
|
2274
2292
|
*/
|
package/dist/global.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/prototypes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -691,6 +691,8 @@ interface ArtilleryFlarePrototype extends EntityPrototype {
|
|
|
691
691
|
render_layer_when_on_ground?: RenderLayer;
|
|
692
692
|
/**
|
|
693
693
|
* The entity with the higher number is selectable before the entity with the lower number.
|
|
694
|
+
*
|
|
695
|
+
* The value `0` will be treated the same as `nil`.
|
|
694
696
|
*/
|
|
695
697
|
selection_priority?: uint8;
|
|
696
698
|
/**
|
|
@@ -859,7 +861,7 @@ interface AssemblingMachinePrototype extends CraftingMachinePrototype {
|
|
|
859
861
|
default_recipe_finished_signal?: SignalIDConnector;
|
|
860
862
|
default_working_signal?: SignalIDConnector;
|
|
861
863
|
/**
|
|
862
|
-
* Defaults to true if fixed_recipe is not given.
|
|
864
|
+
* Defaults to true if `fixed_recipe` is not given.
|
|
863
865
|
*/
|
|
864
866
|
disabled_when_recipe_not_researched?: boolean;
|
|
865
867
|
draw_circuit_wires?: boolean;
|
|
@@ -1401,6 +1403,9 @@ interface CargoLandingPadPrototype extends EntityWithOwnerPrototype {
|
|
|
1401
1403
|
draw_copper_wires?: boolean;
|
|
1402
1404
|
graphics_set?: CargoBayConnectableGraphicsSet;
|
|
1403
1405
|
inventory_size: ItemStackIndex;
|
|
1406
|
+
/**
|
|
1407
|
+
* In chunks. The radius of how many chunks this cargo landing pad charts around itself.
|
|
1408
|
+
*/
|
|
1404
1409
|
radar_range?: uint32;
|
|
1405
1410
|
radar_visualisation_color?: Color;
|
|
1406
1411
|
/**
|
|
@@ -1930,6 +1935,7 @@ interface CorpsePrototype extends EntityPrototype {
|
|
|
1930
1935
|
ground_patch_fade_out_start?: float;
|
|
1931
1936
|
ground_patch_higher?: AnimationVariations;
|
|
1932
1937
|
ground_patch_render_layer?: RenderLayer;
|
|
1938
|
+
protected_from_tile_building?: boolean;
|
|
1933
1939
|
remove_on_entity_placement?: boolean;
|
|
1934
1940
|
remove_on_tile_placement?: boolean;
|
|
1935
1941
|
/**
|
|
@@ -3331,6 +3337,8 @@ interface EntityPrototype extends Prototype {
|
|
|
3331
3337
|
selection_box?: BoundingBox;
|
|
3332
3338
|
/**
|
|
3333
3339
|
* The entity with the higher number is selectable before the entity with the lower number.
|
|
3340
|
+
*
|
|
3341
|
+
* The value `0` will be treated the same as `nil`.
|
|
3334
3342
|
*/
|
|
3335
3343
|
selection_priority?: uint8;
|
|
3336
3344
|
/**
|
|
@@ -3983,6 +3991,10 @@ interface FluidTurretPrototype extends TurretPrototype {
|
|
|
3983
3991
|
*/
|
|
3984
3992
|
interface FluidWagonPrototype extends RollingStockPrototype {
|
|
3985
3993
|
capacity: FluidAmount;
|
|
3994
|
+
/**
|
|
3995
|
+
* Pumps are only allowed to connect to this fluid wagon if the pump's {@link fluid box connection | prototype:PipeConnectionDefinition} and this fluid wagon share a connection category. Pump may have different connection categories on the input and output side, connection categories will be taken from the connection that is facing towards fluid wagon.
|
|
3996
|
+
*/
|
|
3997
|
+
connection_category?: string | string[];
|
|
3986
3998
|
quality_affects_capacity?: boolean;
|
|
3987
3999
|
/**
|
|
3988
4000
|
* Must be 1, 2 or 3.
|
|
@@ -5736,7 +5748,11 @@ interface MiningDrillPrototype extends EntityWithOwnerPrototype {
|
|
|
5736
5748
|
*/
|
|
5737
5749
|
resource_drain_rate_percent?: uint8;
|
|
5738
5750
|
/**
|
|
5739
|
-
*
|
|
5751
|
+
* Offset of the `resource_searching_radius` from the entity center when the mining drill is facing north.
|
|
5752
|
+
*/
|
|
5753
|
+
resource_searching_offset?: Vector;
|
|
5754
|
+
/**
|
|
5755
|
+
* The distance from the center of the mining drill to search for resources in.
|
|
5740
5756
|
*
|
|
5741
5757
|
* This is 2.49 for electric mining drills (a 5x5 area) and 0.99 for burner mining drills (a 2x2 area). The drill searches resource outside its natural boundary box, which is 0.01 (the middle of the entity); making it 2.5 and 1.0 gives it another block radius.
|
|
5742
5758
|
*/
|
|
@@ -6760,7 +6776,7 @@ interface RailRampPrototype extends RailPrototype {
|
|
|
6760
6776
|
*/
|
|
6761
6777
|
collision_box?: BoundingBox;
|
|
6762
6778
|
/**
|
|
6763
|
-
* Defaults to the mask from {@link UtilityConstants::default_collision_masks | prototype:UtilityConstants::default_collision_masks} when indexed by `"allow_on_deep_oil_ocean"`.
|
|
6779
|
+
* Defaults to the mask from {@link UtilityConstants::default_collision_masks | prototype:UtilityConstants::default_collision_masks} when indexed by `"rail-ramp/allow_on_deep_oil_ocean"`.
|
|
6764
6780
|
*/
|
|
6765
6781
|
collision_mask_allow_on_deep_oil_ocean?: CollisionMaskConnector;
|
|
6766
6782
|
/**
|
|
@@ -6831,7 +6847,7 @@ interface RailSupportPrototype extends EntityWithOwnerPrototype {
|
|
|
6831
6847
|
*/
|
|
6832
6848
|
build_grid_size?: 2;
|
|
6833
6849
|
/**
|
|
6834
|
-
* Defaults to the mask from {@link UtilityConstants::default_collision_masks | prototype:UtilityConstants::default_collision_masks} when indexed by `"allow_on_deep_oil_ocean"`.
|
|
6850
|
+
* Defaults to the mask from {@link UtilityConstants::default_collision_masks | prototype:UtilityConstants::default_collision_masks} when indexed by `"rail-support/allow_on_deep_oil_ocean"`.
|
|
6835
6851
|
*/
|
|
6836
6852
|
collision_mask_allow_on_deep_oil_ocean?: CollisionMaskConnector;
|
|
6837
6853
|
/**
|
|
@@ -7553,7 +7569,7 @@ interface RoboportPrototype extends EntityWithOwnerPrototype {
|
|
|
7553
7569
|
max_logistic_slots?: LogisticFilterIndex;
|
|
7554
7570
|
open_door_trigger_effect?: TriggerEffect;
|
|
7555
7571
|
/**
|
|
7556
|
-
* Defaults to the max of logistic range or construction range rounded up to chunks.
|
|
7572
|
+
* In chunks. The radius of how many chunks this roboport charts around itself. Defaults to the max of logistic range or construction range rounded up to chunks.
|
|
7557
7573
|
*/
|
|
7558
7574
|
radar_range?: uint32;
|
|
7559
7575
|
radar_visualisation_color?: Color;
|
|
@@ -8702,6 +8718,9 @@ interface SpiderUnitPrototype extends EntityWithOwnerPrototype {
|
|
|
8702
8718
|
height: float;
|
|
8703
8719
|
max_pursue_distance?: double;
|
|
8704
8720
|
min_pursue_time?: uint32;
|
|
8721
|
+
/**
|
|
8722
|
+
* In chunks. The radius of how many chunks this spider unit charts around itself.
|
|
8723
|
+
*/
|
|
8705
8724
|
radar_range?: uint32;
|
|
8706
8725
|
spawning_time_modifier?: double;
|
|
8707
8726
|
spider_engine: SpiderEngineSpecification;
|
|
@@ -10019,6 +10038,9 @@ interface UnitPrototype extends EntityWithOwnerPrototype {
|
|
|
10019
10038
|
* Movement speed of the unit in the world, in tiles per tick. Must be equal to or greater than 0.
|
|
10020
10039
|
*/
|
|
10021
10040
|
movement_speed: float;
|
|
10041
|
+
/**
|
|
10042
|
+
* In chunks. The radius of how many chunks this unit charts around itself.
|
|
10043
|
+
*/
|
|
10022
10044
|
radar_range?: uint32;
|
|
10023
10045
|
render_layer?: RenderLayer;
|
|
10024
10046
|
rotation_speed?: float;
|
|
@@ -10323,6 +10345,10 @@ interface UtilityConstants extends PrototypeBase {
|
|
|
10323
10345
|
max_fluid_flow: FluidAmount;
|
|
10324
10346
|
max_logistic_filter_count: LogisticFilterIndex;
|
|
10325
10347
|
max_terrain_building_size: uint8;
|
|
10348
|
+
/**
|
|
10349
|
+
* Cap for how many steps of quality the output of something (miner/crafter) may be higher than the input (resource/ingredients). Must be >= 1.
|
|
10350
|
+
*/
|
|
10351
|
+
maximum_quality_jump: uint8;
|
|
10326
10352
|
maximum_recipe_overload_multiplier: uint32;
|
|
10327
10353
|
medium_area_size: float;
|
|
10328
10354
|
medium_blueprint_area_size: float;
|
|
@@ -10347,6 +10373,7 @@ interface UtilityConstants extends PrototypeBase {
|
|
|
10347
10373
|
*/
|
|
10348
10374
|
player_colors: PlayerColorData[];
|
|
10349
10375
|
probability_product_count_tint: Color;
|
|
10376
|
+
quality_selector_dropdown_threshold: uint8;
|
|
10350
10377
|
rail_planner_count_button_color: Color;
|
|
10351
10378
|
rail_segment_colors: Color[];
|
|
10352
10379
|
recipe_step_limit: uint32;
|
|
@@ -11142,6 +11169,9 @@ interface VehiclePrototype extends EntityWithOwnerPrototype {
|
|
|
11142
11169
|
* Must be positive. There is no functional difference between the two ways to set braking power/force.
|
|
11143
11170
|
*/
|
|
11144
11171
|
braking_power: Energy | double;
|
|
11172
|
+
/**
|
|
11173
|
+
* In chunks. The radius of the radar range of the vehicle, so how many chunks it charts around itself.
|
|
11174
|
+
*/
|
|
11145
11175
|
chunk_exploration_radius?: uint32;
|
|
11146
11176
|
crash_trigger?: TriggerEffect;
|
|
11147
11177
|
/**
|
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -6899,6 +6899,9 @@ interface NoiseFunction {
|
|
|
6899
6899
|
*/
|
|
6900
6900
|
parameters: string[];
|
|
6901
6901
|
}
|
|
6902
|
+
/**
|
|
6903
|
+
* Modifier that does nothing. Can be used to show custom scripted effects in the technology GUI.
|
|
6904
|
+
*/
|
|
6902
6905
|
interface NothingModifier extends BaseModifier {
|
|
6903
6906
|
effect_description?: LocalisedString;
|
|
6904
6907
|
type: 'nothing';
|
|
@@ -7189,9 +7192,9 @@ type PersistentWorldAmbientSoundsDefinitionCrossfade = Fade & {
|
|
|
7189
7192
|
};
|
|
7190
7193
|
interface PipeConnectionDefinition {
|
|
7191
7194
|
/**
|
|
7192
|
-
*
|
|
7195
|
+
* Fluidboxes' pipe connections are only allowed to connect with each other if they share a connection category. For example a mod could have a "steam pipes" and "cryogenic pipes" category that should not connect with each other.
|
|
7193
7196
|
*
|
|
7194
|
-
* In case of a normal connection, a
|
|
7197
|
+
* In case of a normal connection, a pipe connection can be in multiple connection categories. This allows to create a mod where pipes of different categories would not connect to each other while still making it possible for crafting machines and other entities to connect to any of the specified pipes.
|
|
7195
7198
|
*
|
|
7196
7199
|
* By default, all pipe connections have the `"default"` category. So a pipe that should connect to a new category and standard pipes can have the `connection_category = {"my-new-pipe", "default"}`.
|
|
7197
7200
|
*
|
|
@@ -8710,6 +8713,29 @@ interface ScriptTriggerEffectItem extends TriggerEffectItem {
|
|
|
8710
8713
|
effect_id: string;
|
|
8711
8714
|
type: 'script';
|
|
8712
8715
|
}
|
|
8716
|
+
/**
|
|
8717
|
+
* Triggered only by calling {@link LuaForce::script_trigger_research | runtime:LuaForce::script_trigger_research}. Can be used to show custom scripted triggers in the technology GUI.
|
|
8718
|
+
*/
|
|
8719
|
+
interface ScriptedTechnologyTrigger {
|
|
8720
|
+
/**
|
|
8721
|
+
* Path to the icon file.
|
|
8722
|
+
*
|
|
8723
|
+
* Only loaded if `icons` is not defined.
|
|
8724
|
+
*/
|
|
8725
|
+
icon?: FileName;
|
|
8726
|
+
/**
|
|
8727
|
+
* The size of the square icon, in pixels. E.g. `32` for a 32px by 32px icon. Must be larger than `0`.
|
|
8728
|
+
*
|
|
8729
|
+
* Only loaded if `icons` is not defined.
|
|
8730
|
+
*/
|
|
8731
|
+
icon_size?: SpriteSizeType;
|
|
8732
|
+
/**
|
|
8733
|
+
* Can't be an empty array.
|
|
8734
|
+
*/
|
|
8735
|
+
icons?: IconData[];
|
|
8736
|
+
trigger_description?: LocalisedString;
|
|
8737
|
+
type: 'scripted';
|
|
8738
|
+
}
|
|
8713
8739
|
interface ScrollBarStyleSpecification extends BaseStyleSpecification {
|
|
8714
8740
|
background_graphical_set?: ElementImageSet;
|
|
8715
8741
|
thumb_button_style?: ButtonStyleSpecification;
|
|
@@ -10586,7 +10612,10 @@ CaptureSpawnerTechnologyTrigger | /**
|
|
|
10586
10612
|
BuildEntityTechnologyTrigger | /**
|
|
10587
10613
|
* Loaded when the `type` is `"create-space-platform"`.
|
|
10588
10614
|
*/
|
|
10589
|
-
CreateSpacePlatformTechnologyTrigger
|
|
10615
|
+
CreateSpacePlatformTechnologyTrigger | /**
|
|
10616
|
+
* Loaded when the `type` is `"scripted"`.
|
|
10617
|
+
*/
|
|
10618
|
+
ScriptedTechnologyTrigger;
|
|
10590
10619
|
/**
|
|
10591
10620
|
* Either `count` or `count_formula` must be defined, never both.
|
|
10592
10621
|
* @example ```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.51",
|
|
4
4
|
"description": "Typescript declarations for the Factorio mod API",
|
|
5
5
|
"main": "index.d.ts",
|
|
6
6
|
"repository": "https://github.com/sguest/factorio-types.git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"src/**/*.d.ts",
|
|
24
24
|
"dist/**/*.d.ts"
|
|
25
25
|
],
|
|
26
|
-
"factorioVersion": "2.0.
|
|
26
|
+
"factorioVersion": "2.0.69",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|