typed-factorio 0.18.0 → 0.19.1
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/Changelog.md +14 -0
- package/generated/builtin-types.d.ts +1 -3
- package/generated/classes.d.ts +5242 -6088
- package/generated/concepts.d.ts +1923 -1205
- package/generated/defines.d.ts +464 -163
- package/generated/events.d.ts +2061 -776
- package/generated/global-objects.d.ts +1 -2
- package/package.json +1 -2
- package/runtime/util.d.ts +12 -12
@@ -3,8 +3,7 @@
|
|
3
3
|
/** @noSelfInFile */
|
4
4
|
|
5
5
|
/**
|
6
|
-
* This is the main object, through which most of the API is accessed. It is, however, not available inside handlers
|
7
|
-
* registered with {@link LuaBootstrap.on_load LuaBootstrap::on_load}.
|
6
|
+
* This is the main object, through which most of the API is accessed. It is, however, not available inside handlers registered with {@link LuaBootstrap#on_load LuaBootstrap::on_load}.
|
8
7
|
*
|
9
8
|
* {@link https://lua-api.factorio.com/latest/ View documentation}
|
10
9
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "typed-factorio",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.19.1",
|
4
4
|
"description": "Featureful typescript definitions for the the Factorio modding lua api.",
|
5
5
|
"keywords": [
|
6
6
|
"factorio",
|
@@ -49,7 +49,6 @@
|
|
49
49
|
"jest": "^27.4.3",
|
50
50
|
"lua-types": "^2.11.0",
|
51
51
|
"prettier": "^2.5.1",
|
52
|
-
"prettier-plugin-jsdoc": "^0.3.30",
|
53
52
|
"ts-jest": "^27.1.0",
|
54
53
|
"ts-node": "^10.4.0",
|
55
54
|
"typescript": "4.5.2",
|
package/runtime/util.d.ts
CHANGED
@@ -13,9 +13,9 @@ declare module "util" {
|
|
13
13
|
|
14
14
|
function copy<T>(table: T): T
|
15
15
|
|
16
|
-
function distance(position1:
|
16
|
+
function distance(position1: MapPosition, position2: MapPosition): number
|
17
17
|
|
18
|
-
function positiontostr(position:
|
18
|
+
function positiontostr(position: MapPosition): string
|
19
19
|
|
20
20
|
function formattime(ticks: number): string
|
21
21
|
|
@@ -29,11 +29,11 @@ declare module "util" {
|
|
29
29
|
function multiply_color(c1: Color, n: number): ColorArray
|
30
30
|
|
31
31
|
function moveposition(
|
32
|
-
position:
|
32
|
+
position: MapPosition,
|
33
33
|
direction: defines.direction.north | defines.direction.east | defines.direction.south | defines.direction.west,
|
34
34
|
distance: number
|
35
|
-
):
|
36
|
-
function moveposition(position:
|
35
|
+
): MapPosition
|
36
|
+
function moveposition(position: MapPosition, direction: defines.direction, distance: number): MapPosition | undefined
|
37
37
|
|
38
38
|
function oppositedirection(direction: defines.direction): defines.direction
|
39
39
|
|
@@ -41,21 +41,21 @@ declare module "util" {
|
|
41
41
|
function multiplystripes<T>(count: number, stripes: T[]): T[]
|
42
42
|
|
43
43
|
/** Gets tile position by pixel */
|
44
|
-
function by_pixel(x: number, y: number):
|
44
|
+
function by_pixel(x: number, y: number): MapPosition
|
45
45
|
|
46
46
|
/** Gets tile position by pixel, hr */
|
47
|
-
function by_pixel_hr(x: number, y: number):
|
47
|
+
function by_pixel_hr(x: number, y: number): MapPosition
|
48
48
|
|
49
49
|
// omitted: foreach_sprite_definition
|
50
50
|
|
51
|
-
function add_shift(a:
|
52
|
-
function add_shift(a:
|
53
|
-
function add_shift(a:
|
51
|
+
function add_shift(a: MapPositionArray | undefined, b: MapPositionArray): MapPositionArray
|
52
|
+
function add_shift(a: MapPositionArray, b: MapPositionArray | undefined): MapPositionArray
|
53
|
+
function add_shift(a: MapPositionArray | undefined, b: MapPositionArray | undefined): MapPositionArray | undefined
|
54
54
|
|
55
55
|
// omitted: add_shift_offset
|
56
56
|
|
57
|
-
function mul_shift(shift:
|
58
|
-
function mul_shift(shift:
|
57
|
+
function mul_shift(shift: MapPositionArray, scale: number | undefined): MapPositionArray
|
58
|
+
function mul_shift(shift: MapPositionArray | undefined, scale: number | undefined): MapPositionArray | undefined
|
59
59
|
|
60
60
|
function format_number(amount: number, append_suffix?: boolean): string
|
61
61
|
|