typed-factorio 2.13.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "Featureful typescript definitions for the Factorio modding api.",
5
5
  "keywords": [
6
6
  "factorio",
@@ -493,7 +493,7 @@ declare module "factorio:prototype" {
493
493
  *
494
494
  * Only loaded if `layers` is not defined.
495
495
  *
496
- * Minimal mode is entered when mod loading fails. You are in it when you see the gray box after (part of) the loading screen that tells you a mod error ({@linkplain https://cdn.discordapp.com/attachments/340530709712076801/532315796626472972/unknown.png Example}). Modders can ignore this property.
496
+ * Minimal mode is entered when mod loading fails. You are in it when you see the gray box after (part of) the loading screen that tells you a mod error. Modders can ignore this property.
497
497
  * @see {@link https://lua-api.factorio.com/1.1.110/prototypes/AnimationPrototype.html#load_in_minimal_mode Online documentation}
498
498
  */
499
499
  load_in_minimal_mode?: bool
@@ -4830,7 +4830,7 @@ declare module "factorio:prototype" {
4830
4830
  /**
4831
4831
  * **Default:** `max double`
4832
4832
  *
4833
- * The maximum flying speed of the robot, in tiles/tick. Useful to limit the impact of {@linkplain https://wiki.factorio.com/Worker_robot_speed_(research worker robot speed (research)}).
4833
+ * The maximum flying speed of the robot, including bonuses, in tiles/tick. Useful to limit the impact of {@link WorkerRobotSpeedModifier worker robot speed research}.
4834
4834
  * @see {@link https://lua-api.factorio.com/1.1.110/prototypes/FlyingRobotPrototype.html#max_speed Online documentation}
4835
4835
  */
4836
4836
  max_speed?: double
@@ -7749,7 +7749,7 @@ declare module "factorio:prototype" {
7749
7749
  /**
7750
7750
  * Specifies the kind of prototype this is.
7751
7751
  *
7752
- * For a list of all types used in vanilla, see {@linkplain https://wiki.factorio.com/Data.raw data.raw}.
7752
+ * For a list of all possible types, see the {@linkplain https://lua-api.factorio.com/1.1.110/prototypes.html prototype overview}.
7753
7753
  * @see {@link https://lua-api.factorio.com/1.1.110/prototypes/PrototypeBase.html#type Online documentation}
7754
7754
  */
7755
7755
  type: keyof PrototypeMap
@@ -9132,6 +9132,10 @@ declare module "factorio:prototype" {
9132
9132
  */
9133
9133
  export interface RobotWithLogisticInterfacePrototype extends FlyingRobotPrototype {
9134
9134
  type: "construction-robot" | "logistic-robot"
9135
+ /**
9136
+ * The robot's cargo carrying capacity. Can be increased by {@link WorkerRobotStorageModifier worker robot cargo size research}.
9137
+ * @see {@link https://lua-api.factorio.com/1.1.110/prototypes/RobotWithLogisticInterfacePrototype.html#max_payload_size Online documentation}
9138
+ */
9135
9139
  max_payload_size: ItemCountType
9136
9140
  cargo_centered: Vector
9137
9141
  /**
@@ -10560,7 +10564,7 @@ declare module "factorio:prototype" {
10560
10564
  *
10561
10565
  * Only loaded if `layers` is not defined.
10562
10566
  *
10563
- * Minimal mode is entered when mod loading fails. You are in it when you see the gray box after (part of) the loading screen that tells you a mod error ({@linkplain https://cdn.discordapp.com/attachments/340530709712076801/532315796626472972/unknown.png Example}). Modders can ignore this property.
10567
+ * Minimal mode is entered when mod loading fails. You are in it when you see the gray box after (part of) the loading screen that tells you a mod error. Modders can ignore this property.
10564
10568
  * @see {@link https://lua-api.factorio.com/1.1.110/prototypes/SpritePrototype.html#load_in_minimal_mode Online documentation}
10565
10569
  */
10566
10570
  load_in_minimal_mode?: bool
@@ -11066,7 +11070,7 @@ declare module "factorio:prototype" {
11066
11070
  */
11067
11071
  icons?: readonly IconData[]
11068
11072
  /**
11069
- * Path to the icon file. If this and `icon` is not set, the `material_background` in `variants` is used as the icon.
11073
+ * Path to the icon file. If this and `icons` is not set, the `material_background` in `variants` is used as the icon.
11070
11074
  *
11071
11075
  * Only loaded if `icons` is not defined.
11072
11076
  * @see {@link https://lua-api.factorio.com/1.1.110/prototypes/TilePrototype.html#icon Online documentation}
@@ -5549,15 +5549,17 @@ declare module "factorio:prototype" {
5549
5549
  readonly type: "horizontal_scrollbar_style"
5550
5550
  }
5551
5551
  /**
5552
- * Icon layering follows the following rules:
5552
+ * One layer of an icon. Icon layering follows the following rules:
5553
5553
  *
5554
- * - The rendering order of the individual icons follows the array order: Later added icons (higher index) are drawn on top of previously added icons (lower index).
5554
+ * - The rendering order of the individual icon layers follows the array order: Later added icon layers (higher index) are drawn on top of previously added icon layers (lower index).
5555
5555
  *
5556
5556
  * - Only the first icon layer will display a shadow.
5557
5557
  *
5558
5558
  * - When the final icon is displayed with transparency (e.g. a faded out alert), the icon layer overlap may look {@linkplain https://forums.factorio.com/viewtopic.php?p=575844#p575844 undesirable}.
5559
5559
  *
5560
- * - The final combination of icons will always be resized in GUI based on the first icon layer's size, but won't be resized when displayed on machines in alt-mode. For example: recipe first icon layer is size 128, scale 1, the icon group will be displayed at resolution /4 to fit the 32px GUI boxes, but will be displayed 4 times as large on buildings.
5560
+ * - When the final icon is displayed with a shadow (e.g. an item on the ground or on a belt when item shadows are turned on), each icon layer will {@linkplain https://forums.factorio.com/84888 cast a shadow} and the shadow is cast on the layer below it.
5561
+ *
5562
+ * - The final icon will always be resized in GUI based on the first icon layer's size, but won't be resized when displayed on machines in alt-mode. For example: recipe first icon layer is size 128, scale 1, the icon group will be displayed at resolution /4 to fit the 32px GUI boxes, but will be displayed 4 times as large on buildings.
5561
5563
  *
5562
5564
  * - Shift values are based on final size (`icon_size * scale`) of the first icon layer.
5563
5565
  * @example
@@ -5647,13 +5649,17 @@ declare module "factorio:prototype" {
5647
5649
  /**
5648
5650
  * **Default:** `0`
5649
5651
  *
5650
- * Icons of reduced size will be used at decreased scale.
5652
+ * Icons of reduced size will be used at decreased scale. If an icon doesn't specify custom mipmaps, the game will automatically generate them.
5651
5653
  * @see {@link https://lua-api.factorio.com/1.1.110/types/IconData.html#icon_mipmaps Online documentation}
5652
5654
  */
5653
5655
  icon_mipmaps?: IconMipMapType
5654
5656
  }
5655
5657
  /**
5656
- * Icons of reduced size will be used at decreased scale. 0 or 1 mipmaps is a single image. The file must contain half-size images with a geometric-ratio, for each mipmap level. Each next level is aligned to the upper-left corner, with no extra padding. Example sequence: `128x128@(0,0)`, `64x64@(128,0)`, `32x32@(192,0)` is three mipmaps.
5658
+ * Icons of reduced size will be used at decreased scale. 0 or 1 mipmaps is a single image.
5659
+ *
5660
+ * If an icon doesn't specify custom mipmaps, the game will automatically generate {@linkplain https://factorio.com/blog/post/fff-291 icon mipmaps} for it.
5661
+ *
5662
+ * For custom mipmaps, the file must contain half-size images with a geometric-ratio, for each mipmap level. Each next level is aligned to the upper-left corner, with no extra padding. Example sequence: `128x128@(0,0)`, `64x64@(128,0)`, `32x32@(192,0)` is three mipmaps.
5657
5663
  *
5658
5664
  * See {@linkplain https://factorio.com/blog/post/fff-291 here} for more about the visual effects of icon mipmaps.
5659
5665
  * @see {@link https://lua-api.factorio.com/1.1.110/types/IconMipMapType.html Online documentation}
@@ -10946,7 +10952,7 @@ declare module "factorio:prototype" {
10946
10952
  /**
10947
10953
  * **Default:** `false`
10948
10954
  *
10949
- * Minimal mode is entered when mod loading fails. You are in it when you see the gray box after (part of) the loading screen that tells you a mod error ({@linkplain https://cdn.discordapp.com/attachments/340530709712076801/532315796626472972/unknown.png Example}). Modders can ignore this property.
10955
+ * Minimal mode is entered when mod loading fails. You are in it when you see the gray box after (part of) the loading screen that tells you a mod error. Modders can ignore this property.
10950
10956
  * @see {@link https://lua-api.factorio.com/1.1.110/types/SpriteParameters.html#load_in_minimal_mode Online documentation}
10951
10957
  */
10952
10958
  load_in_minimal_mode?: bool
@@ -3391,7 +3391,7 @@ declare module "factorio:runtime" {
3391
3391
  */
3392
3392
  selected_gun_index?: uint
3393
3393
  /**
3394
- * Energy stored in the entity (heat in furnace, energy stored in electrical devices etc.). Always 0 for entities that don't have the concept of energy stored inside.
3394
+ * Energy stored in the entity's energy buffer (energy stored in electrical devices etc.). Always 0 for entities that don't have the concept of energy stored inside.
3395
3395
  * @example
3396
3396
  * game.player.print("Machine energy: " .. game.player.selected.energy .. "J")
3397
3397
  * game.player.selected.energy = 3000
@@ -3435,7 +3435,7 @@ declare module "factorio:runtime" {
3435
3435
  * {@link https://lua-api.factorio.com/1.1.110/classes/LuaEntity.html#LuaEntity.neighbours > Differs depending on the type of entity:}
3436
3436
  * @see {@link https://lua-api.factorio.com/1.1.110/classes/LuaEntity.html#LuaEntity.neighbours Online documentation}
3437
3437
  */
3438
- readonly neighbours: Record<string, LuaEntity[]> | LuaEntity[][] | LuaEntity
3438
+ readonly neighbours?: Record<string, LuaEntity[]> | LuaEntity[][] | LuaEntity
3439
3439
  /**
3440
3440
  * The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity.
3441
3441
  *
@@ -5027,7 +5027,7 @@ declare module "factorio:runtime" {
5027
5027
  */
5028
5028
  drop_target?: LuaEntity
5029
5029
  /**
5030
- * Energy stored in the entity (heat in furnace, energy stored in electrical devices etc.). Always 0 for entities that don't have the concept of energy stored inside.
5030
+ * Energy stored in the entity's energy buffer (energy stored in electrical devices etc.). Always 0 for entities that don't have the concept of energy stored inside.
5031
5031
  * @example
5032
5032
  * game.player.print("Machine energy: " .. game.player.selected.energy .. "J")
5033
5033
  * game.player.selected.energy = 3000
@@ -5050,7 +5050,7 @@ declare module "factorio:runtime" {
5050
5050
  * {@link https://lua-api.factorio.com/1.1.110/classes/LuaEntity.html#LuaEntity.neighbours > Differs depending on the type of entity:}
5051
5051
  * @see {@link https://lua-api.factorio.com/1.1.110/classes/LuaEntity.html#LuaEntity.neighbours Online documentation}
5052
5052
  */
5053
- readonly neighbours: Record<string, LuaEntity[]> | LuaEntity[][] | LuaEntity
5053
+ readonly neighbours?: Record<string, LuaEntity[]> | LuaEntity[][] | LuaEntity
5054
5054
  /**
5055
5055
  * Fluidboxes of this entity.
5056
5056
  * @see {@link https://lua-api.factorio.com/1.1.110/classes/LuaEntity.html#LuaEntity.fluidbox Online documentation}
@@ -12999,7 +12999,7 @@ declare module "factorio:runtime" {
12999
12999
  */
13000
13000
  readonly player?: LuaPlayer
13001
13001
  /**
13002
- * Get a table of all the players that currently exist. This sparse table allows you to find players by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all.
13002
+ * Get a table of all the players that currently exist. This sparse table allows you to find players by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will provide the `index`es as the keys. Iterating with `ipairs()` will not work at all.
13003
13003
  *
13004
13004
  * If only a single player is required, {@link LuaGameScript#get_player LuaGameScript::get_player} should be used instead, as it avoids the unnecessary overhead of passing the whole table to Lua.
13005
13005
  * @see {@link https://lua-api.factorio.com/1.1.110/classes/LuaGameScript.html#LuaGameScript.players Online documentation}
@@ -19002,12 +19002,12 @@ declare module "factorio:runtime" {
19002
19002
  * @see {@link https://lua-api.factorio.com/1.1.110/classes/LuaModSettingPrototype.html#LuaModSettingPrototype.mod Online documentation}
19003
19003
  */
19004
19004
  readonly mod: string
19005
- readonly setting_type: string
19005
+ readonly setting_type: "startup" | "runtime-global" | "runtime-per-user"
19006
19006
  /**
19007
19007
  * The default value of this setting.
19008
19008
  * @see {@link https://lua-api.factorio.com/1.1.110/classes/LuaModSettingPrototype.html#LuaModSettingPrototype.default_value Online documentation}
19009
19009
  */
19010
- readonly default_value: boolean | double | int | string
19010
+ readonly default_value: boolean | double | int | string | Color
19011
19011
  /**
19012
19012
  * The minimum value for this setting. `nil` if this setting type doesn't support a minimum.
19013
19013
  * @see {@link https://lua-api.factorio.com/1.1.110/classes/LuaModSettingPrototype.html#LuaModSettingPrototype.minimum_value Online documentation}
@@ -20746,7 +20746,7 @@ declare module "factorio:runtime" {
20746
20746
  */
20747
20747
  readonly visible?: boolean
20748
20748
  /**
20749
- * If this should be drawn below sprites and entities.
20749
+ * If this should be drawn below sprites and entities. Defaults to false.
20750
20750
  */
20751
20751
  readonly draw_on_ground?: boolean
20752
20752
  /**
@@ -20795,7 +20795,7 @@ declare module "factorio:runtime" {
20795
20795
  */
20796
20796
  readonly visible?: boolean
20797
20797
  /**
20798
- * If this should be drawn below sprites and entities. Rich text does not support this option.
20798
+ * If this should be drawn below sprites and entities. Rich text does not support this option. Defaults to false.
20799
20799
  */
20800
20800
  readonly draw_on_ground?: boolean
20801
20801
  /**
@@ -20865,7 +20865,7 @@ declare module "factorio:runtime" {
20865
20865
  */
20866
20866
  readonly visible?: boolean
20867
20867
  /**
20868
- * If this should be drawn below sprites and entities.
20868
+ * If this should be drawn below sprites and entities. Defaults to false.
20869
20869
  */
20870
20870
  readonly draw_on_ground?: boolean
20871
20871
  /**
@@ -20919,7 +20919,7 @@ declare module "factorio:runtime" {
20919
20919
  */
20920
20920
  readonly visible?: boolean
20921
20921
  /**
20922
- * If this should be drawn below sprites and entities.
20922
+ * If this should be drawn below sprites and entities. Defaults to false.
20923
20923
  */
20924
20924
  readonly draw_on_ground?: boolean
20925
20925
  /**
@@ -20973,7 +20973,7 @@ declare module "factorio:runtime" {
20973
20973
  */
20974
20974
  readonly visible?: boolean
20975
20975
  /**
20976
- * If this should be drawn below sprites and entities.
20976
+ * If this should be drawn below sprites and entities. Defaults to false.
20977
20977
  */
20978
20978
  readonly draw_on_ground?: boolean
20979
20979
  /**
@@ -21031,7 +21031,7 @@ declare module "factorio:runtime" {
21031
21031
  */
21032
21032
  readonly visible?: boolean
21033
21033
  /**
21034
- * If this should be drawn below sprites and entities.
21034
+ * If this should be drawn below sprites and entities. Defaults to false.
21035
21035
  */
21036
21036
  readonly draw_on_ground?: boolean
21037
21037
  /**
@@ -22040,7 +22040,7 @@ declare module "factorio:runtime" {
22040
22040
  */
22041
22041
  readonly visible?: boolean
22042
22042
  /**
22043
- * If this should be drawn below sprites and entities.
22043
+ * If this should be drawn below sprites and entities. Defaults to false.
22044
22044
  */
22045
22045
  readonly draw_on_ground?: boolean
22046
22046
  /**
@@ -22089,7 +22089,7 @@ declare module "factorio:runtime" {
22089
22089
  */
22090
22090
  readonly visible?: boolean
22091
22091
  /**
22092
- * If this should be drawn below sprites and entities. Rich text does not support this option.
22092
+ * If this should be drawn below sprites and entities. Rich text does not support this option. Defaults to false.
22093
22093
  */
22094
22094
  readonly draw_on_ground?: boolean
22095
22095
  /**
@@ -22159,7 +22159,7 @@ declare module "factorio:runtime" {
22159
22159
  */
22160
22160
  readonly visible?: boolean
22161
22161
  /**
22162
- * If this should be drawn below sprites and entities.
22162
+ * If this should be drawn below sprites and entities. Defaults to false.
22163
22163
  */
22164
22164
  readonly draw_on_ground?: boolean
22165
22165
  /**
@@ -22213,7 +22213,7 @@ declare module "factorio:runtime" {
22213
22213
  */
22214
22214
  readonly visible?: boolean
22215
22215
  /**
22216
- * If this should be drawn below sprites and entities.
22216
+ * If this should be drawn below sprites and entities. Defaults to false.
22217
22217
  */
22218
22218
  readonly draw_on_ground?: boolean
22219
22219
  /**
@@ -22267,7 +22267,7 @@ declare module "factorio:runtime" {
22267
22267
  */
22268
22268
  readonly visible?: boolean
22269
22269
  /**
22270
- * If this should be drawn below sprites and entities.
22270
+ * If this should be drawn below sprites and entities. Defaults to false.
22271
22271
  */
22272
22272
  readonly draw_on_ground?: boolean
22273
22273
  /**
@@ -22325,7 +22325,7 @@ declare module "factorio:runtime" {
22325
22325
  */
22326
22326
  readonly visible?: boolean
22327
22327
  /**
22328
- * If this should be drawn below sprites and entities.
22328
+ * If this should be drawn below sprites and entities. Defaults to false.
22329
22329
  */
22330
22330
  readonly draw_on_ground?: boolean
22331
22331
  /**
@@ -23954,7 +23954,7 @@ declare module "factorio:runtime" {
23954
23954
  /**
23955
23955
  * Gets the current per-player settings for the given player, indexed by prototype name. Returns the same structure as {@link LuaPlayer#mod_settings LuaPlayer::mod_settings}. This table becomes invalid if its associated player does.
23956
23956
  *
23957
- * Even though this attribute is marked as read-only, individual settings can be changed by overwriting their {@link ModSetting} table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.
23957
+ * Even though this attribute is a getter, individual settings can be changed by overwriting their {@link ModSetting} table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.
23958
23958
  * @example
23959
23959
  * -- Change the value of the "active_lifestyle" setting
23960
23960
  * settings.get_player_settings(player_index)["active_lifestyle"] = {value = true}
@@ -23981,9 +23981,9 @@ declare module "factorio:runtime" {
23981
23981
  */
23982
23982
  readonly global: LuaCustomTable<string, ModSetting>
23983
23983
  /**
23984
- * The default player mod settings for this map, indexed by prototype name.
23984
+ * The **default** player mod settings for this map, indexed by prototype name. Changing these settings only affects the default settings for future players joining the game.
23985
23985
  *
23986
- * Even though this attribute is marked as read-only, individual settings can be changed by overwriting their {@link ModSetting} table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.
23986
+ * Individual settings can be changed by overwriting their {@link ModSetting} table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.
23987
23987
  * @see {@link https://lua-api.factorio.com/1.1.110/classes/LuaSettings.html#LuaSettings.player Online documentation}
23988
23988
  */
23989
23989
  readonly player: LuaCustomTable<string, ModSetting>