typed-factorio 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,16 +5,16 @@
5
5
  import type { LocalisedString, table, uint } from "factorio:runtime"
6
6
 
7
7
  declare global {
8
- /**
9
- * `log()` can print {@link LocalisedString LocalisedStrings} to the Factorio {@linkplain https://wiki.factorio.com/Log_file log file}. This, in combination with the serpent library, makes debugging in the data stage easier because it allows the inspection of entire prototype tables. For example, printing all properties of the sulfur item prototype can be done like so: `log(serpent.block(data.raw["item"]["sulfur"]))`
10
- * @see {@link https://lua-api.factorio.com/2.0.17/auxiliary/libraries.html#new-functions Online documentation}
11
- */
12
- function log(string: LocalisedString): void
13
8
  /**
14
9
  * `localised_print()` allows printing {@link LocalisedString} to stdout without polluting the Factorio {@linkplain https://wiki.factorio.com/Log_file log file}. This is primarily useful when communicating with external tools that launch Factorio as a child process.
15
- * @see {@link https://lua-api.factorio.com/2.0.17/auxiliary/libraries.html#new-functions Online documentation}
10
+ * @see {@link https://lua-api.factorio.com/2.0.21/auxiliary/libraries.html#new-functions Online documentation}
16
11
  */
17
12
  function localised_print(string: LocalisedString): void
13
+ /**
14
+ * `log()` can print {@link LocalisedString LocalisedStrings} to the Factorio {@linkplain https://wiki.factorio.com/Log_file log file}. This, in combination with the serpent library, makes debugging in the data stage easier because it allows the inspection of entire prototype tables. For example, printing all properties of the sulfur item prototype can be done like so: `log(serpent.block(data.raw["item"]["sulfur"]))`
15
+ * @see {@link https://lua-api.factorio.com/2.0.21/auxiliary/libraries.html#new-functions Online documentation}
16
+ */
17
+ function log(string: LocalisedString): void
18
18
  /**
19
19
  * Factorio provides the `table_size()` function as a simple way to determine the size of tables with non-continuous keys, as the standard `#` operator does not work correctly for these. The function is a C++ implementation of the following Lua code, which is faster than doing the same in Lua:
20
20
  *
@@ -29,7 +29,7 @@ declare global {
29
29
  * ```
30
30
  *
31
31
  * Note that `table_size()` does not work correctly for {@link LuaCustomTable}, their size has to be determined with {@link LuaCustomTable#length LuaCustomTable::length_operator} instead.
32
- * @see {@link https://lua-api.factorio.com/2.0.17/auxiliary/libraries.html#new-functions Online documentation}
32
+ * @see {@link https://lua-api.factorio.com/2.0.21/auxiliary/libraries.html#new-functions Online documentation}
33
33
  */
34
34
  function table_size(table: table): uint
35
35
  }
@@ -14,45 +14,45 @@ import type {
14
14
  } from "factorio:runtime"
15
15
 
16
16
  declare global {
17
- /**
18
- * The main scripting interface through which most of the API is accessed.
19
- * @see {@link https://lua-api.factorio.com/2.0.17/index-runtime.html Online documentation}
20
- */
21
- const game: LuaGameScript
22
- /**
23
- * Provides an interface for registering game event handlers.
24
- * @see {@link https://lua-api.factorio.com/2.0.17/index-runtime.html Online documentation}
25
- */
26
- const script: LuaBootstrap
27
17
  /**
28
18
  * Allows registration of custom commands for the in-game console.
29
- * @see {@link https://lua-api.factorio.com/2.0.17/index-runtime.html Online documentation}
19
+ * @see {@link https://lua-api.factorio.com/2.0.21/index-runtime.html Online documentation}
30
20
  */
31
21
  const commands: LuaCommandProcessor
22
+ /**
23
+ * The main scripting interface through which most of the API is accessed.
24
+ * @see {@link https://lua-api.factorio.com/2.0.21/index-runtime.html Online documentation}
25
+ */
26
+ const game: LuaGameScript
32
27
  /**
33
28
  * Provides access to various helper and utility functions.
34
- * @see {@link https://lua-api.factorio.com/2.0.17/index-runtime.html Online documentation}
29
+ * @see {@link https://lua-api.factorio.com/2.0.21/index-runtime.html Online documentation}
35
30
  */
36
31
  const helpers: LuaHelpers
37
32
  /**
38
33
  * Allows read-only access to prototypes.
39
- * @see {@link https://lua-api.factorio.com/2.0.17/index-runtime.html Online documentation}
34
+ * @see {@link https://lua-api.factorio.com/2.0.21/index-runtime.html Online documentation}
40
35
  */
41
36
  const prototypes: LuaPrototypes
42
37
  /**
43
38
  * Allows printing messages to the calling RCON instance, if any.
44
- * @see {@link https://lua-api.factorio.com/2.0.17/index-runtime.html Online documentation}
39
+ * @see {@link https://lua-api.factorio.com/2.0.21/index-runtime.html Online documentation}
45
40
  */
46
41
  const rcon: LuaRCON
47
42
  /**
48
43
  * Allows registration and use of functions to communicate between mods.
49
- * @see {@link https://lua-api.factorio.com/2.0.17/index-runtime.html Online documentation}
44
+ * @see {@link https://lua-api.factorio.com/2.0.21/index-runtime.html Online documentation}
50
45
  */
51
46
  const remote: LuaRemote
52
47
  /**
53
48
  * Allows rendering of geometric shapes, text and sprites in the game world.
54
- * @see {@link https://lua-api.factorio.com/2.0.17/index-runtime.html Online documentation}
49
+ * @see {@link https://lua-api.factorio.com/2.0.21/index-runtime.html Online documentation}
55
50
  */
56
51
  const rendering: LuaRendering
52
+ /**
53
+ * Provides an interface for registering game event handlers.
54
+ * @see {@link https://lua-api.factorio.com/2.0.21/index-runtime.html Online documentation}
55
+ */
56
+ const script: LuaBootstrap
57
57
  //The "settings" global is declared in common/settings-global.d.ts; its runtime type is handled below.
58
58
  }