typed-factorio 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lualib/util.d.ts +4 -4
- package/package.json +3 -3
- package/prototype/generated/prototypes.d.ts +1799 -1705
- package/prototype/generated/types.d.ts +1416 -1410
- package/runtime/generated/builtin-types.d.ts +12 -12
- package/runtime/generated/classes.d.ts +3288 -3302
- package/runtime/generated/concepts.d.ts +1810 -1810
- package/runtime/generated/defines.d.ts +166 -102
- package/runtime/generated/events.d.ts +190 -186
- package/runtime/generated/global-functions.d.ts +3 -3
- package/runtime/generated/global-objects.d.ts +6 -6
- package/runtime/pairs.d.ts +1 -1
@@ -7,12 +7,12 @@ import type { LocalisedString, table, uint } from "factorio:runtime"
|
|
7
7
|
declare global {
|
8
8
|
/**
|
9
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/1.1.
|
10
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/auxiliary/libraries.html#new-functions Online documentation}
|
11
11
|
*/
|
12
12
|
function log(string: LocalisedString): void
|
13
13
|
/**
|
14
14
|
* `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/1.1.
|
15
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/auxiliary/libraries.html#new-functions Online documentation}
|
16
16
|
*/
|
17
17
|
function localised_print(string: LocalisedString): void
|
18
18
|
/**
|
@@ -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/1.1.
|
32
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/auxiliary/libraries.html#new-functions Online documentation}
|
33
33
|
*/
|
34
34
|
function table_size(table: table): uint
|
35
35
|
}
|
@@ -14,33 +14,33 @@ import type {
|
|
14
14
|
declare global {
|
15
15
|
/**
|
16
16
|
* The main scripting interface through which most of the API is accessed.
|
17
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
17
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/index-runtime.html Online documentation}
|
18
18
|
*/
|
19
19
|
const game: LuaGameScript
|
20
20
|
/**
|
21
21
|
* Provides an interface for registering game event handlers.
|
22
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
22
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/index-runtime.html Online documentation}
|
23
23
|
*/
|
24
24
|
const script: LuaBootstrap
|
25
25
|
/**
|
26
26
|
* Allows registration and use of functions to communicate between mods.
|
27
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
27
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/index-runtime.html Online documentation}
|
28
28
|
*/
|
29
29
|
const remote: LuaRemote
|
30
30
|
/**
|
31
31
|
* Allows registration of custom commands for the in-game console.
|
32
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
32
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/index-runtime.html Online documentation}
|
33
33
|
*/
|
34
34
|
const commands: LuaCommandProcessor
|
35
35
|
//The "settings" global is declared in common/settings-global.d.ts; its runtime type is handled below.
|
36
36
|
/**
|
37
37
|
* Allows printing messages to the calling RCON instance, if any.
|
38
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
38
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/index-runtime.html Online documentation}
|
39
39
|
*/
|
40
40
|
const rcon: LuaRCON
|
41
41
|
/**
|
42
42
|
* Allows rendering of geometric shapes, text and sprites in the game world.
|
43
|
-
* @see {@link https://lua-api.factorio.com/1.1.
|
43
|
+
* @see {@link https://lua-api.factorio.com/1.1.90/index-runtime.html Online documentation}
|
44
44
|
*/
|
45
45
|
const rendering: LuaRendering
|
46
46
|
}
|
package/runtime/pairs.d.ts
CHANGED
@@ -4,7 +4,7 @@ import { LuaCustomTable } from "factorio:runtime"
|
|
4
4
|
declare global {
|
5
5
|
/** **Note**: you can also iterate on a LuaCustomTable directly without using `pairs`, e.g. `for(const [k, v] of table)`. */
|
6
6
|
function pairs<T extends LuaCustomTable<any, any>>(
|
7
|
-
table: T
|
7
|
+
table: T,
|
8
8
|
): LuaIterable<LuaMultiReturn<T extends Iterable<infer E> ? E : never>>
|
9
9
|
|
10
10
|
/** @deprecated {@link LuaCustomTable} cannot be iterated with `ipairs`; Use {@link pairs} instead. */
|