factorio-types 1.2.36 → 1.2.38

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 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.51
5
+ // Factorio version 2.0.54
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -6018,11 +6018,9 @@ interface LuaEntity extends LuaControl {
6018
6018
  get_line_item_position(this: void, index: uint, position: float): MapPosition;
6019
6019
  /**
6020
6020
  * Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.
6021
- *
6022
- * When `index` is not given, this will be a single `LuaLogisticPoint` for most entities. For some (such as the player character), it can be zero or more.
6023
- * @param index If provided, only returns the `LuaLogisticPoint` specified by this index.
6021
+ * @param index If provided, this method only returns the `LuaLogisticPoint` specified by this index, or `nil` if it doesn't exist.
6024
6022
  */
6025
- get_logistic_point(this: void, index?: defines.logistic_member_index): (LuaLogisticPoint | Record<defines.logistic_member_index, LuaLogisticPoint>) | null;
6023
+ get_logistic_point(this: void, index?: defines.logistic_member_index): (LuaLogisticPoint | LuaLogisticPoint[]) | null;
6026
6024
  /**
6027
6025
  * Gives logistic sections of this entity if it uses logistic sections.
6028
6026
  */
@@ -6418,7 +6416,7 @@ interface LuaEntity extends LuaControl {
6418
6416
  */
6419
6417
  set_inventory_size_override(this: void, inventory_index: defines.inventory, size_override: uint16 | nil, overflow?: LuaInventory): void;
6420
6418
  /**
6421
- * Sets the passenger of this car or spidertron.
6419
+ * Sets the passenger of this car, spidertron, or cargo pod.
6422
6420
  *
6423
6421
  * This differs from {@link LuaEntity::get_driver | runtime:LuaEntity::get_driver} in that the passenger can't drive the car.
6424
6422
  * @param passenger The new passenger. Writing `nil` ejects the current passenger, if any.
@@ -6656,7 +6654,7 @@ interface LuaEntity extends LuaControl {
6656
6654
  */
6657
6655
  combat_robot_owner?: LuaEntity;
6658
6656
  /**
6659
- * The description on this combinator
6657
+ * The description on this combinator.
6660
6658
  */
6661
6659
  combinator_description: string;
6662
6660
  /**
@@ -8944,6 +8942,9 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
8944
8942
  */
8945
8943
  points?: EquipmentPoint[];
8946
8944
  };
8945
+ readonly solar_panel_performance_at_day: double;
8946
+ readonly solar_panel_performance_at_night: double;
8947
+ readonly solar_panel_solar_coefficient_property: LuaSurfacePropertyPrototype;
8947
8948
  /**
8948
8949
  * The result item when taking this equipment out of an equipment grid, if any.
8949
8950
  */
@@ -12191,12 +12192,12 @@ interface LuaItemCommon {
12191
12192
  */
12192
12193
  get_inventory(this: void, inventory: defines.inventory): LuaInventory | null;
12193
12194
  /**
12194
- * 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`.
12195
12196
  *
12196
12197
  * 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.
12197
12198
  * @param index The index of the mapper to read.
12198
12199
  */
12199
- get_mapper(this: void, index: uint, type: 'from' | 'to'): UpgradeMapperSource | UpgradeMapperDestination;
12200
+ get_mapper(this: void, index: uint, type: 'from' | 'to'): (UpgradeMapperSource | UpgradeMapperDestination) | null;
12200
12201
  /**
12201
12202
  * Gets the tag with the given name or returns `nil` if it doesn't exist.
12202
12203
  */
@@ -12609,6 +12610,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12609
12610
  * Effects of this module.
12610
12611
  */
12611
12612
  readonly module_effects?: ModuleEffects;
12613
+ readonly moved_to_hub_when_building: boolean;
12612
12614
  /**
12613
12615
  * 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.
12614
12616
  */
@@ -13283,8 +13285,9 @@ interface LuaLogisticSection {
13283
13285
  * This can only be called when the section {@link is manual | runtime:LuaLogisticSection::is_manual}.
13284
13286
  * @param slot_index Index of a slot to set.
13285
13287
  * @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.
13286
13289
  */
13287
- set_slot(this: void, slot_index: LogisticFilterIndex, filter: LogisticFilter): void;
13290
+ set_slot(this: void, slot_index: LogisticFilterIndex, filter: LogisticFilter): LogisticFilterIndex | null;
13288
13291
  /**
13289
13292
  * Whether this section is active. This can only be written to when the section {@link is manual | runtime:LuaLogisticSection::is_manual}.
13290
13293
  */
@@ -15400,7 +15403,7 @@ interface LuaRecord {
15400
15403
  */
15401
15404
  get_entity_filter(this: void, index: uint): ItemFilter | null;
15402
15405
  /**
15403
- * 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`.
15404
15407
  *
15405
15408
  * 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.
15406
15409
  * @param index The index of the mapper to read.
@@ -16252,6 +16255,10 @@ interface LuaSchedule {
16252
16255
  * @param index The record to change.
16253
16256
  */
16254
16257
  drag_wait_condition(this: void, index: ScheduleRecordPosition, from: uint, to: uint): void;
16258
+ /**
16259
+ * Gets if the given interrupt can be triggered inside other interrupts.
16260
+ */
16261
+ get_inside_interrupt(this: void, interrupt_index: uint): boolean;
16255
16262
  get_interrupt(this: void, index: uint): ScheduleInterrupt | null;
16256
16263
  get_interrupts(this: void): ScheduleInterrupt[];
16257
16264
  get_record(this: void, index: ScheduleRecordPosition): ScheduleRecord | null;
@@ -16301,6 +16308,10 @@ interface LuaSchedule {
16301
16308
  * Sets if unloading is allowed at the given schedule index.
16302
16309
  */
16303
16310
  set_allow_unloading(this: void, index: ScheduleRecordPosition, allow: boolean): void;
16311
+ /**
16312
+ * Sets if the given interrupt can be triggered inside other interrupts.
16313
+ */
16314
+ set_inside_interrupt(this: void, interrupt_index: uint, value: boolean): void;
16304
16315
  set_interrupts(this: void, interrupts: ScheduleInterrupt[]): void;
16305
16316
  /**
16306
16317
  * @param interrupt_index If provided, the records will be set on this interrupt.
@@ -18266,7 +18277,7 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends BaseLuaSurfaceCreateE
18266
18277
  */
18267
18278
  interface LuaSurfaceCreateEntityParamsInserter extends BaseLuaSurfaceCreateEntityParams {
18268
18279
  'conditions': InserterCircuitConditions;
18269
- 'filters': InventoryFilter[];
18280
+ 'filters'?: InserterItemFilter[];
18270
18281
  }
18271
18282
  /**
18272
18283
  *
@@ -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.51
5
+ // Factorio version 2.0.54
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -181,9 +181,6 @@ interface AsteroidChunkPrototypeFilter {
181
181
  */
182
182
  invert?: boolean;
183
183
  }
184
- /**
185
- * Used by {@link MapSettings | runtime:MapSettings} and {@link MapAndDifficultySettings | runtime:MapAndDifficultySettings}.
186
- */
187
184
  interface AsteroidMapSettings {
188
185
  spawning_rate: double;
189
186
  max_ray_portals_expanded_per_tick: uint;
@@ -2606,6 +2603,24 @@ interface InserterCircuitConditions {
2606
2603
  circuit?: CircuitCondition;
2607
2604
  logistics?: CircuitCondition;
2608
2605
  }
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
+ }
2609
2624
  interface InventoryFilter {
2610
2625
  /**
2611
2626
  * Position of the corresponding filter slot.
@@ -8162,27 +8177,28 @@ interface UnitSpawnDefinition {
8162
8177
  spawn_points: SpawnPointDefinition[];
8163
8178
  }
8164
8179
  interface UpgradeMapperDestination {
8180
+ type: 'item' | 'entity';
8165
8181
  /**
8166
- * `"item"`, or `"entity"`.
8167
- */
8168
- type: string;
8169
- /**
8170
- * Name of the item, or entity.
8182
+ * Name of the item or entity.
8171
8183
  */
8172
8184
  name?: string;
8173
8185
  /**
8174
- * Name of the quality.
8186
+ * Name of the quality prototype.
8175
8187
  */
8176
8188
  quality?: string;
8177
8189
  /**
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.
8179
8191
  */
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[];
8181
8197
  }
8182
8198
  interface UpgradeMapperSource {
8183
8199
  type: 'item' | 'entity';
8184
8200
  /**
8185
- * Name of the item, or entity.
8201
+ * Name of the item or entity.
8186
8202
  */
8187
8203
  name?: string;
8188
8204
  /**
@@ -8193,6 +8209,10 @@ interface UpgradeMapperSource {
8193
8209
  * The quality comparison type.
8194
8210
  */
8195
8211
  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;
8196
8216
  }
8197
8217
  /**
8198
8218
  * Defines the mode of operation for a {@link ValvePrototype | prototype:ValvePrototype}.
@@ -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.51
5
+ // Factorio version 2.0.54
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.51
5
+ // Factorio version 2.0.54
6
6
  // API version 6
7
7
 
8
8
  declare namespace defines {
@@ -442,7 +442,7 @@ enum distraction {
442
442
  }
443
443
  enum entity_status {
444
444
  /**
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}.
446
446
  */
447
447
  broken = 3,
448
448
  /**
@@ -1235,14 +1235,23 @@ enum inventory {
1235
1235
  artillery_turret_ammo = 46,
1236
1236
  artillery_wagon_ammo = 47,
1237
1237
  /**
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.
1239
1239
  */
1240
1240
  assembling_machine_dump = 26,
1241
+ /**
1242
+ * Deprecated, replaced by `"crafter_input"`.
1243
+ */
1241
1244
  assembling_machine_input = 23,
1245
+ /**
1246
+ * Deprecated, replaced by `"crafter_modules"`.
1247
+ */
1242
1248
  assembling_machine_modules = 25,
1249
+ /**
1250
+ * Deprecated, replaced by `"crafter_output"`.
1251
+ */
1243
1252
  assembling_machine_output = 24,
1244
1253
  /**
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"`.
1246
1255
  */
1247
1256
  assembling_machine_trash = 27,
1248
1257
  asteroid_collector_output = 63,
@@ -1266,17 +1275,29 @@ enum inventory {
1266
1275
  crafter_input = 59,
1267
1276
  crafter_modules = 61,
1268
1277
  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
+ */
1269
1281
  crafter_trash = 62,
1270
1282
  editor_ammo = 17,
1271
1283
  editor_armor = 18,
1272
1284
  editor_guns = 16,
1273
1285
  editor_main = 15,
1274
1286
  fuel = 0,
1287
+ /**
1288
+ * Deprecated, replaced by `"crafter_modules"`.
1289
+ */
1275
1290
  furnace_modules = 6,
1291
+ /**
1292
+ * Deprecated, replaced by `"crafter_output"`.
1293
+ */
1276
1294
  furnace_result = 5,
1295
+ /**
1296
+ * Deprecated, replaced by `"crafter_input"`.
1297
+ */
1277
1298
  furnace_source = 4,
1278
1299
  /**
1279
- * Used for spoil result items that do not fit into the recipe slots.
1300
+ * Deprecated, replaced by `"crafter_trash"`.
1280
1301
  */
1281
1302
  furnace_trash = 7,
1282
1303
  god_main = 14,
@@ -1294,8 +1315,17 @@ enum inventory {
1294
1315
  roboport_robot = 19,
1295
1316
  robot_cargo = 21,
1296
1317
  robot_repair = 22,
1318
+ /**
1319
+ * Deprecated, replaced by `"crafter_input"`.
1320
+ */
1297
1321
  rocket_silo_input = 35,
1322
+ /**
1323
+ * Deprecated, replaced by `"crafter_modules"`.
1324
+ */
1298
1325
  rocket_silo_modules = 37,
1326
+ /**
1327
+ * Deprecated, replaced by `"crafter_output"`.
1328
+ */
1299
1329
  rocket_silo_output = 36,
1300
1330
  rocket_silo_rocket = 33,
1301
1331
  rocket_silo_trash = 34,
@@ -2282,8 +2312,17 @@ enum wire_connector_id {
2282
2312
  power_switch_right_copper = 8
2283
2313
  }
2284
2314
  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
+ */
2285
2318
  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
+ */
2286
2322
  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
+ */
2287
2326
  script = 1
2288
2327
  }
2289
2328
  enum wire_type {
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.51
5
+ // Factorio version 2.0.54
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -180,12 +180,21 @@ interface on_build_base_arrived {
180
180
  * Called when player builds something.
181
181
  */
182
182
  interface on_built_entity {
183
+ /**
184
+ * A temporary inventory containing all items that the game used to build the entity. This inventory is temporary and thus invalidated after the event.
185
+ */
183
186
  consumed_items: LuaInventory;
187
+ /**
188
+ * The entity that was built.
189
+ */
184
190
  entity: LuaEntity;
185
191
  /**
186
192
  * Identifier of the event
187
193
  */
188
194
  name: defines.events;
195
+ /**
196
+ * The player who did the building.
197
+ */
189
198
  player_index: uint;
190
199
  /**
191
200
  * The tags associated with this entity if any.
@@ -3832,6 +3841,7 @@ interface on_script_trigger_effect {
3832
3841
  * Identifier of the event
3833
3842
  */
3834
3843
  name: defines.events;
3844
+ quality?: string;
3835
3845
  source_entity?: LuaEntity;
3836
3846
  source_position?: MapPosition;
3837
3847
  /**
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.51
5
+ // Factorio version 2.0.54
6
6
  // API version 6
7
7
 
8
8
  /**
@@ -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.51
5
+ // Factorio version 2.0.54
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -2096,14 +2096,12 @@ interface CustomInputPrototype extends Prototype {
2096
2096
  */
2097
2097
  controller_alternative_key_sequence?: string;
2098
2098
  /**
2099
- * The controller (game pad) keybinding for this control. Use "" (empty string) for unassigned.
2099
+ * The controller (game pad) keybinding for this control. Use `""` (empty string) for unassigned.
2100
2100
  *
2101
- * " + " is used to separate modifier buttons from normal buttons: <code>"controller-righttrigger + controller-a"</code>.
2101
+ * As modifier buttons, these names are used: `"controller-righttrigger"`, `"controller-lefttrigger"`.
2102
2102
  *
2103
- * For modifier buttons, the following names are used: "controller-righttrigger", "controller-lefttrigger".
2104
- *
2105
- * A key binding can contain an unlimited amount of modifier buttons (listed above) but only one normal button (listed below).
2106
- * These names are available for the normal controller buttons
2103
+ * `" + "` is used to separate modifier buttons from normal buttons, like so: `"controller-righttrigger + controller-a"`. A key binding can contain any amount of individual modifier buttons, but only a single normal button (listed below).
2104
+ * Available names for the normal controller buttons
2107
2105
  *
2108
2106
  * - controller-a
2109
2107
  * - controller-b
@@ -2147,16 +2145,27 @@ interface CustomInputPrototype extends Prototype {
2147
2145
  */
2148
2146
  item_to_spawn?: ItemID;
2149
2147
  /**
2150
- * The default key sequence for this custom input. Use "" (empty string) for unassigned.
2151
- *
2152
- * Use "mouse-button-2" etc for mouse buttons, mouse-button-3 for middle mouse button. Use "mouse-wheel-up", "mouse-wheel-down", "mouse-wheel-left", "mouse-wheel-right" for mouse wheel.
2148
+ * The default key sequence for this custom input. Use `""` (empty string) for unassigned.
2153
2149
  *
2154
- * " + " is used to separate modifier keys from normal keys: <code>"ALT + G"</code>.
2150
+ * As modifier keys, these names are used: `"CONTROL"`, `"SHIFT"`, `"COMMAND"`, `"ALT"`. Note that `"COMMAND"` is loaded as `"CONTROL"` on Windows and Linux.
2155
2151
  *
2156
- * For modifier keys, the following names are used: "CONTROL", "SHIFT", "ALT", "COMMAND".
2152
+ * `" + "` is used to separate modifier keys from normal keys, like so: `"ALT + G"`. A key binding can contain any amount of individual modifier keys, but only a single normal mouse button or keyboard key (listed below).
2153
+ * Available names for the normal mouse button
2157
2154
  *
2158
- * A key binding can contain an unlimited amount of modifier keys (listed above) but only one normal key (listed below).
2159
- * These names are available for the normal keyboard keys
2155
+ * - `mouse-button-1` (left)
2156
+ * - `mouse-button-2` (right)
2157
+ * - `mouse-button-3` (middle)
2158
+ * - `mouse-button-4`
2159
+ * - `mouse-button-5`
2160
+ * - `mouse-button-6`
2161
+ * - `mouse-button-7`
2162
+ * - `mouse-button-8`
2163
+ * - `mouse-button-9`
2164
+ * - `mouse-wheel-up`
2165
+ * - `mouse-wheel-down`
2166
+ * - `mouse-wheel-left`
2167
+ * - `mouse-wheel-right`
2168
+ * Available names for the normal keyboard keys
2160
2169
  *
2161
2170
  * - A
2162
2171
  * - B
@@ -4667,6 +4676,10 @@ interface ItemPrototype extends Prototype {
4667
4676
  icons?: IconData[];
4668
4677
  ingredient_to_weight_coefficient?: double;
4669
4678
  inventory_move_sound?: Sound;
4679
+ /**
4680
+ * Whether this item should be moved to the hub when space platform performs building, upgrade or deconstruction and is left with this item. The following items are considered valuable and moved to hub by default: {@link Modules | prototype:ModulePrototype}, {@link items that build entities | prototype:ItemPrototype::place_result}, {@link items that build tiles | prototype:ItemPrototype::place_as_tile} and items {@link not obtainable from asteroid chunks | prototype:AsteroidChunkPrototype::minable} that have {@link subgroup | prototype:PrototypeBase::subgroup} from a {@link group | prototype:ItemSubGroup::group} other than `"intermediate-products"`.
4681
+ */
4682
+ moved_to_hub_when_building?: boolean;
4670
4683
  open_sound?: Sound;
4671
4684
  pick_sound?: Sound;
4672
4685
  /**
@@ -4697,7 +4710,7 @@ interface ItemPrototype extends Prototype {
4697
4710
  *
4698
4711
  * When "manual" is set, it can only be launched by pressing the launch button in the rocket silo.
4699
4712
  *
4700
- * When "automated" is set, it will force the existence of "launch to orbit automatically" checkBox in the rocket silo which will then force the silo to automatically send the item to orbit when present.
4713
+ * When "automated" is set, it will force the existence of "launch to orbit automatically" checkbox in the rocket silo which will then force the silo to automatically send the item to orbit when present.
4701
4714
  */
4702
4715
  send_to_orbit_mode?: SendToOrbitMode;
4703
4716
  /**
@@ -4953,7 +4966,7 @@ interface LabPrototype extends EntityWithOwnerPrototype {
4953
4966
  on_animation?: Animation;
4954
4967
  researching_speed?: double;
4955
4968
  /**
4956
- * May not be 0. May not be larger than 100.
4969
+ * May not be `0` or larger than `100`.
4957
4970
  */
4958
4971
  science_pack_drain_rate_percent?: uint8;
4959
4972
  trash_inventory_size?: ItemStackIndex;
@@ -5132,6 +5145,10 @@ interface LandMinePrototype extends EntityWithOwnerPrototype {
5132
5145
  */
5133
5146
  trigger_collision_mask?: CollisionMaskConnector;
5134
5147
  trigger_force?: ForceCondition;
5148
+ /**
5149
+ * Time between checks to detonate due to nearby enemies. A larger time will be more performant.
5150
+ */
5151
+ trigger_interval?: uint32;
5135
5152
  trigger_radius: double;
5136
5153
  }
5137
5154
  interface LaneSplitterPrototype extends TransportBeltConnectablePrototype {
@@ -5548,6 +5565,9 @@ interface MiningDrillPrototype extends EntityWithOwnerPrototype {
5548
5565
  * Note: Categories containing resources which produce items, fluids, or items+fluids may be combined on the same entity, but may not work as expected. Examples: Miner does not rotate fluid-resulting resources until depletion. Fluid isn't output (fluid resource change and fluidbox matches previous fluid). Miner with no `vector_to_place_result` can't output an item result and halts.
5549
5566
  */
5550
5567
  resource_categories: ResourceCategoryID[];
5568
+ /**
5569
+ * May not be `0` or larger than `100`.
5570
+ */
5551
5571
  resource_drain_rate_percent?: uint8;
5552
5572
  /**
5553
5573
  * The distance from the centre of the mining drill to search for resources in.
@@ -7987,10 +8007,18 @@ interface SmokeWithTriggerPrototype extends SmokePrototype {
7987
8007
  * A {@link portable solar panel | https://wiki.factorio.com/Portable_solar_panel}.
7988
8008
  */
7989
8009
  interface SolarPanelEquipmentPrototype extends EquipmentPrototype {
8010
+ performance_at_day?: double;
8011
+ performance_at_night?: double;
7990
8012
  /**
7991
8013
  * How much power should be provided.
7992
8014
  */
7993
8015
  power: Energy;
8016
+ /**
8017
+ * Surface property must have a positive {@link default value | prototype:SurfacePropertyPrototype::default_value}. When {@link SolarPanelEquipmentPrototype::solar_coefficient_property | prototype:SolarPanelEquipmentPrototype::solar_coefficient_property} is set to point at a different surface property than "solar-power", then {@link LuaSurface::solar_power_multiplier | runtime:LuaSurface::solar_power_multiplier} and {@link SpaceLocationPrototype::solar_power_in_space | prototype:SpaceLocationPrototype::solar_power_in_space} will be ignored as the solar panel power output will be only affected by value of this surface property set on the surface using {@link PlanetPrototype::surface_properties | prototype:PlanetPrototype::surface_properties} or {@link LuaSurface::set_property | runtime:LuaSurface::set_property}.
8018
+ *
8019
+ * Due to equipment grid overall description, when solar_coefficient_property is not solar-power, a different locale will be used to show total energy production of solar panels: `description.solar-panel-power-X` where X is the surface property name.
8020
+ */
8021
+ solar_coefficient_property?: SurfacePropertyID;
7994
8022
  }
7995
8023
  /**
7996
8024
  * A {@link solar panel | https://wiki.factorio.com/Solar_panel}.
@@ -8658,11 +8686,11 @@ interface StickerPrototype extends EntityPrototype {
8658
8686
  /**
8659
8687
  * The `hidden` property of stickers is hardcoded to `true`.
8660
8688
  */
8661
- hidden?: boolean;
8689
+ hidden: true;
8662
8690
  /**
8663
8691
  * The `hidden_in_factoriopedia` property of stickers is hardcoded to `true`.
8664
8692
  */
8665
- hidden_in_factoriopedia?: boolean;
8693
+ hidden_in_factoriopedia: true;
8666
8694
  render_layer?: RenderLayer;
8667
8695
  /**
8668
8696
  * Using this property marks the sticker as a "selection sticker", meaning that the selection box will be rendered around the entity when the sticker is on it.
@@ -9745,6 +9773,14 @@ interface UtilityConstants extends PrototypeBase {
9745
9773
  asteroid_position_offset_to_speed_coefficient: double;
9746
9774
  asteroid_spawning_offset: SimpleBoundingBox;
9747
9775
  asteroid_spawning_with_random_orientation_max_speed: double;
9776
+ /**
9777
+ * Will be clamped to the range [2, 100].
9778
+ */
9779
+ blueprint_big_slots_per_row: uint8;
9780
+ /**
9781
+ * Will be clamped to the range [2, 100].
9782
+ */
9783
+ blueprint_small_slots_per_row: uint8;
9748
9784
  /**
9749
9785
  * The base game uses more entries here that are applied via the ammo-category.lua file.
9750
9786
  */
@@ -9770,7 +9806,12 @@ interface UtilityConstants extends PrototypeBase {
9770
9806
  clear_cursor_volume_modifier: float;
9771
9807
  clipboard_history_size: uint32;
9772
9808
  color_filters?: ColorFilterData[];
9809
+ construction_robots_use_busy_robots_queue: boolean;
9773
9810
  count_button_size: int32;
9811
+ /**
9812
+ * Will be clamped to the range [1, 100].
9813
+ */
9814
+ crafting_queue_slots_per_row: uint8;
9774
9815
  daytime_color_lookup: DaytimeColorLookupTable;
9775
9816
  deconstruct_mark_tint: Color;
9776
9817
  default_alert_icon_scale: float;
@@ -9862,9 +9903,9 @@ interface UtilityConstants extends PrototypeBase {
9862
9903
  */
9863
9904
  inserter_hand_stack_max_sprites: ItemCountType;
9864
9905
  /**
9865
- * Must be in range [1, 100].
9906
+ * Will be clamped to the range [1, 100].
9866
9907
  */
9867
- inventory_width: uint32;
9908
+ inventory_width: uint8;
9868
9909
  item_ammo_magazine_left_bar_color: Color;
9869
9910
  item_default_random_tint_strength: Color;
9870
9911
  /**
@@ -9894,6 +9935,11 @@ interface UtilityConstants extends PrototypeBase {
9894
9935
  lightning_attractor_protection_range_color: Color;
9895
9936
  logistic_gui_selected_network_highlight_tint: Color;
9896
9937
  logistic_gui_unselected_network_highlight_tint: Color;
9938
+ logistic_robots_use_busy_robots_queue: boolean;
9939
+ /**
9940
+ * Will be clamped to the range [2, 100].
9941
+ */
9942
+ logistic_slots_per_row: uint8;
9897
9943
  low_energy_robot_estimate_multiplier: double;
9898
9944
  main_menu_background_image_location: FileName;
9899
9945
  main_menu_background_vignette_intensity: float;
@@ -9919,9 +9965,9 @@ interface UtilityConstants extends PrototypeBase {
9919
9965
  minimum_recipe_overload_multiplier: uint32;
9920
9966
  missing_preview_sprite_location: FileName;
9921
9967
  /**
9922
- * Must be in range [1, 100].
9968
+ * Will be clamped to the range [1, 100].
9923
9969
  */
9924
- module_inventory_width: uint32;
9970
+ module_inventory_width: uint8;
9925
9971
  /**
9926
9972
  * Silently clamped to be between 0 and 1.
9927
9973
  */
@@ -9939,11 +9985,11 @@ interface UtilityConstants extends PrototypeBase {
9939
9985
  rocket_lift_weight: Weight;
9940
9986
  script_command_console_chat_color: Color;
9941
9987
  /**
9942
- * Must be in range [1, 100].
9988
+ * Will be clamped to the range [1, 100].
9943
9989
  */
9944
9990
  select_group_row_count: uint8;
9945
9991
  /**
9946
- * Must be in range [1, 100].
9992
+ * Will be clamped to the range [1, 100].
9947
9993
  */
9948
9994
  select_slot_row_count: uint8;
9949
9995
  selected_chart_search_highlight: Color;
@@ -9957,6 +10003,10 @@ interface UtilityConstants extends PrototypeBase {
9957
10003
  * Variables: speed, thrust, weight, width, height
9958
10004
  */
9959
10005
  space_platform_acceleration_expression: MathExpression;
10006
+ /**
10007
+ * How many asteroid chunks should be processed per tick, see {@link space_platform_max_relative_speed_deviation_for_asteroid_chunks_update | prototype:UtilityConstants::space_platform_max_relative_speed_deviation_for_asteroid_chunks_update}.
10008
+ */
10009
+ space_platform_asteroid_chunk_trajectory_updates_per_tick: uint32;
9960
10010
  /**
9961
10011
  * Determines how fast space platforms will send items in drop slots to the surface. Each item type has its own cooldown.
9962
10012
  */
@@ -9965,6 +10015,10 @@ interface UtilityConstants extends PrototypeBase {
9965
10015
  * Delay after manual transfer until space platform sends items in drop slots to the surface. Overrides remaining space_platform_dump_cooldown in this instance.
9966
10016
  */
9967
10017
  space_platform_manual_dump_cooldown: uint32;
10018
+ /**
10019
+ * Space platform remembers relative speed range which asteroids use while it moves. When the range is larger than the specified deviation, the platform will start updating cached trajectories of all asteroid chunks over multiple ticks.
10020
+ */
10021
+ space_platform_max_relative_speed_deviation_for_asteroid_chunks_update: float;
9968
10022
  space_platform_max_size: SimpleBoundingBox;
9969
10023
  space_platform_relative_speed_factor: double;
9970
10024
  space_platform_starfield_movement_vector: Vector;
@@ -9990,6 +10044,10 @@ interface UtilityConstants extends PrototypeBase {
9990
10044
  train_temporary_stop_wait_time: uint32;
9991
10045
  train_time_wait_condition_default: uint32;
9992
10046
  train_visualization: TrainVisualizationConstants;
10047
+ /**
10048
+ * Will be clamped to the range [1, 100].
10049
+ */
10050
+ trash_inventory_width: uint8;
9993
10051
  tree_leaf_distortion_distortion_far: Vector;
9994
10052
  tree_leaf_distortion_distortion_near: Vector;
9995
10053
  tree_leaf_distortion_speed_far: Vector;
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.51
5
+ // Factorio version 2.0.54
6
6
  // API version 6
7
7
 
8
8
  declare namespace prototype {
@@ -3247,6 +3247,7 @@ interface CreateDecorativesTriggerEffectItem extends TriggerEffectItem {
3247
3247
  type: 'create-decorative';
3248
3248
  }
3249
3249
  interface CreateEntityTriggerEffectItemBase extends TriggerEffectItem {
3250
+ abort_if_over_space?: boolean;
3250
3251
  /**
3251
3252
  * If true, creates the entity as a member of the enemy force. If the surface.no_enemies_mode is true, the entity will not be created.
3252
3253
  */
@@ -4652,10 +4653,7 @@ interface FluidEnergySource extends BaseEnergySource {
4652
4653
  smoke?: SmokeSource[];
4653
4654
  type: 'fluid';
4654
4655
  }
4655
- type FluidFlowDirection = 'input-output' | 'input' | /**
4656
- * ,
4657
- */
4658
- 'output';
4656
+ type FluidFlowDirection = 'input-output' | 'input' | 'output';
4659
4657
  /**
4660
4658
  * The name of a {@link FluidPrototype | prototype:FluidPrototype}.
4661
4659
  * @example ```
@@ -8691,6 +8689,8 @@ interface SelectionModeData {
8691
8689
  }
8692
8690
  /**
8693
8691
  * An array containing the following values.
8692
+ *
8693
+ * Some flags only exclude objects from the selection, meaning they need to be combined with another flag to select anything.
8694
8694
  */
8695
8695
  type SelectionModeFlags = (/**
8696
8696
  * Selects entities and tiles as if selecting them for a blueprint.
@@ -8723,16 +8723,16 @@ type SelectionModeFlags = (/**
8723
8723
  * Selects all tiles.
8724
8724
  */
8725
8725
  'any-tile' | /**
8726
- * Selects entities with the same force as the selecting player.
8726
+ * Excludes entities that have a different force than the selecting player from the selection.
8727
8727
  */
8728
8728
  'same-force' | /**
8729
- * Selects entities with a different force as the selecting player.
8729
+ * Excludes entities that have the same force as the selecting player from the selection.
8730
8730
  */
8731
8731
  'not-same-force' | /**
8732
- * Selects entities from a friendly force.
8732
+ * Excludes entities that are not from a friendly force from the selection.
8733
8733
  */
8734
8734
  'friend' | /**
8735
- * Selects entities from an enemy force.
8735
+ * Excludes entities that are not from an enemy force from the selection.
8736
8736
  */
8737
8737
  'enemy' | /**
8738
8738
  * Selects entities as if selecting them for upgrading.
@@ -8753,9 +8753,12 @@ type SelectionModeFlags = (/**
8753
8753
  * Selects entities that are an {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype}.
8754
8754
  */
8755
8755
  'entity-with-owner' | /**
8756
- * Selects entities that are not a {@link RollingStockPrototype | prototype:RollingStockPrototype}.
8756
+ * Excludes {@link RollingStockPrototype | prototype:RollingStockPrototype}s from the selection.
8757
8757
  */
8758
- 'avoid-rolling-stock' | 'avoid-vehicle' | 'controllable' | 'controllable-add' | 'controllable-remove' | /**
8758
+ 'avoid-rolling-stock' | /**
8759
+ * Excludes {@link VehiclePrototype | prototype:VehiclePrototype}s from the selection.
8760
+ */
8761
+ 'avoid-vehicle' | 'controllable' | 'controllable-add' | 'controllable-remove' | /**
8759
8762
  * Selects entities that are an {@link EntityGhostPrototype | prototype:EntityGhostPrototype}.
8760
8763
  */
8761
8764
  'entity-ghost' | /**
@@ -8792,16 +8795,16 @@ type SelectionModeFlags = (/**
8792
8795
  * Selects all tiles.
8793
8796
  */
8794
8797
  'any-tile' | /**
8795
- * Selects entities with the same force as the selecting player.
8798
+ * Excludes entities that have a different force than the selecting player from the selection.
8796
8799
  */
8797
8800
  'same-force' | /**
8798
- * Selects entities with a different force as the selecting player.
8801
+ * Excludes entities that have the same force as the selecting player from the selection.
8799
8802
  */
8800
8803
  'not-same-force' | /**
8801
- * Selects entities from a friendly force.
8804
+ * Excludes entities that are not from a friendly force from the selection.
8802
8805
  */
8803
8806
  'friend' | /**
8804
- * Selects entities from an enemy force.
8807
+ * Excludes entities that are not from an enemy force from the selection.
8805
8808
  */
8806
8809
  'enemy' | /**
8807
8810
  * Selects entities as if selecting them for upgrading.
@@ -8822,9 +8825,12 @@ type SelectionModeFlags = (/**
8822
8825
  * Selects entities that are an {@link EntityWithOwnerPrototype | prototype:EntityWithOwnerPrototype}.
8823
8826
  */
8824
8827
  'entity-with-owner' | /**
8825
- * Selects entities that are not a {@link RollingStockPrototype | prototype:RollingStockPrototype}.
8828
+ * Excludes {@link RollingStockPrototype | prototype:RollingStockPrototype}s from the selection.
8829
+ */
8830
+ 'avoid-rolling-stock' | /**
8831
+ * Excludes {@link VehiclePrototype | prototype:VehiclePrototype}s from the selection.
8826
8832
  */
8827
- 'avoid-rolling-stock' | 'avoid-vehicle' | 'controllable' | 'controllable-add' | 'controllable-remove' | /**
8833
+ 'avoid-vehicle' | 'controllable' | 'controllable-add' | 'controllable-remove' | /**
8828
8834
  * Selects entities that are an {@link EntityGhostPrototype | prototype:EntityGhostPrototype}.
8829
8835
  */
8830
8836
  'entity-ghost' | /**
@@ -10057,7 +10063,7 @@ interface StatelessVisualisation {
10057
10063
  /**
10058
10064
  * One of `nested_visualisations`, `animation` and `light` needs to be defined.
10059
10065
  */
10060
- nested_visualisations?: StatelessVisualisation | StatelessVisualisation[];
10066
+ nested_visualisations?: StatelessVisualisations;
10061
10067
  offset_x?: RangedValue;
10062
10068
  offset_y?: RangedValue;
10063
10069
  offset_z?: RangedValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factorio-types",
3
- "version": "1.2.36",
3
+ "version": "1.2.38",
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.51",
26
+ "factorioVersion": "2.0.54",
27
27
  "dependencies": {
28
28
  "lua-types": "^2.13.1"
29
29
  },