typed-factorio 0.11.1 → 0.12.0

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/Changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.12.0
2
+
3
+ - Update to factorio version 1.1.48
4
+
1
5
  # v0.11.1
2
6
 
3
7
  - Localised strings now accept boolean and undefined.
@@ -1291,47 +1291,41 @@ interface LuaControl {
1291
1291
  /**
1292
1292
  * Sets a personal logistic request and auto-trash slot to the given value.
1293
1293
  *
1294
- * **Note**: This will silently fail if personal logistics are not researched yet.
1295
- *
1296
1294
  * {@link https://lua-api.factorio.com/next/LuaControl.html#LuaControl.set_personal_logistic_slot View documentation}
1297
1295
  *
1298
1296
  * @param slot_index - The slot to set.
1299
1297
  * @param value - The logistic request parameters.
1300
- * @returns Whether the slot was set successfully.
1298
+ * @returns Whether the slot was set successfully. `false` if personal logistics are not researched yet.
1301
1299
  */
1302
- set_personal_logistic_slot(slot_index: uint, value: PersonalLogisticParameters): boolean
1300
+ set_personal_logistic_slot(slot_index: uint, value: LogisticParameters): boolean
1303
1301
  /**
1304
1302
  * Sets a vehicle logistic request and auto-trash slot to the given value.
1305
1303
  *
1306
- * **Note**: This will silently fail if the vehicle does not use logistics.
1307
- *
1308
1304
  * {@link https://lua-api.factorio.com/next/LuaControl.html#LuaControl.set_vehicle_logistic_slot View documentation}
1309
1305
  *
1310
1306
  * @param slot_index - The slot to set.
1311
1307
  * @param value - The logistic request parameters.
1312
- * @returns Whether the slot was set successfully.
1308
+ * @returns Whether the slot was set successfully. `false` if the vehicle does not use logistics.
1313
1309
  */
1314
- set_vehicle_logistic_slot(slot_index: uint, value: PersonalLogisticParameters): boolean
1310
+ set_vehicle_logistic_slot(slot_index: uint, value: LogisticParameters): boolean
1315
1311
  /**
1316
1312
  * Gets the parameters of a personal logistic request and auto-trash slot.
1317
1313
  *
1318
- * **Note**: This will silently return an empty value (`name` will be `nil`) if personal logistics are not researched yet.
1319
- *
1320
1314
  * {@link https://lua-api.factorio.com/next/LuaControl.html#LuaControl.get_personal_logistic_slot View documentation}
1321
1315
  *
1322
1316
  * @param slot_index - The slot to get.
1317
+ * @returns The logistic parameters. If personal logistics are not researched yet, their `name` will be `nil`.
1323
1318
  */
1324
- get_personal_logistic_slot(slot_index: uint): PersonalLogisticParameters
1319
+ get_personal_logistic_slot(slot_index: uint): LogisticParameters | undefined
1325
1320
  /**
1326
1321
  * Gets the parameters of a vehicle logistic request and auto-trash slot.
1327
1322
  *
1328
- * **Note**: This will silently return an empty value (`name` will be `nil`) if the vehicle does not use logistics.
1329
- *
1330
1323
  * {@link https://lua-api.factorio.com/next/LuaControl.html#LuaControl.get_vehicle_logistic_slot View documentation}
1331
1324
  *
1332
1325
  * @param slot_index - The slot to get.
1326
+ * @returns The logistic parameters. If the vehicle does not use logistics, their `name` will be `nil`.
1333
1327
  */
1334
- get_vehicle_logistic_slot(slot_index: uint): PersonalLogisticParameters
1328
+ get_vehicle_logistic_slot(slot_index: uint): LogisticParameters | undefined
1335
1329
  /**
1336
1330
  * **Note**: This will silently fail if personal logistics are not researched yet.
1337
1331
  *
@@ -5834,6 +5828,12 @@ interface LuaEntityPrototype {
5834
5828
  * {@link https://lua-api.factorio.com/next/LuaEntityPrototype.html#LuaEntityPrototype.related_underground_belt View documentation}
5835
5829
  */
5836
5830
  readonly related_underground_belt: LuaEntityPrototype
5831
+ /**
5832
+ * Gets the current stack size bonus of this entity, returns nil if not an inserter.
5833
+ *
5834
+ * {@link https://lua-api.factorio.com/next/LuaEntityPrototype.html#LuaEntityPrototype.inserter_stack_size_bonus View documentation}
5835
+ */
5836
+ readonly inserter_stack_size_bonus: double | undefined
5837
5837
  /**
5838
5838
  * Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
5839
5839
  *
@@ -6827,6 +6827,7 @@ interface LuaFluidEnergySourcePrototype {
6827
6827
  readonly effectivity: double
6828
6828
  readonly burns_fluid: boolean
6829
6829
  readonly scale_fluid_usage: boolean
6830
+ readonly destroy_non_fuel_fluid: boolean
6830
6831
  readonly fluid_usage_per_tick: double
6831
6832
  /**
6832
6833
  * The smoke sources for this prototype if any.
@@ -12140,7 +12141,7 @@ interface LuaItemStack {
12140
12141
  */
12141
12142
  transfer_stack(stack: ItemStackIdentification): boolean
12142
12143
  /**
12143
- * Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string
12144
+ * Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string.
12144
12145
  *
12145
12146
  * {@link https://lua-api.factorio.com/next/LuaItemStack.html#LuaItemStack.export_stack View documentation}
12146
12147
  *
@@ -12148,7 +12149,7 @@ interface LuaItemStack {
12148
12149
  */
12149
12150
  export_stack(): string
12150
12151
  /**
12151
- * Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string
12152
+ * Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string.
12152
12153
  *
12153
12154
  * {@link https://lua-api.factorio.com/next/LuaItemStack.html#LuaItemStack.import_stack View documentation}
12154
12155
  *
@@ -12199,8 +12200,6 @@ interface LuaItemStack {
12199
12200
  */
12200
12201
  get_inventory(inventory: defines.inventory): LuaInventory | undefined
12201
12202
  /**
12202
- * Build this blueprint
12203
- *
12204
12203
  * **Note**: Built entities can be come invalid between the building of the blueprint and the function returning if
12205
12204
  * by_player or raise_built is used and one of those events invalidates the entity.
12206
12205
  *
@@ -14688,6 +14687,12 @@ interface LuaPlayer extends LuaControl {
14688
14687
  * {@link https://lua-api.factorio.com/next/LuaPlayer.html#LuaPlayer.spectator View documentation}
14689
14688
  */
14690
14689
  spectator: boolean
14690
+ /**
14691
+ * If `true`, circle and name of given player is rendered on the map/chart.
14692
+ *
14693
+ * {@link https://lua-api.factorio.com/next/LuaPlayer.html#LuaPlayer.show_on_map View documentation}
14694
+ */
14695
+ show_on_map: boolean
14691
14696
  /**
14692
14697
  * If items not included in this map editor infinity inventory filters should be removed.
14693
14698
  *
@@ -17239,6 +17244,12 @@ interface LuaStyle {
17239
17244
  * {@link https://lua-api.factorio.com/next/LuaStyle.html#LuaStyle.use_header_filler View documentation}
17240
17245
  */
17241
17246
  use_header_filler: boolean
17247
+ /**
17248
+ * *Can only be used if this is LuaProgressBarStyle*
17249
+ *
17250
+ * {@link https://lua-api.factorio.com/next/LuaStyle.html#LuaStyle.bar_width View documentation}
17251
+ */
17252
+ bar_width: uint
17242
17253
  /**
17243
17254
  * *Can only be used if this is LuaProgressBarStyle*
17244
17255
  *
@@ -9,13 +9,13 @@
9
9
  *
10
10
  * The template can contain placeholders such as `__1__` or `__2__`. These will be replaced by the respective parameter
11
11
  * in the LocalisedString. The parameters themselves can be other localised strings, which will be processed recursively
12
- * in the same fashion. Localised strings cannot be recursed deeper than 20 levels and cannot have more than 20 parameters.
12
+ * in the same fashion. Localised strings can not be recursed deeper than 20 levels and can not have more than 20 parameters.
13
13
  *
14
14
  * As a special case, when the key is just the empty string, all the parameters will be concatenated (after processing,
15
15
  * if any are localised strings). If there is only one parameter, it will be used as is.
16
16
  *
17
17
  * Furthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table)
18
- * which will not be translated, or number which will be converted to its textual representation.
18
+ * which will not be translated, as well as a number or boolean, which will be converted to their textual representation.
19
19
  *
20
20
  * {@link https://lua-api.factorio.com/next/Concepts.html#LocalisedString View documentation}
21
21
  *
@@ -54,7 +54,7 @@ interface DisplayResolution {
54
54
  readonly height: uint
55
55
  }
56
56
 
57
- interface PersonalLogisticParameters {
57
+ interface LogisticParameters {
58
58
  /** The item. `nil` clears the filter. */
59
59
  readonly name?: string
60
60
  readonly min?: uint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",