typed-factorio 1.17.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +95 -53
- package/common/data-global.d.ts +15 -0
- package/common/serpent.d.ts +93 -0
- package/common/settings-global.d.ts +8 -0
- package/common/types.d.ts +74 -0
- package/index.d.ts +26 -0
- package/lualib/index.d.ts +2 -0
- package/{runtime → lualib}/mod-gui.d.ts +1 -0
- package/{runtime → lualib}/util.d.ts +69 -38
- package/package.json +25 -28
- package/prototype/generated/prototypes.d.ts +12821 -0
- package/prototype/generated/types.d.ts +11985 -0
- package/prototype/index.d.ts +11 -0
- package/runtime/generated/builtin-types.d.ts +59 -64
- package/runtime/generated/classes.d.ts +25770 -24477
- package/runtime/generated/concepts.d.ts +8551 -9160
- package/runtime/generated/defines.d.ts +2084 -1872
- package/runtime/generated/events.d.ts +4197 -4383
- package/runtime/generated/global-functions.d.ts +30 -28
- package/runtime/generated/global-objects.d.ts +42 -41
- package/runtime/generated/index-types.d.ts +51 -50
- package/runtime/index.d.ts +8 -16
- package/runtime/pairs.d.ts +9 -7
- package/settings/index.d.ts +10 -0
- package/settings/types.d.ts +103 -112
- package/custom-index-template.d.ts +0 -23
- package/data/types.d.ts +0 -13
- package/runtime/librariesAndFunctions.d.ts +0 -91
- package/strict-index-types.d.ts +0 -3
@@ -2,32 +2,34 @@
|
|
2
2
|
|
3
3
|
/** @noSelfInFile */
|
4
4
|
|
5
|
-
|
6
|
-
* `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"]))`
|
7
|
-
* @see {@link https://lua-api.factorio.com/latest/Libraries.html#2.-new-functions Online documentation}
|
8
|
-
*/
|
9
|
-
declare function log(string: LocalisedString): void
|
5
|
+
import type { LocalisedString, table, uint } from "factorio:runtime"
|
10
6
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
/**
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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/1.1.89/auxiliary/libraries.html#new-functions Online documentation}
|
11
|
+
*/
|
12
|
+
function log(string: LocalisedString): void
|
13
|
+
/**
|
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.89/auxiliary/libraries.html#new-functions Online documentation}
|
16
|
+
*/
|
17
|
+
function localised_print(string: LocalisedString): void
|
18
|
+
/**
|
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
|
+
*
|
21
|
+
* ```
|
22
|
+
* local function size(t)
|
23
|
+
* local count = 0
|
24
|
+
* for k,v in pairs(t) do
|
25
|
+
* count = count + 1
|
26
|
+
* end
|
27
|
+
* return count
|
28
|
+
* end
|
29
|
+
* ```
|
30
|
+
*
|
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.89/auxiliary/libraries.html#new-functions Online documentation}
|
33
|
+
*/
|
34
|
+
function table_size(table: table): uint
|
35
|
+
}
|
@@ -2,44 +2,45 @@
|
|
2
2
|
|
3
3
|
/** @noSelfInFile */
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
/**
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
5
|
+
import type {
|
6
|
+
LuaBootstrap,
|
7
|
+
LuaCommandProcessor,
|
8
|
+
LuaGameScript,
|
9
|
+
LuaRCON,
|
10
|
+
LuaRemote,
|
11
|
+
LuaRendering,
|
12
|
+
} from "factorio:runtime"
|
13
|
+
|
14
|
+
declare global {
|
15
|
+
/**
|
16
|
+
* The main scripting interface through which most of the API is accessed.
|
17
|
+
* @see {@link https://lua-api.factorio.com/1.1.89/index-runtime.html Online documentation}
|
18
|
+
*/
|
19
|
+
const game: LuaGameScript
|
20
|
+
/**
|
21
|
+
* Provides an interface for registering game event handlers.
|
22
|
+
* @see {@link https://lua-api.factorio.com/1.1.89/index-runtime.html Online documentation}
|
23
|
+
*/
|
24
|
+
const script: LuaBootstrap
|
25
|
+
/**
|
26
|
+
* Allows registration and use of functions to communicate between mods.
|
27
|
+
* @see {@link https://lua-api.factorio.com/1.1.89/index-runtime.html Online documentation}
|
28
|
+
*/
|
29
|
+
const remote: LuaRemote
|
30
|
+
/**
|
31
|
+
* Allows registration of custom commands for the in-game console.
|
32
|
+
* @see {@link https://lua-api.factorio.com/1.1.89/index-runtime.html Online documentation}
|
33
|
+
*/
|
34
|
+
const commands: LuaCommandProcessor
|
35
|
+
//The "settings" global is declared in common/settings-global.d.ts; its runtime type is handled below.
|
36
|
+
/**
|
37
|
+
* Allows printing messages to the calling RCON instance, if any.
|
38
|
+
* @see {@link https://lua-api.factorio.com/1.1.89/index-runtime.html Online documentation}
|
39
|
+
*/
|
40
|
+
const rcon: LuaRCON
|
41
|
+
/**
|
42
|
+
* Allows rendering of geometric shapes, text and sprites in the game world.
|
43
|
+
* @see {@link https://lua-api.factorio.com/1.1.89/index-runtime.html Online documentation}
|
44
|
+
*/
|
45
|
+
const rendering: LuaRendering
|
46
|
+
}
|
@@ -3,54 +3,55 @@
|
|
3
3
|
/** @noSelfInFile */
|
4
4
|
|
5
5
|
/**
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* If using strict-index-types, and you need to use a plain number for this type, you can use a cast, e.g. `1 as PlayerIndex`.
|
6
|
+
* @noResolution
|
9
7
|
*/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
/**
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
type
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
type
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
8
|
+
declare module "factorio:runtime" {
|
9
|
+
/**
|
10
|
+
* See {@link LuaPlayer#index LuaPlayer.index}.
|
11
|
+
*
|
12
|
+
* You can cast a raw number to this type, e.g. `1 as PlayerIndex`.
|
13
|
+
*/
|
14
|
+
type PlayerIndex = uint & {
|
15
|
+
_playerIndexBrand: void
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* See {@link LuaSurface#index LuaSurface.index}.
|
19
|
+
*
|
20
|
+
* You can cast a raw number to this type, e.g. `1 as SurfaceIndex`.
|
21
|
+
*/
|
22
|
+
type SurfaceIndex = uint & {
|
23
|
+
_surfaceIndexBrand: void
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* See {@link LuaForce#index LuaForce.index}.
|
27
|
+
*
|
28
|
+
* You can cast a raw number to this type, e.g. `1 as ForceIndex`.
|
29
|
+
*/
|
30
|
+
type ForceIndex = uint & {
|
31
|
+
_forceIndexBrand: void
|
32
|
+
}
|
33
|
+
/**
|
34
|
+
* See {@link LuaEntity#unit_number LuaEntity.unit_number}.
|
35
|
+
*
|
36
|
+
* You can cast a raw number to this type, e.g. `1 as UnitNumber`.
|
37
|
+
*/
|
38
|
+
type UnitNumber = uint & {
|
39
|
+
_unitNumberBrand: void
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* See {@link LuaGuiElement#index LuaGuiElement.index}.
|
43
|
+
*
|
44
|
+
* You can cast a raw number to this type, e.g. `1 as GuiElementIndex`.
|
45
|
+
*/
|
46
|
+
type GuiElementIndex = uint & {
|
47
|
+
_guiElementIndexBrand: void
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* See {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap.register_on_entity_destroyed}.
|
51
|
+
*
|
52
|
+
* You can cast a raw number to this type, e.g. `1 as RegistrationNumber`.
|
53
|
+
*/
|
54
|
+
type RegistrationNumber = uint64 & {
|
55
|
+
_registrationNumberBrand: void
|
56
|
+
}
|
57
|
+
}
|
package/runtime/index.d.ts
CHANGED
@@ -1,19 +1,11 @@
|
|
1
|
-
|
1
|
+
// This file declares globals for the factorio runtime stage.
|
2
2
|
|
3
|
-
|
4
|
-
/// <reference path="./generated/builtin-types.d.ts" />
|
3
|
+
/// <reference path="../index.d.ts" />
|
5
4
|
/// <reference path="./generated/global-objects.d.ts" />
|
6
|
-
/// <reference path="
|
7
|
-
/// <reference path="./generated/defines.d.ts" />
|
8
|
-
/// <reference path="./generated/events.d.ts" />
|
9
|
-
/// <reference path="./generated/classes.d.ts" />
|
10
|
-
/// <reference path="./generated/concepts.d.ts" />
|
11
|
-
/// <reference path="./generated/index-types.d.ts" />
|
5
|
+
/// <reference path="../common/settings-global.d.ts" />
|
12
6
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
/// <reference path="util.d.ts" />
|
19
|
-
/// <reference path="mod-gui.d.ts" />
|
7
|
+
/** @noResolution */
|
8
|
+
declare module "factorio:common" {
|
9
|
+
import { LuaSettings } from "factorio:runtime"
|
10
|
+
export interface SettingsGlobal extends LuaSettings {}
|
11
|
+
}
|
package/runtime/pairs.d.ts
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
/** @noSelfInFile */
|
2
|
-
|
2
|
+
import { LuaCustomTable } from "factorio:runtime"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
declare global {
|
5
|
+
/** **Note**: you can also iterate on a LuaCustomTable directly without using `pairs`, e.g. `for(const [k, v] of table)`. */
|
6
|
+
function pairs<T extends LuaCustomTable<any, any>>(
|
7
|
+
table: T
|
8
|
+
): LuaIterable<LuaMultiReturn<T extends Iterable<infer E> ? E : never>>
|
8
9
|
|
9
|
-
/** @deprecated {@link LuaCustomTable} cannot be iterated with `ipairs`; Use {@link pairs} instead. */
|
10
|
-
|
10
|
+
/** @deprecated {@link LuaCustomTable} cannot be iterated with `ipairs`; Use {@link pairs} instead. */
|
11
|
+
function ipairs(table: LuaCustomTable<any, any>): never
|
12
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// This file declares globals for the factorio settings stage.
|
2
|
+
|
3
|
+
/// <reference path="../index.d.ts" />
|
4
|
+
/// <reference path="../common/data-global.d.ts" />
|
5
|
+
|
6
|
+
/** @noResolution */
|
7
|
+
declare module "factorio:common" {
|
8
|
+
import { PrototypeMap } from "factorio:settings"
|
9
|
+
export interface GlobalPrototypeMap extends PrototypeMap {}
|
10
|
+
}
|
package/settings/types.d.ts
CHANGED
@@ -1,120 +1,111 @@
|
|
1
1
|
// Based off of https://wiki.factorio.com/Tutorial:Mod_settings
|
2
2
|
|
3
|
-
|
3
|
+
/** @noResolution */
|
4
|
+
declare module "factorio:settings" {
|
5
|
+
import { LocalisedString } from "factorio:prototype"
|
6
|
+
export type SettingType = "bool-setting" | "int-setting" | "double-setting" | "string-setting"
|
4
7
|
|
5
|
-
export interface BaseSettingDefinition {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
export interface BaseSettingDefinition {
|
9
|
+
readonly type: SettingType
|
10
|
+
/**
|
11
|
+
* The name of the settings prototype should be unique to avoid mod conflicts since the mod settings are global across
|
12
|
+
* all mods. Because of that it is recommended to prefix mod settings with your mod name,
|
13
|
+
*/
|
14
|
+
name: string
|
15
|
+
localized_name?: LocalisedString
|
16
|
+
localized_description?: LocalisedString
|
14
17
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
18
|
+
/**
|
19
|
+
* The order property can be used to change how the mod settings are ordered in the settings gui. Mod settings are sorted
|
20
|
+
*
|
21
|
+
* - First by mod
|
22
|
+
* - Then by the setting "order" string
|
23
|
+
* - Then finally by the setting name.
|
24
|
+
*/
|
25
|
+
order?: string
|
26
|
+
/**
|
27
|
+
* The hidden property can be used to hide mod settings from GUIs, so that they cannot be seen or changed by players.
|
28
|
+
* However, other mods can still access hidden settings. {@link https://forums.factorio.com/83316}
|
29
|
+
*/
|
30
|
+
hidden?: boolean
|
31
|
+
/**
|
32
|
+
* There are the overall kinds of settings:
|
33
|
+
*
|
34
|
+
* - **startup**: This kind of setting is available in the prototype stage, and can not be changed runtime. They have to
|
35
|
+
* be set to the same values for all players on a server.
|
36
|
+
* - **runtime-global**: This kind of setting is global to an entire save game and can be changed runtime. On servers,
|
37
|
+
* only admins can change these settings.
|
38
|
+
* - **runtime-per-user**: This kind of setting is only available runtime in the control.lua stage and each player has
|
39
|
+
* their own instance of this setting. When a player joins a server their local setting of "keep mod settings per
|
40
|
+
* save" determines if the local settings they have set are synced to the loaded save or if the save's settings are used.
|
41
|
+
*
|
42
|
+
* This "setting_type" also determines in which tab the setting is showed in the mod settings menu.
|
43
|
+
*/
|
41
44
|
|
42
|
-
|
43
|
-
}
|
44
|
-
/** A true/false checkbox */
|
45
|
-
export interface BoolSettingDefinition extends BaseSettingDefinition {
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
}
|
55
|
-
/** A signed 64 bit integer textfield (or selection dropdown) */
|
56
|
-
export interface IntSettingDefinition extends BaseSettingDefinition {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
70
|
-
/** A double precision floating point textfield (or selection dropdown) */
|
71
|
-
export interface DoubleSettingDefinition extends BaseSettingDefinition {
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
}
|
85
|
-
/** A string textfield (or selection dropdown) */
|
86
|
-
export interface StringSettingDefinition extends BaseSettingDefinition {
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
}
|
101
|
-
/** Setting definitions. See {@link https://wiki.factorio.com/Tutorial:Mod_settings} for more info. */
|
102
|
-
export type SettingDefinition =
|
103
|
-
| BoolSettingDefinition
|
104
|
-
| IntSettingDefinition
|
105
|
-
| DoubleSettingDefinition
|
106
|
-
| StringSettingDefinition
|
45
|
+
setting_type: "startup" | "runtime-global" | "runtime-per-user"
|
46
|
+
}
|
47
|
+
/** A true/false checkbox */
|
48
|
+
export interface BoolSettingDefinition extends BaseSettingDefinition {
|
49
|
+
readonly type: "bool-setting"
|
50
|
+
/** Defines the default value of the setting, in this case whether the checkbox is checked or not. */
|
51
|
+
default_value: boolean
|
52
|
+
/**
|
53
|
+
* Only loaded if `hidden = true`. This forces the setting to be of this value. This can be useful for mod
|
54
|
+
* compatibility. {@link https://forums.factorio.com/viewtopic.php?p=531322#p531322}
|
55
|
+
*/
|
56
|
+
forced_value?: boolean
|
57
|
+
}
|
58
|
+
/** A signed 64 bit integer textfield (or selection dropdown) */
|
59
|
+
export interface IntSettingDefinition extends BaseSettingDefinition {
|
60
|
+
readonly type: "int-setting"
|
61
|
+
/** Defines the default value of the setting. */
|
62
|
+
default_value: number
|
63
|
+
/** Defines the lowest possible number. */
|
64
|
+
minimum_value?: number
|
65
|
+
/** Defines the highest possible number. */
|
66
|
+
maximum_value?: number
|
67
|
+
/**
|
68
|
+
* Makes it possible to force the player to choose between the defined numbers, creates a dropdown instead of a
|
69
|
+
* textfield. If only one allowed value is given, the settings is forced to be of that value.
|
70
|
+
*/
|
71
|
+
allowed_values?: number[]
|
72
|
+
}
|
73
|
+
/** A double precision floating point textfield (or selection dropdown) */
|
74
|
+
export interface DoubleSettingDefinition extends BaseSettingDefinition {
|
75
|
+
readonly type: "double-setting"
|
76
|
+
/** Defines the default value of the setting. */
|
77
|
+
default_value: number
|
78
|
+
/** Defines the lowest possible number. */
|
79
|
+
minimum_value?: number
|
80
|
+
/** Defines the highest possible number. */
|
81
|
+
maximum_value?: number
|
82
|
+
/**
|
83
|
+
* Makes it possible to force the player to choose between the defined numbers, creates a dropdown instead of a
|
84
|
+
* textfield. If only one allowed value is given, the settings is forced to be of that value.
|
85
|
+
*/
|
86
|
+
allowed_values?: number[]
|
87
|
+
}
|
88
|
+
/** A string textfield (or selection dropdown) */
|
89
|
+
export interface StringSettingDefinition extends BaseSettingDefinition {
|
90
|
+
readonly type: "string-setting"
|
91
|
+
/** Defines the default value of the setting. */
|
92
|
+
default_value: string
|
93
|
+
/** Defines whether it's possible for the user to set the textfield to empty and apply the setting. */
|
94
|
+
allow_blank?: boolean
|
95
|
+
/** Whether values that are input by the user should have whitespace removed from both ends of the string. */
|
96
|
+
auto_trim?: boolean
|
97
|
+
/**
|
98
|
+
* Makes it possible to force the player to choose between the defined strings, creates a dropdown instead of a
|
99
|
+
* textfield. The strings in the dropdown can be localized (translated) and can have a tooltip, see below. If only one
|
100
|
+
* allowed value is given, the settings is forced to be of that value.
|
101
|
+
*/
|
102
|
+
allowed_values?: string[]
|
103
|
+
}
|
107
104
|
|
108
|
-
export interface
|
109
|
-
|
110
|
-
|
105
|
+
export interface PrototypeMap {
|
106
|
+
"bool-setting": BoolSettingDefinition
|
107
|
+
"int-setting": IntSettingDefinition
|
108
|
+
"double-setting": DoubleSettingDefinition
|
109
|
+
"string-setting": StringSettingDefinition
|
111
110
|
}
|
112
|
-
/**
|
113
|
-
* The `data` table expects a specific format for each item in the table. Missing properties will either fall back to
|
114
|
-
* default values or give an error indicating what's missing. Extra properties that the game isn't looking for are
|
115
|
-
* simply ignored.
|
116
|
-
*/
|
117
|
-
extend(prototypes: SettingDefinition[]): void
|
118
111
|
}
|
119
|
-
/** A mapping of mod names to mod version for all enabled mods. */
|
120
|
-
export type Mods = Record<string, string>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
// This references the same files as "typed-factorio/runtime".
|
2
|
-
// For example, if you want to modify a file, copy the file you want to modify to your project and make the changes. Then, copy this template file into your project and remove the line corresponding to modified file.
|
3
|
-
// If you think your modification will be useful to others, please consider making a change suggestion by creating an issue on GitHub.
|
4
|
-
|
5
|
-
/// <reference types="lua-types/5.2" />
|
6
|
-
|
7
|
-
// generated
|
8
|
-
/// <reference types="typed-factorio/runtime/generated/builtin-types.d.ts" />
|
9
|
-
/// <reference types="typed-factorio/runtime/generated/global-objects.d.ts" />
|
10
|
-
/// <reference types="typed-factorio/runtime/generated/global-functions.d.ts" />
|
11
|
-
/// <reference types="typed-factorio/runtime/generated/defines.d.ts" />
|
12
|
-
/// <reference types="typed-factorio/runtime/generated/events.d.ts" />
|
13
|
-
/// <reference types="typed-factorio/runtime/generated/classes.d.ts" />
|
14
|
-
/// <reference types="typed-factorio/runtime/generated/concepts.d.ts" />
|
15
|
-
/// <reference types="typed-factorio/runtime/generated/index-types.d.ts" />
|
16
|
-
|
17
|
-
// other runtime
|
18
|
-
/// <reference types="typed-factorio/runtime/librariesAndFunctions.d.ts" />
|
19
|
-
/// <reference types="typed-factorio/runtime/pairs.d.ts" />
|
20
|
-
|
21
|
-
// lualib
|
22
|
-
/// <reference types="typed-factorio/runtime/util.d.ts" />
|
23
|
-
/// <reference types="typed-factorio/runtime/mod-gui.d.ts" />
|
package/data/types.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
export interface Data {
|
2
|
-
readonly raw: Record<string, Record<string, any>>
|
3
|
-
|
4
|
-
/**
|
5
|
-
* The `data` table expects a specific format for each item in the table. Missing properties will either fall back to
|
6
|
-
* default values or give an error indicating what's missing. Extra properties that the game isn't looking for are
|
7
|
-
* simply ignored.
|
8
|
-
*/
|
9
|
-
extend(prototypes: Record<string, any>[]): void
|
10
|
-
}
|
11
|
-
|
12
|
-
/** A mapping of mod names to mod version for all enabled mods. */
|
13
|
-
export type Mods = Record<string, string>
|