factorio-types 1.2.2 → 1.2.3
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/README.md +4 -0
- package/dist/classes.d.ts +11920 -17966
- package/dist/concepts.d.ts +4439 -4091
- package/dist/datacollection.d.ts +596 -0
- package/dist/defines.d.ts +1231 -1230
- package/dist/events.d.ts +2199 -735
- package/dist/global.d.ts +12 -18
- package/dist/prototypes.d.ts +5452 -5895
- package/dist/types.d.ts +5751 -5906
- package/index.d.ts +1 -0
- package/package.json +7 -8
package/dist/global.d.ts
CHANGED
|
@@ -8,46 +8,42 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Allows registration of custom commands for the in-game console.
|
|
10
10
|
*/
|
|
11
|
-
declare const commands: runtime.LuaCommandProcessor
|
|
11
|
+
declare const commands: runtime.LuaCommandProcessor;
|
|
12
12
|
/**
|
|
13
13
|
* The main scripting interface through which most of the API is accessed.
|
|
14
14
|
*/
|
|
15
|
-
declare const game: runtime.LuaGameScript
|
|
15
|
+
declare const game: runtime.LuaGameScript;
|
|
16
16
|
/**
|
|
17
17
|
* Allows printing messages to the calling RCON instance, if any.
|
|
18
18
|
*/
|
|
19
|
-
declare const rcon: runtime.LuaRCON
|
|
19
|
+
declare const rcon: runtime.LuaRCON;
|
|
20
20
|
/**
|
|
21
21
|
* Allows registration and use of functions to communicate between mods.
|
|
22
22
|
*/
|
|
23
|
-
declare const remote: runtime.LuaRemote
|
|
23
|
+
declare const remote: runtime.LuaRemote;
|
|
24
24
|
/**
|
|
25
25
|
* Allows rendering of geometric shapes, text and sprites in the game world.
|
|
26
26
|
*/
|
|
27
|
-
declare const rendering: runtime.LuaRendering
|
|
27
|
+
declare const rendering: runtime.LuaRendering;
|
|
28
28
|
/**
|
|
29
29
|
* Provides an interface for registering game event handlers.
|
|
30
30
|
*/
|
|
31
|
-
declare const script: runtime.LuaBootstrap
|
|
31
|
+
declare const script: runtime.LuaBootstrap;
|
|
32
32
|
/**
|
|
33
33
|
* Provides access to the current mod settings.
|
|
34
34
|
*/
|
|
35
|
-
declare const settings: runtime.LuaSettings
|
|
35
|
+
declare const settings: runtime.LuaSettings;
|
|
36
36
|
/**
|
|
37
37
|
* `localised_print()` allows printing {@link LocalisedString | runtime:LocalisedString} to stdout without polluting the Factorio {@link log file | https://wiki.factorio.com/Log_file}. This is primarily useful when communicating with external tools that launch Factorio as a child process.
|
|
38
38
|
*/
|
|
39
|
-
declare function localised_print(this: void,
|
|
40
|
-
string: runtime.LocalisedString): void
|
|
41
|
-
|
|
39
|
+
declare function localised_print(this: void, string: runtime.LocalisedString): void;
|
|
42
40
|
/**
|
|
43
41
|
* `log()` can print {@link LocalisedStrings | runtime:LocalisedString} to the Factorio {@link log file | https://wiki.factorio.com/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"]))`
|
|
44
42
|
*/
|
|
45
|
-
declare function log(this: void,
|
|
46
|
-
string: runtime.LocalisedString): void
|
|
47
|
-
|
|
43
|
+
declare function log(this: void, string: runtime.LocalisedString): void;
|
|
48
44
|
/**
|
|
49
45
|
* 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:
|
|
50
|
-
*
|
|
46
|
+
*
|
|
51
47
|
* ```
|
|
52
48
|
* local function size(t)
|
|
53
49
|
* local count = 0
|
|
@@ -57,9 +53,7 @@ declare function log(this: void,
|
|
|
57
53
|
* return count
|
|
58
54
|
* end
|
|
59
55
|
* ```
|
|
60
|
-
*
|
|
56
|
+
*
|
|
61
57
|
* Note that `table_size()` does not work correctly for {@link LuaCustomTable | runtime:LuaCustomTable}, their size has to be determined with {@link LuaCustomTable::length_operator | runtime:LuaCustomTable::length_operator} instead.
|
|
62
58
|
*/
|
|
63
|
-
declare function table_size(this: void,
|
|
64
|
-
table: runtime.table): uint
|
|
65
|
-
|
|
59
|
+
declare function table_size(this: void, table: runtime.table): uint;
|