typed-factorio 0.10.0 → 0.11.1

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,11 @@
1
+ # v0.11.1
2
+
3
+ - Localised strings now accept boolean and undefined.
4
+
5
+ # v0.11.0
6
+
7
+ - Update to factorio version 1.1.46
8
+
1
9
  # v0.10.0
2
10
 
3
11
  - LuaGuiElement.style and LuaControl.opened now have different get/set types (more specific get type).
@@ -1349,10 +1349,12 @@ interface LuaControl {
1349
1349
  */
1350
1350
  clear_vehicle_logistic_slot(slot_index: uint): void
1351
1351
  /**
1352
- * Returns whether the player is holding a blueprint, it takes into account a blueprint as an item as well as
1353
- * blueprint from the blueprint record from the blueprint library. Note that the is_cursor_blueprint and
1354
- * get_cursor_blueprint_entities refer to the currently selected blueprint, so it returns blueprint related
1355
- * information also when holding a blueprint book with a blueprint being selected in it.
1352
+ * Returns whether the player is holding a blueprint. This takes both blueprint items as well as blueprint records
1353
+ * from the blueprint library into account.
1354
+ *
1355
+ * **Note**: Both this method and {@link LuaControl.get_blueprint_entities LuaControl::get_blueprint_entities} refer
1356
+ * to the currently selected blueprint, meaning a blueprint book with a selected blueprint will return the
1357
+ * information as well.
1356
1358
  *
1357
1359
  * {@link https://lua-api.factorio.com/next/LuaControl.html#LuaControl.is_cursor_blueprint View documentation}
1358
1360
  */
@@ -9639,6 +9641,15 @@ interface BaseGuiElement {
9639
9641
  * {@link https://lua-api.factorio.com/next/LuaGuiElement.html#LuaGuiElement.get_index_in_parent View documentation}
9640
9642
  */
9641
9643
  get_index_in_parent(): uint
9644
+ /**
9645
+ * Swaps the children at the given indices in this element.
9646
+ *
9647
+ * {@link https://lua-api.factorio.com/next/LuaGuiElement.html#LuaGuiElement.swap_children View documentation}
9648
+ *
9649
+ * @param index_1 - The index of the first child.
9650
+ * @param index_2 - The index of the second child.
9651
+ */
9652
+ swap_children(index_1: uint, index_2: uint): void
9642
9653
  /**
9643
9654
  * Focuses this GUI element if possible.
9644
9655
  *
@@ -19639,7 +19650,7 @@ interface LuaTrain {
19639
19650
  /**
19640
19651
  * The players killed by this train.
19641
19652
  *
19642
- * The keys are the player indexes, the values are how often this train killed that player.
19653
+ * The keys are the player indices, the values are how often this train killed that player.
19643
19654
  *
19644
19655
  * {@link https://lua-api.factorio.com/next/LuaTrain.html#LuaTrain.killed_players View documentation}
19645
19656
  */
@@ -47,7 +47,7 @@
47
47
  * game.print({"", {"item-name.iron-plate"}, ": ", 60})
48
48
  * ```
49
49
  */
50
- type LocalisedString = readonly [string, ...LocalisedString[]] | string | number
50
+ type LocalisedString = readonly [string, ...LocalisedString[]] | string | number | boolean | undefined
51
51
 
52
52
  interface DisplayResolution {
53
53
  readonly width: uint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",