Skip to content

Commit 103d584

Browse files
committed
Factorio API version 2.0.54
1 parent 2a40644 commit 103d584

File tree

9 files changed

+143
-40
lines changed

9 files changed

+143
-40
lines changed

dist/classes.d.ts

Lines changed: 11 additions & 7 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.52
5+
// Factorio version 2.0.54
66
// API version 6
77

88
declare namespace runtime {
@@ -6416,7 +6416,7 @@ interface LuaEntity extends LuaControl {
64166416
*/
64176417
set_inventory_size_override(this: void, inventory_index: defines.inventory, size_override: uint16 | nil, overflow?: LuaInventory): void;
64186418
/**
6419-
* Sets the passenger of this car or spidertron.
6419+
* Sets the passenger of this car, spidertron, or cargo pod.
64206420
*
64216421
* This differs from {@link LuaEntity::get_driver | runtime:LuaEntity::get_driver} in that the passenger can't drive the car.
64226422
* @param passenger The new passenger. Writing `nil` ejects the current passenger, if any.
@@ -8942,6 +8942,9 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
89428942
*/
89438943
points?: EquipmentPoint[];
89448944
};
8945+
readonly solar_panel_performance_at_day: double;
8946+
readonly solar_panel_performance_at_night: double;
8947+
readonly solar_panel_solar_coefficient_property: LuaSurfacePropertyPrototype;
89458948
/**
89468949
* The result item when taking this equipment out of an equipment grid, if any.
89478950
*/
@@ -12189,12 +12192,12 @@ interface LuaItemCommon {
1218912192
*/
1219012193
get_inventory(this: void, inventory: defines.inventory): LuaInventory | null;
1219112194
/**
12192-
* Gets the filter at the given index for this upgrade item.
12195+
* Gets the filter at the given index for this upgrade item. Note that sources (`"from"` type) that are undefined will read as `{type = "item"}`, while destinations (`"to"` type) that are undefined will read as `nil`.
1219312196
*
1219412197
* In contrast to {@link LuaItemCommon::set_mapper | runtime:LuaItemCommon::set_mapper}, indices past the upgrade item's current size are considered to be out of bounds.
1219512198
* @param index The index of the mapper to read.
1219612199
*/
12197-
get_mapper(this: void, index: uint, type: 'from' | 'to'): UpgradeMapperSource | UpgradeMapperDestination;
12200+
get_mapper(this: void, index: uint, type: 'from' | 'to'): (UpgradeMapperSource | UpgradeMapperDestination) | null;
1219812201
/**
1219912202
* Gets the tag with the given name or returns `nil` if it doesn't exist.
1220012203
*/
@@ -13282,8 +13285,9 @@ interface LuaLogisticSection {
1328213285
* This can only be called when the section {@link is manual | runtime:LuaLogisticSection::is_manual}.
1328313286
* @param slot_index Index of a slot to set.
1328413287
* @param filter The details of the filter to set.
13288+
* @returns The existing index for the given filter or nil if the filter was successfully set.
1328513289
*/
13286-
set_slot(this: void, slot_index: LogisticFilterIndex, filter: LogisticFilter): void;
13290+
set_slot(this: void, slot_index: LogisticFilterIndex, filter: LogisticFilter): LogisticFilterIndex | null;
1328713291
/**
1328813292
* Whether this section is active. This can only be written to when the section {@link is manual | runtime:LuaLogisticSection::is_manual}.
1328913293
*/
@@ -15399,7 +15403,7 @@ interface LuaRecord {
1539915403
*/
1540015404
get_entity_filter(this: void, index: uint): ItemFilter | null;
1540115405
/**
15402-
* Gets the filter at the given index for this upgrade item.
15406+
* Gets the filter at the given index for this upgrade item. Note that sources (`"from"` type) that are undefined will read as `{type = "item"}`, while destinations (`"to"` type) that are undefined will read as `nil`.
1540315407
*
1540415408
* In contrast to {@link LuaRecord::set_mapper | runtime:LuaRecord::set_mapper}, indices past the upgrade item's current size are considered to be out of bounds.
1540515409
* @param index The index of the mapper to read.
@@ -18273,7 +18277,7 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends BaseLuaSurfaceCreateE
1827318277
*/
1827418278
interface LuaSurfaceCreateEntityParamsInserter extends BaseLuaSurfaceCreateEntityParams {
1827518279
'conditions': InserterCircuitConditions;
18276-
'filters': InventoryFilter[];
18280+
'filters'?: InserterItemFilter[];
1827718281
}
1827818282
/**
1827918283
*

dist/concepts.d.ts

Lines changed: 33 additions & 13 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.52
5+
// Factorio version 2.0.54
66
// API version 6
77

88
declare namespace runtime {
@@ -181,9 +181,6 @@ interface AsteroidChunkPrototypeFilter {
181181
*/
182182
invert?: boolean;
183183
}
184-
/**
185-
* Used by {@link MapSettings | runtime:MapSettings} and {@link MapAndDifficultySettings | runtime:MapAndDifficultySettings}.
186-
*/
187184
interface AsteroidMapSettings {
188185
spawning_rate: double;
189186
max_ray_portals_expanded_per_tick: uint;
@@ -2606,6 +2603,24 @@ interface InserterCircuitConditions {
26062603
circuit?: CircuitCondition;
26072604
logistics?: CircuitCondition;
26082605
}
2606+
interface InserterItemFilter {
2607+
/**
2608+
* Position of the corresponding filter slot.
2609+
*/
2610+
index: uint;
2611+
/**
2612+
* Item prototype name of the item to filter.
2613+
*/
2614+
name: string;
2615+
/**
2616+
* Quality prototype name of the item to filter.
2617+
*/
2618+
quality?: string;
2619+
/**
2620+
* Quality comparator to use for the quality filter.
2621+
*/
2622+
comparator?: string;
2623+
}
26092624
interface InventoryFilter {
26102625
/**
26112626
* Position of the corresponding filter slot.
@@ -8162,27 +8177,28 @@ interface UnitSpawnDefinition {
81628177
spawn_points: SpawnPointDefinition[];
81638178
}
81648179
interface UpgradeMapperDestination {
8180+
type: 'item' | 'entity';
81658181
/**
8166-
* `"item"`, or `"entity"`.
8167-
*/
8168-
type: string;
8169-
/**
8170-
* Name of the item, or entity.
8182+
* Name of the item or entity.
81718183
*/
81728184
name?: string;
81738185
/**
8174-
* Name of the quality.
8186+
* Name of the quality prototype.
81758187
*/
81768188
quality?: string;
81778189
/**
8178-
* when type is `"item"` and the mapper is configured to install modules the limit per machine. If `0` then no limit.
8190+
* When upgrading modules, this defines the maximum number of this module to be installed in the destination entity. `0` or `nil` means no limit.
81798191
*/
8180-
count?: uint;
8192+
module_limit?: uint16;
8193+
/**
8194+
* When upgrading entities, this defines explicit modules to be installed in the destination entity. Lists empty slots as `{}`.
8195+
*/
8196+
module_slots?: ItemIDAndQualityIDPair[];
81818197
}
81828198
interface UpgradeMapperSource {
81838199
type: 'item' | 'entity';
81848200
/**
8185-
* Name of the item, or entity.
8201+
* Name of the item or entity.
81868202
*/
81878203
name?: string;
81888204
/**
@@ -8193,6 +8209,10 @@ interface UpgradeMapperSource {
81938209
* The quality comparison type.
81948210
*/
81958211
comparator?: ComparatorString;
8212+
/**
8213+
* When upgrading modules, this defines the specific entities to apply the upgrade to. `nil` applies it to all entities.
8214+
*/
8215+
module_filter?: EntityIDFilter;
81968216
}
81978217
/**
81988218
* Defines the mode of operation for a {@link ValvePrototype | prototype:ValvePrototype}.

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.52
5+
// Factorio version 2.0.54
66
// API version 6
77

88
declare namespace prototype {

dist/defines.d.ts

Lines changed: 44 additions & 5 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.52
5+
// Factorio version 2.0.54
66
// API version 6
77

88
declare namespace defines {
@@ -442,7 +442,7 @@ enum distraction {
442442
}
443443
enum entity_status {
444444
/**
445-
* Only used if set through {@link LuaEntity::status | runtime:LuaEntity::status} or {@link ContainerPrototype::default_status | prototype:ContainerPrototype::default_status}.
445+
* Only used if set through {@link ContainerPrototype::default_status | prototype:ContainerPrototype::default_status}.
446446
*/
447447
broken = 3,
448448
/**
@@ -1235,14 +1235,23 @@ enum inventory {
12351235
artillery_turret_ammo = 46,
12361236
artillery_wagon_ammo = 47,
12371237
/**
1238-
* Used when items are ejected or items held by inserters cannot be inserted due to changing the recipe with the circuit network.
1238+
* Used for ejected items, or items held by inserters that can't be inserted due the recipe being changed with the circuit network.
12391239
*/
12401240
assembling_machine_dump = 26,
1241+
/**
1242+
* Deprecated, replaced by `"crafter_input"`.
1243+
*/
12411244
assembling_machine_input = 23,
1245+
/**
1246+
* Deprecated, replaced by `"crafter_modules"`.
1247+
*/
12421248
assembling_machine_modules = 25,
1249+
/**
1250+
* Deprecated, replaced by `"crafter_output"`.
1251+
*/
12431252
assembling_machine_output = 24,
12441253
/**
1245-
* Used for spoil result items that do not fit into the recipe slots and for items that are ejected when changing the recipe via remote view.
1254+
* Deprecated, replaced by `"crafter_trash"`.
12461255
*/
12471256
assembling_machine_trash = 27,
12481257
asteroid_collector_output = 63,
@@ -1266,17 +1275,29 @@ enum inventory {
12661275
crafter_input = 59,
12671276
crafter_modules = 61,
12681277
crafter_output = 60,
1278+
/**
1279+
* Used for spoil result items that do not fit into the recipe slots, and for items that are ejected when changing the recipe via remote view.
1280+
*/
12691281
crafter_trash = 62,
12701282
editor_ammo = 17,
12711283
editor_armor = 18,
12721284
editor_guns = 16,
12731285
editor_main = 15,
12741286
fuel = 0,
1287+
/**
1288+
* Deprecated, replaced by `"crafter_modules"`.
1289+
*/
12751290
furnace_modules = 6,
1291+
/**
1292+
* Deprecated, replaced by `"crafter_output"`.
1293+
*/
12761294
furnace_result = 5,
1295+
/**
1296+
* Deprecated, replaced by `"crafter_input"`.
1297+
*/
12771298
furnace_source = 4,
12781299
/**
1279-
* Used for spoil result items that do not fit into the recipe slots.
1300+
* Deprecated, replaced by `"crafter_trash"`.
12801301
*/
12811302
furnace_trash = 7,
12821303
god_main = 14,
@@ -1294,8 +1315,17 @@ enum inventory {
12941315
roboport_robot = 19,
12951316
robot_cargo = 21,
12961317
robot_repair = 22,
1318+
/**
1319+
* Deprecated, replaced by `"crafter_input"`.
1320+
*/
12971321
rocket_silo_input = 35,
1322+
/**
1323+
* Deprecated, replaced by `"crafter_modules"`.
1324+
*/
12981325
rocket_silo_modules = 37,
1326+
/**
1327+
* Deprecated, replaced by `"crafter_output"`.
1328+
*/
12991329
rocket_silo_output = 36,
13001330
rocket_silo_rocket = 33,
13011331
rocket_silo_trash = 34,
@@ -2282,8 +2312,17 @@ enum wire_connector_id {
22822312
power_switch_right_copper = 8
22832313
}
22842314
enum wire_origin {
2315+
/**
2316+
* These wires can be modified by players, scripts, and the game. They are visible to the player if the entity's `draw_circuit_wires` prototype property is set to `true` and both ends of it are on the same surface.
2317+
*/
22852318
player = 0,
2319+
/**
2320+
* These wires can only be modified by the game. They are not visible to the player, irrespective of the `draw_circuit_wires` prototype property.
2321+
*/
22862322
radars = 2,
2323+
/**
2324+
* These wires can be modified by scripts and the game. They are not visible to the player, irrespective of the `draw_circuit_wires` prototype property.
2325+
*/
22872326
script = 1
22882327
}
22892328
enum wire_type {

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.52
5+
// Factorio version 2.0.54
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.52
5+
// Factorio version 2.0.54
66
// API version 6
77

88
/**

0 commit comments

Comments
 (0)