Skip to content

Commit d885ab5

Browse files
committed
Factorio API version 2.0.29
1 parent 93cc005 commit d885ab5

File tree

9 files changed

+65
-37
lines changed

9 files changed

+65
-37
lines changed

dist/classes.d.ts

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.28
5+
// Factorio version 2.0.29
66
// API version 6
77

88
declare namespace runtime {
@@ -4080,7 +4080,7 @@ interface LuaBootstrap {
40804080
script.raise_event(defines.events.on_console_chat, data)
40814081
```
40824082
*/
4083-
raise_event(this: void, event: uint | string, data: table): void;
4083+
raise_event(this: void, event: LuaEventType, data: table): void;
40844084
/**
40854085
* @param table.player_index The player who did the purchasing.
40864086
* @param table.market The market entity.
@@ -4895,6 +4895,10 @@ interface LuaControl {
48954895
* The build distance of this character or max uint when not a character or player connected to a character.
48964896
*/
48974897
readonly build_distance: uint;
4898+
/**
4899+
* The cargo pod the player is currently sitting in or the cargo pod attached to this rocket silo.
4900+
*/
4901+
readonly cargo_pod?: LuaEntity;
48984902
/**
48994903
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
49004904
*/
@@ -5030,6 +5034,10 @@ interface LuaControl {
50305034
* Unique {@link index | runtime:LuaForce::index} (ID) associated with the force of this entity.
50315035
*/
50325036
readonly force_index: uint;
5037+
/**
5038+
* The space platform hub the player is currently sitting in.
5039+
*/
5040+
readonly hub?: LuaEntity;
50335041
/**
50345042
* Whether this character entity is in combat.
50355043
*/
@@ -5797,11 +5805,11 @@ interface LuaEntity extends LuaControl {
57975805
*/
57985806
get_electric_output_flow_limit(this: void, quality?: QualityID): double | null;
57995807
/**
5800-
* Get the filter for a slot in an inserter, loader, or logistic storage container. The entity must allow filters.
5808+
* Get the filter for a slot in an inserter, loader, mining drill, asteroid collector, or logistic storage container. The entity must allow filters.
58015809
* @param slot_index Index of the slot to get the filter for.
58025810
* @returns The filter, or `nil` if the given slot has no filter.
58035811
*/
5804-
get_filter(this: void, slot_index: uint): ItemFilter | null;
5812+
get_filter(this: void, slot_index: uint): (ItemFilter | EntityID | AsteroidChunkID) | null;
58055813
/**
58065814
* Gets fluid of the i-th fluid storage.
58075815
* @param index Fluid storage index. Valid values are from 1 up to {@link LuaEntity::fluids_count | runtime:LuaEntity::fluids_count}.
@@ -5906,9 +5914,9 @@ interface LuaEntity extends LuaControl {
59065914
*/
59075915
get_parent_signals(this: void): LuaEntity[];
59085916
/**
5909-
* Gets the passenger of this car or spidertron if any.
5917+
* Gets the passenger of this car, spidertron, or cargo pod if any.
59105918
*
5911-
* This differs over {@link LuaEntity::get_driver | runtime:LuaEntity::get_driver} in that the passenger can't drive the car.
5919+
* This differs over {@link LuaEntity::get_driver | runtime:LuaEntity::get_driver} in that for cars, the passenger can't drive the car.
59125920
* @returns `nil` if the vehicle contains no passenger. To check if there's a driver see {@link LuaEntity::get_driver | runtime:LuaEntity::get_driver}.
59135921
*/
59145922
get_passenger(this: void): (LuaEntity | LuaPlayer) | null;
@@ -6229,11 +6237,11 @@ interface LuaEntity extends LuaControl {
62296237
*/
62306238
set_driver(this: void, driver?: LuaEntity | PlayerIdentification): void;
62316239
/**
6232-
* Set the filter for a slot in an inserter (ItemFilter), loader (ItemFilter), mining drill (EntityID) or logistic storage container (ItemWithQualityID). The entity must allow filters.
6240+
* Set the filter for a slot in an inserter (ItemFilter), loader (ItemFilter), mining drill (EntityID), asteroid collector (AsteroidChunkID) or logistic storage container (ItemWithQualityID). The entity must allow filters.
62336241
* @param index Index of the slot to set the filter for.
62346242
* @param filter The item or entity to filter, or `nil` to clear the filter.
62356243
*/
6236-
set_filter(this: void, index: uint, filter?: ItemFilter | ItemWithQualityID | EntityID): void;
6244+
set_filter(this: void, index: uint, filter?: ItemFilter | ItemWithQualityID | EntityID | AsteroidChunkID): void;
62376245
/**
62386246
* Sets fluid to the i-th fluid storage.
62396247
*
@@ -6430,10 +6438,6 @@ interface LuaEntity extends LuaControl {
64306438
* The burner energy source for this entity, if any.
64316439
*/
64326440
readonly burner?: LuaBurner;
6433-
/**
6434-
* Gets the cargo pod attached to this rocket silo rocket if one exists.
6435-
*/
6436-
readonly cargo_pod?: LuaEntity;
64376441
/**
64386442
* The state of this chain signal.
64396443
*/
@@ -6633,7 +6637,7 @@ interface LuaEntity extends LuaControl {
66336637
*/
66346638
entity_label?: string;
66356639
/**
6636-
* The number of filter slots this inserter, loader, mining drill or logistic storage container has. 0 if not one of those entities.
6640+
* The number of filter slots this inserter, loader, mining drill, asteroid collector or logistic storage container has. 0 if not one of those entities.
66376641
*/
66386642
readonly filter_slot_count: uint;
66396643
/**
@@ -7276,6 +7280,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
72767280
* The crafting speed of this crafting-machine.
72777281
*/
72787282
get_crafting_speed(this: void, quality?: QualityID): double;
7283+
/**
7284+
* The fluid usage of this generator prototype.
7285+
*/
7286+
get_fluid_usage_per_tick(this: void, quality?: QualityID): LuaQualityPrototype | null;
72797287
/**
72807288
* The extension speed of this inserter.
72817289
*/
@@ -7316,6 +7324,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
73167324
* Max health of this entity. Will be `0` if this is not an entity with health.
73177325
*/
73187326
get_max_health(this: void, quality?: QualityID): float;
7327+
/**
7328+
* The maximum power output of this burner generator or generator prototype.
7329+
*/
7330+
get_max_power_output(this: void, quality?: QualityID): double | null;
73197331
/**
73207332
* The maximum wire distance for this entity. 0 if the entity doesn't support wires.
73217333
*/
@@ -7689,7 +7701,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
76897701
*/
76907702
readonly fluid_energy_source_prototype?: LuaFluidEnergySourcePrototype;
76917703
/**
7692-
* The fluid usage of this generator prototype.
7704+
* The fluid usage of this generator prototype. This property is deprecated in favor of {@link LuaEntityPrototype::get_fluid_usage_per_tick | runtime:LuaEntityPrototype::get_fluid_usage_per_tick} and should not be used.
76937705
*/
76947706
readonly fluid_usage_per_tick?: double;
76957707
/**
@@ -7942,7 +7954,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
79427954
*/
79437955
readonly max_polyphony?: uint;
79447956
/**
7945-
* The default maximum power output of this generator prototype.
7957+
* The default maximum power output of this generator prototype. This property is deprecated in favor of {@link LuaEntityPrototype::get_max_power_output | runtime:LuaEntityPrototype::get_max_power_output} and should not be used.
79467958
*/
79477959
readonly max_power_output?: double;
79487960
/**
@@ -8105,6 +8117,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
81058117
* Whether this generator prototype scales fluid usage.
81068118
*/
81078119
readonly scale_fluid_usage?: boolean;
8120+
/**
8121+
* How much science pack durability is required to research one science point.
8122+
*/
8123+
readonly science_pack_drain_rate_percent: uint8;
81088124
/**
81098125
* The secondary bounding box used for collision checking, if any. This is only used in rails and rail remnants.
81108126
*/
@@ -13373,6 +13389,11 @@ interface LuaPlayer extends LuaControl {
1337313389
* Clear any active flying texts for this player.
1337413390
*/
1337513391
clear_local_flying_texts(this: void): void;
13392+
/**
13393+
* Clears the given recipe from the list of recipe notifications for this player.
13394+
* @param recipe Recipe to clear.
13395+
*/
13396+
clear_recipe_notification(this: void, recipe: RecipeID): void;
1337613397
/**
1337713398
* Clears all recipe notifications for this player.
1337813399
*/
@@ -14894,6 +14915,10 @@ interface LuaRecord {
1489414915
by_player?: PlayerIdentification;
1489514916
super_forced?: boolean;
1489614917
}): void;
14918+
/**
14919+
* The active index of this BlueprintBookRecord. For records in "my blueprints", the result will be the same regardless of the player, but records in "game blueprints" may have different active indices per player.
14920+
*/
14921+
get_active_index(this: void, player: PlayerIdentification): uint;
1489714922
/**
1489814923
* The entities in this blueprint.
1489914924
*/

dist/concepts.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.28
5+
// Factorio version 2.0.29
66
// API version 6
77

88
declare namespace runtime {

dist/datacollection.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.28
5+
// Factorio version 2.0.29
66
// API version 6
77

88
declare namespace prototype {

dist/defines.d.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.28
5+
// Factorio version 2.0.29
66
// API version 6
77

88
declare namespace defines {
@@ -1183,23 +1183,24 @@ enum input_method {
11831183
keyboard_and_mouse = 0
11841184
}
11851185
enum inventory {
1186-
artillery_turret_ammo = 42,
1187-
artillery_wagon_ammo = 43,
1186+
artillery_turret_ammo = 43,
1187+
artillery_wagon_ammo = 44,
11881188
assembling_machine_dump = 25,
11891189
assembling_machine_input = 22,
11901190
assembling_machine_modules = 24,
11911191
assembling_machine_output = 23,
1192-
beacon_modules = 40,
1192+
beacon_modules = 41,
11931193
burnt_result = 1,
11941194
car_ammo = 37,
1195+
car_trash = 38,
11951196
car_trunk = 36,
1196-
cargo_landing_pad_main = 49,
1197-
cargo_landing_pad_trash = 50,
1197+
cargo_landing_pad_main = 50,
1198+
cargo_landing_pad_trash = 51,
11981199
cargo_unit = 35,
1199-
cargo_wagon = 38,
1200+
cargo_wagon = 39,
12001201
character_ammo = 9,
12011202
character_armor = 10,
1202-
character_corpse = 41,
1203+
character_corpse = 42,
12031204
character_guns = 8,
12041205
character_main = 7,
12051206
character_trash = 12,
@@ -1214,8 +1215,8 @@ enum inventory {
12141215
furnace_result = 5,
12151216
furnace_source = 4,
12161217
god_main = 13,
1217-
hub_main = 47,
1218-
hub_trash = 48,
1218+
hub_main = 48,
1219+
hub_trash = 49,
12191220
item_main = 29,
12201221
lab_input = 26,
12211222
lab_modules = 27,
@@ -1230,10 +1231,10 @@ enum inventory {
12301231
rocket_silo_output = 33,
12311232
rocket_silo_rocket = 30,
12321233
rocket_silo_trash = 31,
1233-
spider_ammo = 45,
1234-
spider_trash = 46,
1235-
spider_trunk = 44,
1236-
turret_ammo = 39
1234+
spider_ammo = 46,
1235+
spider_trash = 47,
1236+
spider_trunk = 45,
1237+
turret_ammo = 40
12371238
}
12381239
enum logistic_member_index {
12391240
character_provider = 4,

dist/events.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.28
5+
// Factorio version 2.0.29
66
// API version 6
77

88
declare namespace runtime {

dist/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.28
5+
// Factorio version 2.0.29
66
// API version 6
77

88
/**

dist/prototypes.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.28
5+
// Factorio version 2.0.29
66
// API version 6
77

88
declare namespace prototype {
@@ -1381,6 +1381,7 @@ interface CargoWagonPrototype extends RollingStockPrototype {
13811381
* Size of the inventory of the wagon. The inventory can be limited using the red bar and filtered. This functionality cannot be turned off.
13821382
*/
13831383
inventory_size: ItemStackIndex;
1384+
quality_affects_inventory_size?: bool;
13841385
}
13851386
/**
13861387
* Jumps between targets and applies a {@link Trigger | prototype:Trigger} to them.
@@ -3805,6 +3806,7 @@ interface FluidTurretPrototype extends TurretPrototype {
38053806
*/
38063807
interface FluidWagonPrototype extends RollingStockPrototype {
38073808
capacity: FluidAmount;
3809+
quality_affects_capacity?: bool;
38083810
/**
38093811
* Must be 1, 2 or 3.
38103812
*/

dist/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.28
5+
// Factorio version 2.0.29
66
// API version 6
77

88
declare namespace prototype {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "factorio-types",
3-
"version": "1.2.19",
3+
"version": "1.2.20",
44
"description": "Typescript declarations for the Factorio mod API",
55
"main": "index.d.ts",
66
"repository": "https://github.com/sguest/factorio-types.git",
@@ -23,7 +23,7 @@
2323
"src/**/*.d.ts",
2424
"dist/**/*.d.ts"
2525
],
26-
"factorioVersion": "2.0.28",
26+
"factorioVersion": "2.0.29",
2727
"dependencies": {
2828
"lua-types": "^2.13.1"
2929
},

0 commit comments

Comments
 (0)